mindforge-cc 8.1.1 โ 9.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.
- package/.claude/settings.local.json +16 -0
- package/.mindforge/celestial.db +0 -0
- package/.mindforge/config.json +7 -7
- package/.planning/REQUIREMENTS.md +13 -1
- package/.planning/STATE.md +13 -8
- package/.planning/jira-sync.json +1 -5
- package/.planning/slack-threads.json +1 -3
- package/CHANGELOG.md +39 -0
- package/LICENSE +1 -1
- package/MINDFORGE.md +14 -13
- package/README.md +9 -2
- package/RELEASENOTES.md +55 -0
- package/bin/autonomous/auto-runner.js +307 -14
- package/bin/engine/learning-manager.js +4 -2
- package/bin/governance/impact-analyzer.js +4 -2
- package/bin/installer-core.js +18 -2
- package/bin/memory/vector-hub.js +148 -16
- package/bin/migrations/migrate.js +1 -0
- package/bin/migrations/v9-unified-memory.js +98 -0
- package/bin/models/cloud-broker.js +7 -6
- package/bin/models/model-broker.js +6 -5
- package/bin/models/model-client.js +12 -8
- package/bin/models/model-router.js +13 -11
- package/bin/sre/adversarial-sre.js +109 -0
- package/bin/sre/sentinel.js +128 -0
- package/bin/sre/shadow-mirror.js +122 -0
- package/bin/sre/sli-verifier.js +81 -0
- package/docs/Context/Master-Context.md +39 -2
- package/docs/PERSONAS.md +40 -0
- package/docs/architecture/V8-SRE.md +88 -0
- package/docs/architecture/V9-BEDROCK.md +162 -0
- package/docs/governance-guide.md +52 -17
- package/package.json +2 -2
- package/.mindforge/bypasses.json +0 -8
- package/.mindforge/memory/decision-library.jsonl +0 -0
- package/.mindforge/memory/knowledge-base.jsonl +0 -15
- package/.mindforge/memory/pattern-library.jsonl +0 -1
- package/.mindforge/memory/team-preferences.jsonl +0 -5
- package/.mindforge/remediation-queue.json +0 -47
- package/.planning/AUDIT.jsonl +0 -45
- package/.planning/RISK-AUDIT.jsonl +0 -53
- package/.planning/ROI.jsonl +0 -2
- package/.planning/TEMPORAL-TEST.md +0 -1
- package/.planning/history/36525e1d9da1b674/ARCHITECTURE.md +0 -0
- package/.planning/history/36525e1d9da1b674/HANDOFF.json +0 -8
- package/.planning/history/36525e1d9da1b674/PROJECT.md +0 -33
- package/.planning/history/36525e1d9da1b674/RELEASE-CHECKLIST.md +0 -68
- package/.planning/history/36525e1d9da1b674/REQUIREMENTS.md +0 -0
- package/.planning/history/36525e1d9da1b674/ROADMAP.md +0 -12
- package/.planning/history/36525e1d9da1b674/SNAPSHOT-META.json +0 -18
- package/.planning/history/36525e1d9da1b674/STATE.md +0 -31
- package/.planning/history/36525e1d9da1b674/TEMPORAL-TEST.md +0 -1
- package/.planning/history/36525e1d9da1b674/jira-sync.json +0 -5
- package/.planning/history/36525e1d9da1b674/slack-threads.json +0 -3
- package/.planning/history/test-audit-001/ARCHITECTURE.md +0 -0
- package/.planning/history/test-audit-001/HANDOFF.json +0 -8
- package/.planning/history/test-audit-001/PROJECT.md +0 -33
- package/.planning/history/test-audit-001/RELEASE-CHECKLIST.md +0 -68
- package/.planning/history/test-audit-001/REQUIREMENTS.md +0 -0
- package/.planning/history/test-audit-001/ROADMAP.md +0 -12
- package/.planning/history/test-audit-001/SNAPSHOT-META.json +0 -17
- package/.planning/history/test-audit-001/STATE.md +0 -31
- package/.planning/history/test-audit-001/TEMPORAL-TEST.md +0 -1
- package/.planning/history/test-audit-001/jira-sync.json +0 -5
- package/.planning/history/test-audit-001/slack-threads.json +0 -3
- package/bin/engine/test-ceg.js +0 -59
- package/bin/engine/test-interlock.js +0 -40
- package/bin/engine/test-remediation.js +0 -61
- package/bin/engine/test-rsa.js +0 -64
- package/bin/engine/test-scs.js +0 -57
- package/bin/engine/test-v7-blueprint.js +0 -44
- package/bin/governance/test-config.js +0 -40
- package/bin/governance/test-crypto-pluggable.js +0 -50
- package/bin/governance/test-hardened-gate.js +0 -71
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# [Project Name]
|
|
2
|
-
|
|
3
|
-
> One sentence describing what this project does and for whom.
|
|
4
|
-
|
|
5
|
-
## Status
|
|
6
|
-
๐ง In development โ Phase 0 (not started)
|
|
7
|
-
|
|
8
|
-
## Problem statement
|
|
9
|
-
[What pain does this solve? Be specific.]
|
|
10
|
-
|
|
11
|
-
## Target users
|
|
12
|
-
[Who uses this? Describe them precisely. Avoid "developers" โ say "solo developers
|
|
13
|
-
building production apps with Claude Code who want structured AI workflows."]
|
|
14
|
-
|
|
15
|
-
## Tech stack
|
|
16
|
-
| Layer | Technology | Version | Rationale |
|
|
17
|
-
|------------|-------------|---------|----------------------------------|
|
|
18
|
-
| | | | |
|
|
19
|
-
|
|
20
|
-
## v1 Scope โ IN
|
|
21
|
-
- [ ] [Feature 1]
|
|
22
|
-
- [ ] [Feature 2]
|
|
23
|
-
|
|
24
|
-
## v1 Scope โ OUT (explicitly excluded)
|
|
25
|
-
- [Item 1] โ reason: [why not v1]
|
|
26
|
-
- [Item 2] โ reason: [why not v1]
|
|
27
|
-
|
|
28
|
-
## Success criteria
|
|
29
|
-
[How will you know v1 is done? Be specific and measurable.]
|
|
30
|
-
|
|
31
|
-
## Key constraints
|
|
32
|
-
- [Constraint 1]
|
|
33
|
-
- [Constraint 2]
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# MindForge v1.0.0 โ Release Checklist
|
|
2
|
-
|
|
3
|
-
Use this file to record verification results for the 50-point production
|
|
4
|
-
readiness checklist in `.mindforge/production/production-checklist.md`.
|
|
5
|
-
|
|
6
|
-
## Metadata
|
|
7
|
-
- Target version: v1.0.0
|
|
8
|
-
- Release date: 2026-03-22
|
|
9
|
-
- Release manager: [name]
|
|
10
|
-
|
|
11
|
-
## Verification log
|
|
12
|
-
| Item | Result | Verified by | Date | Notes |
|
|
13
|
-
|---|---|---|---|---|
|
|
14
|
-
| A01 | | | | |
|
|
15
|
-
| A02 | | | | |
|
|
16
|
-
| A03 | | | | |
|
|
17
|
-
| A04 | | | | |
|
|
18
|
-
| A05 | | | | |
|
|
19
|
-
| A06 | | | | |
|
|
20
|
-
| A07 | | | | |
|
|
21
|
-
| A08 | | | | |
|
|
22
|
-
| A09 | | | | |
|
|
23
|
-
| A10 | | | | |
|
|
24
|
-
| B01 | | | | |
|
|
25
|
-
| B02 | | | | |
|
|
26
|
-
| B03 | | | | |
|
|
27
|
-
| B04 | | | | |
|
|
28
|
-
| B05 | | | | |
|
|
29
|
-
| B06 | | | | |
|
|
30
|
-
| B07 | | | | |
|
|
31
|
-
| B08 | | | | |
|
|
32
|
-
| B09 | | | | |
|
|
33
|
-
| B10 | | | | |
|
|
34
|
-
| C01 | | | | |
|
|
35
|
-
| C02 | | | | |
|
|
36
|
-
| C03 | | | | |
|
|
37
|
-
| C04 | | | | |
|
|
38
|
-
| C05 | | | | |
|
|
39
|
-
| C06 | | | | |
|
|
40
|
-
| C07 | | | | |
|
|
41
|
-
| C08 | | | | |
|
|
42
|
-
| C09 | | | | |
|
|
43
|
-
| C10 | | | | |
|
|
44
|
-
| D01 | | | | |
|
|
45
|
-
| D02 | | | | |
|
|
46
|
-
| D03 | | | | |
|
|
47
|
-
| D04 | | | | |
|
|
48
|
-
| D05 | | | | |
|
|
49
|
-
| D06 | | | | |
|
|
50
|
-
| D07 | | | | |
|
|
51
|
-
| D08 | | | | |
|
|
52
|
-
| D09 | | | | |
|
|
53
|
-
| D10 | | | | |
|
|
54
|
-
| E01 | | | | |
|
|
55
|
-
| E02 | | | | |
|
|
56
|
-
| E03 | | | | |
|
|
57
|
-
| E04 | | | | |
|
|
58
|
-
| E05 | | | | |
|
|
59
|
-
| E06 | | | | |
|
|
60
|
-
| E07 | | | | |
|
|
61
|
-
| E08 | | | | |
|
|
62
|
-
| E09 | | | | |
|
|
63
|
-
| E10 | | | | |
|
|
64
|
-
| F01 | | | | |
|
|
65
|
-
| F02 | | | | |
|
|
66
|
-
| F03 | | | | |
|
|
67
|
-
| F04 | | | | |
|
|
68
|
-
| F05 | | | | |
|
|
File without changes
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "36525e1d9da1b674",
|
|
3
|
-
"timestamp": "2026-03-26T19:30:32.069Z",
|
|
4
|
-
"event": "hindsight_injected",
|
|
5
|
-
"target_id": "test-audit-001",
|
|
6
|
-
"files": [
|
|
7
|
-
"ARCHITECTURE.md",
|
|
8
|
-
"HANDOFF.json",
|
|
9
|
-
"PROJECT.md",
|
|
10
|
-
"RELEASE-CHECKLIST.md",
|
|
11
|
-
"REQUIREMENTS.md",
|
|
12
|
-
"ROADMAP.md",
|
|
13
|
-
"STATE.md",
|
|
14
|
-
"TEMPORAL-TEST.md",
|
|
15
|
-
"jira-sync.json",
|
|
16
|
-
"slack-threads.json"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# MindForge โ Project State
|
|
2
|
-
|
|
3
|
-
## Status
|
|
4
|
-
๐ด Not started
|
|
5
|
-
|
|
6
|
-
## IMPORTANT
|
|
7
|
-
HANDOFF.json is committed to git. Never write secrets or credentials into it.
|
|
8
|
-
Write "see .env" or "stored in secrets manager" if a note needs to reference credentials.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Current phase
|
|
12
|
-
None
|
|
13
|
-
|
|
14
|
-
## Last completed task
|
|
15
|
-
None โ project not yet initialised.
|
|
16
|
-
|
|
17
|
-
## Next action
|
|
18
|
-
Run `/mindforge:init-project` to initialise this project.
|
|
19
|
-
|
|
20
|
-
## Decisions made
|
|
21
|
-
None yet.
|
|
22
|
-
|
|
23
|
-
## Active blockers
|
|
24
|
-
None.
|
|
25
|
-
|
|
26
|
-
## Context for next session
|
|
27
|
-
Fresh MindForge install. No project has been initialised yet.
|
|
28
|
-
Start by running `/mindforge:init-project`.
|
|
29
|
-
|
|
30
|
-
## Last updated
|
|
31
|
-
[ISO 8601 timestamp on first use]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Initial State: $T_0$
|
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# [Project Name]
|
|
2
|
-
|
|
3
|
-
> One sentence describing what this project does and for whom.
|
|
4
|
-
|
|
5
|
-
## Status
|
|
6
|
-
๐ง In development โ Phase 0 (not started)
|
|
7
|
-
|
|
8
|
-
## Problem statement
|
|
9
|
-
[What pain does this solve? Be specific.]
|
|
10
|
-
|
|
11
|
-
## Target users
|
|
12
|
-
[Who uses this? Describe them precisely. Avoid "developers" โ say "solo developers
|
|
13
|
-
building production apps with Claude Code who want structured AI workflows."]
|
|
14
|
-
|
|
15
|
-
## Tech stack
|
|
16
|
-
| Layer | Technology | Version | Rationale |
|
|
17
|
-
|------------|-------------|---------|----------------------------------|
|
|
18
|
-
| | | | |
|
|
19
|
-
|
|
20
|
-
## v1 Scope โ IN
|
|
21
|
-
- [ ] [Feature 1]
|
|
22
|
-
- [ ] [Feature 2]
|
|
23
|
-
|
|
24
|
-
## v1 Scope โ OUT (explicitly excluded)
|
|
25
|
-
- [Item 1] โ reason: [why not v1]
|
|
26
|
-
- [Item 2] โ reason: [why not v1]
|
|
27
|
-
|
|
28
|
-
## Success criteria
|
|
29
|
-
[How will you know v1 is done? Be specific and measurable.]
|
|
30
|
-
|
|
31
|
-
## Key constraints
|
|
32
|
-
- [Constraint 1]
|
|
33
|
-
- [Constraint 2]
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# MindForge v1.0.0 โ Release Checklist
|
|
2
|
-
|
|
3
|
-
Use this file to record verification results for the 50-point production
|
|
4
|
-
readiness checklist in `.mindforge/production/production-checklist.md`.
|
|
5
|
-
|
|
6
|
-
## Metadata
|
|
7
|
-
- Target version: v1.0.0
|
|
8
|
-
- Release date: 2026-03-22
|
|
9
|
-
- Release manager: [name]
|
|
10
|
-
|
|
11
|
-
## Verification log
|
|
12
|
-
| Item | Result | Verified by | Date | Notes |
|
|
13
|
-
|---|---|---|---|---|
|
|
14
|
-
| A01 | | | | |
|
|
15
|
-
| A02 | | | | |
|
|
16
|
-
| A03 | | | | |
|
|
17
|
-
| A04 | | | | |
|
|
18
|
-
| A05 | | | | |
|
|
19
|
-
| A06 | | | | |
|
|
20
|
-
| A07 | | | | |
|
|
21
|
-
| A08 | | | | |
|
|
22
|
-
| A09 | | | | |
|
|
23
|
-
| A10 | | | | |
|
|
24
|
-
| B01 | | | | |
|
|
25
|
-
| B02 | | | | |
|
|
26
|
-
| B03 | | | | |
|
|
27
|
-
| B04 | | | | |
|
|
28
|
-
| B05 | | | | |
|
|
29
|
-
| B06 | | | | |
|
|
30
|
-
| B07 | | | | |
|
|
31
|
-
| B08 | | | | |
|
|
32
|
-
| B09 | | | | |
|
|
33
|
-
| B10 | | | | |
|
|
34
|
-
| C01 | | | | |
|
|
35
|
-
| C02 | | | | |
|
|
36
|
-
| C03 | | | | |
|
|
37
|
-
| C04 | | | | |
|
|
38
|
-
| C05 | | | | |
|
|
39
|
-
| C06 | | | | |
|
|
40
|
-
| C07 | | | | |
|
|
41
|
-
| C08 | | | | |
|
|
42
|
-
| C09 | | | | |
|
|
43
|
-
| C10 | | | | |
|
|
44
|
-
| D01 | | | | |
|
|
45
|
-
| D02 | | | | |
|
|
46
|
-
| D03 | | | | |
|
|
47
|
-
| D04 | | | | |
|
|
48
|
-
| D05 | | | | |
|
|
49
|
-
| D06 | | | | |
|
|
50
|
-
| D07 | | | | |
|
|
51
|
-
| D08 | | | | |
|
|
52
|
-
| D09 | | | | |
|
|
53
|
-
| D10 | | | | |
|
|
54
|
-
| E01 | | | | |
|
|
55
|
-
| E02 | | | | |
|
|
56
|
-
| E03 | | | | |
|
|
57
|
-
| E04 | | | | |
|
|
58
|
-
| E05 | | | | |
|
|
59
|
-
| E06 | | | | |
|
|
60
|
-
| E07 | | | | |
|
|
61
|
-
| E08 | | | | |
|
|
62
|
-
| E09 | | | | |
|
|
63
|
-
| E10 | | | | |
|
|
64
|
-
| F01 | | | | |
|
|
65
|
-
| F02 | | | | |
|
|
66
|
-
| F03 | | | | |
|
|
67
|
-
| F04 | | | | |
|
|
68
|
-
| F05 | | | | |
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "test-audit-001",
|
|
3
|
-
"timestamp": "2026-03-26T19:30:31.999Z",
|
|
4
|
-
"task": "Verification Test",
|
|
5
|
-
"files": [
|
|
6
|
-
"ARCHITECTURE.md",
|
|
7
|
-
"HANDOFF.json",
|
|
8
|
-
"PROJECT.md",
|
|
9
|
-
"RELEASE-CHECKLIST.md",
|
|
10
|
-
"REQUIREMENTS.md",
|
|
11
|
-
"ROADMAP.md",
|
|
12
|
-
"STATE.md",
|
|
13
|
-
"TEMPORAL-TEST.md",
|
|
14
|
-
"jira-sync.json",
|
|
15
|
-
"slack-threads.json"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# MindForge โ Project State
|
|
2
|
-
|
|
3
|
-
## Status
|
|
4
|
-
๐ด Not started
|
|
5
|
-
|
|
6
|
-
## IMPORTANT
|
|
7
|
-
HANDOFF.json is committed to git. Never write secrets or credentials into it.
|
|
8
|
-
Write "see .env" or "stored in secrets manager" if a note needs to reference credentials.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Current phase
|
|
12
|
-
None
|
|
13
|
-
|
|
14
|
-
## Last completed task
|
|
15
|
-
None โ project not yet initialised.
|
|
16
|
-
|
|
17
|
-
## Next action
|
|
18
|
-
Run `/mindforge:init-project` to initialise this project.
|
|
19
|
-
|
|
20
|
-
## Decisions made
|
|
21
|
-
None yet.
|
|
22
|
-
|
|
23
|
-
## Active blockers
|
|
24
|
-
None.
|
|
25
|
-
|
|
26
|
-
## Context for next session
|
|
27
|
-
Fresh MindForge install. No project has been initialised yet.
|
|
28
|
-
Start by running `/mindforge:init-project`.
|
|
29
|
-
|
|
30
|
-
## Last updated
|
|
31
|
-
[ISO 8601 timestamp on first use]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Initial State: $T_0$
|
package/bin/engine/test-ceg.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MindForge v6.4.0 โ CEG Verification Test
|
|
3
|
-
*
|
|
4
|
-
* Simulates a "noisy" reasoning trace with repetitive thoughts
|
|
5
|
-
* and verifies that the ContextEntropyGuard (CEG) correctly
|
|
6
|
-
* suppresses noise and compresses the history.
|
|
7
|
-
*/
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
const ceg = require('./context-entropy-guard');
|
|
11
|
-
|
|
12
|
-
async function runTest() {
|
|
13
|
-
console.log('๐งช Starting CEG Verification Test...');
|
|
14
|
-
|
|
15
|
-
const trace = [
|
|
16
|
-
{ event: 'reasoning_trace', thought: 'I should analyze the target directory structure.', is_stagnant: false },
|
|
17
|
-
{ event: 'reasoning_trace', thought: 'Analyzing the directory layout now.', is_stagnant: false },
|
|
18
|
-
// Repetitive noise (to be suppressed)
|
|
19
|
-
{ event: 'reasoning_trace', thought: 'Analyzing the directory layout now.', is_stagnant: true },
|
|
20
|
-
{ event: 'reasoning_trace', thought: 'Analyzing the directory layout now.', is_stagnant: true },
|
|
21
|
-
// New thought
|
|
22
|
-
{ event: 'reasoning_trace', thought: 'Found a potential vulnerability in the config file.', is_stagnant: false },
|
|
23
|
-
// Loop (to be compressed)
|
|
24
|
-
{ event: 'reasoning_trace', thought: 'Checking config permissions.', is_stagnant: true },
|
|
25
|
-
{ event: 'reasoning_trace', thought: 'Checking config permissions.', is_stagnant: true },
|
|
26
|
-
{ event: 'reasoning_trace', thought: 'Checking config permissions.', is_stagnant: true },
|
|
27
|
-
{ event: 'reasoning_trace', thought: 'Checking config permissions.', is_stagnant: true }
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
console.log(`\nInput Trace Length: ${trace.length}`);
|
|
31
|
-
|
|
32
|
-
const compressed = ceg.compress(trace);
|
|
33
|
-
console.log(`Compressed Trace Length: ${compressed.length}`);
|
|
34
|
-
|
|
35
|
-
console.log('\n--- Final Trace Preview ---');
|
|
36
|
-
compressed.forEach((e, idx) => {
|
|
37
|
-
if (e.event === 'reasoning_digest') {
|
|
38
|
-
console.log(`[${idx}] DIGEST: ${e.summary} | Last Conclusion: ${e.final_conclusion}`);
|
|
39
|
-
} else {
|
|
40
|
-
console.log(`[${idx}] THOUGHT: ${e.thought}`);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// Validations
|
|
45
|
-
const hasDigest = compressed.some(e => e.event === 'reasoning_digest');
|
|
46
|
-
const totalReduction = trace.length - compressed.length;
|
|
47
|
-
|
|
48
|
-
if (hasDigest && totalReduction >= 2) {
|
|
49
|
-
console.log('\nโ
SUCCESS: CEG successfully suppressed noise and compressed the reasoning loop.');
|
|
50
|
-
} else {
|
|
51
|
-
console.error('\nโ FAILURE: CEG failed to compress the history significantly.');
|
|
52
|
-
process.exit(1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
runTest().catch(err => {
|
|
57
|
-
console.error(err);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MindForge v6.3.0 โ IDC Verification Test
|
|
3
|
-
*
|
|
4
|
-
* Simulates a scenario where an agent starts "rambling" (low semantic density)
|
|
5
|
-
* and repeats itself, triggering the Intelligence Interlock to upgrade the MIR.
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
const interlock = require('./intelligence-interlock');
|
|
10
|
-
|
|
11
|
-
async function runTest() {
|
|
12
|
-
console.log('๐งช Starting IDC Verification Test...');
|
|
13
|
-
|
|
14
|
-
const spanId = 'test-span-drift-001';
|
|
15
|
-
|
|
16
|
-
// 1. Stable thought
|
|
17
|
-
console.log('\n--- Step 1: Stable Thought ---');
|
|
18
|
-
const t1 = "I will implement the authentication controller by defining the login and signup routes first.";
|
|
19
|
-
const r1 = interlock.evaluate(spanId, t1);
|
|
20
|
-
console.log(`Result: ${r1.action}, Drift: ${r1.drift || 'N/A'}`);
|
|
21
|
-
|
|
22
|
-
// 2. Drifting thought (Rambling and Repetitive)
|
|
23
|
-
console.log('\n--- Step 2: Drifting Thought (Injection) ---');
|
|
24
|
-
const t2 = "I will implement the implement the implement the logic of the logic of the logic and then i will implement and then i will implement implement implement implement implement implement implement implement.";
|
|
25
|
-
const r2 = interlock.evaluate(spanId, t2);
|
|
26
|
-
console.log(`Result: ${r2.action}, Drift: ${r2.drift || 'N/A'}`);
|
|
27
|
-
|
|
28
|
-
if (r2.action === 'UPGRADE_MIR') {
|
|
29
|
-
console.log('โ
SUCCESS: IDC triggered an upgrade signal for critical drift.');
|
|
30
|
-
console.log(`Target MIR: ${r2.new_mir}`);
|
|
31
|
-
} else {
|
|
32
|
-
console.error('โ FAILURE: IDC failed to trigger upgrade even with extreme repetition.');
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
runTest().catch(err => {
|
|
38
|
-
console.error(err);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
});
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MindForge v7 โ NDR Integration Test
|
|
3
|
-
* Verifies that logic drift triggers remediation and pulls from SemanticHub.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
const fs = require('node:fs');
|
|
8
|
-
const path = require('node:path');
|
|
9
|
-
const os = require('node:os');
|
|
10
|
-
const driftDetector = require('./logic-drift-detector');
|
|
11
|
-
const remediationEngine = require('./remediation-engine');
|
|
12
|
-
const semanticHub = require('../memory/semantic-hub');
|
|
13
|
-
|
|
14
|
-
async function testNDR() {
|
|
15
|
-
console.log('--- NDR Pillar Test ---');
|
|
16
|
-
|
|
17
|
-
// 1. Setup Mock Semantic Hub Data
|
|
18
|
-
const globalPath = path.join(os.homedir(), '.mindforge/memory/global');
|
|
19
|
-
const patternFile = path.join(globalPath, 'pattern-library.jsonl');
|
|
20
|
-
|
|
21
|
-
if (!fs.existsSync(globalPath)) {
|
|
22
|
-
fs.mkdirSync(globalPath, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const mockTrace = {
|
|
26
|
-
id: 'gt_test_001',
|
|
27
|
-
type: 'golden-trace',
|
|
28
|
-
skill: 'testing',
|
|
29
|
-
tags: ['success', 'logic-fix'],
|
|
30
|
-
content: 'Always verify before you trust.'
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
fs.appendFileSync(patternFile, JSON.stringify(mockTrace) + '\n');
|
|
34
|
-
console.log('[Test Setup] Injected mock golden trace into global hub.');
|
|
35
|
-
|
|
36
|
-
// 2. Simulate Drift
|
|
37
|
-
const spanId = 'sp_test_drift';
|
|
38
|
-
const ramblingThought = 'I am thinking about the thing and the thing is a thing and I keep repeating the thing because things are things.';
|
|
39
|
-
|
|
40
|
-
const report = driftDetector.analyze(spanId, ramblingThought);
|
|
41
|
-
console.log(`[Drift Detector] Report Status: ${report.status} (Score: ${report.drift_score})`);
|
|
42
|
-
|
|
43
|
-
if (report.status !== 'DRIFT_DETECTED') {
|
|
44
|
-
throw new Error('Drift detector failed to recognize rambling pattern');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// 3. Trigger Remediation
|
|
48
|
-
const action = await remediationEngine.trigger(spanId, report);
|
|
49
|
-
console.log(`[Remediation Engine] Action: ${action.strategy} (ID: ${action.remediation_id})`);
|
|
50
|
-
|
|
51
|
-
if (action.strategy !== 'GOLDEN_TRACE_INJECTION') {
|
|
52
|
-
throw new Error(`Expected GOLDEN_TRACE_INJECTION but got ${action.strategy}`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
console.log('PASSED');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
testNDR().catch(err => {
|
|
59
|
-
console.error(`FAILED: ${err.message}`);
|
|
60
|
-
process.exit(1);
|
|
61
|
-
});
|
package/bin/engine/test-rsa.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MindForge v6.5.0 โ RSA Verification Test
|
|
3
|
-
*
|
|
4
|
-
* Simulates reasoning thoughts and verifies that the ReasonSourceAligner (RSA)
|
|
5
|
-
* correctly maps them to REQUIREMENT IDs or flags mission drift.
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
|
|
9
|
-
const rsa = require('./reason-source-aligner');
|
|
10
|
-
|
|
11
|
-
async function runTest() {
|
|
12
|
-
console.log('๐งช Starting RSA Verification Test...');
|
|
13
|
-
|
|
14
|
-
await rsa.init();
|
|
15
|
-
|
|
16
|
-
const testCases = [
|
|
17
|
-
{
|
|
18
|
-
thought: 'I will create a new isolated component in bin/engine to handle policy checks.',
|
|
19
|
-
expectedId: 'REQ-001',
|
|
20
|
-
description: 'Clear alignment with REQ-001 (Component Isolation)'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
thought: 'The current reasoning trace shows high repetition; I must compress this with a digest.',
|
|
24
|
-
expectedId: 'REQ-003',
|
|
25
|
-
description: 'Clear alignment with REQ-003 (Context Entropy Guard)'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
thought: 'I should probably check the current weather in San Francisco before continuing.',
|
|
29
|
-
expectedId: null,
|
|
30
|
-
description: 'Unaligned "Mission Drift" thought'
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
let successCount = 0;
|
|
35
|
-
|
|
36
|
-
for (const tc of testCases) {
|
|
37
|
-
const result = rsa.checkAlignment(tc.thought);
|
|
38
|
-
console.log(`\n--- Test Case: ${tc.description} ---`);
|
|
39
|
-
console.log(`Input Thought: "${tc.thought}"`);
|
|
40
|
-
console.log(`RSA Result: Aligned=${result.is_aligned}, Best Match=${result.best_match_id}, Confidence=${result.confidence}`);
|
|
41
|
-
|
|
42
|
-
if (result.best_match_id === tc.expectedId) {
|
|
43
|
-
console.log('โ
PASS');
|
|
44
|
-
successCount++;
|
|
45
|
-
} else if (tc.expectedId === null && !result.is_aligned) {
|
|
46
|
-
console.log('โ
PASS (Gracefully handled mission drift)');
|
|
47
|
-
successCount++;
|
|
48
|
-
} else {
|
|
49
|
-
console.error(`โ FAIL: Expected ${tc.expectedId} but got ${result.best_match_id}`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (successCount === testCases.length) {
|
|
54
|
-
console.log('\nโ
RSA VERIFICATION COMPLETE: Mission fidelity mapping is operational.');
|
|
55
|
-
} else {
|
|
56
|
-
console.error(`\nโ RSA VERIFICATION FAILED: Only ${successCount}/${testCases.length} tests passed.`);
|
|
57
|
-
process.exit(1);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
runTest().catch(err => {
|
|
62
|
-
console.error(err);
|
|
63
|
-
process.exit(1);
|
|
64
|
-
});
|
package/bin/engine/test-scs.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MindForge v6.6.0 โ SCS Verification Suite
|
|
3
|
-
* Tests the Self-Corrective Synthesis self-healing loop.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
const rsa = require('./reason-source-aligner.js');
|
|
8
|
-
const scs = require('./self-corrective-synthesizer.js');
|
|
9
|
-
|
|
10
|
-
async function runTests() {
|
|
11
|
-
console.log('๐งช Starting MindForge v6.6.0 SCS Verification...');
|
|
12
|
-
await rsa.init();
|
|
13
|
-
|
|
14
|
-
// Test Case 1: Detect Drift and Refocus on REQ-004 (RSA)
|
|
15
|
-
console.log('\n--- Test Case 1: Targeted Refocus ---');
|
|
16
|
-
const driftingAudit = [
|
|
17
|
-
{ type: 'mission_fidelity', alignment: { is_aligned: true, best_match_id: 'REQ-004', confidence: 0.85 } }, // Good
|
|
18
|
-
{ type: 'mission_fidelity', alignment: { is_aligned: false, best_match_id: 'REQ-004', confidence: 0.35 } } // Drift detected
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
const correction = await scs.synthesizeCorrection(driftingAudit, { phase: '6.6.0-test' });
|
|
22
|
-
|
|
23
|
-
if (correction.type === 'scs_refocus' && correction.req_id === 'REQ-004') {
|
|
24
|
-
console.log('โ
SUCCESS: SCS correctly identified target requirement [REQ-004].');
|
|
25
|
-
console.log(`[SYNTHESIS] ${correction.instruction}`);
|
|
26
|
-
} else {
|
|
27
|
-
console.error('โ FAIL: SCS failed to target REQ-004 correctly.', correction);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Test Case 2: General Homing (No obvious requirements match in drift)
|
|
31
|
-
console.log('\n--- Test Case 2: General Homing ---');
|
|
32
|
-
const chaoticAudit = [
|
|
33
|
-
{ type: 'mission_fidelity', alignment: { is_aligned: false, best_match_id: null, confidence: 0.1 } }
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
const generalCorrection = await scs.synthesizeCorrection(chaoticAudit, { phase: '6.6.0-test' });
|
|
37
|
-
|
|
38
|
-
if (generalCorrection.instruction.includes('[SCS-GENERAL-HOMING]')) {
|
|
39
|
-
console.log('โ
SUCCESS: SCS triggered general homing for chaotic audit state.');
|
|
40
|
-
console.log(`[SYNTHESIS] ${generalCorrection.instruction}`);
|
|
41
|
-
} else {
|
|
42
|
-
console.error('โ FAIL: SCS failed to trigger general homing.', generalCorrection);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Test Case 3: Validating the Synthesized instruction with RSA
|
|
46
|
-
console.log('\n--- Test Case 3: RSA Validation of SCS Instruction ---');
|
|
47
|
-
const alignment = rsa.checkAlignment(correction.instruction);
|
|
48
|
-
if (alignment.best_match_id === 'REQ-004' && alignment.confidence > 0.60) {
|
|
49
|
-
console.log(`โ
SUCCESS: RSA confirms synthesized instruction aligns with [REQ-004] (Confidence: ${alignment.confidence})`);
|
|
50
|
-
} else {
|
|
51
|
-
console.error(`โ FAIL: Synthesized instruction failed RSA validation. Match: ${alignment.best_match_id}, Conf: ${alignment.confidence}`);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
console.log('\nโจ v6.6.0 SCS Verification Suite Complete.');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
runTests().catch(console.error);
|