mindforge-cc 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/.agent/CLAUDE.md +462 -0
  2. package/.agent/forge/help.md +7 -0
  3. package/.agent/forge/init-project.md +32 -0
  4. package/.agent/forge/plan-phase.md +30 -0
  5. package/.agent/mindforge/approve.md +18 -0
  6. package/.agent/mindforge/audit.md +30 -0
  7. package/.agent/mindforge/benchmark.md +33 -0
  8. package/.agent/mindforge/complete-milestone.md +18 -0
  9. package/.agent/mindforge/debug.md +126 -0
  10. package/.agent/mindforge/discuss-phase.md +138 -0
  11. package/.agent/mindforge/execute-phase.md +165 -0
  12. package/.agent/mindforge/health.md +21 -0
  13. package/.agent/mindforge/help.md +23 -0
  14. package/.agent/mindforge/init-org.md +131 -0
  15. package/.agent/mindforge/init-project.md +155 -0
  16. package/.agent/mindforge/install-skill.md +15 -0
  17. package/.agent/mindforge/map-codebase.md +298 -0
  18. package/.agent/mindforge/metrics.md +22 -0
  19. package/.agent/mindforge/migrate.md +40 -0
  20. package/.agent/mindforge/milestone.md +12 -0
  21. package/.agent/mindforge/next.md +105 -0
  22. package/.agent/mindforge/plan-phase.md +125 -0
  23. package/.agent/mindforge/plugins.md +40 -0
  24. package/.agent/mindforge/pr-review.md +41 -0
  25. package/.agent/mindforge/profile-team.md +23 -0
  26. package/.agent/mindforge/publish-skill.md +19 -0
  27. package/.agent/mindforge/quick.md +135 -0
  28. package/.agent/mindforge/release.md +10 -0
  29. package/.agent/mindforge/retrospective.md +26 -0
  30. package/.agent/mindforge/review.md +157 -0
  31. package/.agent/mindforge/security-scan.md +233 -0
  32. package/.agent/mindforge/ship.md +100 -0
  33. package/.agent/mindforge/skills.md +141 -0
  34. package/.agent/mindforge/status.md +104 -0
  35. package/.agent/mindforge/sync-confluence.md +11 -0
  36. package/.agent/mindforge/sync-jira.md +12 -0
  37. package/.agent/mindforge/tokens.md +8 -0
  38. package/.agent/mindforge/update.md +42 -0
  39. package/.agent/mindforge/verify-phase.md +62 -0
  40. package/.agent/mindforge/workspace.md +29 -0
  41. package/.claude/CLAUDE.md +462 -0
  42. package/.claude/commands/forge/help.md +7 -0
  43. package/.claude/commands/forge/init-project.md +32 -0
  44. package/.claude/commands/forge/plan-phase.md +30 -0
  45. package/.claude/commands/mindforge/approve.md +18 -0
  46. package/.claude/commands/mindforge/audit.md +30 -0
  47. package/.claude/commands/mindforge/benchmark.md +33 -0
  48. package/.claude/commands/mindforge/complete-milestone.md +18 -0
  49. package/.claude/commands/mindforge/debug.md +126 -0
  50. package/.claude/commands/mindforge/discuss-phase.md +138 -0
  51. package/.claude/commands/mindforge/execute-phase.md +165 -0
  52. package/.claude/commands/mindforge/health.md +21 -0
  53. package/.claude/commands/mindforge/help.md +23 -0
  54. package/.claude/commands/mindforge/init-org.md +131 -0
  55. package/.claude/commands/mindforge/init-project.md +155 -0
  56. package/.claude/commands/mindforge/install-skill.md +15 -0
  57. package/.claude/commands/mindforge/map-codebase.md +298 -0
  58. package/.claude/commands/mindforge/metrics.md +22 -0
  59. package/.claude/commands/mindforge/migrate.md +40 -0
  60. package/.claude/commands/mindforge/milestone.md +12 -0
  61. package/.claude/commands/mindforge/next.md +105 -0
  62. package/.claude/commands/mindforge/plan-phase.md +125 -0
  63. package/.claude/commands/mindforge/plugins.md +40 -0
  64. package/.claude/commands/mindforge/pr-review.md +41 -0
  65. package/.claude/commands/mindforge/profile-team.md +23 -0
  66. package/.claude/commands/mindforge/publish-skill.md +19 -0
  67. package/.claude/commands/mindforge/quick.md +135 -0
  68. package/.claude/commands/mindforge/release.md +10 -0
  69. package/.claude/commands/mindforge/retrospective.md +26 -0
  70. package/.claude/commands/mindforge/review.md +157 -0
  71. package/.claude/commands/mindforge/security-scan.md +233 -0
  72. package/.claude/commands/mindforge/ship.md +100 -0
  73. package/.claude/commands/mindforge/skills.md +141 -0
  74. package/.claude/commands/mindforge/status.md +104 -0
  75. package/.claude/commands/mindforge/sync-confluence.md +11 -0
  76. package/.claude/commands/mindforge/sync-jira.md +12 -0
  77. package/.claude/commands/mindforge/tokens.md +8 -0
  78. package/.claude/commands/mindforge/update.md +42 -0
  79. package/.claude/commands/mindforge/verify-phase.md +62 -0
  80. package/.claude/commands/mindforge/workspace.md +29 -0
  81. package/.forge/org/CONVENTIONS.md +0 -0
  82. package/.forge/org/ORG.md +0 -0
  83. package/.forge/org/SECURITY.md +0 -0
  84. package/.forge/org/TOOLS.md +0 -0
  85. package/.forge/personas/analyst.md +0 -0
  86. package/.forge/personas/architect.md +0 -0
  87. package/.forge/personas/debug-specialist.md +0 -0
  88. package/.forge/personas/developer.md +26 -0
  89. package/.forge/personas/qa-engineer.md +0 -0
  90. package/.forge/personas/release-manager.md +0 -0
  91. package/.forge/personas/security-reviewer.md +33 -0
  92. package/.forge/personas/tech-writer.md +0 -0
  93. package/.forge/skills/api-design/SKILL.md +0 -0
  94. package/.forge/skills/code-quality/SKILL.md +0 -0
  95. package/.forge/skills/documentation/SKILL.md +0 -0
  96. package/.forge/skills/security-review/SKILL.md +23 -0
  97. package/.forge/skills/testing-standards/SKILL.md +27 -0
  98. package/.github/workflows/mindforge-ci.yml +224 -0
  99. package/.gitlab-ci-mindforge.yml +18 -0
  100. package/.mindforge/MINDFORGE-SCHEMA.json +165 -0
  101. package/.mindforge/audit/AUDIT-SCHEMA.md +451 -0
  102. package/.mindforge/ci/ci-config-schema.md +21 -0
  103. package/.mindforge/ci/ci-mode.md +179 -0
  104. package/.mindforge/ci/github-actions-adapter.md +224 -0
  105. package/.mindforge/ci/gitlab-ci-adapter.md +31 -0
  106. package/.mindforge/ci/jenkins-adapter.md +44 -0
  107. package/.mindforge/distribution/registry-client.md +166 -0
  108. package/.mindforge/distribution/registry-schema.md +96 -0
  109. package/.mindforge/distribution/skill-publisher.md +44 -0
  110. package/.mindforge/distribution/skill-validator.md +74 -0
  111. package/.mindforge/engine/compaction-protocol.md +182 -0
  112. package/.mindforge/engine/context-injector.md +128 -0
  113. package/.mindforge/engine/dependency-parser.md +113 -0
  114. package/.mindforge/engine/skills/conflict-resolver.md +69 -0
  115. package/.mindforge/engine/skills/loader.md +184 -0
  116. package/.mindforge/engine/skills/registry.md +98 -0
  117. package/.mindforge/engine/skills/versioning.md +75 -0
  118. package/.mindforge/engine/verification-pipeline.md +111 -0
  119. package/.mindforge/engine/wave-executor.md +235 -0
  120. package/.mindforge/governance/GOVERNANCE-CONFIG.md +17 -0
  121. package/.mindforge/governance/approval-workflow.md +37 -0
  122. package/.mindforge/governance/change-classifier.md +63 -0
  123. package/.mindforge/governance/compliance-gates.md +31 -0
  124. package/.mindforge/integrations/confluence.md +27 -0
  125. package/.mindforge/integrations/connection-manager.md +163 -0
  126. package/.mindforge/integrations/github.md +25 -0
  127. package/.mindforge/integrations/gitlab.md +13 -0
  128. package/.mindforge/integrations/jira.md +102 -0
  129. package/.mindforge/integrations/slack.md +41 -0
  130. package/.mindforge/intelligence/antipattern-detector.md +75 -0
  131. package/.mindforge/intelligence/difficulty-scorer.md +55 -0
  132. package/.mindforge/intelligence/health-engine.md +208 -0
  133. package/.mindforge/intelligence/skill-gap-analyser.md +40 -0
  134. package/.mindforge/intelligence/smart-compaction.md +71 -0
  135. package/.mindforge/metrics/METRICS-SCHEMA.md +42 -0
  136. package/.mindforge/metrics/quality-tracker.md +32 -0
  137. package/.mindforge/monorepo/cross-package-planner.md +114 -0
  138. package/.mindforge/monorepo/dependency-graph-builder.md +32 -0
  139. package/.mindforge/monorepo/workspace-detector.md +129 -0
  140. package/.mindforge/org/CONVENTIONS.md +62 -0
  141. package/.mindforge/org/ORG.md +51 -0
  142. package/.mindforge/org/SECURITY.md +50 -0
  143. package/.mindforge/org/TOOLS.md +53 -0
  144. package/.mindforge/org/integrations/INTEGRATIONS-CONFIG.md +58 -0
  145. package/.mindforge/org/skills/MANIFEST.md +38 -0
  146. package/.mindforge/personas/analyst.md +52 -0
  147. package/.mindforge/personas/architect.md +75 -0
  148. package/.mindforge/personas/debug-specialist.md +52 -0
  149. package/.mindforge/personas/developer.md +85 -0
  150. package/.mindforge/personas/overrides/README.md +85 -0
  151. package/.mindforge/personas/qa-engineer.md +61 -0
  152. package/.mindforge/personas/release-manager.md +76 -0
  153. package/.mindforge/personas/security-reviewer.md +91 -0
  154. package/.mindforge/personas/tech-writer.md +51 -0
  155. package/.mindforge/plugins/PLUGINS-MANIFEST.md +23 -0
  156. package/.mindforge/plugins/plugin-loader.md +93 -0
  157. package/.mindforge/plugins/plugin-registry.md +44 -0
  158. package/.mindforge/plugins/plugin-schema.md +68 -0
  159. package/.mindforge/pr-review/ai-reviewer.md +266 -0
  160. package/.mindforge/pr-review/finding-formatter.md +46 -0
  161. package/.mindforge/pr-review/review-prompt-templates.md +44 -0
  162. package/.mindforge/production/compatibility-layer.md +39 -0
  163. package/.mindforge/production/migration-engine.md +52 -0
  164. package/.mindforge/production/production-checklist.md +165 -0
  165. package/.mindforge/production/token-optimiser.md +68 -0
  166. package/.mindforge/skills/accessibility/SKILL.md +106 -0
  167. package/.mindforge/skills/api-design/SKILL.md +98 -0
  168. package/.mindforge/skills/code-quality/SKILL.md +88 -0
  169. package/.mindforge/skills/data-privacy/SKILL.md +126 -0
  170. package/.mindforge/skills/database-patterns/SKILL.md +192 -0
  171. package/.mindforge/skills/documentation/SKILL.md +91 -0
  172. package/.mindforge/skills/incident-response/SKILL.md +180 -0
  173. package/.mindforge/skills/performance/SKILL.md +120 -0
  174. package/.mindforge/skills/security-review/SKILL.md +83 -0
  175. package/.mindforge/skills/testing-standards/SKILL.md +97 -0
  176. package/.mindforge/team/TEAM-PROFILE.md +42 -0
  177. package/.mindforge/team/multi-handoff.md +23 -0
  178. package/.mindforge/team/profiles/README.md +13 -0
  179. package/.mindforge/team/session-merger.md +18 -0
  180. package/.planning/ARCHITECTURE.md +0 -0
  181. package/.planning/AUDIT.jsonl +0 -0
  182. package/.planning/HANDOFF.json +28 -0
  183. package/.planning/PROJECT.md +33 -0
  184. package/.planning/RELEASE-CHECKLIST.md +68 -0
  185. package/.planning/REQUIREMENTS.md +0 -0
  186. package/.planning/ROADMAP.md +0 -0
  187. package/.planning/STATE.md +31 -0
  188. package/.planning/approvals/.gitkeep +1 -0
  189. package/.planning/archive/.gitkeep +1 -0
  190. package/.planning/audit-archive/.gitkeep +1 -0
  191. package/.planning/decisions/.gitkeep +0 -0
  192. package/.planning/decisions/ADR-001-handoff-tracking.md +41 -0
  193. package/.planning/decisions/ADR-002-markdown-commands.md +46 -0
  194. package/.planning/decisions/ADR-003-skills-trigger-model.md +37 -0
  195. package/.planning/decisions/ADR-004-wave-parallelism-model.md +45 -0
  196. package/.planning/decisions/ADR-005-append-only-audit-log.md +51 -0
  197. package/.planning/decisions/ADR-006-tiered-skills-system.md +22 -0
  198. package/.planning/decisions/ADR-007-trigger-keyword-model.md +22 -0
  199. package/.planning/decisions/ADR-008-just-in-time-skill-loading.md +29 -0
  200. package/.planning/decisions/ADR-009-enterprise-integration-retry-policy.md +8 -0
  201. package/.planning/decisions/ADR-010-governance-tier-escalation.md +8 -0
  202. package/.planning/decisions/ADR-011-multi-developer-handoff-contract.md +8 -0
  203. package/.planning/decisions/ADR-012-intelligence-feedback-loops.md +19 -0
  204. package/.planning/decisions/ADR-013-mindforge-md-constitution.md +16 -0
  205. package/.planning/decisions/ADR-014-metrics-as-signals-not-evaluation.md +15 -0
  206. package/.planning/decisions/ADR-015-npm-based-skill-registry.md +26 -0
  207. package/.planning/decisions/ADR-016-ci-exit-code-0-on-timeout.md +27 -0
  208. package/.planning/decisions/ADR-017-sdk-localhost-only.md +28 -0
  209. package/.planning/decisions/ADR-018-installer-self-install-detection.md +15 -0
  210. package/.planning/decisions/ADR-019-self-update-scope-preservation.md +14 -0
  211. package/.planning/decisions/ADR-020-v1.0.0-stable-interface-contract.md +23 -0
  212. package/.planning/jira-sync.json +9 -0
  213. package/.planning/milestones/.gitkeep +1 -0
  214. package/.planning/phases/day1/REVIEW-DAY1.md +50 -0
  215. package/.planning/phases/day1/SECURITY-REVIEW-DAY1.md +15 -0
  216. package/.planning/phases/day2/REVIEW-DAY2.md +521 -0
  217. package/.planning/phases/day3/REVIEW-DAY3.md +234 -0
  218. package/.planning/slack-threads.json +6 -0
  219. package/CHANGELOG.md +175 -0
  220. package/LICENSE +21 -0
  221. package/MINDFORGE.md +76 -0
  222. package/README.md +182 -0
  223. package/RELEASENOTES.md +41 -0
  224. package/SECURITY.md +4 -0
  225. package/bin/install.js +120 -0
  226. package/bin/installer-core.js +292 -0
  227. package/bin/migrations/0.1.0-to-0.5.0.js +37 -0
  228. package/bin/migrations/0.5.0-to-0.6.0.js +17 -0
  229. package/bin/migrations/0.6.0-to-1.0.0.js +100 -0
  230. package/bin/migrations/migrate.js +151 -0
  231. package/bin/migrations/schema-versions.js +64 -0
  232. package/bin/updater/changelog-fetcher.js +62 -0
  233. package/bin/updater/self-update.js +169 -0
  234. package/bin/updater/version-comparator.js +68 -0
  235. package/bin/validate-config.js +92 -0
  236. package/bin/wizard/config-generator.js +112 -0
  237. package/bin/wizard/environment-detector.js +76 -0
  238. package/bin/wizard/setup-wizard.js +237 -0
  239. package/docs/Context/Master-Context.md +701 -0
  240. package/docs/architecture/README.md +35 -0
  241. package/docs/architecture/decision-records-index.md +26 -0
  242. package/docs/ci-cd-integration.md +30 -0
  243. package/docs/ci-quickstart.md +78 -0
  244. package/docs/commands-reference.md +11 -0
  245. package/docs/contributing/CONTRIBUTING.md +38 -0
  246. package/docs/contributing/plugin-authoring.md +50 -0
  247. package/docs/contributing/skill-authoring.md +41 -0
  248. package/docs/enterprise-setup.md +25 -0
  249. package/docs/faq.md +38 -0
  250. package/docs/getting-started.md +36 -0
  251. package/docs/governance-guide.md +23 -0
  252. package/docs/mindforge-md-reference.md +53 -0
  253. package/docs/monorepo-guide.md +26 -0
  254. package/docs/persona-customisation.md +56 -0
  255. package/docs/quick-verify.md +33 -0
  256. package/docs/reference/audit-events.md +53 -0
  257. package/docs/reference/commands.md +82 -0
  258. package/docs/reference/config-reference.md +64 -0
  259. package/docs/reference/sdk-api.md +48 -0
  260. package/docs/reference/skills-api.md +57 -0
  261. package/docs/release-checklist-guide.md +37 -0
  262. package/docs/requirements.md +29 -0
  263. package/docs/sdk-reference.md +27 -0
  264. package/docs/security/SECURITY.md +42 -0
  265. package/docs/security/penetration-test-results.md +31 -0
  266. package/docs/security/threat-model.md +142 -0
  267. package/docs/skills-authoring-guide.md +119 -0
  268. package/docs/skills-publishing-guide.md +21 -0
  269. package/docs/team-setup-guide.md +21 -0
  270. package/docs/troubleshooting.md +119 -0
  271. package/docs/tutorial.md +195 -0
  272. package/docs/upgrade.md +44 -0
  273. package/docs/user-guide.md +131 -0
  274. package/docs/usp-features.md +214 -0
  275. package/eslint.config.mjs +31 -0
  276. package/examples/starter-project/.planning/AUDIT.jsonl +1 -0
  277. package/examples/starter-project/.planning/HANDOFF.json +23 -0
  278. package/examples/starter-project/.planning/PROJECT.md +27 -0
  279. package/examples/starter-project/.planning/STATE.md +10 -0
  280. package/examples/starter-project/MINDFORGE.md +40 -0
  281. package/examples/starter-project/README.md +14 -0
  282. package/implementation-roadmap/day-1-imp/DAY1-HARDEN.md +823 -0
  283. package/implementation-roadmap/day-1-imp/DAY1-IMPLEMENT.md +2459 -0
  284. package/implementation-roadmap/day-1-imp/DAY1-REVIEW.md +288 -0
  285. package/implementation-roadmap/day-2-imp/DAY2-HARDEN.md +954 -0
  286. package/implementation-roadmap/day-2-imp/DAY2-IMPLEMENT.md +2347 -0
  287. package/implementation-roadmap/day-2-imp/DAY2-REVIEW.md +422 -0
  288. package/implementation-roadmap/day-3-imp/DAY3-HARDEN.md +870 -0
  289. package/implementation-roadmap/day-3-imp/DAY3-IMPLEMENT.md +2798 -0
  290. package/implementation-roadmap/day-3-imp/DAY3-REVIEW.md +484 -0
  291. package/implementation-roadmap/day-4-imp/DAY4-HARDEN.md +1087 -0
  292. package/implementation-roadmap/day-4-imp/DAY4-IMPLEMENT.md +2874 -0
  293. package/implementation-roadmap/day-4-imp/DAY4-REVIEW.md +386 -0
  294. package/implementation-roadmap/day-5-imp/DAY5-HARDEN.md +1078 -0
  295. package/implementation-roadmap/day-5-imp/DAY5-IMPLEMENT.md +3151 -0
  296. package/implementation-roadmap/day-5-imp/DAY5-REVIEW.md +345 -0
  297. package/implementation-roadmap/day-6-imp/DAY6-COMPLETE.md +3919 -0
  298. package/implementation-roadmap/day-7-imp-prod/DAY7-PRODUCTION-FINAL.md +4513 -0
  299. package/package.json +31 -0
  300. package/sdk/README.md +69 -0
  301. package/sdk/eslint.config.mjs +34 -0
  302. package/sdk/package-lock.json +1507 -0
  303. package/sdk/package.json +30 -0
  304. package/sdk/src/client.ts +133 -0
  305. package/sdk/src/commands.ts +63 -0
  306. package/sdk/src/events.ts +166 -0
  307. package/sdk/src/index.ts +22 -0
  308. package/sdk/src/types.ts +87 -0
  309. package/sdk/tsconfig.json +13 -0
  310. package/tests/audit.test.js +206 -0
  311. package/tests/ci-mode.test.js +162 -0
  312. package/tests/compaction.test.js +161 -0
  313. package/tests/distribution.test.js +205 -0
  314. package/tests/e2e.test.js +618 -0
  315. package/tests/governance.test.js +130 -0
  316. package/tests/install.test.js +209 -0
  317. package/tests/integrations.test.js +128 -0
  318. package/tests/intelligence.test.js +117 -0
  319. package/tests/metrics.test.js +96 -0
  320. package/tests/migration.test.js +309 -0
  321. package/tests/production.test.js +416 -0
  322. package/tests/sdk.test.js +200 -0
  323. package/tests/skills-platform.test.js +403 -0
  324. package/tests/wave-engine.test.js +338 -0
