mindforge-cc 11.9.1 → 11.9.3

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 (121) hide show
  1. package/.agent/CLAUDE.md +37 -13
  2. package/.agent/hooks/mindforge-block-no-verify.js +61 -13
  3. package/.agent/hooks/mindforge-config-protection.js +82 -3
  4. package/.agent/hooks/mindforge-context-monitor.js +1 -1
  5. package/.agent/hooks/mindforge-workflow-guard.js +2 -2
  6. package/.agent/hooks/run-with-flags.js +190 -20
  7. package/.agent/mindforge/browse.md +2 -2
  8. package/.agent/mindforge/checkpoint.md +1 -1
  9. package/.agent/mindforge/consult.md +1 -1
  10. package/.agent/mindforge/cost-report.md +1 -1
  11. package/.agent/mindforge/harness-audit.md +1 -1
  12. package/.agent/mindforge/orch-add-feature.md +1 -1
  13. package/.agent/mindforge/orch-build-mvp.md +1 -1
  14. package/.agent/mindforge/orch-change-feature.md +1 -1
  15. package/.agent/mindforge/orch-fix-defect.md +1 -1
  16. package/.agent/mindforge/orch-refine-code.md +1 -1
  17. package/.agent/mindforge/qa.md +2 -2
  18. package/.claude/CLAUDE.md +37 -13
  19. package/.claude/commands/mindforge/browse.md +2 -2
  20. package/.claude/commands/mindforge/checkpoint.md +1 -1
  21. package/.claude/commands/mindforge/consult.md +1 -1
  22. package/.claude/commands/mindforge/cost-report.md +1 -1
  23. package/.claude/commands/mindforge/harness-audit.md +1 -1
  24. package/.claude/commands/mindforge/orch-add-feature.md +1 -1
  25. package/.claude/commands/mindforge/orch-build-mvp.md +1 -1
  26. package/.claude/commands/mindforge/orch-change-feature.md +1 -1
  27. package/.claude/commands/mindforge/orch-fix-defect.md +1 -1
  28. package/.claude/commands/mindforge/orch-refine-code.md +1 -1
  29. package/.claude/commands/mindforge/qa.md +2 -2
  30. package/.mindforge/MINDFORGE-SCHEMA.json +126 -13
  31. package/.mindforge/config.json +4 -4
  32. package/.mindforge/engine/autonomous/headless-adapter.md +2 -2
  33. package/.mindforge/engine/cost-tracking/router.md +1 -1
  34. package/.mindforge/engine/cost-tracking/token-ledger.md +21 -24
  35. package/.mindforge/engine/temporal-protocol.md +2 -2
  36. package/.mindforge/governance/change-classifier.md +20 -4
  37. package/.mindforge/memory/sync-manifest.json +1 -1
  38. package/.mindforge/metrics/METRICS-SCHEMA.md +13 -4
  39. package/.mindforge/personas/cost-optimizer.md +2 -2
  40. package/.mindforge/personas/multi-model-bridge.md +1 -1
  41. package/.mindforge/skills/agent-architecture-audit/SKILL.md +2 -2
  42. package/.mindforge/skills/cost-aware-routing/SKILL.md +3 -3
  43. package/.mindforge/skills/multi-llm-consult/SKILL.md +2 -2
  44. package/.mindforge/skills/orch-pipeline/SKILL.md +4 -4
  45. package/CHANGELOG.md +402 -0
  46. package/MINDFORGE.md +13 -6
  47. package/README.md +51 -2
  48. package/RELEASENOTES.md +55 -2
  49. package/SECURITY.md +22 -3
  50. package/bin/autonomous/audit-writer.js +48 -33
  51. package/bin/autonomous/auto-runner.js +65 -2
  52. package/bin/change-classifier.js +151 -16
  53. package/bin/dashboard/api-router.js +28 -47
  54. package/bin/dashboard/error-response.js +44 -0
  55. package/bin/dashboard/frontend/app.js +429 -0
  56. package/bin/dashboard/frontend/index.html +14 -390
  57. package/bin/dashboard/metrics-aggregator.js +75 -30
  58. package/bin/dashboard/revops-api.js +12 -2
  59. package/bin/dashboard/server.js +245 -6
  60. package/bin/dashboard/sse-bridge.js +11 -8
  61. package/bin/dashboard/temporal-api.js +11 -5
  62. package/bin/engine/remediation-engine.js +12 -1
  63. package/bin/engine/sre-manager.js +1 -1
  64. package/bin/engine/temporal-cli.js +56 -6
  65. package/bin/engine/temporal-hub.js +41 -9
  66. package/bin/engine/verification-runner.js +134 -17
  67. package/bin/engine/verify-cli.js +25 -7
  68. package/bin/eval/eval-harness.js +212 -1
  69. package/bin/eval/golden-set-retrieval.json +9 -0
  70. package/bin/governance/approval-record.js +147 -0
  71. package/bin/governance/approve.js +12 -7
  72. package/bin/governance/policy-engine.js +41 -3
  73. package/bin/governance/policy-gate-hardened.js +36 -1
  74. package/bin/governance/verify-approvals.js +163 -0
  75. package/bin/harness-audit.js +224 -10
  76. package/bin/hindsight-injector.js +8 -2
  77. package/bin/hooks/instinct-capture-hook.js +19 -5
  78. package/bin/install.js +63 -3
  79. package/bin/installer/harness-adapter-compliance.js +339 -28
  80. package/bin/installer/hook-registration.js +504 -0
  81. package/bin/installer-core.js +451 -63
  82. package/bin/learning/instinct-cli.js +14 -24
  83. package/bin/memory/knowledge-capture.js +23 -3
  84. package/bin/memory/knowledge-graph.js +70 -31
  85. package/bin/memory/vector-hub.js +500 -44
  86. package/bin/migrations/0.6.0-to-1.0.0.js +30 -25
  87. package/bin/migrations/1.0.0-to-2.0.0.js +22 -23
  88. package/bin/mindforge-cli.js +110 -17
  89. package/bin/models/cost-tracker.js +126 -29
  90. package/bin/models/model-client.js +6 -1
  91. package/bin/models/model-router.js +28 -7
  92. package/bin/models/usage-record.js +71 -0
  93. package/bin/revops/debt-monitor.js +57 -13
  94. package/bin/security/trust-gate-hook.js +50 -6
  95. package/bin/skill-validator.js +6 -1
  96. package/bin/skills-builder/skill-scorer.js +46 -6
  97. package/bin/updater/self-update.js +6 -1
  98. package/bin/updater/version-comparator.js +21 -1
  99. package/bin/utils/file-lock.js +106 -0
  100. package/bin/utils/mindforge-params.js +124 -0
  101. package/bin/utils/mindforge-version.js +99 -0
  102. package/bin/utils/redact-secrets.js +106 -0
  103. package/bin/validate-config.js +75 -17
  104. package/bin/wizard/setup-wizard.js +4 -1
  105. package/bin/wizard/theme.js +9 -1
  106. package/changelogs/index.json +11 -9
  107. package/changelogs/v11.9.2.md +209 -0
  108. package/changelogs/v11.9.3.md +195 -0
  109. package/docs/References/config-reference.md +76 -14
  110. package/docs/References/sdk-api.md +1 -1
  111. package/docs/Templates/Codebase/architecture.md +1 -1
  112. package/docs/commands-reference.md +4 -5
  113. package/docs/faq.md +25 -5
  114. package/docs/getting-started.md +3 -3
  115. package/docs/sdk-reference.md +15 -7
  116. package/docs/troubleshooting.md +10 -6
  117. package/docs/user-guide.md +14 -14
  118. package/examples/sdk-integration/README.md +1 -1
  119. package/package.json +10 -4
  120. package/subagents/.claude-plugin/marketplace.json +1 -1
  121. package/bin/dashboard/approval-handler.js +0 -136
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mindforge-cc",
3
- "version": "11.9.1",
4
- "description": "MindForge \u2014 Sovereign Agentic Intelligence Framework. Sovereign Stability: Production-Hardened Agentic Intelligence (v11)",
3
+ "version": "11.9.3",
4
+ "description": "MindForge — Sovereign Agentic Intelligence Framework. Sovereign Stability: Production-Hardened Agentic Intelligence (v11)",
5
5
  "bin": {
6
6
  "mindforge-cc": "bin/install.js",
7
7
  "mindforge": "bin/mindforge-cli.js"
@@ -53,7 +53,8 @@
53
53
  "MINDFORGE.md",
54
54
  "README.md",
55
55
  "RELEASENOTES.md",
56
- "SECURITY.md"
56
+ "SECURITY.md",
57
+ "!**/*.lock"
57
58
  ],
