Skip to main content

Aegis

License: Apache 2.0 Core Rules Agent Skills Architecture Version Zero Runtime Dependencies Blog Post M8ven Score

Production-grade governance framework making AI coding agents trustworthy through observable, self-evolving constraints.

Aegis (formerly Soma) replaces static, unverified prompt rules (.cursorrules, CLAUDE.md) with a closed-loop governance engine: JIT context injection, deterministic AST verification, and Wilson-bounded rule evolution. Rules prove their value or decay to zero.

flowchart LR
    A["Agent Action"] --> B["1. JIT Rule Injection<br/><i>Relevant constraints & traps</i>"]
    B --> C["Code Generation"]
    C --> D["2. Two-Layer Verification<br/><i>Deterministic AST + Adversarial Arbiter</i>"]
    D --> E["3. Ambient Telemetry<br/><i>Trigger & outcome signals</i>"]
    E --> F["Self-Evolving Lifecycle<br/><i>Rules promote or decay</i>"]
    F -.-> B

📖 Documentation Portal & Guides

Explore deep-dive guides for production architecture, workflows, and specifications:

Guide Description Key Focus
MCP Gateway Dual-Plane Gateway Architecture Control vs Execution Plane, receipt security, opt-in projection
Verification Pipeline Two-Layer Verification Engine Layer 1 AST checks, Layer 2 Adversarial Rebuttal, Gate 4.5
Rule Lifecycle Evolutionary Rule Management 5 rule types, Wilson scoring, promotion/demotion, zero-touch decay
Skill Graph Horizontal Agent Collaboration 15 skills, typed envelopes (<150 tokens), file-buffered handoffs
Compatibility SemVer 2.0 Guarantee Formal backwards compatibility contracts starting at v1.0.0
Security Policy Vulnerability Reporting & Scopes Security tiering, isolation, and responsible disclosure

Quick Start

pip install aegis-guardrails   # Pure Python (3.9+), zero runtime dependencies
aegis init                     # Auto-detects Gemini, Claude Code, Cursor, Copilot
aegis status                   # View active rules and fitness stats
aegis check                    # Run Layer 1 deterministic AST checks

Add Aegis to your agent's configuration (AEGIS_WORKSPACE points to your project):

{
  "mcpServers": {
    "aegis": {
      "command": "python3",
      "args": ["-m", "aegis_mcp"],
      "env": {
        "AEGIS_WORKSPACE": "/path/to/project",
        "AEGIS_EXECUTION_ENABLED": "1"
      }
    }
  }
}
Tier Available tools
Read (default) aegis_request_receipt, aegis_scan, aegis_list_cells, aegis_grade, aegis_coverage, aegis_fitness, aegis_audit_security, aegis_audit_performance, aegis_poll_verification, aegis_list_rules, aegis_rule_fitness
Write (default; receipt required) aegis_report_outcome, aegis_capture_insight, aegis_create_cell, aegis_create_rule, aegis_handoff
Execute (opt-in; receipt required) aegis_propose_change, aegis_verify_changes, aegis_checkpoint, aegis_generate_manifest

Receipt flow: Call aegis_request_receipt with the operation and arguments to obtain a single-use, state-bound token (300s TTL). See MCP Gateway Guide.

SDK

from aegis_sdk import Governance

gov = Governance(project_root='.')
print(gov.grade(), gov.fitness_landscape(bayesian=True))

📐 Core Rules

The system's foundational rules — 19 inherited behavioral defaults:

