mindforge-cc 4.3.0 → 5.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 (91) hide show
  1. package/.mindforge/engine/nexus-tracer.js +115 -0
  2. package/CHANGELOG.md +75 -27
  3. package/README.md +52 -100
  4. package/RELEASENOTES.md +12 -0
  5. package/bin/autonomous/auto-runner.js +154 -4
  6. package/bin/autonomous/context-refactorer.js +64 -0
  7. package/bin/autonomous/steer.js +19 -1
  8. package/bin/autonomous/stuck-monitor.js +43 -0
  9. package/bin/engine/handover-manager.js +69 -0
  10. package/bin/engine/nexus-tracer.js +67 -2
  11. package/bin/engine/sre-manager.js +63 -0
  12. package/bin/governance/policies/default-policies.jsonl +33 -0
  13. package/bin/governance/policy-engine.js +106 -0
  14. package/bin/governance/rbac-manager.js +109 -0
  15. package/bin/memory/eis-client.js +95 -0
  16. package/bin/memory/federated-sync.js +127 -0
  17. package/bin/memory/knowledge-graph.js +37 -0
  18. package/bin/models/cloud-broker.js +83 -0
  19. package/bin/models/model-broker.js +68 -49
  20. package/bin/skill-validator.js +41 -0
  21. package/docs/INTELLIGENCE-MESH.md +25 -22
  22. package/docs/architecture/PAR-ZTS-SURVEY.md +43 -0
  23. package/docs/architecture/README.md +31 -64
  24. package/docs/architecture/V5-ENTERPRISE.md +113 -0
  25. package/docs/governance-guide.md +43 -28
  26. package/docs/security/SECURITY.md +9 -7
  27. package/docs/user-guide.md +29 -3
  28. package/docs/usp-features.md +3 -0
  29. package/package.json +1 -1
  30. /package/docs/{context → Context}/Master-Context.md +0 -0
  31. /package/docs/{references → References}/audit-events.md +0 -0
  32. /package/docs/{references → References}/checkpoints.md +0 -0
  33. /package/docs/{references → References}/commands.md +0 -0
  34. /package/docs/{references → References}/config-reference.md +0 -0
  35. /package/docs/{references → References}/continuation-format.md +0 -0
  36. /package/docs/{references → References}/decimal-phase-calculation.md +0 -0
  37. /package/docs/{references → References}/git-integration.md +0 -0
  38. /package/docs/{references → References}/git-planning-commit.md +0 -0
  39. /package/docs/{references → References}/model-profile-resolution.md +0 -0
  40. /package/docs/{references → References}/model-profiles.md +0 -0
  41. /package/docs/{references → References}/phase-argument-parsing.md +0 -0
  42. /package/docs/{references → References}/planning-config.md +0 -0
  43. /package/docs/{references → References}/questioning.md +0 -0
  44. /package/docs/{references → References}/sdk-api.md +0 -0
  45. /package/docs/{references → References}/skills-api.md +0 -0
  46. /package/docs/{references → References}/tdd.md +0 -0
  47. /package/docs/{references → References}/ui-brand.md +0 -0
  48. /package/docs/{references → References}/user-profiling.md +0 -0
  49. /package/docs/{references → References}/verification-patterns.md +0 -0
  50. /package/docs/{references → References}/workstream-flag.md +0 -0
  51. /package/docs/{templates → Templates}/Agents/CLAUDE-MD.md +0 -0
  52. /package/docs/{templates → Templates}/Agents/COPILOT-INSTRUCTIONS.md +0 -0
  53. /package/docs/{templates → Templates}/Agents/DEBUGGER-PROMPT.md +0 -0
  54. /package/docs/{templates → Templates}/Agents/PLANNER-PROMPT.md +0 -0
  55. /package/docs/{templates/codebase → Templates/Codebase}/architecture.md +0 -0
  56. /package/docs/{templates/codebase → Templates/Codebase}/concerns.md +0 -0
  57. /package/docs/{templates/codebase → Templates/Codebase}/conventions.md +0 -0
  58. /package/docs/{templates/codebase → Templates/Codebase}/integrations.md +0 -0
  59. /package/docs/{templates/codebase → Templates/Codebase}/stack.md +0 -0
  60. /package/docs/{templates/codebase → Templates/Codebase}/structure.md +0 -0
  61. /package/docs/{templates/codebase → Templates/Codebase}/testing.md +0 -0
  62. /package/docs/{templates → Templates}/Execution/CONTINUE-HERE.md +0 -0
  63. /package/docs/{templates → Templates}/Execution/DISCUSSION-LOG.md +0 -0
  64. /package/docs/{templates → Templates}/Execution/PHASE-PROMPT.md +0 -0
  65. /package/docs/{templates → Templates}/Execution/STATE.md +0 -0
  66. /package/docs/{templates → Templates}/Execution/SUMMARY-COMPLEX.md +0 -0
  67. /package/docs/{templates → Templates}/Execution/SUMMARY-MINIMAL.md +0 -0
  68. /package/docs/{templates → Templates}/Execution/SUMMARY-STANDARD.md +0 -0
  69. /package/docs/{templates → Templates}/Execution/SUMMARY.md +0 -0
  70. /package/docs/{templates → Templates}/Profile/DEV-PREFERENCES.md +0 -0
  71. /package/docs/{templates → Templates}/Profile/USER-PROFILE.md +0 -0
  72. /package/docs/{templates → Templates}/Profile/USER-SETUP.md +0 -0
  73. /package/docs/{templates → Templates}/Project/DISCOVERY.md +0 -0
  74. /package/docs/{templates → Templates}/Project/MILESTONE-ARCHIVE.md +0 -0
  75. /package/docs/{templates → Templates}/Project/MILESTONE.md +0 -0
  76. /package/docs/{templates → Templates}/Project/PROJECT.md +0 -0
  77. /package/docs/{templates → Templates}/Project/REQUIREMENTS.md +0 -0
  78. /package/docs/{templates → Templates}/Project/RETROSPECTIVE.md +0 -0
  79. /package/docs/{templates → Templates}/Project/ROADMAP.md +0 -0
  80. /package/docs/{templates → Templates}/Quality/DEBUG.md +0 -0
  81. /package/docs/{templates → Templates}/Quality/UAT.md +0 -0
  82. /package/docs/{templates → Templates}/Quality/UI-SPEC.md +0 -0
  83. /package/docs/{templates → Templates}/Quality/VALIDATION.md +0 -0
  84. /package/docs/{templates → Templates}/Quality/VERIFICATION-REPORT.md +0 -0
  85. /package/docs/{templates/research → Templates/Research}/ARCHITECTURE.md +0 -0
  86. /package/docs/{templates/research → Templates/Research}/FEATURES.md +0 -0
  87. /package/docs/{templates/research → Templates/Research}/PITFALLS.md +0 -0
  88. /package/docs/{templates/research → Templates/Research}/STACK.md +0 -0
  89. /package/docs/{templates/research → Templates/Research}/SUMMARY.md +0 -0
  90. /package/docs/{templates → Templates}/System/CONFIG.json +0 -0
  91. /package/docs/{templates → Templates}/System/CONTEXT.md +0 -0