@@ -0,0 +1,126 @@
1
+ # MindForge — Debug Command
2
+ # Usage: /mindforge:debug [description]
3
+
4
+ Systematic debugging using the Debug Specialist persona with full RCA protocol.
5
+
6
+ ## Activation
7
+
8
+ Load `.mindforge/personas/debug-specialist.md` immediately.
9
+ This command runs entirely in that persona for its full duration.
10
+
11
+ ## Step 1 — Intake
12
+
13
+ Ask the user:
14
+ 1. "Describe the problem. What is happening vs. what should happen?"
15
+ 2. "Can you reproduce it reliably? If yes: what are the exact steps?"
16
+ 3. "When did this start? Was it working before? What changed?"
17
+ 4. "Do you have an error message or stack trace? Paste it here."
18
+
19
+ Capture all answers before proceeding.
20
+
21
+ ## Step 2 — Triage
22
+
23
+ Classify the issue immediately:
24
+ - **Regression** (was working, now broken) → check recent commits
25
+ - **Never worked** (new feature failing) → check the plan and verify step
26
+ - **Environment issue** (works locally, fails in CI) → check environment diffs
27
+ - **Data issue** (specific data causes failure) → check data shape assumptions
28
+ - **Integration issue** (fails when calling external service) → check contracts
29
+
30
+ Report classification to user: "This looks like a [type] issue. Here's my approach..."
31
+
32
+ ## Step 3 — Follow Debug Specialist protocol
33
+
34
+ Execute the full protocol from `debug-specialist.md`:
35
+ 1. Reproduce
36
+ 2. Isolate
37
+ 3. Read the error
38
+ 4. Check recent changes
39
+ 5. Instrument
40
+ 6. Form hypothesis
41
+ 7. Test hypothesis (write a failing test)
42
+ 8. Fix
43
+ 9. Verify (test from step 7 now passes, no regressions)
44
+ 10. Document
45
+
46
+ At each step, report what was found before moving to the next step.
47
+ Do not skip steps or combine them.
48
+
49
+ ## Step 3b — Full test suite verification (mandatory)
50
+ After the fix and targeted verify pass, run the project's full test suite.
51
+ Do not mark the debug task complete if any tests fail.
52
+
53
+ ## Step 4 — Check recent git history
54
+
55
+ ```bash
56
+ git log --oneline -20
57
+ git diff HEAD~[N] HEAD -- [suspected file]
58
+ ```
59
+
60
+ If a recent commit is the likely cause, show the user the specific diff.
61
+
62
+ ## Step 5 — Write the RCA report
63
+
64
+ Create `.planning/phases/[current-phase]/DEBUG-[timestamp].md`:
65
+
66
+ ```markdown
67
+ # Debug Report — [short description]
68
+
69
+ ## Date
70
+ [ISO-8601]
71
+
72
+ ## Problem
73
+ [User's description + what was verified during debugging]
74
+
75
+ ## Root cause category
76
+ [Logic error / Data error / Integration error / Concurrency error /
77
+ Configuration error / Dependency error]
78
+
79
+ ## Root cause
80
+ [Precise description of what the actual cause was]
81
+
82
+ ## Evidence
83
+ - [How the root cause was confirmed]
84
+ - [Failing test that proved the bug: file:line]
85
+
86
+ ## Fix applied
87
+ - File: [path]
88
+ - Change: [description]
89
+ - Commit: [SHA]
90
+
91
+ ## Regression test
92
+ [Test written to prevent this from recurring: file:line]
93
+
94
+ ## Prevention
95
+ [What should change in process/code to prevent this class of bug]
96
+ ```
97
+
98
+ ## Step 6 — Write AUDIT entry
99
+
100
+ ```json
101
+ {
102
+ "id": "uuid",
103
+ "timestamp": "ISO-8601",
104
+ "event": "debug_completed",
105
+ "agent": "mindforge-debug-specialist",
106
+ "phase": [current phase or null],
107
+ "session_id": "sess_abc",
108
+ "issue_type": "regression",
109
+ "root_cause_category": "Logic error",
110
+ "root_cause_summary": "[one sentence]",
111
+ "commit_sha": "[fix commit sha]",
112
+ "regression_test_added": true,
113
+ "report_path": ".planning/phases/[N]/DEBUG-[timestamp].md"
114
+ }
115
+ ```
116
+
117
+ ## When the bug cannot be reproduced
118
+
119
+ Ask:
120
+ 1. "Does it happen every time or intermittently?"
121
+ 2. "Does it happen in specific environments only? (dev/staging/prod)"
122
+ 3. "Does it happen for specific users or all users?"
123
+
124
+ If intermittent: focus on concurrency, caching, and race conditions.
125
+ Write a monitoring/logging plan to catch the next occurrence.
126
+ Document the inconclusive investigation in the DEBUG report with evidence gathered.
@@ -0,0 +1,138 @@
1
+ # MindForge — Discuss Phase Command
2
+ # Usage: /mindforge:discuss-phase [N] [--batch] [--auto]
3
+ # Captures implementation decisions before planning begins.
4
+ # Run this BEFORE /mindforge:plan-phase for complex phases.
5
+
6
+ ## Purpose
7
+ Planning without discussion produces generic plans.
8
+ Discussion captures YOUR decisions — layout preferences, library choices,
9
+ UX specifics, edge cases you've already thought through — so the planner
10
+ builds what you actually want, not what seems reasonable.
11
+
12
+ ## When to use
13
+ - Any phase with UI/UX components (visual decisions need capturing)
14
+ - Any phase with multiple valid implementation approaches
15
+ - Any phase where you already have opinions on the approach
16
+ - Any phase touching external services (your preferences on APIs matter)
17
+ - Skip for trivial phases (e.g., "add one field to an existing form")
18
+
19
+ ## Step 1 — Analyse the phase scope
20
+
21
+ Read:
22
+ - ROADMAP.md for the phase description
23
+ - REQUIREMENTS.md for the requirements in this phase
24
+ - ARCHITECTURE.md for relevant architectural context
25
+
26
+ Identify the phase's primary domain and any secondary domains.
27
+ If multiple domains are involved, cover each relevant set of questions.
28
+ - **Visual/UI** → ask about layout, interactions, states, empty states, animations
29
+ - **API/Backend** → ask about response format, error handling, auth approach, versioning
30
+ - **Data/Database** → ask about schema design, migration strategy, data volume expectations
31
+ - **Integration** → ask about third-party API choices, error recovery, retry strategy
32
+ - **Infrastructure** → ask about deployment strategy, scaling approach, observability
33
+
34
+ ## Step 2 — Structured discussion
35
+
36
+ Ask questions ONE AT A TIME. Wait for the full answer before asking the next.
37
+ Do not batch questions (unless `--batch` flag is provided).
38
+
39
+ ### Visual/UI phases — ask about:
40
+ 1. "Walk me through what a user sees on this screen from top to bottom."
41
+ 2. "What does the empty state look like? (nothing loaded yet / no results / error)"
42
+ 3. "Any animations or transitions you're picturing? Or keep it static?"
43
+ 4. "On mobile — stacks vertically or anything different?"
44
+ 5. "Any edge cases? (very long text, images that fail to load, loading states)"
45
+
46
+ ### API/Backend phases — ask about:
47
+ 1. "What's the intended consumer? Internal frontend / external developers / both?"
48
+ 2. "For errors — do you want detailed error objects with field-level info or simple messages?"
49
+ 3. "Rate limiting needed on any of these endpoints?"
50
+ 4. "Any background processing involved, or all synchronous?"
51
+ 5. "Versioning approach? /v1/ prefix or header-based?"
52
+
53
+ ### Data/Database phases — ask about:
54
+ 1. "What's the expected data volume? Thousands / millions / billions of rows?"
55
+ 2. "Any fields that need full-text search vs. exact match?"
56
+ 3. "Soft delete or hard delete for user-facing records?"
57
+ 4. "Any fields that change frequently vs. infrequently? (affects indexing strategy)"
58
+ 5. "Data retention requirements? When can records be deleted?"
59
+
60
+ ### Integration phases — ask about:
61
+ 1. "Have you already chosen the third-party service / API? If so, which?"
62
+ 2. "What should happen if the third-party service is down? Queue / fail / fallback?"
63
+ 3. "Webhooks or polling for receiving updates?"
64
+ 4. "Any rate limits you know about on their end?"
65
+ 5. "Testing approach? Do they have a sandbox environment?"
66
+
67
+ ## --batch mode
68
+ If `--batch` flag is provided: group related questions and present them together.
69
+ Appropriate when the user wants faster intake and is familiar with MindForge.
70
+
71
+ Example batch:
72
+ ```
73
+ Visual decisions for Phase 2:
74
+ 1. Layout: card grid / table / list?
75
+ 2. Empty state: illustration / simple message / hide section?
76
+ 3. Loading: skeleton / spinner / none?
77
+ 4. Mobile: same layout / stacked / hidden?
78
+ Answer 1-4:
79
+ ```
80
+
81
+ ## --auto mode
82
+ If `--auto` flag is provided: skip the discussion entirely.
83
+ The planner will make reasonable defaults for all decisions.
84
+ Use when: the phase is straightforward and you trust the planner's judgment.
85
+ Warn clearly: "Skipping discussion. Planner will make implementation decisions.
86
+ Results may not match your vision exactly. Proceeding without
87
+ explicit decisions can create rework later."
88
+
89
+ ## Step 3 — Write CONTEXT.md
90
+
91
+ After discussion, write `.planning/phases/[N]/CONTEXT.md`:
92
+
93
+ ```markdown
94
+ # Phase [N] Implementation Context
95
+ # Captured: [ISO-8601]
96
+ # Discussion mode: [interactive / batch / auto]
97
+
98
+ ## Phase description
99
+ [From ROADMAP.md]
100
+
101
+ ## Implementation decisions (captured from discussion)
102
+
103
+ ### [Domain: Visual / API / Data / Integration / etc.]
104
+
105
+ **Decision:** [What was decided]
106
+ **Rationale:** [Why — from user's words]
107
+ **Implications for planning:**
108
+ - [What the planner should do because of this decision]
109
+ - [Specific library or pattern to use]
110
+ - [What to avoid]
111
+
112
+ [Repeat for each significant decision]
113
+
114
+ ## Open questions (unresolved during discussion)
115
+ - [Question 1]: [Status — decide during planning / decide during execution]
116
+
117
+ ## User's explicit preferences
118
+ [Verbatim or near-verbatim quotes from the discussion that capture specific intent]
119
+
120
+ ## Defaults accepted (decisions the user deferred to the planner)
121
+ - [Area]: planner's choice
122
+ ```
123
+
124
+ ## Step 4 — Confirm and guide
125
+
126
+ Show the user a summary of what was captured:
127
+
128
+ "✅ Phase [N] discussion complete. [N] decisions captured.
129
+
130
+ Key decisions:
131
+ - [Decision 1 summary]
132
+ - [Decision 2 summary]
133
+ - [Decision 3 summary]
134
+
135
+ See full context: .planning/phases/[N]/CONTEXT.md
136
+
137
+ Next step: Run /mindforge:plan-phase [N] to create implementation plans
138
+ using these decisions."
@@ -0,0 +1,165 @@
1
+ # MindForge — Execute Phase Command
2
+ # Usage: /mindforge:execute-phase [N]
3
+
4
+ ## Pre-checks (all must pass before execution starts)
5
+
6
+ 1. Read STATE.md — confirm phase [N] is in "planned" status.
7
+ If STATE.md shows phase [N] as already "complete": ask user to confirm re-execution.
8
+
9
+ 2. Verify plan files exist:
10
+ ```
11
+ .planning/phases/[N]/PLAN-[N]-01.md (minimum one plan required)
12
+ ```
13
+ If missing: stop. Tell user: "No plans found for Phase [N]. Run /mindforge:plan-phase [N] first."
14
+
15
+ 3. Verify REQUIREMENTS.md exists and has content.
16
+ If empty: warn user but allow continuation.
17
+
18
+ 4. Run the dependency parser (`.mindforge/engine/dependency-parser.md`).
19
+ If validation fails (circular deps, missing deps): stop and report. Do not execute.
20
+
21
+ ## Step 1 — Build and display the execution plan
22
+
23
+ After dependency parsing succeeds, display the wave plan to the user:
24
+
25
+ ```
26
+ Phase [N] Execution Plan
27
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
+
29
+ Wave 1 (parallel) Wave 2 (parallel) Wave 3
30
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
31
+ │ Plan 01 │ │ Plan 03 │ │ Plan 05 │
32
+ │ User model │──┐ │ User API │──┐ │ Checkout UI │
33
+ └─────────────┘ │ └─────────────┘ │ └─────────────┘
34
+ ┌─────────────┐ │ ┌─────────────┐ │
35
+ │ Plan 02 │──┘ │ Plan 04 │──┘
36
+ │ Product │ │ Product API │
37
+ └─────────────┘ └─────────────┘
38
+
39
+ Total tasks: 5 Waves: 3 Est. time: depends on model speed
40
+
41
+ Proceed? (yes/no)
42
+ ```
43
+
44
+ If the user says no: stop. Do not execute anything.
45
+
46
+ ## Step 2 — Write pre-execution audit entry
47
+
48
+ Append to `.planning/AUDIT.jsonl`:
49
+ ```json
50
+ {
51
+ "id": "[uuid-v4]",
52
+ "timestamp": "[ISO-8601]",
53
+ "event": "phase_execution_started",
54
+ "phase": [N],
55
+ "wave_count": [total waves],
56
+ "task_count": [total tasks],
57
+ "agent": "mindforge-orchestrator",
58
+ "session_id": "[session identifier]"
59
+ }
60
+ ```
61
+
62
+ ## Step 3 — Execute waves using the wave executor
63
+
64
+ Follow the complete protocol in `.mindforge/engine/wave-executor.md`.
65
+
66
+ For each wave:
67
+
68
+ ### Wave start
69
+ Write to console:
70
+ ```
71
+ ━━━ Wave [W] of [total] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
+ Starting [X] tasks in parallel...
73
+ ```
74
+
75
+ ### Per-task execution (inject context per `context-injector.md`)
76
+ For each plan in the wave:
77
+ 1. Load context package (per `context-injector.md`)
78
+ 2. Execute the plan instructions
79
+ 3. Run `<verify>` — capture exact output
80
+ 4. If verify PASSES:
81
+ - Write SUMMARY-[N]-[M].md
82
+ - Execute commit: `git add [files] && git commit -m "[type]([scope]): [task name]"`
83
+ - Capture git SHA
84
+ - Write AUDIT entry for task completion
85
+ 5. If verify FAILS:
86
+ - Write SUMMARY-[N]-[M].md with failure details
87
+ - Write AUDIT entry for task failure
88
+ - STOP this wave immediately
89
+ - Report: "Task [plan ID] failed: [verify output]. Stopping Phase [N]."
90
+ - Do not start next wave
91
+ - Ask user: "Spawn debug agent to diagnose? (yes/no)"
92
+
93
+ ### Wave completion (before starting next wave)
94
+ After all tasks in wave complete:
95
+ 1. Run: `[project test command]`
96
+ 2. If tests fail:
97
+ - Identify failing tests
98
+ - Run `git log --oneline -[wave-task-count]` to see wave commits
99
+ - Report which commit likely introduced the failure
100
+ - Stop. Ask user how to proceed.
101
+ 3. If tests pass:
102
+ - Report: "Wave [W] complete. All [X] tasks passed. Tests passing. ✅"
103
+ - Write WAVE-REPORT update
104
+
105
+ ## Step 4 — Phase-level verification
106
+
107
+ After all waves complete, run the verification pipeline:
108
+
109
+ 1. Read every v1 requirement from REQUIREMENTS.md for this phase
110
+ 2. For each requirement, verify it is implemented:
111
+ - Search the codebase for the implementation
112
+ - Check if a test covers it
113
+ - Mark: ✅ implemented + tested | ⚠️ implemented, no test | ❌ not found
114
+ 3. Write `.planning/phases/[N]/VERIFICATION.md`
115
+ 4. Run the full test suite one final time
116
+ 5. If any requirement is ❌: create a fix plan and report to user
117
+
118
+ ## Step 5 — Update state and write wave report
119
+
120
+ Write `.planning/phases/[N]/WAVE-REPORT-[N].md` (per template in wave-executor.md)
121
+
122
+ Update STATE.md:
123
+ ```markdown
124
+ ## Current phase
125
+ [N] — Execution complete ✅
126
+
127
+ ## Last completed task
128
+ Phase [N]: All [X] tasks completed across [W] waves.
129
+
130
+ ## Next action
131
+ Run /mindforge:verify-phase [N] for human acceptance testing.
132
+ ```
133
+
134
+ Update HANDOFF.json with completed phase info.
135
+
136
+ Write final AUDIT entry:
137
+ ```json
138
+ {
139
+ "id": "[uuid-v4]",
140
+ "timestamp": "[ISO-8601]",
141
+ "event": "phase_execution_completed",
142
+ "phase": [N],
143
+ "tasks_completed": [X],
144
+ "waves_executed": [W],
145
+ "commits": ["sha1", "sha2", "..."],
146
+ "test_result": "passing",
147
+ "agent": "mindforge-orchestrator"
148
+ }
149
+ ```
150
+
151
+ ## Step 6 — Report to user
152
+
153
+ ```
154
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
155
+ ✅ Phase [N] execution complete
156
+
157
+ Tasks completed : [X] / [X]
158
+ Waves executed : [W]
159
+ Commits made : [X]
160
+ Tests : All passing
161
+ Requirements : [X] / [X] implemented
162
+
163
+ Next step: Run /mindforge:verify-phase [N] for UAT sign-off.
164
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
165
+ ```
@@ -0,0 +1,21 @@
1
+ # MindForge — Health Command
2
+ # Usage: /mindforge:health [--repair] [--category C] [--verbose]
3
+
4
+ Run all seven health-engine categories from `.mindforge/intelligence/health-engine.md`.
5
+
6
+ ## Output
7
+ - category status summary
8
+ - errors (must fix)
9
+ - warnings (should fix)
10
+ - informational signals
11
+
12
+ ## Flags
13
+ - `--repair`: apply safe auto-repair only
14
+ - `--category`: one of `installation|context|skills|personas|state|integrations|security`
15
+ - `--verbose`: include passing checks and exact inspected values
16
+
17
+ ## AUDIT
18
+ Append:
19
+ ```json
20
+ { "event": "health_check_completed", "errors": 0, "warnings": 0, "repaired": 0 }
21
+ ```
@@ -0,0 +1,23 @@
1
+ Show all available MindForge commands.
2
+
3
+ ## Pre-check
4
+ If `.planning/STATE.md` exists, read it.
5
+ If `.planning/PROJECT.md` is missing, treat the project as "Not initialised".
6
+
7
+ 1. Scan every .md file in `.claude/commands/mindforge/`
8
+ 2. For each file, extract the first non-empty line as the command description
9
+ 3. Display as a clean table:
10
+
11
+ | Command | Description |
12
+ |------------------------------|----------------------------------------------|
13
+ | /mindforge:help | Show all available commands |
14
+ | /mindforge:init-project | ... |
15
+ | ... | ... |
16
+
17
+ 4. After the table, print:
18
+ "Current project: [read PROJECT.md first line, or 'Not initialised']"
19
+ "Current phase: [read STATE.md current phase, or 'None']"
20
+ "Next step: [read STATE.md next action]"
21
+
22
+ 5. If CLAUDE.md has not been read this session, remind the user to ensure
23
+ it is loaded as the agent's system context.
@@ -0,0 +1,131 @@
1
+ # MindForge — Init Org Command
2
+ # Usage: /mindforge:init-org [--org-name "Name"] [--update]
3
+
4
+ ## Purpose
5
+ Set up MindForge at the organisation level — create standardised org-level
6
+ context files that are shared across ALL projects in the organisation.
7
+
8
+ Intended to be run ONCE by a platform engineer or engineering lead.
9
+ Output is committed to a shared `mindforge-org-config` repository
10
+ and distributed to projects as a git submodule or npm package.
11
+
12
+ ## Step 1 — Gather org information
13
+
14
+ Ask (one question at a time):
15
+ 1. "What is your organisation name?"
16
+ 2. "Describe what your organisation builds in 1-2 sentences."
17
+ 3. "What is your primary tech stack? (describe in plain English)"
18
+ 4. "What is your default deployment target? (AWS / GCP / Azure / self-hosted / hybrid)"
19
+ 5. "What regulatory frameworks apply to your organisation?"
20
+ Options: GDPR / HIPAA / SOC 2 / PCI-DSS / ISO 27001 / None / Multiple
21
+ 6. "What is your source control platform?" (GitHub / GitLab / Bitbucket / Azure DevOps)
22
+ 7. "What is your issue tracker?" (Jira / GitHub Issues / Linear / Azure DevOps / None)
23
+ 8. "Who are your Tier 3 compliance approvers? (email addresses, comma-separated)"
24
+
25
+ ## Step 2 — Generate org-level context files
26
+
27
+ Create (or update with `--update`) these files:
28
+
29
+ ### `.mindforge/org/ORG.md`
30
+ Populated from answers with:
31
+ - Organisation identity and mission
32
+ - Default tech stack with version recommendations
33
+ - Architecture defaults
34
+ - Team conventions
35
+ - Compliance requirements
36
+
37
+ ### `.mindforge/org/CONVENTIONS.md`
38
+ Generate sensible defaults based on the tech stack detected.
39
+ For TypeScript/Node.js stacks: strict TypeScript, ESLint, Conventional Commits
40
+ For Python stacks: ruff, mypy, black formatting
41
+ For Go: standard Go toolchain conventions
42
+ Mark each section clearly: [DEFAULT] or [CUSTOMISE THIS]
43
+
44
+ ### `.mindforge/org/SECURITY.md`
45
+ Generate based on declared compliance frameworks:
46
+ - GDPR → include GDPR-specific policies
47
+ - HIPAA → include PHI handling requirements
48
+ - PCI-DSS → include card data handling policies
49
+ - SOC 2 → include access control requirements
50
+ Mark critical sections: [REVIEW WITH SECURITY TEAM]
51
+
52
+ ### `.mindforge/org/TOOLS.md`
53
+ Generate approved library list based on tech stack.
54
+ Include common forbidden libraries (moment.js, request, etc.)
55
+ Mark: [ADD YOUR APPROVED LIBRARIES]
56
+
57
+ ### `.mindforge/org/integrations/INTEGRATIONS-CONFIG.md`
58
+ Pre-populate based on declared platforms:
59
+ - GitHub → fill GitHub config section
60
+ - Jira → fill Jira config section
61
+ Mark credential fields clearly: [SET VIA ENVIRONMENT VARIABLE]
62
+
63
+ ### `.mindforge/governance/GOVERNANCE-CONFIG.md`
64
+ Pre-populate based on declared approvers and compliance frameworks.
65
+ Higher compliance burden → lower Tier 2/3 thresholds.
66
+ Stricter approval SLAs for HIPAA/PCI-DSS organisations.
67
+
68
+ ## Step 3 — Generate skills recommendation
69
+
70
+ Based on the tech stack and compliance requirements, recommend skills to install:
71
+
72
+ ```
73
+ Recommended skills for your tech stack:
74
+
75
+ Core skills (already included — v0.6.0):
76
+ ✅ security-review, code-quality, api-design, testing-standards, documentation,
77
+ performance, accessibility, data-privacy, incident-response, database-patterns
78
+
79
+ Additional skills recommended for your stack:
80
+ [tech-stack-specific recommendations from registry]
81
+
82
+ For your compliance requirements:
83
+ [compliance-specific skill recommendations]
84
+
85
+ Install all recommendations?
86
+ yes → npx mindforge-skills install [list]
87
+ no → I'll show you the install commands for each
88
+ ```
89
+
90
+ ## Step 4 — Create distribution package
91
+
92
+ Offer to create an org-skills npm package for distributing org-level config:
93
+
94
+ ```
95
+ Create `@your-org/mindforge-config` npm package?
96
+ This package will distribute your org-level MindForge configuration
97
+ to all projects in your organisation via: npx @your-org/mindforge-config
98
+
99
+ Files included:
100
+ .mindforge/org/ORG.md
101
+ .mindforge/org/CONVENTIONS.md
102
+ .mindforge/org/SECURITY.md
103
+ .mindforge/org/TOOLS.md
104
+ .mindforge/org/skills/MANIFEST.md
105
+ .mindforge/org/integrations/INTEGRATIONS-CONFIG.md (without credentials)
106
+ .mindforge/governance/GOVERNANCE-CONFIG.md (without credentials)
107
+ ```
108
+
109
+ ## Step 5 — Write AUDIT entry and report
110
+
111
+ ```json
112
+ { "event": "org_initialised", "org_name": "[name]", "compliance_frameworks": [...], "skills_recommended": [...] }
113
+ ```
114
+
115
+ Report:
116
+ ```
117
+ ✅ MindForge organisation configuration complete.
118
+
119
+ Files created:
120
+ .mindforge/org/ORG.md
121
+ .mindforge/org/CONVENTIONS.md
122
+ .mindforge/org/SECURITY.md
123
+ .mindforge/org/TOOLS.md
124
+ .mindforge/governance/GOVERNANCE-CONFIG.md
125
+
126
+ Next steps:
127
+ 1. Review each file — look for [CUSTOMISE THIS] markers
128
+ 2. Fill in SECURITY.md with your security team
129
+ 3. Commit to your org's mindforge-config repository
130
+ 4. Share with all projects: npx @your-org/mindforge-config (if you created the package)
131
+ ```