Counterfactual Immune Forge
Proof-gated defense evolution: a fix is promoted only against the same sealed attack that beat it.
- Status
- Submitted, awaiting review
- Licence
- MIT · zero runtime dependencies
- Evidence
- 34 tests
The problem
Can a defense prove it improved against the exact scenario that beat it?
When an agent, guardrail or detection rule is defeated, the tempting next step is to patch it and move on — accepting on someone's word that the fix works and broke nothing.
What it does
It seals the attack scenario, proves the current defense really fails it, adjudicates each proposed change against that same sealed scenario, forces every change through a regression gate, requires a positive policy-defined improvement, then seals the whole decision — including every rejected candidate and the reason — as a SHA-256 Merkle evidence root anyone can recompute.
How it works
Protocol CIF/0.1 runs in order: canonicalize and hash the scenario, reproduce the baseline (no reproduction means INCONCLUSIVE and no candidate is evaluated), screen each candidate for blast radius, replay survivors against the same sealed object, apply the mandatory regression gate, and require measured improvement. Each adjudicated episode is appended to a hash-linked immune lineage verifiable independently of this server's memory.
Tool surface
MCP over stdio. Compatible with Claude Code, Claude Desktop and Cursor, or usable directly as a TypeScript library. No API key, account or Tenable product is required.
adjudicate_defensive_mutation
Run one full sealed adjudication over a scenario and its candidate fixes.
verify_episode_evidence
Recompute an episode's Merkle evidence root from its own bytes.
verify_immune_lineage
Verify the hash-linked lineage of adjudicated episodes.
export_immune_lineage_report
Export the lineage, including rejected candidates and rejection reasons.
describe_policy
Publish the gates, thresholds and improvement policy in force.
reset_state
Clear session-local state.
What it deliberately does not do
- It is a decision authority, not an actuator: it promotes nothing, executes nothing, and touches no files, sockets, processes or environment variables.
- If the baseline failure cannot be reproduced, no candidate is evaluated at all.
- Reasoning about what to try may come from anywhere; the gates and sealing are plain deterministic code.
Provenance
Where this came from
SHPBL discovered and composed this product from capability intent across its library and CMPSBL, a sister project by the same developer. The implementation cleared an exact-file review of its release surface and received its own MIT grant over that reviewed file set. The MIT grant covers only the named files in that one repository; it does not relicense SHPBL, CMPSBL, private harvest machinery, harvested bodies or provenance maps.
SHA-256 · 32c4cec9f022e70797ea8d9ecfb87960d0237a2f912ee64461a3c8c41e5d15ae
Submission does not imply review, approval, certification or endorsement by Tenable. No Exchange listing exists until a maintainer merges it.