@@ -0,0 +1,43 @@
1
+ # PAR & ZTS Architectural Survey — MindForge v5
2
+
3
+ ## Pillar III: Predictive Agentic Reliability (PAR)
4
+
5
+ Predictive Agentic Reliability (PAR) addresses the "Reasoning Decay" problem in long-running autonomous sessions. It implements proactive monitoring and self-healing at the reasoning layer.
6
+
7
+ ### 1. Stuck Detection (S03 & S04)
8
+ The `StuckMonitor` has been extended to detect advanced reasoning loop patterns:
9
+ - **S03 (Semantic Mirroring)**: Detects when the agent paraphrases its own previous thoughts without taking new actions.
10
+ - **S04 (Infinite Decomposition)**: Detects when the agent breaks sub-tasks into smaller and smaller pieces indefinitely without resolving the parent task.
11
+
12
+ ### 2. Context Refactoring
13
+ The `ContextRefactorer` monitors "Context Density" (the ratio of implementation actions to reasoning thoughts).
14
+ - When density falls below 30%, it triggers a proactive **Refactor Event**.
15
+ - This encourages the agent to summarize its progress and reset its active context window, preventing bloat.
16
+
17
+ ### 3. C2C Arbitrage
18
+ Confidence-to-Cost (C2C) arbitrage ensures that the agent only continues execution when the expected value (confidence) exceeds the operational cost (tokens/compute).
19
+
20
+ ---
21
+
22
+ ## Pillar IV: Supply Chain Trust (ZTS)
23
+
24
+ Supply Chain Trust (ZTS) ensures that every asset (skill, model, tool) used by MindForge is authenticated and verified against enterprise standards.
25
+
26
+ ### 1. Agentic SBOM (Software Bill of Materials)
27
+ MindForge now generates a real-time `MANIFEST.sbom.json` during every autonomous run.
28
+ - **Model Tracking**: Logs the exact model version used for every reasoning span.
29
+ - **Skill Telemetry**: Tracks which skills were invoked and their specific versions.
30
+ - **Timestamping**: Captures full start/end telemetry for supply chain auditing.
31
+
32
+ ### 2. 7-Dimension Certification (7D)
33
+ Skills are now evaluated across 7 weighted dimensions:
34
+ 1. **Schema Compliance (15%)**
35
+ 2. **Trigger Density (15%)**
36
+ 3. **Mandatory Coverage (20%)**
37
+ 4. **Security Sanitization (20%)**
38
+ 5. **Doc Clarity (10%)**
39
+ 6. **Edge Case Handling (10%)**
40
+ 7. **Example Fidelity (10%)**
41
+
42
+ > [!IMPORTANT]
43
+ > In `--enterprise` mode, skills must achieve a minimum score of **7.0/10.0** to be loaded.
@@ -1,17 +1,21 @@
1
1
  # MindForge Architecture Overview
