renn-studio 0.6.0

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 (112) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +36 -0
  3. package/agents/renn-architect.md +1463 -0
  4. package/agents/renn-auditor.md +1053 -0
  5. package/agents/renn-codebase-mapper.md +908 -0
  6. package/agents/renn-design-reviewer.md +422 -0
  7. package/agents/renn-designer.md +814 -0
  8. package/agents/renn-detective.md +1204 -0
  9. package/agents/renn-integration-checker.md +957 -0
  10. package/agents/renn-navigator.md +659 -0
  11. package/agents/renn-plan-reviewer.md +812 -0
  12. package/agents/renn-project-scout.md +880 -0
  13. package/agents/renn-runner.md +842 -0
  14. package/agents/renn-stage-scout.md +705 -0
  15. package/agents/renn-synthesizer.md +256 -0
  16. package/bin/install.js +1466 -0
  17. package/commands/renn.add-stage.md +211 -0
  18. package/commands/renn.add-todo.md +194 -0
  19. package/commands/renn.audit-milestone.md +280 -0
  20. package/commands/renn.audit.md +219 -0
  21. package/commands/renn.check-todos.md +229 -0
  22. package/commands/renn.complete-milestone.md +136 -0
  23. package/commands/renn.continue.md +46 -0
  24. package/commands/renn.dash.md +308 -0
  25. package/commands/renn.debug.md +169 -0
  26. package/commands/renn.design-screens.md +107 -0
  27. package/commands/renn.design-system.md +100 -0
  28. package/commands/renn.discuss-stage.md +86 -0
  29. package/commands/renn.help.md +550 -0
  30. package/commands/renn.insert-stage.md +231 -0
  31. package/commands/renn.list-stage-assumptions.md +49 -0
  32. package/commands/renn.map-codebase.md +72 -0
  33. package/commands/renn.new-milestone.md +80 -0
  34. package/commands/renn.pause.md +132 -0
  35. package/commands/renn.plan-milestone-gaps.md +314 -0
  36. package/commands/renn.plan-stage.md +118 -0
  37. package/commands/renn.remove-stage.md +353 -0
  38. package/commands/renn.research-stage.md +200 -0
  39. package/commands/renn.restyle.md +98 -0
  40. package/commands/renn.run-stage.md +343 -0
  41. package/commands/renn.set-profile.md +116 -0
  42. package/commands/renn.settings.md +151 -0
  43. package/commands/renn.ship.md +52 -0
  44. package/commands/renn.start.md +95 -0
  45. package/commands/renn.status.md +530 -0
  46. package/commands/renn.watch.md +51 -0
  47. package/hooks/dist/renn-check-update.js +67 -0
  48. package/hooks/dist/renn-statusline.js +96 -0
  49. package/package.json +89 -0
  50. package/renn/references/continuation-format.md +249 -0
  51. package/renn/references/design-artifacts.md +674 -0
  52. package/renn/references/design-tokens.md +162 -0
  53. package/renn/references/gates.md +1078 -0
  54. package/renn/references/git-integration.md +254 -0
  55. package/renn/references/horsepower-profiles.md +84 -0
  56. package/renn/references/planning-config.md +189 -0
  57. package/renn/references/questioning.md +141 -0
  58. package/renn/references/security-checklist.md +2184 -0
  59. package/renn/references/tdd.md +263 -0
  60. package/renn/references/ui-brand.md +189 -0
  61. package/renn/references/verification-patterns.md +612 -0
  62. package/renn/templates/DEBUG.md +159 -0
  63. package/renn/templates/INTEL.md +283 -0
  64. package/renn/templates/RECAP.md +246 -0
  65. package/renn/templates/UAT.md +247 -0
  66. package/renn/templates/architect-prompt.md +119 -0
  67. package/renn/templates/brief.md +190 -0
  68. package/renn/templates/codebase/architecture.md +264 -0
  69. package/renn/templates/codebase/concerns.md +310 -0
  70. package/renn/templates/codebase/conventions.md +307 -0
  71. package/renn/templates/codebase/design.md +336 -0
  72. package/renn/templates/codebase/integrations.md +280 -0
  73. package/renn/templates/codebase/stack.md +186 -0
  74. package/renn/templates/codebase/structure.md +295 -0
  75. package/renn/templates/codebase/testing.md +480 -0
  76. package/renn/templates/config.json +36 -0
  77. package/renn/templates/continue-here.md +80 -0
  78. package/renn/templates/detective-prompt.md +93 -0
  79. package/renn/templates/milestone-archive.md +123 -0
  80. package/renn/templates/milestone.md +117 -0
  81. package/renn/templates/proof.md +326 -0
  82. package/renn/templates/pulse.md +176 -0
  83. package/renn/templates/research/architecture.md +206 -0
  84. package/renn/templates/research/features.md +149 -0
  85. package/renn/templates/research/pitfalls.md +202 -0
  86. package/renn/templates/research/recap.md +187 -0
  87. package/renn/templates/research/stack.md +122 -0
  88. package/renn/templates/research/ux.md +283 -0
  89. package/renn/templates/research-lite.md +146 -0
  90. package/renn/templates/research.md +582 -0
  91. package/renn/templates/specs.md +233 -0
  92. package/renn/templates/stage-prompt.md +571 -0
  93. package/renn/templates/track.md +211 -0
  94. package/renn/templates/user-setup.md +315 -0
  95. package/renn/workflows/audit-stage.md +717 -0
  96. package/renn/workflows/audit-work.md +596 -0
  97. package/renn/workflows/complete-milestone.md +875 -0
  98. package/renn/workflows/continue-project.md +306 -0
  99. package/renn/workflows/design-stage.md +2019 -0
  100. package/renn/workflows/diagnose-issues.md +231 -0
  101. package/renn/workflows/initialize-project.md +1039 -0
  102. package/renn/workflows/list-assumptions.md +178 -0
  103. package/renn/workflows/map-codebase.md +374 -0
  104. package/renn/workflows/new-milestone.md +718 -0
  105. package/renn/workflows/plan-stage.md +810 -0
  106. package/renn/workflows/research-stage.md +289 -0
  107. package/renn/workflows/run-plan.md +1844 -0
  108. package/renn/workflows/run-stage.md +692 -0
  109. package/renn/workflows/scope-stage.md +546 -0
  110. package/renn/workflows/ship-project.md +859 -0
  111. package/renn/workflows/transition.md +556 -0
  112. package/renn/workflows/watch-project.md +797 -0
