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,422 @@
1
+ # MindForge — Day 2 Review Prompt
2
+ # Branch: `feat/mindforge-wave-engine`
3
+ # Run this AFTER DAY2-IMPLEMENT.md is complete
4
+
5
+ ---
6
+
7
+ ## CONTEXT
8
+
9
+ You are performing a **Day 2 Architecture & Quality Review** of the MindForge
10
+ wave execution engine, audit system, compaction protocol, and four new commands.
11
+
12
+ Activate **`architect.md` + `qa-engineer.md` + `security-reviewer.md`** simultaneously.
13
+
14
+ Day 2 introduced complex orchestration logic described in Markdown. The risk
15
+ is not syntax errors — it is logical gaps: edge cases the engine specification
16
+ doesn't handle, race conditions in the parallel model, and audit entries that
17
+ could be missing for certain failure paths.
18
+
19
+ ---
20
+
21
+ ## REVIEW PASS 1 — Wave Execution Engine: Logic Completeness
22
+
23
+ ### Dependency parser (`dependency-parser.md`)
24
+
25
+ Read the full file. Answer every question. Flag anything unclear as a finding.
26
+
27
+ - [ ] Does the parser handle an empty `<dependencies>` tag (no text content)?
28
+ - [ ] Does the parser handle a PLAN file with no `<dependencies>` tag at all?
29
+ - [ ] Does the parser handle a PLAN file with XML that has extra whitespace?
30
+ - [ ] Does the circular dependency check handle self-referencing plans (`"01"` depends on `"01"`)?
31
+ - [ ] Does the missing dependency check provide enough information to fix the problem?
32
+ (It should say which PLAN file is missing, not just which ID)
33
+ - [ ] Does the file conflict check produce a concrete resolution (which wave each plan goes to)?
34
+ - [ ] Does the output DEPENDENCY-GRAPH file include wave assignments, or just the dependency list?
35
+ (It must include wave assignments so execute-phase can read it without re-running the parser)
36
+
37
+ **Critical logic gap to check:**
38
+ What happens if two plans declare identical task names but different plan IDs?
39
+ Is there any risk of confusion or duplicate SUMMARY file creation?
40
+ Flag if not handled.
41
+
42
+ ### Wave executor (`wave-executor.md`)
43
+
44
+ - [ ] Does the "before starting a wave" section specify what happens if a SUMMARY
45
+ file exists but shows a failed status? (Previous wave failed and was partially cleaned up)
46
+ - [ ] Is the test-suite-run step between waves mandatory or optional?
47
+ It must be mandatory — skip it and a later wave can build on broken foundations.
48
+ - [ ] What happens if the test suite itself does not exist yet (new project with no tests)?
49
+ Is there a graceful path, or does the engine crash?
50
+ - [ ] Does the wave completion section clearly state that ALL plans in a wave must
51
+ complete before the test run? (Not just "most" — all.)
52
+ - [ ] Is there a timeout concept? What if a subagent hangs indefinitely?
53
+ (Even a mention that "after [N] minutes without a SUMMARY file, flag to user" would suffice)
54
+ - [ ] Does the WAVE-REPORT template include failures clearly, or only successes?
55
+ Failure rows must be visually distinct and include the error.
56
+
57
+ **Specific question:**
58
+ The executor says "spawn a subagent." In practice with Claude Code and Antigravity,
59
+ this means using the Task tool or a specific subagent invocation pattern.
60
+ Does the spec describe how to invoke this for both Claude Code and Antigravity?
61
+ If not: flag as MAJOR — the executor will be interpreted differently by different runtimes.
62
+
63
+ ### Context injector (`context-injector.md`)
64
+
65
+ - [ ] Is the context budget (30K tokens) validated before injection or just estimated?
66
+ "Estimate" without validation means the budget can be silently exceeded.
67
+ - [ ] What happens when the ARCHITECTURE.md is very large and "relevant sections only"
68
+ is ambiguous? Define what "relevant" means — at minimum, which headings to include.
69
+ - [ ] Does the injector specify how a subagent signals completion back to the orchestrator?
70
+ The current spec says "report completion status" but does not define the mechanism.
71
+ For Markdown-based agents: this is a file (SUMMARY.md). Confirm this is explicit.
72
+ - [ ] Does the injector template include the SKILL.md trigger keywords so the subagent
73
+ can also load additional skills discovered during execution? Or is the skill set fixed
74
+ at injection time?
75
+ - [ ] "Never inject STATE.md to subagents" — correct. But what about ROADMAP.md?
76
+ Is ROADMAP.md ever needed by a subagent? Should it also be in the "never inject" list?
77
+
78
+ ### Verification pipeline (`verification-pipeline.md`)
79
+
80
+ - [ ] Stage 2 (requirement traceability) uses `grep` to find implementations.
81
+ What if the implementation uses a different term than the requirement text?
82
+ Is there a fallback when grep finds nothing? (Many false negatives are possible)
83
+ - [ ] Stage 4 (security regression) activates the security-reviewer persona.
84
+ Does it specify which files to scan — only new/modified files, or the entire codebase?
85
+ Scanning the entire codebase is too slow. It should be diff-scoped.
86
+ - [ ] Does VERIFICATION.md clearly distinguish between "not found by grep" (⚠️ ambiguous)
87
+ and "confirmed not implemented" (❌ certain)? These have different remediation urgencies.
88
+ - [ ] What is the escalation path if Stage 1 (tests) fails at verification time?
89
+ Does the pipeline create fix plans automatically, or does it stop and wait?
90
+
91
+ ---
92
+
93
+ ## REVIEW PASS 2 — AUDIT System: Coverage Completeness
94
+
95
+ Read `AUDIT-SCHEMA.md`. Answer these questions:
96
+
97
+ ### Event coverage gaps
98
+ Do the defined event types cover every significant agent action?
99
+ Check each of these against the schema — flag any that are missing:
100
+
101
+ - [ ] `phase_planned` — is this event defined?
102
+ - [ ] `task_started` — is this event defined?
103
+ - [ ] `task_completed` — is this event defined?
104
+ - [ ] `task_failed` — is this event defined?
105
+ - [ ] `security_finding` — is this event defined?
106
+ - [ ] `quality_gate_failed` — is this event defined?
107
+ - [ ] `context_compaction` — is this event defined?
108
+ - [ ] `phase_completed` — is this event defined?
109
+ - [ ] `decision_recorded` — is this event defined?
110
+ - [ ] `quick_task_completed` — is this event defined?
111
+ - [ ] `debug_completed` — is this event defined?
112
+ - [ ] `project_initialised` — is this event defined?
113
+
114
+ Missing events to add if not present:
115
+ - `uat_started` — when verify-phase begins human testing
116
+ - `uat_completed` — when UAT is signed off (or fails)
117
+ - `ship_started` — when ship command begins
118
+ - `ship_completed` — when a release PR is created
119
+ - `session_started` — when a new agent session begins (reads HANDOFF.json)
120
+
121
+ ### AUDIT entry field consistency
122
+
123
+ - [ ] Does every event type include the universal fields (`id`, `timestamp`, `event`, `agent`, `session_id`)?
124
+ - [ ] Is `phase` consistently typed across all events? (number or null — never string "1")
125
+ - [ ] Is the `id` field described as UUID v4 with a clear example?
126
+ - [ ] Are there any events where `commit_sha` should be present but is not defined?
127
+
128
+ ### Append-only enforcement
129
+
130
+ - [ ] Does the schema document state explicitly that no tooling or command should
131
+ ever read + rewrite the entire file (which would lose other entries)?
132
+ - [ ] Is there guidance on what to do if AUDIT.jsonl becomes corrupted?
133
+ (Even a brief "restore from git history" note is sufficient)
134
+ - [ ] Is there a note about AUDIT.jsonl file size growth over time?
135
+ A 6-month-old busy project could have thousands of entries. Is there an archiving strategy?
136
+
137
+ ---
138
+
139
+ ## REVIEW PASS 3 — Compaction Protocol: Edge Case Coverage
140
+
141
+ Read `compaction-protocol.md` completely. Check these edge cases:
142
+
143
+ - [ ] **Compaction during a wave:** If compaction triggers mid-wave (while a subagent
144
+ is running), what happens to the in-flight subagent? Does it complete first,
145
+ or is it interrupted? The protocol must specify this.
146
+ Recommendation: Always let the current subagent complete before compacting.
147
+
148
+ - [ ] **WIP commit quality:** The protocol creates WIP commits during compaction.
149
+ But the branch may have a pre-commit hook (lint, test). Does the compaction commit
150
+ bypass hooks? Should it? The protocol must address this.
151
+ Recommendation: WIP commits at compaction points bypass pre-commit hooks
152
+ (via `git commit --no-verify`) and are documented in STATE.md.
153
+
154
+ - [ ] **Session restart conflict:** A new session reads HANDOFF.json and its
155
+ `next_task` says "continue Plan 03 from Step 4." But the developer has manually
156
+ committed some changes since the compaction. Does the restart protocol check
157
+ for this conflict?
158
+ Recommendation: Add "run git log and compare against recent_commits field
159
+ to detect any manual changes made between sessions."
160
+
161
+ - [ ] **HANDOFF.json staleness:** What if HANDOFF.json was written 3 weeks ago and
162
+ much has changed since? Is there a staleness check?
163
+ Recommendation: "If `updated_at` is more than 48 hours old, warn the user
164
+ and confirm they want to continue from that state."
165
+
166
+ - [ ] **Multiple concurrent sessions:** Can two agents read the same HANDOFF.json
167
+ and both try to continue? The protocol should note this risk.
168
+
169
+ ---
170
+
171
+ ## REVIEW PASS 4 — New Commands: UX and Logic
172
+
173
+ ### `/mindforge:next` command
174
+
175
+ - [ ] **Decision tree completeness:** Does the decision tree handle every valid
176
+ project state? Enumerate the states and check:
177
+ - [ ] No PROJECT.md → init-project ✓ (in spec?)
178
+ - [ ] PROJECT.md exists, no phases → plan-phase 1 ✓ (in spec?)
179
+ - [ ] Plans exist, no SUMMARY files → execute-phase ✓ (in spec?)
180
+ - [ ] All SUMMARY files exist, no VERIFICATION → verify-phase (automated) ✓?
181
+ - [ ] VERIFICATION exists, no UAT → verify-phase (UAT) ✓?
182
+ - [ ] UAT exists, not shipped → ship ✓?
183
+ - [ ] All phases shipped → next milestone? ✓?
184
+
185
+ - [ ] Does "next" correctly advance phase numbers?
186
+ (When Phase 1 is complete, does it move to Phase 2 or try to re-run Phase 1?)
187
+
188
+ - [ ] Does the HANDOFF.json check come BEFORE or AFTER the state detection tree?
189
+ (HANDOFF.json represents a specific interrupted state — it should take priority
190
+ over general state detection if it exists and is recent)
191
+
192
+ ### `/mindforge:quick` command
193
+
194
+ - [ ] **Quick task numbering:** The spec uses a 3-digit sequential number (001, 002, ...).
195
+ How is the next number determined? Read `.planning/quick/` and count existing directories.
196
+ But what if two quick tasks are run in the same session? Will they both try to use "001"?
197
+ The spec must address how to avoid directory name collisions.
198
+
199
+ - [ ] **Quick task scope enforcement:** The spec warns if a task seems "too big" but
200
+ still allows proceeding. Is this the right policy? A large "quick" task without
201
+ proper planning is risky. Consider: if the task would touch > 6 files, require
202
+ `--force` flag to proceed, making the override deliberate.
203
+
204
+ - [ ] **Quick tasks and the phase state:** Does running a quick task update STATE.md?
205
+ If the phase is "in progress" when a quick task runs, STATE.md should not change.
206
+ If there is no active phase, STATE.md should note the quick task. Is this specified?
207
+
208
+ - [ ] **Flags without --full:** The spec says `--full` adds "full test suite + linting."
209
+ But shouldn't linting always run even without `--full`? Committing unlinted code
210
+ from a quick task is exactly the kind of regression that makes codebases messy.
211
+ Recommendation: linting always runs. `--full` adds the test suite + security scan.
212
+
213
+ ### `/mindforge:status` command
214
+
215
+ - [ ] **Phase progress calculation:** The spec calculates phase progress as
216
+ "tasks with SUMMARY files / total tasks in phase."
217
+ But a SUMMARY file exists for failed tasks too. Should failed tasks count as progress?
218
+ They should not. The calculation should be: SUMMARY files with `Status: Completed ✅`.
219
+
220
+ - [ ] **Empty AUDIT.jsonl:** On a fresh project, AUDIT.jsonl is empty.
221
+ Does the status command handle this gracefully? (No "Recent Activity" section,
222
+ or "No activity logged yet" — either is fine, but it must not crash)
223
+
224
+ - [ ] **Missing VERIFICATION.md:** On a phase in progress, VERIFICATION.md does not
225
+ exist yet. Does the requirements coverage section handle this gracefully?
226
+ It should show "In progress" rather than crashing.
227
+
228
+ ### `/mindforge:debug` command
229
+
230
+ - [ ] **Intake vs. diagnosis:** The intake step asks 4 questions. What if the user
231
+ already provided all the information in their initial `/mindforge:debug` invocation?
232
+ Does the command re-ask questions they already answered?
233
+ Recommendation: Parse the initial description for answers before asking.
234
+
235
+ - [ ] **Debug Specialist persona activation:** The command says "load
236
+ debug-specialist.md persona immediately." Does this mean the DEBUG command's
237
+ entire execution is in that persona, even the intake and reporting steps?
238
+ It should be — confirm this is unambiguous.
239
+
240
+ - [ ] **When the fix introduces a new bug:** The protocol says step 9 is "verify —
241
+ the test from step 7 now passes, no regressions." But what if the fix passes the
242
+ new test but breaks an unrelated test? The debug protocol must include a full
243
+ test suite run after the fix, not just the newly-written test.
244
+
245
+ ---
246
+
247
+ ## REVIEW PASS 5 — Test Suite Quality
248
+
249
+ Read all three new test files.
250
+
251
+ ### `tests/wave-engine.test.js`
252
+
253
+ - [ ] Does the test cover the 5-plan realistic diamond example? ✓ (should be there)
254
+ - [ ] Does the test cover a plan with a dependency on a non-existent plan ID?
255
+ (Missing dependency detection — this should throw an error)
256
+ - [ ] Does the test cover the empty graph (zero plans)?
257
+ - [ ] Does the `findFileConflicts` test cover the case where 3+ plans touch the same file?
258
+ - [ ] Are there any tests for the wave executor's "before starting a wave" validation?
259
+ (Checking that all previous wave plans have SUMMARY files with passing status)
260
+
261
+ Missing tests to add if not present:
262
+ ```javascript
263
+ test('handles empty graph (no plans)', () => {
264
+ const waves = groupIntoWaves({});
265
+ assert.deepStrictEqual(waves, []);
266
+ });
267
+
268
+ test('detects self-referencing dependency', () => {
269
+ const graph = { '01': { dependsOn: ['01'] } }; // depends on itself
270
+ assert.strictEqual(hasCircularDependency(graph), true);
271
+ });
272
+
273
+ test('three-plan file conflict', () => {
274
+ const plans = [
275
+ { id: '01', files: ['src/shared.ts'] },
276
+ { id: '02', files: ['src/shared.ts'] },
277
+ { id: '03', files: ['src/shared.ts'] },
278
+ ];
279
+ const conflicts = findFileConflicts(plans);
280
+ // At least 2 conflicts (01vs02, 01vs03 or 02vs03)
281
+ assert.ok(conflicts.length >= 2);
282
+ });
283
+ ```
284
+
285
+ ### `tests/audit.test.js`
286
+
287
+ - [ ] Does it test that AUDIT.jsonl with mixed valid/invalid lines is rejected correctly?
288
+ - [ ] Does it test the `security_finding` event type specifically?
289
+ - [ ] Does it test that a UUID with wrong format is rejected?
290
+
291
+ ### `tests/compaction.test.js`
292
+
293
+ - [ ] Does it test that compaction-protocol.md mentions WIP commits?
294
+ - [ ] Does it test that HANDOFF.json has a `recent_commits` field defined?
295
+ - [ ] Does it test the `in_progress` field structure in HANDOFF.json?
296
+
297
+ ---
298
+
299
+ ## REVIEW PASS 6 — Cross-Component Consistency
300
+
301
+ Check that all Day 2 components are internally consistent with each other AND with Day 1.
302
+
303
+ ### Consistency checks (flag any mismatch as MAJOR)
304
+
305
+ - [ ] `execute-phase.md` references the wave engine — do the referenced file paths match actual files?
306
+ - `.mindforge/engine/dependency-parser.md` ← exists?
307
+ - `.mindforge/engine/wave-executor.md` ← exists?
308
+ - `.mindforge/engine/context-injector.md` ← exists?
309
+ - `.mindforge/engine/verification-pipeline.md` ← exists?
310
+
311
+ - [ ] `compaction-protocol.md` says to write HANDOFF.json with a specific schema.
312
+ Does the schema match the HANDOFF.json template in `init-project.md`?
313
+ Both must have identical field sets.
314
+
315
+ - [ ] `AUDIT-SCHEMA.md` defines events. Does `execute-phase.md` write all the events
316
+ it is supposed to? Cross-check:
317
+ - [ ] `phase_execution_started` at step 2 of execute-phase
318
+ - [ ] `task_started` at subagent spawn time
319
+ - [ ] `task_completed` after each task
320
+ - [ ] `task_failed` on verify failure
321
+ - [ ] `quality_gate_failed` on test suite failure
322
+ - [ ] `phase_execution_completed` at phase end
323
+
324
+ - [ ] CLAUDE.md (updated in Task 10) — does it reference the wave engine correctly?
325
+ Check that the file paths it references for the engine exist.
326
+
327
+ - [ ] `next.md` decision tree — does "plans exist but no SUMMARY files → execute-phase"
328
+ correctly handle the case where some SUMMARY files exist (partial execution)?
329
+ This means a phase was partially executed. `next` should resume at the first plan
330
+ without a SUMMARY, not restart the entire phase.
331
+
332
+ ---
333
+
334
+ ## REVIEW PASS 7 — Security Review
335
+
336
+ Activate `security-reviewer.md` persona for this pass.
337
+
338
+ ### Audit log security
339
+ - [ ] Is there any code path where an agent action could be taken WITHOUT writing
340
+ an audit entry? Map every AUDIT write in execute-phase.md against every possible
341
+ execution path. Any unaudited path is a governance gap.
342
+ - [ ] Can the AUDIT.jsonl file be written to by anything other than the MindForge agent?
343
+ (In a CI environment, a compromised script could inject fake audit entries)
344
+ Note this risk if not already documented.
345
+ - [ ] Could sensitive data end up in an AUDIT entry?
346
+ Check `task_started` — it includes `files_in_scope`. Could a file path expose
347
+ sensitive directory structure (e.g., `src/models/ssn-lookup.ts`)? Low risk but note.
348
+ - [ ] The `decision_recorded` event includes `rationale`. Could a developer accidentally
349
+ paste credentials into a rationale? (e.g., "Used connection string: postgres://user:pass@...")
350
+ This is a documentation risk. Add a note to the schema.
351
+
352
+ ### Context injection security
353
+ - [ ] The context injector injects SECURITY.md into every subagent.
354
+ But SECURITY.md is a template with placeholders on Day 1.
355
+ What if the user hasn't filled it in? Does an empty/template SECURITY.md mislead
356
+ the subagent into thinking security requirements are defined when they aren't?
357
+ Recommendation: Add a check in the context injector — if SECURITY.md contains
358
+ placeholder text, warn the user to fill it in.
359
+
360
+ - [ ] The context injector injects ADR files referenced in plan `<context>` fields.
361
+ Could a malicious plan file reference `../../../etc/passwd` as an ADR path?
362
+ (This is a path traversal risk in the reference resolution)
363
+ Recommendation: Validate that all referenced files are within the project directory.
364
+
365
+ ### Quick task security
366
+ - [ ] Does `quick.md` include a security check when the `--full` flag is used?
367
+ What about when the task is clearly security-sensitive (keywords: auth, password,
368
+ token, payment)? Should the security-review SKILL auto-trigger for quick tasks too?
369
+ It should. Add if missing.
370
+
371
+ ---
372
+
373
+ ## REVIEW OUTPUT FORMAT
374
+
375
+ ```
376
+ ## Finding [N] — [Severity]: [Short title]
377
+
378
+ **File:** [path/to/file.md, line N if identifiable]
379
+ **Category:** [Wave Engine / Audit / Compaction / Commands / Tests / Consistency / Security]
380
+ **Severity:** BLOCKING | MAJOR | MINOR | SUGGESTION
381
+
382
+ **Issue:**
383
+ [What is wrong or missing. Specific.]
384
+
385
+ **Impact:**
386
+ [What breaks if unfixed.]
387
+
388
+ **Recommendation:**
389
+ [Exact change to make.]
390
+ ```
391
+
392
+ ---
393
+
394
+ ## REVIEW SUMMARY TABLE
395
+
396
+ ```
397
+ ## Day 2 Review Summary
398
+
399
+ | Category | BLOCKING | MAJOR | MINOR | SUGGESTION |
400
+ |---------------|----------|-------|-------|------------|
401
+ | Wave Engine | | | | |
402
+ | Audit System | | | | |
403
+ | Compaction | | | | |
404
+ | Commands | | | | |
405
+ | Test Suite | | | | |
406
+ | Consistency | | | | |
407
+ | Security | | | | |
408
+ | **TOTAL** | | | | |
409
+
410
+ ## Verdict
411
+ [ ] ✅ APPROVED — Proceed to DAY2-HARDEN.md
412
+ [ ] ⚠️ APPROVED WITH CONDITIONS — Fix [N] major findings first
413
+ [ ] ❌ NOT APPROVED — [N] blocking findings. Fix and re-review.
414
+
415
+ ## Estimated fix time
416
+ [Realistic estimate]
417
+ ```
418
+
419
+ ---
420
+
421
+ **Branch:** `feat/mindforge-wave-engine`
422
+ **All BLOCKING items resolved → proceed to DAY2-HARDEN.md**