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,125 @@
1
+ Plan a project phase. Usage: /mindforge:plan-phase [N]
2
+
3
+ ## Pre-check
4
+ If N is not given, read STATE.md for the current phase number and increment by 1.
5
+ Read PROJECT.md, REQUIREMENTS.md, ARCHITECTURE.md, and STATE.md before proceeding.
6
+
7
+ ## Pre-read (before any questions or planning)
8
+
9
+ Read these files in order:
10
+ 1. `.planning/PROJECT.md`
11
+ 2. `.planning/REQUIREMENTS.md`
12
+ 3. `.planning/ARCHITECTURE.md`
13
+ 4. `.planning/STATE.md`
14
+ 5. `.planning/phases/phase-[N]/CONTEXT.md` (if it exists)
15
+
16
+ ### If CONTEXT.md exists for phase [N]:
17
+ This means `/mindforge:discuss-phase [N]` was already run.
18
+ The user's implementation decisions are already captured.
19
+ DO NOT re-ask questions that CONTEXT.md already answers.
20
+ Read CONTEXT.md completely before asking any clarifying questions.
21
+ Report: "I've read the phase discussion context. [N] decisions were captured.
22
+ Planning will follow these decisions."
23
+
24
+ ### If CONTEXT.md has open questions:
25
+ Read the "Open questions" section in CONTEXT.md.
26
+ Present unresolved questions to the user NOW, before planning begins.
27
+ Do not create plans that assume answers to open questions without confirming first.
28
+
29
+ ### If CONTEXT.md does NOT exist for phase [N]:
30
+ Proceed normally with the discussion → planning flow.
31
+
32
+ ## Step 1 — Discuss phase scope
33
+ Ask:
34
+ 1. "Describe what Phase [N] should accomplish. 2-3 sentences."
35
+ 2. "Have you already made any implementation decisions for this phase?
36
+ (libraries, patterns, approaches) If yes, list them."
37
+ 3. "Are there any constraints I should know about?
38
+ (deadlines, dependencies on other teams, tech limitations)"
39
+
40
+ Write answers to `.planning/phases/phase-[N]/CONTEXT.md`.
41
+
42
+ If `.planning/phases/phase-[N]/CONTEXT.md` already exists:
43
+ 1. Read it first.
44
+ 2. If it has "Open questions", ask the user to resolve them before planning.
45
+ 3. Update CONTEXT.md with the answers and mark those questions as resolved.
46
+
47
+ ### If CONTEXT.md exists — skip already-answered questions
48
+ Only ask about areas NOT covered in CONTEXT.md.
49
+ Example: if CONTEXT.md captures the layout decision, do not ask "What layout do you want?"
50
+ Respect the prior discussion. Build on it. Do not repeat it.
51
+
52
+ ## Step 2 — Domain research (spawn subagent)
53
+ Spawn a research subagent with this context only:
54
+ - The tech stack from PROJECT.md
55
+ - The phase scope from CONTEXT.md
56
+ - CONVENTIONS.md
57
+
58
+ Instruct it to investigate:
59
+ 1. Best available libraries for this phase's requirements (with version numbers)
60
+ 2. Common pitfalls and anti-patterns for this tech domain
61
+ 3. Relevant architectural patterns (with tradeoffs)
62
+ 4. Any known security considerations specific to this domain
63
+
64
+ Write findings to `.planning/phases/phase-[N]/RESEARCH.md`.
65
+
66
+ ## Step 3 — Create atomic task plans
67
+ Based on CONTEXT.md and RESEARCH.md, create 3-6 PLAN files.
68
+ Each plan must be completable in a single fresh context window.
69
+ Each plan targets specific files — no plan should touch more than 6 files.
70
+
71
+ File naming: `.planning/phases/phase-[N]/PLAN-[N]-[NN].md`
72
+ Example: `.planning/phases/1/PLAN-1-01.md`
73
+
74
+ Each plan uses this XML format:
75
+
76
+ ```xml
77
+ <task type="auto">
78
+ <n>Short descriptive task name</n>
79
+ <persona>developer</persona>
80
+ <phase>[N]</phase>
81
+ <plan>[NN]</plan>
82
+ <dependencies>List any PLAN files that must complete before this one, or "none"</dependencies>
83
+ <files>
84
+ src/exact/file/path.ts
85
+ src/another/file.ts
86
+ </files>
87
+ <context>
88
+ Relevant decisions from ARCHITECTURE.md:
89
+ - [decision]
90
+ Skills to load before starting:
91
+ - [skill name if applicable, or "none"]
92
+ </context>
93
+ <action>
94
+ Precise implementation instructions.
95
+ Include exact library names and versions.
96
+ Include the approach, not just the goal.
97
+ Include specific anti-patterns to avoid.
98
+ </action>
99
+ <verify>
100
+ [Exact runnable command or check]
101
+ Example: curl -X POST localhost:3000/api/auth/login -d '{"email":"test@test.com","password":"test"}' | jq .status
102
+ Must produce a deterministic pass/fail result.
103
+ </verify>
104
+ <done>One sentence definition of done.</done>
105
+ </task>
106
+ ```
107
+
108
+ ## Step 4 — Validate plans
109
+ Check every plan against REQUIREMENTS.md:
110
+ - Does this plan implement anything out of scope? If yes: revise.
111
+ - Does this plan contradict ARCHITECTURE.md? If yes: create an ADR first.
112
+ - Is the `<verify>` step actually runnable? If no: rewrite it.
113
+
114
+ ## Step 5 — Update state and confirm
115
+ Update STATE.md: current phase = N, status = "Phase N planned, ready to execute".
116
+
117
+ Tell the user:
118
+ "✅ Phase [N] planned. [X] task plans created.
119
+
120
+ Plans:
121
+ PLAN-[N]-01: [task name]
122
+ PLAN-[N]-02: [task name]
123
+ ...
124
+
125
+ Run /mindforge:execute-phase [N] to begin execution."
@@ -0,0 +1,40 @@
1
+ # MindForge — Plugins Command
2
+ # Usage: /mindforge:plugins [list|install|uninstall|info|validate|create] [name]
3
+
4
+ ## list
5
+ Read PLUGINS-MANIFEST.md. Display installed plugins with version and permissions.
6
+ If no plugins: "No plugins installed. Find plugins: npm search mindforge-plugin"
7
+
8
+ ## install [plugin-name]
9
+ Full installation protocol per plugin-loader.md:
10
+ 1. Resolve package: `mindforge-plugin-[name]` convention
11
+ 2. Download to chmod 700 temp directory
12
+ 3. Validate plugin.json manifest
13
+ 4. Check plugin_api_version compatibility (1.0.0 required)
14
+ 5. Run injection guard on ALL .md files in the plugin
15
+ 6. Run Level 1 + 2 skill validation on all SKILL.md files
16
+ 7. Display permission list for user approval:
17
+ ```
18
+ Plugin: mindforge-plugin-jira-advanced v1.0.0
19
+ Requests these permissions:
20
+ • read_audit_log: read AUDIT.jsonl ✅ (safe)
21
+ • write_audit_log: append to AUDIT.jsonl ⚠️
22
+ • network_access: make HTTP requests ⚠️
23
+ Install? (yes/no)
24
+ ```
25
+ 8. Install components (commands, skills, personas, hooks)
26
+ 9. Add to PLUGINS-MANIFEST.md
27
+ 10. Write AUDIT entry
28
+
29
+ ## uninstall [plugin-name]
30
+ Remove all installed components. Update PLUGINS-MANIFEST.md.
31
+ Confirm: "This will remove [N] commands, [N] skills from this plugin."
32
+
33
+ ## info [plugin-name]
34
+ Display: version, description, author, permissions, commands, skills, personas, hooks.
35
+
36
+ ## validate
37
+ Validate all installed plugins for compatibility, injection safety, permission scope.
38
+
39
+ ## create [plugin-name]
40
+ Generate a plugin scaffold:
@@ -0,0 +1,41 @@
1
+ # MindForge — PR Review Command
2
+ # Usage: /mindforge:pr-review [--diff path] [--sha base..head] [--output github|json|markdown]
3
+
4
+ Run the AI PR review engine on a pull request diff.
5
+
6
+ Steps:
7
+ 1. Determine diff source:
8
+ - `--diff path`: read diff from file
9
+ - `--sha base..head`: run `git diff base..head`
10
+ - Default: `git diff HEAD~1` (last commit) or `git diff --staged` (staged changes)
11
+
12
+ 2. Load review context (per ai-reviewer.md):
13
+ - PROJECT.md, ARCHITECTURE.md, CONVENTIONS.md, SECURITY.md
14
+ - Current phase's CONTEXT.md (if in an active phase)
15
+ - Any active ADRs relevant to changed files
16
+
17
+ 3. Detect change type and select review template:
18
+ - Auth/security changes → Security-focused review template
19
+ - Database migrations → Database migration review template
20
+ - API changes → API breaking change review template
21
+ - Default → Standard review template
22
+
23
+ 4. Check API availability:
24
+ - ANTHROPIC_API_KEY set? If not: warn and skip AI review
25
+ - Check daily review limit (from ai-reviewer.md)
26
+ - Check cache: has this SHA been reviewed in the last 60 minutes?
27
+
28
+ 5. Call Claude API (per ai-reviewer.md buildSystemPrompt + buildReviewPrompt)
29
+ - Handle errors gracefully — API unavailable is NOT a build failure
30
+ - Timeout: 60 seconds
31
+
32
+ 6. Format output per --output flag:
33
+ - github: GitHub-flavoured markdown for PR comment
34
+ - json: structured JSON with findings array
35
+ - markdown: standard markdown
36
+
37
+ 7. Write to output:
38
+ - If in CI: write to /tmp/mindforge-review.md (read by GitHub Actions step)
39
+ - If interactive: display to user
40
+
41
+ 8. Write AUDIT entry
@@ -0,0 +1,23 @@
1
+ # MindForge — Profile Team Command
2
+ # Usage: /mindforge:profile-team [--refresh] [--developer email] [--questionnaire]
3
+
4
+ Generate and maintain team/developer profiles for response personalization.
5
+
6
+ ## Data sources
7
+ 1. Declared questionnaire preferences
8
+ 2. Inferred patterns from AUDIT + git history + metrics
9
+ 3. Defaults from org conventions
10
+
11
+ ## Outputs
12
+ - `.mindforge/team/TEAM-PROFILE.md`
13
+ - `.mindforge/team/profiles/PROFILE-[dev-id].md`
14
+
15
+ ## Modes
16
+ - `--refresh`: inference-only update
17
+ - `--developer`: target one developer profile
18
+ - `--questionnaire`: prompt preference questions before writing
19
+
20
+ ## AUDIT
21
+ ```json
22
+ { "event": "team_profile_updated", "developers_profiled": 1, "method": "inferred" }
23
+ ```
@@ -0,0 +1,19 @@
1
+ # MindForge — Publish Skill Command
2
+ # Usage: /mindforge:publish-skill [skill-dir] [--registry URL] [--dry-run]
3
+
4
+ Publish a skill to the npm registry (or private registry).
5
+
6
+ Pre-publication checklist:
7
+ 1. Run full skill validation (Level 1 + 2 + 3 from skill-validator.md)
8
+ Fail if Level 1 or 2 fails. Warn if Level 3 fails.
9
+ 2. Verify package.json has `mindforge` field with all required sub-fields
10
+ 3. Verify CHANGELOG.md has an entry for the current version
11
+ 4. Check if version already published: `npm info [package-name]@[version]`
12
+ If already published: error "Version already exists. Bump the version."
13
+ 5. Run `npm pack --dry-run` to preview what will be published
14
+ 6. Confirm with user: "These files will be published: [list]. Proceed? (yes/no)"
15
+ 7. If --dry-run: stop here, show preview only
16
+ 8. Publish: `npm publish --access public`
17
+ 9. Verify: `npm info [package-name]@[version]` — confirm publication succeeded
18
+ 10. Write AUDIT: `{ "event": "skill_published", "package": "...", "version": "..." }`
19
+ 11. Report: "✅ [package-name]@[version] published to npm registry"
@@ -0,0 +1,135 @@
1
+ # MindForge — Quick Command
2
+ # Usage: /mindforge:quick [--research] [--review] [--full]
3
+ # For ad-hoc tasks that don't need full lifecycle management.
4
+
5
+ ## When to use quick vs plan-phase
6
+ Use QUICK for:
7
+ - Bug fixes not tied to a current phase
8
+ - Small improvements (< 3 files, < 2 hours)
9
+ - Dependency updates
10
+ - Documentation corrections
11
+ - One-off scripts or utilities
12
+
13
+ Use PLAN-PHASE for:
14
+ - Feature development
15
+ - Anything touching more than 6 files
16
+ - Anything requiring research before implementation
17
+ - Anything with external dependencies or stakeholder requirements
18
+
19
+ ## Step 1 — Task intake
20
+
21
+ Ask the user:
22
+ "What do you want to do?"
23
+
24
+ Listen to the description. If the task sounds larger than "quick" scope
25
+ (more than 6 files, architectural change, new feature), say:
26
+ "This sounds like more than a quick task. I recommend using /mindforge:plan-phase
27
+ instead to ensure it's properly planned and verified. Want to proceed with quick anyway?"
28
+
29
+ ## Step 2 — Optional research (--research flag or user requests it)
30
+
31
+ If `--research` is provided or the task involves unfamiliar libraries:
32
+ Spawn a focused research subagent. Give it:
33
+ - The task description
34
+ - The current tech stack from PROJECT.md
35
+ Ask it to: investigate the best approach, identify gotchas, recommend specific
36
+ libraries (with versions), and write a brief research note.
37
+
38
+ Report research findings to the user before proceeding.
39
+
40
+ ## Step 3 — Create a quick plan
41
+
42
+ ### Sequential quick task numbering
43
+ Determine the next quick task number by scanning `.planning/quick/`:
44
+ 1. List directories matching `[0-9][0-9][0-9]-*`
45
+ 2. Take the max numeric prefix and add 1 (start at 001 if none exist)
46
+ 3. If a directory already exists for the chosen number, require `--force` to proceed
47
+
48
+ Create `.planning/quick/[NNN]-[slug]/PLAN.md` where NNN is a sequential number
49
+ and slug is a 2-4 word kebab-case description.
50
+
51
+ Example: `.planning/quick/001-fix-login-null-check/PLAN.md`
52
+
53
+ Use the standard XML plan format:
54
+ ```xml
55
+ <task type="quick">
56
+ <n>[task name]</n>
57
+ <persona>[appropriate persona]</persona>
58
+ <files>[files to touch]</files>
59
+ <context>[relevant context]</context>
60
+ <action>[implementation instructions]</action>
61
+ <verify>[verification command]</verify>
62
+ <done>[definition of done]</done>
63
+ </task>
64
+ ```
65
+
66
+ Show the plan to the user. Wait for approval before executing.
67
+
68
+ ## Step 4 — Execute the quick plan
69
+
70
+ ### Security auto-trigger (mandatory)
71
+ Before execution, scan the task description and files for security keywords:
72
+ auth, authentication, login, password, token, JWT, session, payment, PII, upload,
73
+ credential, secret, key.
74
+
75
+ If any keyword matches: load `security-review/SKILL.md` and activate
76
+ `security-reviewer.md` persona for the implementation. This is required even
77
+ without the `--full` flag.
78
+
79
+ 1. Load persona from `.mindforge/personas/`
80
+ 2. Load any relevant skills based on task keywords
81
+ 3. Execute the plan
82
+ 4. Run `<verify>` — must pass before committing
83
+ 5. Commit: `[type](quick/[NNN]): [task name]`
84
+ 6. Write `.planning/quick/[NNN]-[slug]/SUMMARY.md`
85
+
86
+ ### STATE.md update policy
87
+ Quick tasks do not change phase status. If there is no active phase, note the
88
+ quick task completion in STATE.md under "Last completed task".
89
+
90
+ ## Step 5 — Optional review (--review flag)
91
+
92
+ If `--review` is provided:
93
+ Activate `code-quality.md` skill on the diff.
94
+ Report any issues before committing.
95
+ If BLOCKING issues found: fix before commit.
96
+
97
+ ## Step 6 — Optional full mode (--full flag)
98
+
99
+ If `--full` is provided, additionally:
100
+ - Run the project's full test suite (not just task-specific verify)
101
+ - Run the type checker and linter
102
+ - Activate `security-reviewer.md` if the task touches any security-sensitive code
103
+ - Write an AUDIT entry for the quick task
104
+
105
+ ## Linting always runs
106
+ Regardless of flags, after every quick task execution:
107
+ 1. Run the project's linter (from CONVENTIONS.md — check which linter applies)
108
+ 2. If lint errors found: fix them before committing.
109
+ 3. Linting is not part of `--full` — it is always part of quick.
110
+
111
+ ## Flags are composable
112
+ ```
113
+ /mindforge:quick # minimal — task, plan, execute
114
+ /mindforge:quick --research # adds domain research step
115
+ /mindforge:quick --review # adds code quality review of diff
116
+ /mindforge:quick --full # adds full test suite + linting + security
117
+ /mindforge:quick --research --full # all of the above
118
+ ```
119
+
120
+ ## AUDIT entry for quick tasks
121
+ ```json
122
+ {
123
+ "id": "uuid",
124
+ "timestamp": "ISO-8601",
125
+ "event": "quick_task_completed",
126
+ "agent": "mindforge-orchestrator",
127
+ "phase": null,
128
+ "session_id": "sess_abc",
129
+ "quick_id": "001",
130
+ "task_name": "Fix login null check",
131
+ "commit_sha": "abc1234",
132
+ "files_changed": ["src/auth/login.ts"],
133
+ "flags_used": ["--review"]
134
+ }
135
+ ```
@@ -0,0 +1,10 @@
1
+ # MindForge — Release Command
2
+ # Usage: /mindforge:release [--version X.Y.Z] [--dry-run] [--checklist-only]
3
+ # ⚠️ This command is for releasing the MindForge framework itself.
4
+ # For releasing your project phases, use /mindforge:ship instead.
5
+
6
+ ## Purpose
7
+ Execute the complete MindForge v1.0.0 (or any version) release pipeline.
8
+ Intended for the MindForge core team.
9
+
10
+ ## Gate: Production Readiness Checklist
@@ -0,0 +1,26 @@
1
+ # MindForge — Retrospective Command
2
+ # Usage: /mindforge:retrospective [phase N|milestone M] [--template agile|4ls|starfish]
3
+
4
+ Facilitate a structured retrospective with objective metrics + qualitative insights.
5
+
6
+ ## Workflow
7
+ 1. Gather quantitative signals (tasks, verify pass rate, findings, UAT, approvals).
8
+ 2. Run structured discussion by template.
9
+ 3. Write retrospective artifact in `.planning/phases/...` or `.planning/milestones/...`.
10
+ 4. Create follow-up tasks/tickets for action items.
11
+ 5. Update metrics with retrospective-completed event.
12
+
13
+ ## Step 5 — Apply learnings to MINDFORGE.md
14
+ Ask explicitly:
15
+ `Based on this retrospective, should we update MINDFORGE.md to improve future phases?`
16
+
17
+ If yes:
18
+ - propose exact config changes
19
+ - apply only after confirmation
20
+ - commit with clear rationale
21
+
22
+ Common mappings:
23
+ - vague plans -> lower discuss threshold / enable auto-discuss
24
+ - low verify pass rate -> lower max tasks per phase
25
+ - rising security findings -> force-load `security-review,data-privacy`
26
+ - frequent compaction pressure -> lower compaction threshold
@@ -0,0 +1,157 @@
1
+ # MindForge — Review Command
2
+ # Usage: /mindforge:review [path|phase N|--staged|--last-commit]
3
+ # Performs a comprehensive code review using code-quality and security skills.
4
+
5
+ ## Review targets
6
+ - `/mindforge:review` (no args) → review all uncommitted changes (`git diff`)
7
+ - `/mindforge:review --staged` → review staged changes (`git diff --cached`)
8
+ - `/mindforge:review --last-commit` → review the last commit (`git diff HEAD~1`)
9
+ - `/mindforge:review phase [N]` → review all commits in phase N
10
+ - `/mindforge:review [file-path]` → review a specific file
11
+ - `/mindforge:review [dir-path]` → review all files in a directory
12
+
13
+ ## Step 1 — Establish review scope
14
+
15
+ Based on the target argument, build the file list to review:
16
+ ```bash
17
+ # Uncommitted changes
18
+ git diff --name-only
19
+
20
+ # Staged changes
21
+ git diff --cached --name-only
22
+
23
+ # Last commit
24
+ git diff HEAD~1 --name-only
25
+
26
+ # Phase N (all commits between phase start and phase end tags)
27
+ git log --oneline --name-only [phase-start-sha]..[phase-end-sha]
28
+ ```
29
+
30
+ Display the file list to the user before reviewing:
31
+ "Reviewing [N] files: [list]"
32
+
33
+ ## Step 2 — Load review personas and skills
34
+
35
+ Activate TWO personas simultaneously for a comprehensive review:
36
+
37
+ **Primary:** `code-quality.md` — structural quality, conventions, complexity
38
+ **Secondary:** `security-reviewer.md` — security issues, data exposure, auth
39
+
40
+ Load these skills:
41
+ - `code-quality/SKILL.md` — always
42
+ - `security-review/SKILL.md` — always
43
+ - Contextual skills based on file types detected in the diff:
44
+ - `.ts`/`.tsx` → also load `api-design/SKILL.md` (if routes present)
45
+ - Database migration files → also load `database-patterns/SKILL.md`
46
+ - UI component files → also load `accessibility/SKILL.md`
47
+
48
+ ## Step 3 — Review each file
49
+
50
+ For each file in the review scope:
51
+
52
+ **Read the full file content** (not just the diff — context matters).
53
+ **Read the diff for this file** to understand what changed.
54
+
55
+ Apply ALL of the following checks:
56
+
57
+ ### Code quality checks
58
+ - [ ] Functions within length limits (CONVENTIONS.md standard)
59
+ - [ ] Cyclomatic complexity ≤ 10 (count if/else/switch/catch/ternary branches)
60
+ - [ ] No magic numbers (named constants used instead)
61
+ - [ ] No commented-out code
62
+ - [ ] No `TODO` or `FIXME` left uncommitted
63
+ - [ ] Error handling is explicit (no empty catch blocks)
64
+ - [ ] Naming is precise and unambiguous (no `data`, `info`, `temp`)
65
+ - [ ] Every exported function has a JSDoc/docstring
66
+ - [ ] DRY: no logic duplicated 3+ times
67
+ - [ ] No dead code (imports/variables defined but never used)
68
+
69
+ ### Convention checks (from CONVENTIONS.md)
70
+ - [ ] File naming follows convention
71
+ - [ ] Import order follows the defined order
72
+ - [ ] All forbidden patterns are absent
73
+ - [ ] Architecture boundaries respected (services don't import routes, etc.)
74
+
75
+ ### Security checks (from security-review SKILL)
76
+ - [ ] No hardcoded credentials or secrets
77
+ - [ ] User input validated at boundaries
78
+ - [ ] SQL queries parameterised
79
+ - [ ] Sensitive data not in logs or error messages
80
+ - [ ] New dependencies CVE-scanned
81
+
82
+ ### Type safety (TypeScript projects)
83
+ - [ ] No `any` types without justification comment
84
+ - [ ] No `as unknown as X` casting without justification
85
+ - [ ] All function parameters typed (no implicit any)
86
+ - [ ] Return types explicitly declared on public functions
87
+
88
+ ## Step 4 — Write the review report
89
+
90
+ Create `.planning/phases/[current-phase]/CODE-REVIEW-[timestamp].md`
91
+ or `.planning/quick/review-[timestamp].md` for ad-hoc reviews:
92
+
93
+ ```markdown
94
+ # Code Review Report
95
+ **Date:** [ISO-8601]
96
+ **Reviewer:** MindForge (code-quality + security-reviewer)
97
+ **Scope:** [what was reviewed]
98
+ **Files reviewed:** [N]
99
+
100
+ ## Summary
101
+ [2-3 sentences: overall quality, major themes, recommendation]
102
+
103
+ ## Findings
104
+
105
+ ### 🔴 Blocking (must fix before merge)
106
+ | # | File | Line | Issue | Recommendation |
107
+ |---|---|---|---|---|
108
+ | 1 | src/auth/login.ts | 47 | Parameterised query not used | Use `db.query('SELECT * FROM users WHERE id = $1', [id])` |
109
+
110
+ ### 🟠 Major (should fix in this PR)
111
+ | # | File | Line | Issue | Recommendation |
112
+ |---|---|---|---|---|
113
+ | 1 | src/api/users.ts | 23 | Function is 67 lines (limit: 40) | Extract `validateUserInput` to separate function |
114
+
115
+ ### 🟡 Minor (fix in follow-up)
116
+ | # | File | Line | Issue | Recommendation |
117
+ |---|---|---|---|---|
118
+ | 1 | src/models/order.ts | 8 | Missing JSDoc on exported function | Add `@param`, `@returns`, `@throws` |
119
+
120
+ ### 💡 Suggestions (optional improvements)
121
+ | # | File | Line | Suggestion |
122
+ |---|---|---|---|
123
+ | 1 | src/services/email.ts | 15 | Consider memoising the template compilation |
124
+
125
+ ## Metrics
126
+ - Files reviewed: [N]
127
+ - Lines reviewed: [N]
128
+ - Blocking findings: [N]
129
+ - Major findings: [N]
130
+ - Minor findings: [N]
131
+ - Suggestions: [N]
132
+
133
+ ## Verdict
134
+ ✅ APPROVED — No blocking or major findings
135
+ ⚠️ APPROVED WITH CONDITIONS — Fix [N] major findings
136
+ ❌ CHANGES REQUIRED — [N] blocking findings must be fixed
137
+ ```
138
+
139
+ ## Step 5 — Write AUDIT entry
140
+
141
+ ```json
142
+ {
143
+ "event": "code_review_completed",
144
+ "scope": "[what was reviewed]",
145
+ "files_reviewed": [N],
146
+ "blocking_findings": [N],
147
+ "major_findings": [N],
148
+ "verdict": "approved | changes_required",
149
+ "report_path": ".planning/.../CODE-REVIEW-[timestamp].md"
150
+ }
151
+ ```
152
+
153
+ ## Step 6 — Report to user
154
+
155
+ Display a summary of findings.
156
+ If blocking findings exist: do not allow merge.
157
+ Tell the user: "Fix the [N] blocking issues, then run /mindforge:review again to re-check."