@lipter7/blueprint 2.0.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 (125) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +626 -0
  3. package/agents/bp-codebase-mapper.md +761 -0
  4. package/agents/bp-debugger.md +1198 -0
  5. package/agents/bp-executor.md +403 -0
  6. package/agents/bp-integration-checker.md +423 -0
  7. package/agents/bp-phase-researcher.md +469 -0
  8. package/agents/bp-plan-checker.md +622 -0
  9. package/agents/bp-planner.md +1157 -0
  10. package/agents/bp-project-researcher.md +618 -0
  11. package/agents/bp-research-synthesizer.md +236 -0
  12. package/agents/bp-roadmapper.md +605 -0
  13. package/agents/bp-verifier.md +523 -0
  14. package/bin/install.js +1754 -0
  15. package/blueprint/bin/blueprint-tools.js +4597 -0
  16. package/blueprint/bin/blueprint-tools.test.js +2033 -0
  17. package/blueprint/references/checkpoints.md +775 -0
  18. package/blueprint/references/continuation-format.md +249 -0
  19. package/blueprint/references/decimal-phase-calculation.md +65 -0
  20. package/blueprint/references/git-integration.md +248 -0
  21. package/blueprint/references/git-planning-commit.md +38 -0
  22. package/blueprint/references/model-profile-resolution.md +32 -0
  23. package/blueprint/references/model-profiles.md +73 -0
  24. package/blueprint/references/phase-argument-parsing.md +61 -0
  25. package/blueprint/references/planning-config.md +194 -0
  26. package/blueprint/references/questioning.md +141 -0
  27. package/blueprint/references/tdd.md +263 -0
  28. package/blueprint/references/ui-brand.md +160 -0
  29. package/blueprint/references/verification-patterns.md +612 -0
  30. package/blueprint/templates/DEBUG.md +159 -0
  31. package/blueprint/templates/UAT.md +247 -0
  32. package/blueprint/templates/codebase/architecture.md +255 -0
  33. package/blueprint/templates/codebase/concerns.md +310 -0
  34. package/blueprint/templates/codebase/conventions.md +307 -0
  35. package/blueprint/templates/codebase/integrations.md +280 -0
  36. package/blueprint/templates/codebase/stack.md +186 -0
  37. package/blueprint/templates/codebase/structure.md +285 -0
  38. package/blueprint/templates/codebase/testing.md +480 -0
  39. package/blueprint/templates/config.json +35 -0
  40. package/blueprint/templates/context.md +283 -0
  41. package/blueprint/templates/continue-here.md +78 -0
  42. package/blueprint/templates/debug-subagent-prompt.md +91 -0
  43. package/blueprint/templates/discovery.md +146 -0
  44. package/blueprint/templates/milestone-archive.md +123 -0
  45. package/blueprint/templates/milestone.md +115 -0
  46. package/blueprint/templates/phase-prompt.md +567 -0
  47. package/blueprint/templates/planner-subagent-prompt.md +117 -0
  48. package/blueprint/templates/project.md +184 -0
  49. package/blueprint/templates/requirements.md +231 -0
  50. package/blueprint/templates/research-project/ARCHITECTURE.md +204 -0
  51. package/blueprint/templates/research-project/FEATURES.md +147 -0
  52. package/blueprint/templates/research-project/PITFALLS.md +200 -0
  53. package/blueprint/templates/research-project/STACK.md +120 -0
  54. package/blueprint/templates/research-project/SUMMARY.md +170 -0
  55. package/blueprint/templates/research.md +552 -0
  56. package/blueprint/templates/roadmap.md +202 -0
  57. package/blueprint/templates/state.md +176 -0
  58. package/blueprint/templates/summary-complex.md +59 -0
  59. package/blueprint/templates/summary-minimal.md +41 -0
  60. package/blueprint/templates/summary-standard.md +48 -0
  61. package/blueprint/templates/summary.md +246 -0
  62. package/blueprint/templates/user-setup.md +311 -0
  63. package/blueprint/templates/verification-report.md +322 -0
  64. package/blueprint/workflows/add-phase.md +111 -0
  65. package/blueprint/workflows/add-todo.md +157 -0
  66. package/blueprint/workflows/audit-milestone.md +241 -0
  67. package/blueprint/workflows/check-todos.md +176 -0
  68. package/blueprint/workflows/complete-milestone.md +644 -0
  69. package/blueprint/workflows/diagnose-issues.md +219 -0
  70. package/blueprint/workflows/discovery-phase.md +289 -0
  71. package/blueprint/workflows/discuss-phase.md +408 -0
  72. package/blueprint/workflows/execute-phase.md +338 -0
  73. package/blueprint/workflows/execute-plan.md +437 -0
  74. package/blueprint/workflows/help.md +470 -0
  75. package/blueprint/workflows/insert-phase.md +129 -0
  76. package/blueprint/workflows/list-phase-assumptions.md +178 -0
  77. package/blueprint/workflows/map-codebase.md +327 -0
  78. package/blueprint/workflows/new-milestone.md +373 -0
  79. package/blueprint/workflows/new-project.md +958 -0
  80. package/blueprint/workflows/pause-work.md +122 -0
  81. package/blueprint/workflows/plan-milestone-gaps.md +256 -0
  82. package/blueprint/workflows/plan-phase.md +376 -0
  83. package/blueprint/workflows/progress.md +385 -0
  84. package/blueprint/workflows/quick.md +230 -0
  85. package/blueprint/workflows/remove-phase.md +154 -0
  86. package/blueprint/workflows/research-phase.md +74 -0
  87. package/blueprint/workflows/resume-project.md +306 -0
  88. package/blueprint/workflows/set-profile.md +80 -0
  89. package/blueprint/workflows/settings.md +145 -0
  90. package/blueprint/workflows/transition.md +493 -0
  91. package/blueprint/workflows/update.md +212 -0
  92. package/blueprint/workflows/verify-phase.md +226 -0
  93. package/blueprint/workflows/verify-work.md +570 -0
  94. package/commands/bp/add-phase.md +39 -0
  95. package/commands/bp/add-todo.md +42 -0
  96. package/commands/bp/audit-milestone.md +42 -0
  97. package/commands/bp/check-todos.md +41 -0
  98. package/commands/bp/complete-milestone.md +136 -0
  99. package/commands/bp/debug.md +162 -0
  100. package/commands/bp/discuss-phase.md +86 -0
  101. package/commands/bp/execute-phase.md +42 -0
  102. package/commands/bp/help.md +22 -0
  103. package/commands/bp/insert-phase.md +33 -0
  104. package/commands/bp/join-discord.md +18 -0
  105. package/commands/bp/list-phase-assumptions.md +50 -0
  106. package/commands/bp/map-codebase.md +71 -0
  107. package/commands/bp/new-milestone.md +51 -0
  108. package/commands/bp/new-project.md +42 -0
  109. package/commands/bp/pause-work.md +35 -0
  110. package/commands/bp/plan-milestone-gaps.md +40 -0
  111. package/commands/bp/plan-phase.md +44 -0
  112. package/commands/bp/progress.md +24 -0
  113. package/commands/bp/quick.md +38 -0
  114. package/commands/bp/reapply-patches.md +110 -0
  115. package/commands/bp/remove-phase.md +32 -0
  116. package/commands/bp/research-phase.md +187 -0
  117. package/commands/bp/resume-work.md +40 -0
  118. package/commands/bp/set-profile.md +34 -0
  119. package/commands/bp/settings.md +36 -0
  120. package/commands/bp/update.md +37 -0
  121. package/commands/bp/verify-work.md +39 -0
  122. package/hooks/dist/bp-check-update.js +62 -0
  123. package/hooks/dist/bp-statusline.js +91 -0
  124. package/package.json +48 -0
  125. package/scripts/build-hooks.js +42 -0
