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,571 @@
1
+ # Stage Prompt Template
2
+
3
+ > **Note:** Planning methodology is in `agents/renn-architect.md`.
4
+ > This template defines the run.md output format that the agent produces.
5
+
6
+ Template for `.renn/stages/XX-name/{stage}-{run}-run.md` - executable stage runs optimized for parallel execution.
7
+
8
+ **Naming:** Use `{stage}-{run}-run.md` format (e.g., `01-02-run.md` for Stage 1, Run 2)
9
+
10
+ ---
11
+
12
+ ## File Template
13
+
14
+ ```markdown
15
+ ---
16
+ stage: XX-name
17
+ run: NN
18
+ type: execute
19
+ batch: N # Execution batch (1, 2, 3...). Pre-computed at plan time.
20
+ depends_on: [] # Run IDs this run requires (e.g., ["01-01"]).
21
+ files_modified: [] # Files this run modifies.
22
+ autonomous: true # false if run has gates requiring user interaction
23
+ user_setup: [] # Human-required setup Claude cannot automate (see below)
24
+
25
+ # Goal-backward verification (derived during planning, verified after execution)
26
+ must_haves:
27
+ truths: [] # Observable behaviors that must be true for goal achievement
28
+ artifacts: [] # Files that must exist with real implementation
29
+ key_links: [] # Critical connections between artifacts
30
+ ---
31
+
32
+ <objective>
33
+ [What this run accomplishes]
34
+
35
+ Purpose: [Why this matters for the project]
36
+ Output: [What artifacts will be created]
37
+ </objective>
38
+
39
+ <execution_context>
40
+ @~/.claude/renn/workflows/run-plan.md
41
+ @~/.claude/renn/templates/recap.md
42
+ [If run contains gate tasks (type="checkpoint:*"), add:]
43
+ @~/.claude/renn/references/gates.md
44
+ </execution_context>
45
+
46
+ <context>
47
+ @.renn/brief.md
48
+ @.renn/track.md
49
+ @.renn/pulse.md
50
+
51
+ # Only reference prior run RECAPs if genuinely needed:
52
+ # - This run uses types/exports from prior run
53
+ # - Prior run made decision that affects this run
54
+ # Do NOT reflexively chain: Run 02 refs 01, Run 03 refs 02...
55
+
56
+ [Relevant source files:]
57
+ @src/path/to/relevant.ts
58
+ </context>
59
+
60
+ <tasks>
61
+
62
+ <task type="auto">
63
+ <name>Task 1: [Action-oriented name]</name>
64
+ <files>path/to/file.ext, another/file.ext</files>
65
+ <action>[Specific implementation - what to do, how to do it, what to avoid and WHY]</action>
66
+ <verify>[Command or check to prove it worked]</verify>
67
+ <done>[Measurable acceptance criteria]</done>
68
+ </task>
69
+
70
+ <task type="auto">
71
+ <name>Task 2: [Action-oriented name]</name>
72
+ <files>path/to/file.ext</files>
73
+ <action>[Specific implementation]</action>
74
+ <verify>[Command or check]</verify>
75
+ <done>[Acceptance criteria]</done>
76
+ </task>
77
+
78
+ <!-- For gate task examples and patterns, see @~/.claude/renn/references/gates.md -->
79
+ <!-- Key rule: Claude starts dev server BEFORE human-verify gates. User only visits URLs. -->
80
+
81
+ <task type="checkpoint:decision" gate="blocking">
82
+ <decision>[What needs deciding]</decision>
83
+ <context>[Why this decision matters]</context>
84
+ <options>
85
+ <option id="option-a"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
86
+ <option id="option-b"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
87
+ </options>
88
+ <resume-signal>Select: option-a or option-b</resume-signal>
89
+ </task>
90
+
91
+ <task type="checkpoint:human-verify" gate="blocking">
92
+ <what-built>[What Claude built] - server running at [URL]</what-built>
93
+ <how-to-verify>Visit [URL] and verify: [visual checks only, NO CLI commands]</how-to-verify>
94
+ <resume-signal>Type "approved" or describe issues</resume-signal>
95
+ </task>
96
+
97
+ </tasks>
98
+
99
+ <verification>
100
+ Before declaring run complete:
101
+ - [ ] [Specific test command]
102
+ - [ ] [Build/type check passes]
103
+ - [ ] [Behavior verification]
104
+ </verification>
105
+
106
+ <success_criteria>
107
+
108
+ - All tasks completed
109
+ - All verification checks pass
110
+ - No errors or warnings introduced
111
+ - [Run-specific criteria]
112
+ </success_criteria>
113
+
114
+ <output>
115
+ After completion, create `.renn/stages/XX-name/{stage}-{run}-recap.md`
116
+ </output>
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Frontmatter Fields
122
+
123
+ | Field | Required | Purpose |
124
+ |-------|----------|---------|
125
+ | `stage` | Yes | Stage identifier (e.g., `01-foundation`) |
126
+ | `run` | Yes | Run number within stage (e.g., `01`, `02`) |
127
+ | `type` | Yes | Always `execute` for standard runs, `tdd` for TDD runs |
128
+ | `batch` | Yes | Execution batch number (1, 2, 3...). Pre-computed at plan time. |
129
+ | `depends_on` | Yes | Array of run IDs this run requires. |
130
+ | `files_modified` | Yes | Files this run touches. |
131
+ | `autonomous` | Yes | `true` if no gates, `false` if has gates |
132
+ | `user_setup` | No | Array of human-required setup items (external services) |
133
+ | `must_haves` | Yes | Goal-backward verification criteria (see below) |
134
+
135
+ **Batch is pre-computed:** Batch numbers are assigned during `/renn.plan-stage`. Run-stage reads `batch` directly from frontmatter and groups runs by batch number. No runtime dependency analysis needed.
136
+
137
+ **Must-haves enable verification:** The `must_haves` field carries goal-backward requirements from planning to execution. After all runs complete, run-stage spawns a verification subagent that checks these criteria against the actual codebase.
138
+
139
+ ---
140
+
141
+ ## Parallel vs Sequential
142
+
143
+ <parallel_examples>
144
+
145
+ **Batch 1 candidates (parallel):**
146
+
147
+ ```yaml
148
+ # Run 01 - User feature
149
+ batch: 1
150
+ depends_on: []
151
+ files_modified: [src/models/user.ts, src/api/users.ts]
152
+ autonomous: true
153
+
154
+ # Run 02 - Product feature (no overlap with Run 01)
155
+ batch: 1
156
+ depends_on: []
157
+ files_modified: [src/models/product.ts, src/api/products.ts]
158
+ autonomous: true
159
+
160
+ # Run 03 - Order feature (no overlap)
161
+ batch: 1
162
+ depends_on: []
163
+ files_modified: [src/models/order.ts, src/api/orders.ts]
164
+ autonomous: true
165
+ ```
166
+
167
+ All three run in parallel (Batch 1) - no dependencies, no file conflicts.
168
+
169
+ **Sequential (genuine dependency):**
170
+
171
+ ```yaml
172
+ # Run 01 - Auth foundation
173
+ batch: 1
174
+ depends_on: []
175
+ files_modified: [src/lib/auth.ts, src/middleware/auth.ts]
176
+ autonomous: true
177
+
178
+ # Run 02 - Protected features (needs auth)
179
+ batch: 2
180
+ depends_on: ["01"]
181
+ files_modified: [src/features/dashboard.ts]
182
+ autonomous: true
183
+ ```
184
+
185
+ Run 02 in Batch 2 waits for Run 01 in Batch 1 - genuine dependency on auth types/middleware.
186
+
187
+ **Gate run:**
188
+
189
+ ```yaml
190
+ # Run 03 - UI with verification
191
+ batch: 3
192
+ depends_on: ["01", "02"]
193
+ files_modified: [src/components/Dashboard.tsx]
194
+ autonomous: false # Has checkpoint:human-verify
195
+ ```
196
+
197
+ Batch 3 runs after Batches 1 and 2. Pauses at gate, orchestrator presents to user, resumes on approval.
198
+
199
+ </parallel_examples>
200
+
201
+ ---
202
+
203
+ ## Context Section
204
+
205
+ **Parallel-aware context:**
206
+
207
+ ```markdown
208
+ <context>
209
+ @.renn/brief.md
210
+ @.renn/track.md
211
+ @.renn/pulse.md
212
+
213
+ # Only include RECAP refs if genuinely needed:
214
+ # - This run imports types from prior run
215
+ # - Prior run made decision affecting this run
216
+ # - Prior run's output is input to this run
217
+ #
218
+ # Independent runs need NO prior RECAP references.
219
+ # Do NOT reflexively chain: 02 refs 01, 03 refs 02...
220
+
221
+ @src/relevant/source.ts
222
+ </context>
223
+ ```
224
+
225
+ **Bad pattern (creates false dependencies):**
226
+ ```markdown
227
+ <context>
228
+ @.renn/stages/03-features/03-01-recap.md # Just because it's earlier
229
+ @.renn/stages/03-features/03-02-recap.md # Reflexive chaining
230
+ </context>
231
+ ```
232
+
233
+ ---
234
+
235
+ ## Scope Guidance
236
+
237
+ **Run sizing:**
238
+
239
+ - 2-3 tasks per run
240
+ - ~50% context usage maximum
241
+ - Complex stages: Multiple focused runs, not one large run
242
+
243
+ **When to split:**
244
+
245
+ - Different subsystems (auth vs API vs UI)
246
+ - >3 tasks
247
+ - Risk of context overflow
248
+ - TDD candidates - separate runs
249
+
250
+ **Vertical slices preferred:**
251
+
252
+ ```
253
+ PREFER: Run 01 = User (model + API + UI)
254
+ Run 02 = Product (model + API + UI)
255
+
256
+ AVOID: Run 01 = All models
257
+ Run 02 = All APIs
258
+ Run 03 = All UIs
259
+ ```
260
+
261
+ ---
262
+
263
+ ## TDD Runs
264
+
265
+ TDD features get dedicated runs with `type: tdd`.
266
+
267
+ **Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
268
+ → Yes: Create a TDD run
269
+ → No: Standard task in standard run
270
+
271
+ See `~/.claude/renn/references/tdd.md` for TDD run structure.
272
+
273
+ ---
274
+
275
+ ## Task Types
276
+
277
+ | Type | Use For | Autonomy |
278
+ |------|---------|----------|
279
+ | `auto` | Everything Claude can do independently | Fully autonomous |
280
+ | `checkpoint:human-verify` | Visual/functional verification | Pauses, returns to orchestrator |
281
+ | `checkpoint:decision` | Implementation choices | Pauses, returns to orchestrator |
282
+ | `checkpoint:human-action` | Truly unavoidable manual steps (rare) | Pauses, returns to orchestrator |
283
+
284
+ **Gate behavior in parallel execution:**
285
+ - Run runs until gate
286
+ - Agent returns with gate details + agent_id
287
+ - Orchestrator presents to user
288
+ - User responds
289
+ - Orchestrator resumes agent with `resume: agent_id`
290
+
291
+ ---
292
+
293
+ ## Examples
294
+
295
+ **Autonomous parallel run:**
296
+
297
+ ```markdown
298
+ ---
299
+ stage: 03-features
300
+ run: 01
301
+ type: execute
302
+ batch: 1
303
+ depends_on: []
304
+ files_modified: [src/features/user/model.ts, src/features/user/api.ts, src/features/user/UserList.tsx]
305
+ autonomous: true
306
+ ---
307
+
308
+ <objective>
309
+ Implement complete User feature as vertical slice.
310
+
311
+ Purpose: Self-contained user management that can run parallel to other features.
312
+ Output: User model, API endpoints, and UI components.
313
+ </objective>
314
+
315
+ <context>
316
+ @.renn/brief.md
317
+ @.renn/track.md
318
+ @.renn/pulse.md
319
+ </context>
320
+
321
+ <tasks>
322
+ <task type="auto">
323
+ <name>Task 1: Create User model</name>
324
+ <files>src/features/user/model.ts</files>
325
+ <action>Define User type with id, email, name, createdAt. Export TypeScript interface.</action>
326
+ <verify>tsc --noEmit passes</verify>
327
+ <done>User type exported and usable</done>
328
+ </task>
329
+
330
+ <task type="auto">
331
+ <name>Task 2: Create User API endpoints</name>
332
+ <files>src/features/user/api.ts</files>
333
+ <action>GET /users (list), GET /users/:id (single), POST /users (create). Use User type from model.</action>
334
+ <verify>curl tests pass for all endpoints</verify>
335
+ <done>All CRUD operations work</done>
336
+ </task>
337
+ </tasks>
338
+
339
+ <verification>
340
+ - [ ] npm run build succeeds
341
+ - [ ] API endpoints respond correctly
342
+ </verification>
343
+
344
+ <success_criteria>
345
+ - All tasks completed
346
+ - User feature works end-to-end
347
+ </success_criteria>
348
+
349
+ <output>
350
+ After completion, create `.renn/stages/03-features/03-01-recap.md`
351
+ </output>
352
+ ```
353
+
354
+ **Run with gate (non-autonomous):**
355
+
356
+ ```markdown
357
+ ---
358
+ stage: 03-features
359
+ run: 03
360
+ type: execute
361
+ batch: 2
362
+ depends_on: ["03-01", "03-02"]
363
+ files_modified: [src/components/Dashboard.tsx]
364
+ autonomous: false
365
+ ---
366
+
367
+ <objective>
368
+ Build dashboard with visual verification.
369
+
370
+ Purpose: Integrate user and product features into unified view.
371
+ Output: Working dashboard component.
372
+ </objective>
373
+
374
+ <execution_context>
375
+ @~/.claude/renn/workflows/run-plan.md
376
+ @~/.claude/renn/templates/recap.md
377
+ @~/.claude/renn/references/gates.md
378
+ </execution_context>
379
+
380
+ <context>
381
+ @.renn/brief.md
382
+ @.renn/track.md
383
+ @.renn/stages/03-features/03-01-recap.md
384
+ @.renn/stages/03-features/03-02-recap.md
385
+ </context>
386
+
387
+ <tasks>
388
+ <task type="auto">
389
+ <name>Task 1: Build Dashboard layout</name>
390
+ <files>src/components/Dashboard.tsx</files>
391
+ <action>Create responsive grid with UserList and ProductList components. Use Tailwind for styling.</action>
392
+ <verify>npm run build succeeds</verify>
393
+ <done>Dashboard renders without errors</done>
394
+ </task>
395
+
396
+ <!-- Gate pattern: Claude starts server, user visits URL. See gates.md for full patterns. -->
397
+ <task type="auto">
398
+ <name>Start dev server</name>
399
+ <action>Run `npm run dev` in background, wait for ready</action>
400
+ <verify>curl localhost:3000 returns 200</verify>
401
+ </task>
402
+
403
+ <task type="checkpoint:human-verify" gate="blocking">
404
+ <what-built>Dashboard - server at http://localhost:3000</what-built>
405
+ <how-to-verify>Visit localhost:3000/dashboard. Check: desktop grid, mobile stack, no scroll issues.</how-to-verify>
406
+ <resume-signal>Type "approved" or describe issues</resume-signal>
407
+ </task>
408
+ </tasks>
409
+
410
+ <verification>
411
+ - [ ] npm run build succeeds
412
+ - [ ] Visual verification passed
413
+ </verification>
414
+
415
+ <success_criteria>
416
+ - All tasks completed
417
+ - User approved visual layout
418
+ </success_criteria>
419
+
420
+ <output>
421
+ After completion, create `.renn/stages/03-features/03-03-recap.md`
422
+ </output>
423
+ ```
424
+
425
+ ---
426
+
427
+ ## Anti-Patterns
428
+
429
+ **Bad: Reflexive dependency chaining**
430
+ ```yaml
431
+ depends_on: ["03-01"] # Just because 01 comes before 02
432
+ ```
433
+
434
+ **Bad: Horizontal layer grouping**
435
+ ```
436
+ Run 01: All models
437
+ Run 02: All APIs (depends on 01)
438
+ Run 03: All UIs (depends on 02)
439
+ ```
440
+
441
+ **Bad: Missing autonomy flag**
442
+ ```yaml
443
+ # Has gate but no autonomous: false
444
+ depends_on: []
445
+ files_modified: [...]
446
+ # autonomous: ??? <- Missing!
447
+ ```
448
+
449
+ **Bad: Vague tasks**
450
+ ```xml
451
+ <task type="auto">
452
+ <name>Set up authentication</name>
453
+ <action>Add auth to the app</action>
454
+ </task>
455
+ ```
456
+
457
+ ---
458
+
459
+ <guidelines>
460
+
461
+ ## Guidelines
462
+
463
+ - Always use XML structure for Claude parsing
464
+ - Include `batch`, `depends_on`, `files_modified`, `autonomous` in every run
465
+ - Prefer vertical slices over horizontal layers
466
+ - Only reference prior RECAPs when genuinely needed
467
+ - Group gates with related auto tasks in same run
468
+ - 2-3 tasks per run, ~50% context max
469
+
470
+ </guidelines>
471
+
472
+ ---
473
+
474
+ ## User Setup (External Services)
475
+
476
+ When a run introduces external services requiring human configuration, declare in frontmatter:
477
+
478
+ ```yaml
479
+ user_setup:
480
+ - service: stripe
481
+ why: "Payment processing requires API keys"
482
+ env_vars:
483
+ - name: STRIPE_SECRET_KEY
484
+ source: "Stripe Dashboard → Developers → API keys → Secret key"
485
+ - name: STRIPE_WEBHOOK_SECRET
486
+ source: "Stripe Dashboard → Developers → Webhooks → Signing secret"
487
+ dashboard_config:
488
+ - task: "Create webhook endpoint"
489
+ location: "Stripe Dashboard → Developers → Webhooks → Add endpoint"
490
+ details: "URL: https://[your-domain]/api/webhooks/stripe"
491
+ local_dev:
492
+ - "stripe listen --forward-to localhost:3000/api/webhooks/stripe"
493
+ ```
494
+
495
+ **The automation-first rule:** `user_setup` contains ONLY what Claude literally cannot do:
496
+ - Account creation (requires human signup)
497
+ - Secret retrieval (requires dashboard access)
498
+ - Dashboard configuration (requires human in browser)
499
+
500
+ **NOT included:** Package installs, code changes, file creation, CLI commands Claude can run.
501
+
502
+ **Result:** Run-stage generates `{stage}-USER-SETUP.md` with checklist for the user.
503
+
504
+ See `~/.claude/renn/templates/user-setup.md` for full schema and examples
505
+
506
+ ---
507
+
508
+ ## Must-Haves (Goal-Backward Verification)
509
+
510
+ The `must_haves` field defines what must be TRUE for the stage goal to be achieved. Derived during planning, verified after execution.
511
+
512
+ **Structure:**
513
+
514
+ ```yaml
515
+ must_haves:
516
+ truths:
517
+ - "User can see existing messages"
518
+ - "User can send a message"
519
+ - "Messages persist across refresh"
520
+ artifacts:
521
+ - path: "src/components/Chat.tsx"
522
+ provides: "Message list rendering"
523
+ min_lines: 30
524
+ - path: "src/app/api/chat/route.ts"
525
+ provides: "Message CRUD operations"
526
+ exports: ["GET", "POST"]
527
+ - path: "prisma/schema.prisma"
528
+ provides: "Message model"
529
+ contains: "model Message"
530
+ key_links:
531
+ - from: "src/components/Chat.tsx"
532
+ to: "/api/chat"
533
+ via: "fetch in useEffect"
534
+ pattern: "fetch.*api/chat"
535
+ - from: "src/app/api/chat/route.ts"
536
+ to: "prisma.message"
537
+ via: "database query"
538
+ pattern: "prisma\\.message\\.(find|create)"
539
+ ```
540
+
541
+ **Field descriptions:**
542
+
543
+ | Field | Purpose |
544
+ |-------|---------|
545
+ | `truths` | Observable behaviors from user perspective. Each must be testable. |
546
+ | `artifacts` | Files that must exist with real implementation. |
547
+ | `artifacts[].path` | File path relative to project root. |
548
+ | `artifacts[].provides` | What this artifact delivers. |
549
+ | `artifacts[].min_lines` | Optional. Minimum lines to be considered substantive. |
550
+ | `artifacts[].exports` | Optional. Expected exports to verify. |
551
+ | `artifacts[].contains` | Optional. Pattern that must exist in file. |
552
+ | `key_links` | Critical connections between artifacts. |
553
+ | `key_links[].from` | Source artifact. |
554
+ | `key_links[].to` | Target artifact or endpoint. |
555
+ | `key_links[].via` | How they connect (description). |
556
+ | `key_links[].pattern` | Optional. Regex to verify connection exists. |
557
+
558
+ **Why this matters:**
559
+
560
+ Task completion ≠ Goal achievement. A task "create chat component" can complete by creating a placeholder. The `must_haves` field captures what must actually work, enabling verification to catch gaps before they compound.
561
+
562
+ **Verification flow:**
563
+
564
+ 1. Plan-stage derives must_haves from stage goal (goal-backward)
565
+ 2. Must_haves written to run.md frontmatter
566
+ 3. Run-stage runs all runs
567
+ 4. Verification subagent checks must_haves against codebase
568
+ 5. Gaps found → fix runs created → execute → re-verify
569
+ 6. All must_haves pass → stage complete
570
+
571
+ See `~/.claude/renn/workflows/audit-stage.md` for verification logic.