2
2
 
3
- MindForge v2.1.1 is built on a unified "Agentic OS" architecture, designed to provide a consistent execution environment across all major AI IDEs and CLI tools.
3
+ MindForge v5.0.0 is built on a distributed "Agentic OS" architecture, designed for enterprise-scale intelligence sharing and absolute governance.
4
4
 
5
5
  ---
6
6
 
7
- ## 1. Core Architectural Pillars
7
+ ## 1. Core Architectural Pillars (v5.0.0)
8
8
 
9
- The framework is organized into four logical pillars that map directly to the development lifecycle:
9
+ The framework is focused on six major pillars, with V5 introducing the **Distributed Intelligence** and **Policy Governance** layers:
10
10
 
11
- 1. **PLAN**: Multi-agent task decomposition using the `PLANNER_MODEL`. Resulting in atomic `.planning/` artifacts.
12
- 2. **EXECUTE**: Parallel, wave-based implementation using the `EXECUTOR_MODEL`.
13
- 3. **VERIFY**: Multi-stage validation (Automated Tests + UAT + Integrity Checks) using the `VERIFIER_MODEL`.
14
- 4. **SHIP**: Release orchestration, PR generation, and audit finalization.
11
+ 1. **Federated Intelligence Mesh (FIM)**: Distributed knowledge sharing with delta-sync and cryptographic provenance. [V5-ENTERPRISE.md](./V5-ENTERPRISE.md)
12
+ 2. **Agentic Policy Orchestrator (APO)**: Non-bypassable policy-as-code governance that intercepts autonomous intents.
13
+ 3. **Predictive Agentic Reliability (PAR)**: Self-healing reasoning loops and context refactoring. [PAR-ZTS-SURVEY.md](./PAR-ZTS-SURVEY.md)
14
+ 4. **Supply Chain Trust (ZTS)**: Agentic SBOM and 7-dimension skill certification. [PAR-ZTS-SURVEY.md](./PAR-ZTS-SURVEY.md)
15
+ 5. **Zero-Trust Agentic Identity (ZTAI)**: DID-based cryptographic signing for all agentic actions and tiered trust enforcement.
16
+ 6. **Adversarial Decision Synthesis (ADS)**: 3-model synthesis loop ensuring architectural integrity.
17
+ 7. **Semantic Context Sharding**: Tri-tier memory (Hot/Warm/Cold) for high-fidelity context management.
18
+ 8. **Autonomous Execution Engine**: Self-healing wave execution with stuck-detection and repair hierarchies.
15
19
 
16
20
  ---
17
21
 
@@ -21,8 +25,9 @@ MindForge uses a "Tiered Configuration" model allowing for global, organizationa
21
25
 
22
26
  | Directory | Scope | Purpose |
23
27
  | :--- | :--- | :--- |
28
+ | **EIS / Mesh** | `bin/memory` | Core FIM implementation (eis-client, federated-sync). |
29
+ | **Governance** | `bin/governance` | Core APO implementation (policy-engine, rbac-manager). |
24
30
  | `.mindforge/` | System/Global | Core personas, core skills, and engine protocols. |
25
- | `.mindforge/org/` | Organizational | Shared company standards and private skill registries. |
26
31
  | `.agent/` | Project/Local | Project-specific configuration, hooks, and local skill overrides. |
27
32
  | `.planning/` | Session/State | Ephemeral state, task blocks, and session handoffs. |
28
33
 
@@ -34,78 +39,40 @@ The `file-manifest.json` file in `.agent/` is the single source of truth for the
34
39
 
35
40
  ---
36
41
 
37
- ## 4. Runtime Execution Flow
42
+ ## 4. Runtime Execution Flow (V5 Hardened)
38
43
 
39
- 1. **Context Loading**: Load `MINDFORGE.md` and `file-manifest.json` to configure the environment.
40
- 2. **Skill Discovery**: Match task intent against the 3-tier skill registry (Core Org → Project).
41
- 3. **Persona Spawning**: Instantiate the required persona from the 32-persona ecosystem.
42
- 4. **Action Loop**: Execute the 4-pillar workflow, persisting state to `.planning/STATE.md` at every step.
43
- 5. **Audit Persistence**: All non-trivial actions are appended to the encrypted `.planning/AUDIT.jsonl`.
44
+ 1. **Context Loading**: Load `MINDFORGE.md` and `file-manifest.json`.
45
+ 2. **Identity Verification**: Resolve the agent's ZTAI identity and trust tier.
46
+ 3. **Policy Interception**: The `APO` evaluates the task intent. If not **PERMIT**, the session is halted.
47
+ 4. **Skill Discovery**: Match task intent against the 3-tier skill registry.
48
+ 5. **Execution Wave**: Parallel task execution with continuous FIM synchronization.
49
+ 6. **Audit Pulse**: All actions are cryptographically signed and appended to `.planning/AUDIT.jsonl`.
44
50
 