@@ -0,0 +1,159 @@
1
+ # Debug Template
2
+
3
+ Template for `.renn/debug/[slug].md` — active debug session tracking.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ status: gathering | investigating | fixing | verifying | resolved
12
+ trigger: "[verbatim user input]"
13
+ created: [ISO timestamp]
14
+ updated: [ISO timestamp]
15
+ ---
16
+
17
+ ## Current Focus
18
+ <!-- OVERWRITE on each update - always reflects NOW -->
19
+
20
+ hypothesis: [current theory being tested]
21
+ test: [how testing it]
22
+ expecting: [what result means if true/false]
23
+ next_action: [immediate next step]
24
+
25
+ ## Symptoms
26
+ <!-- Written during gathering, then immutable -->
27
+
28
+ expected: [what should happen]
29
+ actual: [what actually happens]
30
+ errors: [error messages if any]
31
+ reproduction: [how to trigger]
32
+ started: [when it broke / always broken]
33
+
34
+ ## Eliminated
35
+ <!-- APPEND only - prevents re-investigating after /clear -->
36
+
37
+ - hypothesis: [theory that was wrong]
38
+ evidence: [what disproved it]
39
+ timestamp: [when eliminated]
40
+
41
+ ## Evidence
42
+ <!-- APPEND only - facts discovered during investigation -->
43
+
44
+ - timestamp: [when found]
45
+ checked: [what was examined]
46
+ found: [what was observed]
47
+ implication: [what this means]
48
+
49
+ ## Resolution
50
+ <!-- OVERWRITE as understanding evolves -->
51
+
52
+ root_cause: [empty until found]
53
+ fix: [empty until applied]
54
+ verification: [empty until verified]
55
+ files_changed: []
56
+ ```
57
+
58
+ ---
59
+
60
+ <section_rules>
61
+
62
+ **Frontmatter (status, trigger, timestamps):**
63
+ - `status`: OVERWRITE - reflects current step
64
+ - `trigger`: IMMUTABLE - verbatim user input, never changes
65
+ - `created`: IMMUTABLE - set once
66
+ - `updated`: OVERWRITE - update on every change
67
+
68
+ **Current Focus:**
69
+ - OVERWRITE entirely on each update
70
+ - Always reflects what Claude is doing RIGHT NOW
71
+ - If Claude reads this after /clear, it knows exactly where to resume
72
+ - Fields: hypothesis, test, expecting, next_action
73
+
74
+ **Symptoms:**
75
+ - Written during initial gathering step
76
+ - IMMUTABLE after gathering complete
77
+ - Reference point for what we're trying to fix
78
+ - Fields: expected, actual, errors, reproduction, started
79
+
80
+ **Eliminated:**
81
+ - APPEND only - never remove entries
82
+ - Prevents re-investigating dead ends after context reset
83
+ - Each entry: hypothesis, evidence that disproved it, timestamp
84
+ - Critical for efficiency across /clear boundaries
85
+
86
+ **Evidence:**
87
+ - APPEND only - never remove entries
88
+ - Facts discovered during investigation
89
+ - Each entry: timestamp, what checked, what found, implication
90
+ - Builds the case for root cause
91
+
92
+ **Resolution:**
93
+ - OVERWRITE as understanding evolves
94
+ - May update multiple times as fixes are tried
95
+ - Final state shows confirmed root cause and verified fix
96
+ - Fields: root_cause, fix, verification, files_changed
97
+
98
+ </section_rules>
99
+
100
+ <lifecycle>
101
+
102
+ **Creation:** Immediately when renn.debug is called
103
+ - Create file with trigger from user input
104
+ - Set status to "gathering"
105
+ - Current Focus: next_action = "gather symptoms"
106
+ - Symptoms: empty, to be filled
107
+
108
+ **During symptom gathering:**
109
+ - Update Symptoms section as user answers questions
110
+ - Update Current Focus with each question
111
+ - When complete: status → "investigating"
112
+
113
+ **During investigation:**
114
+ - OVERWRITE Current Focus with each hypothesis
115
+ - APPEND to Evidence with each finding
116
+ - APPEND to Eliminated when hypothesis disproved
117
+ - Update timestamp in frontmatter
118
+
119
+ **During fixing:**
120
+ - status → "fixing"
121
+ - Update Resolution.root_cause when confirmed
122
+ - Update Resolution.fix when applied
123
+ - Update Resolution.files_changed
124
+
125
+ **During verification:**
126
+ - status → "verifying"
127
+ - Update Resolution.verification with results
128
+ - If verification fails: status → "investigating", try again
129
+
130
+ **On resolution:**
131
+ - status → "resolved"
132
+ - Move file to .renn/debug/resolved/
133
+
134
+ </lifecycle>
135
+
136
+ <resume_behavior>
137
+
138
+ When Claude reads this file after /clear:
139
+
140
+ 1. Parse frontmatter → know status
141
+ 2. Read Current Focus → know exactly what was happening
142
+ 3. Read Eliminated → know what NOT to retry
143
+ 4. Read Evidence → know what's been learned
144
+ 5. Continue from next_action
145
+
146
+ The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
147
+
148
+ </resume_behavior>
149
+
150
+ <size_constraint>
151
+
152
+ Keep debug files focused:
153
+ - Evidence entries: 1-2 lines each, just the facts
154
+ - Eliminated: brief - hypothesis + why it failed
155
+ - No narrative prose - structured data only
156
+
157
+ If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
158
+
159
+ </size_constraint>
@@ -0,0 +1,283 @@
1
+ # Stage Intel Template
2
+
3
+ Template for `.renn/stages/XX-name/{stage}-intel.md` - captures implementation decisions for a stage.
4
+
5
+ **Purpose:** Document decisions that downstream agents need. Scout uses this to know WHAT to investigate. Architect uses this to know WHAT choices are locked vs flexible.
6
+
7
+ **Key principle:** Categories are NOT predefined. They emerge from what was actually discussed for THIS stage. A CLI stage has CLI-relevant sections, a UI stage has UI-relevant sections.
8
+
9
+ **Downstream consumers:**
10
+ - `renn-stage-scout` — Reads decisions to focus research (e.g., "card layout" → research card component patterns)
11
+ - `renn-architect` — Reads decisions to create specific tasks (e.g., "infinite scroll" → task includes virtualization)
12
+
13
+ ---
14
+
15
+ ## File Template
16
+
17
+ ```markdown
18
+ # Stage [X]: [Name] - Intel
19
+
20
+ **Gathered:** [date]
21
+ **Status:** Ready for planning
22
+
23
+ <domain>
24
+ ## Stage Boundary
25
+
26
+ [Clear statement of what this stage delivers — the scope anchor. This comes from track.md and is fixed. Discussion clarifies implementation within this boundary.]
27
+
28
+ </domain>
29
+
30
+ <decisions>
31
+ ## Implementation Decisions
32
+
33
+ ### [Area 1 that was discussed]
34
+ - [Specific decision made]
35
+ - [Another decision if applicable]
36
+
37
+ ### [Area 2 that was discussed]
38
+ - [Specific decision made]
39
+
40
+ ### [Area 3 that was discussed]
41
+ - [Specific decision made]
42
+
43
+ ### Claude's Discretion
44
+ [Areas where user explicitly said "you decide" — Claude has flexibility here during planning/implementation]
45
+
46
+ </decisions>
47
+
48
+ <specifics>
49
+ ## Specific Ideas
50
+
51
+ [Any particular references, examples, or "I want it like X" moments from discussion. Product references, specific behaviors, interaction patterns.]
52
+
53
+ [If none: "No specific requirements — open to standard approaches"]
54
+
55
+ </specifics>
56
+
57
+ <deferred>
58
+ ## Deferred Ideas
59
+
60
+ [Ideas that came up during discussion but belong in other stages. Captured here so they're not lost, but explicitly out of scope for this stage.]
61
+
62
+ [If none: "None — discussion stayed within stage scope"]
63
+
64
+ </deferred>
65
+
66
+ ---
67
+
68
+ *Stage: XX-name*
69
+ *Intel gathered: [date]*
70
+ ```
71
+
72
+ <good_examples>
73
+
74
+ **Example 1: Visual feature (Post Feed)**
75
+
76
+ ```markdown
77
+ # Stage 3: Post Feed - Intel
78
+
79
+ **Gathered:** 2025-01-20
80
+ **Status:** Ready for planning
81
+
82
+ <domain>
83
+ ## Stage Boundary
84
+
85
+ Display posts from followed users in a scrollable feed. Users can view posts and see engagement counts. Creating posts and interactions are separate stages.
86
+
87
+ </domain>
88
+
89
+ <decisions>
90
+ ## Implementation Decisions
91
+
92
+ ### Layout style
93
+ - Card-based layout, not timeline or list
94
+ - Each card shows: author avatar, name, timestamp, full post content, reaction counts
95
+ - Cards have subtle shadows, rounded corners — modern feel
96
+
97
+ ### Loading behavior
98
+ - Infinite scroll, not pagination
99
+ - Pull-to-refresh on mobile
100
+ - New posts indicator at top ("3 new posts") rather than auto-inserting
101
+
102
+ ### Empty state
103
+ - Friendly illustration + "Follow people to see posts here"
104
+ - Suggest 3-5 accounts to follow based on interests
105
+
106
+ ### Claude's Discretion
107
+ - Loading skeleton design
108
+ - Exact spacing and typography
109
+ - Error state handling
110
+
111
+ </decisions>
112
+
113
+ <specifics>
114
+ ## Specific Ideas
115
+
116
+ - "I like how Twitter shows the new posts indicator without disrupting your scroll position"
117
+ - Cards should feel like Linear's issue cards — clean, not cluttered
118
+
119
+ </specifics>
120
+
121
+ <deferred>
122
+ ## Deferred Ideas
123
+
124
+ - Commenting on posts — Stage 5
125
+ - Bookmarking posts — add to backlog
126
+
127
+ </deferred>
128
+
129
+ ---
130
+
131
+ *Stage: 03-post-feed*
132
+ *Intel gathered: 2025-01-20*
133
+ ```
134
+
135
+ **Example 2: CLI tool (Database backup)**
136
+
137
+ ```markdown
138
+ # Stage 2: Backup Command - Intel
139
+
140
+ **Gathered:** 2025-01-20
141
+ **Status:** Ready for planning
142
+
143
+ <domain>
144
+ ## Stage Boundary
145
+
146
+ CLI command to backup database to local file or S3. Supports full and incremental backups. Restore command is a separate stage.
147
+
148
+ </domain>
149
+
150
+ <decisions>
151
+ ## Implementation Decisions
152
+
153
+ ### Output format
154
+ - JSON for programmatic use, table format for humans
155
+ - Default to table, --json flag for JSON
156
+ - Verbose mode (-v) shows progress, silent by default
157
+
158
+ ### Flag design
159
+ - Short flags for common options: -o (output), -v (verbose), -f (force)
160
+ - Long flags for clarity: --incremental, --compress, --encrypt
161
+ - Required: database connection string (positional or --db)
162
+
163
+ ### Error recovery
164
+ - Retry 3 times on network failure, then fail with clear message
165
+ - --no-retry flag to fail fast
166
+ - Partial backups are deleted on failure (no corrupt files)
167
+
168
+ ### Claude's Discretion
169
+ - Exact progress bar implementation
170
+ - Compression algorithm choice
171
+ - Temp file handling
172
+
173
+ </decisions>
174
+
175
+ <specifics>
176
+ ## Specific Ideas
177
+
178
+ - "I want it to feel like pg_dump — familiar to database people"
179
+ - Should work in CI pipelines (exit codes, no interactive prompts)
180
+
181
+ </specifics>
182
+
183
+ <deferred>
184
+ ## Deferred Ideas
185
+
186
+ - Scheduled backups — separate stage
187
+ - Backup rotation/retention — add to backlog
188
+
189
+ </deferred>
190
+
191
+ ---
192
+
193
+ *Stage: 02-backup-command*
194
+ *Intel gathered: 2025-01-20*
195
+ ```
196
+
197
+ **Example 3: Organization task (Photo library)**
198
+
199
+ ```markdown
200
+ # Stage 1: Photo Organization - Intel
201
+
202
+ **Gathered:** 2025-01-20
203
+ **Status:** Ready for planning
204
+
205
+ <domain>
206
+ ## Stage Boundary
207
+
208
+ Organize existing photo library into structured folders. Handle duplicates and apply consistent naming. Tagging and search are separate stages.
209
+
210
+ </domain>
211
+
212
+ <decisions>
213
+ ## Implementation Decisions
214
+
215
+ ### Grouping criteria
216
+ - Primary grouping by year, then by month
217
+ - Events detected by time clustering (photos within 2 hours = same event)
218
+ - Event folders named by date + location if available
219
+
220
+ ### Duplicate handling
221
+ - Keep highest resolution version
222
+ - Move duplicates to _duplicates folder (don't delete)
223
+ - Log all duplicate decisions for review
224
+
225
+ ### Naming convention
226
+ - Format: YYYY-MM-DD_HH-MM-SS_originalname.ext
227
+ - Preserve original filename as suffix for searchability
228
+ - Handle name collisions with incrementing suffix
229
+
230
+ ### Claude's Discretion
231
+ - Exact clustering algorithm
232
+ - How to handle photos with no EXIF data
233
+ - Folder emoji usage
234
+
235
+ </decisions>
236
+
237
+ <specifics>
238
+ ## Specific Ideas
239
+
240
+ - "I want to be able to find photos by roughly when they were taken"
241
+ - Don't delete anything — worst case, move to a review folder
242
+
243
+ </specifics>
244
+
245
+ <deferred>
246
+ ## Deferred Ideas
247
+
248
+ - Face detection grouping — future stage
249
+ - Cloud sync — out of scope for now
250
+
251
+ </deferred>
252
+
253
+ ---
254
+
255
+ *Stage: 01-photo-organization*
256
+ *Intel gathered: 2025-01-20*
257
+ ```
258
+
259
+ </good_examples>
260
+
261
+ <guidelines>
262
+ **This template captures DECISIONS for downstream agents.**
263
+
264
+ The output should answer: "What does the scout need to investigate? What choices are locked for the architect?"
265
+
266
+ **Good content (concrete decisions):**
267
+ - "Card-based layout, not timeline"
268
+ - "Retry 3 times on network failure, then fail"
269
+ - "Group by year, then by month"
270
+ - "JSON for programmatic use, table for humans"
271
+
272
+ **Bad content (too vague):**
273
+ - "Should feel modern and clean"
274
+ - "Good user experience"
275
+ - "Fast and responsive"
276
+ - "Easy to use"
277
+
278
+ **After creation:**
279
+ - File lives in stage directory: `.renn/stages/XX-name/{stage}-intel.md`
280
+ - `renn-stage-scout` uses decisions to focus investigation
281
+ - `renn-architect` uses decisions + research to create executable tasks
282
+ - Downstream agents should NOT need to ask the user again about captured decisions
283
+ </guidelines>
@@ -0,0 +1,246 @@
1
+ # Recap Template
2
+
3
+ Template for `.renn/stages/XX-name/{stage}-{run}-recap.md` - stage completion documentation.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ stage: XX-name
12
+ run: 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
+ - stage: [prior stage this depends on]
19
+ provides: [what that stage built that this uses]
20
+ provides:
21
+ - [bullet list of what this stage built/delivered]
22
+ affects: [list of stage names or keywords that will need this context]
23
+
24
+ # Tech tracking
25
+ tech-stack:
26
+ added: [libraries/tools added in this stage]
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
+ # Metrics
42
+ duration: Xmin
43
+ completed: YYYY-MM-DD
44
+ ---
45
+
46
+ # Stage [X]: [Name] Recap
47
+
48
+ **[Substantive one-liner describing outcome - NOT "stage complete" or "implementation finished"]**
49
+
50
+ ## Performance
51
+
52
+ - **Duration:** [time] (e.g., 23 min, 1h 15m)
53
+ - **Started:** [ISO timestamp]
54
+ - **Completed:** [ISO timestamp]
55
+ - **Tasks:** [count completed]
56
+ - **Files modified:** [count]
57
+
58
+ ## Accomplishments
59
+ - [Most important outcome]
60
+ - [Second key accomplishment]
61
+ - [Third if applicable]
62
+
63
+ ## Task Commits
64
+
65
+ Each task was committed atomically:
66
+
67
+ 1. **Task 1: [task name]** - `abc123f` (feat/fix/test/refactor)
68
+ 2. **Task 2: [task name]** - `def456g` (feat/fix/test/refactor)
69
+ 3. **Task 3: [task name]** - `hij789k` (feat/fix/test/refactor)
70
+
71
+ **Run metadata:** `lmn012o` (docs: complete run)
72
+
73
+ _Note: TDD tasks may have multiple commits (test → feat → refactor)_
74
+
75
+ ## Files Created/Modified
76
+ - `path/to/file.ts` - What it does
77
+ - `path/to/another.ts` - What it does
78
+
79
+ ## Decisions Made
80
+ [Key decisions with brief rationale, or "None - followed run as specified"]
81
+
82
+ ## Drifts from Run
83
+
84
+ [If no drifts: "None - run executed exactly as written"]
85
+
86
+ [If drifts occurred:]
87
+
88
+ ### Auto-fixed Issues
89
+
90
+ **1. [Rule X - Category] Brief description**
91
+ - **Found during:** Task [N] ([task name])
92
+ - **Issue:** [What was wrong]
93
+ - **Fix:** [What was done]
94
+ - **Files modified:** [file paths]
95
+ - **Verification:** [How it was verified]
96
+ - **Committed in:** [hash] (part of task commit)
97
+
98
+ [... repeat for each auto-fix ...]
99
+
100
+ ---
101
+
102
+ **Total drifts:** [N] auto-fixed ([breakdown by rule])
103
+ **Impact on run:** [Brief assessment - e.g., "All auto-fixes necessary for correctness/security. No scope creep."]
104
+
105
+ ## Issues Encountered
106
+ [Problems and how they were resolved, or "None"]
107
+
108
+ [Note: "Drifts from Run" documents unplanned work that was handled automatically via drift rules. "Issues Encountered" documents problems during planned work that required problem-solving.]
109
+
110
+ ## User Setup Required
111
+
112
+ [If USER-SETUP.md was generated:]
113
+ **External services require manual configuration.** See [{stage}-USER-SETUP.md](./{stage}-USER-SETUP.md) for:
114
+ - Environment variables to add
115
+ - Dashboard configuration steps
116
+ - Verification commands
117
+
118
+ [If no USER-SETUP.md:]
119
+ None - no external service configuration required.
120
+
121
+ ## Next Stage Readiness
122
+ [What's ready for next stage]
123
+ [Any blockers or concerns]
124
+
125
+ ---
126
+ *Stage: XX-name*
127
+ *Completed: [date]*
128
+ ```
129
+
130
+ <frontmatter_guidance>
131
+ **Purpose:** Enable automatic context assembly via dependency graph. Frontmatter makes recap metadata machine-readable so plan-stage can scan all recaps quickly and select relevant ones based on dependencies.
132
+
133
+ **Fast scanning:** Frontmatter is first ~25 lines, cheap to scan across all recaps without reading full content.
134
+
135
+ **Dependency graph:** `requires`/`provides`/`affects` create explicit links between stages, enabling transitive closure for context selection.
136
+
137
+ **Subsystem:** Primary categorization (auth, payments, ui, api, database, infra, testing) for detecting related stages.
138
+
139
+ **Tags:** Searchable technical keywords (libraries, frameworks, tools) for tech stack awareness.
140
+
141
+ **Key-files:** Important files for @context references in run.md.
142
+
143
+ **Patterns:** Established conventions future stages should maintain.
144
+
145
+ **Population:** Frontmatter is populated during recap creation in run-plan.md. See `<step name="create_recap">` for field-by-field guidance.
146
+ </frontmatter_guidance>
147
+
148
+ <one_liner_rules>
149
+ The one-liner MUST be substantive:
150
+
151
+ **Good:**
152
+ - "JWT auth with refresh rotation using jose library"
153
+ - "Prisma schema with User, Session, and Product models"
154
+ - "Dashboard with real-time metrics via Server-Sent Events"
155
+
156
+ **Bad:**
157
+ - "Stage complete"
158
+ - "Authentication implemented"
159
+ - "Foundation finished"
160
+ - "All tasks done"
161
+
162
+ The one-liner should tell someone what actually shipped.
163
+ </one_liner_rules>
164
+
165
+ <example>
166
+ ```markdown
167
+ # Stage 1: Foundation Recap
168
+
169
+ **JWT auth with refresh rotation using jose library, Prisma User model, and protected API middleware**
170
+
171
+ ## Performance
172
+
173
+ - **Duration:** 28 min
174
+ - **Started:** 2025-01-15T14:22:10Z
175
+ - **Completed:** 2025-01-15T14:50:33Z
176
+ - **Tasks:** 5
177
+ - **Files modified:** 8
178
+
179
+ ## Accomplishments
180
+ - User model with email/password auth
181
+ - Login/logout endpoints with httpOnly JWT cookies
182
+ - Protected route middleware checking token validity
183
+ - Refresh token rotation on each request
184
+
185
+ ## Files Created/Modified
186
+ - `prisma/schema.prisma` - User and Session models
187
+ - `src/app/api/auth/login/route.ts` - Login endpoint
188
+ - `src/app/api/auth/logout/route.ts` - Logout endpoint
189
+ - `src/middleware.ts` - Protected route checks
190
+ - `src/lib/auth.ts` - JWT helpers using jose
191
+
192
+ ## Decisions Made
193
+ - Used jose instead of jsonwebtoken (ESM-native, Edge-compatible)
194
+ - 15-min access tokens with 7-day refresh tokens
195
+ - Storing refresh tokens in database for revocation capability
196
+
197
+ ## Drifts from Run
198
+
199
+ ### Auto-fixed Issues
200
+
201
+ **1. [Rule 2 - Missing Critical] Added password hashing with bcrypt**
202
+ - **Found during:** Task 2 (Login endpoint implementation)
203
+ - **Issue:** Run didn't specify password hashing - storing plaintext would be critical security flaw
204
+ - **Fix:** Added bcrypt hashing on registration, comparison on login with salt rounds 10
205
+ - **Files modified:** src/app/api/auth/login/route.ts, src/lib/auth.ts
206
+ - **Verification:** Password hash test passes, plaintext never stored
207
+ - **Committed in:** abc123f (Task 2 commit)
208
+
209
+ **2. [Rule 3 - Blocking] Installed missing jose dependency**
210
+ - **Found during:** Task 4 (JWT token generation)
211
+ - **Issue:** jose package not in package.json, import failing
212
+ - **Fix:** Ran `npm install jose`
213
+ - **Files modified:** package.json, package-lock.json
214
+ - **Verification:** Import succeeds, build passes
215
+ - **Committed in:** def456g (Task 4 commit)
216
+
217
+ ---
218
+
219
+ **Total drifts:** 2 auto-fixed (1 missing critical, 1 blocking)
220
+ **Impact on run:** Both auto-fixes essential for security and functionality. No scope creep.
221
+
222
+ ## Issues Encountered
223
+ - jsonwebtoken CommonJS import failed in Edge runtime - switched to jose (planned library change, worked as expected)
224
+
225
+ ## Next Stage Readiness
226
+ - Auth foundation complete, ready for feature development
227
+ - User registration endpoint needed before public launch
228
+
229
+ ---
230
+ *Stage: 01-foundation*
231
+ *Completed: 2025-01-15*
232
+ ```
233
+ </example>
234
+
235
+ <guidelines>
236
+ **Frontmatter:** MANDATORY - complete all fields. Enables automatic context assembly for future planning.
237
+
238
+ **One-liner:** Must be substantive. "JWT auth with refresh rotation using jose library" not "Authentication implemented".
239
+
240
+ **Decisions section:**
241
+ - Key decisions made during execution with rationale
242
+ - Extracted to pulse.md accumulated context
243
+ - Use "None - followed run as specified" if no drifts
244
+
245
+ **After creation:** pulse.md updated with position, decisions, issues.
246
+ </guidelines>