@@ -0,0 +1,470 @@
1
+ <purpose>
2
+ Display the complete Blueprint command reference. Output ONLY the reference content. Do NOT add project-specific analysis, git status, next-step suggestions, or any commentary beyond the reference.
3
+ </purpose>
4
+
5
+ <reference>
6
+ # Blueprint Command Reference
7
+
8
+ **Blueprint** (Blueprint) creates hierarchical project plans optimized for solo agentic development with Claude Code.
9
+
10
+ ## Quick Start
11
+
12
+ 1. `/bp:new-project` - Initialize project (includes research, requirements, roadmap)
13
+ 2. `/bp:plan-phase 1` - Create detailed plan for first phase
14
+ 3. `/bp:execute-phase 1` - Execute the phase
15
+
16
+ ## Staying Updated
17
+
18
+ Blueprint evolves fast. Update periodically:
19
+
20
+ ```bash
21
+ npx @lipter7/blueprint@latest
22
+ ```
23
+
24
+ ## Core Workflow
25
+
26
+ ```
27
+ /bp:new-project → /bp:plan-phase → /bp:execute-phase → repeat
28
+ ```
29
+
30
+ ### Project Initialization
31
+
32
+ **`/bp:new-project`**
33
+ Initialize new project through unified flow.
34
+
35
+ One command takes you from idea to ready-for-planning:
36
+ - Deep questioning to understand what you're building
37
+ - Optional domain research (spawns 4 parallel researcher agents)
38
+ - Requirements definition with v1/v2/out-of-scope scoping
39
+ - Roadmap creation with phase breakdown and success criteria
40
+
41
+ Creates all `.blueprint/` artifacts:
42
+ - `PROJECT.md` — vision and requirements
43
+ - `config.json` — workflow mode (interactive/yolo)
44
+ - `research/` — domain research (if selected)
45
+ - `REQUIREMENTS.md` — scoped requirements with REQ-IDs
46
+ - `ROADMAP.md` — phases mapped to requirements
47
+ - `STATE.md` — project memory
48
+
49
+ Usage: `/bp:new-project`
50
+
51
+ **`/bp:map-codebase`**
52
+ Map an existing codebase for brownfield projects.
53
+
54
+ - Analyzes codebase with parallel Explore agents
55
+ - Creates `.blueprint/codebase/` with 7 focused documents
56
+ - Covers stack, architecture, structure, conventions, testing, integrations, concerns
57
+ - Use before `/bp:new-project` on existing codebases
58
+
59
+ Usage: `/bp:map-codebase`
60
+
61
+ ### Phase Planning
62
+
63
+ **`/bp:discuss-phase <number>`**
64
+ Help articulate your vision for a phase before planning.
65
+
66
+ - Captures how you imagine this phase working
67
+ - Creates CONTEXT.md with your vision, essentials, and boundaries
68
+ - Use when you have ideas about how something should look/feel
69
+
70
+ Usage: `/bp:discuss-phase 2`
71
+
72
+ **`/bp:research-phase <number>`**
73
+ Comprehensive ecosystem research for niche/complex domains.
74
+
75
+ - Discovers standard stack, architecture patterns, pitfalls
76
+ - Creates RESEARCH.md with "how experts build this" knowledge
77
+ - Use for 3D, games, audio, shaders, ML, and other specialized domains
78
+ - Goes beyond "which library" to ecosystem knowledge
79
+
80
+ Usage: `/bp:research-phase 3`
81
+
82
+ **`/bp:list-phase-assumptions <number>`**
83
+ See what Claude is planning to do before it starts.
84
+
85
+ - Shows Claude's intended approach for a phase
86
+ - Lets you course-correct if Claude misunderstood your vision
87
+ - No files created - conversational output only
88
+
89
+ Usage: `/bp:list-phase-assumptions 3`
90
+
91
+ **`/bp:plan-phase <number>`**
92
+ Create detailed execution plan for a specific phase.
93
+
94
+ - Generates `.blueprint/phases/XX-phase-name/XX-YY-PLAN.md`
95
+ - Breaks phase into concrete, actionable tasks
96
+ - Includes verification criteria and success measures
97
+ - Multiple plans per phase supported (XX-01, XX-02, etc.)
98
+
99
+ Usage: `/bp:plan-phase 1`
100
+ Result: Creates `.blueprint/phases/01-foundation/01-01-PLAN.md`
101
+
102
+ ### Execution
103
+
104
+ **`/bp:execute-phase <phase-number>`**
105
+ Execute all plans in a phase.
106
+
107
+ - Groups plans by wave (from frontmatter), executes waves sequentially
108
+ - Plans within each wave run in parallel via Task tool
109
+ - Verifies phase goal after all plans complete
110
+ - Updates REQUIREMENTS.md, ROADMAP.md, STATE.md
111
+
112
+ Usage: `/bp:execute-phase 5`
113
+
114
+ ### Quick Mode
115
+
116
+ **`/bp:quick`**
117
+ Execute small, ad-hoc tasks with Blueprint guarantees but skip optional agents.
118
+
119
+ Quick mode uses the same system with a shorter path:
120
+ - Spawns planner + executor (skips researcher, checker, verifier)
121
+ - Quick tasks live in `.blueprint/quick/` separate from planned phases
122
+ - Updates STATE.md tracking (not ROADMAP.md)
123
+
124
+ Use when you know exactly what to do and the task is small enough to not need research or verification.
125
+
126
+ Usage: `/bp:quick`
127
+ Result: Creates `.blueprint/quick/NNN-slug/PLAN.md`, `.blueprint/quick/NNN-slug/SUMMARY.md`
128
+
129
+ ### Roadmap Management
130
+
131
+ **`/bp:add-phase <description>`**
132
+ Add new phase to end of current milestone.
133
+
134
+ - Appends to ROADMAP.md
135
+ - Uses next sequential number
136
+ - Updates phase directory structure
137
+
138
+ Usage: `/bp:add-phase "Add admin dashboard"`
139
+
140
+ **`/bp:insert-phase <after> <description>`**
141
+ Insert urgent work as decimal phase between existing phases.
142
+
143
+ - Creates intermediate phase (e.g., 7.1 between 7 and 8)
144
+ - Useful for discovered work that must happen mid-milestone
145
+ - Maintains phase ordering
146
+
147
+ Usage: `/bp:insert-phase 7 "Fix critical auth bug"`
148
+ Result: Creates Phase 7.1
149
+
150
+ **`/bp:remove-phase <number>`**
151
+ Remove a future phase and renumber subsequent phases.
152
+
153
+ - Deletes phase directory and all references
154
+ - Renumbers all subsequent phases to close the gap
155
+ - Only works on future (unstarted) phases
156
+ - Git commit preserves historical record
157
+
158
+ Usage: `/bp:remove-phase 17`
159
+ Result: Phase 17 deleted, phases 18-20 become 17-19
160
+
161
+ ### Milestone Management
162
+
163
+ **`/bp:new-milestone <name>`**
164
+ Start a new milestone through unified flow.
165
+
166
+ - Deep questioning to understand what you're building next
167
+ - Optional domain research (spawns 4 parallel researcher agents)
168
+ - Requirements definition with scoping
169
+ - Roadmap creation with phase breakdown
170
+
171
+ Mirrors `/bp:new-project` flow for brownfield projects (existing PROJECT.md).
172
+
173
+ Usage: `/bp:new-milestone "v2.0 Features"`
174
+
175
+ **`/bp:complete-milestone <version>`**
176
+ Archive completed milestone and prepare for next version.
177
+
178
+ - Creates MILESTONES.md entry with stats
179
+ - Archives full details to milestones/ directory
180
+ - Creates git tag for the release
181
+ - Prepares workspace for next version
182
+
183
+ Usage: `/bp:complete-milestone 1.0.0`
184
+
185
+ ### Progress Tracking
186
+
187
+ **`/bp:progress`**
188
+ Check project status and intelligently route to next action.
189
+
190
+ - Shows visual progress bar and completion percentage
191
+ - Summarizes recent work from SUMMARY files
192
+ - Displays current position and what's next
193
+ - Lists key decisions and open issues
194
+ - Offers to execute next plan or create it if missing
195
+ - Detects 100% milestone completion
196
+
197
+ Usage: `/bp:progress`
198
+
199
+ ### Session Management
200
+
201
+ **`/bp:resume-work`**
202
+ Resume work from previous session with full context restoration.
203
+
204
+ - Reads STATE.md for project context
205
+ - Shows current position and recent progress
206
+ - Offers next actions based on project state
207
+
208
+ Usage: `/bp:resume-work`
209
+
210
+ **`/bp:pause-work`**
211
+ Create context handoff when pausing work mid-phase.
212
+
213
+ - Creates .continue-here file with current state
214
+ - Updates STATE.md session continuity section
215
+ - Captures in-progress work context
216
+
217
+ Usage: `/bp:pause-work`
218
+
219
+ ### Debugging
220
+
221
+ **`/bp:debug [issue description]`**
222
+ Systematic debugging with persistent state across context resets.
223
+
224
+ - Gathers symptoms through adaptive questioning
225
+ - Creates `.blueprint/debug/[slug].md` to track investigation
226
+ - Investigates using scientific method (evidence → hypothesis → test)
227
+ - Survives `/clear` — run `/bp:debug` with no args to resume
228
+ - Archives resolved issues to `.blueprint/debug/resolved/`
229
+
230
+ Usage: `/bp:debug "login button doesn't work"`
231
+ Usage: `/bp:debug` (resume active session)
232
+
233
+ ### Todo Management
234
+
235
+ **`/bp:add-todo [description]`**
236
+ Capture idea or task as todo from current conversation.
237
+
238
+ - Extracts context from conversation (or uses provided description)
239
+ - Creates structured todo file in `.blueprint/todos/pending/`
240
+ - Infers area from file paths for grouping
241
+ - Checks for duplicates before creating
242
+ - Updates STATE.md todo count
243
+
244
+ Usage: `/bp:add-todo` (infers from conversation)
245
+ Usage: `/bp:add-todo Add auth token refresh`
246
+
247
+ **`/bp:check-todos [area]`**
248
+ List pending todos and select one to work on.
249
+
250
+ - Lists all pending todos with title, area, age
251
+ - Optional area filter (e.g., `/bp:check-todos api`)
252
+ - Loads full context for selected todo
253
+ - Routes to appropriate action (work now, add to phase, brainstorm)
254
+ - Moves todo to done/ when work begins
255
+
256
+ Usage: `/bp:check-todos`
257
+ Usage: `/bp:check-todos api`
258
+
259
+ ### User Acceptance Testing
260
+
261
+ **`/bp:verify-work [phase]`**
262
+ Validate built features through conversational UAT.
263
+
264
+ - Extracts testable deliverables from SUMMARY.md files
265
+ - Presents tests one at a time (yes/no responses)
266
+ - Automatically diagnoses failures and creates fix plans
267
+ - Ready for re-execution if issues found
268
+
269
+ Usage: `/bp:verify-work 3`
270
+
271
+ ### Milestone Auditing
272
+
273
+ **`/bp:audit-milestone [version]`**
274
+ Audit milestone completion against original intent.
275
+
276
+ - Reads all phase VERIFICATION.md files
277
+ - Checks requirements coverage
278
+ - Spawns integration checker for cross-phase wiring
279
+ - Creates MILESTONE-AUDIT.md with gaps and tech debt
280
+
281
+ Usage: `/bp:audit-milestone`
282
+
283
+ **`/bp:plan-milestone-gaps`**
284
+ Create phases to close gaps identified by audit.
285
+
286
+ - Reads MILESTONE-AUDIT.md and groups gaps into phases
287
+ - Prioritizes by requirement priority (must/should/nice)
288
+ - Adds gap closure phases to ROADMAP.md
289
+ - Ready for `/bp:plan-phase` on new phases
290
+
291
+ Usage: `/bp:plan-milestone-gaps`
292
+
293
+ ### Configuration
294
+
295
+ **`/bp:settings`**
296
+ Configure workflow toggles and model profile interactively.
297
+
298
+ - Toggle researcher, plan checker, verifier agents
299
+ - Select model profile (quality/balanced/budget)
300
+ - Updates `.blueprint/config.json`
301
+
302
+ Usage: `/bp:settings`
303
+
304
+ **`/bp:set-profile <profile>`**
305
+ Quick switch model profile for Blueprint agents.
306
+
307
+ - `quality` — Opus everywhere except verification
308
+ - `balanced` — Opus for planning, Sonnet for execution (default)
309
+ - `budget` — Sonnet for writing, Haiku for research/verification
310
+
311
+ Usage: `/bp:set-profile budget`
312
+
313
+ ### Utility Commands
314
+
315
+ **`/bp:help`**
316
+ Show this command reference.
317
+
318
+ **`/bp:update`**
319
+ Update Blueprint to latest version with changelog preview.
320
+
321
+ - Shows installed vs latest version comparison
322
+ - Displays changelog entries for versions you've missed
323
+ - Highlights breaking changes
324
+ - Confirms before running install
325
+ - Better than raw `npx @lipter7/blueprint`
326
+
327
+ Usage: `/bp:update`
328
+
329
+ **`/bp:join-discord`**
330
+ Join the Blueprint Discord community.
331
+
332
+ - Get help, share what you're building, stay updated
333
+ - Connect with other Blueprint users
334
+
335
+ Usage: `/bp:join-discord`
336
+
337
+ ## Files & Structure
338
+
339
+ ```
340
+ .blueprint/
341
+ ├── PROJECT.md # Project vision
342
+ ├── ROADMAP.md # Current phase breakdown
343
+ ├── STATE.md # Project memory & context
344
+ ├── config.json # Workflow mode & gates
345
+ ├── todos/ # Captured ideas and tasks
346
+ │ ├── pending/ # Todos waiting to be worked on
347
+ │ └── done/ # Completed todos
348
+ ├── debug/ # Active debug sessions
349
+ │ └── resolved/ # Archived resolved issues
350
+ ├── codebase/ # Codebase map (brownfield projects)
351
+ │ ├── STACK.md # Languages, frameworks, dependencies
352
+ │ ├── ARCHITECTURE.md # Patterns, layers, data flow
353
+ │ ├── STRUCTURE.md # Directory layout, key files
354
+ │ ├── CONVENTIONS.md # Coding standards, naming
355
+ │ ├── TESTING.md # Test setup, patterns
356
+ │ ├── INTEGRATIONS.md # External services, APIs
357
+ │ └── CONCERNS.md # Tech debt, known issues
358
+ └── phases/
359
+ ├── 01-foundation/
360
+ │ ├── 01-01-PLAN.md
361
+ │ └── 01-01-SUMMARY.md
362
+ └── 02-core-features/
363
+ ├── 02-01-PLAN.md
364
+ └── 02-01-SUMMARY.md
365
+ ```
366
+
367
+ ## Workflow Modes
368
+
369
+ Set during `/bp:new-project`:
370
+
371
+ **Interactive Mode**
372
+
373
+ - Confirms each major decision
374
+ - Pauses at checkpoints for approval
375
+ - More guidance throughout
376
+
377
+ **YOLO Mode**
378
+
379
+ - Auto-approves most decisions
380
+ - Executes plans without confirmation
381
+ - Only stops for critical checkpoints
382
+
383
+ Change anytime by editing `.blueprint/config.json`
384
+
385
+ ## Planning Configuration
386
+
387
+ Configure how planning artifacts are managed in `.blueprint/config.json`:
388
+
389
+ **`planning.commit_docs`** (default: `true`)
390
+ - `true`: Planning artifacts committed to git (standard workflow)
391
+ - `false`: Planning artifacts kept local-only, not committed
392
+
393
+ When `commit_docs: false`:
394
+ - Add `.blueprint/` to your `.gitignore`
395
+ - Useful for OSS contributions, client projects, or keeping planning private
396
+ - All planning files still work normally, just not tracked in git
397
+
398
+ **`planning.search_gitignored`** (default: `false`)
399
+ - `true`: Add `--no-ignore` to broad ripgrep searches
400
+ - Only needed when `.blueprint/` is gitignored and you want project-wide searches to include it
401
+
402
+ Example config:
403
+ ```json
404
+ {
405
+ "planning": {
406
+ "commit_docs": false,
407
+ "search_gitignored": true
408
+ }
409
+ }
410
+ ```
411
+
412
+ ## Common Workflows
413
+
414
+ **Starting a new project:**
415
+
416
+ ```
417
+ /bp:new-project # Unified flow: questioning → research → requirements → roadmap
418
+ /clear
419
+ /bp:plan-phase 1 # Create plans for first phase
420
+ /clear
421
+ /bp:execute-phase 1 # Execute all plans in phase
422
+ ```
423
+
424
+ **Resuming work after a break:**
425
+
426
+ ```
427
+ /bp:progress # See where you left off and continue
428
+ ```
429
+
430
+ **Adding urgent mid-milestone work:**
431
+
432
+ ```
433
+ /bp:insert-phase 5 "Critical security fix"
434
+ /bp:plan-phase 5.1
435
+ /bp:execute-phase 5.1
436
+ ```
437
+
438
+ **Completing a milestone:**
439
+
440
+ ```
441
+ /bp:complete-milestone 1.0.0
442
+ /clear
443
+ /bp:new-milestone # Start next milestone (questioning → research → requirements → roadmap)
444
+ ```
445
+
446
+ **Capturing ideas during work:**
447
+
448
+ ```
449
+ /bp:add-todo # Capture from conversation context
450
+ /bp:add-todo Fix modal z-index # Capture with explicit description
451
+ /bp:check-todos # Review and work on todos
452
+ /bp:check-todos api # Filter by area
453
+ ```
454
+
455
+ **Debugging an issue:**
456
+
457
+ ```
458
+ /bp:debug "form submission fails silently" # Start debug session
459
+ # ... investigation happens, context fills up ...
460
+ /clear
461
+ /bp:debug # Resume from where you left off
462
+ ```
463
+
464
+ ## Getting Help
465
+
466
+ - Read `.blueprint/PROJECT.md` for project vision
467
+ - Read `.blueprint/STATE.md` for current context
468
+ - Check `.blueprint/ROADMAP.md` for phase status
469
+ - Run `/bp:progress` to check where you're up to
470
+ </reference>
@@ -0,0 +1,129 @@
1
+ <purpose>
2
+ Insert a decimal phase for urgent work discovered mid-milestone between existing integer phases. Uses decimal numbering (72.1, 72.2, etc.) to preserve the logical sequence of planned phases while accommodating urgent insertions without renumbering the entire roadmap.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="parse_arguments">
12
+ Parse the command arguments:
13
+ - First argument: integer phase number to insert after
14
+ - Remaining arguments: phase description
15
+
16
+ Example: `/bp:insert-phase 72 Fix critical auth bug`
17
+ -> after = 72
18
+ -> description = "Fix critical auth bug"
19
+
20
+ If arguments missing:
21
+
22
+ ```
23
+ ERROR: Both phase number and description required
24
+ Usage: /bp:insert-phase <after> <description>
25
+ Example: /bp:insert-phase 72 Fix critical auth bug
26
+ ```
27
+
28
+ Exit.
29
+
30
+ Validate first argument is an integer.
31
+ </step>
32
+
33
+ <step name="init_context">
34
+ Load phase operation context:
35
+
36
+ ```bash
37
+ INIT=$(node ~/.claude/blueprint/bin/blueprint-tools.js init phase-op "${after_phase}")
38
+ ```
39
+
40
+ Check `roadmap_exists` from init JSON. If false:
41
+ ```
42
+ ERROR: No roadmap found (.blueprint/ROADMAP.md)
43
+ ```
44
+ Exit.
45
+ </step>
46
+
47
+ <step name="insert_phase">
48
+ **Delegate the phase insertion to blueprint-tools:**
49
+
50
+ ```bash
51
+ RESULT=$(node ~/.claude/blueprint/bin/blueprint-tools.js phase insert "${after_phase}" "${description}")
52
+ ```
53
+
54
+ The CLI handles:
55
+ - Verifying target phase exists in ROADMAP.md
56
+ - Calculating next decimal phase number (checking existing decimals on disk)
57
+ - Generating slug from description
58
+ - Creating the phase directory (`.blueprint/phases/{N.M}-{slug}/`)
59
+ - Inserting the phase entry into ROADMAP.md after the target phase with (INSERTED) marker
60
+
61
+ Extract from result: `phase_number`, `after_phase`, `name`, `slug`, `directory`.
62
+ </step>
63
+
64
+ <step name="update_project_state">
65
+ Update STATE.md to reflect the inserted phase:
66
+
67
+ 1. Read `.blueprint/STATE.md`
68
+ 2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
69
+ ```
70
+ - Phase {decimal_phase} inserted after Phase {after_phase}: {description} (URGENT)
71
+ ```
72
+
73
+ If "Roadmap Evolution" section doesn't exist, create it.
74
+ </step>
75
+
76
+ <step name="completion">
77
+ Present completion summary:
78
+
79
+ ```
80
+ Phase {decimal_phase} inserted after Phase {after_phase}:
81
+ - Description: {description}
82
+ - Directory: .blueprint/phases/{decimal-phase}-{slug}/
83
+ - Status: Not planned yet
84
+ - Marker: (INSERTED) - indicates urgent work
85
+
86
+ Roadmap updated: .blueprint/ROADMAP.md
87
+ Project state updated: .blueprint/STATE.md
88
+
89
+ ---
90
+
91
+ ## Next Up
92
+
93
+ **Phase {decimal_phase}: {description}** -- urgent insertion
94
+
95
+ `/bp:plan-phase {decimal_phase}`
96
+
97
+ <sub>`/clear` first -> fresh context window</sub>
98
+
99
+ ---
100
+
101
+ **Also available:**
102
+ - Review insertion impact: Check if Phase {next_integer} dependencies still make sense
103
+ - Review roadmap
104
+
105
+ ---
106
+ ```
107
+ </step>
108
+
109
+ </process>
110
+
111
+ <anti_patterns>
112
+
113
+ - Don't use this for planned work at end of milestone (use /bp:add-phase)
114
+ - Don't insert before Phase 1 (decimal 0.1 makes no sense)
115
+ - Don't renumber existing phases
116
+ - Don't modify the target phase content
117
+ - Don't create plans yet (that's /bp:plan-phase)
118
+ - Don't commit changes (user decides when to commit)
119
+ </anti_patterns>
120
+
121
+ <success_criteria>
122
+ Phase insertion is complete when:
123
+
124
+ - [ ] `blueprint-tools phase insert` executed successfully
125
+ - [ ] Phase directory created
126
+ - [ ] Roadmap updated with new phase entry (includes "(INSERTED)" marker)
127
+ - [ ] STATE.md updated with roadmap evolution note
128
+ - [ ] User informed of next steps and dependency implications
129
+ </success_criteria>