mindforge-cc 2.1.0 → 2.1.2

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 (236) hide show
  1. package/.agent/bin/lib/commands.cjs +959 -0
  2. package/.agent/bin/lib/config.cjs +421 -0
  3. package/.agent/bin/lib/core.cjs +1166 -0
  4. package/.agent/bin/lib/frontmatter.cjs +307 -0
  5. package/.agent/bin/lib/init.cjs +1336 -0
  6. package/.agent/bin/lib/milestone.cjs +252 -0
  7. package/.agent/bin/lib/model-profiles.cjs +68 -0
  8. package/.agent/bin/lib/phase.cjs +888 -0
  9. package/.agent/bin/lib/profile-output.cjs +952 -0
  10. package/.agent/bin/lib/profile-pipeline.cjs +539 -0
  11. package/.agent/bin/lib/roadmap.cjs +329 -0
  12. package/.agent/bin/lib/security.cjs +356 -0
  13. package/.agent/bin/lib/state.cjs +969 -0
  14. package/.agent/bin/lib/template.cjs +222 -0
  15. package/.agent/bin/lib/uat.cjs +189 -0
  16. package/.agent/bin/lib/verify.cjs +851 -0
  17. package/.agent/bin/lib/workstream.cjs +491 -0
  18. package/.agent/bin/mindforge-tools.cjs +897 -0
  19. package/.agent/file-manifest.json +219 -0
  20. package/.agent/hooks/mindforge-check-update.js +114 -0
  21. package/.agent/hooks/mindforge-context-monitor.js +156 -0
  22. package/.agent/hooks/mindforge-prompt-guard.js +96 -0
  23. package/.agent/hooks/mindforge-statusline.js +119 -0
  24. package/.agent/hooks/mindforge-workflow-guard.js +94 -0
  25. package/.agent/mindforge/discuss-phase.md +1 -1
  26. package/.agent/mindforge/help.md +1 -1
  27. package/.agent/mindforge/learn.md +3 -2
  28. package/.agent/mindforge/research.md +3 -2
  29. package/.agent/mindforge/steer.md +1 -1
  30. package/.agent/settings.json +38 -0
  31. package/.agent/skills/mindforge-add-backlog/SKILL.md +72 -0
  32. package/.agent/skills/mindforge-add-phase/SKILL.md +39 -0
  33. package/.agent/skills/mindforge-add-tests/SKILL.md +28 -0
  34. package/.agent/skills/mindforge-add-todo/SKILL.md +42 -0
  35. package/.agent/skills/mindforge-audit-milestone/SKILL.md +29 -0
  36. package/.agent/skills/mindforge-audit-uat/SKILL.md +20 -0
  37. package/.agent/skills/mindforge-autonomous/SKILL.md +33 -0
  38. package/.agent/skills/mindforge-check-todos/SKILL.md +40 -0
  39. package/.agent/skills/mindforge-cleanup/SKILL.md +19 -0
  40. package/.agent/skills/mindforge-complete-milestone/SKILL.md +131 -0
  41. package/.agent/skills/mindforge-debug/SKILL.md +163 -0
  42. package/.agent/skills/mindforge-discuss-phase/SKILL.md +54 -0
  43. package/.agent/skills/mindforge-do/SKILL.md +26 -0
  44. package/.agent/skills/mindforge-execute-phase/SKILL.md +49 -0
  45. package/.agent/skills/mindforge-fast/SKILL.md +23 -0
  46. package/.agent/skills/mindforge-forensics/SKILL.md +49 -0
  47. package/.agent/skills/mindforge-health/SKILL.md +17 -0
  48. package/.agent/skills/mindforge-help/SKILL.md +23 -0
  49. package/.agent/skills/mindforge-insert-phase/SKILL.md +28 -0
  50. package/.agent/skills/mindforge-join-discord/SKILL.md +19 -0
  51. package/.agent/skills/mindforge-list-phase-assumptions/SKILL.md +41 -0
  52. package/.agent/skills/mindforge-list-workspaces/SKILL.md +17 -0
  53. package/.agent/skills/mindforge-manager/SKILL.md +32 -0
  54. package/.agent/skills/mindforge-map-codebase/SKILL.md +64 -0
  55. package/.agent/skills/mindforge-milestone-summary/SKILL.md +44 -0
  56. package/.agent/skills/mindforge-new-milestone/SKILL.md +38 -0
  57. package/.agent/skills/mindforge-new-project/SKILL.md +36 -0
  58. package/.agent/skills/mindforge-new-workspace/SKILL.md +39 -0
  59. package/.agent/skills/mindforge-next/SKILL.md +19 -0
  60. package/.agent/skills/mindforge-note/SKILL.md +29 -0
  61. package/.agent/skills/mindforge-pause-work/SKILL.md +35 -0
  62. package/.agent/skills/mindforge-plan-milestone-gaps/SKILL.md +28 -0
  63. package/.agent/skills/mindforge-plan-phase/SKILL.md +37 -0
  64. package/.agent/skills/mindforge-plant-seed/SKILL.md +22 -0
  65. package/.agent/skills/mindforge-pr-branch/SKILL.md +21 -0
  66. package/.agent/skills/mindforge-profile-user/SKILL.md +38 -0
  67. package/.agent/skills/mindforge-progress/SKILL.md +19 -0
  68. package/.agent/skills/mindforge-quick/SKILL.md +38 -0
  69. package/.agent/skills/mindforge-reapply-patches/SKILL.md +124 -0
  70. package/.agent/skills/mindforge-remove-phase/SKILL.md +26 -0
  71. package/.agent/skills/mindforge-remove-workspace/SKILL.md +22 -0
  72. package/.agent/skills/mindforge-research-phase/SKILL.md +186 -0
  73. package/.agent/skills/mindforge-resume-work/SKILL.md +35 -0
  74. package/.agent/skills/mindforge-review/SKILL.md +31 -0
  75. package/.agent/skills/mindforge-review-backlog/SKILL.md +58 -0
  76. package/.agent/skills/mindforge-session-report/SKILL.md +16 -0
  77. package/.agent/skills/mindforge-set-profile/SKILL.md +9 -0
  78. package/.agent/skills/mindforge-settings/SKILL.md +32 -0
  79. package/.agent/skills/mindforge-ship/SKILL.md +16 -0
  80. package/.agent/skills/mindforge-stats/SKILL.md +16 -0
  81. package/.agent/skills/mindforge-thread/SKILL.md +123 -0
  82. package/.agent/skills/mindforge-ui-phase/SKILL.md +24 -0
  83. package/.agent/skills/mindforge-ui-review/SKILL.md +24 -0
  84. package/.agent/skills/mindforge-update/SKILL.md +35 -0
  85. package/.agent/skills/mindforge-validate-phase/SKILL.md +26 -0
  86. package/.agent/skills/mindforge-verify-work/SKILL.md +30 -0
  87. package/.agent/skills/mindforge-workstreams/SKILL.md +65 -0
  88. package/.agent/workflows/mindforge-add-phase.md +112 -0
  89. package/.agent/workflows/mindforge-add-tests.md +351 -0
  90. package/.agent/workflows/mindforge-add-todo.md +158 -0
  91. package/.agent/workflows/mindforge-audit-milestone.md +332 -0
  92. package/.agent/workflows/mindforge-audit-uat.md +109 -0
  93. package/.agent/workflows/mindforge-autonomous.md +815 -0
  94. package/.agent/workflows/mindforge-check-todos.md +177 -0
  95. package/.agent/workflows/mindforge-cleanup.md +152 -0
  96. package/.agent/workflows/mindforge-complete-milestone.md +766 -0
  97. package/.agent/workflows/mindforge-diagnose-issues.md +220 -0
  98. package/.agent/workflows/mindforge-discovery-phase.md +289 -0
  99. package/.agent/workflows/mindforge-discuss-phase-assumptions.md +645 -0
  100. package/.agent/workflows/mindforge-discuss-phase.md +1047 -0
  101. package/.agent/workflows/mindforge-do.md +104 -0
  102. package/.agent/workflows/mindforge-execute-phase.md +838 -0
  103. package/.agent/workflows/mindforge-execute-plan.md +509 -0
  104. package/.agent/workflows/mindforge-fast.md +105 -0
  105. package/.agent/workflows/mindforge-forensics.md +265 -0
  106. package/.agent/workflows/mindforge-health.md +181 -0
  107. package/.agent/workflows/mindforge-help.md +606 -0
  108. package/.agent/workflows/mindforge-insert-phase.md +130 -0
  109. package/.agent/workflows/mindforge-list-phase-assumptions.md +178 -0
  110. package/.agent/workflows/mindforge-list-workspaces.md +56 -0
  111. package/.agent/workflows/mindforge-manager.md +360 -0
  112. package/.agent/workflows/mindforge-map-codebase.md +370 -0
  113. package/.agent/workflows/mindforge-milestone-summary.md +223 -0
  114. package/.agent/workflows/mindforge-new-milestone.md +469 -0
  115. package/.agent/workflows/mindforge-new-project.md +1226 -0
  116. package/.agent/workflows/mindforge-new-workspace.md +237 -0
  117. package/.agent/workflows/mindforge-next.md +97 -0
  118. package/.agent/workflows/mindforge-node-repair.md +92 -0
  119. package/.agent/workflows/mindforge-note.md +156 -0
  120. package/.agent/workflows/mindforge-pause-work.md +176 -0
  121. package/.agent/workflows/mindforge-plan-milestone-gaps.md +273 -0
  122. package/.agent/workflows/mindforge-plan-phase.md +848 -0
  123. package/.agent/workflows/mindforge-plant-seed.md +169 -0
  124. package/.agent/workflows/mindforge-pr-branch.md +129 -0
  125. package/.agent/workflows/mindforge-profile-user.md +450 -0
  126. package/.agent/workflows/mindforge-progress.md +507 -0
  127. package/.agent/workflows/mindforge-quick.md +732 -0
  128. package/.agent/workflows/mindforge-remove-phase.md +155 -0
  129. package/.agent/workflows/mindforge-remove-workspace.md +90 -0
  130. package/.agent/workflows/mindforge-research-phase.md +74 -0
  131. package/.agent/workflows/mindforge-resume-project.md +325 -0
  132. package/.agent/workflows/mindforge-review.md +228 -0
  133. package/.agent/workflows/mindforge-session-report.md +146 -0
  134. package/.agent/workflows/mindforge-settings.md +283 -0
  135. package/.agent/workflows/mindforge-ship.md +228 -0
  136. package/.agent/workflows/mindforge-stats.md +60 -0
  137. package/.agent/workflows/mindforge-transition.md +671 -0
  138. package/.agent/workflows/mindforge-ui-phase.md +290 -0
  139. package/.agent/workflows/mindforge-ui-review.md +157 -0
  140. package/.agent/workflows/mindforge-update.md +323 -0
  141. package/.agent/workflows/mindforge-validate-phase.md +167 -0
  142. package/.agent/workflows/mindforge-verify-phase.md +254 -0
  143. package/.agent/workflows/mindforge-verify-work.md +623 -0
  144. package/.mindforge/personas/advisor-researcher.md +3 -3
  145. package/.mindforge/personas/debug-specialist.md +1 -1
  146. package/.mindforge/personas/debugger.md +1 -1
  147. package/.mindforge/personas/developer.md +1 -1
  148. package/.mindforge/personas/phase-researcher.md +4 -4
  149. package/.mindforge/personas/project-researcher.md +3 -3
  150. package/.mindforge/personas/research-agent.md +4 -3
  151. package/.mindforge/personas/tech-writer.md +1 -1
  152. package/.mindforge/personas/ui-researcher.md +1 -1
  153. package/.planning/ROADMAP.md +10 -0
  154. package/CHANGELOG.md +34 -0
  155. package/README.md +70 -45
  156. package/RELEASENOTES.md +26 -26
  157. package/bin/install.js +41 -41
  158. package/bin/installer-core.js +67 -26
  159. package/bin/wizard/setup-wizard.js +11 -24
  160. package/bin/wizard/theme.js +141 -0
  161. package/docs/PERSONAS.md +119 -87
  162. package/docs/References/checkpoints.md +778 -0
  163. package/docs/References/config-reference.md +81 -0
  164. package/docs/References/continuation-format.md +249 -0
  165. package/docs/References/decimal-phase-calculation.md +64 -0
  166. package/docs/References/git-integration.md +295 -0
  167. package/docs/References/git-planning-commit.md +38 -0
  168. package/docs/References/model-profile-resolution.md +36 -0
  169. package/docs/References/model-profiles.md +139 -0
  170. package/docs/References/phase-argument-parsing.md +61 -0
  171. package/docs/References/planning-config.md +202 -0
  172. package/docs/References/questioning.md +162 -0
  173. package/docs/References/tdd.md +263 -0
  174. package/docs/References/ui-brand.md +160 -0
  175. package/docs/References/user-profiling.md +681 -0
  176. package/docs/References/verification-patterns.md +612 -0
  177. package/docs/References/workstream-flag.md +58 -0
  178. package/docs/Templates/Agents/CLAUDE-MD.md +122 -0
  179. package/docs/Templates/Agents/COPILOT-INSTRUCTIONS.md +7 -0
  180. package/docs/Templates/Agents/DEBUGGER-PROMPT.md +91 -0
  181. package/docs/Templates/Agents/PLANNER-PROMPT.md +117 -0
  182. package/docs/Templates/Codebase/architecture.md +255 -0
  183. package/docs/Templates/Codebase/concerns.md +310 -0
  184. package/docs/Templates/Codebase/conventions.md +307 -0
  185. package/docs/Templates/Codebase/integrations.md +280 -0
  186. package/docs/Templates/Codebase/stack.md +186 -0
  187. package/docs/Templates/Codebase/structure.md +285 -0
  188. package/docs/Templates/Codebase/testing.md +480 -0
  189. package/docs/Templates/Execution/CONTINUE-HERE.md +78 -0
  190. package/docs/Templates/Execution/DISCUSSION-LOG.md +63 -0
  191. package/docs/Templates/Execution/PHASE-PROMPT.md +610 -0
  192. package/docs/Templates/Execution/STATE.md +176 -0
  193. package/docs/Templates/Execution/SUMMARY-COMPLEX.md +59 -0
  194. package/docs/Templates/Execution/SUMMARY-MINIMAL.md +41 -0
  195. package/docs/Templates/Execution/SUMMARY-STANDARD.md +48 -0
  196. package/docs/Templates/Execution/SUMMARY.md +248 -0
  197. package/docs/Templates/Profile/DEV-PREFERENCES.md +21 -0
  198. package/docs/Templates/Profile/USER-PROFILE.md +146 -0
  199. package/docs/Templates/Profile/USER-SETUP.md +311 -0
  200. package/docs/Templates/Project/DISCOVERY.md +146 -0
  201. package/docs/Templates/Project/MILESTONE-ARCHIVE.md +123 -0
  202. package/docs/Templates/Project/MILESTONE.md +115 -0
  203. package/docs/Templates/Project/PROJECT.md +206 -0
  204. package/docs/Templates/Project/REQUIREMENTS.md +231 -0
  205. package/docs/Templates/Project/RETROSPECTIVE.md +54 -0
  206. package/docs/Templates/Project/ROADMAP.md +202 -0
  207. package/docs/Templates/Quality/DEBUG.md +164 -0
  208. package/docs/Templates/Quality/UAT.md +280 -0
  209. package/docs/Templates/Quality/UI-SPEC.md +100 -0
  210. package/docs/Templates/Quality/VALIDATION.md +76 -0
  211. package/docs/Templates/Quality/VERIFICATION-REPORT.md +322 -0
  212. package/docs/Templates/Research/ARCHITECTURE.md +204 -0
  213. package/docs/Templates/Research/FEATURES.md +147 -0
  214. package/docs/Templates/Research/PITFALLS.md +200 -0
  215. package/docs/Templates/Research/STACK.md +120 -0
  216. package/docs/Templates/Research/SUMMARY.md +170 -0
  217. package/docs/Templates/System/CONFIG.json +43 -0
  218. package/docs/Templates/System/CONTEXT.md +352 -0
  219. package/docs/architecture/README.md +54 -42
  220. package/docs/commands-reference.md +62 -14
  221. package/docs/getting-started.md +26 -18
  222. package/docs/skills-authoring-guide.md +40 -12
  223. package/docs/tutorial.md +83 -116
  224. package/docs/user-guide.md +72 -198
  225. package/package.json +7 -2
  226. package/.mindforge/memory/knowledge-base.jsonl +0 -7
  227. package/.mindforge/memory/pattern-library.jsonl +0 -1
  228. package/.mindforge/memory/team-preferences.jsonl +0 -4
  229. package/.planning/browser-daemon.log +0 -32
  230. package/docs/mindforge-md-reference.md +0 -57
  231. package/docs/reference/config-reference.md +0 -64
  232. /package/{.mindforge/memory/decision-library.jsonl → .planning/phases/01-migrate-gsd-to-mindforge/.gitkeep} +0 -0
  233. /package/docs/{reference → References}/audit-events.md +0 -0
  234. /package/docs/{reference → References}/commands.md +0 -0
  235. /package/docs/{reference → References}/sdk-api.md +0 -0
  236. /package/docs/{reference → References}/skills-api.md +0 -0
