mindforge-cc 2.0.0 → 2.1.1

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 (323) hide show
  1. package/.agent/bin/lib/commands.cjs +959 -0
  2. package/.agent/bin/lib/config.cjs +421 -0
  3. package/.agent/bin/lib/core.cjs +1166 -0
  4. package/.agent/bin/lib/frontmatter.cjs +307 -0
  5. package/.agent/bin/lib/init.cjs +1336 -0
  6. package/.agent/bin/lib/milestone.cjs +252 -0
  7. package/.agent/bin/lib/model-profiles.cjs +68 -0
  8. package/.agent/bin/lib/phase.cjs +888 -0
  9. package/.agent/bin/lib/profile-output.cjs +952 -0
  10. package/.agent/bin/lib/profile-pipeline.cjs +539 -0
  11. package/.agent/bin/lib/roadmap.cjs +329 -0
  12. package/.agent/bin/lib/security.cjs +356 -0
  13. package/.agent/bin/lib/state.cjs +969 -0
  14. package/.agent/bin/lib/template.cjs +222 -0
  15. package/.agent/bin/lib/uat.cjs +189 -0
  16. package/.agent/bin/lib/verify.cjs +851 -0
  17. package/.agent/bin/lib/workstream.cjs +491 -0
  18. package/.agent/bin/mindforge-tools.cjs +897 -0
  19. package/.agent/file-manifest.json +219 -0
  20. package/.agent/hooks/mindforge-check-update.js +114 -0
  21. package/.agent/hooks/mindforge-context-monitor.js +156 -0
  22. package/.agent/hooks/mindforge-prompt-guard.js +96 -0
  23. package/.agent/hooks/mindforge-statusline.js +119 -0
  24. package/.agent/hooks/mindforge-workflow-guard.js +94 -0
  25. package/.agent/mindforge/add-backlog.md +32 -0
  26. package/.agent/mindforge/agent.md +31 -0
  27. package/.agent/mindforge/discuss-phase.md +1 -1
  28. package/.agent/mindforge/do.md +31 -0
  29. package/.agent/mindforge/help.md +1 -1
  30. package/.agent/mindforge/learn.md +3 -2
  31. package/.agent/mindforge/note.md +35 -0
  32. package/.agent/mindforge/plant-seed.md +31 -0
  33. package/.agent/mindforge/research.md +3 -2
  34. package/.agent/mindforge/review-backlog.md +34 -0
  35. package/.agent/mindforge/session-report.md +39 -0
  36. package/.agent/mindforge/steer.md +1 -1
  37. package/.agent/mindforge/ui-phase.md +34 -0
  38. package/.agent/mindforge/ui-review.md +36 -0
  39. package/.agent/mindforge/validate-phase.md +31 -0
  40. package/.agent/mindforge/workstreams.md +35 -0
  41. package/.agent/settings.json +38 -0
  42. package/.agent/skills/mindforge-add-backlog/SKILL.md +72 -0
  43. package/.agent/skills/mindforge-add-phase/SKILL.md +39 -0
  44. package/.agent/skills/mindforge-add-tests/SKILL.md +28 -0
  45. package/.agent/skills/mindforge-add-todo/SKILL.md +42 -0
  46. package/.agent/skills/mindforge-audit-milestone/SKILL.md +29 -0
  47. package/.agent/skills/mindforge-audit-uat/SKILL.md +20 -0
  48. package/.agent/skills/mindforge-autonomous/SKILL.md +33 -0
  49. package/.agent/skills/mindforge-check-todos/SKILL.md +40 -0
  50. package/.agent/skills/mindforge-cleanup/SKILL.md +19 -0
  51. package/.agent/skills/mindforge-complete-milestone/SKILL.md +131 -0
  52. package/.agent/skills/mindforge-debug/SKILL.md +163 -0
  53. package/.agent/skills/mindforge-discuss-phase/SKILL.md +54 -0
  54. package/.agent/skills/mindforge-do/SKILL.md +26 -0
  55. package/.agent/skills/mindforge-execute-phase/SKILL.md +49 -0
  56. package/.agent/skills/mindforge-fast/SKILL.md +23 -0
  57. package/.agent/skills/mindforge-forensics/SKILL.md +49 -0
  58. package/.agent/skills/mindforge-health/SKILL.md +17 -0
  59. package/.agent/skills/mindforge-help/SKILL.md +23 -0
  60. package/.agent/skills/mindforge-insert-phase/SKILL.md +28 -0
  61. package/.agent/skills/mindforge-join-discord/SKILL.md +19 -0
  62. package/.agent/skills/mindforge-list-phase-assumptions/SKILL.md +41 -0
  63. package/.agent/skills/mindforge-list-workspaces/SKILL.md +17 -0
  64. package/.agent/skills/mindforge-manager/SKILL.md +32 -0
  65. package/.agent/skills/mindforge-map-codebase/SKILL.md +64 -0
  66. package/.agent/skills/mindforge-milestone-summary/SKILL.md +44 -0
  67. package/.agent/skills/mindforge-new-milestone/SKILL.md +38 -0
  68. package/.agent/skills/mindforge-new-project/SKILL.md +36 -0
  69. package/.agent/skills/mindforge-new-workspace/SKILL.md +39 -0
  70. package/.agent/skills/mindforge-next/SKILL.md +19 -0
  71. package/.agent/skills/mindforge-note/SKILL.md +29 -0
  72. package/.agent/skills/mindforge-pause-work/SKILL.md +35 -0
  73. package/.agent/skills/mindforge-plan-milestone-gaps/SKILL.md +28 -0
  74. package/.agent/skills/mindforge-plan-phase/SKILL.md +37 -0
  75. package/.agent/skills/mindforge-plant-seed/SKILL.md +22 -0
  76. package/.agent/skills/mindforge-pr-branch/SKILL.md +21 -0
  77. package/.agent/skills/mindforge-profile-user/SKILL.md +38 -0
  78. package/.agent/skills/mindforge-progress/SKILL.md +19 -0
  79. package/.agent/skills/mindforge-quick/SKILL.md +38 -0
  80. package/.agent/skills/mindforge-reapply-patches/SKILL.md +124 -0
  81. package/.agent/skills/mindforge-remove-phase/SKILL.md +26 -0
  82. package/.agent/skills/mindforge-remove-workspace/SKILL.md +22 -0
  83. package/.agent/skills/mindforge-research-phase/SKILL.md +186 -0
  84. package/.agent/skills/mindforge-resume-work/SKILL.md +35 -0
  85. package/.agent/skills/mindforge-review/SKILL.md +31 -0
  86. package/.agent/skills/mindforge-review-backlog/SKILL.md +58 -0
  87. package/.agent/skills/mindforge-session-report/SKILL.md +16 -0
  88. package/.agent/skills/mindforge-set-profile/SKILL.md +9 -0
  89. package/.agent/skills/mindforge-settings/SKILL.md +32 -0
  90. package/.agent/skills/mindforge-ship/SKILL.md +16 -0
  91. package/.agent/skills/mindforge-stats/SKILL.md +16 -0
  92. package/.agent/skills/mindforge-thread/SKILL.md +123 -0
  93. package/.agent/skills/mindforge-ui-phase/SKILL.md +24 -0
  94. package/.agent/skills/mindforge-ui-review/SKILL.md +24 -0
  95. package/.agent/skills/mindforge-update/SKILL.md +35 -0
  96. package/.agent/skills/mindforge-validate-phase/SKILL.md +26 -0
  97. package/.agent/skills/mindforge-verify-work/SKILL.md +30 -0
  98. package/.agent/skills/mindforge-workstreams/SKILL.md +65 -0
  99. package/.agent/workflows/mindforge-add-phase.md +112 -0
  100. package/.agent/workflows/mindforge-add-tests.md +351 -0
  101. package/.agent/workflows/mindforge-add-todo.md +158 -0
  102. package/.agent/workflows/mindforge-audit-milestone.md +332 -0
  103. package/.agent/workflows/mindforge-audit-uat.md +109 -0
  104. package/.agent/workflows/mindforge-autonomous.md +815 -0
  105. package/.agent/workflows/mindforge-check-todos.md +177 -0
  106. package/.agent/workflows/mindforge-cleanup.md +152 -0
  107. package/.agent/workflows/mindforge-complete-milestone.md +766 -0
  108. package/.agent/workflows/mindforge-diagnose-issues.md +220 -0
  109. package/.agent/workflows/mindforge-discovery-phase.md +289 -0
  110. package/.agent/workflows/mindforge-discuss-phase-assumptions.md +645 -0
  111. package/.agent/workflows/mindforge-discuss-phase.md +1047 -0
  112. package/.agent/workflows/mindforge-do.md +104 -0
  113. package/.agent/workflows/mindforge-execute-phase.md +838 -0
  114. package/.agent/workflows/mindforge-execute-plan.md +509 -0
  115. package/.agent/workflows/mindforge-fast.md +105 -0
  116. package/.agent/workflows/mindforge-forensics.md +265 -0
  117. package/.agent/workflows/mindforge-health.md +181 -0
  118. package/.agent/workflows/mindforge-help.md +606 -0
  119. package/.agent/workflows/mindforge-insert-phase.md +130 -0
  120. package/.agent/workflows/mindforge-list-phase-assumptions.md +178 -0
  121. package/.agent/workflows/mindforge-list-workspaces.md +56 -0
  122. package/.agent/workflows/mindforge-manager.md +360 -0
  123. package/.agent/workflows/mindforge-map-codebase.md +370 -0
  124. package/.agent/workflows/mindforge-milestone-summary.md +223 -0
  125. package/.agent/workflows/mindforge-new-milestone.md +469 -0
  126. package/.agent/workflows/mindforge-new-project.md +1226 -0
  127. package/.agent/workflows/mindforge-new-workspace.md +237 -0
  128. package/.agent/workflows/mindforge-next.md +97 -0
  129. package/.agent/workflows/mindforge-node-repair.md +92 -0
  130. package/.agent/workflows/mindforge-note.md +156 -0
  131. package/.agent/workflows/mindforge-pause-work.md +176 -0
  132. package/.agent/workflows/mindforge-plan-milestone-gaps.md +273 -0
  133. package/.agent/workflows/mindforge-plan-phase.md +848 -0
  134. package/.agent/workflows/mindforge-plant-seed.md +169 -0
  135. package/.agent/workflows/mindforge-pr-branch.md +129 -0
  136. package/.agent/workflows/mindforge-profile-user.md +450 -0
  137. package/.agent/workflows/mindforge-progress.md +507 -0
  138. package/.agent/workflows/mindforge-quick.md +732 -0
  139. package/.agent/workflows/mindforge-remove-phase.md +155 -0
  140. package/.agent/workflows/mindforge-remove-workspace.md +90 -0
  141. package/.agent/workflows/mindforge-research-phase.md +74 -0
  142. package/.agent/workflows/mindforge-resume-project.md +325 -0
  143. package/.agent/workflows/mindforge-review.md +228 -0
  144. package/.agent/workflows/mindforge-session-report.md +146 -0
  145. package/.agent/workflows/mindforge-settings.md +283 -0
  146. package/.agent/workflows/mindforge-ship.md +228 -0
  147. package/.agent/workflows/mindforge-stats.md +60 -0
  148. package/.agent/workflows/mindforge-transition.md +671 -0
  149. package/.agent/workflows/mindforge-ui-phase.md +290 -0
  150. package/.agent/workflows/mindforge-ui-review.md +157 -0
  151. package/.agent/workflows/mindforge-update.md +323 -0
  152. package/.agent/workflows/mindforge-validate-phase.md +167 -0
  153. package/.agent/workflows/mindforge-verify-phase.md +254 -0
  154. package/.agent/workflows/mindforge-verify-work.md +623 -0
  155. package/.claude/commands/mindforge/add-backlog.md +32 -0
  156. package/.claude/commands/mindforge/agent.md +31 -0
  157. package/.claude/commands/mindforge/approve.md +27 -15
  158. package/.claude/commands/mindforge/audit.md +30 -26
  159. package/.claude/commands/mindforge/auto.md +29 -18
  160. package/.claude/commands/mindforge/benchmark.md +26 -29
  161. package/.claude/commands/mindforge/browse.md +24 -22
  162. package/.claude/commands/mindforge/complete-milestone.md +28 -14
  163. package/.claude/commands/mindforge/costs.md +26 -9
  164. package/.claude/commands/mindforge/cross-review.md +27 -13
  165. package/.claude/commands/mindforge/dashboard.md +35 -98
  166. package/.claude/commands/mindforge/debug.md +34 -126
  167. package/.claude/commands/mindforge/discuss-phase.md +36 -138
  168. package/.claude/commands/mindforge/do.md +31 -0
  169. package/.claude/commands/mindforge/execute-phase.md +37 -190
  170. package/.claude/commands/mindforge/health.md +27 -17
  171. package/.claude/commands/mindforge/help.md +25 -19
  172. package/.claude/commands/mindforge/init-org.md +37 -131
  173. package/.claude/commands/mindforge/init-project.md +40 -155
  174. package/.claude/commands/mindforge/install-skill.md +32 -15
  175. package/.claude/commands/mindforge/learn.md +36 -142
  176. package/.claude/commands/mindforge/map-codebase.md +36 -298
  177. package/.claude/commands/mindforge/marketplace.md +33 -120
  178. package/.claude/commands/mindforge/metrics.md +29 -18
  179. package/.claude/commands/mindforge/migrate.md +33 -40
  180. package/.claude/commands/mindforge/milestone.md +35 -12
  181. package/.claude/commands/mindforge/new-runtime.md +25 -15
  182. package/.claude/commands/mindforge/next.md +34 -105
  183. package/.claude/commands/mindforge/note.md +35 -0
  184. package/.claude/commands/mindforge/plan-phase.md +34 -125
  185. package/.claude/commands/mindforge/plant-seed.md +31 -0
  186. package/.claude/commands/mindforge/plugins.md +30 -36
  187. package/.claude/commands/mindforge/pr-review.md +32 -41
  188. package/.claude/commands/mindforge/profile-team.md +26 -19
  189. package/.claude/commands/mindforge/publish-skill.md +28 -17
  190. package/.claude/commands/mindforge/qa.md +27 -12
  191. package/.claude/commands/mindforge/quick.md +35 -135
  192. package/.claude/commands/mindforge/release.md +27 -8
  193. package/.claude/commands/mindforge/remember.md +25 -10
  194. package/.claude/commands/mindforge/research.md +27 -9
  195. package/.claude/commands/mindforge/retrospective.md +28 -22
  196. package/.claude/commands/mindforge/review-backlog.md +34 -0
  197. package/.claude/commands/mindforge/review.md +37 -157
  198. package/.claude/commands/mindforge/security-scan.md +34 -233
  199. package/.claude/commands/mindforge/session-report.md +39 -0
  200. package/.claude/commands/mindforge/ship.md +34 -100
  201. package/.claude/commands/mindforge/skills.md +36 -141
  202. package/.claude/commands/mindforge/status.md +30 -104
  203. package/.claude/commands/mindforge/steer.md +25 -10
  204. package/.claude/commands/mindforge/sync-confluence.md +28 -9
  205. package/.claude/commands/mindforge/sync-jira.md +32 -12
  206. package/.claude/commands/mindforge/tokens.md +25 -6
  207. package/.claude/commands/mindforge/ui-phase.md +34 -0
  208. package/.claude/commands/mindforge/ui-review.md +36 -0
  209. package/.claude/commands/mindforge/update.md +33 -42
  210. package/.claude/commands/mindforge/validate-phase.md +31 -0
  211. package/.claude/commands/mindforge/verify-phase.md +30 -62
  212. package/.claude/commands/mindforge/workspace.md +28 -25
  213. package/.claude/commands/mindforge/workstreams.md +35 -0
  214. package/.mindforge/memory/decision-library.jsonl +0 -0
  215. package/.mindforge/memory/knowledge-base.jsonl +7 -0
  216. package/.mindforge/memory/pattern-library.jsonl +1 -0
  217. package/.mindforge/memory/team-preferences.jsonl +4 -0
  218. package/.mindforge/personas/advisor-researcher.md +89 -0
  219. package/.mindforge/personas/analyst.md +112 -52
  220. package/.mindforge/personas/architect.md +100 -67
  221. package/.mindforge/personas/assumptions-analyzer-extend.md +87 -0
  222. package/.mindforge/personas/assumptions-analyzer.md +109 -0
  223. package/.mindforge/personas/codebase-mapper-extend.md +93 -0
  224. package/.mindforge/personas/codebase-mapper.md +770 -0
  225. package/.mindforge/personas/coverage-specialist.md +104 -0
  226. package/.mindforge/personas/debug-specialist.md +118 -52
  227. package/.mindforge/personas/debugger.md +97 -0
  228. package/.mindforge/personas/decision-architect.md +102 -0
  229. package/.mindforge/personas/developer.md +97 -85
  230. package/.mindforge/personas/executor.md +88 -0
  231. package/.mindforge/personas/integration-checker.md +92 -0
  232. package/.mindforge/personas/nyquist-auditor.md +84 -0
  233. package/.mindforge/personas/phase-researcher.md +107 -0
  234. package/.mindforge/personas/plan-checker.md +92 -0
  235. package/.mindforge/personas/planner.md +105 -0
  236. package/.mindforge/personas/project-researcher.md +99 -0
  237. package/.mindforge/personas/qa-engineer.md +113 -61
  238. package/.mindforge/personas/release-manager.md +102 -64
  239. package/.mindforge/personas/research-agent.md +109 -24
  240. package/.mindforge/personas/research-synthesizer.md +101 -0
  241. package/.mindforge/personas/roadmapper-extend.md +100 -0
  242. package/.mindforge/personas/roadmapper.md +103 -0
  243. package/.mindforge/personas/security-reviewer.md +114 -91
  244. package/.mindforge/personas/tech-writer.md +118 -51
  245. package/.mindforge/personas/ui-auditor.md +94 -0
  246. package/.mindforge/personas/ui-checker.md +89 -0
  247. package/.mindforge/personas/ui-researcher.md +99 -0
  248. package/.mindforge/personas/user-profiler.md +93 -0
  249. package/.mindforge/personas/verifier.md +101 -0
  250. package/.planning/ROADMAP.md +10 -0
  251. package/.planning/browser-daemon.log +32 -0
  252. package/.planning/phases/01-migrate-gsd-to-mindforge/.gitkeep +0 -0
  253. package/CHANGELOG.md +41 -0
  254. package/MINDFORGE.md +2 -0
  255. package/README.md +40 -3
  256. package/bin/installer-core.js +3 -4
  257. package/docs/PERSONAS.md +611 -0
  258. package/docs/commands-reference.md +1 -0
  259. package/docs/{Context → context}/Master-Context.md +6 -13
  260. package/docs/references/checkpoints.md +778 -0
  261. package/docs/{reference → references}/commands.md +53 -43
  262. package/docs/references/continuation-format.md +249 -0
  263. package/docs/references/decimal-phase-calculation.md +64 -0
  264. package/docs/references/git-integration.md +295 -0
  265. package/docs/references/git-planning-commit.md +38 -0
  266. package/docs/references/model-profile-resolution.md +36 -0
  267. package/docs/references/model-profiles.md +139 -0
  268. package/docs/references/phase-argument-parsing.md +61 -0
  269. package/docs/references/planning-config.md +202 -0
  270. package/docs/references/questioning.md +162 -0
  271. package/docs/references/tdd.md +263 -0
  272. package/docs/references/ui-brand.md +160 -0
  273. package/docs/references/user-profiling.md +681 -0
  274. package/docs/references/verification-patterns.md +612 -0
  275. package/docs/references/workstream-flag.md +58 -0
  276. package/docs/skills-authoring-guide.md +1 -1
  277. package/docs/templates/Agents/CLAUDE-MD.md +122 -0
  278. package/docs/templates/Agents/COPILOT-INSTRUCTIONS.md +7 -0
  279. package/docs/templates/Agents/DEBUGGER-PROMPT.md +91 -0
  280. package/docs/templates/Agents/PLANNER-PROMPT.md +117 -0
  281. package/docs/templates/Execution/CONTINUE-HERE.md +78 -0
  282. package/docs/templates/Execution/DISCUSSION-LOG.md +63 -0
  283. package/docs/templates/Execution/PHASE-PROMPT.md +610 -0
  284. package/docs/templates/Execution/STATE.md +176 -0
  285. package/docs/templates/Execution/SUMMARY-COMPLEX.md +59 -0
  286. package/docs/templates/Execution/SUMMARY-MINIMAL.md +41 -0
  287. package/docs/templates/Execution/SUMMARY-STANDARD.md +48 -0
  288. package/docs/templates/Execution/SUMMARY.md +248 -0
  289. package/docs/templates/Profile/DEV-PREFERENCES.md +21 -0
  290. package/docs/templates/Profile/USER-PROFILE.md +146 -0
  291. package/docs/templates/Profile/USER-SETUP.md +311 -0
  292. package/docs/templates/Project/DISCOVERY.md +146 -0
  293. package/docs/templates/Project/MILESTONE-ARCHIVE.md +123 -0
  294. package/docs/templates/Project/MILESTONE.md +115 -0
  295. package/docs/templates/Project/PROJECT.md +206 -0
  296. package/docs/templates/Project/REQUIREMENTS.md +231 -0
  297. package/docs/templates/Project/RETROSPECTIVE.md +54 -0
  298. package/docs/templates/Project/ROADMAP.md +202 -0
  299. package/docs/templates/Quality/DEBUG.md +164 -0
  300. package/docs/templates/Quality/UAT.md +280 -0
  301. package/docs/templates/Quality/UI-SPEC.md +100 -0
  302. package/docs/templates/Quality/VALIDATION.md +76 -0
  303. package/docs/templates/Quality/VERIFICATION-REPORT.md +322 -0
  304. package/docs/templates/System/CONFIG.json +43 -0
  305. package/docs/templates/System/CONTEXT.md +352 -0
  306. package/docs/templates/codebase/architecture.md +255 -0
  307. package/docs/templates/codebase/concerns.md +310 -0
  308. package/docs/templates/codebase/conventions.md +307 -0
  309. package/docs/templates/codebase/integrations.md +280 -0
  310. package/docs/templates/codebase/stack.md +186 -0
  311. package/docs/templates/codebase/structure.md +285 -0
  312. package/docs/templates/codebase/testing.md +480 -0
  313. package/docs/templates/research/ARCHITECTURE.md +204 -0
  314. package/docs/templates/research/FEATURES.md +147 -0
  315. package/docs/templates/research/PITFALLS.md +200 -0
  316. package/docs/templates/research/STACK.md +120 -0
  317. package/docs/templates/research/SUMMARY.md +170 -0
  318. package/docs/user-guide.md +1 -1
  319. package/package.json +7 -2
  320. /package/docs/{reference → references}/audit-events.md +0 -0
  321. /package/docs/{reference → references}/config-reference.md +0 -0
  322. /package/docs/{reference → references}/sdk-api.md +0 -0
  323. /package/docs/{reference → references}/skills-api.md +0 -0