45
51
  ---
46
52
 
47
- ## 5. Stability & Extension
53
+ ## 5. Decision Records & Stability
48
54
 
49
- MindForge provides stable interfaces for extension:
55
+ MindForge provides stable interfaces for extension while documenting every major design shift via ADRs.
50
56
 
51
- - **Skills**: Domain expertise via `SKILL.md`.
52
- - **Workflows**: Sequence automation via `WORKFLOW.md`.
53
- - **Hooks**: Lifecycle interception via `.agent/hooks/`.
54
- - **SDK**: Programmatic access via `@mindforge/sdk`.
55
-
56
- See [ADR-041](../adr/ADR-041-runtime-interfaces.md) for the stabilization contract.
57
+ - **ADR Index**: See [decision-records-index.md](./decision-records-index.md).
58
+ - **V3 Core**: See [V3-CORE.md](./V3-CORE.md).
59
+ - **V4 Mesh**: See [V4-SWARM-MESH.md](./V4-SWARM-MESH.md).
60
+ - **V5 Enterprise**: See [V5-ENTERPRISE.md](./V5-ENTERPRISE.md).
57
61
 
58
62
  ---
59
63
 
60
- ## 6. Semantic Memory Tiering (V3)
61
-
62
- MindForge v2.4.0 introduces **Semantic Context Sharding**, a Tri-Tier memory architecture that optimizes context window usage for long-running engineering sessions.
64
+ ## 6. Semantic Memory Tiering (V3/V4)
63
65
 
64
66
  | Tier | Storage | Purpose | Retrieval |
65
67
  | :--- | :--- | :--- | :--- |
66
68
  | **HOT** | `HANDOFF.json` | Immediate task state and core ADRs (SRD > 0.8). | Loaded every session. |
67
- | **WARM** | `.planning/memories/` | Phase-specific shards and active project context (SRD 0.5-0.8). | Proactive retrieval via keyword matching. |
68
- | **COLD** | `.mindforge/memory/` | Historical logs and legacy architectural decisions (SRD < 0.5). | On-demand search via `/mindforge:remember`. |
69
-
70
- ### SRD Scoring Engine
71
-
72
- Semantic Relevance Density (SRD) is calculated using a weighted formula:
73
- `SRD = (Decisiveness * 0.6) + (Frequency * 0.1) + (Impact * 0.3)`
74
-
75
- ### Integrity & Hardening
76
-
77
- All shards are hardened with **SHA-256 Checksums** and **Semantic Tags** to prevent state drift and enable O(1) keyword-based context injection.
78
-
79
- ---
80
-
69
+ | **WARM** | `.planning/memories/` | Phase-specific shards and active project context (SRD 0.5-0.8). | Proactive retrieval. |
70
+ | **COLD** | `.mindforge/memory` | Global knowledge base and historical logs (SRD < 0.5). | Federated search (FIM). |
81
71
 
82
72
  ---
83
73
 
84
- ## 7. Adversarial Decision Synthesis (ADS) (V3)
74
+ ## 7. Adversarial Decision Synthesis (ADS)
85
75
 
86
- MindForge v3.0.0 introduces **Adversarial Decision Synthesis (ADS)**, a 3-model synthesis loop that ensures every architectural decision is battle-tested.
87
-
88
- ### The 3-Model Loop
89
-
90
- 1. **Blue Team (Architect)**: Proposes the initial high-performance plan.
91
- 2. **Red Team (Auditor)**: Hardened via "Jailbreak" protocol to identify at least 3 critical flaws (Maintainability, Complexity, Security).
92
- 3. **Gold Team (Synthesizer)**: Consolidates findings using the **SOUL.md** scoring algorithm.
93
-
94
- ### SOUL Decision Scoring
95
-
96
- | Metric | Factor | Description |
97
- | :--- | :--- | :--- |
98
- | **I** | Impact | Overall system-wide importance of the change. |
99
- | **L** | Leverage | How much this change unblocks future high-value work. |
100
- | **R** | Reversibility | How easy it is to undo this change if it fails. |
101
- | **E** | Effort | Total engineering complexity and time required. |
102
- | **Ri** | Risk | Probability of breakage or system regression. |
103
- | **C** | Cost | Token/Compute usage and infrastructure weight. |
104
-
105
- **Formula**: `Score = (I * L * R) / (E * Ri * C)`
106
-
107
- Decisions with a SOUL Score > 1.0 are considered architecturally sound.
76
+ MindForge v3.0.0 introduces **Adversarial Decision Synthesis (ADS)**, a 3-model synthesis loop that ensures every architectural decision is battle-tested using the **SOUL.md** scoring algorithm.
108
77
 
109
78
  ---
