gsd-opencode 1.3.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/bin/install.js +222 -0
  2. package/command/gsd/add-phase.md +207 -0
  3. package/command/gsd/complete-milestone.md +105 -0
  4. package/command/gsd/consider-issues.md +201 -0
  5. package/command/gsd/create-roadmap.md +115 -0
  6. package/command/gsd/discuss-milestone.md +47 -0
  7. package/command/gsd/discuss-phase.md +60 -0
  8. package/command/gsd/execute-plan.md +128 -0
  9. package/command/gsd/help.md +315 -0
  10. package/command/gsd/insert-phase.md +227 -0
  11. package/command/gsd/list-phase-assumptions.md +50 -0
  12. package/command/gsd/map-codebase.md +84 -0
  13. package/command/gsd/new-milestone.md +59 -0
  14. package/command/gsd/new-project.md +316 -0
  15. package/command/gsd/pause-work.md +122 -0
  16. package/command/gsd/plan-fix.md +205 -0
  17. package/command/gsd/plan-phase.md +67 -0
  18. package/command/gsd/progress.md +316 -0
  19. package/command/gsd/remove-phase.md +338 -0
  20. package/command/gsd/research-phase.md +91 -0
  21. package/command/gsd/resume-work.md +40 -0
  22. package/command/gsd/verify-work.md +71 -0
  23. package/get-shit-done/references/checkpoints.md +287 -0
  24. package/get-shit-done/references/continuation-format.md +255 -0
  25. package/get-shit-done/references/git-integration.md +254 -0
  26. package/get-shit-done/references/plan-format.md +428 -0
  27. package/get-shit-done/references/principles.md +157 -0
  28. package/get-shit-done/references/questioning.md +162 -0
  29. package/get-shit-done/references/research-pitfalls.md +215 -0
  30. package/get-shit-done/references/scope-estimation.md +172 -0
  31. package/get-shit-done/references/tdd.md +263 -0
  32. package/get-shit-done/templates/codebase/architecture.md +255 -0
  33. package/get-shit-done/templates/codebase/concerns.md +310 -0
  34. package/get-shit-done/templates/codebase/conventions.md +307 -0
  35. package/get-shit-done/templates/codebase/integrations.md +280 -0
  36. package/get-shit-done/templates/codebase/stack.md +186 -0
  37. package/get-shit-done/templates/codebase/structure.md +285 -0
  38. package/get-shit-done/templates/codebase/testing.md +480 -0
  39. package/get-shit-done/templates/config.json +18 -0
  40. package/get-shit-done/templates/context.md +161 -0
  41. package/get-shit-done/templates/continue-here.md +78 -0
  42. package/get-shit-done/templates/discovery.md +146 -0
  43. package/get-shit-done/templates/issues.md +32 -0
  44. package/get-shit-done/templates/milestone-archive.md +123 -0
  45. package/get-shit-done/templates/milestone-context.md +93 -0
  46. package/get-shit-done/templates/milestone.md +115 -0
  47. package/get-shit-done/templates/phase-prompt.md +303 -0
  48. package/get-shit-done/templates/project.md +184 -0
  49. package/get-shit-done/templates/research.md +529 -0
  50. package/get-shit-done/templates/roadmap.md +196 -0
  51. package/get-shit-done/templates/state.md +210 -0
  52. package/get-shit-done/templates/summary.md +273 -0
  53. package/get-shit-done/templates/uat-issues.md +143 -0
  54. package/get-shit-done/workflows/complete-milestone.md +643 -0
  55. package/get-shit-done/workflows/create-milestone.md +416 -0
  56. package/get-shit-done/workflows/create-roadmap.md +481 -0
  57. package/get-shit-done/workflows/discovery-phase.md +293 -0
  58. package/get-shit-done/workflows/discuss-milestone.md +236 -0
  59. package/get-shit-done/workflows/discuss-phase.md +247 -0
  60. package/get-shit-done/workflows/execute-phase.md +1625 -0
  61. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  62. package/get-shit-done/workflows/map-codebase.md +434 -0
  63. package/get-shit-done/workflows/plan-phase.md +488 -0
  64. package/get-shit-done/workflows/research-phase.md +436 -0
  65. package/get-shit-done/workflows/resume-project.md +287 -0
  66. package/get-shit-done/workflows/transition.md +580 -0
  67. package/get-shit-done/workflows/verify-work.md +202 -0
  68. package/package.json +38 -0