@@ -1,157 +1,37 @@
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."
1
+ ---
2
+ name: mindforge:review
3
+ description: Perform a comprehensive code quality and security review
4
+ argument-hint: [path|phase N|--staged|--last-commit]
5
+ allowed-tools:
6
+ - run_command
7
+ - view_file
8
+ - write_to_file
9
+ - list_dir
10
+ ---
11
+
12
+ <objective>
13
+ Conduct a deep code review of a specified target (files, directories, phases, or git SHAs), focusing on structural quality, security vulnerabilities, and adherence to project conventions.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/review.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Target: Staged changes, last commit, specific phase, or path.
22
+ Personas: code-quality.md, security-reviewer.md
23
+ Skills: code-quality, security-review, accessibility (for UI), api-design (for routes), database-patterns (for migrations).
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Establish Scope**: Use `git diff` or `git log` to determine the list of files needing review.
28
+ 2. **Initialize Personas**: Load the appropriate reviewer personas and skills based on file types.
29
+ 3. **Audit Implementation**: For each file, read full content and check:
30
+ - Code quality (complexity, naming, error handling).
31
+ - Conventions (from CONVENTIONS.md).
32
+ - Security (secrets, validation, injection).
33
+ - Type safety (TS specifics).
34
+ 4. **Generate Report**: Write `CODE-REVIEW-[timestamp].md` with categorized findings (Blocking, Major, Minor, Suggestion) and an overall verdict.
35
+ 5. **Update State**: Log `code_review_completed` in `AUDIT.jsonl`.
36
+ 6. **Report**: Summarize findings to the user and block merge if "Blocking" issues exist.
37
+ </process>
@@ -1,233 +1,34 @@
1
- # MindForge — Security Scan Command
2
- # Usage: /mindforge:security-scan [path] [--deep] [--deps] [--secrets]
3
- # Standalone security scan. Can be run independently of the phase lifecycle.
4
-
5
- ## Scan modes
6
- - Default: OWASP Top 10 review on the changed files or specified path
7
- - `--deep`: Extended scan including all files, not just changed
8
- - `--deps`: Dependency audit (CVE scan of package.json / requirements.txt)
9
- - `--secrets`: Secret detection scan only (fast, suitable for pre-commit hook)
10
- - Flags composable: `--deps --secrets` runs both dependency audit and secret detection
11
-
12
- ## Step 1 — Activate Security Reviewer persona
13
-
14
- Load `security-reviewer.md` persona immediately and completely.
15
- This command runs entirely in security mode. Do not switch personas.
16
-
17
- ## Step 2 — Build scan scope
18
-
19
- ```bash
20
- # Default: staged + unstaged changes
21
- git diff HEAD --name-only
22
-
23
- # With path argument
24
- find [path] -name "*.ts" -o -name "*.js" -o -name "*.py"
25
-
26
- # --deep: all source files
27
- find src/ -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" \)
28
- ```
29
-
30
- ## Step 3 OWASP Top 10 scan (always runs unless --secrets only)
31
-
32
- For each file in scope, check all 10 OWASP categories:
33
-
34
- ### A01 — Broken Access Control
35
- - Scan for: missing auth middleware, direct object references, path traversal
36
- - Patterns to flag:
37
- ```
38
- req.params.userId # Direct user ID from request — verify ownership check
39
- fs.readFile(userInput) # Path traversal risk
40
- WHERE id = ${id} # Direct injection without parameterisation
41
- ```
42
-
43
- ### A02 — Cryptographic Failures
44
- - Scan for: weak algorithms, insecure transport, unencrypted sensitive data
45
- - Patterns to flag:
46
- ```
47
- md5(, sha1(, sha256(password # Weak password hashing
48
- http:// # Non-HTTPS URLs in API calls
49
- Math.random() # Cryptographically insecure random
50
- ```
51
-
52
- ### A03 — Injection
53
- - Scan for: SQL, NoSQL, OS, LDAP injection
54
- - Patterns to flag:
55
- ```
56
- `SELECT * FROM users WHERE email = '${ # SQL injection
57
- exec(, execSync(, child_process # OS command injection
58
- eval(userInput # Code injection
59
- ```
60
-
61
- ### A04 — Insecure Design
62
- - Scan for: missing rate limiting, no input validation, trust boundary issues
63
- - Patterns to flag: endpoints without validation middleware, no rate limit decorators
64
-
65
- ### A05 — Security Misconfiguration
66
- - Scan for: debug mode in production, default credentials, verbose errors
67
- - Patterns to flag:
68
- ```
69
- console.error(err) # Exposes stack traces to clients
70
- NODE_ENV !== 'production' # Debug code paths
71
- ALLOW_ALL, *, cors({origin: '*'}) # Overly permissive CORS
72
- ```
73
-
74
- ### A06 — Vulnerable Components
75
- - Run: `npm audit --audit-level=moderate` or `pip-audit`
76
- - Flag any HIGH or CRITICAL CVEs
77
-
78
- ### A07 — Authentication Failures
79
- - Scan for: missing password complexity, no brute force protection, weak sessions
80
- - Patterns to flag:
81
- ```
82
- bcrypt.hashSync(pass, 1) # Cost factor too low
83
- jwt.verify(token, '', { # Empty secret
84
- session.destroy( # Verify redirect after destroy
85
- ```
86
-
87
- ### A08 — Software and Data Integrity Failures
88
- - Check: no package-lock.json means no integrity guarantee
89
- - Check: any `curl | sh` or `wget | bash` patterns
90
-
91
- ### A09 — Security Logging Failures
92
- - Scan for: no logging on auth failures, admin actions not logged, PII in logs
93
- - Patterns to flag:
94
- ```
95
- user.email in any log statement
96
- password in any log statement
97
- catch(e) {} # Silent failure = no security log
98
- ```
99
-
100
- ### A10 — SSRF
101
- - Scan for: server-side requests to user-controlled URLs
102
- - Patterns to flag:
103
- ```
104
- fetch(req., axios.get(req., axios.post(req., http.get(req.,
105
- req.body.url, req.params.url, req.query.url, req.headers
106
- ```
107
-
108
- ## Step 4 — Secret detection (--secrets or always as part of default scan)
109
-
110
- Pattern-based scan across all files in scope:
111
-
112
- ```bash
113
- # High confidence patterns (always flag as CRITICAL)
114
- grep -rn -E "(sk-[a-zA-Z0-9]{20,}|AKIA[A-Z0-9]{16}|ghp_[a-zA-Z0-9]{36})" .
115
-
116
- # Credential assignment patterns (flag as HIGH)
117
- grep -rn -E "(password|passwd|secret|api_key|apikey|access_token)\s*=\s*['\"][^'\"]{8,}" .
118
-
119
- # Azure connection strings
120
- grep -rn -E "DefaultEndpointsProtocol=https;AccountName=" .
121
-
122
- # GCP service account keys
123
- grep -rn -E "\"type\"\\s*:\\s*\"service_account\"" .
124
-
125
- # PEM/Certificate content
126
- grep -rn "-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----" .
127
-
128
- # Database URLs with credentials
129
- grep -rn -E "postgres://[^:]+:[^@]+@|mysql://[^:]+:[^@]+@" .
130
- ```
131
-
132
- Report each finding with:
133
- - File and line number
134
- - The matched pattern (redact the actual secret value: show first 4 chars + ***)
135
- - Severity: CRITICAL if a real credential pattern, HIGH if credential-shaped pattern
136
- Redaction applies to both console output and the report file.
137
-
138
- ## Step 5 — Dependency audit (--deps flag)
139
-
140
- ```bash
141
- # Node.js projects
142
- npm audit --json 2>/dev/null | node -e "
143
- const data = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf8'));
144
- const vulns = data.vulnerabilities || {};
145
- Object.entries(vulns).forEach(([name, v]) => {
146
- if (['high','critical'].includes(v.severity)) {
147
- console.log(v.severity.toUpperCase() + ': ' + name + ' — ' + v.via[0]?.title);
148
- }
149
- });
150
- "
151
-
152
- # Python projects
153
- pip-audit --format json 2>/dev/null
154
- ```
155
-
156
- ## Step 6 — Write security scan report
157
-
158
- `.planning/SECURITY-SCAN-[timestamp].md`:
159
-
160
- ```markdown
161
- # Security Scan Report
162
- **Date:** [ISO-8601]
163
- **Scope:** [what was scanned]
164
- **Scanner:** MindForge Security Reviewer
165
-
166
- ## Executive Summary
167
- [1-2 sentences: overall security posture, number of findings by severity]
168
-
169
- ## Critical Findings (fix immediately — block all merges)
170
- [OWASP category] | [File:Line] | [Description] | [Remediation]
171
-
172
- ## High Findings (fix before next release)
173
- ...
174
-
175
- ## Medium Findings (fix in next sprint)
176
- ...
177
-
178
- ## Low Findings (backlog)
179
- ...
180
-
181
- ## Dependency Audit
182
- | Package | Version | Severity | CVE | Fixed in |
183
- |---|---|---|---|---|
184
-
185
- ## Secret Detection
186
- | File | Pattern | Severity | Action |
187
- |---|---|---|---|
188
-
189
- ## Verdict
190
- ✅ CLEAN — No critical or high findings
191
- ⚠️ ISSUES — [N] critical, [N] high findings require attention
192
- ```
193
-
194
- ## Important: scan report visibility
195
-
196
- Security scan reports are written to `.planning/SECURITY-SCAN-[timestamp].md`.
197
-
198
- **Private repository:** Keep reports committed — they are valuable for audit
199
- history and team security review.
200
-
201
- **Public repository:** Add `.planning/SECURITY-SCAN-*.md` to `.gitignore`
202
- to avoid exposing vulnerability information to potential attackers.
203
-
204
- MindForge does not make this decision for you — configure `.gitignore`
205
- based on your repository's visibility.
206
-
207
- ## Step 7 — Write AUDIT entry
208
-
209
- ```json
210
- {
211
- "event": "security_scan_completed",
212
- "scope": "[path or 'staged changes']",
213
- "flags": ["--deps", "--secrets"],
214
- "critical_findings": [N],
215
- "high_findings": [N],
216
- "secrets_detected": [N],
217
- "vulnerable_deps": [N],
218
- "report_path": ".planning/SECURITY-SCAN-[timestamp].md"
219
- }
220
- ```
221
-
222
- ## Automatic blocking behaviour
223
- If CRITICAL findings are detected: print a prominent warning:
224
- ```
225
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
226
- 🔴 CRITICAL SECURITY FINDINGS DETECTED
227
-
228
- [N] critical issues must be fixed before any code is merged.
229
- See: .planning/SECURITY-SCAN-[timestamp].md
230
-
231
- Do NOT commit or deploy until these are resolved.
232
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
233
- ```
1
+ ---
2
+ name: mindforge:security-scan
3
+ description: Perform a standalone security scan for OWASP Top 10 vulnerabilities and leaked secrets
4
+ argument-hint: [path] [--deep] [--deps] [--secrets]
5
+ allowed-tools:
6
+ - run_command
7
+ - view_file
8
+ - write_to_file
9
+ - list_dir
10
+ ---
11
+
12
+ <objective>
13
+ Execute a rigorous security audit of the codebase, scanning for OWASP vulnerabilities, hardcoded secrets, and vulnerable dependencies to ensure production readiness and compliance.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/security-scan.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Mode: Runs entirely under the `security-reviewer.md` persona.
22
+ Flags: --deep (all files), --deps (CVE scan), --secrets (fast secret detection).
23
+ Output: .planning/SECURITY-SCAN-[timestamp].md
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Build Scope**: Determine target files using `git diff` or `find` based on flags.
28
+ 2. **Top 10 Scan**: Audit for Access Control, Crypto failures, Injection, Insecure Design, etc.
29
+ 3. **Secret Detection**: Run pattern-based grep for high-confidence strings (API keys, connection strings, private keys). Redact values in output.
30
+ 4. **Dependency Audit**: If `--deps` is set, run `npm audit` or `pip-audit` and parse JSON for HIGH/CRITICAL CVEs.
31
+ 5. **Generate Report**: Write `SECURITY-SCAN-[timestamp].md` with categorized findings and a final verdict (CLEAN/ISSUES).
32
+ 6. **Alert**: If CRITICAL findings exist, block merging and display a prominent warning.
33
+ 7. **Audit**: Log `security_scan_completed` event.
34
+ </process>
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: mindforge:session-report
3
+ description: Generate a post-session summary document capturing work performed and resource usage
4
+ argument-hint: none
5
+ allowed-tools:
6
+ - run_command
7
+ - view_file
8
+ - write_to_file
9
+ - list_dir
10
+ ---
11
+
12
+ <objective>
13
+ Generate a comprehensive summary of an active coding session, providing a clear trail of work for stakeholders and a diagnostic record of resource usage (tokens, time, etc.).
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/session-report.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Storage: .planning/reports/
22
+ Data sources: Git logs, terminal history, `STATE.md`, and session memory.
23
+ </context>
24
+
25
+ <process>
26
+ 1. **Gather Data**:
27
+ - Get recent git commits and diff summaries.
28
+ - Read the current `STATE.md` for phase/plan status updates.
29
+ - Extract key decisions or findings from the session.
30
+ 2. **Profile Resources**:
31
+ - Estimate token usage if possible.
32
+ - Calculate session duration.
33
+ 3. **Draft Report**: Create `SESSION_REPORT_[timestamp].md` containing:
34
+ - Summary of Work Performed
35
+ - Outcomes achieved (Plans "completed")
36
+ - Key Decisions
37
+ - Resource Usage Profile
38
+ 4. **Confirm**: Notify the user and provide a link to the report.
39
+ </process>
@@ -1,100 +1,34 @@
1
- Create a release PR for a verified phase. Usage: /mindforge:ship [N]
2
-
3
- ## Pre-check
4
- Read UAT.md for phase N. If status is not "All passed ✅": stop.
5
- Tell the user: "Phase [N] has not been fully verified. Run /mindforge:verify-phase [N] first."
6
-
7
- ## Step 1 — Generate changelog entry
8
- Read all SUMMARY files for phase N.
9
- Read REQUIREMENTS.md for phase N items.
10
- Generate a CHANGELOG.md entry following Keep a Changelog format:
11
-
12
- ```markdown
13
- ## [Unreleased] Phase [N]: [Phase description]
14
-
15
- ### Added
16
- - [New feature from this phase]
17
-
18
- ### Changed
19
- - [Changed behaviour]
20
-
21
- ### Fixed
22
- - [Bug fixes]
23
-
24
- ### Security
25
- - [Security improvements]
26
- ```
27
-
28
- Prepend this to CHANGELOG.md.
29
-
30
- ## Step 2 Run final quality gates
31
- Run all of the following and report results:
32
- ```bash
33
- # Type checking
34
- npx tsc --noEmit
35
-
36
- # Linting
37
- npx eslint . --ext .ts,.tsx --max-warnings 0
38
-
39
- # Tests
40
- npm test
41
-
42
- # Security scan (if npm project)
43
- npm audit --audit-level=high
44
- ```
45
-
46
- If any gate fails: stop. Report the failures. Do not proceed to PR creation.
47
-
48
- ## Step 3 — Create PR description
49
- Generate a complete PR description:
50
-
51
- ```markdown
52
- ## MindForge Phase [N] — [Phase description]
53
-
54
- ### Summary
55
- [2-3 sentences describing what this phase delivered]
56
-
57
- ### Changes
58
- [Bullet list of major changes from SUMMARY files]
59
-
60
- ### Requirements delivered
61
- | FR ID | Description | Verified |
62
- |-------|------------------------------|----------|
63
- | FR-01 | ... | ✅ |
64
-
65
- ### Testing
66
- - Unit tests: [pass/fail + coverage %]
67
- - Integration tests: [pass/fail]
68
- - UAT: Completed and signed off (see UAT.md)
69
-
70
- ### Security
71
- - [ ] Security review completed (see SECURITY-REVIEW-N.md)
72
- - [ ] No hardcoded secrets in diff
73
- - [ ] All dependencies scanned for CVEs
74
-
75
- ### Checklist
76
- - [x] CHANGELOG.md updated
77
- - [x] All tests pass
78
- - [x] No linter errors
79
- - [x] UAT signed off
80
- - [ ] Reviewed by: [assign]
81
- ```
82
-
83
- ## Step 4 — Commit and tag
84
- ```bash
85
- git add CHANGELOG.md
86
- git commit -m "docs(changelog): add Phase [N] release notes"
87
- git push origin feat/mindforge-core-scaffold
88
- ```
89
-
90
- Tell the user the PR description and instruct them to open the PR manually
91
- (or provide the `gh pr create` command if GitHub CLI is available).
92
-
93
- Tell the user:
94
- "✅ Phase [N] ready to ship.
95
- PR description generated above.
96
- Open your PR, assign reviewers, and merge when approved."
97
-
98
- ## Step 5 — Update state
99
- Update STATE.md to mark Phase [N] as shipped.
100
- Update HANDOFF.json with next phase number.
1
+ ---
2
+ name: mindforge:ship
3
+ description: Create a release PR for a verified phase
4
+ argument-hint: [N]
5
+ allowed-tools:
6
+ - run_command
7
+ - list_dir
8
+ - view_file
9
+ - write_to_file
10
+ ---
11
+
12
+ <objective>
13
+ Coordinate the final transition of a phase from "Verified" to "Released" by generating changelogs, running final quality gates, and prepping the pull request for merge.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/ship.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Prerequisite: `UAT.md` must be marked as "All passed ✅".
22
+ Gates: Type checking, linting, full test suite, security audit.
23
+ Format: Follows "Keep a Changelog" and structured PR templates.
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Pre-check**: Abort if the phase N has not completed UAT or has blocking findings.
28
+ 2. **Changelog Generation**: Sync SUMMARY files and REQUIREMENTS.md into a new `CHANGELOG.md` entry.
29
+ 3. **Execution Oversight**: Run final gates (tsc, eslint, npm test, npm audit) and report results.
30
+ 4. **Draft PR**: Generate a comprehensive PR description including delivered requirements and testing stats.
31
+ 5. **Commit & Tag**: Commit the changelog changes and push the branch.
32
+ 6. **State Transition**: Mark Phase [N] as shipped in `STATE.md` and increment the next target phase in `HANDOFF.json`.
33
+ 7. **Audit**: Log `phase_shipped` with delivered requirement IDs.
34
+ </process>