Nomos Developer Documentation
Nomos is the deterministic execution substrate between any coding agent and your Git repository. Audit any legacy codebase read-only in 5 seconds with nomos xray ., freeze Day-0 debt via nomos init --baseline, keep prompting Claude Code, Cursor, Antigravity, OpenCode, or Gemini CLI in plain English, and let Nomos physically block deleted test assertions, hollow stubs, host credential reads (~/.ssh, ~/.aws), and direct main commits across TypeScript, Python, Rust, Go, C/C++, Java, Kotlin, Ruby, and C#.
Prompt your coding agent in plain English - SessionStart hooks, hermetic worktrees, 42 polyglot AST gates, and 2PC sync run automatically.
Audits read-only via nomos xray . and Scaffolds repo-local nomos.yaml, nomos.baseline.json, AGENTS.md (@AGENTS.md in CLAUDE.md), native .claude · .cursor · .gemini · .opencode · .agents hooks, and Git pre-commit/pre-push locks. Zero background daemons.
VERIFY FOOTPRINT Inspect nomos xray ., nomos init --baseline & nomos verify output
$ nomos xray . AI Hangover Score : 34/100 Grade C (312 files · 412ms · 0 writes) $ nomos init --baseline [ok] nomos.yaml + nomos.baseline.json # Day-0 debt envelope frozen [ok] AGENTS.md + CLAUDE.md + .claude .cursor .gemini .agents .opencode [ok] .git/hooks/pre-commit # Read-only main + diff ratchet
$ nomos verify Law 1: Dual-Core Inversion [3/3 Cells] PASS (Governance & Control) Law 2: Non-Verbal Proof [3/3 Cells] PASS (AST, Coverage & Shims) Law 3: Hermetic Worktree [3/3 Cells] PASS (Read-Only Trunk Lock) Law 4: Single Source of Truth [3/3 Cells] PASS (Schema & SSoT Parity) Law 5: Zero-Hardcoded-Path [3/3 Cells] PASS (Host & Path Hygiene) Law 6: Canonical Singularity [3/3 Cells] PASS (Zero Aliases/Symlinks) Law 7: Fail-Closed Pre-Flight [3/3 Cells] PASS (CapBAC & Airlocks) Exit 0 · 42/42 deterministic gates satisfied
Integration by Engineering Role
How individual contributors, technical leads, CI pipelines, and security teams interface with the Nomos binary.
Prevents coding agents from mutating trunk directly, deleting failing test assertions, reading host credentials, or compounding regressions in shared working trees.
Audit read-only in 5s with nomos xray ., lock Day-0 debt via nomos init --baseline, then prompt Claude Code, Cursor, Antigravity, OpenCode, or Gemini CLI in plain English - zero per-task CLI ceremony required.
Read Invisible Harness Guide →Six-Phase Autonomous Execution (Under the Hood)
You do not run these phase transitions manually. After nomos init, ambient hooks and your coding agent execute all six stages underneath your plain-English prompt.
Agent mutates files directly on main or a shared branch without isolation, leaving uncommitted work exposed to destructive overwrites.
SessionStart hook verifies CapBAC state and recalls mneme.db pitfalls (~4ms); agent provisions an isolated worktree (worktrees/repo-SUB-1) while main stays read-only.
Deterministic Pre-Merge Failure Modes
Representative agent shortcuts intercepted locally by compiled Go AST and CapBAC gates prior to merge.
func ValidateInvoiceSignature(payload []byte) error {
- return crypto.VerifyPSS(pubKey, payload)
+ // TODO: wire key rotation later
+ return nil
}[FAIL] ERR_TRIVIAL_PASS_SHIM (billing/verify.go:42) -> Function ValidateInvoiceSignature returns constant literal 'nil' with 0 verification statements. -> Remedy: Implement concrete signature verification before transitioning to REVIEW.
Coding agents frequently satisfy callers by returning constant literals (nil, true, empty structs) or Python/Rust todo!() shims. AntiShimGate inspects AST return paths to block placeholder code.
Read Non-Verbal Proof & AST Invariants →Agent-Agnostic Indirect Control & CI Pipelines
Nomos governs the repository at the Git hook, worktree, and compiler AST boundary, so teams can switch coding agents or models without rewriting enforcement rules.
nomos init scaffolds CLAUDE.md (@AGENTS.md SSoT import pointer), native .claude/settings.json hooks (SessionStart, PreToolUse, PostToolUse, Stop), and Git pre-commit/pre-push locks.
curl -fsSL https://sophialabs.ca/install | bash cd your-project && nomos xray . && nomos init --baseline # Open Claude Code and prompt in plain English: # > "Add idempotent retry backoff to webhook dispatcher with unit tests"
Core Reference Documentation
Deep-dive specifications, formal invariants, and structural codebase telemetry.
CLI & nomos.yaml Reference
Canonical commands (xray, init --baseline, verify, task, mem), deterministic exit codes (0/1/2), and declarative structural budgets.
Explore CLI Reference →DIAGNOSTICS · 42 GATES42 Gates & ERR_* Dictionary
Searchable lookup for every G-01..G-42 quality gate, protocol vector (TC-AGT-01..09), and fail-closed ERR_* remediation.
Lookup Gates & Errors →SPECIFICATIONS · 8 CONTRACTSArchitecture Specifications Hub
Browse all 8 formal Open-Core specifications across Core Architecture, Security & Capabilities, AST Quality Gates, and Runtime & Memory.
Explore 8 Specs →DOCTRINE · 7 LAWSThe Seven Laws of Nomos
Canonical invariants governing indirect agent control, non-verbal AST proof, hermetic worktrees, and single-source-of-truth parity.
Read Chapter →HANDBOOK · 12 CHAPTERSAgent Engineering Handbook
Complete technical reference covering dual-core inversion, cryptographic Git Notes provenance, NCTE-100 steering, and local SQLite memory.
Browse Handbook →INTERACTIVE · 60 FPS LABS7 Laws Interactive Academy
Hands-on browser simulations testing Brownian agent confinement, 3-ring AST gate corridors, hermetic 2PC merges, and Go SSoT byte parity.
Launch 7 Labs →
Nomos