@@ -0,0 +1,196 @@
1
+ # Roadmap Template
2
+
3
+ Template for `.planning/ROADMAP.md`.
4
+
5
+ ## Initial Roadmap (v1.0 Greenfield)
6
+
7
+ ```markdown
8
+ # Roadmap: [Project Name]
9
+
10
+ ## Overview
11
+
12
+ [One paragraph describing the journey from start to finish]
13
+
14
+ ## Domain Expertise
15
+
16
+ [Paths to domain skills that inform planning. These SKILL.md files serve as indexes - during phase planning, read them to find relevant references for each phase type.]
17
+
18
+ - ~/.config/opencode/skills/expertise/[domain]/SKILL.md
19
+ [Add additional domains if project spans multiple (e.g., ISF shaders + macOS app)]
20
+
21
+ Or: None
22
+
23
+ ## Phases
24
+
25
+ **Phase Numbering:**
26
+ - Integer phases (1, 2, 3): Planned milestone work
27
+ - Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)
28
+
29
+ Decimal phases appear between their surrounding integers in numeric order.
30
+
31
+ - [ ] **Phase 1: [Name]** - [One-line description]
32
+ - [ ] **Phase 2: [Name]** - [One-line description]
33
+ - [ ] **Phase 3: [Name]** - [One-line description]
34
+ - [ ] **Phase 4: [Name]** - [One-line description]
35
+
36
+ ## Phase Details
37
+
38
+ ### Phase 1: [Name]
39
+ **Goal**: [What this phase delivers]
40
+ **Depends on**: Nothing (first phase)
41
+ **Research**: Unlikely (established patterns)
42
+ **Plans**: [Number of plans, e.g., "3 plans" or "TBD"]
43
+
44
+ Plans:
45
+ - [ ] 01-01: [Brief description of first plan]
46
+ - [ ] 01-02: [Brief description of second plan]
47
+ - [ ] 01-03: [Brief description of third plan]
48
+
49
+ ### Phase 2: [Name]
50
+ **Goal**: [What this phase delivers]
51
+ **Depends on**: Phase 1
52
+ **Research**: Likely (new integration)
53
+ **Research topics**: [What needs investigating]
54
+ **Plans**: [Number of plans]
55
+
56
+ Plans:
57
+ - [ ] 02-01: [Brief description]
58
+ - [ ] 02-02: [Brief description]
59
+
60
+ ### Phase 2.1: Critical Fix (INSERTED)
61
+ **Goal**: [Urgent work inserted between phases]
62
+ **Depends on**: Phase 2
63
+ **Plans**: 1 plan
64
+
65
+ Plans:
66
+ - [ ] 2.1-01: [Description]
67
+
68
+ ### Phase 3: [Name]
69
+ **Goal**: [What this phase delivers]
70
+ **Depends on**: Phase 2
71
+ **Research**: Likely (external API)
72
+ **Research topics**: [What needs investigating]
73
+ **Plans**: [Number of plans]
74
+
75
+ Plans:
76
+ - [ ] 03-01: [Brief description]
77
+ - [ ] 03-02: [Brief description]
78
+
79
+ ### Phase 4: [Name]
80
+ **Goal**: [What this phase delivers]
81
+ **Depends on**: Phase 3
82
+ **Research**: Unlikely (internal patterns)
83
+ **Plans**: [Number of plans]
84
+
85
+ Plans:
86
+ - [ ] 04-01: [Brief description]
87
+
88
+ ## Progress
89
+
90
+ **Execution Order:**
91
+ Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4
92
+
93
+ | Phase | Plans Complete | Status | Completed |
94
+ |-------|----------------|--------|-----------|
95
+ | 1. [Name] | 0/3 | Not started | - |
96
+ | 2. [Name] | 0/2 | Not started | - |
97
+ | 3. [Name] | 0/2 | Not started | - |
98
+ | 4. [Name] | 0/1 | Not started | - |
99
+ ```
100
+
101
+ <guidelines>
102
+ **Initial planning (v1.0):**
103
+ - Phase count depends on depth setting (quick: 3-5, standard: 5-8, comprehensive: 8-12)
104
+ - Each phase delivers something coherent
105
+ - Phases can have 1+ plans (split if >3 tasks or multiple subsystems)
106
+ - Plans use naming: {phase}-{plan}-PLAN.md (e.g., 01-02-PLAN.md)
107
+ - No time estimates (this isn't enterprise PM)
108
+ - Progress table updated by execute workflow
109
+ - Plan count can be "TBD" initially, refined during planning
110
+
111
+ **Research flags:**
112
+ - `Research: Likely` - External APIs, new libraries, architectural decisions
113
+ - `Research: Unlikely` - Internal patterns, CRUD operations, established conventions
114
+ - Include `Research topics:` when Likely
115
+ - Flags are hints, not mandates - validate at planning time
116
+
117
+ **After milestones ship:**
118
+ - Collapse completed milestones in `<details>` tags
119
+ - Add new milestone sections for upcoming work
120
+ - Keep continuous phase numbering (never restart at 01)
121
+ </guidelines>
122
+
123
+ <status_values>
124
+ - `Not started` - Haven't begun
125
+ - `In progress` - Currently working
126
+ - `Complete` - Done (add completion date)
127
+ - `Deferred` - Pushed to later (with reason)
128
+ </status_values>
129
+
130
+ ## Milestone-Grouped Roadmap (After v1.0 Ships)
131
+
132
+ After completing first milestone, reorganize with milestone groupings:
133
+
134
+ ```markdown
135
+ # Roadmap: [Project Name]
136
+
137
+ ## Milestones
138
+
139
+ - ✅ **v1.0 MVP** - Phases 1-4 (shipped YYYY-MM-DD)
140
+ - 🚧 **v1.1 [Name]** - Phases 5-6 (in progress)
141
+ - 📋 **v2.0 [Name]** - Phases 7-10 (planned)
142
+
143
+ ## Phases
144
+
145
+ <details>
146
+ <summary>✅ v1.0 MVP (Phases 1-4) - SHIPPED YYYY-MM-DD</summary>
147
+
148
+ ### Phase 1: [Name]
149
+ **Goal**: [What this phase delivers]
150
+ **Plans**: 3 plans
151
+
152
+ Plans:
153
+ - [x] 01-01: [Brief description]
154
+ - [x] 01-02: [Brief description]
155
+ - [x] 01-03: [Brief description]
156
+
157
+ [... remaining v1.0 phases ...]
158
+
159
+ </details>
160
+
161
+ ### 🚧 v1.1 [Name] (In Progress)
162
+
163
+ **Milestone Goal:** [What v1.1 delivers]
164
+
165
+ #### Phase 5: [Name]
166
+ **Goal**: [What this phase delivers]
167
+ **Depends on**: Phase 4
168
+ **Plans**: 2 plans
169
+
170
+ Plans:
171
+ - [ ] 05-01: [Brief description]
172
+ - [ ] 05-02: [Brief description]
173
+
174
+ [... remaining v1.1 phases ...]
175
+
176
+ ### 📋 v2.0 [Name] (Planned)
177
+
178
+ **Milestone Goal:** [What v2.0 delivers]
179
+
180
+ [... v2.0 phases ...]
181
+
182
+ ## Progress
183
+
184
+ | Phase | Milestone | Plans Complete | Status | Completed |
185
+ |-------|-----------|----------------|--------|-----------|
186
+ | 1. Foundation | v1.0 | 3/3 | Complete | YYYY-MM-DD |
187
+ | 2. Features | v1.0 | 2/2 | Complete | YYYY-MM-DD |
188
+ | 5. Security | v1.1 | 0/2 | Not started | - |
189
+ ```
190
+
191
+ **Notes:**
192
+ - Milestone emoji: ✅ shipped, 🚧 in progress, 📋 planned
193
+ - Completed milestones collapsed in `<details>` for readability
194
+ - Current/future milestones expanded
195
+ - Continuous phase numbering (01-99)
196
+ - Progress table includes milestone column
@@ -0,0 +1,210 @@
1
+ # State Template
2
+
3
+ Template for `.planning/STATE.md` — the project's living memory.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ # Project State
11
+
12
+ ## Project Reference
13
+
14
+ See: .planning/PROJECT.md (updated [date])
15
+
16
+ **Core value:** [One-liner from PROJECT.md Core Value section]
17
+ **Current focus:** [Current phase name]
18
+
19
+ ## Current Position
20
+
21
+ Phase: [X] of [Y] ([Phase name])
22
+ Plan: [A] of [B] in current phase
23
+ Status: [Ready to plan / Planning / Ready to execute / In progress / Phase complete]
24
+ Last activity: [YYYY-MM-DD] — [What happened]
25
+
26
+ Progress: [░░░░░░░░░░] 0%
27
+
28
+ ## Performance Metrics
29
+
30
+ **Velocity:**
31
+ - Total plans completed: [N]
32
+ - Average duration: [X] min
33
+ - Total execution time: [X.X] hours
34
+
35
+ **By Phase:**
36
+
37
+ | Phase | Plans | Total | Avg/Plan |
38
+ |-------|-------|-------|----------|
39
+ | - | - | - | - |
40
+
41
+ **Recent Trend:**
42
+ - Last 5 plans: [durations]
43
+ - Trend: [Improving / Stable / Degrading]
44
+
45
+ *Updated after each plan completion*
46
+
47
+ ## Accumulated Context
48
+
49
+ ### Decisions
50
+
51
+ Decisions are logged in PROJECT.md Key Decisions table.
52
+ Recent decisions affecting current work:
53
+
54
+ - [Phase X]: [Decision summary]
55
+ - [Phase Y]: [Decision summary]
56
+
57
+ ### Deferred Issues
58
+
59
+ [From ISSUES.md — list open items with phase of origin]
60
+
61
+ None yet.
62
+
63
+ ### Blockers/Concerns
64
+
65
+ [Issues that affect future work]
66
+
67
+ None yet.
68
+
69
+ ## Session Continuity
70
+
71
+ Last session: [YYYY-MM-DD HH:MM]
72
+ Stopped at: [Description of last completed action]
73
+ Resume file: [Path to .continue-here*.md if exists, otherwise "None"]
74
+ ```
75
+
76
+ <purpose>
77
+
78
+ STATE.md is the project's short-term memory spanning all phases and sessions.
79
+
80
+ **Problem it solves:** Information is captured in summaries, issues, and decisions but not systematically consumed. Sessions start without context.
81
+
82
+ **Solution:** A single, small file that's:
83
+ - Read first in every workflow
84
+ - Updated after every significant action
85
+ - Contains digest of accumulated context
86
+ - Enables instant session restoration
87
+
88
+ </purpose>
89
+
90
+ <lifecycle>
91
+
92
+ **Creation:** After ROADMAP.md is created (during init)
93
+ - Reference PROJECT.md (read it for current context)
94
+ - Initialize empty accumulated context sections
95
+ - Set position to "Phase 1 ready to plan"
96
+
97
+ **Reading:** First step of every workflow
98
+ - progress: Present status to user
99
+ - plan: Inform planning decisions
100
+ - execute: Know current position
101
+ - transition: Know what's complete
102
+
103
+ **Writing:** After every significant action
104
+ - execute: After SUMMARY.md created
105
+ - Update position (phase, plan, status)
106
+ - Note new decisions (detail in PROJECT.md)
107
+ - Update deferred issues list
108
+ - Add blockers/concerns
109
+ - transition: After phase marked complete
110
+ - Update progress bar
111
+ - Clear resolved blockers
112
+ - Refresh Project Reference date
113
+
114
+ </lifecycle>
115
+
116
+ <sections>
117
+
118
+ ### Project Reference
119
+ Points to PROJECT.md for full context. Includes:
120
+ - Core value (the ONE thing that matters)
121
+ - Current focus (which phase)
122
+ - Last update date (triggers re-read if stale)
123
+
124
+ Claude reads PROJECT.md directly for requirements, constraints, and decisions.
125
+
126
+ ### Current Position
127
+ Where we are right now:
128
+ - Phase X of Y — which phase
129
+ - Plan A of B — which plan within phase
130
+ - Status — current state
131
+ - Last activity — what happened most recently
132
+ - Progress bar — visual indicator of overall completion
133
+
134
+ Progress calculation: (completed plans) / (total plans across all phases) × 100%
135
+
136
+ ### Performance Metrics
137
+ Track velocity to understand execution patterns:
138
+ - Total plans completed
139
+ - Average duration per plan
140
+ - Per-phase breakdown
141
+ - Recent trend (improving/stable/degrading)
142
+
143
+ Updated after each plan completion.
144
+
145
+ ### Accumulated Context
146
+
147
+ **Decisions:** Reference to PROJECT.md Key Decisions table, plus recent decisions summary for quick access. Full decision log lives in PROJECT.md.
148
+
149
+ **Deferred Issues:** Open items from ISSUES.md
150
+ - Brief description with ISS-XXX number
151
+ - Phase where discovered
152
+ - Effort estimate if known
153
+ - Helps phase planning identify what to address
154
+
155
+ **Blockers/Concerns:** From "Next Phase Readiness" sections
156
+ - Issues that affect future work
157
+ - Prefix with originating phase
158
+ - Cleared when addressed
159
+
160
+ ### Session Continuity
161
+ Enables instant resumption:
162
+ - When was last session
163
+ - What was last completed
164
+ - Is there a .continue-here file to resume from
165
+
166
+ </sections>
167
+
168
+ <size_constraint>
169
+
170
+ Keep STATE.md under 100 lines.
171
+
172
+ It's a DIGEST, not an archive. If accumulated context grows too large:
173
+ - Keep only 3-5 recent decisions in summary (full log in PROJECT.md)
174
+ - Reference ISSUES.md instead of listing all: "12 open issues — see ISSUES.md"
175
+ - Keep only active blockers, remove resolved ones
176
+
177
+ The goal is "read once, know where we are" — if it's too long, that fails.
178
+
179
+ </size_constraint>
180
+
181
+ <guidelines>
182
+
183
+ **When created:**
184
+ - During project initialization (after ROADMAP.md)
185
+ - Reference PROJECT.md (extract core value and current focus)
186
+ - Initialize empty sections
187
+
188
+ **When read:**
189
+ - Every workflow starts by reading STATE.md
190
+ - Then read PROJECT.md for full context
191
+ - Provides instant context restoration
192
+
193
+ **When updated:**
194
+ - After each plan execution (update position, note decisions, update issues/blockers)
195
+ - After phase transitions (update progress bar, clear resolved blockers, refresh project reference)
196
+
197
+ **Size management:**
198
+ - Keep under 100 lines total
199
+ - Recent decisions only in STATE.md (full log in PROJECT.md)
200
+ - Reference ISSUES.md instead of listing all issues
201
+ - Keep only active blockers
202
+
203
+ **Sections:**
204
+ - Project Reference: Pointer to PROJECT.md with core value
205
+ - Current Position: Where we are now (phase, plan, status)
206
+ - Performance Metrics: Velocity tracking
207
+ - Accumulated Context: Recent decisions, deferred issues, blockers
208
+ - Session Continuity: Resume information
209
+
210
+ </guidelines>
@@ -0,0 +1,273 @@
1
+ # Summary Template
2
+
3
+ Template for `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md` - phase completion documentation.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ phase: XX-name
12
+ plan: YY
13
+ subsystem: [primary category: auth, payments, ui, api, database, infra, testing, etc.]
14
+ tags: [searchable tech: jwt, stripe, react, postgres, prisma]
15
+
16
+ # Dependency graph
17
+ requires:
18
+ - phase: [prior phase this depends on]
19
+ provides: [what that phase built that this uses]
20
+ provides:
21
+ - [bullet list of what this phase built/delivered]
22
+ affects: [list of phase names or keywords that will need this context]
23
+
24
+ # Tech tracking
25
+ tech-stack:
26
+ added: [libraries/tools added in this phase]
27
+ patterns: [architectural/code patterns established]
28
+
29
+ key-files:
30
+ created: [important files created]
31
+ modified: [important files modified]
32
+
33
+ key-decisions:
34
+ - "Decision 1"
35
+ - "Decision 2"
36
+
37
+ patterns-established:
38
+ - "Pattern 1: description"
39
+ - "Pattern 2: description"
40
+
41
+ issues-created: [ISS-XXX, ISS-YYY] # From ISSUES.md if any
42
+
43
+ # Metrics
44
+ duration: Xmin
45
+ completed: YYYY-MM-DD
46
+ ---
47
+
48
+ # Phase [X]: [Name] Summary
49
+
50
+ **[Substantive one-liner describing outcome - NOT "phase complete" or "implementation finished"]**
51
+
52
+ ## Performance
53
+
54
+ - **Duration:** [time] (e.g., 23 min, 1h 15m)
55
+ - **Started:** [ISO timestamp]
56
+ - **Completed:** [ISO timestamp]
57
+ - **Tasks:** [count completed]
58
+ - **Files modified:** [count]
59
+
60
+ ## Accomplishments
61
+ - [Most important outcome]
62
+ - [Second key accomplishment]
63
+ - [Third if applicable]
64
+
65
+ ## Task Commits
66
+
67
+ Each task was committed atomically:
68
+
69
+ 1. **Task 1: [task name]** - `abc123f` (feat/fix/test/refactor)
70
+ 2. **Task 2: [task name]** - `def456g` (feat/fix/test/refactor)
71
+ 3. **Task 3: [task name]** - `hij789k` (feat/fix/test/refactor)
72
+
73
+ **Plan metadata:** `lmn012o` (docs: complete plan)
74
+
75
+ _Note: TDD tasks may have multiple commits (test → feat → refactor)_
76
+
77
+ ## Files Created/Modified
78
+ - `path/to/file.ts` - What it does
79
+ - `path/to/another.ts` - What it does
80
+
81
+ ## Decisions Made
82
+ [Key decisions with brief rationale, or "None - followed plan as specified"]
83
+
84
+ ## Deviations from Plan
85
+
86
+ [If no deviations: "None - plan executed exactly as written"]
87
+
88
+ [If deviations occurred:]
89
+
90
+ ### Auto-fixed Issues
91
+
92
+ **1. [Rule X - Category] Brief description**
93
+ - **Found during:** Task [N] ([task name])
94
+ - **Issue:** [What was wrong]
95
+ - **Fix:** [What was done]
96
+ - **Files modified:** [file paths]
97
+ - **Verification:** [How it was verified]
98
+ - **Committed in:** [hash] (part of task commit)
99
+
100
+ [... repeat for each auto-fix ...]
101
+
102
+ ### Deferred Enhancements
103
+
104
+ Logged to .planning/ISSUES.md for future consideration:
105
+ - ISS-XXX: [Brief description] (discovered in Task [N])
106
+ - ISS-XXX: [Brief description] (discovered in Task [N])
107
+
108
+ ---
109
+
110
+ **Total deviations:** [N] auto-fixed ([breakdown by rule]), [N] deferred
111
+ **Impact on plan:** [Brief assessment - e.g., "All auto-fixes necessary for correctness/security. No scope creep."]
112
+
113
+ ## Issues Encountered
114
+ [Problems and how they were resolved, or "None"]
115
+
116
+ [Note: "Deviations from Plan" documents unplanned work that was handled automatically via deviation rules. "Issues Encountered" documents problems during planned work that required problem-solving.]
117
+
118
+ ## Next Phase Readiness
119
+ [What's ready for next phase]
120
+ [Any blockers or concerns]
121
+
122
+ ---
123
+ *Phase: XX-name*
124
+ *Completed: [date]*
125
+ ```
126
+
127
+ <frontmatter_guidance>
128
+ **Purpose:** Enable automatic context assembly via dependency graph. Frontmatter makes summary metadata machine-readable so plan-phase can scan all summaries quickly and select relevant ones based on dependencies.
129
+
130
+ **Fast scanning:** Frontmatter is first ~25 lines, cheap to scan across all summaries without reading full content.
131
+
132
+ **Dependency graph:** `requires`/`provides`/`affects` create explicit links between phases, enabling transitive closure for context selection.
133
+
134
+ **Subsystem:** Primary categorization (auth, payments, ui, api, database, infra, testing) for detecting related phases.
135
+
136
+ **Tags:** Searchable technical keywords (libraries, frameworks, tools) for tech stack awareness.
137
+
138
+ **Key-files:** Important files for @context references in PLAN.md.
139
+
140
+ **Patterns:** Established conventions future phases should maintain.
141
+
142
+ **Population:** Frontmatter is populated during summary creation in execute-phase.md. See `<step name="create_summary">` for field-by-field guidance.
143
+ </frontmatter_guidance>
144
+
145
+ <one_liner_rules>
146
+ The one-liner MUST be substantive:
147
+
148
+ **Good:**
149
+ - "JWT auth with refresh rotation using jose library"
150
+ - "Prisma schema with User, Session, and Product models"
151
+ - "Dashboard with real-time metrics via Server-Sent Events"
152
+
153
+ **Bad:**
154
+ - "Phase complete"
155
+ - "Authentication implemented"
156
+ - "Foundation finished"
157
+ - "All tasks done"
158
+
159
+ The one-liner should tell someone what actually shipped.
160
+ </one_liner_rules>
161
+
162
+ <example>
163
+ ```markdown
164
+ # Phase 1: Foundation Summary
165
+
166
+ **JWT auth with refresh rotation using jose library, Prisma User model, and protected API middleware**
167
+
168
+ ## Performance
169
+
170
+ - **Duration:** 28 min
171
+ - **Started:** 2025-01-15T14:22:10Z
172
+ - **Completed:** 2025-01-15T14:50:33Z
173
+ - **Tasks:** 5
174
+ - **Files modified:** 8
175
+
176
+ ## Accomplishments
177
+ - User model with email/password auth
178
+ - Login/logout endpoints with httpOnly JWT cookies
179
+ - Protected route middleware checking token validity
180
+ - Refresh token rotation on each request
181
+
182
+ ## Files Created/Modified
183
+ - `prisma/schema.prisma` - User and Session models
184
+ - `src/app/api/auth/login/route.ts` - Login endpoint
185
+ - `src/app/api/auth/logout/route.ts` - Logout endpoint
186
+ - `src/middleware.ts` - Protected route checks
187
+ - `src/lib/auth.ts` - JWT helpers using jose
188
+
189
+ ## Decisions Made
190
+ - Used jose instead of jsonwebtoken (ESM-native, Edge-compatible)
191
+ - 15-min access tokens with 7-day refresh tokens
192
+ - Storing refresh tokens in database for revocation capability
193
+
194
+ ## Deviations from Plan
195
+
196
+ ### Auto-fixed Issues
197
+
198
+ **1. [Rule 2 - Missing Critical] Added password hashing with bcrypt**
199
+ - **Found during:** Task 2 (Login endpoint implementation)
200
+ - **Issue:** Plan didn't specify password hashing - storing plaintext would be critical security flaw
201
+ - **Fix:** Added bcrypt hashing on registration, comparison on login with salt rounds 10
202
+ - **Files modified:** src/app/api/auth/login/route.ts, src/lib/auth.ts
203
+ - **Verification:** Password hash test passes, plaintext never stored
204
+ - **Committed in:** abc123f (Task 2 commit)
205
+
206
+ **2. [Rule 3 - Blocking] Installed missing jose dependency**
207
+ - **Found during:** Task 4 (JWT token generation)
208
+ - **Issue:** jose package not in package.json, import failing
209
+ - **Fix:** Ran `npm install jose`
210
+ - **Files modified:** package.json, package-lock.json
211
+ - **Verification:** Import succeeds, build passes
212
+ - **Committed in:** def456g (Task 4 commit)
213
+
214
+ ### Deferred Enhancements
215
+
216
+ Logged to .planning/ISSUES.md for future consideration:
217
+ - ISS-001: Add rate limiting to login endpoint (discovered in Task 2)
218
+ - ISS-002: Improve token refresh UX with auto-retry on 401 (discovered in Task 5)
219
+
220
+ ---
221
+
222
+ **Total deviations:** 2 auto-fixed (1 missing critical, 1 blocking), 2 deferred
223
+ **Impact on plan:** Both auto-fixes essential for security and functionality. No scope creep.
224
+
225
+ ## Issues Encountered
226
+ - jsonwebtoken CommonJS import failed in Edge runtime - switched to jose (planned library change, worked as expected)
227
+
228
+ ## Next Phase Readiness
229
+ - Auth foundation complete, ready for feature development
230
+ - User registration endpoint needed before public launch
231
+
232
+ ---
233
+ *Phase: 01-foundation*
234
+ *Completed: 2025-01-15*
235
+ ```
236
+ </example>
237
+
238
+ <guidelines>
239
+ **When to create:**
240
+ - After completing each phase plan
241
+ - Required output from execute-phase workflow
242
+ - Documents what actually happened vs what was planned
243
+
244
+ **Frontmatter completion:**
245
+ - MANDATORY: Complete all frontmatter fields during summary creation
246
+ - See <frontmatter_guidance> for field purposes
247
+ - Frontmatter enables automatic context assembly for future planning
248
+
249
+ **One-liner requirements:**
250
+ - Must be substantive (describe what shipped, not "phase complete")
251
+ - Should tell someone what was accomplished
252
+ - Examples: "JWT auth with refresh rotation using jose library" not "Authentication implemented"
253
+
254
+ **Performance tracking:**
255
+ - Include duration, start/end timestamps
256
+ - Used for velocity metrics in STATE.md
257
+
258
+ **Deviations section:**
259
+ - Documents unplanned work handled via deviation rules
260
+ - Separate from "Issues Encountered" (which is planned work problems)
261
+ - Auto-fixed issues: What was wrong, how fixed, verification
262
+ - Deferred enhancements: Logged to ISSUES.md with ISS-XXX numbers
263
+
264
+ **Decisions section:**
265
+ - Key decisions made during execution
266
+ - Include rationale (why this choice)
267
+ - Extracted to STATE.md accumulated context
268
+ - Use "None - followed plan as specified" if no deviations
269
+
270
+ **After creation:**
271
+ - STATE.md updated with position, decisions, issues
272
+ - Next plan can reference decisions made
273
+ </guidelines>