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,100 @@
1
+ ---
2
+ phase: {N}
3
+ slug: {phase-slug}
4
+ status: draft
5
+ shadcn_initialized: false
6
+ preset: none
7
+ created: {date}
8
+ ---
9
+
10
+ # Phase {N} — UI Design Contract
11
+
12
+ > Visual and interaction contract for frontend phases. Generated by mindforge-ui-researcher, verified by mindforge-ui-checker.
13
+
14
+ ---
15
+
16
+ ## Design System
17
+
18
+ | Property | Value |
19
+ |----------|-------|
20
+ | Tool | {shadcn / none} |
21
+ | Preset | {preset string or "not applicable"} |
22
+ | Component library | {radix / base-ui / none} |
23
+ | Icon library | {library} |
24
+ | Font | {font} |
25
+
26
+ ---
27
+
28
+ ## Spacing Scale
29
+
30
+ Declared values (must be multiples of 4):
31
+
32
+ | Token | Value | Usage |
33
+ |-------|-------|-------|
34
+ | xs | 4px | Icon gaps, inline padding |
35
+ | sm | 8px | Compact element spacing |
36
+ | md | 16px | Default element spacing |
37
+ | lg | 24px | Section padding |
38
+ | xl | 32px | Layout gaps |
39
+ | 2xl | 48px | Major section breaks |
40
+ | 3xl | 64px | Page-level spacing |
41
+
42
+ Exceptions: {list any, or "none"}
43
+
44
+ ---
45
+
46
+ ## Typography
47
+
48
+ | Role | Size | Weight | Line Height |
49
+ |------|------|--------|-------------|
50
+ | Body | {px} | {weight} | {ratio} |
51
+ | Label | {px} | {weight} | {ratio} |
52
+ | Heading | {px} | {weight} | {ratio} |
53
+ | Display | {px} | {weight} | {ratio} |
54
+
55
+ ---
56
+
57
+ ## Color
58
+
59
+ | Role | Value | Usage |
60
+ |------|-------|-------|
61
+ | Dominant (60%) | {hex} | Background, surfaces |
62
+ | Secondary (30%) | {hex} | Cards, sidebar, nav |
63
+ | Accent (10%) | {hex} | {list specific elements only} |
64
+ | Destructive | {hex} | Destructive actions only |
65
+
66
+ Accent reserved for: {explicit list — never "all interactive elements"}
67
+
68
+ ---
69
+
70
+ ## Copywriting Contract
71
+
72
+ | Element | Copy |
73
+ |---------|------|
74
+ | Primary CTA | {specific verb + noun} |
75
+ | Empty state heading | {copy} |
76
+ | Empty state body | {copy + next step} |
77
+ | Error state | {problem + solution path} |
78
+ | Destructive confirmation | {action name}: {confirmation copy} |
79
+
80
+ ---
81
+
82
+ ## Registry Safety
83
+
84
+ | Registry | Blocks Used | Safety Gate |
85
+ |----------|-------------|-------------|
86
+ | shadcn official | {list} | not required |
87
+ | {third-party name} | {list} | shadcn view + diff required |
88
+
89
+ ---
90
+
91
+ ## Checker Sign-Off
92
+
93
+ - [ ] Dimension 1 Copywriting: PASS
94
+ - [ ] Dimension 2 Visuals: PASS
95
+ - [ ] Dimension 3 Color: PASS
96
+ - [ ] Dimension 4 Typography: PASS
97
+ - [ ] Dimension 5 Spacing: PASS
98
+ - [ ] Dimension 6 Registry Safety: PASS
99
+
100
+ **Approval:** {pending / approved YYYY-MM-DD}
@@ -0,0 +1,76 @@
1
+ ---
2
+ phase: {N}
3
+ slug: {phase-slug}
4
+ status: draft
5
+ nyquist_compliant: false
6
+ wave_0_complete: false
7
+ created: {date}
8
+ ---
9
+
10
+ # Phase {N} — Validation Strategy
11
+
12
+ > Per-phase validation contract for feedback sampling during execution.
13
+
14
+ ---
15
+
16
+ ## Test Infrastructure
17
+
18
+ | Property | Value |
19
+ |----------|-------|
20
+ | **Framework** | {pytest 7.x / jest 29.x / vitest / go test / other} |
21
+ | **Config file** | {path or "none — Wave 0 installs"} |
22
+ | **Quick run command** | `{quick command}` |
23
+ | **Full suite command** | `{full command}` |
24
+ | **Estimated runtime** | ~{N} seconds |
25
+
26
+ ---
27
+
28
+ ## Sampling Rate
29
+
30
+ - **After every task commit:** Run `{quick run command}`
31
+ - **After every plan wave:** Run `{full suite command}`
32
+ - **Before `/mindforge-verify-work`:** Full suite must be green
33
+ - **Max feedback latency:** {N} seconds
34
+
35
+ ---
36
+
37
+ ## Per-Task Verification Map
38
+
39
+ | Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
40
+ |---------|------|------|-------------|-----------|-------------------|-------------|--------|
41
+ | {N}-01-01 | 01 | 1 | REQ-{XX} | unit | `{command}` | ✅ / ❌ W0 | ⬜ pending |
42
+
43
+ *Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
44
+
45
+ ---
46
+
47
+ ## Wave 0 Requirements
48
+
49
+ - [ ] `{tests/test_file.py}` — stubs for REQ-{XX}
50
+ - [ ] `{tests/conftest.py}` — shared fixtures
51
+ - [ ] `{framework install}` — if no framework detected
52
+
53
+ *If none: "Existing infrastructure covers all phase requirements."*
54
+
55
+ ---
56
+
57
+ ## Manual-Only Verifications
58
+
59
+ | Behavior | Requirement | Why Manual | Test Instructions |
60
+ |----------|-------------|------------|-------------------|
61
+ | {behavior} | REQ-{XX} | {reason} | {steps} |
62
+
63
+ *If none: "All phase behaviors have automated verification."*
64
+
65
+ ---
66
+
67
+ ## Validation Sign-Off
68
+
69
+ - [ ] All tasks have `<automated>` verify or Wave 0 dependencies
70
+ - [ ] Sampling continuity: no 3 consecutive tasks without automated verify
71
+ - [ ] Wave 0 covers all MISSING references
72
+ - [ ] No watch-mode flags
73
+ - [ ] Feedback latency < {N}s
74
+ - [ ] `nyquist_compliant: true` set in frontmatter
75
+
76
+ **Approval:** {pending / approved YYYY-MM-DD}
@@ -0,0 +1,322 @@
1
+ # Verification Report Template
2
+
3
+ Template for `.planning/phases/XX-name/{phase_num}-VERIFICATION.md` — phase goal verification results.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ phase: XX-name
12
+ verified: YYYY-MM-DDTHH:MM:SSZ
13
+ status: passed | gaps_found | human_needed
14
+ score: N/M must-haves verified
15
+ ---
16
+
17
+ # Phase {X}: {Name} Verification Report
18
+
19
+ **Phase Goal:** {goal from ROADMAP.md}
20
+ **Verified:** {timestamp}
21
+ **Status:** {passed | gaps_found | human_needed}
22
+
23
+ ## Goal Achievement
24
+
25
+ ### Observable Truths
26
+
27
+ | # | Truth | Status | Evidence |
28
+ |---|-------|--------|----------|
29
+ | 1 | {truth from must_haves} | ✓ VERIFIED | {what confirmed it} |
30
+ | 2 | {truth from must_haves} | ✗ FAILED | {what's wrong} |
31
+ | 3 | {truth from must_haves} | ? UNCERTAIN | {why can't verify} |
32
+
33
+ **Score:** {N}/{M} truths verified
34
+
35
+ ### Required Artifacts
36
+
37
+ | Artifact | Expected | Status | Details |
38
+ |----------|----------|--------|---------|
39
+ | `src/components/Chat.tsx` | Message list component | ✓ EXISTS + SUBSTANTIVE | Exports ChatList, renders Message[], no stubs |
40
+ | `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | File exists but POST returns placeholder |
41
+ | `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Model defined with all fields |
42
+
43
+ **Artifacts:** {N}/{M} verified
44
+
45
+ ### Key Link Verification
46
+
47
+ | From | To | Via | Status | Details |
48
+ |------|----|----|--------|---------|
49
+ | Chat.tsx | /api/chat | fetch in useEffect | ✓ WIRED | Line 23: `fetch('/api/chat')` with response handling |
50
+ | ChatInput | /api/chat POST | onSubmit handler | ✗ NOT WIRED | onSubmit only calls console.log |
51
+ | /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns hardcoded response, no DB call |
52
+
53
+ **Wiring:** {N}/{M} connections verified
54
+
55
+ ## Requirements Coverage
56
+
57
+ | Requirement | Status | Blocking Issue |
58
+ |-------------|--------|----------------|
59
+ | {REQ-01}: {description} | ✓ SATISFIED | - |
60
+ | {REQ-02}: {description} | ✗ BLOCKED | API route is stub |
61
+ | {REQ-03}: {description} | ? NEEDS HUMAN | Can't verify WebSocket programmatically |
62
+
63
+ **Coverage:** {N}/{M} requirements satisfied
64
+
65
+ ## Anti-Patterns Found
66
+
67
+ | File | Line | Pattern | Severity | Impact |
68
+ |------|------|---------|----------|--------|
69
+ | src/app/api/chat/route.ts | 12 | `// TODO: implement` | ⚠️ Warning | Indicates incomplete |
70
+ | src/components/Chat.tsx | 45 | `return <div>Placeholder</div>` | 🛑 Blocker | Renders no content |
71
+ | src/hooks/useChat.ts | - | File missing | 🛑 Blocker | Expected hook doesn't exist |
72
+
73
+ **Anti-patterns:** {N} found ({blockers} blockers, {warnings} warnings)
74
+
75
+ ## Human Verification Required
76
+
77
+ {If no human verification needed:}
78
+ None — all verifiable items checked programmatically.
79
+
80
+ {If human verification needed:}
81
+
82
+ ### 1. {Test Name}
83
+ **Test:** {What to do}
84
+ **Expected:** {What should happen}
85
+ **Why human:** {Why can't verify programmatically}
86
+
87
+ ### 2. {Test Name}
88
+ **Test:** {What to do}
89
+ **Expected:** {What should happen}
90
+ **Why human:** {Why can't verify programmatically}
91
+
92
+ ## Gaps Summary
93
+
94
+ {If no gaps:}
95
+ **No gaps found.** Phase goal achieved. Ready to proceed.
96
+
97
+ {If gaps found:}
98
+
99
+ ### Critical Gaps (Block Progress)
100
+
101
+ 1. **{Gap name}**
102
+ - Missing: {what's missing}
103
+ - Impact: {why this blocks the goal}
104
+ - Fix: {what needs to happen}
105
+
106
+ 2. **{Gap name}**
107
+ - Missing: {what's missing}
108
+ - Impact: {why this blocks the goal}
109
+ - Fix: {what needs to happen}
110
+
111
+ ### Non-Critical Gaps (Can Defer)
112
+
113
+ 1. **{Gap name}**
114
+ - Issue: {what's wrong}
115
+ - Impact: {limited impact because...}
116
+ - Recommendation: {fix now or defer}
117
+
118
+ ## Recommended Fix Plans
119
+
120
+ {If gaps found, generate fix plan recommendations:}
121
+
122
+ ### {phase}-{next}-PLAN.md: {Fix Name}
123
+
124
+ **Objective:** {What this fixes}
125
+
126
+ **Tasks:**
127
+ 1. {Task to fix gap 1}
128
+ 2. {Task to fix gap 2}
129
+ 3. {Verification task}
130
+
131
+ **Estimated scope:** {Small / Medium}
132
+
133
+ ---
134
+
135
+ ### {phase}-{next+1}-PLAN.md: {Fix Name}
136
+
137
+ **Objective:** {What this fixes}
138
+
139
+ **Tasks:**
140
+ 1. {Task}
141
+ 2. {Task}
142
+
143
+ **Estimated scope:** {Small / Medium}
144
+
145
+ ---
146
+
147
+ ## Verification Metadata
148
+
149
+ **Verification approach:** Goal-backward (derived from phase goal)
150
+ **Must-haves source:** {PLAN.md frontmatter | derived from ROADMAP.md goal}
151
+ **Automated checks:** {N} passed, {M} failed
152
+ **Human checks required:** {N}
153
+ **Total verification time:** {duration}
154
+
155
+ ---
156
+ *Verified: {timestamp}*
157
+ *Verifier: the agent (subagent)*
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Guidelines
163
+
164
+ **Status values:**
165
+ - `passed` — All must-haves verified, no blockers
166
+ - `gaps_found` — One or more critical gaps found
167
+ - `human_needed` — Automated checks pass but human verification required
168
+
169
+ **Evidence types:**
170
+ - For EXISTS: "File at path, exports X"
171
+ - For SUBSTANTIVE: "N lines, has patterns X, Y, Z"
172
+ - For WIRED: "Line N: code that connects A to B"
173
+ - For FAILED: "Missing because X" or "Stub because Y"
174
+
175
+ **Severity levels:**
176
+ - 🛑 Blocker: Prevents goal achievement, must fix
177
+ - ⚠️ Warning: Indicates incomplete but doesn't block
178
+ - ℹ️ Info: Notable but not problematic
179
+
180
+ **Fix plan generation:**
181
+ - Only generate if gaps_found
182
+ - Group related fixes into single plans
183
+ - Keep to 2-3 tasks per plan
184
+ - Include verification task in each plan
185
+
186
+ ---
187
+
188
+ ## Example
189
+
190
+ ```markdown
191
+ ---
192
+ phase: 03-chat
193
+ verified: 2025-01-15T14:30:00Z
194
+ status: gaps_found
195
+ score: 2/5 must-haves verified
196
+ ---
197
+
198
+ # Phase 3: Chat Interface Verification Report
199
+
200
+ **Phase Goal:** Working chat interface where users can send and receive messages
201
+ **Verified:** 2025-01-15T14:30:00Z
202
+ **Status:** gaps_found
203
+
204
+ ## Goal Achievement
205
+
206
+ ### Observable Truths
207
+
208
+ | # | Truth | Status | Evidence |
209
+ |---|-------|--------|----------|
210
+ | 1 | User can see existing messages | ✗ FAILED | Component renders placeholder, not message data |
211
+ | 2 | User can type a message | ✓ VERIFIED | Input field exists with onChange handler |
212
+ | 3 | User can send a message | ✗ FAILED | onSubmit handler is console.log only |
213
+ | 4 | Sent message appears in list | ✗ FAILED | No state update after send |
214
+ | 5 | Messages persist across refresh | ? UNCERTAIN | Can't verify - send doesn't work |
215
+
216
+ **Score:** 1/5 truths verified
217
+
218
+ ### Required Artifacts
219
+
220
+ | Artifact | Expected | Status | Details |
221
+ |----------|----------|--------|---------|
222
+ | `src/components/Chat.tsx` | Message list component | ✗ STUB | Returns `<div>Chat will be here</div>` |
223
+ | `src/components/ChatInput.tsx` | Message input | ✓ EXISTS + SUBSTANTIVE | Form with input, submit button, handlers |
224
+ | `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | GET returns [], POST returns { ok: true } |
225
+ | `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Message model with id, content, userId, createdAt |
226
+
227
+ **Artifacts:** 2/4 verified
228
+
229
+ ### Key Link Verification
230
+
231
+ | From | To | Via | Status | Details |
232
+ |------|----|----|--------|---------|
233
+ | Chat.tsx | /api/chat GET | fetch | ✗ NOT WIRED | No fetch call in component |
234
+ | ChatInput | /api/chat POST | onSubmit | ✗ NOT WIRED | Handler only logs, doesn't fetch |
235
+ | /api/chat GET | database | prisma.message.findMany | ✗ NOT WIRED | Returns hardcoded [] |
236
+ | /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns { ok: true }, no DB call |
237
+
238
+ **Wiring:** 0/4 connections verified
239
+
240
+ ## Requirements Coverage
241
+
242
+ | Requirement | Status | Blocking Issue |
243
+ |-------------|--------|----------------|
244
+ | CHAT-01: User can send message | ✗ BLOCKED | API POST is stub |
245
+ | CHAT-02: User can view messages | ✗ BLOCKED | Component is placeholder |
246
+ | CHAT-03: Messages persist | ✗ BLOCKED | No database integration |
247
+
248
+ **Coverage:** 0/3 requirements satisfied
249
+
250
+ ## Anti-Patterns Found
251
+
252
+ | File | Line | Pattern | Severity | Impact |
253
+ |------|------|---------|----------|--------|
254
+ | src/components/Chat.tsx | 8 | `<div>Chat will be here</div>` | 🛑 Blocker | No actual content |
255
+ | src/app/api/chat/route.ts | 5 | `return Response.json([])` | 🛑 Blocker | Hardcoded empty |
256
+ | src/app/api/chat/route.ts | 12 | `// TODO: save to database` | ⚠️ Warning | Incomplete |
257
+
258
+ **Anti-patterns:** 3 found (2 blockers, 1 warning)
259
+
260
+ ## Human Verification Required
261
+
262
+ None needed until automated gaps are fixed.
263
+
264
+ ## Gaps Summary
265
+
266
+ ### Critical Gaps (Block Progress)
267
+
268
+ 1. **Chat component is placeholder**
269
+ - Missing: Actual message list rendering
270
+ - Impact: Users see "Chat will be here" instead of messages
271
+ - Fix: Implement Chat.tsx to fetch and render messages
272
+
273
+ 2. **API routes are stubs**
274
+ - Missing: Database integration in GET and POST
275
+ - Impact: No data persistence, no real functionality
276
+ - Fix: Wire prisma calls in route handlers
277
+
278
+ 3. **No wiring between frontend and backend**
279
+ - Missing: fetch calls in components
280
+ - Impact: Even if API worked, UI wouldn't call it
281
+ - Fix: Add useEffect fetch in Chat, onSubmit fetch in ChatInput
282
+
283
+ ## Recommended Fix Plans
284
+
285
+ ### 03-04-PLAN.md: Implement Chat API
286
+
287
+ **Objective:** Wire API routes to database
288
+
289
+ **Tasks:**
290
+ 1. Implement GET /api/chat with prisma.message.findMany
291
+ 2. Implement POST /api/chat with prisma.message.create
292
+ 3. Verify: API returns real data, POST creates records
293
+
294
+ **Estimated scope:** Small
295
+
296
+ ---
297
+
298
+ ### 03-05-PLAN.md: Implement Chat UI
299
+
300
+ **Objective:** Wire Chat component to API
301
+
302
+ **Tasks:**
303
+ 1. Implement Chat.tsx with useEffect fetch and message rendering
304
+ 2. Wire ChatInput onSubmit to POST /api/chat
305
+ 3. Verify: Messages display, new messages appear after send
306
+
307
+ **Estimated scope:** Small
308
+
309
+ ---
310
+
311
+ ## Verification Metadata
312
+
313
+ **Verification approach:** Goal-backward (derived from phase goal)
314
+ **Must-haves source:** 03-01-PLAN.md frontmatter
315
+ **Automated checks:** 2 passed, 8 failed
316
+ **Human checks required:** 0 (blocked by automated failures)
317
+ **Total verification time:** 2 min
318
+
319
+ ---
320
+ *Verified: 2025-01-15T14:30:00Z*
321
+ *Verifier: the agent (subagent)*
322
+ ```
@@ -0,0 +1,204 @@
1
+ # Architecture Research Template
2
+
3
+ Template for `.mindforge/research/ARCHITECTURE.md` — system structure patterns for the project domain.
4
+
5
+ <template>
6
+
7
+ ```markdown
8
+ # Architecture Research
9
+
10
+ **Domain:** [domain type]
11
+ **Researched:** [date]
12
+ **Confidence:** [HIGH/MEDIUM/LOW]
13
+
14
+ ## Standard Architecture
15
+
16
+ ### System Overview
17
+
18
+ ```
19
+ ┌─────────────────────────────────────────────────────────────┐
20
+ │ [Layer Name] │
21
+ ├─────────────────────────────────────────────────────────────┤
22
+ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
23
+ │ │ [Comp] │ │ [Comp] │ │ [Comp] │ │ [Comp] │ │
24
+ │ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
25
+ │ │ │ │ │ │
26
+ ├───────┴────────────┴────────────┴────────────┴──────────────┤
27
+ │ [Layer Name] │
28
+ ├─────────────────────────────────────────────────────────────┤
29
+ │ ┌─────────────────────────────────────────────────────┐ │
30
+ │ │ [Component] │ │
31
+ │ └─────────────────────────────────────────────────────┘ │
32
+ ├─────────────────────────────────────────────────────────────┤
33
+ │ [Layer Name] │
34
+ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
35
+ │ │ [Store] │ │ [Store] │ │ [Store] │ │
36
+ │ └──────────┘ └──────────┘ └──────────┘ │
37
+ └─────────────────────────────────────────────────────────────┘
38
+ ```
39
+
40
+ ### Component Responsibilities
41
+
42
+ | Component | Responsibility | Typical Implementation |
43
+ |-----------|----------------|------------------------|
44
+ | [name] | [what it owns] | [how it's usually built] |
45
+ | [name] | [what it owns] | [how it's usually built] |
46
+ | [name] | [what it owns] | [how it's usually built] |
47
+
48
+ ## Recommended Project Structure
49
+
50
+ ```
51
+ src/
52
+ ├── [folder]/ # [purpose]
53
+ │ ├── [subfolder]/ # [purpose]
54
+ │ └── [file].ts # [purpose]
55
+ ├── [folder]/ # [purpose]
56
+ │ ├── [subfolder]/ # [purpose]
57
+ │ └── [file].ts # [purpose]
58
+ ├── [folder]/ # [purpose]
59
+ └── [folder]/ # [purpose]
60
+ ```
61
+
62
+ ### Structure Rationale
63
+
64
+ - **[folder]/:** [why organized this way]
65
+ - **[folder]/:** [why organized this way]
66
+
67
+ ## Architectural Patterns
68
+
69
+ ### Pattern 1: [Pattern Name]
70
+
71
+ **What:** [description]
72
+ **When to use:** [conditions]
73
+ **Trade-offs:** [pros and cons]
74
+
75
+ **Example:**
76
+ ```typescript
77
+ // [Brief code example showing the pattern]
78
+ ```
79
+
80
+ ### Pattern 2: [Pattern Name]
81
+
82
+ **What:** [description]
83
+ **When to use:** [conditions]
84
+ **Trade-offs:** [pros and cons]
85
+
86
+ **Example:**
87
+ ```typescript
88
+ // [Brief code example showing the pattern]
89
+ ```
90
+
91
+ ### Pattern 3: [Pattern Name]
92
+
93
+ **What:** [description]
94
+ **When to use:** [conditions]
95
+ **Trade-offs:** [pros and cons]
96
+
97
+ ## Data Flow
98
+
99
+ ### Request Flow
100
+
101
+ ```
102
+ [User Action]
103
+
104
+ [Component] → [Handler] → [Service] → [Data Store]
105
+ ↓ ↓ ↓ ↓
106
+ [Response] ← [Transform] ← [Query] ← [Database]
107
+ ```
108
+
109
+ ### State Management
110
+
111
+ ```
112
+ [State Store]
113
+ ↓ (subscribe)
114
+ [Components] ←→ [Actions] → [Reducers/Mutations] → [State Store]
115
+ ```
116
+
117
+ ### Key Data Flows
118
+
119
+ 1. **[Flow name]:** [description of how data moves]
120
+ 2. **[Flow name]:** [description of how data moves]
121
+
122
+ ## Scaling Considerations
123
+
124
+ | Scale | Architecture Adjustments |
125
+ |-------|--------------------------|
126
+ | 0-1k users | [approach — usually monolith is fine] |
127
+ | 1k-100k users | [approach — what to optimize first] |
128
+ | 100k+ users | [approach — when to consider splitting] |
129
+
130
+ ### Scaling Priorities
131
+
132
+ 1. **First bottleneck:** [what breaks first, how to fix]
133
+ 2. **Second bottleneck:** [what breaks next, how to fix]
134
+
135
+ ## Anti-Patterns
136
+
137
+ ### Anti-Pattern 1: [Name]
138
+
139
+ **What people do:** [the mistake]
140
+ **Why it's wrong:** [the problem it causes]
141
+ **Do this instead:** [the correct approach]
142
+
143
+ ### Anti-Pattern 2: [Name]
144
+
145
+ **What people do:** [the mistake]
146
+ **Why it's wrong:** [the problem it causes]
147
+ **Do this instead:** [the correct approach]
148
+
149
+ ## Integration Points
150
+
151
+ ### External Services
152
+
153
+ | Service | Integration Pattern | Notes |
154
+ |---------|---------------------|-------|
155
+ | [service] | [how to connect] | [gotchas] |
156
+ | [service] | [how to connect] | [gotchas] |
157
+
158
+ ### Internal Boundaries
159
+
160
+ | Boundary | Communication | Notes |
161
+ |----------|---------------|-------|
162
+ | [module A ↔ module B] | [API/events/direct] | [considerations] |
163
+
164
+ ## Sources
165
+
166
+ - [Architecture references]
167
+ - [Official documentation]
168
+ - [Case studies]
169
+
170
+ ---
171
+ *Architecture research for: [domain]*
172
+ *Researched: [date]*
173
+ ```
174
+
175
+ </template>
176
+
177
+ <guidelines>
178
+
179
+ **System Overview:**
180
+ - Use ASCII box-drawing diagrams for clarity (├── └── │ ─ for structure visualization only)
181
+ - Show major components and their relationships
182
+ - Don't over-detail — this is conceptual, not implementation
183
+
184
+ **Project Structure:**
185
+ - Be specific about folder organization
186
+ - Explain the rationale for grouping
187
+ - Match conventions of the chosen stack
188
+
189
+ **Patterns:**
190
+ - Include code examples where helpful
191
+ - Explain trade-offs honestly
192
+ - Note when patterns are overkill for small projects
193
+
194
+ **Scaling Considerations:**
195
+ - Be realistic — most projects don't need to scale to millions
196
+ - Focus on "what breaks first" not theoretical limits
197
+ - Avoid premature optimization recommendations
198
+
199
+ **Anti-Patterns:**
200
+ - Specific to this domain
201
+ - Include what to do instead
202
+ - Helps prevent common mistakes during implementation
203
+
204
+ </guidelines>