mindforge-cc 11.9.0 → 11.9.2

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 (201) hide show
  1. package/.agent/mindforge/consult.md +1 -1
  2. package/.agent/mindforge/cost-report.md +1 -1
  3. package/.agent/mindforge/ship.md +2 -2
  4. package/.agent/mindforge/update.md +1 -1
  5. package/.agent/mindforge/wf-catalog.md +5 -2
  6. package/.claude/commands/mindforge/consult.md +1 -1
  7. package/.claude/commands/mindforge/cost-report.md +1 -1
  8. package/.claude/commands/mindforge/ship.md +2 -2
  9. package/.claude/commands/mindforge/skill-tdd.md +53 -0
  10. package/.claude/commands/mindforge/skills-index.md +118 -0
  11. package/.claude/commands/mindforge/systematic-debug.md +60 -0
  12. package/.claude/commands/mindforge/update.md +1 -1
  13. package/.claude/commands/mindforge/wf-accessibility-audit.md +31 -0
  14. package/.claude/commands/mindforge/wf-ai-model-eval.md +31 -0
  15. package/.claude/commands/mindforge/wf-api-migration.md +31 -0
  16. package/.claude/commands/mindforge/wf-architecture-modernization.md +32 -0
  17. package/.claude/commands/mindforge/wf-catalog.md +62 -0
  18. package/.claude/commands/mindforge/wf-code-audit.md +31 -0
  19. package/.claude/commands/mindforge/wf-code-explainer.md +31 -0
  20. package/.claude/commands/mindforge/wf-competitive-analysis.md +31 -0
  21. package/.claude/commands/mindforge/wf-competitive-teardown.md +31 -0
  22. package/.claude/commands/mindforge/wf-cost-analysis.md +31 -0
  23. package/.claude/commands/mindforge/wf-data-pipeline-validate.md +31 -0
  24. package/.claude/commands/mindforge/wf-database-migration.md +31 -0
  25. package/.claude/commands/mindforge/wf-debug-detective.md +32 -0
  26. package/.claude/commands/mindforge/wf-design-system-audit.md +31 -0
  27. package/.claude/commands/mindforge/wf-documentation-gen.md +31 -0
  28. package/.claude/commands/mindforge/wf-feature-planner.md +31 -0
  29. package/.claude/commands/mindforge/wf-incident-response.md +31 -0
  30. package/.claude/commands/mindforge/wf-multi-repo-sync.md +31 -0
  31. package/.claude/commands/mindforge/wf-mutation-testing.md +31 -0
  32. package/.claude/commands/mindforge/wf-onboard-codebase.md +31 -0
  33. package/.claude/commands/mindforge/wf-orchestrate-review.md +35 -0
  34. package/.claude/commands/mindforge/wf-perf-optimize.md +31 -0
  35. package/.claude/commands/mindforge/wf-pr-review.md +31 -0
  36. package/.claude/commands/mindforge/wf-refactor-plan.md +31 -0
  37. package/.claude/commands/mindforge/wf-release-prep.md +31 -0
  38. package/.claude/commands/mindforge/wf-security-threat-model.md +31 -0
  39. package/.claude/commands/mindforge/wf-tdd-sprint.md +31 -0
  40. package/.claude/commands/mindforge/wf-tech-evaluation.md +31 -0
  41. package/.claude/commands/mindforge/wf-ux-heuristic-audit.md +31 -0
  42. package/.claude/commands/mindforge/wf-verification-loop.md +45 -0
  43. package/.claude/commands/mindforge/wf-workflow-optimizer.md +51 -0
  44. package/.claude/commands/mindforge/wf-writer-reviewer.md +30 -0
  45. package/.mindforge/MINDFORGE-SCHEMA.json +126 -13
  46. package/.mindforge/config.json +3 -3
  47. package/.mindforge/engine/cost-tracking/router.md +1 -1
  48. package/.mindforge/engine/cost-tracking/token-ledger.md +21 -24
  49. package/.mindforge/memory/sync-manifest.json +1 -1
  50. package/.mindforge/metrics/METRICS-SCHEMA.md +13 -4
  51. package/.mindforge/personas/cost-optimizer.md +2 -2
  52. package/.mindforge/personas/doc-auditor.md +1 -1
  53. package/.mindforge/personas/monorepo-architect.md +2 -1
  54. package/.mindforge/personas/multi-model-bridge.md +1 -1
  55. package/.mindforge/personas/release-manager.md +5 -3
  56. package/.mindforge/skills/cost-aware-routing/SKILL.md +3 -3
  57. package/.mindforge/skills/documentation/SKILL.md +4 -1
  58. package/.mindforge/skills/multi-llm-consult/SKILL.md +2 -2
  59. package/CHANGELOG.md +216 -1821
  60. package/MINDFORGE.md +4 -4
  61. package/README.md +103 -509
  62. package/RELEASENOTES.md +75 -0
  63. package/SECURITY.md +1 -1
  64. package/bin/autonomous/audit-writer.js +48 -33
  65. package/bin/dashboard/api-router.js +11 -10
  66. package/bin/dashboard/error-response.js +44 -0
  67. package/bin/dashboard/frontend/index.html +20 -3
  68. package/bin/dashboard/metrics-aggregator.js +29 -8
  69. package/bin/dashboard/revops-api.js +12 -2
  70. package/bin/dashboard/server.js +85 -5
  71. package/bin/dashboard/temporal-api.js +11 -5
  72. package/bin/engine/remediation-engine.js +12 -1
  73. package/bin/engine/temporal-hub.js +41 -9
  74. package/bin/eval/eval-harness.js +212 -1
  75. package/bin/eval/golden-set-retrieval.json +9 -0
  76. package/bin/governance/policy-engine.js +8 -0
  77. package/bin/hindsight-injector.js +8 -2
  78. package/bin/hooks/instinct-capture-hook.js +7 -1
  79. package/bin/install.js +1 -1
  80. package/bin/learning/instinct-cli.js +7 -24
  81. package/bin/memory/knowledge-capture.js +23 -3
  82. package/bin/memory/knowledge-graph.js +70 -31
  83. package/bin/memory/vector-hub.js +304 -31
  84. package/bin/mindforge-cli.js +43 -11
  85. package/bin/models/cost-tracker.js +22 -23
  86. package/bin/models/model-router.js +28 -7
  87. package/bin/models/usage-record.js +71 -0
  88. package/bin/updater/changelog-fetcher.js +95 -5
  89. package/bin/utils/file-lock.js +106 -0
  90. package/bin/utils/mindforge-params.js +124 -0
  91. package/bin/utils/readiness-gate.js +3 -3
  92. package/bin/validate-config.js +34 -16
  93. package/changelogs/README.md +109 -0
  94. package/changelogs/index.json +103 -0
  95. package/changelogs/v0.1.0.md +21 -0
  96. package/changelogs/v0.2.0.md +15 -0
  97. package/changelogs/v0.3.0.md +28 -0
  98. package/changelogs/v0.4.0.md +29 -0
  99. package/changelogs/v0.5.0.md +34 -0
  100. package/changelogs/v0.6.0.md +34 -0
  101. package/changelogs/v1.0.0.md +60 -0
  102. package/changelogs/v1.0.1.md +15 -0
  103. package/changelogs/v1.0.2.md +10 -0
  104. package/changelogs/v1.0.3.md +10 -0
  105. package/changelogs/v1.0.4.md +10 -0
  106. package/changelogs/v1.0.5.md +10 -0
  107. package/changelogs/v10.0.0.md +71 -0
  108. package/changelogs/v10.0.2.md +15 -0
  109. package/changelogs/v10.0.3.md +21 -0
  110. package/changelogs/v10.0.4.md +16 -0
  111. package/changelogs/v10.0.5.md +16 -0
  112. package/changelogs/v10.0.6.md +15 -0
  113. package/changelogs/v10.0.7.md +15 -0
  114. package/changelogs/v10.0.8.md +15 -0
  115. package/changelogs/v10.0.9.md +15 -0
  116. package/changelogs/v10.1.0.md +16 -0
  117. package/changelogs/v10.1.1.md +15 -0
  118. package/changelogs/v10.2.0.md +14 -0
  119. package/changelogs/v10.3.0.md +13 -0
  120. package/changelogs/v10.4.0.md +13 -0
  121. package/changelogs/v10.5.0.md +13 -0
  122. package/changelogs/v10.6.0.md +13 -0
  123. package/changelogs/v10.7.0.md +15 -0
  124. package/changelogs/v11.0.0.md +66 -0
  125. package/changelogs/v11.0.1.md +10 -0
  126. package/changelogs/v11.1.0.md +56 -0
  127. package/changelogs/v11.2.0.md +41 -0
  128. package/changelogs/v11.2.1.md +38 -0
  129. package/changelogs/v11.3.0.md +45 -0
  130. package/changelogs/v11.3.1.md +39 -0
  131. package/changelogs/v11.4.0.md +38 -0
  132. package/changelogs/v11.5.0.md +77 -0
  133. package/changelogs/v11.5.1.md +47 -0
  134. package/changelogs/v11.6.0.md +45 -0
  135. package/changelogs/v11.7.0.md +30 -0
  136. package/changelogs/v11.7.1.md +8 -0
  137. package/changelogs/v11.8.0.md +19 -0
  138. package/changelogs/v11.8.1.md +28 -0
  139. package/changelogs/v11.8.2.md +22 -0
  140. package/changelogs/v11.8.3.md +22 -0
  141. package/changelogs/v11.9.0.md +17 -0
  142. package/changelogs/v11.9.1.md +8 -0
  143. package/changelogs/v11.9.2.md +209 -0
  144. package/changelogs/v2.0.0-alpha.1.md +42 -0
  145. package/changelogs/v2.0.0-alpha.10.md +13 -0
  146. package/changelogs/v2.0.0-alpha.11.md +14 -0
  147. package/changelogs/v2.0.0-alpha.12.md +16 -0
  148. package/changelogs/v2.0.0-alpha.2.md +14 -0
  149. package/changelogs/v2.0.0-alpha.3.md +17 -0
  150. package/changelogs/v2.0.0-alpha.4.md +17 -0
  151. package/changelogs/v2.0.0-alpha.7.md +18 -0
  152. package/changelogs/v2.0.0-alpha.8.md +11 -0
  153. package/changelogs/v2.0.0-alpha.9.md +12 -0
  154. package/changelogs/v2.0.0.md +35 -0
  155. package/changelogs/v2.1.0.md +22 -0
  156. package/changelogs/v2.1.1.md +25 -0
  157. package/changelogs/v2.1.2.md +21 -0
  158. package/changelogs/v2.3.2.md +19 -0
  159. package/changelogs/v2.3.3.md +16 -0
  160. package/changelogs/v2.3.4.md +16 -0
  161. package/changelogs/v2.3.5.md +21 -0
  162. package/changelogs/v2.4.0.md +29 -0
  163. package/changelogs/v2.5.0.md +26 -0
  164. package/changelogs/v2.6.0.md +26 -0
  165. package/changelogs/v3.0.0.md +17 -0
  166. package/changelogs/v4.0.0.md +19 -0
  167. package/changelogs/v4.1.0.md +19 -0
  168. package/changelogs/v4.3.0.md +31 -0
  169. package/changelogs/v5.0.0-alpha.1.md +35 -0
  170. package/changelogs/v5.0.0-alpha.2.md +22 -0
  171. package/changelogs/v5.1.0.md +42 -0
  172. package/changelogs/v5.2.0.md +18 -0
  173. package/changelogs/v5.3.0.md +14 -0
  174. package/changelogs/v5.4.0.md +28 -0
  175. package/changelogs/v5.5.0.md +11 -0
  176. package/changelogs/v5.6.0.md +11 -0
  177. package/changelogs/v5.7.0.md +12 -0
  178. package/changelogs/v5.8.0.md +12 -0
  179. package/changelogs/v5.9.0.md +11 -0
  180. package/changelogs/v6.0.0-alpha.md +45 -0
  181. package/changelogs/v6.1.0-alpha.md +29 -0
  182. package/changelogs/v6.2.0-alpha.md +30 -0
  183. package/changelogs/v6.2.0.md +21 -0
  184. package/changelogs/v6.3.0.md +14 -0
  185. package/changelogs/v6.4.0.md +13 -0
  186. package/changelogs/v6.5.0.md +13 -0
  187. package/changelogs/v6.6.0.md +12 -0
  188. package/changelogs/v6.7.0.md +12 -0
  189. package/changelogs/v7.0.0.md +13 -0
  190. package/changelogs/v8.0.0.md +14 -0
  191. package/changelogs/v8.1.0.md +13 -0
  192. package/changelogs/v8.2.0.md +12 -0
  193. package/changelogs/v8.2.1.md +11 -0
  194. package/changelogs/v9.0.0.md +20 -0
  195. package/docs/References/config-reference.md +73 -14
  196. package/docs/commands-reference.md +12 -6
  197. package/docs/faq.md +3 -3
  198. package/docs/getting-started.md +28 -3
  199. package/docs/sdk-reference.md +1 -1
  200. package/docs/user-guide.md +2 -2
  201. package/package.json +5 -2
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: "Implementer vs. scorer loop: revise each round, score against a fixed metric, keep re-attempting until the score is maxed or a round cap is hit"
3
+ ---
4
+ # /mindforge:wf-verification-loop
5
+
6
+ Runs the **Verification Loop** dynamic workflow.
7
+
8
+ ## Usage
9
+ `/mindforge:wf-verification-loop [task description, or { task, metric, targetScore, maxRounds }]`
10
+
11
+ ## What it does
12
+ - **Scope**: Pins the artifact, the metric, and the target score / max-round cap
13
+ - **Round**: An implementer agent revises the artifact; a separate scorer agent grades it
14
+ against the same fixed rubric every round; repeats until the target score is hit, the
15
+ score plateaus for `plateauRounds` consecutive rounds, or `maxRounds` is reached
16
+ - **Report**: Round-by-round score history plus the final artifact
17
+
18
+ Unlike a fixed-count review pass, this loop's whole point is that the implementer keeps
19
+ re-attempting the SAME task, judged by a separate scorer, until the score stops moving —
20
+ not a one-shot audit.
21
+
22
+ ## Running
23
+
24
+ Invoke via Claude Code's Workflow tool:
25
+
26
+ ```
27
+ Workflow({
28
+ scriptPath: ".mindforge/dynamic-workflows/scripts/verification-loop.js",
29
+ args: {
30
+ task: "Tighten this system prompt for token efficiency without losing instruction coverage",
31
+ metric: "10 pts clarity, 10 pts token economy, 10 pts no lost instructions",
32
+ targetScore: 95,
33
+ maxRounds: 8
34
+ }
35
+ })
36
+ ```
37
+
38
+ `args` can also be a plain string task description if you want the scorer to infer and
39
+ hold its own rubric. Defaults: `targetScore` 95, `maxRounds` 8, `plateauRounds` 2 (stop
40
+ early if the score doesn't improve for 2 consecutive rounds).
41
+
42
+ Or discover via CLI:
43
+ ```bash
44
+ node bin/mindforge-cli.js workflow info verification-loop
45
+ ```
@@ -0,0 +1,51 @@
1
+ ---
2
+ description: "Builder + scorer + a distinct process-optimizer role: proposes structural changes to the PROCESS itself across rounds, not just fixes to one output"
3
+ ---
4
+ # /mindforge:wf-workflow-optimizer
5
+
6
+ Runs the **Workflow Optimizer** dynamic workflow.
7
+
8
+ ## Usage
9
+ `/mindforge:wf-workflow-optimizer [task family description, or { taskFamily, metric, maxRounds, priorHistory }]`
10
+
11
+ ## What it does
12
+ - **Scope**: Pins the task family, the fixed outcome metric, and any prior round history
13
+ you supply (this script holds no state of its own between invocations)
14
+ - **Cycle**: A builder agent runs under the *current* process instructions; a separate
15
+ scorer agent grades the output against the fixed metric; a **third, distinct
16
+ process-optimizer agent** — with no role in building or scoring — diagnoses *why* the
17
+ process produced that result and rewrites the builder's instructions for next round.
18
+ Repeats until the optimizer judges the process has converged or `maxRounds` is hit.
19
+ - **Report**: The score trend across rounds alongside every round's structural diagnosis,
20
+ so you can see whether rising scores came from real process changes, not just luck.
21
+
22
+ This is not "implementer vs. scorer, keep re-attempting the same task" (that's
23
+ `/mindforge:wf-verification-loop`, one artifact, one metric, no separate optimizer role).
24
+ This workflow's object of improvement is the **process itself** — the builder's own
25
+ instructions evolve round to round, and the deliverable includes that evolution history,
26
+ not just a final artifact.
27
+
28
+ ## Running
29
+
30
+ Invoke via Claude Code's Workflow tool:
31
+
32
+ ```
33
+ Workflow({
34
+ scriptPath: ".mindforge/dynamic-workflows/scripts/workflow-optimizer.js",
35
+ args: {
36
+ taskFamily: "Write a one-paragraph executive summary of a technical incident postmortem",
37
+ metric: "30 pts non-technical-reader clarity, 30 pts root-cause traceability, 40 pts action-item concreteness",
38
+ maxRounds: 5
39
+ }
40
+ })
41
+ ```
42
+
43
+ To continue optimizing the SAME process across separate sessions, pass the previous run's
44
+ returned `processHistory` back in as `args.priorHistory` — the script itself has no
45
+ filesystem access and keeps no state between invocations, so cross-session continuity is
46
+ the caller's responsibility.
47
+
48
+ Or discover via CLI:
49
+ ```bash
50
+ node bin/mindforge-cli.js workflow info workflow-optimizer
51
+ ```
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: "Anthropic Writer/Reviewer pattern: implement in Context A → fresh Context B reviews the diff"
3
+ ---
4
+ # /mindforge:wf-writer-reviewer
5
+
6
+ Runs the **Writer Reviewer** dynamic workflow.
7
+
8
+ ## Usage
9
+ `/mindforge:wf-writer-reviewer <implementation task description>`
10
+
11
+ ## What it does
12
+ - **Implement**: Writer agent implements the requested change
13
+ - **Review**: Fresh reviewer agent inspects only the diff without implementation context
14
+ - **Verdict**: Accept / request-changes verdict with specific actionable feedback
15
+
16
+ ## Running
17
+
18
+ Invoke via Claude Code's Workflow tool:
19
+
20
+ ```
21
+ Workflow({
22
+ scriptPath: ".mindforge/dynamic-workflows/scripts/writer-reviewer.js",
23
+ args: "<your input>"
24
+ })
25
+ ```
26
+
27
+ Or discover via CLI:
28
+ ```bash
29
+ node bin/mindforge-cli.js workflow info writer-reviewer
30
+ ```
@@ -1,33 +1,146 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "MindForge Project Configuration Schema",
4
- "description": "JSON Schema for MINDFORGE.md key-value settings",
4
+ "description": "JSON Schema for MINDFORGE.md bracketed parameter assignments ([KEY] = value)",
5
5
  "type": "object",
6
+ "required": [
7
+ "VERSION",
8
+ "REACTIVE_MODE",
9
+ "PLANNER",
10
+ "EXECUTOR",
11
+ "MIN_SOUL_SCORE"
12
+ ],
13
+ "recommended": [
14
+ "COST_WARN_USD",
15
+ "COST_HARD_LIMIT_USD",
16
+ "BLOCK_ON_SECURITY"
17
+ ],
6
18
  "properties": {
19
+ "NAME": { "type": "string", "description": "Project display name" },
20
+ "VERSION": {
21
+ "type": "string",
22
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
23
+ "description": "MindForge version this registry targets (must equal package.json version)"
24
+ },
25
+ "STABLE": { "type": "boolean", "description": "Registry is a released/stable configuration" },
26
+ "MODE": { "type": "string", "description": "Operating mode label (free-form)" },
27
+ "REQUIRED_CORE_VERSION": {
28
+ "type": "string",
29
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
30
+ "description": "Minimum MindForge core version required by this project"
31
+ },
32
+ "SOVEREIGN_IDENTITY": {
33
+ "type": "boolean",
34
+ "nonOverridable": true,
35
+ "description": "NON-OVERRIDABLE: identity verification is always required"
36
+ },
37
+ "SRE_LAYER_ENABLED": { "type": "boolean", "description": "Enable the SRE persona layer" },
38
+ "SWARM_ORCHESTRATION": { "type": "boolean", "description": "Enable dynamic swarm orchestration" },
39
+ "AUTO_SWARM_THRESHOLD": {
40
+ "type": "number", "minimum": 0, "maximum": 10,
41
+ "description": "Difficulty score above which a swarm is auto-spawned"
42
+ },
43
+ "CONTEXT7_DEPTH": {
44
+ "type": "enum", "values": ["MINIMAL", "STANDARD", "EXTENDED"],
45
+ "description": "Depth of Context7 knowledge injection"
46
+ },
47
+ "DYNAMISM_LEVEL": {
48
+ "type": "number", "minimum": 1, "maximum": 5,
49
+ "description": "How aggressively the engine reshapes its own plan (1=static, 5=fully dynamic)"
50
+ },
51
+ "REACTIVE_MODE": { "type": "boolean", "description": "Enable the reactive (auto-discovery) engine" },
52
+ "CONTEXT_SHARDING": { "type": "boolean", "description": "Enable the sharded memory loop" },
53
+ "ADS_LOOP_ENFORCED": { "type": "boolean", "description": "Enforce the adversarial decision loop before architectural change" },
54
+ "TEMPORAL_VISION": { "type": "boolean", "description": "Enable temporal hindsight / steering" },
55
+ "RAG_2_AUTO_SHADOW": { "type": "boolean", "description": "Run RAG-2 retrieval in shadow mode" },
56
+ "ENABLE_ART_TRACING": { "type": "boolean", "description": "Enable agent reasoning trace (ART) capture" },
57
+ "ENABLE_ZTAI": {
58
+ "type": "boolean",
59
+ "nonOverridable": true,
60
+ "description": "NON-OVERRIDABLE: zero-trust agent identity cannot be bypassed"
61
+ },
62
+ "ZTAI_KEY_TYPE": { "type": "string", "description": "Declared ZTAI key algorithm label" },
63
+ "NEXUS_TRACE_RETENTION_DAYS": {
64
+ "type": "number", "minimum": 1, "maximum": 365,
65
+ "description": "Days of NexusTracer trace retention"
66
+ },
67
+ "CADIA_CORE": { "type": "boolean", "description": "Enable the CADIA core layer" },
68
+ "PQAS_ENFORCED": {
69
+ "type": "boolean",
70
+ "description": "Post-quantum attestation enforcement (SIMULATED/inactive by default — see bin/governance/quantum-crypto.js)"
71
+ },
72
+ "PROACTIVE_HOMING": { "type": "boolean", "description": "Enable proactive homing / next-task discovery" },
73
+ "PLANNER": { "type": "string", "description": "Model id for the planning persona (canonical: PLANNER_MODEL)" },
74
+ "EXECUTOR": { "type": "string", "description": "Model id for execution agents (canonical: EXECUTOR_MODEL)" },
75
+ "REVIEWER": { "type": "string", "description": "Model id for the code reviewer (canonical: REVIEWER_MODEL)" },
76
+ "VERIFIER": { "type": "string", "description": "Model id for the verification persona (canonical: VERIFIER_MODEL)" },
77
+ "SECURITY": { "type": "string", "description": "Model id for security review (canonical: SECURITY_MODEL)" },
78
+ "DEBUG": { "type": "string", "description": "Model id for the debug specialist (canonical: DEBUG_MODEL)" },
79
+ "RESEARCH": { "type": "string", "description": "Model id for the research agent (canonical: RESEARCH_MODEL)" },
80
+ "QA": { "type": "string", "description": "Model id for the QA engineer (canonical: QA_MODEL)" },
81
+ "QUICK": { "type": "string", "description": "Model id for tier-1 budget-bias tasks (canonical: QUICK_MODEL)" },
82
+ "COST_WARN_USD": {
83
+ "type": "number", "minimum": 0, "maximum": 10000,
84
+ "description": "Daily spend at which a cost warning is emitted"
85
+ },
86
+ "COST_HARD_LIMIT_USD": {
87
+ "type": "number", "minimum": 0, "maximum": 10000,
88
+ "description": "Daily hard cost limit in USD. DECLARED BUT NOT ENFORCED as of 11.9.2: bin/models/cost-tracker.js reads MODEL_COST_HARD_LIMIT_USD, which this registry does not declare, so preflight() returns early and no cap is applied. Do not treat this as a spend control. Tracked as COST-02."
89
+ },
90
+ "ADS_DEBATE_ROUNDS": {
91
+ "type": "number", "minimum": 1, "maximum": 10,
92
+ "description": "Red-team/blue-team debate rounds per architectural decision"
93
+ },
94
+ "MIN_SOUL_SCORE": {
95
+ "type": "number", "minimum": 0, "maximum": 10,
96
+ "nonOverridable": true,
97
+ "description": "NON-OVERRIDABLE: minimum SOUL score required for architectural changes"
98
+ },
99
+ "REQUIRE_ADR": { "type": "boolean", "description": "Require an ADR for architectural decisions" },
100
+ "BLOCK_ON_SECURITY": {
101
+ "type": "boolean",
102
+ "nonOverridable": true,
103
+ "description": "NON-OVERRIDABLE: security gate enforcement cannot be disabled"
104
+ },
105
+ "BROWSER_PORT": {
106
+ "type": "number", "minimum": 1024, "maximum": 65535,
107
+ "description": "Port for the browser/QA harness"
108
+ },
109
+ "DASHBOARD_PORT": {
110
+ "type": "number", "minimum": 1024, "maximum": 65535,
111
+ "description": "Port for the MindForge dashboard"
112
+ },
113
+ "API_URL": { "type": "string", "description": "Base URL of the project API under development" },
114
+ "SHARD_RETAIN_DAYS": {
115
+ "type": "number", "minimum": 1, "maximum": 365,
116
+ "description": "Days to retain context shards"
117
+ },
118
+ "FORBIDDEN": { "type": "string", "description": "Multi-line block of project prohibitions injected into every agent prompt" },
119
+ "INSTRUCTIONS": { "type": "string", "description": "Multi-line block of project instructions injected into every agent prompt" },
7
120
  "MINDFORGE_VERSION_REQUIRED": {
8
121
  "type": "string",
9
122
  "pattern": "^\\d+\\.\\d+\\.\\d+$",
10
123
  "description": "Minimum MindForge version required for this config"
11
124
  },
12
125
  "PLANNER_MODEL": {
13
- "type": "enum",
14
- "values": ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5", "inherit"],
15
- "description": "Claude model to use for the planning agent"
126
+ "type": "string",
127
+ "deprecated": true,
128
+ "description": "DEPRECATED long form of [PLANNER]. Model id for the planning agent (free-form: model ids churn faster than this schema)"
16
129
  },
17
130
  "EXECUTOR_MODEL": {
18
- "type": "enum",
19
- "values": ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5", "inherit"],
20
- "description": "Claude model to use for execution agents"
131
+ "type": "string",
132
+ "deprecated": true,
133
+ "description": "DEPRECATED long form of [EXECUTOR]. Model id for execution agents"
21
134
  },
22
135
  "REVIEWER_MODEL": {
23
- "type": "enum",
24
- "values": ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5", "inherit"],
25
- "description": "Claude model to use for the code reviewer"
136
+ "type": "string",
137
+ "deprecated": true,
138
+ "description": "DEPRECATED long form of [REVIEWER]. Model id for the code reviewer"
26
139
  },
27
140
  "SECURITY_MODEL": {
28
- "type": "enum",
29
- "values": ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5", "inherit"],
30
- "description": "Claude model to use for security review (recommend Opus for thoroughness)"
141
+ "type": "string",
142
+ "deprecated": true,
143
+ "description": "DEPRECATED long form of [SECURITY]. Model id for security review"
31
144
  },
32
145
  "TIER1_AUTO_APPROVE": {
33
146
  "type": "boolean",
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "11.9.0",
2
+ "version": "11.9.2",
3
3
  "environment": "development",
4
4
  "governance": {
5
5
  "drift_threshold": 0.75,
6
6
  "critical_drift_threshold": 0.5,
7
7
  "res_threshold": 0.8,
8
- "active_did": "did:mindforge:7672fba0-0c90-429f-8f22-2c6aa7d2bc63"
8
+ "active_did": "did:mindforge:766e07ac-8f56-4840-be61-316b90bbed35"
9
9
  },
10
10
  "revops": {
11
11
  "market_registry": {
@@ -125,7 +125,7 @@
125
125
  "project_weekly_warn_usd": 50,
126
126
  "project_weekly_hard_limit_usd": 200
127
127
  },
128
- "ledger_path": ".mindforge/metrics/token-ledger.jsonl"
128
+ "ledger_path": ".mindforge/metrics/token-usage.jsonl"
129
129
  },
130
130
  "proactive_suggestions": {
131
131
  "enabled": true,
@@ -41,7 +41,7 @@ These always override the matrix:
41
41
  3. Map score to tier via decision matrix
42
42
  4. Apply override rules
43
43
  5. Check budget: if remaining budget < estimated cost, downgrade one tier with WARNING
44
- 6. Log routing decision to token-ledger.jsonl
44
+ 6. Log routing decision to token-usage.jsonl
45
45
  7. Return selected model ID
46
46
 
47
47
  ## Budget Guard
@@ -5,43 +5,40 @@ Append-only ledger recording all token usage for analytics, budgeting, and optim
5
5
 
6
6
  ## Storage
7
7
 
8
- - Location: `.mindforge/metrics/token-ledger.jsonl`
8
+ - Location: `.mindforge/metrics/token-usage.jsonl` (canonical shape: `bin/models/usage-record.js`)
9
9
  - Format: JSON Lines (one entry per model interaction)
10
10
  - Rotation: Archive entries older than 30 days to `.mindforge/metrics/archive/`
11
11
  - Retention: Archives kept for 90 days, then deleted
12
12
 
13
13
  ## Entry Format
14
14
 
15
- Each line in the ledger is a complete JSON object:
15
+ Each line in the ledger is a complete JSON object. The authoritative shape is
16
+ `bin/models/usage-record.js`; this is what `bin/models/cost-tracker.js`
17
+ actually appends today (all five providers in `bin/models/*-provider.js` emit it):
16
18
 
17
19
  ```json
18
20
  {
19
- "id": "txn-[uuid]",
20
- "timestamp": "2026-05-25T10:30:00Z",
21
- "session_id": "session-abc123",
22
- "task_id": "task-def456",
23
- "phase": "execute",
24
21
  "model": "claude-sonnet-4-6",
25
- "tier": "standard",
26
- "routing_reason": "difficulty_score_5_multi_file",
27
- "tokens": {
28
- "input": 12500,
29
- "output": 3200,
30
- "cached_input": 8000,
31
- "total": 15700
32
- },
22
+ "input_tokens": 12500,
23
+ "output_tokens": 3200,
24
+ "cache_read_input_tokens": 8000,
25
+ "cache_creation_input_tokens": 0,
33
26
  "cost_usd": 0.085,
34
- "budget_remaining": {
35
- "session": 4.915,
36
- "project_weekly": 49.915
37
- },
38
- "task_type": "implementation",
39
- "files_touched": 3,
40
- "skills_loaded": ["code-quality", "testing-standards"],
41
- "outcome": "success"
27
+ "task_name": "Plan 3-04",
28
+ "session_id": "session-abc123",
29
+ "phase": 3,
30
+ "date": "2026-05-25",
31
+ "timestamp": "2026-05-25T10:30:00.000Z"
42
32
  }
43
33
  ```
44
34
 
35
+ `cost_usd` is the ONLY cost field. `total_cost_usd` belongs to cross-review
36
+ reports (`bin/review/cross-review-engine.js`) and must never appear here.
37
+
38
+ Not yet emitted (aspirational — do not read these): `id`, `task_id`, `tier`,
39
+ `routing_reason`, `budget_remaining`, `task_type`, `files_touched`,
40
+ `skills_loaded`, `outcome`.
41
+
45
42
  ## Reporting Queries
46
43
 
47
44
  The `/mindforge:cost-report` command reads this ledger to produce:
@@ -71,7 +68,7 @@ debugging | $0.85 | 32,000 | 8
71
68
 
72
69
  ## Integration
73
70
 
74
- - Written to by the budget-enforcer after every model interaction
71
+ - Written to by `bin/models/cost-tracker.js` `record()` after every model interaction (called from `bin/models/model-client.js:77`)
75
72
  - Read by `/mindforge:cost-report` command
76
73
  - Summarized weekly into `.mindforge/metrics/weekly-cost-summary.json`
77
74
  - Referenced by AgRevOps dashboard for ROI tracking
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pattern-library.jsonl": {
3
- "lastSync": "2026-07-28T09:19:09.269Z",
3
+ "lastSync": "2026-08-16T19:50:41.118Z",
4
4
  "localCount": 1
5
5
  }
6
6
  }
@@ -1,13 +1,22 @@
1
1
  # MindForge Metrics — Schema Reference
2
2
 
3
3
  ## Files
4
- - `session-quality.jsonl`
5
- - `phase-metrics.jsonl`
6
- - `skill-usage.jsonl`
7
- - `compaction-quality.jsonl`
4
+ - `session-quality.jsonl` — **no producer in this repo**; every reference to it
5
+ (`bin/dashboard/metrics-aggregator.js`, `sdk/src/client.ts`,
6
+ `mcp-server/src/vendor/client.ts`) is a READ. Expected to be supplied by the
7
+ agent/host; MindForge only consumes it.
8
+ - `phase-metrics.jsonl` — no producer in this repo
9
+ - `skill-usage.jsonl` — no producer in this repo
10
+ - `compaction-quality.jsonl` — no producer in this repo
11
+ - `token-usage.jsonl` — **code-written** by `bin/models/cost-tracker.js`; canonical
12
+ shape is `bin/models/usage-record.js`. Cost lives in `cost_usd` and nowhere else.
13
+ Gitignored and excluded from the npm tarball.
8
14
 
9
15
  All files are append-only JSONL.
10
16
 
17
+ Per-session cost is NOT a `session-quality.jsonl` field: the dashboard joins it
18
+ from `token-usage.jsonl` on `session_id`.
19
+
11
20
  ## session-quality.jsonl fields
12
21
  - session_id, date, phase, developer_id
13
22
  - tasks_attempted, tasks_completed, tasks_failed
@@ -39,7 +39,7 @@ Map score to model tier via the routing decision matrix.
39
39
  </step>
40
40
 
41
41
  <step name="check_budget">
42
- Read token-ledger.jsonl for current session/project spend.
42
+ Read token-usage.jsonl for current session/project spend.
43
43
  Compare against budget limits in config.json.
44
44
  If approaching warn threshold: flag to user.
45
45
  </step>
@@ -66,6 +66,6 @@ Recommend routing adjustments for next session.
66
66
  - NEVER skip security overrides to save money (auth/payment always >= standard tier)
67
67
  - NEVER exceed hard budget limit without explicit user approval
68
68
  - NEVER silently downgrade model quality — always inform
69
- - Track every model interaction in token-ledger.jsonl
69
+ - Track every model interaction in token-usage.jsonl
70
70
  - Report cost transparency in every session summary
71
71
  </critical_rules>
@@ -35,7 +35,7 @@ updates every time code changes, it needs automation or deletion.
35
35
  <process>
36
36
  <step name="inventory">
37
37
  Identify all documentation files in the project:
38
- - README.md, CONTRIBUTING.md, CHANGELOG.md
38
+ - README.md, CONTRIBUTING.md, CHANGELOG.md (rolling window), changelogs/ (full archive + README.md index)
39
39
  - docs/ directory (all files)
40
40
  - Inline API documentation (JSDoc, docstrings)
41
41
  - Architecture decision records (ADRs)
@@ -156,7 +156,8 @@ git commit -m "feat(api)!: change auth header" → major bump
156
156
  - Build all packages in dependency order
157
157
  - Publish to npm (private registry or public)
158
158
  - Tag git commit with version
159
- - Generate CHANGELOG.md
159
+ - Generate `changelogs/vX.Y.Z.md` for the release, then prepend the same entry
160
+ (or a one-line summary + link) into root `CHANGELOG.md`'s rolling window
160
161
  </step>
161
162
 
162
163
  <step name="developer_experience">
@@ -82,5 +82,5 @@ Report to user with:
82
82
  - ALWAYS attribute responses to their source model
83
83
  - Maximum 2000 tokens per external prompt (cost control)
84
84
  - Maximum 3 consultations per session (rate limiting)
85
- - Log every external call in token-ledger.jsonl
85
+ - Log every external call in token-usage.jsonl
86
86
  </critical_rules>
@@ -8,7 +8,7 @@ color: blue
8
8
  <role>
9
9
  You are the MindForge Release Manager. You own the transition from "Verification" to "Production."
10
10
  Your job is to ensure that MindForge versions are meaningful, stable, and perfectly documented.
11
- You are the final gatekeeper of the `CHANGELOG.md` and version tags.
11
+ You are the final gatekeeper of the `CHANGELOG.md` rolling window, the `changelogs/` archive, and version tags.
12
12
  </role>
13
13
 
14
14
  <why_this_matters>
@@ -41,7 +41,9 @@ Check `STATE.md` to ensure all active workstreams are merged or paused.
41
41
  <step name="changelog_synthesis">
42
42
  Ingest the `SUMMARY.md` files from all completed phases.
43
43
  Group changes into: Added, Changed, Fixed, and Security.
44
- Write the entry to `CHANGELOG.md` using the Keep a Changelog standard.
44
+ Create `changelogs/vX.Y.Z.md` for the new release using the Keep a Changelog standard,
45
+ then prepend the same entry (or a one-line summary + link) to root `CHANGELOG.md`,
46
+ trimming the oldest entry if the rolling window exceeds 10 versions.
45
47
  </step>
46
48
 
47
49
  <step name="version_bumping">
@@ -107,7 +109,7 @@ Draft the Pull Request (PR) or Release Note description.
107
109
 
108
110
  <success_criteria>
109
111
  - [ ] Version bump follows SemVer
110
- - [ ] CHANGELOG.md updated and logically grouped
112
+ - [ ] changelogs/vX.Y.Z.md created and CHANGELOG.md rolling window updated (logically grouped)
111
113
  - [ ] All verification docs (UAT/Security) reviewed
112
114
  - [ ] Git tag created or staged
113
115
  - [ ] PR description finalized
@@ -62,7 +62,7 @@ for cost-performance tradeoffs, or when budget limits are approaching.
62
62
  ### Budget Monitoring
63
63
 
64
64
  Check budget status regularly:
65
- - Session budget remaining: from token-ledger.jsonl
65
+ - Session budget remaining: from token-usage.jsonl
66
66
  - Warning threshold: `[COST_WARN_USD]` from config
67
67
  - Hard limit: `[COST_HARD_LIMIT_USD]` from config
68
68
 
@@ -72,12 +72,12 @@ Check budget status regularly:
72
72
  - Never exceed hard limit without explicit user approval
73
73
 
74
74
  ### After any task
75
- - Log actual model used + tokens consumed to token-ledger.jsonl
75
+ - Log actual model used + tokens consumed to token-usage.jsonl
76
76
  - Compare actual vs optimal tier (for future routing accuracy)
77
77
  - Report cost in session summary
78
78
 
79
79
  ## Self-check before task completion
80
80
  - [ ] Did I log the model routing decision with rationale?
81
- - [ ] Did I record actual token usage in token-ledger.jsonl?
81
+ - [ ] Did I record actual token usage in token-usage.jsonl?
82
82
  - [ ] Did I check remaining budget against session/project limits?
83
83
  - [ ] Did I flag any tasks where a cheaper model could have been used?
@@ -75,7 +75,10 @@ export function verifyAccessToken(token: string): TokenPayload { ... }
75
75
  ```
76
76
 
77
77
  ## Changelog discipline
78
- Every user-visible change must appear in CHANGELOG.md before release.
78
+ Every user-visible change must appear in the changelog before release: create
79
+ `changelogs/vX.Y.Z.md` for the new release, then prepend the same entry (or a
80
+ one-line summary + link) into root `CHANGELOG.md`'s rolling window, dropping
81
+ the oldest entry if the window exceeds 10 versions.
79
82
  Format follows Keep a Changelog (keepachangelog.com).
80
83
  Categories: Added, Changed, Deprecated, Removed, Fixed, Security.
81
84
 
@@ -57,7 +57,7 @@ multiple AI providers, or when the user explicitly requests cross-model consulta
57
57
  ```
58
58
 
59
59
  ### During consultation
60
- - Log every external call in token-ledger.jsonl (model, tokens, cost)
60
+ - Log every external call in token-usage.jsonl (model, tokens, cost)
61
61
  - Never send more than 2000 tokens to external models per consultation
62
62
  - If a model is unavailable: skip it, note in output, continue with available models
63
63
  - Respect rate limits — max 3 consultations per session
@@ -70,6 +70,6 @@ multiple AI providers, or when the user explicitly requests cross-model consulta
70
70
 
71
71
  ## Self-check before task completion
72
72
  - [ ] Did I sanitize the prompt before sending to external models?
73
- - [ ] Did I log every external call in token-ledger.jsonl?
73
+ - [ ] Did I log every external call in token-usage.jsonl?
74
74
  - [ ] Did I attribute responses to their source model (no unattributed blending)?
75
75
  - [ ] Did I remind the user that external opinions are advisory?