@mobiman/vector 1.1.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 (225) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +117 -0
  3. package/agents/vector-codebase-mapper.md +770 -0
  4. package/agents/vector-debugger.md +1338 -0
  5. package/agents/vector-executor.md +487 -0
  6. package/agents/vector-integration-checker.md +443 -0
  7. package/agents/vector-nyquist-auditor.md +176 -0
  8. package/agents/vector-phase-researcher.md +553 -0
  9. package/agents/vector-plan-checker.md +706 -0
  10. package/agents/vector-planner.md +1307 -0
  11. package/agents/vector-project-researcher.md +629 -0
  12. package/agents/vector-research-synthesizer.md +247 -0
  13. package/agents/vector-roadmapper.md +650 -0
  14. package/agents/vector-ui-auditor.md +439 -0
  15. package/agents/vector-ui-checker.md +300 -0
  16. package/agents/vector-ui-researcher.md +353 -0
  17. package/agents/vector-verifier.md +579 -0
  18. package/bin/install.cjs +2907 -0
  19. package/bin/install.cjs.map +1 -0
  20. package/bin/install.cts +3103 -0
  21. package/bin/install.d.cts +3 -0
  22. package/bin/install.d.cts.map +1 -0
  23. package/commands/vector/add-phase.md +43 -0
  24. package/commands/vector/add-tests.md +41 -0
  25. package/commands/vector/add-todo.md +47 -0
  26. package/commands/vector/audit-milestone.md +36 -0
  27. package/commands/vector/autonomous.md +41 -0
  28. package/commands/vector/check-todos.md +45 -0
  29. package/commands/vector/cleanup.md +18 -0
  30. package/commands/vector/complete-milestone.md +136 -0
  31. package/commands/vector/debug.md +168 -0
  32. package/commands/vector/discuss-phase.md +90 -0
  33. package/commands/vector/do.md +30 -0
  34. package/commands/vector/execute-phase.md +41 -0
  35. package/commands/vector/health.md +22 -0
  36. package/commands/vector/help.md +22 -0
  37. package/commands/vector/insert-phase.md +32 -0
  38. package/commands/vector/join-discord.md +18 -0
  39. package/commands/vector/list-phase-assumptions.md +46 -0
  40. package/commands/vector/map-codebase.md +71 -0
  41. package/commands/vector/new-milestone.md +44 -0
  42. package/commands/vector/new-project.md +42 -0
  43. package/commands/vector/pause-work.md +38 -0
  44. package/commands/vector/plan-milestone-gaps.md +34 -0
  45. package/commands/vector/plan-phase.md +45 -0
  46. package/commands/vector/progress.md +24 -0
  47. package/commands/vector/quick.md +47 -0
  48. package/commands/vector/reapply-patches.md +123 -0
  49. package/commands/vector/remove-phase.md +31 -0
  50. package/commands/vector/research-phase.md +190 -0
  51. package/commands/vector/resume-work.md +40 -0
  52. package/commands/vector/set-profile.md +12 -0
  53. package/commands/vector/settings.md +36 -0
  54. package/commands/vector/stats.md +18 -0
  55. package/commands/vector/ui-phase.md +34 -0
  56. package/commands/vector/ui-review.md +32 -0
  57. package/commands/vector/update.md +37 -0
  58. package/commands/vector/validate-phase.md +35 -0
  59. package/commands/vector/verify-work.md +38 -0
  60. package/core/bin/lib/commands.cjs +641 -0
  61. package/core/bin/lib/commands.cjs.map +1 -0
  62. package/core/bin/lib/commands.cts +712 -0
  63. package/core/bin/lib/commands.d.cts +23 -0
  64. package/core/bin/lib/commands.d.cts.map +1 -0
  65. package/core/bin/lib/config.cjs +281 -0
  66. package/core/bin/lib/config.cjs.map +1 -0
  67. package/core/bin/lib/config.cts +301 -0
  68. package/core/bin/lib/config.d.cts +50 -0
  69. package/core/bin/lib/config.d.cts.map +1 -0
  70. package/core/bin/lib/core.cjs +483 -0
  71. package/core/bin/lib/core.cjs.map +1 -0
  72. package/core/bin/lib/core.cts +544 -0
  73. package/core/bin/lib/core.d.cts +96 -0
  74. package/core/bin/lib/core.d.cts.map +1 -0
  75. package/core/bin/lib/frontmatter.cjs +341 -0
  76. package/core/bin/lib/frontmatter.cjs.map +1 -0
  77. package/core/bin/lib/frontmatter.cts +295 -0
  78. package/core/bin/lib/frontmatter.d.cts +18 -0
  79. package/core/bin/lib/frontmatter.d.cts.map +1 -0
  80. package/core/bin/lib/init.cjs +674 -0
  81. package/core/bin/lib/init.cjs.map +1 -0
  82. package/core/bin/lib/init.cts +775 -0
  83. package/core/bin/lib/init.d.cts +16 -0
  84. package/core/bin/lib/init.d.cts.map +1 -0
  85. package/core/bin/lib/milestone.cjs +210 -0
  86. package/core/bin/lib/milestone.cjs.map +1 -0
  87. package/core/bin/lib/milestone.cts +241 -0
  88. package/core/bin/lib/milestone.d.cts +11 -0
  89. package/core/bin/lib/milestone.d.cts.map +1 -0
  90. package/core/bin/lib/model-profiles.cjs +62 -0
  91. package/core/bin/lib/model-profiles.cjs.map +1 -0
  92. package/core/bin/lib/model-profiles.cts +66 -0
  93. package/core/bin/lib/model-profiles.d.cts +33 -0
  94. package/core/bin/lib/model-profiles.d.cts.map +1 -0
  95. package/core/bin/lib/phase.cjs +713 -0
  96. package/core/bin/lib/phase.cjs.map +1 -0
  97. package/core/bin/lib/phase.cts +914 -0
  98. package/core/bin/lib/phase.d.cts +21 -0
  99. package/core/bin/lib/phase.d.cts.map +1 -0
  100. package/core/bin/lib/roadmap.cjs +246 -0
  101. package/core/bin/lib/roadmap.cjs.map +1 -0
  102. package/core/bin/lib/roadmap.cts +311 -0
  103. package/core/bin/lib/roadmap.d.cts +7 -0
  104. package/core/bin/lib/roadmap.d.cts.map +1 -0
  105. package/core/bin/lib/state.cjs +709 -0
  106. package/core/bin/lib/state.cjs.map +1 -0
  107. package/core/bin/lib/state.cts +718 -0
  108. package/core/bin/lib/state.d.cts +47 -0
  109. package/core/bin/lib/state.d.cts.map +1 -0
  110. package/core/bin/lib/template.cjs +220 -0
  111. package/core/bin/lib/template.cjs.map +1 -0
  112. package/core/bin/lib/template.cts +229 -0
  113. package/core/bin/lib/template.d.cts +15 -0
  114. package/core/bin/lib/template.d.cts.map +1 -0
  115. package/core/bin/lib/verify.cjs +824 -0
  116. package/core/bin/lib/verify.cjs.map +1 -0
  117. package/core/bin/lib/verify.cts +829 -0
  118. package/core/bin/lib/verify.d.cts +17 -0
  119. package/core/bin/lib/verify.d.cts.map +1 -0
  120. package/core/bin/vector-tools.cjs +641 -0
  121. package/core/bin/vector-tools.cjs.map +1 -0
  122. package/core/bin/vector-tools.cts +603 -0
  123. package/core/bin/vector-tools.d.cts +128 -0
  124. package/core/bin/vector-tools.d.cts.map +1 -0
  125. package/core/references/checkpoints.md +776 -0
  126. package/core/references/continuation-format.md +249 -0
  127. package/core/references/decimal-phase-calculation.md +65 -0
  128. package/core/references/git-integration.md +248 -0
  129. package/core/references/git-planning-commit.md +38 -0
  130. package/core/references/model-profile-resolution.md +36 -0
  131. package/core/references/model-profiles.md +101 -0
  132. package/core/references/phase-argument-parsing.md +61 -0
  133. package/core/references/planning-config.md +200 -0
  134. package/core/references/questioning.md +162 -0
  135. package/core/references/tdd.md +263 -0
  136. package/core/references/ui-brand.md +160 -0
  137. package/core/references/verification-patterns.md +612 -0
  138. package/core/templates/DEBUG.md +164 -0
  139. package/core/templates/UAT.md +247 -0
  140. package/core/templates/UI-SPEC.md +100 -0
  141. package/core/templates/VALIDATION.md +76 -0
  142. package/core/templates/codebase/architecture.md +255 -0
  143. package/core/templates/codebase/concerns.md +310 -0
  144. package/core/templates/codebase/conventions.md +307 -0
  145. package/core/templates/codebase/integrations.md +280 -0
  146. package/core/templates/codebase/stack.md +186 -0
  147. package/core/templates/codebase/structure.md +285 -0
  148. package/core/templates/codebase/testing.md +480 -0
  149. package/core/templates/config.json +37 -0
  150. package/core/templates/context.md +352 -0
  151. package/core/templates/continue-here.md +78 -0
  152. package/core/templates/copilot-instructions.md +7 -0
  153. package/core/templates/debug-subagent-prompt.md +91 -0
  154. package/core/templates/discovery.md +146 -0
  155. package/core/templates/milestone-archive.md +123 -0
  156. package/core/templates/milestone.md +115 -0
  157. package/core/templates/phase-prompt.md +610 -0
  158. package/core/templates/planner-subagent-prompt.md +117 -0
  159. package/core/templates/project.md +184 -0
  160. package/core/templates/requirements.md +231 -0
  161. package/core/templates/research-project/ARCHITECTURE.md +204 -0
  162. package/core/templates/research-project/FEATURES.md +147 -0
  163. package/core/templates/research-project/PITFALLS.md +200 -0
  164. package/core/templates/research-project/STACK.md +120 -0
  165. package/core/templates/research-project/SUMMARY.md +170 -0
  166. package/core/templates/research.md +552 -0
  167. package/core/templates/retrospective.md +54 -0
  168. package/core/templates/roadmap.md +202 -0
  169. package/core/templates/state.md +176 -0
  170. package/core/templates/summary-complex.md +59 -0
  171. package/core/templates/summary-minimal.md +41 -0
  172. package/core/templates/summary-standard.md +48 -0
  173. package/core/templates/summary.md +248 -0
  174. package/core/templates/user-setup.md +311 -0
  175. package/core/templates/verification-report.md +322 -0
  176. package/core/workflows/add-phase.md +112 -0
  177. package/core/workflows/add-tests.md +351 -0
  178. package/core/workflows/add-todo.md +158 -0
  179. package/core/workflows/audit-milestone.md +332 -0
  180. package/core/workflows/autonomous.md +743 -0
  181. package/core/workflows/check-todos.md +177 -0
  182. package/core/workflows/cleanup.md +152 -0
  183. package/core/workflows/complete-milestone.md +766 -0
  184. package/core/workflows/diagnose-issues.md +219 -0
  185. package/core/workflows/discovery-phase.md +289 -0
  186. package/core/workflows/discuss-phase.md +762 -0
  187. package/core/workflows/do.md +104 -0
  188. package/core/workflows/execute-phase.md +468 -0
  189. package/core/workflows/execute-plan.md +483 -0
  190. package/core/workflows/health.md +159 -0
  191. package/core/workflows/help.md +513 -0
  192. package/core/workflows/insert-phase.md +130 -0
  193. package/core/workflows/list-phase-assumptions.md +178 -0
  194. package/core/workflows/map-codebase.md +316 -0
  195. package/core/workflows/new-milestone.md +386 -0
  196. package/core/workflows/new-project.md +1113 -0
  197. package/core/workflows/node-repair.md +92 -0
  198. package/core/workflows/pause-work.md +122 -0
  199. package/core/workflows/plan-milestone-gaps.md +274 -0
  200. package/core/workflows/plan-phase.md +666 -0
  201. package/core/workflows/progress.md +382 -0
  202. package/core/workflows/quick.md +717 -0
  203. package/core/workflows/remove-phase.md +155 -0
  204. package/core/workflows/research-phase.md +74 -0
  205. package/core/workflows/resume-project.md +307 -0
  206. package/core/workflows/settings.md +243 -0
  207. package/core/workflows/stats.md +60 -0
  208. package/core/workflows/transition.md +544 -0
  209. package/core/workflows/ui-phase.md +290 -0
  210. package/core/workflows/ui-review.md +157 -0
  211. package/core/workflows/update.md +320 -0
  212. package/core/workflows/validate-phase.md +167 -0
  213. package/core/workflows/verify-phase.md +243 -0
  214. package/core/workflows/verify-work.md +584 -0
  215. package/package.json +55 -0
  216. package/scripts/build-hooks.cjs +38 -0
  217. package/scripts/build-hooks.cjs.map +1 -0
  218. package/scripts/build-hooks.cts +41 -0
  219. package/scripts/build-hooks.d.cts +6 -0
  220. package/scripts/build-hooks.d.cts.map +1 -0
  221. package/scripts/run-tests.cjs +28 -0
  222. package/scripts/run-tests.cjs.map +1 -0
  223. package/scripts/run-tests.cts +28 -0
  224. package/scripts/run-tests.d.cts +3 -0
  225. package/scripts/run-tests.d.cts.map +1 -0