Rule Trigger Purpose
providence always_on Codebase grounding, no hallucinations, diagnose-before-repair
cost-optimization always_on Token efficiency, diffs-only edits, FPSR metric (>80%)
subagent-delegation always_on Context protection, concurrency limits, delegation floor
architectural-tenets model_decision Pragmatism, trade-off analysis, scale-to-zero
atomic-workstream-protocol model_decision Atomic 2-5 file micro-step decomposition and verification gates
polyglot-standards model_decision Unified entrypoints (Makefiles), containerization
feature-specs model_decision PRD structure, acceptance criteria, documentation
testing model_decision Behavioral testing, sad paths, ast.parse ban
documentation model_decision ADRs, actionable READMEs, Mermaid diagrams
destructive-ops model_decision Dry-run mandates for IaC, database mutations, bulk git
git-workflow model_decision Conventional commits, .gitignore verification
desktop-automation model_decision PyAutoGUI/xdotool safety, focus verification
core-change-protocol model_decision Approval gates for core modifications
tdd-protocol model_decision Test-driven development with sequential phase gates
optional-import-guard model_decision try/except guards on optional dependencies
ci-green-before-release model_decision Requires green CI before release or deployment
gitflow-review-gate model_decision Enforces reviewed Gitflow branch transitions
no-pre-existing-excuse model_decision Requires fixing relevant pre-existing failures instead of dismissing them

🔧 Agent Skills

15 specialized skills coordinate complex behaviors via typed envelopes and file-buffered handoffs. See the Skill Graph Guide for schemas and coordination workflows.

Skills Description
adaptive-reviewer, staff-review, spec-synthesizer Multi-lens adversarial review and actionable plan synthesis
security-audit, performance-audit, governance-auditor Specialized audits for AppSec (OWASP), latency/GC, and invariant compliance
genesis, incident-debug, post-mortem Codebase reconnaissance, systematic incident debugging, blameless post-mortems
refactoring-pilot, readme-writer, visual-analyst Mikado Method refactoring, documentation generation, UI/screen analysis
session-monitor, session-preflight, domain-researcher Real-time waste tracking, environment pre-flight probes, external research

📋 Adaptive Rules & Verification

Adaptive rules live in .aegis/rules/ (invariant, boundary, trap, persona, contract). Rules evolve using Wilson-bounded fitness intervals and decay to zero when unreinforced. See the Rule Lifecycle Guide.

All changes are gated by aegis check:

  • Layer 1: Deterministic AST analysis (call graph reachability, mutation testing, import guards, branch coverage).
  • Layer 2: Adversarial Rebuttal Protocol with Spec Agent prosecution, Code Agent defense, and binding Arbiter verdict (SHIP / REVISE / BLOCK). See the Verification Pipeline Guide.

⚙️ Core Architecture

  • Zero Runtime Dependencies: Pure Python standard library (dependencies = []).
  • Scale-to-Zero: Zero daemons, zero background threads, zero persistent idle consumption.
  • Local Privacy: Telemetry and evidence remain strictly local in .aegis/evidence/.
  • Complete script, tool, and module reference catalog is available in SCRIPTS.md.

License & Privacy

Apache 2.0 — Copyright 2026 Nicholas Seney. See NOTICE, PRIVACY.md, and SECURITY.md.

Metadata

Release files for aegis-guardrails 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aegis-guardrails 3.0.0
File Size Uploaded
aegis_guardrails-3.0.0.tar.gz 421.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aegis-guardrails 3.0.0
File Interpreter ABI Platform
aegis_guardrails-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 867.4 kB

Release files / aegis_guardrails-3.0.0.tar.gz

Download URL aegis_guardrails-3.0.0.tar.gz
Size 421.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a65851e1fc03e4255150f41b99b0e9ea897e3bc3fb5a3060f1126a635c33eaba
BLAKE2b-256 checksum
How to use checksums
0b6e0ea3c53a87de2c3bac69ec9652e5af303d84179ae1fa4ff7331e1ac0c8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / aegis_guardrails-3.0.0-py3-none-any.whl

Download URL aegis_guardrails-3.0.0-py3-none-any.whl
Size 445.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc01eceb036d99482a847afb923c9cdc0c1326bc9d3433478a5b329d652ae693
BLAKE2b-256 checksum
How to use checksums
59e52ea546b7e4c94720764b445790869ff77c620c67dd05305cf704b56842bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

This release

3.0.0 This release

2 release files

2.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page