110
-
111
- ## 8. Stability & Extension
@@ -0,0 +1,113 @@
1
+ # MindForge v5 Architecture: The Enterprise Beast
2
+
3
+ MindForge v5.0.0 is the definitive enterprise-grade evolution of the agentic framework. This major version introduces distributed intelligence and absolute governance via a zero-trust policy-as-code layer.
4
+
5
+ ## Core Pillars (v5.0.0)
6
+
7
+ ### Pillar I: Federated Intelligence Mesh (FIM)
8
+
9
+ The FIM transitions MindForge from local knowledge silos to a shared organizational intelligence mesh.
10
+
11
+ - **Distributed Sync (LWW)**: Cross-node synchronization using Last-Write-Wins (LWW) conflict resolution with cryptographic versioning.
12
+ - **Delta Pull Protocol**: Intelligent synchronization that only retrieves new insights since the last successful sync, minimizing bandwidth and latency.
13
+ - **Enterprise Intelligence Service (EIS)**: A high-availability central hub for sharing high-confidence agentic findings across the entire enterprise.
14
+ - **ZTAI-Signed Provenance**: Every piece of knowledge in the mesh is cryptographically tied to the DID of the agent that generated it.
15
+
16
+ ### Pillar II: Agentic Policy Orchestrator (APO)
17
+
18
+ The APO provides a non-bypassable governance layer that evaluates every autonomous wave against organizational security policies.
19
+
20
+ - **Policy-as-Code (PaC)**: Security rules are defined in declarative JSON/YAML schemas, enabling version-controlled governance.
21
+ - **Real-Time Intent Interception**: The `AutoRunner` intercepts swarm intents (Action, Resource, DID, Tier) before execution.
22
+ - **Dynamic RBAC Mapping**: Automatically assigns project roles based on an agent's **Zero-Trust Agentic Identity (ZTAI)** trust tier.
23
+ - **Fail-Safe Governance**: "Default Deny" posture for sensitive operations (API key access, infra modification, etc.).
24
+
25
+ ### Pillar III: Predictive Agentic Reliability (PAR)
26
+
27
+ The PAR layer addresses reasoning decay and execution drifting in long-running autonomous sessions.
28
+
29
+ - **Loop Detection (S03/S04)**: Advanced `StuckMonitor` patterns for Semantic Mirroring and Infinite Decomposition.
30
+ - **Context Density Refactorer**: Proactive context summarization and handoff when reasoning-to-action density falls below 30%.
31
+ - **C2C Arbitrage**: Confidence-to-Cost (C2C) threshold gating to prevent low-value autonomous drifts.
32
+ - **Self-Healing Reasoning**: Automated triggering of "hindsight injection" when stuck patterns are detected.
33
+
34
+ ### Pillar IV: Supply Chain Trust (ZTS)
35
+
36
+ The ZTS layer ensures the integrity of the agentic supply chain, from the models used to the skills executed.
37
+
38
+ - **Agentic SBOM**: Automated `MANIFEST.sbom.json` generation tracking every model and skill signature in the reasoning chain.
39
+ - **7-Dimension Certification (7D)**: Weighted scoring system (Schema, Triggers, Security, Clarity, etc.) for skill validation.
40
+ - **Enterprise-Grade Enforcement**: Strict `--enterprise` mode requirement for 7.0/10.0 minimum certification score.
41
+ - **Skill Telemetry**: Real-time auditing of skill performance and reliability metrics.
42
+
43
+ ---
44
+
45
+ ### Pillar V: Multi-Cloud Arbitrage & Hedging
46
+
47
+ The Multi-Cloud layer ensures absolute availability and cost-efficiency by dynamically load-balancing across multiple AI providers.
48
+
49
+ - **Dynamic Routing**: Real-time arbitrage across Vertex AI, AWS Bedrock, and Azure based on current latency and cost weights.
50
+ - **Provider Fallback Protocol**: Automated "Hedging" that migrates agent context to a secondary cloud provider (e.g., Anthropic to Google) if 5xx errors or high latencies are detected.
51
+ - **Chaos Mode (Beast Mode)**: Built-in reliability testing that simulates provider dropouts to verify the robustness of the fallback loops.
52
+
53
+ ### Pillar VI: Sovereign Reason Enclaves (SRE)
54
+
55
+ SRE provides a "Confidential Computing" environment for the agent's internal thought process, protecting sensitive intellectual property.
56
+
57
+ - **TEE-Simulated Reasoning**: Tier 3 workloads execute reasoning traces in high-isolation simulated enclaves with zero-visibility to the global log.
58
+ - **Thought-Chain Sanitization**: Automatically redacts sensitive patterns (keys, credentials, PII) from the reasoning trace before persistent audit.
59
+ - **Enclave Multi-Tenancy**: Isolated reason-space per project wave, ensuring that cross-stream reasoning cannot leak state or logic.
60
+
61
+ ### Pillar VII: Dynamic Human-Agent Handover (DHH)
62
+
63
+ DHH creates a seamless bridge between fully autonomous execution and high-precision human steering.
64
+
65
+ - **Nexus State Bundles**: Automated "Context Freeze" and packaging of memory, diffs, and reasoning traces when agent confidence drops below 60%.
66
+ - **Mid-Wave Steering**: In-flight steering injection into the `AutoRunner` loop, allowing humans to re-orient an active autonomous wave without restarts.
67
+ - **Confidence-to-Human Gating**: Proactive interruption of the autonomous stream for "Human-in-the-Loop" approval on sensitive T3 operations.
68
+
69
+ ---
70
+
71
+ ## Technical Components
72
+
73
+ ### 🧠 Intelligence Mesh
74
+
75
+ | Component | Path | Description |
76
+ | :--- | :--- | :--- |
77
+ | **EIS Client** | `bin/memory/eis-client.js` | Hardened, ZTAI-signed mesh communicator. |
78
+ | **Fed-Sync** | `bin/memory/federated-sync.js` | Core delta-sync and conflict resolution logic. |
79
+ | **Graph Bridge** | `bin/memory/knowledge-graph.js` | Unified traversal for local and remote nodes. |
80
+
81
+ ### 🛡️ Governance & Cloud Arbitrage
82
+
83
+ | Component | Path | Description |
84
+ | :--- | :--- | :--- |
85
+ | **Policy Engine** | `bin/governance/policy-engine.js` | Intent-based RBAC/ABAC evaluator. |
86
+ | **RBAC Manager** | `bin/governance/rbac-manager.js` | Tier-to-role binding and DID mapping. |
87
+ | **Cloud Broker** | `bin/models/cloud-broker.js` | Multi-cloud routing and arbitrage engine. |
88
+ | **Fallback Protocol** | `bin/models/model-broker.js` | Provider hedging and context migration logic. |
89
+
90
+ ### ⚡ Reliability & Trust (PAR/ZTS/SRE/DHH)
91
+
92
+ | Component | Path | Description |
93
+ | :--- | :--- | :--- |
94
+ | **Stuck Monitor** | `bin/autonomous/stuck-monitor.js` | S03/S04 loop detection patterns. |
95
+ | **Refactorer** | `bin/autonomous/context-refactorer.js` | Context density and proactive summarization. |
96
+ | **SRE Manager** | `bin/engine/sre-manager.js` | Trusted execution enclave management. |
97
+ | **Handover Manager** | `bin/engine/handover-manager.js` | Nexus bundle creation and steering logic. |
98
+ | **SBOM Tracer** | `bin/engine/nexus-tracer.js` | SRE-aware audit logging and manifest generation. |
99
+
100
+ ---
101
+
102
+ ## Identity & Trust (ZTAI Interlocks)
103
+
104
+ MindForge v5 utilizes **Zero-Trust Agentic Identity (ZTAI)** as the root-of-trust for all enterprise operations.
105
+
106
+ 1. **Identity Verification**: Agents prove their identity using Ed25519 signatures.
107
+ 2. **Tier Escalation**: Tier 0-1 agents are limited to analytical tasks. Tier 2 agents gain implementation roles. Tier 3 agents (signed by HSM-secured identities) execute in **Sovereign Reason Enclaves**.
108
+ 3. **Policy Binding**: Policies specifically reference `trust_tier` requirements for sensitive namespaces.
109
+ 4. **Handover Thresholds**: Lower trust tiers trigger human-agent handover (DHH) earlier than senior T3 agents.
110
+
111
+ ---
112
+
113
+ *For implementation details, refer to the [PAR & ZTS Survey](./PAR-ZTS-SURVEY.md) and [Governance Guide](../governance-guide.md).*
@@ -1,32 +1,47 @@
1
- # MindForge Governance Guide (v4.2.5)
1
+ # MindForge Governance Guide (v5.0.0)
2
+ Absolute Control through Policy-as-Code (PaC)
2
3
 