@@ -0,0 +1,1113 @@
1
+ <purpose>
2
+ Initialize a new project through unified flow: questioning, research (optional), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
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
+ <auto_mode>
10
+ ## Auto Mode Detection
11
+
12
+ Check if `--auto` flag is present in $ARGUMENTS.
13
+
14
+ **If auto mode:**
15
+ - Skip brownfield mapping offer (assume greenfield)
16
+ - Skip deep questioning (extract context from provided document)
17
+ - Config: YOLO mode is implicit (skip that question), but ask granularity/git/agents FIRST (Step 2a)
18
+ - After config: run Steps 6-9 automatically with smart defaults:
19
+ - Research: Always yes
20
+ - Requirements: Include all table stakes + features from provided document
21
+ - Requirements approval: Auto-approve
22
+ - Roadmap approval: Auto-approve
23
+
24
+ **Document requirement:**
25
+ Auto mode requires an idea document — either:
26
+ - File reference: `/vector:new-project --auto @prd.md`
27
+ - Pasted/written text in the prompt
28
+
29
+ If no document content provided, error:
30
+
31
+ ```
32
+ Error: --auto requires an idea document.
33
+
34
+ Usage:
35
+ /vector:new-project --auto @your-idea.md
36
+ /vector:new-project --auto [paste or write your idea here]
37
+
38
+ The document should describe what you want to build.
39
+ ```
40
+ </auto_mode>
41
+
42
+ <process>
43
+
44
+ ## 1. Setup
45
+
46
+ **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
47
+
48
+ ```bash
49
+ INIT=$(node "$HOME/.claude/core/bin/vector-tools.cjs" init new-project)
50
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
51
+ ```
52
+
53
+ Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
54
+
55
+ **If `project_exists` is true:** Error — project already initialized. Use `/vector:progress`.
56
+
57
+ **If `has_git` is false:** Initialize git:
58
+ ```bash
59
+ git init
60
+ ```
61
+
62
+ ## 2. Brownfield Offer
63
+
64
+ **If auto mode:** Skip to Step 4 (assume greenfield, synthesize PROJECT.md from provided document).
65
+
66
+ **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
67
+
68
+ Use AskUserQuestion:
69
+ - header: "Codebase"
70
+ - question: "I detected existing code in this directory. Would you like to map the codebase first?"
71
+ - options:
72
+ - "Map codebase first" — Run /vector:map-codebase to understand existing architecture (Recommended)
73
+ - "Skip mapping" — Proceed with project initialization
74
+
75
+ **If "Map codebase first":**
76
+ ```
77
+ Run `/vector:map-codebase` first, then return to `/vector:new-project`
78
+ ```
79
+ Exit command.
80
+
81
+ **If "Skip mapping" OR `needs_codebase_map` is false:** Continue to Step 3.
82
+
83
+ ## 2a. Auto Mode Config (auto mode only)
84
+
85
+ **If auto mode:** Collect config settings upfront before processing the idea document.
86
+
87
+ YOLO mode is implicit (auto = YOLO). Ask remaining config questions:
88
+
89
+ **Round 1 — Core settings (3 questions, no Mode question):**
90
+
91
+ ```
92
+ AskUserQuestion([
93
+ {
94
+ header: "Granularity",
95
+ question: "How finely should scope be sliced into phases?",
96
+ multiSelect: false,
97
+ options: [
98
+ { label: "Coarse (Recommended)", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
99
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
100
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
101
+ ]
102
+ },
103
+ {
104
+ header: "Execution",
105
+ question: "Run plans in parallel?",
106
+ multiSelect: false,
107
+ options: [
108
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
109
+ { label: "Sequential", description: "One plan at a time" }
110
+ ]
111
+ },
112
+ {
113
+ header: "Git Tracking",
114
+ question: "Commit planning docs to git?",
115
+ multiSelect: false,
116
+ options: [
117
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
118
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
119
+ ]
120
+ }
121
+ ])
122
+ ```
123
+
124
+ **Round 2 — Workflow agents (same as Step 5):**
125
+
126
+ ```
127
+ AskUserQuestion([
128
+ {
129
+ header: "Research",
130
+ question: "Research before planning each phase? (adds tokens/time)",
131
+ multiSelect: false,
132
+ options: [
133
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
134
+ { label: "No", description: "Plan directly from requirements" }
135
+ ]
136
+ },
137
+ {
138
+ header: "Plan Check",
139
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
140
+ multiSelect: false,
141
+ options: [
142
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
143
+ { label: "No", description: "Execute plans without verification" }
144
+ ]
145
+ },
146
+ {
147
+ header: "Verifier",
148
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
149
+ multiSelect: false,
150
+ options: [
151
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
152
+ { label: "No", description: "Trust execution, skip verification" }
153
+ ]
154
+ },
155
+ {
156
+ header: "AI Models",
157
+ question: "Which AI models for planning agents?",
158
+ multiSelect: false,
159
+ options: [
160
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
161
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
162
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" },
163
+ { label: "Inherit", description: "Use the current session model for all agents (OpenCode /model)" }
164
+ ]
165
+ }
166
+ ])
167
+ ```
168
+
169
+ Create `.planning/config.json` with mode set to "yolo":
170
+
171
+ ```json
172
+ {
173
+ "mode": "yolo",
174
+ "granularity": "[selected]",
175
+ "parallelization": true|false,
176
+ "commit_docs": true|false,
177
+ "model_profile": "quality|balanced|budget|inherit",
178
+ "workflow": {
179
+ "research": true|false,
180
+ "plan_check": true|false,
181
+ "verifier": true|false,
182
+ "nyquist_validation": depth !== "quick",
183
+ "auto_advance": true
184
+ }
185
+ }
186
+ ```
187
+
188
+ **If commit_docs = No:** Add `.planning/` to `.gitignore`.
189
+
190
+ **Commit config.json:**
191
+
192
+ ```bash
193
+ mkdir -p .planning
194
+ node "$HOME/.claude/core/bin/vector-tools.cjs" commit "chore: add project config" --files .planning/config.json
195
+ ```
196
+
197
+ **Persist auto-advance chain flag to config (survives context compaction):**
198
+
199
+ ```bash
200
+ node "$HOME/.claude/core/bin/vector-tools.cjs" config-set workflow._auto_chain_active true
201
+ ```
202
+
203
+ Proceed to Step 4 (skip Steps 3 and 5).
204
+
205
+ ## 3. Deep Questioning
206
+
207
+ **If auto mode:** Skip (already handled in Step 2a). Extract project context from provided document instead and proceed to Step 4.
208
+
209
+ **Display stage banner:**
210
+
211
+ ```
212
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
213
+ Vector ► QUESTIONING
214
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
215
+ ```
216
+
217
+ **Open the conversation:**
218
+
219
+ Ask inline (freeform, NOT AskUserQuestion):
220
+
221
+ "What do you want to build?"
222
+
223
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
224
+
225
+ **Follow the thread:**
226
+
227
+ Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
228
+
229
+ Keep following threads. Each answer opens new threads to explore. Ask about:
230
+ - What excited them
231
+ - What problem sparked this
232
+ - What they mean by vague terms
233
+ - What it would actually look like
234
+ - What's already decided
235
+
236
+ Consult `questioning.md` for techniques:
237
+ - Challenge vagueness
238
+ - Make abstract concrete
239
+ - Surface assumptions
240
+ - Find edges
241
+ - Reveal motivation
242
+
243
+ **Check context (background, not out loud):**
244
+
245
+ As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
246
+
247
+ **Decision gate:**
248
+
249
+ When you could write a clear PROJECT.md, use AskUserQuestion:
250
+
251
+ - header: "Ready?"
252
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
253
+ - options:
254
+ - "Create PROJECT.md" — Let's move forward
255
+ - "Keep exploring" — I want to share more / ask me more
256
+
257
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
258
+
259
+ Loop until "Create PROJECT.md" selected.
260
+
261
+ ## 4. Write PROJECT.md
262
+
263
+ **If auto mode:** Synthesize from provided document. No "Ready?" gate was shown — proceed directly to commit.
264
+
265
+ Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
266
+
267
+ **For greenfield projects:**
268
+
269
+ Initialize requirements as hypotheses:
270
+
271
+ ```markdown
272
+ ## Requirements
273
+
274
+ ### Validated
275
+
276
+ (None yet — ship to validate)
277
+
278
+ ### Active
279
+
280
+ - [ ] [Requirement 1]
281
+ - [ ] [Requirement 2]
282
+ - [ ] [Requirement 3]
283
+
284
+ ### Out of Scope
285
+
286
+ - [Exclusion 1] — [why]
287
+ - [Exclusion 2] — [why]
288
+ ```
289
+
290
+ All Active requirements are hypotheses until shipped and validated.
291
+
292
+ **For brownfield projects (codebase map exists):**
293
+
294
+ Infer Validated requirements from existing code:
295
+
296
+ 1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
297
+ 2. Identify what the codebase already does
298
+ 3. These become the initial Validated set
299
+
300
+ ```markdown
301
+ ## Requirements
302
+
303
+ ### Validated
304
+
305
+ - ✓ [Existing capability 1] — existing
306
+ - ✓ [Existing capability 2] — existing
307
+ - ✓ [Existing capability 3] — existing
308
+
309
+ ### Active
310
+
311
+ - [ ] [New requirement 1]
312
+ - [ ] [New requirement 2]
313
+
314
+ ### Out of Scope
315
+
316
+ - [Exclusion 1] — [why]
317
+ ```
318
+
319
+ **Key Decisions:**
320
+
321
+ Initialize with any decisions made during questioning:
322
+
323
+ ```markdown
324
+ ## Key Decisions
325
+
326
+ | Decision | Rationale | Outcome |
327
+ |----------|-----------|---------|
328
+ | [Choice from questioning] | [Why] | — Pending |
329
+ ```
330
+
331
+ **Last updated footer:**
332
+
333
+ ```markdown
334
+ ---
335
+ *Last updated: [date] after initialization*
336
+ ```
337
+
338
+ Do not compress. Capture everything gathered.
339
+
340
+ **Commit PROJECT.md:**
341
+
342
+ ```bash
343
+ mkdir -p .planning
344
+ node "$HOME/.claude/core/bin/vector-tools.cjs" commit "docs: initialize project" --files .planning/PROJECT.md
345
+ ```
346
+
347
+ ## 5. Workflow Preferences
348
+
349
+ **If auto mode:** Skip — config was collected in Step 2a. Proceed to Step 5.5.
350
+
351
+ **Check for global defaults** at `~/.vector/defaults.json`. If the file exists, offer to use saved defaults:
352
+
353
+ ```
354
+ AskUserQuestion([
355
+ {
356
+ question: "Use your saved default settings? (from ~/.vector/defaults.json)",
357
+ header: "Defaults",
358
+ multiSelect: false,
359
+ options: [
360
+ { label: "Yes (Recommended)", description: "Use saved defaults, skip settings questions" },
361
+ { label: "No", description: "Configure settings manually" }
362
+ ]
363
+ }
364
+ ])
365
+ ```
366
+
367
+ If "Yes": read `~/.vector/defaults.json`, use those values for config.json, and skip directly to **Commit config.json** below.
368
+
369
+ If "No" or `~/.vector/defaults.json` doesn't exist: proceed with the questions below.
370
+
371
+ **Round 1 — Core workflow settings (4 questions):**
372
+
373
+ ```
374
+ questions: [
375
+ {
376
+ header: "Mode",
377
+ question: "How do you want to work?",
378
+ multiSelect: false,
379
+ options: [
380
+ { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
381
+ { label: "Interactive", description: "Confirm at each step" }
382
+ ]
383
+ },
384
+ {
385
+ header: "Granularity",
386
+ question: "How finely should scope be sliced into phases?",
387
+ multiSelect: false,
388
+ options: [
389
+ { label: "Coarse", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
390
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
391
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
392
+ ]
393
+ },
394
+ {
395
+ header: "Execution",
396
+ question: "Run plans in parallel?",
397
+ multiSelect: false,
398
+ options: [
399
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
400
+ { label: "Sequential", description: "One plan at a time" }
401
+ ]
402
+ },
403
+ {
404
+ header: "Git Tracking",
405
+ question: "Commit planning docs to git?",
406
+ multiSelect: false,
407
+ options: [
408
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
409
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
410
+ ]
411
+ }
412
+ ]
413
+ ```
414
+
415
+ **Round 2 — Workflow agents:**
416
+
417
+ These spawn additional agents during planning/execution. They add tokens and time but improve quality.
418
+
419
+ | Agent | When it runs | What it does |
420
+ |-------|--------------|--------------|
421
+ | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
422
+ | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
423
+ | **Verifier** | After phase execution | Confirms must-haves were delivered |
424
+
425
+ All recommended for important projects. Skip for quick experiments.
426
+
427
+ ```
428
+ questions: [
429
+ {
430
+ header: "Research",
431
+ question: "Research before planning each phase? (adds tokens/time)",
432
+ multiSelect: false,
433
+ options: [
434
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
435
+ { label: "No", description: "Plan directly from requirements" }
436
+ ]
437
+ },
438
+ {
439
+ header: "Plan Check",
440
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
441
+ multiSelect: false,
442
+ options: [
443
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
444
+ { label: "No", description: "Execute plans without verification" }
445
+ ]
446
+ },
447
+ {
448
+ header: "Verifier",
449
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
450
+ multiSelect: false,
451
+ options: [
452
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
453
+ { label: "No", description: "Trust execution, skip verification" }
454
+ ]
455
+ },
456
+ {
457
+ header: "AI Models",
458
+ question: "Which AI models for planning agents?",
459
+ multiSelect: false,
460
+ options: [
461
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
462
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
463
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" },
464
+ { label: "Inherit", description: "Use the current session model for all agents (OpenCode /model)" }
465
+ ]
466
+ }
467
+ ]
468
+ ```
469
+
470
+ Create `.planning/config.json` with all settings:
471
+
472
+ ```json
473
+ {
474
+ "mode": "yolo|interactive",
475
+ "granularity": "coarse|standard|fine",
476
+ "parallelization": true|false,
477
+ "commit_docs": true|false,
478
+ "model_profile": "quality|balanced|budget|inherit",
479
+ "workflow": {
480
+ "research": true|false,
481
+ "plan_check": true|false,
482
+ "verifier": true|false,
483
+ "nyquist_validation": depth !== "quick"
484
+ }
485
+ }
486
+ ```
487
+
488
+ **If commit_docs = No:**
489
+ - Set `commit_docs: false` in config.json
490
+ - Add `.planning/` to `.gitignore` (create if needed)
491
+
492
+ **If commit_docs = Yes:**
493
+ - No additional gitignore entries needed
494
+
495
+ **Commit config.json:**
496
+
497
+ ```bash
498
+ node "$HOME/.claude/core/bin/vector-tools.cjs" commit "chore: add project config" --files .planning/config.json
499
+ ```
500
+
501
+ **Note:** Run `/vector:settings` anytime to update these preferences.
502
+
503
+ ## 5.5. Resolve Model Profile
504
+
505
+ Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
506
+
507
+ ## 6. Research Decision
508
+
509
+ **If auto mode:** Default to "Research first" without asking.
510
+
511
+ Use AskUserQuestion:
512
+ - header: "Research"
513
+ - question: "Research the domain ecosystem before defining requirements?"
514
+ - options:
515
+ - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
516
+ - "Skip research" — I know this domain well, go straight to requirements
517
+
518
+ **If "Research first":**
519
+
520
+ Display stage banner:
521
+ ```
522
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
523
+ Vector ► RESEARCHING
524
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
525
+
526
+ Researching [domain] ecosystem...
527
+ ```
528
+
529
+ Create research directory:
530
+ ```bash
531
+ mkdir -p .planning/research
532
+ ```
533
+
534
+ **Determine milestone context:**
535
+
536
+ Check if this is greenfield or subsequent milestone:
537
+ - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
538
+ - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
539
+
540
+ Display spawning indicator:
541
+ ```
542
+ ◆ Spawning 4 researchers in parallel...
543
+ → Stack research
544
+ → Features research
545
+ → Architecture research
546
+ → Pitfalls research
547
+ ```
548
+
549
+ Spawn 4 parallel vector-project-researcher agents with path references:
550
+
551
+ ```
552
+ Task(prompt="<research_type>
553
+ Project Research — Stack dimension for [domain].
554
+ </research_type>
555
+
556
+ <milestone_context>
557
+ [greenfield OR subsequent]
558
+
559
+ Greenfield: Research the standard stack for building [domain] from scratch.
560
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
561
+ </milestone_context>
562
+
563
+ <question>
564
+ What's the standard 2025 stack for [domain]?
565
+ </question>
566
+
567
+ <files_to_read>
568
+ - {project_path} (Project context and goals)
569
+ </files_to_read>
570
+
571
+ <downstream_consumer>
572
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
573
+ - Specific libraries with versions
574
+ - Clear rationale for each choice
575
+ - What NOT to use and why
576
+ </downstream_consumer>
577
+
578
+ <quality_gate>
579
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
580
+ - [ ] Rationale explains WHY, not just WHAT
581
+ - [ ] Confidence levels assigned to each recommendation
582
+ </quality_gate>
583
+
584
+ <output>
585
+ Write to: .planning/research/STACK.md
586
+ Use template: ~/.claude/core/templates/research-project/STACK.md
587
+ </output>
588
+ ", subagent_type="vector-project-researcher", model="{researcher_model}", description="Stack research")
589
+
590
+ Task(prompt="<research_type>
591
+ Project Research — Features dimension for [domain].
592
+ </research_type>
593
+
594
+ <milestone_context>
595
+ [greenfield OR subsequent]
596
+
597
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
598
+ Subsequent: How do [target features] typically work? What's expected behavior?
599
+ </milestone_context>
600
+
601
+ <question>
602
+ What features do [domain] products have? What's table stakes vs differentiating?
603
+ </question>
604
+
605
+ <files_to_read>
606
+ - {project_path} (Project context)
607
+ </files_to_read>
608
+
609
+ <downstream_consumer>
610
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
611
+ - Table stakes (must have or users leave)
612
+ - Differentiators (competitive advantage)
613
+ - Anti-features (things to deliberately NOT build)
614
+ </downstream_consumer>
615
+
616
+ <quality_gate>
617
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
618
+ - [ ] Complexity noted for each feature
619
+ - [ ] Dependencies between features identified
620
+ </quality_gate>
621
+
622
+ <output>
623
+ Write to: .planning/research/FEATURES.md
624
+ Use template: ~/.claude/core/templates/research-project/FEATURES.md
625
+ </output>
626
+ ", subagent_type="vector-project-researcher", model="{researcher_model}", description="Features research")
627
+
628
+ Task(prompt="<research_type>
629
+ Project Research — Architecture dimension for [domain].
630
+ </research_type>
631
+
632
+ <milestone_context>
633
+ [greenfield OR subsequent]
634
+
635
+ Greenfield: How are [domain] systems typically structured? What are major components?
636
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
637
+ </milestone_context>
638
+
639
+ <question>
640
+ How are [domain] systems typically structured? What are major components?
641
+ </question>
642
+
643
+ <files_to_read>
644
+ - {project_path} (Project context)
645
+ </files_to_read>
646
+
647
+ <downstream_consumer>
648
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
649
+ - Component boundaries (what talks to what)
650
+ - Data flow (how information moves)
651
+ - Suggested build order (dependencies between components)
652
+ </downstream_consumer>
653
+
654
+ <quality_gate>
655
+ - [ ] Components clearly defined with boundaries
656
+ - [ ] Data flow direction explicit
657
+ - [ ] Build order implications noted
658
+ </quality_gate>
659
+
660
+ <output>
661
+ Write to: .planning/research/ARCHITECTURE.md
662
+ Use template: ~/.claude/core/templates/research-project/ARCHITECTURE.md
663
+ </output>
664
+ ", subagent_type="vector-project-researcher", model="{researcher_model}", description="Architecture research")
665
+
666
+ Task(prompt="<research_type>
667
+ Project Research — Pitfalls dimension for [domain].
668
+ </research_type>
669
+
670
+ <milestone_context>
671
+ [greenfield OR subsequent]
672
+
673
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
674
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
675
+ </milestone_context>
676
+
677
+ <question>
678
+ What do [domain] projects commonly get wrong? Critical mistakes?
679
+ </question>
680
+
681
+ <files_to_read>
682
+ - {project_path} (Project context)
683
+ </files_to_read>
684
+
685
+ <downstream_consumer>
686
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
687
+ - Warning signs (how to detect early)
688
+ - Prevention strategy (how to avoid)
689
+ - Which phase should address it
690
+ </downstream_consumer>
691
+
692
+ <quality_gate>
693
+ - [ ] Pitfalls are specific to this domain (not generic advice)
694
+ - [ ] Prevention strategies are actionable
695
+ - [ ] Phase mapping included where relevant
696
+ </quality_gate>
697
+
698
+ <output>
699
+ Write to: .planning/research/PITFALLS.md
700
+ Use template: ~/.claude/core/templates/research-project/PITFALLS.md
701
+ </output>
702
+ ", subagent_type="vector-project-researcher", model="{researcher_model}", description="Pitfalls research")
703
+ ```
704
+
705
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
706
+
707
+ ```
708
+ Task(prompt="
709
+ <task>
710
+ Synthesize research outputs into SUMMARY.md.
711
+ </task>
712
+
713
+ <files_to_read>
714
+ - .planning/research/STACK.md
715
+ - .planning/research/FEATURES.md
716
+ - .planning/research/ARCHITECTURE.md
717
+ - .planning/research/PITFALLS.md
718
+ </files_to_read>
719
+
720
+ <output>
721
+ Write to: .planning/research/SUMMARY.md
722
+ Use template: ~/.claude/core/templates/research-project/SUMMARY.md
723
+ Commit after writing.
724
+ </output>
725
+ ", subagent_type="vector-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
726
+ ```
727
+
728
+ Display research complete banner and key findings:
729
+ ```
730
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
731
+ Vector ► RESEARCH COMPLETE ✓
732
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
733
+
734
+ ## Key Findings
735
+
736
+ **Stack:** [from SUMMARY.md]
737
+ **Table Stakes:** [from SUMMARY.md]
738
+ **Watch Out For:** [from SUMMARY.md]
739
+
740
+ Files: `.planning/research/`
741
+ ```
742
+
743
+ **If "Skip research":** Continue to Step 7.
744
+
745
+ ## 7. Define Requirements
746
+
747
+ Display stage banner:
748
+ ```
749
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
750
+ Vector ► DEFINING REQUIREMENTS
751
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
752
+ ```
753
+
754
+ **Load context:**
755
+
756
+ Read PROJECT.md and extract:
757
+ - Core value (the ONE thing that must work)
758
+ - Stated constraints (budget, timeline, tech limitations)
759
+ - Any explicit scope boundaries
760
+
761
+ **If research exists:** Read research/FEATURES.md and extract feature categories.
762
+
763
+ **If auto mode:**
764
+ - Auto-include all table stakes features (users expect these)
765
+ - Include features explicitly mentioned in provided document
766
+ - Auto-defer differentiators not mentioned in document
767
+ - Skip per-category AskUserQuestion loops
768
+ - Skip "Any additions?" question
769
+ - Skip requirements approval gate
770
+ - Generate REQUIREMENTS.md and commit directly
771
+
772
+ **Present features by category (interactive mode only):**
773
+
774
+ ```
775
+ Here are the features for [domain]:
776
+
777
+ ## Authentication
778
+ **Table stakes:**
779
+ - Sign up with email/password
780
+ - Email verification
781
+ - Password reset
782
+ - Session management
783
+
784
+ **Differentiators:**
785
+ - Magic link login
786
+ - OAuth (Google, GitHub)
787
+ - 2FA
788
+
789
+ **Research notes:** [any relevant notes]
790
+
791
+ ---
792
+
793
+ ## [Next Category]
794
+ ...
795
+ ```
796
+
797
+ **If no research:** Gather requirements through conversation instead.
798
+
799
+ Ask: "What are the main things users need to be able to do?"
800
+
801
+ For each capability mentioned:
802
+ - Ask clarifying questions to make it specific
803
+ - Probe for related capabilities
804
+ - Group into categories
805
+
806
+ **Scope each category:**
807
+
808
+ For each category, use AskUserQuestion:
809
+
810
+ - header: "[Category]" (max 12 chars)
811
+ - question: "Which [category] features are in v1?"
812
+ - multiSelect: true
813
+ - options:
814
+ - "[Feature 1]" — [brief description]
815
+ - "[Feature 2]" — [brief description]
816
+ - "[Feature 3]" — [brief description]
817
+ - "None for v1" — Defer entire category
818
+
819
+ Track responses:
820
+ - Selected features → v1 requirements
821
+ - Unselected table stakes → v2 (users expect these)
822
+ - Unselected differentiators → out of scope
823
+
824
+ **Identify gaps:**
825
+
826
+ Use AskUserQuestion:
827
+ - header: "Additions"
828
+ - question: "Any requirements research missed? (Features specific to your vision)"
829
+ - options:
830
+ - "No, research covered it" — Proceed
831
+ - "Yes, let me add some" — Capture additions
832
+
833
+ **Validate core value:**
834
+
835
+ Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
836
+
837
+ **Generate REQUIREMENTS.md:**
838
+
839
+ Create `.planning/REQUIREMENTS.md` with:
840
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
841
+ - v2 Requirements (deferred)
842
+ - Out of Scope (explicit exclusions with reasoning)
843
+ - Traceability section (empty, filled by roadmap)
844
+
845
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
846
+
847
+ **Requirement quality criteria:**
848
+
849
+ Good requirements are:
850
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
851
+ - **User-centric:** "User can X" (not "System does Y")
852
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
853
+ - **Independent:** Minimal dependencies on other requirements
854
+
855
+ Reject vague requirements. Push for specificity:
856
+ - "Handle authentication" → "User can log in with email/password and stay logged in across sessions"
857
+ - "Support sharing" → "User can share post via link that opens in recipient's browser"
858
+
859
+ **Present full requirements list (interactive mode only):**
860
+
861
+ Show every requirement (not counts) for user confirmation:
862
+
863
+ ```
864
+ ## v1 Requirements
865
+
866
+ ### Authentication
867
+ - [ ] **AUTH-01**: User can create account with email/password
868
+ - [ ] **AUTH-02**: User can log in and stay logged in across sessions
869
+ - [ ] **AUTH-03**: User can log out from any page
870
+
871
+ ### Content
872
+ - [ ] **CONT-01**: User can create posts with text
873
+ - [ ] **CONT-02**: User can edit their own posts
874
+
875
+ [... full list ...]
876
+
877
+ ---
878
+
879
+ Does this capture what you're building? (yes / adjust)
880
+ ```
881
+
882
+ If "adjust": Return to scoping.
883
+
884
+ **Commit requirements:**
885
+
886
+ ```bash
887
+ node "$HOME/.claude/core/bin/vector-tools.cjs" commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
888
+ ```
889
+
890
+ ## 8. Create Roadmap
891
+
892
+ Display stage banner:
893
+ ```
894
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
895
+ Vector ► CREATING ROADMAP
896
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
897
+
898
+ ◆ Spawning roadmapper...
899
+ ```
900
+
901
+ Spawn vector-roadmapper agent with path references:
902
+
903
+ ```
904
+ Task(prompt="
905
+ <planning_context>
906
+
907
+ <files_to_read>
908
+ - .planning/PROJECT.md (Project context)
909
+ - .planning/REQUIREMENTS.md (v1 Requirements)
910
+ - .planning/research/SUMMARY.md (Research findings - if exists)
911
+ - .planning/config.json (Granularity and mode settings)
912
+ </files_to_read>
913
+
914
+ </planning_context>
915
+
916
+ <instructions>
917
+ Create roadmap:
918
+ 1. Derive phases from requirements (don't impose structure)
919
+ 2. Map every v1 requirement to exactly one phase
920
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
921
+ 4. Validate 100% coverage
922
+ 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
923
+ 6. Return ROADMAP CREATED with summary
924
+
925
+ Write files first, then return. This ensures artifacts persist even if context is lost.
926
+ </instructions>
927
+ ", subagent_type="vector-roadmapper", model="{roadmapper_model}", description="Create roadmap")
928
+ ```
929
+
930
+ **Handle roadmapper return:**
931
+
932
+ **If `## ROADMAP BLOCKED`:**
933
+ - Present blocker information
934
+ - Work with user to resolve
935
+ - Re-spawn when resolved
936
+
937
+ **If `## ROADMAP CREATED`:**
938
+
939
+ Read the created ROADMAP.md and present it nicely inline:
940
+
941
+ ```
942
+ ---
943
+
944
+ ## Proposed Roadmap
945
+
946
+ **[N] phases** | **[X] requirements mapped** | All v1 requirements covered ✓
947
+
948
+ | # | Phase | Goal | Requirements | Success Criteria |
949
+ |---|-------|------|--------------|------------------|
950
+ | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
951
+ | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
952
+ | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
953
+ ...
954
+
955
+ ### Phase Details
956
+
957
+ **Phase 1: [Name]**
958
+ Goal: [goal]
959
+ Requirements: [REQ-IDs]
960
+ Success criteria:
961
+ 1. [criterion]
962
+ 2. [criterion]
963
+ 3. [criterion]
964
+
965
+ **Phase 2: [Name]**
966
+ Goal: [goal]
967
+ Requirements: [REQ-IDs]
968
+ Success criteria:
969
+ 1. [criterion]
970
+ 2. [criterion]
971
+
972
+ [... continue for all phases ...]
973
+
974
+ ---
975
+ ```
976
+
977
+ **If auto mode:** Skip approval gate — auto-approve and commit directly.
978
+
979
+ **CRITICAL: Ask for approval before committing (interactive mode only):**
980
+
981
+ Use AskUserQuestion:
982
+ - header: "Roadmap"
983
+ - question: "Does this roadmap structure work for you?"
984
+ - options:
985
+ - "Approve" — Commit and continue
986
+ - "Adjust phases" — Tell me what to change
987
+ - "Review full file" — Show raw ROADMAP.md
988
+
989
+ **If "Approve":** Continue to commit.
990
+
991
+ **If "Adjust phases":**
992
+ - Get user's adjustment notes
993
+ - Re-spawn roadmapper with revision context:
994
+ ```
995
+ Task(prompt="
996
+ <revision>
997
+ User feedback on roadmap:
998
+ [user's notes]
999
+
1000
+ <files_to_read>
1001
+ - .planning/ROADMAP.md (Current roadmap to revise)
1002
+ </files_to_read>
1003
+
1004
+ Update the roadmap based on feedback. Edit files in place.
1005
+ Return ROADMAP REVISED with changes made.
1006
+ </revision>
1007
+ ", subagent_type="vector-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
1008
+ ```
1009
+ - Present revised roadmap
1010
+ - Loop until user approves
1011
+
1012
+ **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
1013
+
1014
+ **Commit roadmap (after approval or auto mode):**
1015
+
1016
+ ```bash
1017
+ node "$HOME/.claude/core/bin/vector-tools.cjs" commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
1018
+ ```
1019
+
1020
+ ## 9. Done
1021
+
1022
+ Present completion summary:
1023
+
1024
+ ```
1025
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1026
+ Vector ► PROJECT INITIALIZED ✓
1027
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1028
+
1029
+ **[Project Name]**
1030
+
1031
+ | Artifact | Location |
1032
+ |----------------|-----------------------------|
1033
+ | Project | `.planning/PROJECT.md` |
1034
+ | Config | `.planning/config.json` |
1035
+ | Research | `.planning/research/` |
1036
+ | Requirements | `.planning/REQUIREMENTS.md` |
1037
+ | Roadmap | `.planning/ROADMAP.md` |
1038
+
1039
+ **[N] phases** | **[X] requirements** | Ready to build ✓
1040
+ ```
1041
+
1042
+ **If auto mode:**
1043
+
1044
+ ```
1045
+ ╔══════════════════════════════════════════╗
1046
+ ║ AUTO-ADVANCING → DISCUSS PHASE 1 ║
1047
+ ╚══════════════════════════════════════════╝
1048
+ ```
1049
+
1050
+ Exit skill and invoke SlashCommand("/vector:discuss-phase 1 --auto")
1051
+
1052
+ **If interactive mode:**
1053
+
1054
+ ```
1055
+ ───────────────────────────────────────────────────────────────
1056
+
1057
+ ## ▶ Next Up
1058
+
1059
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1060
+
1061
+ /vector:discuss-phase 1 — gather context and clarify approach
1062
+
1063
+ <sub>/clear first → fresh context window</sub>
1064
+
1065
+ ---
1066
+
1067
+ **Also available:**
1068
+ - /vector:plan-phase 1 — skip discussion, plan directly
1069
+
1070
+ ───────────────────────────────────────────────────────────────
1071
+ ```
1072
+
1073
+ </process>
1074
+
1075
+ <output>
1076
+
1077
+ - `.planning/PROJECT.md`
1078
+ - `.planning/config.json`
1079
+ - `.planning/research/` (if research selected)
1080
+ - `STACK.md`
1081
+ - `FEATURES.md`
1082
+ - `ARCHITECTURE.md`
1083
+ - `PITFALLS.md`
1084
+ - `SUMMARY.md`
1085
+ - `.planning/REQUIREMENTS.md`
1086
+ - `.planning/ROADMAP.md`
1087
+ - `.planning/STATE.md`
1088
+
1089
+ </output>
1090
+
1091
+ <success_criteria>
1092
+
1093
+ - [ ] .planning/ directory created
1094
+ - [ ] Git repo initialized
1095
+ - [ ] Brownfield detection completed
1096
+ - [ ] Deep questioning completed (threads followed, not rushed)
1097
+ - [ ] PROJECT.md captures full context → **committed**
1098
+ - [ ] config.json has workflow mode, granularity, parallelization → **committed**
1099
+ - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
1100
+ - [ ] Requirements gathered (from research or conversation)
1101
+ - [ ] User scoped each category (v1/v2/out of scope)
1102
+ - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
1103
+ - [ ] vector-roadmapper spawned with context
1104
+ - [ ] Roadmap files written immediately (not draft)
1105
+ - [ ] User feedback incorporated (if any)
1106
+ - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1107
+ - [ ] STATE.md initialized
1108
+ - [ ] REQUIREMENTS.md traceability updated
1109
+ - [ ] User knows next step is `/vector:discuss-phase 1`
1110
+
1111
+ **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1112
+
1113
+ </success_criteria>