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,875 @@
1
+ <purpose>
2
+
3
+ Mark a shipped milestone as complete. This creates a historical record in milestones.md, performs full brief.md evolution review, reorganizes track.md with milestone groupings, and creates a local git tag.
4
+
5
+ This is the ritual that separates "development" from "shipped."
6
+
7
+ </purpose>
8
+
9
+ <required_reading>
10
+
11
+ **Read these files NOW:**
12
+
13
+ 1. templates/milestone.md
14
+ 2. templates/milestone-archive.md
15
+ 3. `.renn/track.md`
16
+ 4. `.renn/specs.md`
17
+ 5. `.renn/brief.md`
18
+
19
+ </required_reading>
20
+
21
+ <archival_behavior>
22
+
23
+ When a milestone completes, this workflow:
24
+
25
+ 1. Extracts full milestone details to `.renn/milestones/[MILESTONE]-track.md`
26
+ 2. Archives specs to `.renn/milestones/[MILESTONE]-specs.md`
27
+ 3. Updates track.md to replace milestone details with one-line summary
28
+ 4. Deletes specs.md (fresh one created for next milestone)
29
+ 5. Performs full brief.md evolution review
30
+ 6. Offers to create next milestone inline
31
+
32
+ **Context Efficiency:** Archives keep track.md constant-size and specs.md milestone-scoped.
33
+
34
+ **Archive Format:**
35
+
36
+ **TRACK archive** uses `templates/milestone-archive.md` template with:
37
+ - Milestone header (status, stages, date)
38
+ - Full stage details from track
39
+ - Milestone summary (decisions, issues, technical debt)
40
+
41
+ **SPECS archive** contains:
42
+ - All v1 specs marked complete with outcomes
43
+ - Traceability table with final status
44
+ - Notes on any specs that changed during milestone
45
+
46
+ </archival_behavior>
47
+
48
+ <process>
49
+
50
+ <step name="verify_readiness">
51
+
52
+ Check if milestone is truly complete:
53
+
54
+ ```bash
55
+ cat .renn/track.md
56
+ ls .renn/stages/*/recap.md 2>/dev/null | wc -l
57
+ ```
58
+
59
+ **Questions to ask:**
60
+
61
+ - Which stages belong to this milestone?
62
+ - Are all those stages complete (all runs have recaps)?
63
+ - Has the work been tested/validated?
64
+ - Is this ready to ship/tag?
65
+
66
+ Present:
67
+
68
+ ```
69
+ Milestone: [ID and Name from user, e.g., "M03 Authentication"]
70
+
71
+ Appears to include:
72
+ - Stage 1: Foundation (2/2 runs complete)
73
+ - Stage 2: Authentication (2/2 runs complete)
74
+ - Stage 3: Core Features (3/3 runs complete)
75
+ - Stage 4: Polish (1/1 run complete)
76
+
77
+ Total: 4 stages, 8 runs, all complete
78
+ ```
79
+
80
+ <config-check>
81
+
82
+ ```bash
83
+ cat .renn/config.json 2>/dev/null
84
+ ```
85
+
86
+ </config-check>
87
+
88
+ <if style="turbo">
89
+
90
+ ```
91
+ Auto-approved: Milestone scope verification
92
+
93
+ [Show breakdown summary without prompting]
94
+
95
+ Proceeding to stats gathering...
96
+ ```
97
+
98
+ Proceed directly to gather_stats step.
99
+
100
+ </if>
101
+
102
+ <if style="guided" OR="custom with gates.confirm_milestone_scope true">
103
+
104
+ ```
105
+ Ready to mark this milestone as shipped?
106
+ (yes / wait / adjust scope)
107
+ ```
108
+
109
+ Wait for confirmation.
110
+
111
+ If "adjust scope": Ask which stages should be included.
112
+ If "wait": Stop, user will return when ready.
113
+
114
+ </if>
115
+
116
+ </step>
117
+
118
+ <step name="gather_stats">
119
+
120
+ Calculate milestone statistics:
121
+
122
+ ```bash
123
+ # Count stages and runs in milestone
124
+ # (user specified or detected from track)
125
+
126
+ # Find git range
127
+ git log --oneline --grep="feat(" | head -20
128
+
129
+ # Count files modified in range
130
+ git diff --stat FIRST_COMMIT..LAST_COMMIT | tail -1
131
+
132
+ # Count LOC (adapt to language)
133
+ find . -name "*.swift" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null
134
+
135
+ # Calculate timeline
136
+ git log --format="%ai" FIRST_COMMIT | tail -1 # Start date
137
+ git log --format="%ai" LAST_COMMIT | head -1 # End date
138
+ ```
139
+
140
+ Present summary:
141
+
142
+ ```
143
+ Milestone Stats:
144
+ - Stages: [X-Y]
145
+ - Runs: [Z] total
146
+ - Tasks: [N] total (estimated from stage recaps)
147
+ - Files modified: [M]
148
+ - Lines of code: [LOC] [language]
149
+ - Timeline: [Days] days ([Start] -> [End])
150
+ - Git range: feat(XX.XX) -> feat(YY.YY)
151
+ ```
152
+
153
+ </step>
154
+
155
+ <step name="extract_accomplishments">
156
+
157
+ Read all stage recap.md files in milestone range:
158
+
159
+ ```bash
160
+ cat .renn/stages/01-*/01-*-recap.md
161
+ cat .renn/stages/02-*/02-*-recap.md
162
+ # ... for each stage in milestone
163
+ ```
164
+
165
+ From recaps, extract 4-6 key accomplishments.
166
+
167
+ Present:
168
+
169
+ ```
170
+ Key accomplishments for this milestone:
171
+ 1. [Achievement from stage 1]
172
+ 2. [Achievement from stage 2]
173
+ 3. [Achievement from stage 3]
174
+ 4. [Achievement from stage 4]
175
+ 5. [Achievement from stage 5]
176
+ ```
177
+
178
+ </step>
179
+
180
+ <step name="create_milestone_entry">
181
+
182
+ Create or update `.renn/milestones.md`.
183
+
184
+ If file doesn't exist:
185
+
186
+ ```markdown
187
+ # Project Milestones: [Project Name from brief.md]
188
+
189
+ [New entry]
190
+ ```
191
+
192
+ If exists, prepend new entry (reverse chronological order).
193
+
194
+ Use template from `templates/milestone.md`:
195
+
196
+ ```markdown
197
+ ## [MILESTONE] [Name] (Shipped: YYYY-MM-DD)
198
+
199
+ **Delivered:** [One sentence from user]
200
+
201
+ **Stages completed:** [X-Y] ([Z] runs total)
202
+
203
+ **Key accomplishments:**
204
+
205
+ - [List from previous step]
206
+
207
+ **Stats:**
208
+
209
+ - [Files] files created/modified
210
+ - [LOC] lines of [language]
211
+ - [Stages] stages, [Runs] runs, [Tasks] tasks
212
+ - [Days] days from [start milestone or start project] to ship
213
+
214
+ **Git range:** `[FIRST_COMMIT]` -> `[LAST_COMMIT]`
215
+
216
+ **Tag:** `[MILESTONE]-[slug]`
217
+
218
+ **What's next:** [Ask user: what's the next goal?]
219
+
220
+ ---
221
+ ```
222
+
223
+ </step>
224
+
225
+ <step name="evolve_brief_full_review">
226
+
227
+ Perform full brief.md evolution review at milestone completion.
228
+
229
+ **Read all stage recaps in this milestone:**
230
+
231
+ ```bash
232
+ cat .renn/stages/*-*/*-recap.md
233
+ ```
234
+
235
+ **Full review checklist:**
236
+
237
+ 1. **Project identity check:**
238
+ - Read the `# Heading` (project name) and `## What This Is` description
239
+ - Cross-reference against `package.json` description (if exists) and `.renn/codebase/ARCHITECTURE.md` (if exists)
240
+ - Does the heading still name the full project, or has it narrowed to a phase/milestone?
241
+ - Does "What This Is" describe the product as it exists today, or an earlier version?
242
+ - Update heading and description if the project has grown beyond what they capture
243
+
244
+ 2. **Core Value check:**
245
+ - Is the stated core value still the right priority?
246
+ - Did shipping reveal a different core value?
247
+ - Update if the ONE thing has shifted
248
+
249
+ 3. **Specs audit:**
250
+
251
+ **Validated section:**
252
+ - All Active specs shipped in this milestone -> Move to Validated
253
+ - Format: `- [Spec] -- shipped [MILESTONE]`
254
+
255
+ **Active section:**
256
+ - Remove specs that moved to Validated
257
+ - Add any new specs for next milestone
258
+ - Keep specs that weren't addressed yet
259
+
260
+ **Out of Scope audit:**
261
+ - Review each item -- is the reasoning still valid?
262
+ - Remove items that lack current relevance
263
+ - Add any specs invalidated during this milestone
264
+
265
+ 4. **Context update:**
266
+ - Current codebase state (LOC, tech stack)
267
+ - User feedback themes (if any)
268
+ - Known issues or technical debt to address
269
+
270
+ 5. **Key Decisions audit:**
271
+ - Extract all decisions from milestone stage recaps
272
+ - Add to Key Decisions table with outcomes where known
273
+ - Mark Good, Revisit, or Pending for each
274
+
275
+ 6. **Constraints check:**
276
+ - Any constraints that changed during development?
277
+ - Update as needed
278
+
279
+ **Update brief.md:**
280
+
281
+ Make all edits inline. Update "Last updated" footer:
282
+
283
+ ```markdown
284
+ ---
285
+ *Last updated: [date] after [MILESTONE] milestone*
286
+ ```
287
+
288
+ **Step complete when:**
289
+
290
+ - [ ] "What This Is" reviewed and updated if needed
291
+ - [ ] Core Value verified as still correct
292
+ - [ ] All shipped specs moved to Validated
293
+ - [ ] New specs added to Active for next milestone
294
+ - [ ] Out of Scope reasoning audited
295
+ - [ ] Context updated with current state
296
+ - [ ] All milestone decisions added to Key Decisions
297
+ - [ ] "Last updated" footer reflects milestone completion
298
+
299
+ </step>
300
+
301
+ <step name="reorganize_track">
302
+
303
+ Update `.renn/track.md` to group completed milestone stages.
304
+
305
+ Add milestone headers and collapse completed work:
306
+
307
+ ```markdown
308
+ # Track: [Project Name]
309
+
310
+ ## Milestones
311
+
312
+ - SHIPPED **M01 MVP** -- Stages 1-4 (shipped YYYY-MM-DD)
313
+ - SHIPPED **M02 Security** -- Stages 5-6 (shipped YYYY-MM-DD)
314
+ - **M03 Redesign** -- Stages 7-10 (in progress)
315
+
316
+ ## Stages
317
+
318
+ <details>
319
+ <summary>SHIPPED M01 MVP (Stages 1-4) -- SHIPPED YYYY-MM-DD</summary>
320
+
321
+ - [x] Stage 1: Foundation (2/2 runs) -- completed YYYY-MM-DD
322
+ - [x] Stage 2: Authentication (2/2 runs) -- completed YYYY-MM-DD
323
+ - [x] Stage 3: Core Features (3/3 runs) -- completed YYYY-MM-DD
324
+ - [x] Stage 4: Polish (1/1 run) -- completed YYYY-MM-DD
325
+
326
+ </details>
327
+
328
+ ### M03 [Name] (In Progress / Planned)
329
+
330
+ - [ ] Stage 7: [Name] ([N] runs)
331
+ - [ ] Stage 8: [Name] ([N] runs)
332
+
333
+ ## Progress
334
+
335
+ | Stage | Milestone | Runs Complete | Status | Completed |
336
+ | ----------------- | --------- | ------------- | ----------- | ---------- |
337
+ | 1. Foundation | M01 | 2/2 | Complete | YYYY-MM-DD |
338
+ | 2. Authentication | M01 | 2/2 | Complete | YYYY-MM-DD |
339
+ | 3. Core Features | M01 | 3/3 | Complete | YYYY-MM-DD |
340
+ | 4. Polish | M01 | 1/1 | Complete | YYYY-MM-DD |
341
+ | 5. Security Audit | M02 | 0/1 | Not started | - |
342
+ | 6. Hardening | M02 | 0/2 | Not started | - |
343
+ ```
344
+
345
+ </step>
346
+
347
+ <step name="archive_milestone">
348
+
349
+ Extract completed milestone details and create archive file.
350
+
351
+ **Process:**
352
+
353
+ 1. Create archive file path: `.renn/milestones/[MILESTONE]-track.md`
354
+
355
+ 2. Read `~/.claude/renn/templates/milestone-archive.md` template
356
+
357
+ 3. Extract data from current track.md:
358
+ - All stages belonging to this milestone (by stage number range)
359
+ - Full stage details (goals, runs, dependencies, status)
360
+ - Stage run lists with completion checkmarks
361
+
362
+ 4. Extract data from brief.md:
363
+ - Key decisions made during this milestone
364
+ - Specs that were validated
365
+
366
+ 5. Fill template {{PLACEHOLDERS}}:
367
+ - {{MILESTONE_ID}} -- Milestone identifier (e.g., "M11")
368
+ - {{MILESTONE_NAME}} -- From track.md milestone header
369
+ - {{DATE}} -- Today's date
370
+ - {{STAGE_START}} -- First stage number in milestone
371
+ - {{STAGE_END}} -- Last stage number in milestone
372
+ - {{TOTAL_RUNS}} -- Count of all runs in milestone
373
+ - {{MILESTONE_DESCRIPTION}} -- From track.md overview
374
+ - {{STAGES_SECTION}} -- Full stage details extracted
375
+ - {{DECISIONS_FROM_BRIEF}} -- Key decisions from brief.md
376
+ - {{ISSUES_RESOLVED_DURING_MILESTONE}} -- From recaps
377
+
378
+ 6. Write filled template to `.renn/milestones/[MILESTONE]-track.md`
379
+
380
+ 7. Delete track.md (fresh one created for next milestone):
381
+ ```bash
382
+ rm .renn/track.md
383
+ ```
384
+
385
+ 8. Verify archive exists:
386
+ ```bash
387
+ ls .renn/milestones/[MILESTONE]-track.md
388
+ ```
389
+
390
+ 9. Confirm track archive complete:
391
+
392
+ ```
393
+ Track archived to milestones/[MILESTONE]-track.md
394
+ track.md deleted (fresh one for next milestone)
395
+ ```
396
+
397
+ **Note:** Stage directories (`.renn/stages/`) are NOT deleted. They accumulate across milestones as the raw execution history. Stage numbering continues (M01 stages 1-4, M02 stages 5-8, etc.).
398
+
399
+ </step>
400
+
401
+ <step name="archive_specs">
402
+
403
+ Archive specs and prepare for fresh specs in next milestone.
404
+
405
+ **Process:**
406
+
407
+ 1. Read current specs.md:
408
+ ```bash
409
+ cat .renn/specs.md
410
+ ```
411
+
412
+ 2. Create archive file: `.renn/milestones/[MILESTONE]-specs.md`
413
+
414
+ 3. Transform specs for archive:
415
+ - Mark all v1 specs as `[x]` complete
416
+ - Add outcome notes where relevant (validated, adjusted, dropped)
417
+ - Update traceability table status to "Complete" for all shipped specs
418
+ - Add "Milestone Summary" section with:
419
+ - Total specs shipped
420
+ - Any specs that changed scope during milestone
421
+ - Any specs dropped and why
422
+
423
+ 4. Write archive file with header:
424
+ ```markdown
425
+ # Specs Archive: [MILESTONE] [Milestone Name]
426
+
427
+ **Archived:** [DATE]
428
+ **Status:** SHIPPED
429
+
430
+ This is the archived specs for [MILESTONE].
431
+ For current specs, see `.renn/specs.md` (created for next milestone).
432
+
433
+ ---
434
+
435
+ [Full specs.md content with checkboxes marked complete]
436
+
437
+ ---
438
+
439
+ ## Milestone Summary
440
+
441
+ **Shipped:** [X] of [Y] v1 specs
442
+ **Adjusted:** [list any specs that changed during implementation]
443
+ **Dropped:** [list any specs removed and why]
444
+
445
+ ---
446
+ *Archived: [DATE] as part of [MILESTONE] milestone completion*
447
+ ```
448
+
449
+ 5. Delete original specs.md:
450
+ ```bash
451
+ rm .renn/specs.md
452
+ ```
453
+
454
+ 6. Confirm:
455
+ ```
456
+ Specs archived to milestones/[MILESTONE]-specs.md
457
+ specs.md deleted (fresh one needed for next milestone)
458
+ ```
459
+
460
+ **Important:** The next milestone workflow starts with `/renn.new-milestone` which includes specs definition. brief.md's Validated section carries the cumulative record across milestones.
461
+
462
+ </step>
463
+
464
+ <step name="archive_audit">
465
+
466
+ Move the milestone audit file to the archive (if it exists):
467
+
468
+ ```bash
469
+ # Move audit to milestones folder (if exists)
470
+ [ -f .renn/[MILESTONE]-MILESTONE-AUDIT.md ] && mv .renn/[MILESTONE]-MILESTONE-AUDIT.md .renn/milestones/
471
+ ```
472
+
473
+ Confirm:
474
+ ```
475
+ Audit archived to milestones/[MILESTONE]-MILESTONE-AUDIT.md
476
+ ```
477
+
478
+ (Skip silently if no audit file exists -- audit is optional)
479
+
480
+ </step>
481
+
482
+ <step name="update_pulse">
483
+
484
+ Update pulse.md to reflect milestone completion.
485
+
486
+ **Project Reference:**
487
+
488
+ ```markdown
489
+ ## Project Reference
490
+
491
+ See: .renn/brief.md (updated [today])
492
+
493
+ **Core value:** [Current core value from brief.md]
494
+ **Current focus:** [Next milestone or "Planning next milestone"]
495
+ ```
496
+
497
+ **Current Position:**
498
+
499
+ ```markdown
500
+ Stage: [Next stage] of [Total] ([Stage name])
501
+ Run: Not started
502
+ Status: Ready to plan
503
+ Last activity: [today] -- [MILESTONE] milestone complete
504
+
505
+ Progress: [updated progress bar]
506
+ ```
507
+
508
+ **Accumulated Context:**
509
+
510
+ - Clear decisions summary (full log in brief.md)
511
+ - Clear resolved blockers
512
+ - Keep open blockers for next milestone
513
+
514
+ </step>
515
+
516
+ <step name="handle_branches">
517
+
518
+ Check if branching was used and offer merge options.
519
+
520
+ **Check branching strategy:**
521
+
522
+ ```bash
523
+ # Get branching strategy from config
524
+ BRANCHING_STRATEGY=$(cat .renn/config.json 2>/dev/null | grep -o '"branching_strategy"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*:.*"\([^"]*\)"/\1/' || echo "none")
525
+ ```
526
+
527
+ **If strategy is "none":** Skip to git_tag step.
528
+
529
+ **For "stage" strategy -- find stage branches:**
530
+
531
+ ```bash
532
+ STAGE_BRANCH_TEMPLATE=$(cat .renn/config.json 2>/dev/null | grep -o '"stage_branch_template"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*:.*"\([^"]*\)"/\1/' || echo "renn/stage-{stage}-{slug}")
533
+
534
+ # Extract prefix from template (before first variable)
535
+ BRANCH_PREFIX=$(echo "$STAGE_BRANCH_TEMPLATE" | sed 's/{.*//')
536
+
537
+ # Find all stage branches for this milestone
538
+ STAGE_BRANCHES=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ')
539
+ ```
540
+
541
+ **For "milestone" strategy -- find milestone branch:**
542
+
543
+ ```bash
544
+ MILESTONE_BRANCH_TEMPLATE=$(cat .renn/config.json 2>/dev/null | grep -o '"milestone_branch_template"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*:.*"\([^"]*\)"/\1/' || echo "renn/{milestone}-{slug}")
545
+
546
+ # Extract prefix from template
547
+ BRANCH_PREFIX=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed 's/{.*//')
548
+
549
+ # Find milestone branch
550
+ MILESTONE_BRANCH=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ' | head -1)
551
+ ```
552
+
553
+ **If no branches found:** Skip to git_tag step.
554
+
555
+ **If branches exist -- present merge options:**
556
+
557
+ ```
558
+ ## Git Branches Detected
559
+
560
+ Branching strategy: {stage/milestone}
561
+
562
+ Branches found:
563
+ {list of branches}
564
+
565
+ Options:
566
+ 1. **Merge to main** -- Merge branch(es) to main
567
+ 2. **Delete without merging** -- Branches already merged or not needed
568
+ 3. **Keep branches** -- Leave for manual handling
569
+ ```
570
+
571
+ Use AskUserQuestion:
572
+
573
+ ```
574
+ AskUserQuestion([
575
+ {
576
+ question: "How should branches be handled?",
577
+ header: "Branches",
578
+ multiSelect: false,
579
+ options: [
580
+ { label: "Squash merge (Recommended)", description: "Squash all commits into one clean commit on main" },
581
+ { label: "Merge with history", description: "Preserve all individual commits (--no-ff)" },
582
+ { label: "Delete without merging", description: "Branches already merged or not needed" },
583
+ { label: "Keep branches", description: "Leave branches for manual handling later" }
584
+ ]
585
+ }
586
+ ])
587
+ ```
588
+
589
+ **If "Squash merge":**
590
+
591
+ ```bash
592
+ CURRENT_BRANCH=$(git branch --show-current)
593
+ git checkout main
594
+
595
+ # For stage strategy - squash merge each stage branch
596
+ if [ "$BRANCHING_STRATEGY" = "stage" ]; then
597
+ for branch in $STAGE_BRANCHES; do
598
+ echo "Squash merging $branch..."
599
+ git merge --squash "$branch"
600
+ git commit -m "feat: $branch for [MILESTONE]"
601
+ done
602
+ fi
603
+
604
+ # For milestone strategy - squash merge milestone branch
605
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
606
+ echo "Squash merging $MILESTONE_BRANCH..."
607
+ git merge --squash "$MILESTONE_BRANCH"
608
+ git commit -m "feat: $MILESTONE_BRANCH for [MILESTONE]"
609
+ fi
610
+
611
+ git checkout "$CURRENT_BRANCH"
612
+ ```
613
+
614
+ Report: "Squash merged branches to main"
615
+
616
+ **If "Merge with history":**
617
+
618
+ ```bash
619
+ CURRENT_BRANCH=$(git branch --show-current)
620
+ git checkout main
621
+
622
+ # For stage strategy - merge each stage branch
623
+ if [ "$BRANCHING_STRATEGY" = "stage" ]; then
624
+ for branch in $STAGE_BRANCHES; do
625
+ echo "Merging $branch..."
626
+ git merge --no-ff "$branch" -m "Merge branch '$branch' for [MILESTONE]"
627
+ done
628
+ fi
629
+
630
+ # For milestone strategy - merge milestone branch
631
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
632
+ echo "Merging $MILESTONE_BRANCH..."
633
+ git merge --no-ff "$MILESTONE_BRANCH" -m "Merge branch '$MILESTONE_BRANCH' for [MILESTONE]"
634
+ fi
635
+
636
+ git checkout "$CURRENT_BRANCH"
637
+ ```
638
+
639
+ Report: "Merged branches to main with full history"
640
+
641
+ **If "Delete without merging":**
642
+
643
+ ```bash
644
+ if [ "$BRANCHING_STRATEGY" = "stage" ]; then
645
+ for branch in $STAGE_BRANCHES; do
646
+ git branch -d "$branch" 2>/dev/null || git branch -D "$branch"
647
+ done
648
+ fi
649
+
650
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
651
+ git branch -d "$MILESTONE_BRANCH" 2>/dev/null || git branch -D "$MILESTONE_BRANCH"
652
+ fi
653
+ ```
654
+
655
+ Report: "Deleted branches"
656
+
657
+ **If "Keep branches":**
658
+
659
+ Report: "Branches preserved for manual handling"
660
+
661
+ </step>
662
+
663
+ <step name="git_tag">
664
+
665
+ Create a local git tag for the milestone.
666
+
667
+ **Derive tag name from milestone:**
668
+
669
+ The tag uses the milestone ID and a kebab-cased slug of the milestone name from track.md.
670
+
671
+ ```bash
672
+ # Example: milestone ID = M11, milestone name = "Watch Command"
673
+ # Tag = M11-watch-command
674
+ TAG_NAME="[MILESTONE_ID]-[kebab-slug-of-name]"
675
+ ```
676
+
677
+ **Create the annotated tag locally:**
678
+
679
+ ```bash
680
+ git tag -a [TAG_NAME] -m "$(cat <<'EOF'
681
+ [MILESTONE] [Name]
682
+
683
+ Delivered: [One sentence]
684
+
685
+ Key accomplishments:
686
+ - [Item 1]
687
+ - [Item 2]
688
+ - [Item 3]
689
+
690
+ See .renn/milestones.md for full details.
691
+ EOF
692
+ )"
693
+ ```
694
+
695
+ Confirm: "Tagged locally: [TAG_NAME]"
696
+
697
+ **Ask whether to push:**
698
+
699
+ ```
700
+ Push tag to remote? The commits it points to may or may not be on origin yet.
701
+ (yes / no)
702
+ ```
703
+
704
+ If yes:
705
+
706
+ ```bash
707
+ git push origin [TAG_NAME]
708
+ ```
709
+
710
+ If no: Tag stays local. Can be pushed later manually or by `/renn.ship`.
711
+
712
+ </step>
713
+
714
+ <step name="git_commit_milestone">
715
+
716
+ Commit milestone completion including archive files and deletions.
717
+
718
+ **Check config:**
719
+
720
+ ```bash
721
+ COMMIT_PLANNING_DOCS=$(cat .renn/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
722
+ git check-ignore -q .renn 2>/dev/null && COMMIT_PLANNING_DOCS=false
723
+ ```
724
+
725
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
726
+
727
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
728
+
729
+ ```bash
730
+ # Stage archive files (new)
731
+ git add .renn/milestones/[MILESTONE]-track.md
732
+ git add .renn/milestones/[MILESTONE]-specs.md
733
+ git add .renn/milestones/[MILESTONE]-MILESTONE-AUDIT.md 2>/dev/null || true
734
+
735
+ # Stage updated files
736
+ git add .renn/milestones.md
737
+ git add .renn/brief.md
738
+ git add .renn/pulse.md
739
+
740
+ # Stage deletions
741
+ git add -u .renn/
742
+
743
+ # Commit with descriptive message
744
+ git commit -m "$(cat <<'EOF'
745
+ chore: complete [MILESTONE] milestone
746
+
747
+ Archived:
748
+ - milestones/[MILESTONE]-track.md
749
+ - milestones/[MILESTONE]-specs.md
750
+ - milestones/[MILESTONE]-MILESTONE-AUDIT.md (if audit was run)
751
+
752
+ Deleted (fresh for next milestone):
753
+ - track.md
754
+ - specs.md
755
+
756
+ Updated:
757
+ - milestones.md (new entry)
758
+ - brief.md (specs -> Validated)
759
+ - pulse.md (reset for next milestone)
760
+
761
+ Tagged: [TAG_NAME]
762
+ EOF
763
+ )"
764
+ ```
765
+
766
+ Confirm: "Committed: chore: complete [MILESTONE] milestone"
767
+
768
+ </step>
769
+
770
+ <step name="offer_next">
771
+
772
+ ```
773
+ [MILESTONE] [Name] complete
774
+
775
+ Shipped:
776
+ - [N] stages ([M] runs, [P] tasks)
777
+ - [One sentence of what shipped]
778
+
779
+ Archived:
780
+ - milestones/[MILESTONE]-track.md
781
+ - milestones/[MILESTONE]-specs.md
782
+
783
+ Summary: .renn/milestones.md
784
+ Tag: [TAG_NAME]
785
+
786
+ ---
787
+
788
+ ## Next Up
789
+
790
+ **Ship Your Project** -- deploy to a platform
791
+
792
+ `/renn.ship`
793
+
794
+ **Start Next Milestone** -- questioning -> research -> specs -> track
795
+
796
+ `/renn.new-milestone`
797
+
798
+ <sub>`/clear` first -> fresh context window</sub>
799
+
800
+ ---
801
+ ```
802
+
803
+ </step>
804
+
805
+ </process>
806
+
807
+ <milestone_naming>
808
+
809
+ **Milestone IDs use M-format (M01, M02, M03, etc.):**
810
+
811
+ This is universal across all projects regardless of versioning strategy. RENN milestones are project management markers, not software version numbers.
812
+
813
+ - **M01** -- First milestone (often MVP)
814
+ - **M02, M03** -- Subsequent milestones
815
+ - **M10, M11** -- Higher milestones
816
+
817
+ **Name conventions:**
818
+ - M01 MVP
819
+ - M02 Security
820
+ - M03 Performance
821
+ - M04 Redesign
822
+ - M05 iOS Launch
823
+
824
+ Keep names short (1-2 words describing the focus).
825
+
826
+ **Tag format:**
827
+ - `M01-mvp`
828
+ - `M02-security`
829
+ - `M11-watch-command`
830
+
831
+ **Why M-format instead of semver:**
832
+ - Semver tags (v1.0, v2.0) may be owned by an external version manager (release-please, semantic-release, changesets, etc.)
833
+ - M-format never collides with any versioning scheme
834
+ - Works identically for greenfield and brownfield projects
835
+ - Milestone tags mark planning boundaries; version tags mark software releases -- separate concerns
836
+
837
+ </milestone_naming>
838
+
839
+ <what_qualifies>
840
+
841
+ **Create milestones for:**
842
+ - Initial release (M01)
843
+ - Public releases
844
+ - Major feature sets shipped
845
+ - Before archiving planning
846
+
847
+ **Don't create milestones for:**
848
+ - Every stage completion (too granular)
849
+ - Work in progress (wait until shipped)
850
+ - Internal dev iterations (unless truly shipped internally)
851
+
852
+ If uncertain, ask: "Is this deployed/usable/shipped in some form?"
853
+ If yes -> milestone. If no -> keep working.
854
+
855
+ </what_qualifies>
856
+
857
+ <success_criteria>
858
+
859
+ Milestone completion is successful when:
860
+
861
+ - [ ] milestones.md entry created with stats and accomplishments
862
+ - [ ] brief.md full evolution review completed
863
+ - [ ] All shipped specs moved to Validated in brief.md
864
+ - [ ] Key Decisions updated with outcomes
865
+ - [ ] track.md reorganized with milestone grouping
866
+ - [ ] Track archive created (milestones/[MILESTONE]-track.md)
867
+ - [ ] Specs archive created (milestones/[MILESTONE]-specs.md)
868
+ - [ ] specs.md deleted (fresh for next milestone)
869
+ - [ ] pulse.md updated with fresh project reference
870
+ - [ ] Git tag created locally ([MILESTONE]-[slug])
871
+ - [ ] User asked about pushing tag to remote
872
+ - [ ] Milestone commit made (if commit_docs=true)
873
+ - [ ] User knows next step (/renn.new-milestone)
874
+
875
+ </success_criteria>