3
- ## Goal
4
- Explain how change classification, approvals, compliance gates, and trust-based identity enforcement work in the MindForge ecosystem.
4
+ ## 1. Goal
5
+ MindForge v5.0.0 introduces a non-bypassable, intent-level governance layer. This guide explains how **Agentic Policy Orchestration (APO)** and **Zero-Trust Agentic Identity (ZTAI)** work together to secure the enterprise development lifecycle.
5
6
 
6
- ## Trust Tier Architecture (ZTAI)
7
- MindForge enforces a 4-tier trust model to govern agentic actions and code modifications.
7
+ ## 2. Agentic Policy Orchestrator (APO)
8
+ The APO is a decentralized governance engine that intercepts every autonomous intent before it is executed.
8
9
 
9
- | Tier | Name | Role | Verification Requirement |
10
+ ### A. Intent Interception
11
+ Before the `AutoRunner` begins a new execution wave, it extracts the acting agent's **Intent**:
12
+ - **DID**: The unique identity of the agent.
13
+ - **Action**: The operation being attempted (e.g., `process_phase_wave`, `modify_security_config`).
14
+ - **Resource**: The target of the action (e.g., specific directories, files, or API endpoints).
15
+ - **Tier**: The ZTAI Trust Tier assigned to the agent.
16
+
17
+ ### B. Policy Evaluation
18
+ The `PolicyEngine` evaluates this intent against organizational **Policy-as-Code (PaC)** definitions (typically stored in `bin/governance/policies/`).
19
+ - **Permit**: The action is allowed and execution proceeds.
20
+ - **Deny**: The action is blocked, and the violation is logged to `AUDIT.jsonl`.
21
+ - **Escalate**: The action requires a higher-tier DID signature or explicit HITL (Human-in-the-Loop) approval.
22
+
23
+ ## 3. Trust Tier Architecture (ZTAI Hardened)
24
+ V5.0.0 automatically maps ZTAI Trust Tiers to explicit project roles through the `RBACManager`.
25
+
26
+ | Tier | Role | Scope | Hardening |
10
27
  | :--- | :--- | :--- | :--- |
