@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,241 @@
1
+ <purpose>
2
+ Verify milestone achieved its definition of done by aggregating phase verifications, checking cross-phase integration, and assessing requirements coverage. Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
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
+ ## 0. Initialize Milestone Context
12
+
13
+ ```bash
14
+ INIT=$(node ~/.claude/blueprint/bin/blueprint-tools.js init milestone-op)
15
+ ```
16
+
17
+ Extract from init JSON: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `commit_docs`.
18
+
19
+ Resolve integration checker model:
20
+ ```bash
21
+ CHECKER_MODEL=$(node ~/.claude/blueprint/bin/blueprint-tools.js resolve-model bp-integration-checker --raw)
22
+ ```
23
+
24
+ ## 1. Determine Milestone Scope
25
+
26
+ ```bash
27
+ # Get phases in milestone (sorted numerically, handles decimals)
28
+ node ~/.claude/blueprint/bin/blueprint-tools.js phases list
29
+ ```
30
+
31
+ - Parse version from arguments or detect current from ROADMAP.md
32
+ - Identify all phase directories in scope
33
+ - Extract milestone definition of done from ROADMAP.md
34
+ - Extract requirements mapped to this milestone from REQUIREMENTS.md
35
+
36
+ ## 2. Read All Phase Verifications
37
+
38
+ For each phase directory, read the VERIFICATION.md:
39
+
40
+ ```bash
41
+ cat .blueprint/phases/01-*/*-VERIFICATION.md
42
+ cat .blueprint/phases/02-*/*-VERIFICATION.md
43
+ # etc.
44
+ ```
45
+
46
+ From each VERIFICATION.md, extract:
47
+ - **Status:** passed | gaps_found
48
+ - **Critical gaps:** (if any — these are blockers)
49
+ - **Non-critical gaps:** tech debt, deferred items, warnings
50
+ - **Anti-patterns found:** TODOs, stubs, placeholders
51
+ - **Requirements coverage:** which requirements satisfied/blocked
52
+
53
+ If a phase is missing VERIFICATION.md, flag it as "unverified phase" — this is a blocker.
54
+
55
+ ## 3. Spawn Integration Checker
56
+
57
+ With phase context collected:
58
+
59
+ ```
60
+ Task(
61
+ prompt="Check cross-phase integration and E2E flows.
62
+
63
+ Phases: {phase_dirs}
64
+ Phase exports: {from SUMMARYs}
65
+ API routes: {routes created}
66
+
67
+ Verify cross-phase wiring and E2E user flows.",
68
+ subagent_type="bp-integration-checker",
69
+ model="{integration_checker_model}"
70
+ )
71
+ ```
72
+
73
+ ## 4. Collect Results
74
+
75
+ Combine:
76
+ - Phase-level gaps and tech debt (from step 2)
77
+ - Integration checker's report (wiring gaps, broken flows)
78
+
79
+ ## 5. Check Requirements Coverage
80
+
81
+ For each requirement in REQUIREMENTS.md mapped to this milestone:
82
+ - Find owning phase
83
+ - Check phase verification status
84
+ - Determine: satisfied | partial | unsatisfied
85
+
86
+ ## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
87
+
88
+ Create `.blueprint/v{version}-v{version}-MILESTONE-AUDIT.md` with:
89
+
90
+ ```yaml
91
+ ---
92
+ milestone: {version}
93
+ audited: {timestamp}
94
+ status: passed | gaps_found | tech_debt
95
+ scores:
96
+ requirements: N/M
97
+ phases: N/M
98
+ integration: N/M
99
+ flows: N/M
100
+ gaps: # Critical blockers
101
+ requirements: [...]
102
+ integration: [...]
103
+ flows: [...]
104
+ tech_debt: # Non-critical, deferred
105
+ - phase: 01-auth
106
+ items:
107
+ - "TODO: add rate limiting"
108
+ - "Warning: no password strength validation"
109
+ - phase: 03-dashboard
110
+ items:
111
+ - "Deferred: mobile responsive layout"
112
+ ---
113
+ ```
114
+
115
+ Plus full markdown report with tables for requirements, phases, integration, tech debt.
116
+
117
+ **Status values:**
118
+ - `passed` — all requirements met, no critical gaps, minimal tech debt
119
+ - `gaps_found` — critical blockers exist
120
+ - `tech_debt` — no blockers but accumulated deferred items need review
121
+
122
+ ## 7. Present Results
123
+
124
+ Route by status (see `<offer_next>`).
125
+
126
+ </process>
127
+
128
+ <offer_next>
129
+ Output this markdown directly (not as a code block). Route based on status:
130
+
131
+ ---
132
+
133
+ **If passed:**
134
+
135
+ ## ✓ Milestone {version} — Audit Passed
136
+
137
+ **Score:** {N}/{M} requirements satisfied
138
+ **Report:** .blueprint/v{version}-MILESTONE-AUDIT.md
139
+
140
+ All requirements covered. Cross-phase integration verified. E2E flows complete.
141
+
142
+ ───────────────────────────────────────────────────────────────
143
+
144
+ ## ▶ Next Up
145
+
146
+ **Complete milestone** — archive and tag
147
+
148
+ /bp:complete-milestone {version}
149
+
150
+ <sub>/clear first → fresh context window</sub>
151
+
152
+ ───────────────────────────────────────────────────────────────
153
+
154
+ ---
155
+
156
+ **If gaps_found:**
157
+
158
+ ## ⚠ Milestone {version} — Gaps Found
159
+
160
+ **Score:** {N}/{M} requirements satisfied
161
+ **Report:** .blueprint/v{version}-MILESTONE-AUDIT.md
162
+
163
+ ### Unsatisfied Requirements
164
+
165
+ {For each unsatisfied requirement:}
166
+ - **{REQ-ID}: {description}** (Phase {X})
167
+ - {reason}
168
+
169
+ ### Cross-Phase Issues
170
+
171
+ {For each integration gap:}
172
+ - **{from} → {to}:** {issue}
173
+
174
+ ### Broken Flows
175
+
176
+ {For each flow gap:}
177
+ - **{flow name}:** breaks at {step}
178
+
179
+ ───────────────────────────────────────────────────────────────
180
+
181
+ ## ▶ Next Up
182
+
183
+ **Plan gap closure** — create phases to complete milestone
184
+
185
+ /bp:plan-milestone-gaps
186
+
187
+ <sub>/clear first → fresh context window</sub>
188
+
189
+ ───────────────────────────────────────────────────────────────
190
+
191
+ **Also available:**
192
+ - cat .blueprint/v{version}-MILESTONE-AUDIT.md — see full report
193
+ - /bp:complete-milestone {version} — proceed anyway (accept tech debt)
194
+
195
+ ───────────────────────────────────────────────────────────────
196
+
197
+ ---
198
+
199
+ **If tech_debt (no blockers but accumulated debt):**
200
+
201
+ ## ⚡ Milestone {version} — Tech Debt Review
202
+
203
+ **Score:** {N}/{M} requirements satisfied
204
+ **Report:** .blueprint/v{version}-MILESTONE-AUDIT.md
205
+
206
+ All requirements met. No critical blockers. Accumulated tech debt needs review.
207
+
208
+ ### Tech Debt by Phase
209
+
210
+ {For each phase with debt:}
211
+ **Phase {X}: {name}**
212
+ - {item 1}
213
+ - {item 2}
214
+
215
+ ### Total: {N} items across {M} phases
216
+
217
+ ───────────────────────────────────────────────────────────────
218
+
219
+ ## ▶ Options
220
+
221
+ **A. Complete milestone** — accept debt, track in backlog
222
+
223
+ /bp:complete-milestone {version}
224
+
225
+ **B. Plan cleanup phase** — address debt before completing
226
+
227
+ /bp:plan-milestone-gaps
228
+
229
+ <sub>/clear first → fresh context window</sub>
230
+
231
+ ───────────────────────────────────────────────────────────────
232
+ </offer_next>
233
+
234
+ <success_criteria>
235
+ - [ ] Milestone scope identified
236
+ - [ ] All phase VERIFICATION.md files read
237
+ - [ ] Tech debt and deferred gaps aggregated
238
+ - [ ] Integration checker spawned for cross-phase wiring
239
+ - [ ] v{version}-MILESTONE-AUDIT.md created
240
+ - [ ] Results presented with actionable next steps
241
+ </success_criteria>
@@ -0,0 +1,176 @@
1
+ <purpose>
2
+ List all pending todos, allow selection, load full context for the selected todo, and route to appropriate action.
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="init_context">
12
+ Load todo context:
13
+
14
+ ```bash
15
+ INIT=$(node ~/.claude/blueprint/bin/blueprint-tools.js init todos)
16
+ ```
17
+
18
+ Extract from init JSON: `todo_count`, `todos`, `pending_dir`.
19
+
20
+ If `todo_count` is 0:
21
+ ```
22
+ No pending todos.
23
+
24
+ Todos are captured during work sessions with /bp:add-todo.
25
+
26
+ ---
27
+
28
+ Would you like to:
29
+
30
+ 1. Continue with current phase (/bp:progress)
31
+ 2. Add a todo now (/bp:add-todo)
32
+ ```
33
+
34
+ Exit.
35
+ </step>
36
+
37
+ <step name="parse_filter">
38
+ Check for area filter in arguments:
39
+ - `/bp:check-todos` → show all
40
+ - `/bp:check-todos api` → filter to area:api only
41
+ </step>
42
+
43
+ <step name="list_todos">
44
+ Use the `todos` array from init context (already filtered by area if specified).
45
+
46
+ Parse and display as numbered list:
47
+
48
+ ```
49
+ Pending Todos:
50
+
51
+ 1. Add auth token refresh (api, 2d ago)
52
+ 2. Fix modal z-index issue (ui, 1d ago)
53
+ 3. Refactor database connection pool (database, 5h ago)
54
+
55
+ ---
56
+
57
+ Reply with a number to view details, or:
58
+ - `/bp:check-todos [area]` to filter by area
59
+ - `q` to exit
60
+ ```
61
+
62
+ Format age as relative time from created timestamp.
63
+ </step>
64
+
65
+ <step name="handle_selection">
66
+ Wait for user to reply with a number.
67
+
68
+ If valid: load selected todo, proceed.
69
+ If invalid: "Invalid selection. Reply with a number (1-[N]) or `q` to exit."
70
+ </step>
71
+
72
+ <step name="load_context">
73
+ Read the todo file completely. Display:
74
+
75
+ ```
76
+ ## [title]
77
+
78
+ **Area:** [area]
79
+ **Created:** [date] ([relative time] ago)
80
+ **Files:** [list or "None"]
81
+
82
+ ### Problem
83
+ [problem section content]
84
+
85
+ ### Solution
86
+ [solution section content]
87
+ ```
88
+
89
+ If `files` field has entries, read and briefly summarize each.
90
+ </step>
91
+
92
+ <step name="check_roadmap">
93
+ Check for roadmap (can use init progress or directly check file existence):
94
+
95
+ If `.blueprint/ROADMAP.md` exists:
96
+ 1. Check if todo's area matches an upcoming phase
97
+ 2. Check if todo's files overlap with a phase's scope
98
+ 3. Note any match for action options
99
+ </step>
100
+
101
+ <step name="offer_actions">
102
+ **If todo maps to a roadmap phase:**
103
+
104
+ Use AskUserQuestion:
105
+ - header: "Action"
106
+ - question: "This todo relates to Phase [N]: [name]. What would you like to do?"
107
+ - options:
108
+ - "Work on it now" — move to done, start working
109
+ - "Add to phase plan" — include when planning Phase [N]
110
+ - "Brainstorm approach" — think through before deciding
111
+ - "Put it back" — return to list
112
+
113
+ **If no roadmap match:**
114
+
115
+ Use AskUserQuestion:
116
+ - header: "Action"
117
+ - question: "What would you like to do with this todo?"
118
+ - options:
119
+ - "Work on it now" — move to done, start working
120
+ - "Create a phase" — /bp:add-phase with this scope
121
+ - "Brainstorm approach" — think through before deciding
122
+ - "Put it back" — return to list
123
+ </step>
124
+
125
+ <step name="execute_action">
126
+ **Work on it now:**
127
+ ```bash
128
+ mv ".blueprint/todos/pending/[filename]" ".blueprint/todos/done/"
129
+ ```
130
+ Update STATE.md todo count. Present problem/solution context. Begin work or ask how to proceed.
131
+
132
+ **Add to phase plan:**
133
+ Note todo reference in phase planning notes. Keep in pending. Return to list or exit.
134
+
135
+ **Create a phase:**
136
+ Display: `/bp:add-phase [description from todo]`
137
+ Keep in pending. User runs command in fresh context.
138
+
139
+ **Brainstorm approach:**
140
+ Keep in pending. Start discussion about problem and approaches.
141
+
142
+ **Put it back:**
143
+ Return to list_todos step.
144
+ </step>
145
+
146
+ <step name="update_state">
147
+ After any action that changes todo count:
148
+
149
+ Re-run `init todos` to get updated count, then update STATE.md "### Pending Todos" section if exists.
150
+ </step>
151
+
152
+ <step name="git_commit">
153
+ If todo was moved to done/, commit the change:
154
+
155
+ ```bash
156
+ git rm --cached .blueprint/todos/pending/[filename] 2>/dev/null || true
157
+ node ~/.claude/blueprint/bin/blueprint-tools.js commit "docs: start work on todo - [title]" --files .blueprint/todos/done/[filename] .blueprint/STATE.md
158
+ ```
159
+
160
+ Tool respects `commit_docs` config and gitignore automatically.
161
+
162
+ Confirm: "Committed: docs: start work on todo - [title]"
163
+ </step>
164
+
165
+ </process>
166
+
167
+ <success_criteria>
168
+ - [ ] All pending todos listed with title, area, age
169
+ - [ ] Area filter applied if specified
170
+ - [ ] Selected todo's full context loaded
171
+ - [ ] Roadmap context checked for phase match
172
+ - [ ] Appropriate actions offered
173
+ - [ ] Selected action executed
174
+ - [ ] STATE.md updated if todo count changed
175
+ - [ ] Changes committed to git (if todo moved to done/)
176
+ </success_criteria>