mindforge-cc 6.6.0 → 6.7.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.
- package/.mindforge/memory/knowledge-base.jsonl +4 -0
- package/CHANGELOG.md +20 -0
- package/bin/autonomous/auto-runner.js +5 -2
- package/bin/memory/knowledge-capture.js +47 -0
- package/bin/memory/knowledge-store.js +6 -0
- package/bin/memory/pillar-health-tracker.js +63 -0
- package/package.json +1 -1
- package/.planning/AUDIT.jsonl +0 -2
|
@@ -9,3 +9,7 @@
|
|
|
9
9
|
{"id":"a9878977-cb7c-4dcf-8161-760ffd5e7de9","timestamp":"2026-03-22T17:25:37.673Z","type":"code_pattern","topic":"React Memo","content":"Use React.memo to prevent re-renders.","source":"manual","project":"[Project Name]","confidence":0.65,"tags":["ui"],"linked_adrs":[],"times_referenced":1,"last_referenced":"2026-03-25T17:42:57.297Z","deprecated":false,"deprecated_by":null}
|
|
10
10
|
{"id":"a2d4b3a6-fdaa-4c9a-b654-286d9ea133e2","timestamp":"2026-03-22T17:25:37.670Z","type":"domain_knowledge","topic":"Auth with JWT","content":"Secure JWT with httpOnly cookies.","source":"manual","project":"[Project Name]","confidence":0.8500000000000001,"tags":["auth"],"linked_adrs":[],"times_referenced":1,"last_referenced":"2026-03-25T17:42:57.298Z","deprecated":false,"deprecated_by":null}
|
|
11
11
|
{"id":"6c1f0f31-3903-4b95-bae8-5473ffbec9eb","timestamp":"2026-03-22T17:25:37.671Z","type":"domain_knowledge","topic":"Database SQL","content":"Use indexed columns for fast queries.","source":"manual","project":"[Project Name]","confidence":0.75,"tags":["db"],"linked_adrs":[],"times_referenced":1,"last_referenced":"2026-03-25T17:42:57.299Z","deprecated":false,"deprecated_by":null}
|
|
12
|
+
{"id":"f3df4851-b705-429d-a3b1-2c90eac2d73c","timestamp":"2026-04-08T19:47:41.444Z","type":"pillar_health","topic":"Phase 99 Architectural Health","content":"RSA Alignment: 0.785\nIDC Upgrades: 1","source":"PillarHealth Analysis (Phase 99)","project":"[Project Name]","confidence":1,"tags":[],"linked_adrs":[],"times_referenced":0,"last_referenced":null,"deprecated":false,"deprecated_by":null,"rsa_avg":0.785,"idc_avg":1}
|
|
13
|
+
{"id":"a24f9667-b90a-49fe-90cd-9fe545ce98fb","timestamp":"2026-04-08T19:47:41.446Z","type":"stability_pattern","topic":"REQ-02 Alignment Recovery","content":"Synthesized refocus instruction: STAY ON TRACK WITH AUTH","source":"SCS Synthesis (Phase 99)","project":"[Project Name]","confidence":0.72,"tags":[],"linked_adrs":[],"times_referenced":0,"last_referenced":null,"deprecated":false,"deprecated_by":null,"req_id":"REQ-02","efficacy_score":0.72}
|
|
14
|
+
{"id":"f3df4851-b705-429d-a3b1-2c90eac2d73c","timestamp":"2026-04-08T19:47:41.444Z","type":"pillar_health","topic":"Phase 99 Architectural Health","content":"RSA Alignment: 0.785\nIDC Upgrades: 1","source":"PillarHealth Analysis (Phase 99)","project":"[Project Name]","confidence":1,"tags":[],"linked_adrs":[],"times_referenced":1,"last_referenced":"2026-04-08T19:48:13.482Z","deprecated":false,"deprecated_by":null,"rsa_avg":0.785,"idc_avg":1}
|
|
15
|
+
{"id":"a24f9667-b90a-49fe-90cd-9fe545ce98fb","timestamp":"2026-04-08T19:47:41.446Z","type":"stability_pattern","topic":"REQ-02 Alignment Recovery","content":"Synthesized refocus instruction: STAY ON TRACK WITH AUTH","source":"SCS Synthesis (Phase 99)","project":"[Project Name]","confidence":0.77,"tags":[],"linked_adrs":[],"times_referenced":1,"last_referenced":"2026-04-08T19:48:13.484Z","deprecated":false,"deprecated_by":null,"req_id":"REQ-02","efficacy_score":0.72}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [6.7.0] - 2026-04-09
|
|
2
|
+
|
|
3
|
+
### Added (v6.7.0: Federated Intelligence Mesh - FIM Expansion)
|
|
4
|
+
|
|
5
|
+
- **Architectural Health Tracking**: Aggregates RSA and IDC scores into collective project health metrics via `PillarHealthTracker`.
|
|
6
|
+
- **Stability Pattern Extraction**: Captures high-efficacy SCS homing instructions as durable, sharable knowledge entries (`stability_pattern`).
|
|
7
|
+
- **AutoRunner Lifecycle Hooks**: Automated capture at phase completion for organizational sync.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## [6.6.0] - 2026-04-08
|
|
12
|
+
|
|
13
|
+
### Added (v6.6.0: Self-Corrective Synthesis - SCS)
|
|
14
|
+
|
|
15
|
+
- **Autonomous Self-Healing**: Integrated `SelfCorrectiveSynthesizer` into the `AutoRunner` wave loop.
|
|
16
|
+
- **Reasoning Drift Recovery**: Triggered when Mission Fidelity (RSA) drops below 0.50, synthesizing a "Homing Instruction" anchored to specific requirements.
|
|
17
|
+
- **Homing Signal Injection**: Automatically injects high-density refocus signals into the wave context to recover mission fidelity.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
1
21
|
## [6.5.0] - 2026-04-08
|
|
2
22
|
|
|
3
23
|
### Added (v6.5.0: Reason-Source Alignment - RSA)
|
|
@@ -204,8 +204,11 @@ class AutoRunner {
|
|
|
204
204
|
// Auto-capture knowledge from completed phase (ADRs, findings)
|
|
205
205
|
try {
|
|
206
206
|
const captured = KnowledgeCapture.captureFromPhaseCompletion(this.phase);
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
const stability = KnowledgeCapture.captureArchitecturalStability(this.phase);
|
|
208
|
+
|
|
209
|
+
const total = captured.length + stability.length;
|
|
210
|
+
if (total > 0) {
|
|
211
|
+
console.log(`🧠 Knowledge Graph: Captured ${total} new insights (Patterns: ${stability.length}) from phase completion.`);
|
|
209
212
|
}
|
|
210
213
|
} catch (err) {
|
|
211
214
|
console.error('⚠️ Knowledge Capture failed:', err.message);
|
|
@@ -11,6 +11,7 @@ const Store = require('./knowledge-store');
|
|
|
11
11
|
const Indexer = require('./knowledge-indexer');
|
|
12
12
|
const Graph = require('./knowledge-graph');
|
|
13
13
|
const Embedder = require('./embedding-engine');
|
|
14
|
+
const PillarHealth = require('./pillar-health-tracker');
|
|
14
15
|
|
|
15
16
|
const PLANNING_DIR = path.join(process.cwd(), '.planning');
|
|
16
17
|
const DECISIONS_DIR = path.join(PLANNING_DIR, 'decisions');
|
|
@@ -383,12 +384,58 @@ function inferBugCategory(text) {
|
|
|
383
384
|
return 'general';
|
|
384
385
|
}
|
|
385
386
|
|
|
387
|
+
/**
|
|
388
|
+
* Capture architectural stability from audit traces.
|
|
389
|
+
*/
|
|
390
|
+
function captureArchitecturalStability(phaseNum) {
|
|
391
|
+
const auditPath = path.join(PLANNING_DIR, 'AUDIT.jsonl');
|
|
392
|
+
if (!fs.existsSync(auditPath)) return [];
|
|
393
|
+
|
|
394
|
+
const summary = PillarHealth.summarizePhase(auditPath);
|
|
395
|
+
if (!summary) return [];
|
|
396
|
+
|
|
397
|
+
const project = getProjectName();
|
|
398
|
+
const captured = [];
|
|
399
|
+
|
|
400
|
+
// 1. Capture overall health
|
|
401
|
+
const healthResult = deduplicateOrAdd({
|
|
402
|
+
type: 'pillar_health',
|
|
403
|
+
topic: `Phase ${phaseNum} Architectural Health`,
|
|
404
|
+
content: `RSA Alignment: ${summary.avgRsa}\nIDC Upgrades: ${summary.idcCount}`,
|
|
405
|
+
source: `PillarHealth Analysis (Phase ${phaseNum})`,
|
|
406
|
+
project,
|
|
407
|
+
confidence: 1.0,
|
|
408
|
+
rsa_avg: summary.avgRsa,
|
|
409
|
+
idc_avg: summary.idcCount,
|
|
410
|
+
});
|
|
411
|
+
captured.push(healthResult);
|
|
412
|
+
|
|
413
|
+
// 2. Capture stability patterns (Homing signals)
|
|
414
|
+
const templates = PillarHealth.getHighEfficacyTemplates(summary.stabilityPatterns);
|
|
415
|
+
for (const t of templates) {
|
|
416
|
+
const res = deduplicateOrAdd({
|
|
417
|
+
type: 'stability_pattern',
|
|
418
|
+
topic: `${t.req_id} Alignment Recovery`,
|
|
419
|
+
content: `Synthesized refocus instruction: ${t.instruction}`,
|
|
420
|
+
source: `SCS Synthesis (Phase ${phaseNum})`,
|
|
421
|
+
project,
|
|
422
|
+
confidence: t.efficacy,
|
|
423
|
+
req_id: t.req_id,
|
|
424
|
+
efficacy_score: t.efficacy,
|
|
425
|
+
});
|
|
426
|
+
captured.push(res);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return captured;
|
|
430
|
+
}
|
|
431
|
+
|
|
386
432
|
module.exports = {
|
|
387
433
|
captureFromPhaseCompletion,
|
|
388
434
|
captureFromCompaction,
|
|
389
435
|
captureFromDebugReport,
|
|
390
436
|
captureFromRetrospective,
|
|
391
437
|
captureFromCrossReview,
|
|
438
|
+
captureArchitecturalStability,
|
|
392
439
|
deduplicateOrAdd,
|
|
393
440
|
inferTagsFromText,
|
|
394
441
|
inferBugCategory,
|
|
@@ -129,6 +129,12 @@ function add(entry) {
|
|
|
129
129
|
...(entry.strength && { strength: entry.strength }),
|
|
130
130
|
...(entry.domain && { domain: entry.domain }),
|
|
131
131
|
...(entry.tech_stack && { tech_stack: entry.tech_stack }),
|
|
132
|
+
// MindForge v6: Architectural Health & Stability
|
|
133
|
+
...(entry.req_id && { req_id: entry.req_id }),
|
|
134
|
+
...(entry.efficacy_score && { efficacy_score: entry.efficacy_score }),
|
|
135
|
+
...(entry.rsa_avg && { rsa_avg: entry.rsa_avg }),
|
|
136
|
+
...(entry.idc_avg && { idc_avg: entry.idc_avg }),
|
|
137
|
+
...(entry.ceg_avg && { ceg_avg: entry.ceg_avg }),
|
|
132
138
|
};
|
|
133
139
|
|
|
134
140
|
const filePath = getFilePath(entry.type);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MindForge v6.7.0 — Pillar Health Tracker
|
|
3
|
+
* Component: Architectural Health & Stability (Pillar XVIII)
|
|
4
|
+
*
|
|
5
|
+
* Aggregates scores from RSA, SCS, and IDC pillars to track project
|
|
6
|
+
* stability and identify requirement-stagnation patterns.
|
|
7
|
+
*/
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
|
|
12
|
+
class PillarHealthTracker {
|
|
13
|
+
/**
|
|
14
|
+
* Summarizes the health of a completed phase based on the audit trail.
|
|
15
|
+
* @param {string} auditPath - Path to AUDIT.jsonl
|
|
16
|
+
*/
|
|
17
|
+
summarizePhase(auditPath) {
|
|
18
|
+
if (!fs.existsSync(auditPath)) return null;
|
|
19
|
+
|
|
20
|
+
const lines = fs.readFileSync(auditPath, 'utf8').trim().split('\n');
|
|
21
|
+
const events = lines.map(l => JSON.parse(l));
|
|
22
|
+
|
|
23
|
+
// 1. RSA (Mission Fidelity) Analysis
|
|
24
|
+
const rsaEvents = events.filter(e => e.type === 'mission_fidelity' || e.event === 'scs_homing_injected');
|
|
25
|
+
const avgRsa = rsaEvents.length > 0
|
|
26
|
+
? rsaEvents.reduce((s, e) => s + (e.alignment?.confidence || e.confidence || 0), 0) / rsaEvents.length
|
|
27
|
+
: 1.0;
|
|
28
|
+
|
|
29
|
+
// 2. IDC (Intelligence Drift) Analysis
|
|
30
|
+
const idcEvents = events.filter(e => e.event === 'intelligence_upgrade_signalled');
|
|
31
|
+
const idcScore = idcEvents.length; // Count of upgrades as drift indicator
|
|
32
|
+
|
|
33
|
+
// 3. Extract Stability Patterns (Successful SCS Homing)
|
|
34
|
+
const stabilityPatterns = events
|
|
35
|
+
.filter(e => e.event === 'scs_homing_injected' && e.confidence > 0.6)
|
|
36
|
+
.map(e => ({
|
|
37
|
+
req_id: e.req_id,
|
|
38
|
+
instruction: e.instruction,
|
|
39
|
+
efficacy: e.confidence
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
avgRsa: parseFloat(avgRsa.toFixed(4)),
|
|
44
|
+
idcCount: idcScore,
|
|
45
|
+
stabilityPatterns
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Aggregates stability patterns by requirement ID.
|
|
51
|
+
*/
|
|
52
|
+
getHighEfficacyTemplates(stabilityPatterns) {
|
|
53
|
+
const byId = new Map();
|
|
54
|
+
for (const p of stabilityPatterns) {
|
|
55
|
+
if (!byId.has(p.req_id) || byId.get(p.req_id).efficacy < p.efficacy) {
|
|
56
|
+
byId.set(p.req_id, p);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return Array.from(byId.values());
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
module.exports = new PillarHealthTracker();
|
package/package.json
CHANGED
package/.planning/AUDIT.jsonl
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
{"event":"INIT","date":"2026-03-25T00:00:00Z","summary":"MindForge Project Initialized"}
|
|
2
|
-
{"id":"36525e1d9da1b674","timestamp":"2026-03-26T19:30:32.054Z","event":"hindsight_injected","target_id":"test-audit-001","description":"Recovering from $T_1$ failure","agent":"temporal-hub"}
|