11
- | **0** | Informational | Research/Query agents. | No signing required. |
12
- | **1** | Verified | Standard implementation agents. | DID-signed audit entries. |
13
- | **2** | Specialized | Security, UI, and Data specialists. | Multi-agent peer review + DID signing. |
14
- | **3** | Principal | Architects and Core Engine agents. | **Secure Enclave (HSM) Signing** + Principal Approval. |
15
-
16
- ## Governance Flow
17
- 1. **Classify**: Automated classification of intent before planning.
18
- 2. **Tier Mapping**: Assigning a Trust Tier based on persona and scope.
19
- 3. **Cryptographic Signing**:
20
- - T1/T2: Standard Ed25519 signing via ZTAIManager.
21
- - T3: Hardware-enclave (simulated) signing for critical engine/security paths.
22
- 4. **Compliance Gates**: Enforce non-bypassable gates (Secrets, SQLi, PII) before release.
23
- 5. **Non-Repudiation**: Finalize audit blocks with Merkle-root manifests for integrity verification.
24
-
25
- ## Key Guarantees
26
- - **Identity Integrity**: Agents cannot spoof identities; every block in `AUDIT.jsonl` is cryptographically tied to a DID.
27
- - **Ghost Pattern Mitigation**: Planning is gated by the Global Intelligence Mesh to prevent repeating organizational anti-patterns.
28
- - **Emergency Override**: Requires explicit `--emergency` flag and authorized DID signing.
29
-
30
- ## Team Operation
31
- - **Handoff Continuity**: Multi-developer sessions coordinate via `HANDOFF.json`.
32
- - **Global Mesh Sync**: Project memory is automatically bubbled up to the organizational `~/.mindforge` store for cross-repo awareness.
28
+ | **0** | Informational | Research/Query only. | Read-only access to non-sensitive docs. |
29
+ | **1** | Implementation| Standard feature dev. | Write access to `/src`, `/tests`, `/bin/memory`. |
30
+ | **2** | Specialized | Security/DevOps Specialist. | Access to `/security`, `/infra`, and `/bin/governance`. |
31
+ | **3** | Principal | Lead Architect / Core Engine. | **HSM-Enclave Signing Required** for all engine modifications. |
32
+
33
+ ## 4. Governance Workflow (V5)
34
+ 1. **ZTAI Handshake**: Agent proves identity using Ed25519 signatures.
35
+ 2. **Intent Pulse**: Agentic intent is broadcast to the policy interceptor.
36
+ 3. **APO Evaluation**: Policy engine checks the intent against PaC rules.
37
+ 4. **Role binding**: `RBACManager` grants or revokes permissions based on the active trust tier.
38
+ 5. **Verified Wave**: Execution proceeds only if all policy gates are clear.
39
+
40
+ ## 5. Enterprise Policies
41
+ MindForge v5 ships with default policies including:
42
+ - **`gate_tier_3_engine`**: Blocks all modifications to `bin/autonomous/` unless signed by a Tier 3 DID.
43
+ - **`protect_security_namespace`**: Limits access to `/security` and `/governance` to Tier 2+ specialists.
44
+ - **`mesh_integrity_lock`**: Ensures only high-confidence agents can push to the **Federated Intelligence Mesh**.
45
+
46
+ ---
47
+ *Status: V5 "Beast" Mode Governance Implemented & Verified (2026-03-28)*
@@ -4,9 +4,9 @@
4
4
 
5
5
  | Version | Security support |
6
6
  |---|---|
7
- | 1.x.x | ✅ Active — patches released for all severity levels |
8
- | 0.6.x | ⚠️ Limited — critical fixes only, 90 days from v1.0.0 release |
9
- | < 0.6.0 | ❌ No support |
7
+ | 5.x.x | ✅ Active — patches released for all severity levels |
8
+ | 4.x.x | ⚠️ Limited — critical fixes only |
9
+ | < 4.0.0 | ❌ No support |
10
10
 
11
11
  ## Reporting a vulnerability
12
12
 
@@ -29,12 +29,14 @@
29
29
  - Crediting researchers in the security advisory (with their permission)
30
30
  - Maintaining confidentiality until a fix is released
31
31
 
32
- ## ZTAI Identity Model (v4.2)
32
+ ## ZTAI & Enclave Security (v5.0.0)
33
33
 