58
59
  "scripts": {
59
60
  "test": "node scripts/ci/validate-assets.js && node tests/run-all.js",
@@ -61,11 +62,16 @@
61
62
  "coverage": "npx c8 node tests/run-all.js",
62
63
  "lint": "eslint .",
63
64
  "harness:audit": "node bin/harness-audit.js",
65
+ "harness:gate": "node bin/harness-audit.js --min-score 76 --fail-on-findings",
66
+ "harness:gate:install": "node scripts/ci/harness-gate-install.js",
64
67
  "harness:compliance": "node bin/installer/harness-adapter-compliance.js --check",
65
68
  "release:ready": "node bin/utils/readiness-gate.js release",
69
+ "version:check": "node scripts/sync-version.js --check",
66
70
  "validate:assets": "node scripts/ci/validate-assets.js",
71
+ "eval:retrieval": "node bin/eval/eval-harness.js --set golden-set-retrieval.json --min-recall 0.55",
67
72
  "commit": "cz",
68
- "prepare": "husky"
73
+ "prepare": "husky",
74
+ "verify:pinning": "node scripts/ci/verify-action-pinning.js"
69
75
  },
70
76
  "keywords": [
71
77
  "claude-code",
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "version": "1.0.3",
9
- "description": "Curated collection of 154 specialized Claude Code subagents organized into 10 focused categories"
9
+ "description": "Curated collection of 164 specialized Claude Code subagents organized into 10 focused categories"
10
10
  },
