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 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 4 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_rules, aegis_grade, aegis_coverage, aegis_rule_fitness, aegis_audit_security, aegis_audit_performance, aegis_poll_verification
Write (default; receipt required) aegis_report_outcome, aegis_capture_insight, 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 — 18 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, trap, gate, method). 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.3.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.3.0
File Size Uploaded
aegis_guardrails-3.3.0.tar.gz 447.9 kB Details

Built distribution (wheel)

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

Total release size: 966.7 kB

Release files / aegis_guardrails-3.3.0.tar.gz

Download URL aegis_guardrails-3.3.0.tar.gz
Size 447.9 kB
Tags Source
SHA-256 checksum
How to use checksums
99367fd3eb86c31831a20b82849420050ac7a7d43199c1a3fada743413e17e02
BLAKE2b-256 checksum
How to use checksums
8bf35d1994442130779afe295bc363d8db1165564ee82391cb61a3700841b038
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 15, 2026.

Transparency log

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

Download URL aegis_guardrails-3.3.0-py3-none-any.whl
Size 518.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76f6b5cd3927c4cb895854f9c1e9d6307b7a422e43f86528f642a8c1667d6971
BLAKE2b-256 checksum
How to use checksums
c5c849fa197aacc01aff505266e8e808cac7072cfff9c0626f87223d100a07c7
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 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

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