34
- MindForge enforces **Zero-Trust Agentic Identity (ZTAI)** for all actions. Every agent is assigned a cryptographically unique asymmetric key pair (Ed25519) in the format `did:mf:<key-fingerprint>`.
34
+ MindForge v5.0.0 enforces **Zero-Trust Agentic Identity (ZTAI)** and **Sovereign Reason Enclaves (SRE)** for all sensitive operations.
35
35
 
36
- - **Asymmetric Signing**: All high-tier (T1-T3) agent actions are cryptographically signed.
37
- - **Secure Enclave (HSM)**: Tier 3 principal agents utilize simulated hardware-secured enclave signing.
36
+ - **Asymmetric Signing**: All high-tier (T1-T3) agent actions are cryptographically signed using Ed25519.
37
+ - **Sovereign Reason Enclaves (SRE)**: Tier 3 principal agents execute reasoning in isolated TEE-simulated enclaves, ensuring that high-value architectural decisions and sensitive IP never leak to the persistent log.
38
+ - **Trace Sanitization**: In-enclave sanitization automatically redacts credentials and PII from reasoning traces before they reach the local filesystem.
39
+ - **Multi-Cloud Resilience**: The **Cloud Broker** provides automated failover and hedging across Vertex AI, Bedrock, and Azure to mitigate provider-side denial-of-service or outages.
38
40
  - **Audit Non-Repudiation**: The `AUDIT.jsonl` log is finalized with **Merkle-root integrity manifests** to prevent tampering.
39
41
  - **See also:** [ZTAI Overview](file:///Users/sairamugge/Desktop/MindForge/docs/security/ZTAI-OVERVIEW.md)
40
42
 
@@ -1,4 +1,4 @@
1
- # MindForge User Guide (v2.1.1)
1
+ # MindForge User Guide (v5.0.0)
2
2
 
3
3
  This guide gets you from install to productive, with the minimum needed to run MindForge in a real project. It assumes Node.js 18+.
4
4
 
@@ -152,7 +152,31 @@ MindForge v2.1.1 features automated PR creation and commit management.
152
152
 
153
153
  ---
154
154
 
155
- ## 12. Update & Maintenance
155
+ ## 12. Enterprise Resilience & Governance (v5.0.0)
156
+
157
+ MindForge v5 introduces mission-critical resilience and sovereign reasoning for enterprise engineering.
158
+
159
+ ### Multi-Cloud Arbitrage
160
+ MindForge automatically hedges against provider outages and optimizes for cost/latency.
161
+ ```bash
162
+ /mindforge:settings --cloud-arbitrage on
163
+ ```
164
+
165
+ ### Sovereign Reason Enclaves (SRE)
166
+ Tier 3 (Principal) agents execute reasoning in isolated enclaves to protect sensitive IP.
167
+ ```bash
168
+ /mindforge:agent --tier 3 # Automatically triggers SRE
169
+ ```
170
+
171
+ ### Dynamic Human-Agent Handover (DHH)
172
+ When autonomous confidence drops or a critical decision is reached, MindForge creates a **Nexus State Bundle** and requests human steering.
173
+ ```bash
174
+ /mindforge:auto --handover 0.6 # Triggers handover at 60% confidence
175
+ ```
176
+
177
+ ---
178
+
179
+ ## 13. Update & Maintenance
156
180
 
157
181
  Keep your framework current with the latest personas and library updates:
158
182
 
@@ -162,8 +186,10 @@ Keep your framework current with the latest personas and library updates:
162
186
 
163
187
  ---
164
188
 
165
- ## 13. Reference & Support
189
+ ## 14. Reference & Support
166
190
 
191
+ - **Architecture**: `docs/architecture/V5-ENTERPRISE.md`
192
+ - **Governance**: `docs/governance-guide.md`
167
193
  - **Commands**: `docs/commands-reference.md`
168
194
  - **Personas**: `docs/PERSONAS.md`
169
195
  - **Troubleshooting**: `docs/troubleshooting.md`
@@ -70,6 +70,9 @@ are included in the official release, and how to use them effectively.
70
70
  20. **Global Intelligence Mesh (v4.2)**
71
71
  - Cross-repository knowledge sharing via the **Semantic Hub**. Proactive **Ghost Pattern Detection** identifies and prevents repeating past organizational failures.
72
72
 
73
+ 19. **MindForge Nexus: Agentic Reasoning Tracing (v4.1)**
74
+ - High-fidelity **ART** spans embedded in the execution engine, providing deep visibility into agentic "thought chains" and parallel mesh reasoning.
75
+
73
76
  ---
74
77
 
75
78
  ## Feature Set (v2.0.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindforge-cc",
3
- "version": "4.3.0",
3
+ "version": "5.0.0",
4
4
  "description": "MindForge - Enterprise Agentic Framework for Claude Code and Antigravity",
5
5
  "bin": {
6
6
  "mindforge-cc": "bin/install.js"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes