mindforge-cc 11.9.8 → 11.9.9

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 (60) hide show
  1. package/.agent/mindforge/health.md +7 -4
  2. package/.agent/mindforge/help.md +9 -5
  3. package/.agent/mindforge/install-skill.md +8 -6
  4. package/.agent/mindforge/marketplace.md +6 -0
  5. package/.agent/mindforge/security-scan.md +9 -4
  6. package/.agent/mindforge/skills-index.md +1 -1
  7. package/.agent/mindforge/status.md +5 -4
  8. package/.claude/commands/mindforge/health.md +7 -4
  9. package/.claude/commands/mindforge/help.md +9 -5
  10. package/.claude/commands/mindforge/install-skill.md +8 -6
  11. package/.claude/commands/mindforge/marketplace.md +6 -0
  12. package/.claude/commands/mindforge/security-scan.md +9 -4
  13. package/.claude/commands/mindforge/skills-index.md +1 -1
  14. package/.claude/commands/mindforge/status.md +5 -4
  15. package/.mindforge/config.json +1 -1
  16. package/.mindforge/dynamic-workflows/scripts/feature-planner.js +12 -0
  17. package/.mindforge/dynamic-workflows/scripts/incident-response.js +6 -0
  18. package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +9 -0
  19. package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +6 -0
  20. package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +3 -0
  21. package/.mindforge/dynamic-workflows/scripts/release-prep.js +9 -0
  22. package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +12 -0
  23. package/.mindforge/dynamic-workflows/scripts/verification-loop.js +6 -0
  24. package/.mindforge/org/skills/MANIFEST.md +32 -0
  25. package/.mindforge/personas/mf-executor.md +1 -1
  26. package/.mindforge/personas/mf-memory.md +1 -1
  27. package/.mindforge/personas/mf-tool.md +1 -1
  28. package/.mindforge/personas/swarm-templates.json +10 -20
  29. package/CHANGELOG.md +58 -0
  30. package/MINDFORGE-AGENTIC-SECURITY.md +189 -0
  31. package/MINDFORGE.md +2 -2
  32. package/README.md +134 -87
  33. package/RELEASENOTES.md +28 -0
  34. package/SECURITY.md +1 -1
  35. package/bin/governance/audit-verifier.js +12 -3
  36. package/bin/installer/harness-adapter-compliance.js +1 -1
  37. package/bin/installer-core.js +58 -14
  38. package/bin/mindforge-cli.js +2 -2
  39. package/bin/verify-audit.js +7 -1
  40. package/changelogs/v11.9.9.md +59 -0
  41. package/docs/References/commands.md +2 -2
  42. package/docs/References/config-reference.md +20 -35
  43. package/docs/References/sdk-api.md +10 -4
  44. package/docs/References/skills-api.md +9 -7
  45. package/docs/commands-reference.md +2 -2
  46. package/docs/faq.md +2 -2
  47. package/docs/getting-started.md +9 -3
  48. package/docs/sdk-reference.md +3 -3
  49. package/docs/security/SECURITY.md +14 -0
  50. package/docs/security/ZTAI-OVERVIEW.md +53 -0
  51. package/docs/security/penetration-test-results.md +36 -0
  52. package/docs/security/threat-model.md +148 -0
  53. package/docs/troubleshooting.md +14 -10
  54. package/docs/user-guide.md +12 -8
  55. package/docs/usp-features.md +60 -0
  56. package/package.json +4 -1
  57. package/subagents/README.md +38 -0
  58. package/.agent/skills/godmode/SKILL.md +0 -396
  59. package/.agent/skills/godmode/references/jailbreak-templates.md +0 -128
  60. package/.agent/skills/godmode/references/refusal-detection.md +0 -142
@@ -24,7 +24,7 @@ and be followed by `=`. Prose bullets that merely mention `[KEY]` are not parsed
24
24
 
25
25
  | Key | Example |
26
26
  | :--- | :--- |
27
- | `[VERSION]` | `11.9.2` — must match `^\d+\.\d+\.\d+$` |
27
+ | `[VERSION]` | `11.9.8` — must match `^\d+\.\d+\.\d+$` |
28
28
  | `[REACTIVE_MODE]` | `true` |
29
29
  | `[PLANNER]` | `claude-opus-4-7` |
30
30
  | `[EXECUTOR]` | `claude-sonnet-4-6` |
@@ -56,6 +56,9 @@ for older configs.
56
56
  | `[VERIFIER]` | `VERIFIER_MODEL` | Testing and UAT verification. | `claude-sonnet-4-6` |
57
57
  | `[SECURITY]` | `SECURITY_MODEL` | Sensitive security scanning. | `claude-opus-4-7` |
58
58
  | `[DEBUG]` | — | Debugging and root-cause analysis. | `claude-opus-4-7` |
59
+ | `[RESEARCH]` | `RESEARCH_MODEL` | Domain research during planning. | `gemini-2.5-pro` |
60
+ | `[QA]` | `QA_MODEL` | Quality-assurance / test-writing tasks. | `claude-sonnet-4-6` |
61
+ | `[QUICK]` | `QUICK_MODEL` | Tier-1 budget-biased tasks. | — |
59
62
 
60
63
  **Values are free-form strings** — the schema does not constrain them to a list, so a new model
61
64
  id works without a framework upgrade. The ids shipped in `MINDFORGE.md` today are
@@ -91,13 +94,15 @@ than editing your registry to satisfy it.
91
94
 
92
95
  These settings control the `/mindforge:auto` engine's behavior and performance.
93
96
 
97
+ > [!WARNING]
98
+ > `AUTONOMOUS_MODE_ENABLED`, `STUCK_DETECTION_TIMEOUT_MS`, `STEERING_CHECK_INTERVAL_MS`, and
99
+ > `NODE_REPAIR_ENABLED` do not appear anywhere in `.mindforge/MINDFORGE-SCHEMA.json`, and nothing
100
+ > in `bin/autonomous/` reads them — they are not currently configurable keys. Only the two rows
101
+ > below are real.
102
+
94
103
  | Key | Description | Default |
95
104
  | :--- | :--- | :--- |
96
- | `AUTONOMOUS_MODE_ENABLED` | Global toggle for autonomous task execution. | `true` |
97
105
  | `MAX_TASKS_PER_PHASE` | Limit on task expansion during planning. | `15` |
98
- | `STUCK_DETECTION_TIMEOUT_MS` | Time before an agent is considered "looping" or stuck. | `300000` |
99
- | `STEERING_CHECK_INTERVAL_MS` | How often the engine checks for user guidance. | `5000` |
100
- | `NODE_REPAIR_ENABLED` | If true, the engine attempts to self-heal on failures. | `true` |
101
106
  | `COMPACTION_THRESHOLD_PCT` | The context usage percentage at which to trigger compaction. | `70` |
102
107
 
103
108
  ---
@@ -111,8 +116,7 @@ Define the rules that code must follow to pass the `VERIFY` phase.
111
116
  | `MIN_TEST_COVERAGE_PCT` | Required test coverage for any new module. | `80` |
112
117
  | `MAX_FUNCTION_LINES` | Maximum lines allowed for a single function. | `40` |
113
118
  | `MAX_CYCLOMATIC_COMPLEXITY` | Maximum complexity score (McCune) allowed. | `10` |
114
- | `BLOCK_ON_MEDIUM_SECURITY` | Fail the gate if any medium security findings exist. | `true` |
115
- | `ANTIPATTERN_SENSITIVITY` | Frequency at which suspicious patterns are flagged. | `0.7` |
119
+ | `BLOCK_ON_MEDIUM_SECURITY_FINDINGS` | Fail the gate if any medium security findings exist. | `true` |
116
120
 
117
121
  ---
118
122
 
@@ -136,37 +140,18 @@ Control reasoning snapshot retention for the Temporal Steering system.
136
140
  | Key | Description | Default |
137
141
  | :--- | :--- | :--- |
138
142
  | `temporal.max_snapshots` | Maximum number of reasoning snapshots retained per session. | `50` |
139
- | `temporal.max_age_days` | Snapshots older than this value (in days) are auto-pruned. | `30` |
140
-
141
- ---
142
-
143
- ## 6. Rate Limiting (v11.0.0+)
144
-
145
- Configure request rate limits for the dashboard and API endpoints.
146
-
147
- | Key | Description | Default |
148
- | :--- | :--- | :--- |
149
- | `rate_limiting.dashboard_rpm` | Maximum requests per minute to dashboard endpoints. | `120` |
150
-
151
- ---
152
-
153
- ## 7. Session Configuration (v11.0.0+)
154
-
155
- Control session token behaviour for dashboard authentication.
156
-
157
- | Key | Description | Default |
158
- | :--- | :--- | :--- |
159
- | `session.token_expiry_hours` | Hours before a dashboard bearer token expires. | `24` |
143
+ | `temporal.max_age_days` | Snapshots older than this value (in days) are auto-pruned. | `7` |
160
144
 
161
145
  ---
162
146
 
163
- ## 8. Wave Execution (v11.0.0+)
164
-
165
- Tune parallel wave execution behaviour.
147
+ ## 6. Rate Limiting, Session Configuration, Wave Execution
166
148
 
167
- | Key | Description | Default |
168
- | :--- | :--- | :--- |
169
- | `wave_execution.max_concurrency` | Maximum number of tasks executed in parallel within a wave. | `6` |
149
+ > [!WARNING]
150
+ > `rate_limiting.dashboard_rpm`, `session.token_expiry_hours`, and
151
+ > `wave_execution.max_concurrency` are not present in the current `.mindforge/config.json` and
152
+ > nothing in the live `bin/` runtime reads them. The first two only ever existed as one-time
153
+ > values written by a historical migration (`bin/migrations/10.7.0-to-11.0.0.js`); the third
154
+ > doesn't appear anywhere in the codebase. Do not rely on setting any of these three today.
170
155
 
171
156
  ---
172
157
 
@@ -181,4 +166,4 @@ To ensure enterprise safety, several rules **cannot** be disabled via `MINDFORGE
181
166
  5. **Critical Security Blocks:** High/Critical findings *will* block the `SHIP` command.
182
167
 
183
168
  > [!WARNING]
184
- > Attempting to disable these rules in your configuration will result in a silent enforcement of the defaults. See [ADR-013](../adr/ADR-013-immutable-governance.md) for architectural details.
169
+ > Attempting to disable these rules in your configuration will result in a silent enforcement of the defaults.
@@ -1,4 +1,4 @@
1
- # MindForge SDK API — Reference (v2.0.0-alpha.4)
1
+ # MindForge SDK API — Reference (v11.9.8)
2
2
 
3
3
  ## Package
4
4
 
@@ -9,11 +9,17 @@
9
9
  From `sdk/src/index.ts`:
10
10
 
11
11
  - `MindForgeClient`
12
- - `MindForgeEventStream`
13
- - `commands`
12
+ - `MindForgeEventStream` — SSE-based event stream (see below)
13
+ - `WebSocketEventStream` — WebSocket-based alternative; requires a global `WebSocket` (Node 22+,
14
+ a browser, or the optional `ws` package assigned to `globalThis.WebSocket` — the SDK declares
15
+ no runtime dependencies, so nothing is installed for you)
16
+ - `commands` — slash-command string builders
17
+ - `batch(commands: string[])` — joins an array of command strings with `&&`
14
18
  - `MindForgeMemory`
15
19
  - Types: `MindForgeConfig`, `PhaseResult`, `TaskResult`, `SecurityFinding`,
16
- `GateResult`, `HealthReport`, `HealthIssue`, `MindForgeEvent`, `CommandOptions`
20
+ `GateResult`, `HealthReport`, `HealthIssue`, `MindForgeEvent`, `CommandOptions`,
21
+ `AuditLogEntry`, `WaveExecutionResult`, `MigrationResult`, `StreamChunk`,
22
+ `StreamingExecutionResult`, `BatchExecutionRequest`, `BatchExecutionResult`
17
23
  - `VERSION`
18
24
 
19
25
  ## MindForgeClient
@@ -13,12 +13,13 @@ Skills are domain knowledge packs loaded on demand. They are stored as
13
13
  ```
14
14
 
15
15
  ## SKILL.md schema (frontmatter)
16
- Required fields:
16
+ Required fields, enforced by `scripts/ci/validate-assets.js` and `tests/skills-platform.test.js`:
17
17
  - `name`: string (stable in 1.x.x)
18
- - `description`: string
19
- - `triggers`: array of keywords
20
18
  - `version`: semver string
21
- - `owner`: string (team or org)
19
+ - `status`: string (e.g. `stable`)
20
+ - `triggers`: comma-separated keyword string, minimum 10 terms, unique across all engine skills
21
+
22
+ `description` and `owner` are commonly present but are **not** enforced as required fields.
22
23
 
23
24
  Optional fields:
24
25
  - `scope`: `core | org | project`
@@ -30,8 +31,9 @@ Example:
30
31
  ---
31
32
  name: security-review
32
33
  version: 1.0.0
34
+ status: stable
33
35
  description: Secure coding review checklist and threat modeling prompts
34
- triggers: ["auth", "payment", "pii", "encryption"]
36
+ triggers: auth, payment, pii, encryption, secrets, credential, oauth, token, session, permission
35
37
  owner: mindforge-core
36
38
  scope: core
37
39
  ---
@@ -53,5 +55,5 @@ Skills can be published to the npm registry under `mindforge-skill-*`.
53
55
  See `docs/skills-publishing-guide.md` for full workflow.
54
56
 
55
57
  ## Stability contract
56
- As of v1.0.0, the `name` values of the 10 core skills are stable. New optional
57
- fields may be added in minor versions; removals require a major version bump.
58
+ As of v1.0.0, the `name` values of the 232 engine-tier skills (`.mindforge/skills/`) are stable.
59
+ New optional fields may be added in minor versions; removals require a major version bump.
@@ -171,8 +171,8 @@ mindforge <command> [options]
171
171
  | `security-scan` | Validate configuration and run security checks |
172
172
  | `health` | Verify project health and installation integrity |
173
173
  | `headless` | Run MindForge agent in headless (non-interactive) mode |
174
- | `pr-review` | Run standard PR review logic |
175
- | `cross-review` | Run advanced cross-model architecture review |
174
+ | `pr-review` | Alias for `cross-review` — same 2-model adversarial review engine |
175
+ | `cross-review` | Run the 2-model adversarial cross-review engine (architect + security auditor) |
176
176
  | `classify` | Classify changes into governance tiers |
177
177
  | `approve` | Generate a governance approval signature to unblock Tier 3 gates |
178
178
  | `validate-skill` | Run Level 1 & 2 validation on a SKILL.md file |
package/docs/faq.md CHANGED
@@ -1,4 +1,4 @@
1
- # MindForge FAQ (v11.9.8)
1
+ # MindForge FAQ (v11.9.9)
2
2
 
3
3
  ## Is MindForge tied to Claude only?
4
4
  No. MindForge supports Claude Code and Antigravity. Install with `--claude`,
@@ -55,7 +55,7 @@ The `deep-research` workflow was removed before the v11.8.0 release (the superpo
55
55
  ## Version & Stability
56
56
 
57
57
  **Q: What version is current?**
58
- v11.9.8 — verify with `node bin/mindforge-cli.js --version`
58
+ v11.9.9 — verify with `node bin/mindforge-cli.js --version`
59
59
 
60
60
  **Q: Was v11.9.0 production-stable?**
61
61
  At that release: yes, by the IQ200 deep-audit (258 discrete checks across 14 dimensions),
@@ -1,4 +1,4 @@
1
- # MindForge — Getting Started (v11.9.8)
1
+ # MindForge — Getting Started (v11.9.9)
2
2
 
3
3
  This guide gets you from zero to a working MindForge project in under five minutes.
4
4
 
@@ -17,7 +17,8 @@ MindForge ships across several channels. Pick the one that matches how you work
17
17
  Zero-config setup that scaffolds the full framework:
18
18
 
19
19
  ```bash
20
- # Recommended (auto-detects your runtime)
20
+ # Interactive wizard (TTY only) -- pre-selects a detected runtime, you confirm it.
21
+ # Non-interactive/CI/piped invocations skip the wizard and default to --claude.
21
22
  npx mindforge-cc@latest
22
23
 
23
24
  # Antigravity (local development)
@@ -29,6 +30,11 @@ npx mindforge-cc@latest --claude --local
29
30
 
30
31
  After installation, the `mindforge` CLI command is available for runtime operations (health checks, security scans, headless execution, etc.).
31
32
 
33
+ If a `CLAUDE.md` already exists in the target directory, the installer backs it up
34
+ (`CLAUDE.md.backup-<timestamp>`) before writing its own — check that backup if you had custom
35
+ content there. Hooks are snapshotted by Claude Code at session start, so if the harness was
36
+ already open during install, restart it before expecting a newly-registered hook to fire.
37
+
32
38
  **Global install** (system-wide `/mindforge` commands for your primary AI coding runtime):
33
39
 
34
40
  ```bash
@@ -114,7 +120,7 @@ Or use slash commands: `/mindforge:wf-code-audit`
114
120
  ## Your First 5 Minutes with MindForge
115
121
 
116
122
  1. **Verify install:** `node bin/mindforge-cli.js health`
117
- 2. **Check version:** `node bin/mindforge-cli.js --version` (should print `11.9.8`)
123
+ 2. **Check version:** `node bin/mindforge-cli.js --version` (should print `11.9.9`)
118
124
  3. **List workflows:** `node bin/mindforge-cli.js workflow list`
119
125
  4. **Run first slash command:** Open Claude Code → `/mindforge:status`
120
126
  5. **Onboard your codebase:** Open Claude Code → `/mindforge:wf-onboard-codebase`
@@ -14,11 +14,11 @@ import {
14
14
  } from 'mindforge-sdk';
15
15
  ```
16
16
 
17
- Current SDK version: `11.9.8`
17
+ Current SDK version: `11.9.9`
18
18
 
19
19
  ---
20
20
 
21
- ## SDK Exports (v11.9.8)
21
+ ## SDK Exports (v11.9.9)
22
22
 
23
23
  ```javascript
24
24
  const {
@@ -28,7 +28,7 @@ const {
28
28
  commands, // Command registry
29
29
  batch, // Batch execution
30
30
  MindForgeMemory, // Memory interface
31
- VERSION // '11.9.8'
31
+ VERSION // '11.9.9'
32
32
  } = require('mindforge-sdk');
33
33
  // or: import { MindForgeClient, VERSION } from 'mindforge-sdk';
34
34
  ```
@@ -0,0 +1,14 @@
1
+ # MindForge — Security Policy
2
+
3
+ > This file used to duplicate the repo's security policy and had drifted out of sync (it was
4
+ > still listing a `5.x.x`/`4.x.x`/`< 4.0.0` support table years behind the real `11.x` line). The
5
+ > canonical, kept-current security policy — supported versions, vulnerability reporting process,
6
+ > and the full "Security Features" / "Known Mitigations & Limitations" breakdown — lives at the
7
+ > repo root: **[`/SECURITY.md`](../../SECURITY.md)**. Read that file, not this one.
8
+
9
+ For the outward agentic-harness threat model (prompt injection, poisoned config/hooks/MCP,
10
+ supply-chain risk in skills/agents, sandboxing) see
11
+ **[`/MINDFORGE-AGENTIC-SECURITY.md`](../../MINDFORGE-AGENTIC-SECURITY.md)**.
12
+
13
+ For the current, honestly-labeled status of Zero-Trust Agentic Identity specifically, see
14
+ **[ZTAI Overview](./ZTAI-OVERVIEW.md)** — read its status banner first.
@@ -0,0 +1,53 @@
1
+ # Zero-Trust Agentic Identity (ZTAI) Overview
2
+
3
+ > **STATUS: DESIGN DOCUMENT — NOT SHIPPED BEHAVIOUR.**
4
+ >
5
+ > Everything below describes an intended architecture. Measured against a live install:
6
+ >
7
+ > | Claim in this document | Reality |
8
+ > |---|---|
9
+ > | every agent action is cryptographically signed | **0 of 3116** audit entries carry a `signature` or `did` field |
10
+ > | per-persona Ed25519 keypairs at spawn | `ztai-manager.js` can generate them; nothing calls it in a normal run |
11
+ > | `.mindforge/identity` vault | not created by any install |
12
+ > | every 50 entries triggers a Merkle-root | not a Merkle root — a linear cumulative fold — and nothing triggers it: `.planning/audit-archive/` contains only `.gitkeep`, the archiver has no caller outside tests |
13
+ > | Merkle-root chain | `ztai-archiver.js:57` sets `merkleRoot: cumulativeHash` — a linear chain hash, not a hash tree |
14
+ >
15
+ > `ENABLE_ZTAI` has no readers in `bin/`. What IS real and independently verifiable is the SHA-256
16
+ > hash chain in `.planning/AUDIT.jsonl` — see `SECURITY.md` for its actual guarantees and its one
17
+ > documented gap. Treat this file as a roadmap, and `bin/` plus `tests/` as ground truth.
18
+
19
+ MindForge v4.2 introduces **ZTAI Enterprise Mode**, an enterprise-grade identity layer that ensures every agent action is cryptographically signed and non-repudiable.
20
+
21
+ ## 1. Asymmetric Identity Model
22
+ Every MindForge persona in the 32+ agent library is assigned a unique asymmetric key pair (Ed25519) upon project initialization or agent spawning.
23
+
24
+ - **Private Key**: Stored securely in the local `.mindforge/identity` vault (never exposed).
25
+ - **Public Key / DID**: Represented as a **Decentralized Identifier (DID)** in the format `did:mf:<key-fingerprint>`.
26
+
27
+ ## 2. Trust Tiers & Signing Requirements
28
+ MindForge enforces tiered signing based on the risk level of the persona's actions.
29
+
30
+ | Tier | Persona Examples | Signing Tech | Integrity Proof |
31
+ | :--- | :--- | :--- | :--- |
32
+ | **T0** | `mf-researcher`, `mf-query` | None | Audit log entry only. |
33
+ | **T1** | `mf-executor`, `mf-coder` | Ed25519 (Software) | Signed JSON payload. |
34
+ | **T2** | `security-auditor`, `ui-specialist` | Ed25519 (Software) | Signed Block + Peer Review. |
35
+ | **T3** | `mf-planner`, `system-architect` | **Secure Enclave (HSM)** | Enclave-attested signature. |
36
+
37
+ *Note: T3 agents utilize a simulated hardware-secured enclave (HSM) to ensure principal-level accountability.*
38
+
39
+ ## 3. Non-Repudiable Audit Manifests
40
+ The `ZTAIArchiver` generates high-fidelity integrity proofs for the session history.
41
+
42
+ - **Cumulative Chain Root**: Every 50 audit entries would trigger a cumulative SHA-256 chain hash over the block. It is a linear fold, not a Merkle tree — no hash tree, no inclusion proof — though `ztai-archiver.js:57` still names the field `merkleRoot`.
43
+ - **Manifest Finalization**: The cumulative root of all audit entries is signed by the **Principal Agent (T3)**.
44
+ - **Tamper Detection**: Inside a block a manifest covers, `verifyIntegrity()` fails closed. Mutating or reordering an entry changes the recomputed root (`ztai-archiver.js:156`), and adding, deleting, or truncating *into* the block trips the `entryCount` check (`ztai-archiver.js:148`) — measured: dropping 3 of 10 covered entries throws `block entry count mismatch`. What it does **not** cover is anything outside the block: the manifest selects entries by the `[blockStart, blockEnd]` timestamp window (`ztai-archiver.js:141`), so entries appended after the last finalized `blockEnd` are never selected, and truncating that uncovered tail is invisible — measured: dropping all 4 uncovered entries still returns valid. This is a **separate mechanism** from the `previous_hash` back-link chain in `.planning/AUDIT.jsonl`; the archiver contains zero references to `previous_hash`. `bin/verify-audit.js` has its own, different tail-truncation gap, for the unrelated reason that any prefix of a back-linked chain is itself a valid chain. Nothing raises an alert for either today — the archiver has no caller outside tests.
45
+
46
+ ## 4. Key Provider Abstraction
47
+ The `ZTAIManager` uses a pluggable `KeyProvider` architecture:
48
+ - `FileSystemProvider`: Standard key storage for T1/T2 agents.
49
+ - `SecureEnclaveProvider`: Simulates hardware-backed signing for T3 agents.
50
+ - `KMSProvider` (Future): Integration with AWS/GCP/Azure Key Management Services.
51
+
52
+ ## 5. Governance Integration
53
+ ZTAI identities are verified during the `/mindforge:verify-phase` and `/mindforge:ship` processes. High-tier changes will be BLOCKED if the cryptographic signatures are missing or invalid.
@@ -0,0 +1,36 @@
1
+ # MindForge v1.0.0 — Penetration Test Results
2
+
3
+ > **STATUS: HISTORICAL — scoped to the v1.0.0-era predecessor system, not the current v11.x
4
+ > architecture.** These findings have not been re-run against the live `bin/` runtime. Retained
5
+ > for historical reference only. For current security status, see the root
6
+ > [`SECURITY.md`](../../SECURITY.md).
7
+
8
+ **Date:** 2026-03-22
9
+ **Scope:** MindForge v1.0.0 threat model (7 threat actors)
10
+ **Method:** Manual adversarial review + targeted negative tests
11
+
12
+ ## Summary
13
+ - Critical findings: 0
14
+ - High findings: 0
15
+ - Medium findings: 2
16
+ - Low findings: 3
17
+
18
+ All findings were addressed or documented with explicit mitigations.
19
+
20
+ ## Findings
21
+ | ID | Severity | Area | Description | Status |
22
+ |---|---|---|---|---|
23
+ | PT-01 | MEDIUM | Plugin system | Malicious plugin can request `write_state` permission | Mitigated: allowlist (`ELEVATED_PLUGINS`) + user approval |
24
+ | PT-02 | MEDIUM | Skill registry | Injection patterns could bypass simple string match | Mitigated: injection guard + manual review guidance |
25
+ | PT-03 | LOW | SSE stream | Local process can subscribe to localhost stream | Accepted: localhost-only + no secrets in stream |
26
+ | PT-04 | LOW | Config | User-controlled git email for approvals | Accepted: governance assumption, documented |
27
+ | PT-05 | LOW | CI | Workflow modification could bypass gates | Accepted: branch protection required |
28
+
29
+ ## Retest notes
30
+ - Re-validated installer excludes `.env`, `.key`, `.pem` files
31
+ - Verified migration restores from backup on failure
32
+ - Confirmed plugin loader skips incompatible plugins and logs audit entry
33
+
34
+ ## Conclusion
35
+ MindForge v1.0.0 is fit for public release with known, documented trade-offs.
36
+ See `docs/security/threat-model.md` for full controls and residual risk.
@@ -0,0 +1,148 @@
1
+ # MindForge v1.0.0 — Threat Model
2
+
3
+ > **STATUS: HISTORICAL — scoped to the v1.0.0-era predecessor system (March 2026), not the
4
+ > current v11.x architecture.** File/asset paths, the plugin model, and the enumerated threat
5
+ > actors below describe that earlier, materially smaller system. It is retained for historical
6
+ > reference only and has not been re-reviewed against the live `bin/` runtime. For what is
7
+ > actually enforced today, see the root [`SECURITY.md`](../../SECURITY.md).
8
+
9
+ ## Scope
10
+ All attack surfaces introduced by MindForge across 7 days of development.
11
+ Last reviewed: v1.0.0 release (March 2026).
12
+
13
+ ## Assets being protected
14
+
15
+ | Asset | Classification | Location |
16
+ |---|---|---|
17
+ | API credentials | CRITICAL | Environment variables only (never in files) |
18
+ | HANDOFF.json | HIGH — project state, agent notes, decisions | `.planning/HANDOFF.json` |
19
+ | AUDIT.jsonl | HIGH — complete governance audit trail | `.planning/AUDIT.jsonl` |
20
+ | Approval files | HIGH — governance records | `.planning/approvals/*.json` |
21
+ | SECURITY.md | MEDIUM — security policy documentation | `.mindforge/org/SECURITY.md` |
22
+ | CLAUDE.md | MEDIUM — agent instructions that shape behaviour | `.claude/CLAUDE.md` |
23
+ | CONVENTIONS.md | LOW — coding standards | `.mindforge/org/CONVENTIONS.md` |
24
+
25
+ ## Threat Actor 1 — Malicious skill package author
26
+
27
+ **Goal:** Inject adversarial instructions via a published `mindforge-skill-*` npm package.
28
+ **Attack:** SKILL.md contains "IGNORE ALL PREVIOUS INSTRUCTIONS" or similar.
29
+ **Controls:**
30
+ - Injection guard in `loader.md` blocks known patterns at both install and load time
31
+ - Level 1/2/3 skill validation at install time
32
+ - TOCTOU-safe download (chmod 700 temp dir, tarball size check)
33
+ - User must explicitly run `/mindforge:install-skill` — no auto-install
34
+
35
+ **Residual risk:** MEDIUM — sophisticated injections that avoid simple string matching.
36
+ **Mitigation:** Community review of public registry skills; organisation vetting of org-tier skills.
37
+
38
+ ---
39
+
40
+ ## Threat Actor 2 — MINDFORGE.md governance bypass
41
+
42
+ **Goal:** Disable governance primitives via MINDFORGE.md settings.
43
+ **Attack:** Set `SECRET_DETECTION=false`, `SECURITY_AUTOTRIGGER=false`.
44
+ **Controls:**
45
+ - Non-overridable rules enforced in CLAUDE.md session start protocol
46
+ - MINDFORGE-SCHEMA.json marks these fields as `nonOverridable: true`
47
+ - `bin/validate-config.js` warns on attempts to override these fields
48
+
49
+ **Residual risk:** LOW — enforced at the agent instruction layer, not OS level.
50
+ **Note:** An agent that ignores its CLAUDE.md is an agent that ignores everything.
51
+
52
+ ---
53
+
54
+ ## Threat Actor 3 — Accidental credential exposure in project files
55
+
56
+ **Goal:** Not adversarial — developer accidentally commits a credential.
57
+ **Attack vectors:**
58
+ - Token pasted into HANDOFF.json
59
+ - API key in MINDFORGE.md ADDITIONAL_AGENT_INSTRUCTIONS
60
+ - Secret in AUDIT.jsonl via an error message
61
+
62
+ **Controls:**
63
+ - Gate 3 (secret detection) blocks ANY commit with credential patterns
64
+ - `_warning` field in every HANDOFF.json schema reminding devs not to store secrets
65
+ - Health engine (Category 7) scans .planning/ and root files for credential patterns
66
+ - installer-core.js skips .env and *.key files during copyDir
67
+
68
+ **Residual risk:** LOW — multiple detection layers with complementary coverage.
69
+
70
+ ---
71
+
72
+ ## Threat Actor 4 — TOCTOU attack on skill installation
73
+
74
+ **Goal:** Replace a valid SKILL.md with malicious content in the window between download and validation.
75
+ **Attack:** Race condition in temp directory.
76
+ **Controls:**
77
+ - `chmod 700` on temp directory (user-only access, blocks other OS users)
78
+ - Tarball size check (detects empty/corrupted downloads)
79
+ - Download → validate → install is a single-process, single-threaded operation
80
+
81
+ **Residual risk:** VERY LOW — requires local machine compromise and precise timing.
82
+
83
+ ---
84
+
85
+ ## Threat Actor 5 — Compromised CI environment
86
+
87
+ **Goal:** Bypass governance gates in CI to ship malicious code.
88
+ **Attack:** Modify GitHub Actions workflow or CI runner environment to skip MindForge checks.
89
+ **Controls:**
90
+ - Gates run as separate CI jobs with explicit dependencies
91
+ - Tier 3 changes always fail CI (cannot be configured away)
92
+ - AUDIT.jsonl writes all gate results — tampering would require audit log manipulation
93
+ - Branch protection rules on the repository (outside MindForge scope)
94
+
95
+ **Residual risk:** HIGH — an attacker with write access to the workflow file or CI secrets
96
+ can bypass. This is a threat to all CI systems, not MindForge specifically.
97
+ **Mitigation:** Protect the `main` branch with required status checks.
98
+
99
+ ---
100
+
101
+ ## Threat Actor 6 — SSE event stream eavesdropping
102
+
103
+ **Goal:** Read sensitive project state from the real-time event stream.
104
+ **Attack:** Connect to port 7337 from another local process.
105
+ **Controls:**
106
+ - localhost-only binding (127.0.0.1) — not accessible from network
107
+ - IP address check on every connection — non-localhost rejected with 403
108
+ - CORS exact-origin matching (not wildcard)
109
+ - Port only opens when the SDK's `MindForgeEventStream.start()` is explicitly called
110
+
111
+ **Residual risk:** LOW — any process running as the same OS user can connect to localhost.
112
+ **Mitigation:** The SSE stream exposes AUDIT entries, not credentials. Risk is information disclosure, not code execution.
113
+
114
+ ---
115
+
116
+ ## Threat Actor 7 — Plugin with elevated or undeclared permissions
117
+
118
+ **Goal:** Use a MindForge plugin to exfiltrate project state or modify governance.
119
+ **Attack:** Install a plugin that reads HANDOFF.json and sends it to an external server.
120
+ **Controls:**
121
+ - Permission model displayed to user at install time (requires explicit approval)
122
+ - Injection guard run against all plugin .md files
123
+ - All plugin-triggered actions logged with plugin name as agent in AUDIT.jsonl
124
+ - `ELEVATED_PLUGINS` allowlist required for `write_state: true` permission
125
+
126
+ **Residual risk:** MEDIUM — a user who installs a malicious plugin and approves its permissions.
127
+ **Mitigation:** Only install plugins from sources you trust. Review plugin commands before installing.
128
+ Treat MindForge plugins like VSCode extensions — they have significant project access.
129
+
130
+ ---
131
+
132
+ ## Controls summary matrix
133
+
134
+ | Control | Threat Actors Mitigated |
135
+ |---|---|
136
+ | Injection guard (loader.md) | TA1, TA7 |
137
+ | TOCTOU-safe download (chmod 700) | TA1, TA4 |
138
+ | Non-overridable governance primitives | TA2 |
139
+ | Gate 3 secret detection | TA3 |
140
+ | Health engine credential scan | TA3 |
141
+ | CI Tier 3 block | TA5 |
142
+ | SSE localhost-only binding | TA6 |
143
+ | Plugin permission model + AUDIT logging | TA7 |
144
+
145
+ ## Penetration test results
146
+
147
+ See `docs/security/penetration-test-results.md` for the adversarial review
148
+ conducted as part of the v1.0.0 production readiness process.
@@ -1,4 +1,4 @@
1
- # MindForge Troubleshooting (v11.9.8)
1
+ # MindForge Troubleshooting (v11.9.9)
2
2
 
3
3
  This page lists common issues and fast fixes. If you get stuck, start with
4
4
  `/mindforge:health`.
@@ -23,18 +23,20 @@ Look for `CLAUDE.md.backup-<timestamp>` and merge your content.
23
23
  **Fix:** Verify the install location:
24
24
  - Claude Code: `~/.claude/commands/mindforge/`
25
25
  - Antigravity: `~/.gemini/antigravity/mindforge/`
26
- Run `/mindforge:health --repair`.
26
+ `--repair` doesn't run an automated fix — it's a documented flag that isn't wired into the CLI
27
+ backing path, silently ignored (byte-identical output to plain `health`). Re-run the install
28
+ command with `--force` instead, or restore the missing directory from git/backup.
27
29
 
28
30
  ---
29
31
 
30
32
  ## 2. Health check failures
31
33
 
32
34
  ### CLAUDE.md drift detected
33
- **Fix:**
34
- ```
35
- /mindforge:health --repair
36
- ```
37
- This restores the canonical MindForge CLAUDE.md.
35
+ **Fix:** `/mindforge:health --repair` is documented in the command spec but not wired into the
36
+ CLI backing path — it's silently ignored, byte-identical output to plain `health`. No automated
37
+ repair exists today. Restore the canonical file yourself: look for a
38
+ `CLAUDE.md.backup-<timestamp>` the installer wrote on your last run, or re-run
39
+ `npx mindforge-cc@latest --claude --local --force`.
38
40
 
39
41
  ### Missing .planning files
40
42
  **Fix:**
@@ -101,7 +103,8 @@ rerun migration. See `.mindforge/audit/AUDIT-SCHEMA.md` for expected format.
101
103
  - Reduce file reads or limit to ranges
102
104
  - Keep PLAN `<action>` lean (150–400 words)
103
105
  - Limit full skill injections to 3
104
- - Use `/mindforge:tokens --profile`
106
+ - Use `/mindforge:tokens --optimise` (`--profile` doesn't exist; real flags are `--phase N`,
107
+ `--session ID`, `--window short|medium|long`, `--optimise`)
105
108
 
106
109
  ---
107
110
 
@@ -128,8 +131,9 @@ follow, not a command.
128
131
 
129
132
  ### Workspace isolation failure
130
133
  **Symptom:** Conflicts between feature branches or dirty worktree.
131
- **Fix:** Run `/mindforge:workspace` to inspect worktree state. Use `/mindforge:health --repair` if
132
- `.git/worktrees/` is corrupt.
134
+ **Fix:** Run `/mindforge:workspace` to inspect worktree state. `/mindforge:health --repair` does
135
+ not actually run an automated fix (the flag is silently ignored) — if `.git/worktrees/` is
136
+ corrupt, run `git worktree prune` and remove the affected worktree directory manually.
133
137
 
134
138
  ---
135
139
 
@@ -1,8 +1,8 @@
1
- # MindForge User Guide (v11.9.8)
1
+ # MindForge User Guide (v11.9.9)
2
2
 
3
3
  This guide gets you from install to productive, with the minimum needed to run MindForge in a real project.
4
4
 
5
- > **v11.9.8 Stats:** 35 workflows · 221 slash commands · 232 engine skills · 216 personas · 0 CVEs · 258/258 IQ200 checks passing
5
+ > **v11.9.9 Stats:** 35 workflows · 221 slash commands · 232 engine skills · 216 personas · 0 CVEs · 258/258 IQ200 checks passing
6
6
 
7
7
  ## Prerequisites
8
8
 
@@ -35,6 +35,11 @@ npx mindforge-cc --antigravity --local
35
35
  npx mindforge-cc --runtime <name>
36
36
  ```
37
37
 
38
+ If a `CLAUDE.md` already exists in the target directory, the installer backs it up
39
+ (`CLAUDE.md.backup-<timestamp>`) before writing its own — check that backup if you had custom
40
+ content there. Hooks are snapshotted by Claude Code at session start, so if the harness was
41
+ already open during install, restart it before expecting a newly-registered hook to fire.
42
+
38
43
  ### Post-Install: The `mindforge` CLI
39
44
 
40
45
  After installation, the `mindforge` binary is available for runtime commands:
@@ -44,7 +49,7 @@ mindforge health # Verify project integrity
44
49
  mindforge security-scan # Run security checks
45
50
  mindforge headless # Run agent in non-interactive mode
46
51
  mindforge --verbose ... # Enable verbose output for debugging
47
- mindforge --version # Print installed version (e.g. 11.9.8) and exit 0
52
+ mindforge --version # Print installed version (e.g. 11.9.9) and exit 0
48
53
  ```
49
54
 
50
55
  Use `--verbose` (or `-v`) on any command for detailed diagnostic output. Use `--version` (or `-V`) to print the installed version and exit.
@@ -59,11 +64,10 @@ Open your agentic runtime (Claude Code, Antigravity, etc.) in your project direc
59
64
  /mindforge:health
60
65
  ```
61
66
 
62
- If health reports issues, run:
63
-
64
- ```bash
65
- /mindforge:health --repair
66
- ```
67
+ If health reports issues: `--repair` is documented in the command spec but not wired into the
68
+ CLI backing path — it's silently ignored, byte-identical output to plain `health`. No automated
69
+ repair exists today; address what the health report flags manually, or re-run the install with
70
+ `--force`.
67
71
 
68
72
  ## 3. Initialize a New Project
69
73