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,155 @@
1
+ Initialise a new project under the MindForge framework.
2
+
3
+ ## Pre-check
4
+ Read `.planning/PROJECT.md`. If it already exists and contains content,
5
+ ask: "A project is already initialised. Do you want to reinitialise? (yes/no)"
6
+ Stop if the user says no.
7
+
8
+ ## Step 1 — Requirements interview
9
+ Ask these questions one at a time. Wait for the full answer before asking the next.
10
+ Do not batch them. Do not rush.
11
+
12
+ 1. "What is this project? Give me a 1-2 sentence description."
13
+ 2. "Who is the primary user? Describe them specifically."
14
+ 3. "What problem does this solve for them? What is the pain today?"
15
+ 4. "What tech stack do you want to use? (Say 'recommend one' if unsure.)"
16
+ — If they say recommend: ask 3 clarifying questions about team size,
17
+ deployment environment, and performance requirements. Then recommend
18
+ a specific stack with brief rationale for each choice.
19
+ 5. "What is explicitly NOT in scope for v1? Name at least 3 things."
20
+ 6. "What does a successful v1 look like? How will you know it worked?"
21
+ 7. "Are there any compliance requirements? (GDPR, HIPAA, SOC2, PCI-DSS, none)"
22
+
23
+ ## Step 2 — Create context files
24
+
25
+ Write `.planning/PROJECT.md`:
26
+ ```markdown
27
+ # [Project Name]
28
+ [One-line description]
29
+
30
+ ## Problem statement
31
+ [From answer 3]
32
+
33
+ ## Target user
34
+ [From answer 2]
35
+
36
+ ## Tech stack
37
+ | Layer | Choice | Rationale |
38
+ |------------|-----------------|--------------------------------|
39
+ | [layer] | [technology] | [why] |
40
+
41
+ ## v1 scope — IN
42
+ [Bullet list of what is included]
43
+
44
+ ## v1 scope — OUT (explicitly excluded)
45
+ [Bullet list from answer 5]
46
+
47
+ ## Success criteria
48
+ [From answer 6]
49
+
50
+ ## Compliance
51
+ [From answer 7]
52
+
53
+ ## Initialised
54
+ [ISO 8601 timestamp]
55
+ ```
56
+
57
+ Write `.planning/REQUIREMENTS.md`:
58
+ ```markdown
59
+ # Requirements — [Project Name]
60
+
61
+ ## Functional requirements
62
+ | ID | Requirement | Acceptance criterion | Scope |
63
+ |-------|--------------------------|--------------------------------|-------|
64
+ | FR-01 | | | v1 |
65
+
66
+ ## Non-functional requirements
67
+ | ID | Category | Requirement | Measure |
68
+ |--------|---------------|--------------------------------|----------------|
69
+ | NFR-01 | Performance | | |
70
+ | NFR-02 | Security | | |
71
+ | NFR-03 | Availability | | |
72
+
73
+ ## Out of scope
74
+ [Items explicitly excluded from v1]
75
+ ```
76
+
77
+ Write `.planning/STATE.md`:
78
+ ```markdown
79
+ # MindForge — Project State
80
+
81
+ ## Status
82
+ Project initialised. No phases started.
83
+
84
+ ## Current phase
85
+ None
86
+
87
+ ## Last completed task
88
+ Project initialisation
89
+
90
+ ## Next action
91
+ Run /mindforge:plan-phase 1 to begin planning Phase 1.
92
+
93
+ ## Decisions made
94
+ - Project scope defined (see PROJECT.md)
95
+ - Tech stack chosen (see PROJECT.md)
96
+
97
+ ## Active blockers
98
+ None
99
+
100
+ ## Last updated
101
+ [ISO 8601 timestamp]
102
+ ```
103
+
104
+ Write `.planning/HANDOFF.json`:
105
+ ```json
106
+ {
107
+ "schema_version": "1.0.0",
108
+ "project": "[project name]",
109
+ "phase": null,
110
+ "plan": null,
111
+ "plan_step": null,
112
+ "last_completed_task": {
113
+ "description": "Project initialisation",
114
+ "commit_sha": null,
115
+ "verified": true
116
+ },
117
+ "next_task": "Run /mindforge:plan-phase 1",
118
+ "in_progress": {
119
+ "file": null,
120
+ "intent": null,
121
+ "completed_steps": [],
122
+ "remaining_steps": []
123
+ },
124
+ "blockers": [],
125
+ "decisions_needed": [],
126
+ "context_refs": [
127
+ ".planning/PROJECT.md",
128
+ ".planning/STATE.md",
129
+ ".planning/REQUIREMENTS.md"
130
+ ],
131
+ "agent_notes": "Fresh project. Read PROJECT.md and REQUIREMENTS.md before planning.",
132
+ "session_summary": "Project initialised.",
133
+ "recent_files": [
134
+ ".planning/PROJECT.md",
135
+ ".planning/REQUIREMENTS.md",
136
+ ".planning/STATE.md",
137
+ ".planning/HANDOFF.json"
138
+ ],
139
+ "recent_commits": [],
140
+ "updated_at": "[ISO 8601 timestamp]",
141
+ "_warning": "Never store secrets, tokens, or passwords in this file. It is tracked in git."
142
+ }
143
+ ```
144
+
145
+ ## Step 3 — Confirm and guide
146
+ Tell the user:
147
+ "✅ MindForge project initialised.
148
+
149
+ Files created:
150
+ .planning/PROJECT.md
151
+ .planning/REQUIREMENTS.md
152
+ .planning/STATE.md
153
+ .planning/HANDOFF.json
154
+
155
+ Next step: Run /mindforge:plan-phase 1 to plan your first phase."
@@ -0,0 +1,15 @@
1
+ # MindForge — Install Skill Command
2
+ # Usage: /mindforge:install-skill [skill-name|package-name] [--tier 1|2|3] [--registry URL]
3
+
4
+ Follow the full installation protocol from `.mindforge/distribution/registry-client.md`.
5
+
6
+ Steps:
7
+ 1. Resolve package name from skill name
8
+ 2. Check if already installed (skip if same version, offer upgrade if newer)
9
+ 3. Fetch from registry (npm or private if --registry specified)
10
+ 4. Validate the skill (Level 1 + Level 2 from skill-validator.md)
11
+ 5. Run injection guard check
12
+ 6. Install to tier directory (default: Tier 2 org skill)
13
+ 7. Register in MANIFEST.md
14
+ 8. Write AUDIT entry
15
+ 9. Confirm: "Run /mindforge:skills validate to verify installation"
@@ -0,0 +1,298 @@
1
+ # MindForge — Map Codebase Command
2
+ # Usage: /mindforge:map-codebase [area]
3
+ # Onboards MindForge to an existing (brownfield) codebase.
4
+ # Run this INSTEAD of /mindforge:init-project when joining an existing project.
5
+
6
+ ## When to use this command
7
+ - Joining an existing project that has no MindForge context files
8
+ - Adding MindForge to a team that already has a codebase
9
+ - Onboarding to a new-to-you repository
10
+ - Re-mapping after major architectural changes
11
+
12
+ ## What it produces
13
+ - `.planning/ARCHITECTURE.md` — system architecture discovered from code
14
+ - `.planning/PROJECT.md` — project identity inferred from codebase + user confirmation
15
+ - `.mindforge/org/CONVENTIONS.md` — actual conventions found in the code
16
+ - `.planning/STATE.md` — current position (MindForge onboarded, ready to plan)
17
+ - `.planning/decisions/ADR-NNN-[title].md` — key architectural decisions found
18
+
19
+ ## Pre-execution security check
20
+
21
+ Before reading ANY files, build an exclusion list.
22
+ NEVER read these file patterns during codebase mapping:
23
+
24
+ ```bash
25
+ # Build the exclusion list
26
+ EXCLUDED_PATTERNS=(
27
+ "*.env" ".env.*" "*.env.local"
28
+ "*.key" "*.pem" "*.p12" "*.pfx"
29
+ "secrets/*" "**/secrets/*" "**/.secrets/*"
30
+ "*.secret" "*credentials*"
31
+ ".npmrc" # may contain npm tokens
32
+ ".pypirc" # may contain PyPI tokens
33
+ "~/.aws/*" "~/.ssh/*"
34
+ )
35
+ ```
36
+
37
+ For any file the agent is about to read, check:
38
+ 1. Does the file name match any excluded pattern?
39
+ 2. Is the file in a directory named `secrets/`, `.secrets/`, or `credentials/`?
40
+ 3. Is the file listed in `.gitignore`? (`.gitignore` files are intentionally excluded from git for a reason)
41
+
42
+ If yes to any: SKIP the file. Log that it was skipped.
43
+ Do not include any content from excluded files in ARCHITECTURE.md or CONVENTIONS.md.
44
+
45
+ ## Step 0 — Clean up any previous mapping artifacts
46
+
47
+ ```bash
48
+ # Remove any stale temp files from a previous mapping attempt
49
+ if [ -d ".planning/map-temp" ]; then
50
+ echo "Cleaning up previous mapping session..."
51
+ rm -rf .planning/map-temp
52
+ fi
53
+ mkdir -p .planning/map-temp
54
+ ```
55
+
56
+ ## Step 1 — Codebase inventory
57
+
58
+ Spawn FOUR parallel subagents. Each focuses on one analysis area.
59
+ Each subagent writes its findings to a temporary file.
60
+
61
+ ### Subagent A — Technology Stack Analyst
62
+ Context: minimal (CONVENTIONS.md template + task description)
63
+ Persona: architect.md
64
+ Task:
65
+ ```
66
+ Analyse this repository's technology stack. Read:
67
+ - package.json / requirements.txt / Cargo.toml / go.mod (root and workspaces)
68
+ - Dockerfile, docker-compose.yml (if present)
69
+ - CI/CD configuration: .github/workflows/, .gitlab-ci.yml, .circleci/
70
+ - Infrastructure files: terraform/, pulumi/, k8s/, helm/
71
+
72
+ Write to: .planning/map-temp/STACK.md
73
+ Include:
74
+ - Runtime/language and version
75
+ - Framework(s) and versions
76
+ - Database(s) used
77
+ - Cache and queue systems
78
+ - Testing framework(s)
79
+ - Build and bundling tools
80
+ - Deployment target (AWS/GCP/Azure/bare metal/etc.)
81
+ - External services integrated (payment, email, auth, etc.)
82
+ ```
83
+
84
+ ### Subagent B — Architecture Analyst
85
+ Context: minimal
86
+ Persona: architect.md
87
+ Task:
88
+ ```
89
+ Analyse this repository's architecture. Read:
90
+ - All files in src/ (or equivalent) — structure, not content
91
+ - README.md and any docs/ directory
92
+ - Any architecture diagrams (look for .png, .svg, .drawio in docs/)
93
+ - Entry points: index.ts, main.py, app.go, server.ts (root-level)
94
+
95
+ Write to: .planning/map-temp/ARCHITECTURE-RAW.md
96
+ Include:
97
+ - Architectural pattern: MVC / Clean Architecture / Hexagonal / Modular Monolith / Microservices
98
+ - Domain model: what are the core entities? (infer from models/, entities/, types/)
99
+ - API surface: public endpoints found in routes/, controllers/, handlers/
100
+ - Module structure: how is the code organised? Feature-based / Layer-based?
101
+ - Key design patterns in use: Repository, Service, Factory, Observer, etc.
102
+ ```
103
+
104
+ ### Scale handling for large codebases
105
+
106
+ Before reading source files, count them:
107
+ ```bash
108
+ find src/ -type f \( -name "*.ts" -o -name "*.py" -o -name "*.go" \) | wc -l
109
+ ```
110
+
111
+ If count > 200 files: use sampling strategy instead of full read:
112
+ - Read 3 files from each top-level subdirectory
113
+ - Prioritise: largest files (by size), entry points (index.*, main.*, app.*)
114
+ - Read the full Prisma schema / SQLAlchemy models / Django models file (always)
115
+ - Read all route/controller index files (always)
116
+ - Sample 2-3 files per feature directory
117
+ - Do NOT read test files during mapping (they follow source patterns, not add to them)
118
+
119
+ If count > 1000 files: read only entry points, schema files, and top-level indices.
120
+ Report to the user: "Large codebase detected ([N] source files).
121
+ Using sampling strategy — some conventions may require manual confirmation."
122
+
123
+ ### Subagent C — Conventions Analyst
124
+ Context: minimal
125
+ Persona: developer.md
126
+ Task:
127
+ ```
128
+ Analyse the actual coding conventions used in this repository.
129
+ Read 5-10 representative source files from different areas of the codebase.
130
+
131
+ Write to: .planning/map-temp/CONVENTIONS-RAW.md
132
+ Infer and document:
133
+ - Naming conventions: variables, functions, classes, files, database columns
134
+ - Import order and grouping style
135
+ - Error handling patterns: how are errors thrown and caught?
136
+ - TypeScript patterns: preferred type patterns, generic usage
137
+ - Comment style: JSDoc, inline, etc.
138
+ - Test file naming and location pattern
139
+ - Async patterns: callbacks / promises / async-await
140
+ - State management (frontend): if applicable
141
+ - Any recurring patterns that appear across multiple files
142
+
143
+ Important: document what IS there, not what should be there.
144
+ This is a description of reality, not a prescription.
145
+ ```
146
+
147
+ ### Subagent D — Quality Baseline Analyst
148
+ Context: minimal
149
+ Persona: qa-engineer.md
150
+ Task:
151
+ ```
152
+ Assess the current quality baseline of this repository.
153
+
154
+ Write to: .planning/map-temp/QUALITY-BASELINE.md
155
+ Check:
156
+ - Test coverage: does a test suite exist? What framework? Run: [test command] --coverage
157
+ - Linting: is a linter configured? (.eslintrc, .pylintrc, ruff.toml, etc.)
158
+ - Type checking: TypeScript config? Strict mode enabled?
159
+ - CI/CD: does it run tests on PRs?
160
+ - Security: any security scanning in CI?
161
+ - Known issues: open GitHub/GitLab issues, TODO count in source
162
+
163
+ Note: do not fix anything. Only document what exists.
164
+ ```
165
+
166
+ ## Step 2 — Synthesise findings
167
+
168
+ Read all four temp files. Synthesise into the permanent context files.
169
+
170
+ ### Write `.planning/ARCHITECTURE.md`
171
+
172
+ Use ARCHITECTURE-RAW.md as input. Write a clean, structured architecture document:
173
+
174
+ ```markdown
175
+ # [Project Name] — Architecture
176
+
177
+ ## System overview
178
+ [2-3 sentences from the subagent's findings]
179
+
180
+ ## Technology stack
181
+ [From STACK.md — organised by layer]
182
+
183
+ ## Architectural pattern
184
+ [From ARCHITECTURE-RAW.md]
185
+
186
+ ## Domain model
187
+ [Core entities and their relationships]
188
+
189
+ ## API surface
190
+ [Key endpoints / GraphQL operations / gRPC services found]
191
+
192
+ ## Module structure
193
+ [How the codebase is organised]
194
+
195
+ ## External integrations
196
+ [Third-party services found]
197
+
198
+ ## Known architectural decisions
199
+ [Any ADRs, architecture docs, or README decisions found]
200
+
201
+ ## Quality baseline
202
+ [From QUALITY-BASELINE.md — honest assessment]
203
+
204
+ ## MindForge onboarding notes
205
+ [What was inferred vs. confirmed, what needs human review]
206
+ ```
207
+
208
+ ### Write `.mindforge/org/CONVENTIONS.md`
209
+
210
+ Use CONVENTIONS-RAW.md as input. Write the conventions file in the standard format,
211
+ but clearly mark inferred conventions:
212
+
213
+ ```markdown
214
+ # Coding Conventions — [Project Name]
215
+ # Source: Inferred from codebase analysis by MindForge
216
+ # Status: DRAFT — confirm with team before treating as authoritative
217
+
218
+ ## IMPORTANT
219
+ These conventions were inferred from code analysis. Review each section
220
+ and mark as [CONFIRMED] or [NEEDS REVIEW] before running /mindforge:plan-phase.
221
+
222
+ ## Naming conventions [NEEDS REVIEW]
223
+ [What was found]
224
+ ```
225
+
226
+ ## Step 3 — Present findings for confirmation
227
+
228
+ Present a summary to the user. Ask for confirmation and corrections:
229
+
230
+ ```
231
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
232
+ MindForge Codebase Analysis Complete
233
+
234
+ Stack:
235
+ Runtime : Node.js 20 (inferred from .nvmrc)
236
+ Framework : Next.js 14 (inferred from package.json)
237
+ Database : PostgreSQL via Prisma (inferred from prisma/schema.prisma)
238
+ Auth : NextAuth.js (inferred from package.json)
239
+
240
+ Architecture:
241
+ Pattern : Feature-based modular (inferred from src/ structure)
242
+ Entities : User, Organization, Project, Task (inferred from Prisma schema)
243
+ API : REST API in src/app/api/ (24 route files found)
244
+
245
+ Quality baseline:
246
+ Tests : Vitest, ~340 test files, ~67% coverage (inferred from coverage report)
247
+ Linting : ESLint configured, strict TypeScript
248
+ CI/CD : GitHub Actions (4 workflows)
249
+
250
+ Conventions: see .mindforge/org/CONVENTIONS.md (DRAFT — needs review)
251
+
252
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
253
+
254
+ Does this look correct? (yes / correct [field]: [value] / no)
255
+ ```
256
+
257
+ Wait for user confirmation. Apply any corrections the user provides.
258
+
259
+ ## Step 4 — Write PROJECT.md and STATE.md
260
+
261
+ After confirmation, write:
262
+
263
+ `.planning/PROJECT.md` — populated with confirmed findings
264
+ `.planning/STATE.md` — status: "Codebase mapped. Ready to plan first phase."
265
+ Add a warning in STATE.md if CONVENTIONS.md is still DRAFT and requires review.
266
+ `.planning/HANDOFF.json` — updated with onboarding completion
267
+
268
+ ## Step 5 — Clean up and report
269
+
270
+ After analysis completes, delete `.planning/map-temp/` to avoid stale data.
271
+
272
+ ```bash
273
+ rm -rf .planning/map-temp/
274
+ ```
275
+
276
+ Report to user:
277
+ "✅ Codebase mapped.
278
+
279
+ Files created:
280
+ .planning/ARCHITECTURE.md
281
+ .planning/PROJECT.md
282
+ .mindforge/org/CONVENTIONS.md (DRAFT — please review)
283
+ .planning/STATE.md
284
+
285
+ Review .mindforge/org/CONVENTIONS.md and mark each section as [CONFIRMED].
286
+ Then run /mindforge:plan-phase 1 to begin your first phase."
287
+
288
+ Write AUDIT entry:
289
+ ```json
290
+ {
291
+ "event": "codebase_mapped",
292
+ "files_analysed": [N],
293
+ "entities_found": [N],
294
+ "api_routes_found": [N],
295
+ "conventions_confidence": "medium",
296
+ "requires_human_review": [".mindforge/org/CONVENTIONS.md"]
297
+ }
298
+ ```
@@ -0,0 +1,22 @@
1
+ # MindForge — Metrics Command
2
+ # Usage: /mindforge:metrics [--phase N] [--window short|medium|long] [--export path]
3
+
4
+ Display session and phase quality trends with early warning signals.
5
+
6
+ ## Data sources
7
+ - `.mindforge/metrics/session-quality.jsonl`
8
+ - `.mindforge/metrics/phase-metrics.jsonl`
9
+ - `.mindforge/metrics/skill-usage.jsonl`
10
+ - `.mindforge/metrics/compaction-quality.jsonl`
11
+ - `.planning/AUDIT.jsonl` for correlation
12
+
13
+ ## Dashboard sections
14
+ - session quality trend
15
+ - verify pass/security/failure/compaction summary
16
+ - skill usage distribution
17
+ - early warnings + recommendations
18
+
19
+ ## AUDIT
20
+ ```json
21
+ { "event": "metrics_viewed", "window": "short", "early_warnings": 0 }
22
+ ```
@@ -0,0 +1,40 @@
1
+ # MindForge — Migrate Command
2
+ # Usage: /mindforge:migrate [--from X.Y.Z] [--to X.Y.Z] [--dry-run] [--force]
3
+
4
+ ## Purpose
5
+ Run explicit schema migrations for .planning/ files.
6
+ Normally triggered automatically by /mindforge:update.
7
+ Use this command manually when: auto-migration failed, manual version jump, recovery.
8
+
9
+ ## Flow
10
+
11
+ ### Auto-detect migration need
12
+ Read `schema_version` from HANDOFF.json.
13
+ Compare against current `package.json` version.
14
+ Determine migration path.
15
+
16
+ ### Dry-run mode (--dry-run)
17
+ Show: which migrations would run, what each changes.
18
+ Show: breaking changes for the migration path.
19
+ Make NO changes to any file.
20
+
21
+ ### Backup first
22
+ Before any changes: create `.planning/migration-backup-[timestamp]/`
23
+ Verify backup integrity (file count, non-empty).
24
+ If backup fails: ABORT. Explain disk space issue.
25
+
26
+ ### Execute migrations
27
+ Run `node bin/migrations/migrate.js`.
28
+ Show progress for each migration.
29
+ If any migration fails: auto-restore from backup.
30
+
31
+ ### Verify
32
+ Run /mindforge:health after migration.
33
+ If health errors: report with specific fix instructions.
34
+ Preserve backup until user is satisfied — they must delete it manually.
35
+
36
+ ## Manual version override
37
+ `/mindforge:migrate --from 0.1.0 --to 1.0.0` — forces migration between specified versions.
38
+ Use with care: intended for recovery scenarios where HANDOFF.json schema_version is wrong.
39
+
40
+ ## AUDIT entry
@@ -0,0 +1,12 @@
1
+ Create or update a milestone definition in `.planning/milestones/` and track the
2
+ health of grouped phases. Usage: `/mindforge:milestone <name> [phase list]`
3
+
4
+ ## Outputs
5
+ - milestone document with included phases
6
+ - health summary (on track, at risk, blocked)
7
+ - linked approvals, blockers, and verification status
8
+
9
+ ## Health rules
10
+ - any blocked phase makes the milestone at risk
11
+ - missing verification keeps milestone status yellow
12
+ - completed verified phases count toward release readiness
@@ -0,0 +1,105 @@
1
+ # MindForge — Next Command
2
+ # Usage: /mindforge:next
3
+
4
+ Auto-detect the current project state and execute the appropriate next step.
5
+ The user does not need to know the workflow. MindForge figures it out.
6
+
7
+ ## HANDOFF.json priority rule
8
+ Check HANDOFF.json BEFORE running the decision tree.
9
+
10
+ If HANDOFF.json exists AND `updated_at` is within 48 hours AND `next_task` is not null:
11
+ present the HANDOFF state first. Only run the decision tree if the user declines
12
+ or the HANDOFF.json is stale.
13
+
14
+ ## State detection logic
15
+
16
+ Read STATE.md and HANDOFF.json. Then follow this decision tree:
17
+
18
+ ### Decision tree
19
+
20
+ ```
21
+ Does .planning/PROJECT.md exist AND have content?
22
+ NO → Run /mindforge:init-project
23
+ YES → Continue
24
+
25
+ Does .planning/ROADMAP.md exist AND have phases defined?
26
+ NO → Tell user: "Project is initialised but no phases are defined yet.
27
+ Describe what Phase 1 should accomplish and I'll plan it."
28
+ Then run /mindforge:plan-phase 1
29
+ YES → Continue
30
+
31
+ Read the phase status from STATE.md.
32
+
33
+ Does the current phase have plans? (check .planning/phases/[N]/PLAN-[N]-*.md)
34
+ NO → Run /mindforge:plan-phase [N]
35
+ YES → Continue
36
+
37
+ Do SUMMARY files exist for all plans in the current phase?
38
+ NO → Run /mindforge:execute-phase [N]
39
+ YES → Continue
40
+
41
+ Does VERIFICATION.md exist for the current phase?
42
+ NO → Run /mindforge:verify-phase [N] (automated part)
43
+ YES → Continue
44
+
45
+ Does UAT.md exist and show all tests passing?
46
+ NO → Run /mindforge:verify-phase [N] (UAT part)
47
+ YES → Continue
48
+
49
+ Is this phase marked as shipped in STATE.md?
50
+ NO → Run /mindforge:ship [N]
51
+ YES → Continue
52
+
53
+ Are there more phases in ROADMAP.md?
54
+ YES → Increment phase number. Run /mindforge:plan-phase [N+1]
55
+ NO → Tell user: "All phases complete! Run /mindforge:ship [N] for the final release."
56
+ ```
57
+
58
+ ## Partial phase execution handling
59
+ In the decision tree step "Do SUMMARY files exist for all plans?":
60
+
61
+ Do not treat this as binary. Check individually:
62
+
63
+ ```
64
+ PLAN-[N]-01.md exists? SUMMARY-[N]-01.md exists?
65
+ PLAN-[N]-02.md exists? SUMMARY-[N]-02.md exists?
66
+ PLAN-[N]-03.md exists? SUMMARY-[N]-03.md exists?
67
+ ```
68
+
69
+ If some SUMMARY files exist and some don't: this is a partially-executed phase.
70
+ Report: "Phase [N] is partially executed: plans [X, Y] are done, [Z] is not."
71
+ Ask: "Resume execution from Plan [Z]? (yes/no)"
72
+ Do not restart the entire phase — resume from the first missing SUMMARY.
73
+
74
+ ## Before auto-executing: always confirm
75
+ Before running any command automatically, tell the user:
76
+
77
+ ```
78
+ MindForge next step detected:
79
+ Current state : [description of current state]
80
+ Next action : [what will be run]
81
+ Command : /mindforge:[command] [args]
82
+
83
+ Run this now? (yes/no/different)
84
+ ```
85
+
86
+ If user says "different": ask what they want to do instead.
87
+ If user says "yes": proceed with the detected command.
88
+
89
+ ## Handling HANDOFF.json (session restart)
90
+ If HANDOFF.json has a `next_task` field from a previous session:
91
+ Present it prominently:
92
+
93
+ ```
94
+ Previous session found:
95
+ Saved at : [updated_at from HANDOFF.json]
96
+ Left off : [last_completed_task]
97
+ Next task : [next_task]
98
+
99
+ Options:
100
+ 1. Continue from where we left off
101
+ 2. Check current state and determine next step fresh
102
+ 3. Tell me what you want to do
103
+
104
+ Choose 1, 2, or 3:
105
+ ```