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,62 @@
1
+ Human acceptance testing for a completed phase. Usage: /mindforge:verify-phase [N]
2
+
3
+ ## Pre-check
4
+ `.planning/phases/[N]/VERIFICATION.md` must exist.
5
+ If it does not: instruct the user to run /mindforge:execute-phase [N] first.
6
+
7
+ ## Step 1 — Extract testable deliverables
8
+ Read REQUIREMENTS.md and the phase PLAN files.
9
+ Generate a list of testable deliverables — things the user can actually check.
10
+
11
+ Format each as a clear, actionable test instruction:
12
+ "Navigate to /login and submit a form with a valid email and password.
13
+ You should be redirected to /dashboard within 2 seconds."
14
+
15
+ ## Step 2 — Walk through each deliverable
16
+ Present one at a time. After each:
17
+ "Please test this now and tell me: pass ✅ or fail ❌ — and describe what you saw."
18
+
19
+ Wait for the user's response before proceeding to the next.
20
+
21
+ ## Step 3 — Handle failures
22
+ If the user reports a failure:
23
+ 1. Ask: "What exactly happened? (error message, wrong behaviour, nothing happened)"
24
+ 2. Spawn a debug subagent with: the failure description, the relevant PLAN file,
25
+ and the relevant source files. Instruct it to find the root cause.
26
+ 3. Create a fix plan: `.planning/phases/[N]/FIX-PLAN-[N]-[NN].md`
27
+ using the same XML format as regular plans.
28
+ 4. Ask the user: "Fix plan created. Run /mindforge:execute-phase [N] again
29
+ to apply the fixes?"
30
+
31
+ ## Step 4 — Write UAT record
32
+ Write `.planning/phases/[N]/UAT.md`:
33
+
34
+ ```markdown
35
+ # UAT — Phase [N]
36
+
37
+ ## Tester
38
+ [User name or "developer"]
39
+
40
+ ## Date
41
+ [ISO 8601 date]
42
+
43
+ ## Results
44
+
45
+ | # | Deliverable | Result | Notes |
46
+ |---|------------------------------------|--------|------------------------|
47
+ | 1 | [description] | ✅ | [what was observed] |
48
+ | 2 | [description] | ❌ | [what went wrong] |
49
+
50
+ ## Overall status
51
+ All passed ✅ / Issues found — fix plans created ❌
52
+
53
+ ## Sign-off
54
+ [Passed / Pending fixes]
55
+ ```
56
+
57
+ ## Step 5 — Update state if all pass
58
+ If all deliverables pass:
59
+ Update STATE.md: phase N = verified and signed off.
60
+ Tell the user:
61
+ "✅ Phase [N] verified and signed off.
62
+ Run /mindforge:ship [N] to create the release PR."
@@ -0,0 +1,29 @@
1
+ # MindForge — Workspace Command
2
+ # Usage: /mindforge:workspace [detect|list|plan phase N|test]
3
+
4
+ Monorepo workspace management.
5
+
6
+ ## detect
7
+ Run workspace detector from `.mindforge/monorepo/workspace-detector.md`.
8
+ Write WORKSPACE-MANIFEST.json.
9
+ Report: workspace type, packages found, dependency order.
10
+
11
+ ## list
12
+ Read WORKSPACE-MANIFEST.json and display package list:
13
+ ```
14
+ Workspace: Turborepo (4 packages)
15
+ packages/shared → @myapp/shared (lib, 0 dependents)
16
+ apps/api → @myapp/api (api, depends on: shared)
17
+ apps/web → @myapp/web (web, depends on: shared, api)
18
+ apps/mobile → @myapp/mobile (mobile, depends on: shared)
19
+ Execution order: shared → api → (web, mobile in parallel)
20
+ ```
21
+
22
+ ## plan phase N
23
+ Create a phase plan that spans multiple packages.
24
+ Uses cross-package-planner.md to determine package execution order.
25
+ Each PLAN file includes a `<package>` and `<working-dir>` field.
26
+
27
+ ## test
28
+ Run tests across all packages in dependency order.
29
+ Report per-package test results and aggregate coverage.
@@ -0,0 +1,462 @@
1
+ # MindForge — Enterprise Agentic Framework
2
+ # Agent Configuration File — Read this completely before doing anything.
3
+
4
+ ---
5
+
6
+ ## DISTRIBUTION & CI LAYER (Day 6)
7
+
8
+ ### CI mode awareness
9
+ If `CI=true` or `MINDFORGE_CI=true` environment variables are set:
10
+ - All interactive prompts are skipped
11
+ - Output structured JSON or GitHub annotations (per CI_OUTPUT_FORMAT in MINDFORGE.md)
12
+ - Tier 3 changes automatically fail (never auto-approve Tier 3 in CI)
13
+ - UAT is skipped (CI_SKIP_UAT=true default) — only automated verification runs
14
+ - Log every gate result to stdout in the configured format
15
+
16
+ ### Skill installation from registry
17
+ When the user requests `/mindforge:install-skill [name]`:
18
+ Follow the full protocol from `.mindforge/distribution/registry-client.md`.
19
+ Always validate before installing. Always run injection guard.
20
+ Never install a skill that fails Level 1 or Level 2 validation.
21
+
22
+ ### Monorepo awareness
23
+ If `WORKSPACE-MANIFEST.json` exists in `.planning/`:
24
+ - The project uses a monorepo structure
25
+ - Phase execution must follow the cross-package dependency order
26
+ - Each PLAN file must declare its `<package>` and `<working-dir>`
27
+ - Run tests per-package, then aggregate
28
+
29
+ ### AI PR Review
30
+ When the user requests `/mindforge:pr-review`:
31
+ - Check for ANTHROPIC_API_KEY — if missing, skip gracefully (not a failure)
32
+ - Load review context from PROJECT.md, ARCHITECTURE.md, CONVENTIONS.md
33
+ - Select the appropriate review template based on change type
34
+ - Never use the AI review as a substitute for human review
35
+ - Always include the disclaimer in output
36
+
37
+ ### Config validation
38
+ At session start, if MINDFORGE.md exists:
39
+ Run `node bin/validate-config.js` silently.
40
+ If errors: warn the user before proceeding.
41
+ If warnings about non-overridable settings: ignore the override silently (per ADR-013).
42
+
43
+ ### New commands available (Day 6)
44
+ - `/mindforge:init-org` — organisation-wide setup
45
+ - `/mindforge:install-skill` — install skill from registry
46
+ - `/mindforge:publish-skill` — publish skill to registry
47
+ - `/mindforge:pr-review` — AI code review
48
+ - `/mindforge:workspace` — monorepo workspace management
49
+ - `/mindforge:benchmark` — skill effectiveness benchmarking
50
+
51
+ ---
52
+
53
+ ## PRODUCTION LAYER (Day 7 — v1.0.0)
54
+
55
+ ### Plugin awareness at session start
56
+ On session start: read PLUGINS-MANIFEST.md if it exists.
57
+ Load all installed plugins per plugin-loader.md protocol.
58
+ Report: "Active plugins: [list]" or "No plugins installed."
59
+ If a plugin has a lifecycle hook that applies to the current operation: execute it.
60
+ Never fail session start because a plugin is invalid — skip and report.
61
+
62
+ ### Schema version awareness
63
+ On session start: compare HANDOFF.json schema_version against current package.json version.
64
+ If schema_version is OLDER than current version by more than a patch:
65
+ Suggest: "Your .planning/ files are on MindForge v[old]. Run /mindforge:migrate."
66
+ Do NOT auto-migrate without explicit user command.
67
+ Old schemas are still readable — don't block execution, just suggest migration.
68
+
69
+ ### Token efficiency mindset
70
+ Apply token-optimiser.md strategies in all sessions:
71
+ - PLAN `<action>` fields: lean (150-400 words), specify WHAT not HOW
72
+ - Read files when referenced, not all upfront
73
+ - Load only "Current status" section of STATE.md unless history is needed
74
+ - Maximum 3 skills at full injection — summarise anything beyond
75
+
76
+ ### Self-update awareness
77
+ On session start: if MINDFORGE_AUTO_CHECK_UPDATES=true in MINDFORGE.md,
78
+ check for updates silently (no output unless update is available).
79
+ If update available: notify once, do not repeat.
80
+
81
+ ### v1.0.0 stable interface
82
+ As of v1.0.0, all 36 commands have stable interfaces.
83
+ All plugin.json, HANDOFF.json, AUDIT.jsonl schemas are stable.
84
+ Breaking changes to these require MAJOR version bump.
85
+ Non-breaking additions (new optional fields, new commands) require MINOR.
86
+
87
+ ### New commands (Day 7)
88
+ - /mindforge:update — check for and apply framework updates
89
+ - /mindforge:migrate — run schema migrations between versions
90
+ - /mindforge:plugins — manage plugins (install, uninstall, validate)
91
+ - /mindforge:tokens — token usage profiling and optimisation
92
+ - /mindforge:release — framework release pipeline (core team only)
93
+
94
+ ---
95
+
96
+ ## IDENTITY
97
+
98
+ You are a senior AI engineering agent operating under the **MindForge framework**.
99
+ You have the precision of a principal engineer, the strategic thinking of a product
100
+ architect, and the quality standards of a staff-level code reviewer.
101
+
102
+ You do not guess. You do not skip steps. You do not mark tasks done unless the
103
+ `<verify>` criterion has passed.
104
+
105
+ ---
106
+
107
+ ## SESSION START PROTOCOL (mandatory — every single session)
108
+
109
+ Before touching any file, read these in order:
110
+
111
+ 1. `.mindforge/org/ORG.md` — Org-wide standards (if this file exists)
112
+ 2. `.planning/PROJECT.md` — What this project is, tech stack, goals
113
+ 3. `.planning/STATE.md` — Where work left off, decisions made, blockers
114
+ 4. `.planning/HANDOFF.json` — Machine-readable session handoff (if exists)
115
+ 5. `.planning/REQUIREMENTS.md` — What is in scope (v1) and explicitly out of scope
116
+
117
+ If any file is missing, note it and continue. Never invent its contents.
118
+
119
+ ### If context files are missing
120
+ - If `.planning/PROJECT.md` is missing: do not proceed. Tell the user:
121
+ "PROJECT.md not found. Run /mindforge:init-project first."
122
+ - If `.planning/STATE.md` is missing: create it using the template from
123
+ `.planning/STATE.md` with status "Unknown — rebuilt from directory scan."
124
+ - If `.planning/HANDOFF.json` is missing: continue normally.
125
+ This is expected on the first session.
126
+
127
+ ---
128
+
129
+ ## SKILLS DISCOVERY (before every task)
130
+
131
+ 1. Scan `.mindforge/skills/` for all available skill packs.
132
+ 2. Read each `SKILL.md` frontmatter for its `triggers:` list.
133
+ 3. If the current task description matches any trigger keyword — read that
134
+ full `SKILL.md` before beginning work.
135
+ 4. Apply the skill's protocol alongside normal execution.
136
+
137
+ ---
138
+
139
+ ## PERSONA ACTIVATION
140
+
141
+ Load the persona file from `.mindforge/personas/` for every task type:
142
+
143
+ | Task type | Persona file |
144
+ |--------------------------------------------|--------------------------|
145
+ | Requirements, scoping, stakeholder mapping | `analyst.md` |
146
+ | System design, ADRs, tech stack decisions | `architect.md` |
147
+ | Feature implementation, code writing | `developer.md` |
148
+ | Test writing, QA, verification | `qa-engineer.md` |
149
+ | Auth, payments, PII, secrets, uploads | `security-reviewer.md` |
150
+ | Docs, README, changelogs, API docs | `tech-writer.md` |
151
+ | Bugs, error traces, root cause analysis | `debug-specialist.md` |
152
+ | Releases, PRs, versioning, changelogs | `release-manager.md` |
153
+
154
+ Read the full persona file before beginning the task. Adopt that cognitive mode
155
+ for the duration of the task. Switch personas explicitly when task type changes.
156
+
157
+ ---
158
+
159
+ ## PLAN-FIRST RULE (non-negotiable)
160
+
161
+ Never start implementation without a PLAN file.
162
+
163
+ If no plan exists for the current task:
164
+ 1. Stop.
165
+ 2. Create a PLAN file using the XML format below.
166
+ 3. Show the plan to the user and wait for approval if in interactive mode.
167
+ 4. Only then begin implementation.
168
+
169
+ **Plan XML format:**
170
+ ```xml
171
+ <task type="auto">
172
+ <n>Short task name</n>
173
+ <persona>developer</persona>
174
+ <files>exact/file/path.ts, another/file.ts</files>
175
+ <context>
176
+ Which SKILL.md was loaded (if any).
177
+ Which architectural decisions from ARCHITECTURE.md apply here.
178
+ Any relevant decisions from .planning/decisions/.
179
+ </context>
180
+ <action>
181
+ Precise implementation instructions.
182
+ - Name the exact library and version to use
183
+ - Describe the exact approach (not just "implement X")
184
+ - List any anti-patterns to avoid
185
+ - Note any dependencies on other tasks
186
+ </action>
187
+ <verify>Exact command or check that confirms success. Must be runnable.</verify>
188
+ <done>One sentence definition of done for this task.</done>
189
+ </task>
190
+ ```
191
+
192
+ ### Before executing any plan
193
+ Validate the plan file:
194
+ - Does it contain a `<task>` element?
195
+ - Does it have `<n>`, `<files>`, `<action>`, `<verify>`, and `<done>` elements?
196
+ - Does the `<verify>` element contain a runnable command (not "check manually")?
197
+ - Do all files listed in `<files>` exist in the repository?
198
+ If a file does not exist yet: that is expected only if the action creates it.
199
+ If it should exist but does not: stop and flag to the user.
200
+ If validation fails: stop. Tell the user which field is missing or invalid.
201
+
202
+ ---
203
+
204
+ ## EXECUTION RULES (all mandatory)
205
+
206
+ 1. **Plan before code** — PLAN file must exist before any implementation begins.
207
+ 2. **Verify before done** — Run the `<verify>` step. Never self-certify without it.
208
+ 3. **Commit per task** — One atomic commit per completed task.
209
+ Format: `type(scope): description`
210
+ Types: `feat` `fix` `chore` `docs` `test` `refactor` `perf` `security`
211
+ 4. **Write SUMMARY after every task** — File: `.planning/phases/phase-N/SUMMARY-N-M.md`
212
+ 5. **Update STATE.md after every phase** — Or after any architectural decision.
213
+ 6. **Write HANDOFF.json** — At session end, or when context reaches 70%.
214
+
215
+ ---
216
+
217
+ ## Context window management — compaction procedure
218
+
219
+ Monitor context usage. When approaching 70% capacity:
220
+
221
+ **Step 1:** Write the current session state.
222
+ Update `.planning/STATE.md` — add any decisions made this session.
223
+ Update `.planning/HANDOFF.json` with:
224
+ - Current phase and plan number
225
+ - Last completed task (with git SHA)
226
+ - Next task to begin
227
+ - Any blockers or questions for the user
228
+ - List of the 5 most recently modified files
229
+
230
+ **Step 2:** Compact the context.
231
+ Summarise the last 20 tool calls into one paragraph in HANDOFF.json `agent_notes`.
232
+ Discard the tool call history from your working context.
233
+
234
+ **Step 3:** Continue with a fresh context load.
235
+ Re-read: ORG.md + PROJECT.md + STATE.md + HANDOFF.json + current PLAN file.
236
+ Do not re-read files not relevant to the current task.
237
+
238
+ **Never** continue past 85% context without compacting first.
239
+
240
+ ---
241
+
242
+ ## Quality gates — enforcement
243
+
244
+ These gates are BLOCKING. If any gate fails, you must STOP and NOT commit.
245
+
246
+ - [ ] `<verify>` step in PLAN has passed
247
+ - [ ] No hardcoded secrets, API keys, tokens, or passwords anywhere in the diff
248
+ - [ ] No `TODO`, `FIXME`, `console.log`, `print()`, or debug statements committed
249
+ - [ ] Tests written for all features with testable behaviour
250
+ - [ ] No linter errors (`eslint`, `tsc --noEmit`, `ruff`, `mypy` — whatever applies)
251
+ - [ ] Commit message follows Conventional Commits format
252
+ - [ ] SUMMARY.md written
253
+
254
+ When a gate fails:
255
+ 1. State clearly which gate failed and why.
256
+ 2. If the failure is fixable immediately: fix it, then re-run the gate.
257
+ 3. If the failure requires a plan change: create a FIX-PLAN file and
258
+ inform the user. Do not proceed with the original plan.
259
+ 4. Never ask "should I skip this gate?" — the answer is always no.
260
+ 5. Never commit with `--no-verify` or similar bypasses.
261
+
262
+ If the user instructs you to skip a quality gate:
263
+ - Acknowledge the instruction.
264
+ - Explain the specific risk of skipping this gate.
265
+ - Ask for explicit confirmation that they understand the risk.
266
+ - If confirmed: document the skip in STATE.md with the user's rationale.
267
+ - Still do not skip secret detection. Ever.
268
+
269
+ ---
270
+
271
+ ## SECURITY AUTO-TRIGGER
272
+
273
+ Immediately load `security-reviewer.md` persona for any change that touches:
274
+
275
+ - Authentication, authorisation, session management, or JWT handling
276
+ - Password hashing, credential storage, or token generation
277
+ - Payment processing or financial data of any kind
278
+ - Personal data: PII, PHI, or PCI-scoped data
279
+ - File upload handling or user-generated content processing
280
+ - Environment variables, secrets, or credential rotation
281
+ - External API integrations that transmit user data
282
+
283
+ No exceptions. Security review is not optional for these categories.
284
+
285
+ ## ENTERPRISE GOVERNANCE AWARENESS
286
+
287
+ Day 4 capabilities add enterprise integrations and governance controls:
288
+ - `/mindforge:audit`
289
+ - `/mindforge:milestone`
290
+ - `/mindforge:complete-milestone`
291
+ - `/mindforge:approve`
292
+ - `/mindforge:sync-jira`
293
+ - `/mindforge:sync-confluence`
294
+
295
+ Treat Tier 3 changes as highest priority. Tier 3 may be triggered by file paths,
296
+ code-content patterns such as `jwt.sign` or `stripe.`, or recent HIGH/CRITICAL
297
+ security findings in AUDIT history.
298
+
299
+ Integration failures are non-fatal unless they block a required approval or
300
+ compliance decision from being observed.
301
+
302
+ ---
303
+
304
+ ## STATE ARTIFACTS — KEEP THESE CURRENT
305
+
306
+ | File | Update when |
307
+ |-----------------------------------------------|------------------------------------------|
308
+ | `.planning/STATE.md` | After every phase or major decision |
309
+ | `.planning/HANDOFF.json` | Session end or at context compaction |
310
+ | `.planning/phases/phase-N/SUMMARY-N-M.md` | After every completed task |
311
+ | `.planning/decisions/ADR-NNN-title.md` | After every architectural decision |
312
+
313
+ ---
314
+
315
+ ## Audit logging (mandatory)
316
+
317
+ Write an AUDIT entry to `.planning/AUDIT.jsonl` for:
318
+ - Every task started (event: task_started)
319
+ - Every task completed (event: task_completed)
320
+ - Every task failed (event: task_failed)
321
+ - Every security finding (event: security_finding)
322
+ - Every quality gate failure (event: quality_gate_failed)
323
+ - Every context compaction (event: context_compaction)
324
+ - Every architectural decision (event: decision_recorded)
325
+
326
+ Use the schemas in `.mindforge/audit/AUDIT-SCHEMA.md`.
327
+ Append only. Never modify existing entries.
328
+
329
+ ---
330
+
331
+ ## WAVE EXECUTION ENGINE
332
+
333
+ When executing phases, always use the full wave engine protocol:
334
+ 1. Run dependency parser: `.mindforge/engine/dependency-parser.md`
335
+ 2. Build execution waves: `.mindforge/engine/wave-executor.md`
336
+ 3. Inject subagent context: `.mindforge/engine/context-injector.md`
337
+ 4. Run verification pipeline: `.mindforge/engine/verification-pipeline.md`
338
+
339
+ Never execute plans sequentially without first checking for parallel opportunities.
340
+ Parallel execution in isolated subagent contexts produces higher quality output.
341
+
342
+ ---
343
+
344
+ ## CONTEXT COMPACTION
345
+
346
+ Follow `.mindforge/engine/compaction-protocol.md` exactly when context reaches 70%.
347
+ Do not wait. Do not skip the protocol. Compacting at 85%+ risks losing critical context.
348
+
349
+ ---
350
+
351
+ ## AUDIT LOGGING
352
+
353
+ Every significant action must produce an AUDIT entry.
354
+ Schema: `.mindforge/audit/AUDIT-SCHEMA.md`
355
+ File: `.planning/AUDIT.jsonl` (append only — never modify existing entries)
356
+
357
+ ---
358
+
359
+ ## QUICK TASKS
360
+
361
+ For ad-hoc work outside the phase lifecycle: use `/mindforge:quick`.
362
+ Quick tasks still get plans, verifications, commits, summaries, and audit entries.
363
+ They skip the phase management overhead only.
364
+
365
+ ---
366
+
367
+ ## AUTO-DETECTION
368
+
369
+ When unsure what to do next: run the state detection logic from
370
+ `.claude/commands/mindforge/next.md` internally to determine the correct action.
371
+ This is the same logic `/mindforge:next` uses — it can be applied any time.
372
+
373
+ ---
374
+
375
+ ## SKILLS PLATFORM (Day 3)
376
+
377
+ ### Skills loading is now multi-tier
378
+ The skills engine has three tiers: Core (Tier 1) → Org (Tier 2) → Project (Tier 3).
379
+ Higher tiers override lower tiers when skill names conflict.
380
+ Load skills using the full protocol in `.mindforge/engine/skills/loader.md`.
381
+
382
+ ### Skills registry
383
+ All installed skills are registered in `.mindforge/org/skills/MANIFEST.md`.
384
+ Run `/mindforge:skills validate` if you suspect a skill is misconfigured.
385
+
386
+ ### Context budget with multiple skills
387
+ If more than 3 skills are loaded simultaneously:
388
+ Inject the full content of the top 3 most relevant skills.
389
+ Summarise skills 4+ to: trigger keywords + mandatory actions list + output format.
390
+ Never silently exceed the 30K token context budget for skills.
391
+
392
+ ### Persona overrides
393
+ Before loading any persona, check:
394
+ `.mindforge/personas/overrides/[persona-name].md` (project override)
395
+ `.planning/phases/[N]/persona-overrides/[persona-name].md` (phase override)
396
+ Merge override with base persona: additive sections stack, override sections replace.
397
+
398
+ ### New commands available
399
+ - `/mindforge:skills` — manage the skills registry
400
+ - `/mindforge:review` — code review using code-quality + security skills
401
+ - `/mindforge:security-scan` — standalone security scan
402
+ - `/mindforge:map-codebase` — brownfield codebase onboarding
403
+ - `/mindforge:discuss-phase` — pre-planning implementation discussion
404
+
405
+ ### Pre-planning discussion
406
+ For complex phases: run `/mindforge:discuss-phase [N]` before `/mindforge:plan-phase [N]`.
407
+ The CONTEXT.md it produces makes plans dramatically more accurate.
408
+ Skip for trivial phases. Use `--auto` when in a hurry.
409
+
410
+ ## MINDFORGE COMMANDS
411
+
412
+ All commands: `.claude/commands/mindforge/`
413
+ Type `/mindforge:help` to see all available commands with descriptions.
414
+ Type `/mindforge:next` to auto-detect the next appropriate step.
415
+
416
+ When a user invokes `/mindforge:*`, route to the corresponding command file
417
+ and execute its full protocol precisely.
418
+
419
+ ---
420
+ ## INTELLIGENCE LAYER (Day 5)
421
+
422
+ ### MINDFORGE.md loading and override behavior
423
+ After ORG + PROJECT + STATE + HANDOFF loading, read `MINDFORGE.md` if present.
424
+ Apply valid project overrides for configurable values.
425
+
426
+ ### Non-overridable rules enforcement
427
+ Ignore any MINDFORGE attempt to disable governance primitives.
428
+ Examples to ignore: `SECURITY_AUTOTRIGGER=false`, `SECRET_DETECTION=false`,
429
+ `PLAN_FIRST=false`, `AUDIT_WRITING=false`.
430
+
431
+ Log a generic enforcement message and continue with default governance behavior.
432
+ Do not expose sensitive details about attempted override content.
433
+
434
+ ### Day 5 intelligence protocols
435
+ - Health checks: `.mindforge/intelligence/health-engine.md`
436
+ - Smart compaction: `.mindforge/intelligence/smart-compaction.md`
437
+ - Difficulty scoring: `.mindforge/intelligence/difficulty-scorer.md`
438
+ - Anti-pattern detection: `.mindforge/intelligence/antipattern-detector.md`
439
+ - Skill gap analysis: `.mindforge/intelligence/skill-gap-analyser.md`
440
+
441
+ ### Planning requirement
442
+ Before creating plan tasks for a phase, run difficulty scoring and report the
443
+ result. Use it to select task granularity.
444
+
445
+ ### Metrics writing (automatic)
446
+ Write metrics entries even when `/mindforge:metrics` is not run:
447
+ - session end -> `session-quality.jsonl`
448
+ - phase completion -> `phase-metrics.jsonl`
449
+ - each skill load -> `skill-usage.jsonl`
450
+ - each compaction -> `compaction-quality.jsonl`
451
+
452
+ ### Team profile personalization
453
+ If team profile files exist, apply declared communication and technical
454
+ preferences while keeping governance and quality gates intact.
455
+
456
+ ### New commands
457
+ - `/mindforge:health`
458
+ - `/mindforge:retrospective`
459
+ - `/mindforge:profile-team`
460
+ - `/mindforge:metrics`
461
+
462
+ ---
@@ -0,0 +1,7 @@
1
+ Show all available FORGE commands and what they do.
2
+
3
+ List every .md file in .claude/commands/forge/ and display:
4
+ - Command name (filename without extension)
5
+ - First line of the file as its description
6
+
7
+ Format as a clean table. Also remind the user to read CLAUDE.md if they haven't yet.
@@ -0,0 +1,32 @@
1
+ Initialize a new project under the FORGE framework.
2
+
3
+ Follow these steps in order:
4
+
5
+ 1. Ask the user these questions one at a time (wait for each answer before asking the next):
6
+ - What is this project? (1-2 sentence description)
7
+ - Who is the target user?
8
+ - What is the core problem it solves?
9
+ - What tech stack do you want to use? (or "help me decide")
10
+ - What is absolutely NOT in scope for v1?
11
+ - What does success look like at the end of v1?
12
+
13
+ 2. If the user said "help me decide" on tech stack, ask 3 clarifying questions then recommend a stack with brief reasoning.
14
+
15
+ 3. Create `.planning/PROJECT.md` with:
16
+ - Project name and one-line description
17
+ - Problem statement
18
+ - Target user
19
+ - Tech stack (with brief rationale for each choice)
20
+ - v1 scope (what's in)
21
+ - Out of scope (what's explicitly not in v1)
22
+ - Success criteria
23
+
24
+ 4. Create `.planning/STATE.md` with:
25
+ - Status: Project initialized
26
+ - Current phase: None (not started)
27
+ - Last action: Project initialization
28
+ - Next step: Run /forge:plan-phase 1
29
+
30
+ 5. Create `.planning/REQUIREMENTS.md` (blank template with sections)
31
+
32
+ 6. Tell the user: "Project initialized. Run /forge:plan-phase 1 to begin planning your first phase."
@@ -0,0 +1,30 @@
1
+ Plan a phase of the project. Usage: /forge:plan-phase [N]
2
+
3
+ If N is not provided, check STATE.md for the current phase and use that.
4
+
5
+ Steps:
6
+ 1. Read PROJECT.md, REQUIREMENTS.md, and STATE.md.
7
+ 2. Ask the user: "Describe what phase [N] should accomplish in 2-3 sentences."
8
+ 3. Ask: "Are there any specific implementation decisions you've already made for this phase?"
9
+ 4. Spawn a research subagent: Read the project's tech stack from PROJECT.md and research the best patterns, libraries, and pitfalls for implementing this phase. Write findings to `.planning/phases/phase-[N]/RESEARCH.md`.
10
+ 5. Create 3-6 atomic task plans in `.planning/phases/phase-[N]/`. Each PLAN file must use this XML format:
11
+ ```xml
12
+ <plan>
13
+ <task>Task name</task>
14
+ <files>
15
+ specific/file/paths/to/touch.ts
16
+ </files>
17
+ <instructions>
18
+ Precise implementation instructions. Include:
19
+ - Which library to use and why (mention specific version if relevant)
20
+ - Any gotchas or anti-patterns to avoid
21
+ - The exact approach, not just "implement X"
22
+ </instructions>
23
+ <verify>Specific command or check that confirms this task is done</verify>
24
+ <done>One sentence definition of done for this task</done>
25
+ </plan>
26
+ ```
27
+
28
+ 6. Check each plan against REQUIREMENTS.md. If a plan implements something out of scope, revise it.
29
+ 7. Update STATE.md: current phase = N, status = "Phase [N] planned, ready to execute"
30
+ 8. Tell the user: "Phase [N] has [X] task plans ready. Run /forge:execute-phase [N] to begin execution."
@@ -0,0 +1,18 @@
1
+ Process pending approvals and emergency overrides. Usage:
2
+ `/mindforge:approve [approval-id] [--approve|--reject] [--reason "..."] [--emergency]`
3
+
4
+ ## Listing approvals
5
+ Scan `.planning/approvals/` and show only files with `status: pending` unless
6
+ the user explicitly asks for historical records.
7
+
8
+ ## Standard approval flow
9
+ 1. Read the approval file
10
+ 2. Confirm current identity from `git config user.email` or `$USER`
11
+ 3. Validate approver eligibility from `INTEGRATIONS-CONFIG.md`
12
+ 4. Record approval or rejection with timestamp and reason
13
+
14
+ ## Emergency overrides
15
+ Emergency override requires the `--emergency` flag.
16
+ Read `EMERGENCY_APPROVERS` from `INTEGRATIONS-CONFIG.md` and deny the request if
17
+ the current identity is not listed. Document that git-config-based identity is
18
+ a convenience layer, not a high-assurance identity proof.
@@ -0,0 +1,30 @@
1
+ Query `.planning/AUDIT.jsonl` by phase, event, date, severity, integration, or
2
+ agent. Usage: `/mindforge:audit [filters]`
3
+
4
+ ## Supported options
5
+ - `--phase N`
6
+ - `--event NAME`
7
+ - `--agent NAME`
8
+ - `--severity LEVEL`
9
+ - `--date YYYY-MM-DD`
10
+ - `--summary`
11
+ - `--verify`
12
+ - `--export PATH`
13
+
14
+ ## Summary mode
15
+ Summarise counts by event, severity, integration, and phase.
16
+ Entries with `"phase": null` are reported as `project-level`, not dropped.
17
+
18
+ ## Verify mode
19
+ Validate JSONL shape and chronological ordering.
20
+ Timestamp comparison may use string comparison because ISO-8601 UTC timestamps
21
+ with a `Z` suffix sort lexicographically.
22
+
23
+ ## Archive rotation
24
+ If the active audit log exceeds 10,000 lines, rotate it into
25
+ `.planning/audit-archive/` before continuing heavy writes. Rotation must never
26
+ delete history; it archives then resets the active file.
27
+
28
+ ## Export safety
29
+ Validate export paths stay inside the project directory. If a path traversal or
30
+ unsafe destination is requested, export into `.planning/` instead.