| name | note-it |
| description | Capture implementation notes after code implementation and review/fix. Records design decisions, deviations, tradeoffs, and open questions to docs/issue#XXXX.html. Triggers on: /note-it, 记录笔记, implementation notes. |
| user-invocable | true |
Implementation Notes
After completing implementation and review/fix for an Issue, capture a running implementation notes file that documents how the implementation diverges from or interprets the spec.
Triggers
Use when:
- After
/goal implementation and /review-it are both complete
- User says "记录笔记", "implementation notes", "note-it", "/note-it"
- Before
/ship-it (as a final checkpoint)
- Any time the user wants to capture design rationale
The Job
- Determine the Issue number from context (branch name,
/goal target, or user input)
- Review the implementation against the Issue spec / PRD
- Generate an HTML notes file at
docs/issue#XXXX.html
- Present a summary to the user
Notes Structure
The HTML file must cover these four categories. If a category has nothing to report, write "None" with a brief explanation.
1. Design Decisions
Choices made where the spec was ambiguous or silent:
- What was the ambiguity?
- What choice did you make?
- What was the rationale?
2. Deviations
Places where you intentionally departed from the spec:
- What did the spec say?
- What did you implement instead?
- Why was the deviation necessary or better?
3. Tradeoffs
Alternatives you considered and why you picked what you did:
- What were the viable alternatives?
- What were the pros/cons of each?
- Why did the chosen approach win?
4. Open Questions
Anything you'd want confirmed or revised:
- What assumption are you unsure about?
- What should the user verify?
- What might need follow-up?
Output
- Format: HTML
- Location:
docs/
- Filename:
issue#XXXX.html (where XXXX is the zero-padded Issue number, e.g., issue#0042.html)
HTML Template
Use this exact HTML structure:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Implementation Notes — Issue #XXXX</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #FAF9F6;
color: #1a1a1a;
padding: 2.5rem 2rem;
line-height: 1.7;
}
.container { max-width: 800px; margin: 0 auto; }
h1 { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.25rem; }
.meta { color: ; : ; : ; }
{
: ;
: ;
: ;
: ;
: ;
: solid ;
: flex; : center; : ;
}
{
: ; : ; : ; : inline-block;
}
{ : ; }
{ : ; }
{ : ; }
{ : ; }
{
: ;
: solid ;
: ;
: ;
: ;
: (,,,);
}
{ : ; : ; : ; }
{ : ; : ; : ; }
{
: inline-block;
: ;
: ;
: ;
: ;
: ;
}
{ : ; : ; : solid ; }
{ : ; : ; : solid ; }
{ : ; : ; : solid ; }
{ : ; : ; : solid ; }
{ : ; : italic; : ; }
{
: center; : ; : ;
: ;
}
Implementation Notes
Issue #{{ISSUE_NUMBER}} {{ISSUE_TITLE}} {{DATE}}
Design Decisions
Deviations
Tradeoffs
Open Questions
Generated by goal-workflow /note-it
Example Item
<div class="item">
<h3><span class="label label-design">Decision</span> Used interface-based polymorphism instead of switch</h3>
<p><strong>Ambiguity:</strong> The spec said "handle different types" without specifying how.</p>
<p><strong>Choice:</strong> Defined a <code>Handler</code> interface with per-type implementations.</p>
<p><strong>Rationale:</strong> Adding new types requires no changes to existing code (Open/Closed Principle). A switch would grow unboundedly.</p>
</div>
How to Determine the Issue Number
- If the user provides it directly (e.g.,
/note-it #42), use it
- If on a branch named
feat/issue-42-* or fix/issue-42-*, extract 42
- If the last
/goal target was #42, use 42
- Otherwise, ask the user: "Which Issue number should I use for the notes file?"
Edge Cases
| Scenario | Handling |
|---|
| No Issue number found | Ask the user to specify |
docs/ directory does not exist | Auto-create it |
| Notes file already exists for this Issue | Ask: "Update existing notes or overwrite?" — default to update (append new items) |
| No deviations or open questions | Write "None — implementation followed the spec as written." |
| Spec/PRD file not found | Note in Open Questions: "No PRD found at tasks/prd-*.md — verify against original requirements." |
Checklist
Before saving: