ARCHITECTURE COMPARISON // DETERMINISTIC SUBSTRATE VS. PROBABILISTIC WRAPPERS

Nomos vs. Prompt Wrappers, Style Linters, and Static AGENTS.md

Why advisory Markdown rules decay past 60% context, post-hoc linters miss reward-hacked unit tests, and production repositories require a compiled transactional substrate between agents and Git.

View Raw .md Twin

Architecture & Containment Matrix

DimensionNomos (Deterministic Go Substrate)Prompt Wrapper / Agent LoopStyle Linter / Post-Hoc CIStatic AGENTS.md / .cursorrules
Enforcement PlanePre-merge disposable Git worktree + CapBAC leases + 42 compiled Go AST and Git hook gates failing closed with exit 1 outside the LLM context window.Inside the stochastic LLM prompt loop; relies on model self-discipline and reflection retries.Post-hoc syntax checks run after edits already dirtied a shared branch or opened a noisy PR.Advisory Markdown inside the context window; ignored or overridden once context pressure builds.
Test-Tampering & Hollow StubsAntiShimGate and diff-scoped mutation testing (nomos verify --pr --mutate-diff) fail closed when agents weaken assertions, skip tests, or return trivial constants.Blind whenever the agent edits a test or adds a mock so the test runner reports exit code 0.Checks formatting and simple lints; blind to deleted assertions or tautological unit tests.Decays past roughly 60% context utilization; agents rewrite specs or weaken tests under retry pressure.
Container Sandbox, Symlink & IFC ContainmentCompiled container mechanism policies, pure-Go symlink escape guards, egress locks, and CapBAC Information Flow Control (IFC) sink enforcement bound shell and tool execution.Prompt-level allowlists easily bypassed by subshells, relative symlink traversal, or redirected output sinks.Zero runtime process, shell, symlink, or network egress containment during agent tool calls.Zero execution boundary; "never touch production secrets" rules cannot intercept live shell or file writes.
Brownfield 200k+ LOC OnboardingSub-5-second read-only nomos xray . diagnostic (AI Hangover Score 0-100, OASIS SARIF 2.1.0), frictionless nomos init Branch Guard (--local stealth), and diff-scoped merge-base ratchets.Full-repository indexing overflows prompt budgets and burns cloud retry tokens across legacy files.Floods untouched legacy files with thousands of pre-existing warnings on Day 1.Ignored under large monorepo file counts; human reviewers still carry the full architectural triage burden.
Polyglot Architecture & Unit-Lock Proofs11 languages (Go, TypeScript, Python, Rust, C/C++, Java and C# via pure-Go wazero WASM with CGO_ENABLED=0) plus hexagonal boundary and physical unit-lock obligations.Cannot parse cross-language call graphs or prove clean-architecture layer isolation deterministically.Language-siloed regex or formatting rules miss cross-layer domain leaks (0/3 hexagonal purity in controlled audits).Controlled Python, TypeScript, and Go audits show 0/3 hexagonal purity under CLAUDE.md alone.
Audit Trail & Compounding MemoryAtomic Two-Phase Commit (refs/notes/nomos/releases), SLSA v1.0 DSSE receipts, OASIS SARIF 2.1.0, and pure-Go SQLite WAL memory (mneme.db) with zero external embedding daemons.Ephemeral chat transcripts with zero cryptographic linkage to verified Git commits or surviving tests.Ephemeral CI console logs discarded after pipeline retention expires.Unverified static Markdown manually edited when engineers notice recurring agent mistakes.

Independent Benchmarks & Terminal Proof

60.9% -> 13.0% Attack Success · -35.2% API Spend

HarnessSecurity-Bench (46 Paired Claude Code Containers)

Compiled Go PreToolUse hooks cut coding-harness Attack Success from 60.9% (14/23) to 13.0% (3/23) across all 9 security mechanisms at -35.2% Sonnet 5.5 API cost while preserving 92.0% task utility.

76.40% Pass@1 · 92.13% Pass@5

Terminal-Bench 2.0 (Lightweight Flash Governance)

Compiled pre-commit AST feedback raises lightweight open-weight and Flash-class model solvability without frontier token burn.

0.00% Attack Success Rate · -0.53pp Utility Delta

AgentDojo v1.2.2 Security Suite (All 4 Official Suites)

CapBAC capability leases and IFC sink enforcement blocked 100% of indirect prompt-injection attacks across all four AgentDojo benchmark suites.

-18.2% Harness-Caused Failures · 0 Phantom Completions

Harbor Index & TraceTrial-Bench (190 Paired Containers)

Paired container audit across Claude Code trajectories eliminating silent partial completions and test-tampering regressions before trunk merge.

nomos xray . -> nomos init -> nomos verify --pr --mutate-diff

90-Second Uncut Terminal Walkthrough

Unedited terminal execution catching a reward-hacked unit test and hollow stub in real time prior to PR merge.

Engineering Comparison FAQ

How is Nomos different from CLAUDE.md, AGENTS.md, or .cursorrules?

Instruction files live inside the stochastic LLM context window and decay as conversations grow or retries mount. Nomos enforces compiled Go AST gates, CapBAC capability leases, and Git hooks outside the model context window so invalid diffs exit 1 before reaching main.

Does Nomos replace golangci-lint, ESLint, or existing CI pipelines?

No. Style linters check syntax after code is already written to a shared branch. Nomos sits upstream inside hermetic worktrees or Branch Guard (--local) to block reward-hacked tests, hollow stubs, symlink escapes, and architectural boundary violations before PR creation, while exporting OASIS SARIF 2.1.0 to GitHub Actions or GitLab CI.

Can Nomos govern an existing 200k+ LOC brownfield repository without blocking developers?

Yes. Start with a read-only 5-second scan (nomos xray .), enable frictionless Branch Guard (nomos init or --local stealth) that auto-baselines legacy debt on Day 0, and enforce diff-scoped merge-base ratchets strictly on newly changed code.

How does Nomos contain shell commands, container mounts, and symlink escapes from AI agents?

Nomos compiles container mechanism policies, pure-Go symlink traversal escape checks, network egress policies, and CapBAC Information Flow Control (IFC) sink validation directly into deterministic hook binaries rather than relying on LLM prompt refusals.

Ask Sophia Docs & Specs Sophia AI · Grounded Nomos Architecture & Docs Concierge