11
11
  "plugins": [
12
12
  {
@@ -1,136 +0,0 @@
1
- /**
2
- * MindForge v2 — Approval Handler
3
- * Handles POST /api/approve/:id — approve or reject governance requests.
4
- * Reads/writes APPROVAL-*.json files in .planning/approvals/
5
- */
6
- 'use strict';
7
-
8
- const fs = require('fs');
9
- const path = require('path');
10
-
11
- // Paths resolved lazily for testing
12
- const getPaths = () => ({
13
- approvals: path.join(process.cwd(), '.planning', 'approvals'),
14
- audit: path.join(process.cwd(), '.planning', 'AUDIT.jsonl'),
15
- });
16
-
17
- /**
18
- * Process an approval decision from the dashboard.
19
- * @param {string} approvalId - The APPROVAL UUID
20
- * @param {string} decision - 'approve' or 'reject'
21
- * @param {string} comment - Optional comment
22
- * @param {string} approver - Approver identifier (email or name)
23
- * @returns {{ success, decision, message }}
24
- */
25
- function processDecision(approvalId, decision, comment, approver, confirmationId = null) {
26
- // Input validation
27
- if (!approvalId || typeof approvalId !== 'string') {
28
- return { success: false, error: 'Invalid approval ID' };
29
- }
30
-
31
- // Sanitize approvalId — only allow UUID characters
32
- if (!/^[a-f0-9-]{36}$/.test(approvalId)) {
33
- return { success: false, error: 'Malformed approval ID format' };
34
- }
35
-
36
- if (!['approve', 'reject'].includes(decision)) {
37
- return { success: false, error: 'Decision must be "approve" or "reject"' };
38
- }
39
-
40
- // Find the approval file
41
- const paths = getPaths();
42
- const filePath = path.join(paths.approvals, `APPROVAL-${approvalId}.json`);
43
- if (!fs.existsSync(filePath)) {
44
- return { success: false, error: `Approval not found: ${approvalId}` };
45
- }
46
-
47
- let approval;
48
- try {
49
- approval = JSON.parse(fs.readFileSync(filePath, 'utf8'));
50
- } catch {
51
- return { success: false, error: 'Cannot parse approval file' };
52
- }
53
-
54
- // Validate approval is still pending
55
- if (approval.status !== 'pending') {
56
- return { success: false, error: `Approval already ${approval.status}` };
57
- }
58
-
59
- // Check expiry
60
- if (approval.expires_at && new Date(approval.expires_at) < new Date()) {
61
- return { success: false, error: 'Approval has expired' };
62
- }
63
-
64
- // TIER 3 CONFIRMATION — require typing the plan ID
65
- if (approval.tier === 3 && decision === 'approve') {
66
- const expectedConfirmation = `${approval.phase}-${approval.plan}`;
67
- if (!confirmationId || confirmationId.trim() !== expectedConfirmation) {
68
- return {
69
- success: false,
70
- error: `Tier 3 approval requires typing the plan ID "${expectedConfirmation}" to confirm.`,
71
- confirmation_required: true,
72
- expected: expectedConfirmation,
73
- tier3_warning: 'This is a Tier 3 change (auth/payment/PII). Review the code diff before approving.',
74
- };
75
- }
76
- }
77
-
78
- // Write AUDIT entry FIRST (before updating file)
79
- writeAuditEntry({
80
- id: require('crypto').randomBytes(8).toString('hex'),
81
- timestamp: new Date().toISOString(),
82
- event: decision === 'approve' ? 'approval_granted' : 'approval_rejected',
83
- approval_id: approvalId,
84
- tier: approval.tier,
85
- phase: approval.phase,
86
- plan: approval.plan,
87
- resolved_by: approver || 'dashboard',
88
- comment: comment || null,
89
- agent: 'mindforge-dashboard',
90
- session_id: 'dashboard',
91
- });
92
-
93
- // Update approval file
94
- const updated = {
95
- ...approval,
96
- status: decision === 'approve' ? 'approved' : 'rejected',
97
- resolved_at: new Date().toISOString(),
98
- resolved_by: approver || 'dashboard',
99
- comment: comment || null,
100
- resolution_channel: 'mindforge-dashboard',
101
- };
102
-
103
- fs.writeFileSync(filePath, JSON.stringify(updated, null, 2));
104
-
105
- return {
106
- success: true,
107
- decision,
108
- approval_id: approvalId,
109
- tier: approval.tier,
110
- message: `${approval.tier === 3 ? 'Tier 3' : 'Tier 2'} approval ${decision}d for Plan ${approval.phase}-${approval.plan}`,
111
- };
112
- }
113
-
114
- function writeAuditEntry(entry) {
115
- try {
116
- const paths = getPaths();
117
- if (!fs.existsSync(path.dirname(paths.audit))) return;
118
- // UC-04b: unified, hash-chained, durable append into the single verifiable chain.
119
- const { appendAuditEntrySync } = require('../autonomous/audit-writer');
120
- appendAuditEntrySync(paths.audit, entry);
121
- } catch { /* ignore AUDIT write failures */ }
122
- }
123
-
124
- function listApprovals() {
125
- const paths = getPaths();
126
- if (!fs.existsSync(paths.approvals)) return [];
127
- return fs.readdirSync(paths.approvals)
128
- .filter(f => f.startsWith('APPROVAL-') && f.endsWith('.json'))
129
- .map(f => {
130
- try { return JSON.parse(fs.readFileSync(path.join(paths.approvals, f), 'utf8')); }
131
- catch { return null; }
132
- })
133
- .filter(Boolean);
134
- }
135
-
136
- module.exports = { processDecision, listApprovals };