forensic-contracts
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
forensic-contracts
Make AI-generated code explain itself in hours, not weeks — and mechanically block any function that escapes its declared @blast-radius cage.
forensic-contracts is the 5th flagship in the open-source Agent Governance suite (alongside casebook, dual-brain-guard, autonomy-ladder, and governed-browser). It compiles the forensic code-archaeology doctrine from jfranco-forensic-contracts and the literal sourcePin verifier from jfranco-apices into a zero-dependency Node.js CLI, stdio MCP Server, and portable plugin.
What forensic-contracts Enforces
The 5-Line Forensic Contract (
@forensic-contract): Every critical function carries@id,@origin,@invariant,@blast-radius, and@golden-test. Missing tags triggerFORENSIC-CONTRACT-INCOMPLETE.The Blast-Radius Cage Enforcer (
FORENSIC-CAGE-*): Scans the function body below each contract and exits2(CRITICAL_BLOCKER) if a function declaredpureorzero-networkcallsfetch()/requests.get(), if aread-only/no-fsfunction mutates the filesystem, or if ano-shellfunction spawns a subprocess.Dangerous-Primitive Gate (
FORENSIC-SEC-*): Blockseval(),new Function(),nodeIntegration: true,contextIsolation: false, and raw shell execution.Literal
sourcePinVerifier (RED_PARAPHRASE): Verifies character-by-character that any quote cited by an AI agent exists literally in the target source document. Paraphrases exit2(RED).
Related MCP server: platao
30-Second Quickstart
git clone https://github.com/JavierFrancoLeal/forensic-contracts.git
cd forensic-contracts
npm test
# 1. Audit a file or directory for @forensic-contract completeness and blast-radius cages
node src/cli.mjs scan src/
# 2. Verify a literal quote character-by-character against a source document (sourcePin)
node src/cli.mjs source-pin --file skills/forensic-contracts/SKILL.md --quote "Never Sign a Paraphrase"MCP Server Integration (Claude Code / Cursor / Gemini CLI / Antigravity)
{
"mcpServers": {
"forensic-contracts": {
"command": "node",
"args": ["/absolute/path/to/forensic-contracts/src/mcp-server.mjs"]
}
}
}Exposed MCP tools:
forensic_audit_codebase— audits files/directories for@forensic-contractcompleteness,@blast-radiuscage compliance, and dangerous primitivesforensic_verify_source_pin— verifies character-by-character literal quotes (GREENvsRED_PARAPHRASE)forensic_generate_contract_stub— generates a canonical 5-line@forensic-contractheader for JS/TS or Python
Technical Essay
Read the full engineering rationale in Code Archaeology for AI-Written Software: Why Comments Must Become Executable Cages.
Open-Source Agent Governance Suite
Repository | Role | Status |
Bounded-entropy 4-tier constitutional memory, Open Symptoms Radar & 5-to-1 compaction oracle |
| |
Harness-agnostic mechanical Proposer != Verifier cross-model guard ( |
| |
Evidence-based Traffic-Light autonomy grader ( |
| |
Constitutional commit-click brake ( |
| |
5-line |
| |
Complete 26-plugin DeepSeek Harness governance suite (mother repository) |
| |
CPU-first pre-merge security & governance suite ( |
| |
Adversarial UI/UX design judgment suite — 12 Barbell design minds & 4 Via Negativa auditors |
|
License
Apache-2.0 — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Bitcoin-anchored, tamper-evident audit-permanence layer for AI agents, FRE 902(13)/(14)-shaped.
Live GitHub repo AST X-Ray, 42 coding-agent DoD gates, Git worktree guards & brownfield baselines.
Governance copilot for AI-assisted coding. 72 packs, 532 rules, proof bundles.
Atomadic MCP: 68 deterministic tools for agent identity, escrow, SLA, EU AI Act compliance.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to record auditable work ledgers with evidence chains, from contract to proof packet, via MCP tools for file scanning, code review, and issue triage.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to run deterministic completeness audits on code before declaring 'done'—catching unwired modules, placebo tests, swallowed errors, and stubs via AST analysis, entirely offline and free.MIT
- AlicenseAqualityCmaintenanceEnables compatible AI coding agents to inspect authorized software artifacts, analyze JavaScript/TypeScript and native binaries, optionally perform Ghidra decompilation, and produce verifiable evidence-linked technical reports.11MIT
- AlicenseBqualityBmaintenanceEnables AI coding agents to assemble tamper-evident, locally stored evidence bundles that capture Git state, command results, and file hashes, then verify freshness and export shareable reports.241MIT