@@ -0,0 +1,469 @@
1
+ <purpose>
2
+
3
+ Start a new milestone cycle for an existing project. Loads project context, gathers milestone goals (from MILESTONE-CONTEXT.md or conversation), updates PROJECT.md and STATE.md, optionally runs parallel research, defines scoped requirements with REQ-IDs, spawns the roadmapper to create phased execution plan, and commits all artifacts. Brownfield equivalent of new-project.
4
+
5
+ </purpose>
6
+
7
+ <required_reading>
8
+
9
+ Read all files referenced by the invoking prompt's execution_context before starting.
10
+
11
+ </required_reading>
12
+
13
+ <process>
14
+
15
+ ## 1. Load Context
16
+
17
+ Parse `$ARGUMENTS` before doing anything else:
18
+ - `--reset-phase-numbers` flag → opt into restarting roadmap phase numbering at `1`
19
+ - remaining text → use as milestone name if present
20
+
21
+ If the flag is absent, keep the current behavior of continuing phase numbering from the previous milestone.
22
+
23
+ - Read PROJECT.md (existing project, validated requirements, decisions)
24
+ - Read MILESTONES.md (what shipped previously)
25
+ - Read STATE.md (pending todos, blockers)
26
+ - Check for MILESTONE-CONTEXT.md (from /mindforge-discuss-milestone)
27
+
28
+ ## 2. Gather Milestone Goals
29
+
30
+ **If MILESTONE-CONTEXT.md exists:**
31
+ - Use features and scope from discuss-milestone
32
+ - Present summary for confirmation
33
+
34
+ **If no context file:**
35
+ - Present what shipped in last milestone
36
+ - Ask inline (freeform, NOT AskUserQuestion): "What do you want to build next?"
37
+ - Wait for their response, then use AskUserQuestion to probe specifics
38
+ - If user selects "Other" at any point to provide freeform input, ask follow-up as plain text — not another AskUserQuestion
39
+
40
+ ## 3. Determine Milestone Version
41
+
42
+ - Parse last version from MILESTONES.md
43
+ - Suggest next version (v1.0 → v1.1, or v2.0 for major)
44
+ - Confirm with user
45
+
46
+ ## 3.5. Verify Milestone Understanding
47
+
48
+ Before writing any files, present a summary of what was gathered and ask for confirmation.
49
+
50
+ ```
51
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52
+ MindForge ► MILESTONE SUMMARY
53
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
+
55
+ **Milestone v[X.Y]: [Name]**
56
+
57
+ **Goal:** [One sentence]
58
+
59
+ **Target features:**
60
+ - [Feature 1]
61
+ - [Feature 2]
62
+ - [Feature 3]
63
+
64
+ **Key context:** [Any important constraints, decisions, or notes from questioning]
65
+ ```
66
+
67
+ AskUserQuestion:
68
+ - header: "Confirm?"
69
+ - question: "Does this capture what you want to build in this milestone?"
70
+ - options:
71
+ - "Looks good" — Proceed to write PROJECT.md
72
+ - "Adjust" — Let me correct or add details
73
+
74
+ **If "Adjust":** Ask what needs changing (plain text, NOT AskUserQuestion). Incorporate changes, re-present the summary. Loop until "Looks good" is selected.
75
+
76
+ **If "Looks good":** Proceed to Step 4.
77
+
78
+ ## 4. Update PROJECT.md
79
+
80
+ Add/update:
81
+
82
+ ```markdown
83
+ ## Current Milestone: v[X.Y] [Name]
84
+
85
+ **Goal:** [One sentence describing milestone focus]
86
+
87
+ **Target features:**
88
+ - [Feature 1]
89
+ - [Feature 2]
90
+ - [Feature 3]
91
+ ```
92
+
93
+ Update Active requirements section and "Last updated" footer.
94
+
95
+ Ensure the `## Evolution` section exists in PROJECT.md. If missing (projects created before this feature), add it before the footer:
96
+
97
+ ```markdown
98
+ ## Evolution
99
+
100
+ This document evolves at phase transitions and milestone boundaries.
101
+
102
+ **After each phase transition** (via `/mindforge-transition`):
103
+ 1. Requirements invalidated? → Move to Out of Scope with reason
104
+ 2. Requirements validated? → Move to Validated with phase reference
105
+ 3. New requirements emerged? → Add to Active
106
+ 4. Decisions to log? → Add to Key Decisions
107
+ 5. "What This Is" still accurate? → Update if drifted
108
+
109
+ **After each milestone** (via `/mindforge-complete-milestone`):
110
+ 1. Full review of all sections
111
+ 2. Core Value check — still the right priority?
112
+ 3. Audit Out of Scope — reasons still valid?
113
+ 4. Update Context with current state
114
+ ```
115
+
116
+ ## 5. Update STATE.md
117
+
118
+ ```markdown
119
+ ## Current Position
120
+
121
+ Phase: Not started (defining requirements)
122
+ Plan: —
123
+ Status: Defining requirements
124
+ Last activity: [today] — Milestone v[X.Y] started
125
+ ```
126
+
127
+ Keep Accumulated Context section from previous milestone.
128
+
129
+ ## 6. Cleanup and Commit
130
+
131
+ Delete MILESTONE-CONTEXT.md if exists (consumed).
132
+
133
+ ```bash
134
+ node ".agent/bin/mindforge-tools.cjs" commit "docs: start milestone v[X.Y] [Name]" --files .planning/PROJECT.md .planning/STATE.md
135
+ ```
136
+
137
+ ## 7. Load Context and Resolve Models
138
+
139
+ ```bash
140
+ INIT=$(node ".agent/bin/mindforge-tools.cjs" init new-milestone)
141
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
142
+ ```
143
+
144
+ Extract from init JSON: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `research_enabled`, `current_milestone`, `project_exists`, `roadmap_exists`, `latest_completed_milestone`, `phase_dir_count`, `phase_archive_path`.
145
+
146
+ ## 7.5 Reset-phase safety (only when `--reset-phase-numbers`)
147
+
148
+ If `--reset-phase-numbers` is active:
149
+
150
+ 1. Set starting phase number to `1` for the upcoming roadmap.
151
+ 2. If `phase_dir_count > 0`, archive the old phase directories before roadmapping so new `01-*` / `02-*` directories cannot collide with stale milestone directories.
152
+
153
+ If `phase_dir_count > 0` and `phase_archive_path` is available:
154
+
155
+ ```bash
156
+ mkdir -p "${phase_archive_path}"
157
+ find .planning/phases -mindepth 1 -maxdepth 1 -type d -exec mv {} "${phase_archive_path}/" \;
158
+ ```
159
+
160
+ Then verify `.planning/phases/` no longer contains old milestone directories before continuing.
161
+
162
+ If `phase_dir_count > 0` but `phase_archive_path` is missing:
163
+ - Stop and explain that reset numbering is unsafe without a completed milestone archive target.
164
+ - Tell the user to complete/archive the previous milestone first, then rerun `/mindforge-new-milestone --reset-phase-numbers ${MindForge_WS}`.
165
+
166
+ ## 8. Research Decision
167
+
168
+ Check `research_enabled` from init JSON (loaded from config).
169
+
170
+ **If `research_enabled` is `true`:**
171
+
172
+ AskUserQuestion: "Research the domain ecosystem for new features before defining requirements?"
173
+ - "Research first (Recommended)" — Discover patterns, features, architecture for NEW capabilities
174
+ - "Skip research for this milestone" — Go straight to requirements (does not change your default)
175
+
176
+ **If `research_enabled` is `false`:**
177
+
178
+ AskUserQuestion: "Research the domain ecosystem for new features before defining requirements?"
179
+ - "Skip research (current default)" — Go straight to requirements
180
+ - "Research first" — Discover patterns, features, architecture for NEW capabilities
181
+
182
+ **IMPORTANT:** Do NOT persist this choice to config.json. The `workflow.research` setting is a persistent user preference that controls plan-phase behavior across the project. Changing it here would silently alter future `/mindforge-plan-phase` behavior. To change the default, use `/mindforge-settings`.
183
+
184
+ **If user chose "Research first":**
185
+
186
+ ```
187
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
188
+ MindForge ► RESEARCHING
189
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
190
+
191
+ ◆ Spawning 4 researchers in parallel...
192
+ → Stack, Features, Architecture, Pitfalls
193
+ ```
194
+
195
+ ```bash
196
+ mkdir -p .planning/research
197
+ ```
198
+
199
+ Spawn 4 parallel mindforge-project-researcher agents. Each uses this template with dimension-specific fields:
200
+
201
+ **Common structure for all 4 researchers:**
202
+ ```
203
+ Task(prompt="
204
+ <research_type>Project Research — {DIMENSION} for [new features].</research_type>
205
+
206
+ <milestone_context>
207
+ SUBSEQUENT MILESTONE — Adding [target features] to existing app.
208
+ {EXISTING_CONTEXT}
209
+ Focus ONLY on what's needed for the NEW features.
210
+ </milestone_context>
211
+
212
+ <question>{QUESTION}</question>
213
+
214
+ <files_to_read>
215
+ - .planning/PROJECT.md (Project context)
216
+ </files_to_read>
217
+
218
+ <downstream_consumer>{CONSUMER}</downstream_consumer>
219
+
220
+ <quality_gate>{GATES}</quality_gate>
221
+
222
+ <output>
223
+ Write to: .planning/research/{FILE}
224
+ Use template: .agent/mindforge/templates/research-project/{FILE}
225
+ </output>
226
+ ", subagent_type="mindforge-project-researcher", model="{researcher_model}", description="{DIMENSION} research")
227
+ ```
228
+
229
+ **Dimension-specific fields:**
230
+
231
+ | Field | Stack | Features | Architecture | Pitfalls |
232
+ |-------|-------|----------|-------------|----------|
233
+ | EXISTING_CONTEXT | Existing validated capabilities (DO NOT re-research): [from PROJECT.md] | Existing features (already built): [from PROJECT.md] | Existing architecture: [from PROJECT.md or codebase map] | Focus on common mistakes when ADDING these features to existing system |
234
+ | QUESTION | What stack additions/changes are needed for [new features]? | How do [target features] typically work? Expected behavior? | How do [target features] integrate with existing architecture? | Common mistakes when adding [target features] to [domain]? |
235
+ | CONSUMER | Specific libraries with versions for NEW capabilities, integration points, what NOT to add | Table stakes vs differentiators vs anti-features, complexity noted, dependencies on existing | Integration points, new components, data flow changes, suggested build order | Warning signs, prevention strategy, which phase should address it |
236
+ | GATES | Versions current (verify with Context7), rationale explains WHY, integration considered | Categories clear, complexity noted, dependencies identified | Integration points identified, new vs modified explicit, build order considers deps | Pitfalls specific to adding these features, integration pitfalls covered, prevention actionable |
237
+ | FILE | STACK.md | FEATURES.md | ARCHITECTURE.md | PITFALLS.md |
238
+
239
+ After all 4 complete, spawn synthesizer:
240
+
241
+ ```
242
+ Task(prompt="
243
+ Synthesize research outputs into SUMMARY.md.
244
+
245
+ <files_to_read>
246
+ - .planning/research/STACK.md
247
+ - .planning/research/FEATURES.md
248
+ - .planning/research/ARCHITECTURE.md
249
+ - .planning/research/PITFALLS.md
250
+ </files_to_read>
251
+
252
+ Write to: .planning/research/SUMMARY.md
253
+ Use template: .agent/mindforge/templates/research-project/SUMMARY.md
254
+ Commit after writing.
255
+ ", subagent_type="mindforge-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
256
+ ```
257
+
258
+ Display key findings from SUMMARY.md:
259
+ ```
260
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
261
+ MindForge ► RESEARCH COMPLETE ✓
262
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
263
+
264
+ **Stack additions:** [from SUMMARY.md]
265
+ **Feature table stakes:** [from SUMMARY.md]
266
+ **Watch Out For:** [from SUMMARY.md]
267
+ ```
268
+
269
+ **If "Skip research":** Continue to Step 9.
270
+
271
+ ## 9. Define Requirements
272
+
273
+ ```
274
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
275
+ MindForge ► DEFINING REQUIREMENTS
276
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
277
+ ```
278
+
279
+ Read PROJECT.md: core value, current milestone goals, validated requirements (what exists).
280
+
281
+ **If research exists:** Read FEATURES.md, extract feature categories.
282
+
283
+ Present features by category:
284
+ ```
285
+ ## [Category 1]
286
+ **Table stakes:** Feature A, Feature B
287
+ **Differentiators:** Feature C, Feature D
288
+ **Research notes:** [any relevant notes]
289
+ ```
290
+
291
+ **If no research:** Gather requirements through conversation. Ask: "What are the main things users need to do with [new features]?" Clarify, probe for related capabilities, group into categories.
292
+
293
+ **Scope each category** via AskUserQuestion (multiSelect: true, header max 12 chars):
294
+ - "[Feature 1]" — [brief description]
295
+ - "[Feature 2]" — [brief description]
296
+ - "None for this milestone" — Defer entire category
297
+
298
+ Track: Selected → this milestone. Unselected table stakes → future. Unselected differentiators → out of scope.
299
+
300
+ **Identify gaps** via AskUserQuestion:
301
+ - "No, research covered it" — Proceed
302
+ - "Yes, let me add some" — Capture additions
303
+
304
+ **Generate REQUIREMENTS.md:**
305
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
306
+ - Future Requirements (deferred)
307
+ - Out of Scope (explicit exclusions with reasoning)
308
+ - Traceability section (empty, filled by roadmap)
309
+
310
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, NOTIF-02). Continue numbering from existing.
311
+
312
+ **Requirement quality criteria:**
313
+
314
+ Good requirements are:
315
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
316
+ - **User-centric:** "User can X" (not "System does Y")
317
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
318
+ - **Independent:** Minimal dependencies on other requirements
319
+
320
+ Present FULL requirements list for confirmation:
321
+
322
+ ```
323
+ ## Milestone v[X.Y] Requirements
324
+
325
+ ### [Category 1]
326
+ - [ ] **CAT1-01**: User can do X
327
+ - [ ] **CAT1-02**: User can do Y
328
+
329
+ ### [Category 2]
330
+ - [ ] **CAT2-01**: User can do Z
331
+
332
+ Does this capture what you're building? (yes / adjust)
333
+ ```
334
+
335
+ If "adjust": Return to scoping.
336
+
337
+ **Commit requirements:**
338
+ ```bash
339
+ node ".agent/bin/mindforge-tools.cjs" commit "docs: define milestone v[X.Y] requirements" --files .planning/REQUIREMENTS.md
340
+ ```
341
+
342
+ ## 10. Create Roadmap
343
+
344
+ ```
345
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
346
+ MindForge ► CREATING ROADMAP
347
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
348
+
349
+ ◆ Spawning roadmapper...
350
+ ```
351
+
352
+ **Starting phase number:**
353
+ - If `--reset-phase-numbers` is active, start at **Phase 1**
354
+ - Otherwise, continue from the previous milestone's last phase number (v1.0 ended at phase 5 → v1.1 starts at phase 6)
355
+
356
+ ```
357
+ Task(prompt="
358
+ <planning_context>
359
+ <files_to_read>
360
+ - .planning/PROJECT.md
361
+ - .planning/REQUIREMENTS.md
362
+ - .planning/research/SUMMARY.md (if exists)
363
+ - .planning/config.json
364
+ - .planning/MILESTONES.md
365
+ </files_to_read>
366
+ </planning_context>
367
+
368
+ <instructions>
369
+ Create roadmap for milestone v[X.Y]:
370
+ 1. Respect the selected numbering mode:
371
+ - `--reset-phase-numbers` → start at Phase 1
372
+ - default behavior → continue from the previous milestone's last phase number
373
+ 2. Derive phases from THIS MILESTONE's requirements only
374
+ 3. Map every requirement to exactly one phase
375
+ 4. Derive 2-5 success criteria per phase (observable user behaviors)
376
+ 5. Validate 100% coverage
377
+ 6. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
378
+ 7. Return ROADMAP CREATED with summary
379
+
380
+ Write files first, then return.
381
+ </instructions>
382
+ ", subagent_type="mindforge-roadmapper", model="{roadmapper_model}", description="Create roadmap")
383
+ ```
384
+
385
+ **Handle return:**
386
+
387
+ **If `## ROADMAP BLOCKED`:** Present blocker, work with user, re-spawn.
388
+
389
+ **If `## ROADMAP CREATED`:** Read ROADMAP.md, present inline:
390
+
391
+ ```
392
+ ## Proposed Roadmap
393
+
394
+ **[N] phases** | **[X] requirements mapped** | All covered ✓
395
+
396
+ | # | Phase | Goal | Requirements | Success Criteria |
397
+ |---|-------|------|--------------|------------------|
398
+ | [N] | [Name] | [Goal] | [REQ-IDs] | [count] |
399
+
400
+ ### Phase Details
401
+
402
+ **Phase [N]: [Name]**
403
+ Goal: [goal]
404
+ Requirements: [REQ-IDs]
405
+ Success criteria:
406
+ 1. [criterion]
407
+ 2. [criterion]
408
+ ```
409
+
410
+ **Ask for approval** via AskUserQuestion:
411
+ - "Approve" — Commit and continue
412
+ - "Adjust phases" — Tell me what to change
413
+ - "Review full file" — Show raw ROADMAP.md
414
+
415
+ **If "Adjust":** Get notes, re-spawn roadmapper with revision context, loop until approved.
416
+ **If "Review":** Display raw ROADMAP.md, re-ask.
417
+
418
+ **Commit roadmap** (after approval):
419
+ ```bash
420
+ node ".agent/bin/mindforge-tools.cjs" commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
421
+ ```
422
+
423
+ ## 11. Done
424
+
425
+ ```
426
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
427
+ MindForge ► MILESTONE INITIALIZED ✓
428
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
429
+
430
+ **Milestone v[X.Y]: [Name]**
431
+
432
+ | Artifact | Location |
433
+ |----------------|-----------------------------|
434
+ | Project | `.planning/PROJECT.md` |
435
+ | Research | `.planning/research/` |
436
+ | Requirements | `.planning/REQUIREMENTS.md` |
437
+ | Roadmap | `.planning/ROADMAP.md` |
438
+
439
+ **[N] phases** | **[X] requirements** | Ready to build ✓
440
+
441
+ ## ▶ Next Up
442
+
443
+ **Phase [N]: [Phase Name]** — [Goal]
444
+
445
+ `/mindforge-discuss-phase [N] ${MindForge_WS}` — gather context and clarify approach
446
+
447
+ <sub>`/clear` first → fresh context window</sub>
448
+
449
+ Also: `/mindforge-plan-phase [N] ${MindForge_WS}` — skip discussion, plan directly
450
+ ```
451
+
452
+ </process>
453
+
454
+ <success_criteria>
455
+ - [ ] PROJECT.md updated with Current Milestone section
456
+ - [ ] STATE.md reset for new milestone
457
+ - [ ] MILESTONE-CONTEXT.md consumed and deleted (if existed)
458
+ - [ ] Research completed (if selected) — 4 parallel agents, milestone-aware
459
+ - [ ] Requirements gathered and scoped per category
460
+ - [ ] REQUIREMENTS.md created with REQ-IDs
461
+ - [ ] mindforge-roadmapper spawned with phase numbering context
462
+ - [ ] Roadmap files written immediately (not draft)
463
+ - [ ] User feedback incorporated (if any)
464
+ - [ ] Phase numbering mode respected (continued or reset)
465
+ - [ ] All commits made (if planning docs committed)
466
+ - [ ] User knows next step: `/mindforge-discuss-phase [N] ${MindForge_WS}`
467
+
468
+ **Atomic commits:** Each phase commits its artifacts immediately.
469
+ </success_criteria>