GanyuanRan/Aegis

Make AI coding agents architecture-aware: baseline-first, evidence-verified, drift-checked, and safe across long tasks.

Aegis – Method Pack for Trustworthy AI Coding Agents

What it is

  • A method‑pack that adds engineering discipline to AI‑driven coding assistants (Codex, Claude Code, OpenCode, DeepSeek, Kimi, etc.).
  • It does not provide a runtime or a daemon; it supplies a set of “skills”, policies, and verification steps that the host agent can invoke.

Why you might care

  • Reduces the need for you to constantly watch the agent (“stop babysitting”).
  • Improves safety: in the authors’ benchmark the contract‑pass rate rose from ~62 % to ~93 % and unsafe outcomes dropped to 0 %.
  • Gives you proof before “done” – the agent must produce fresh evidence (e.g., test results, design checks) before it declares a task finished.
  • Keeps simple requests simple; heavyweight ceremony is only added when the task truly warrants it.

Key concepts

Concept What it does
Baseline alignment Before editing, the agent checks the current project baseline (owners, contracts, boundaries) to avoid guessing.
Evidence‑based completion The agent must attach verification artifacts (tests, design review, risk analysis) that you can inspect.
Retirement trigger Old or “ghost” code paths are tracked and can be automatically retired, preventing silent technical debt.
UI/UX governance Optional skill (ui‑ux‑governance) that enforces UI/UX design rules and produces scoped experience evidence.
Multi‑host support Packs are installable as plugins for many AI coding hosts (Codex, Claude Code, OpenCode, DeepSeek Harness, Kimi, etc.).
TDD mode Can be set to off, auto, or strict; when on, the agent routes tasks through test‑first workflows.
Activation mode automatic (default) or explicit; controls whether the pack auto‑activates on host start.

Installation (quick‑start)

  1. Send the following prompt to your AI coding agent (replace the host name if needed):
    Read https://github.com/GanyuanRan/Aegis, identify my current AI coding host, and install Aegis globally using the correct host guide. …
    
  2. The agent will run the host‑specific plugin command (e.g., dsh plugin --profile <profile> add "git+https://github.com/GanyuanRan/Aegis.git").
  3. After installation, verify with the doctor script:
    cd <aegis-method-pack-root>
    python scripts/aegis-doctor.py --write-config --json
    
    Success is a JSON containing "ok": true, "workspaceSupport": "available", and "configStatus": "configured".
  4. (Optional) Switch activation or TDD mode with the same doctor script, e.g.:
    python scripts/aegis-doctor.py activation-mode explicit
    python scripts/aegis-doctor.py tdd-mode auto
    

Supported hosts (status as of the README)

  • Fully verified: Codex, OpenCode.
  • Guides available, smoke‑tested pending: Claude Code, CodeBuddy, DeepSeek‑TUI, DeepSeek Harness, Trae, GitHub Copilot, Qoder, Kimi Code CLI, ZCode, Grok Build, CC GUI (JetBrains IDEA).
  • Structural support only: Antigravity CLI/IDE/App, Pi CLI, OMP, OpenClaw, Hermes Agent.
  • Retired: Gemini CLI.

Measured benchmark

  • Frozen A/B benchmark (120 runs, 20 cases) using the same model (gpt‑5.6‑sol / xhigh).
  • Contract pass rate: 61.67 % → 93.33 % (+31.67 pp).
  • Unsafe outcomes: 13.33 % → 0 %.
  • Results are advisory, not an independent audit, and apply only to Aegis 2.7.6 (2026‑08‑11).
  • Full data and methodology are in benchmarks/ and docs/current/AEGIS_AGENTIC_BENCHMARK_BASELINE.md.

Runtime experience (optional)

  • The authors also ship Autoloom, a Windows‑only desktop client that embeds Aegis methods into the coding workflow. Autoloom is free but its source is not public; it provides a UI for change‑necessity analysis, complexity governance, and delivery review.

How to use it day‑to‑day

  • After installation, simply talk to your agent as you normally would. Prefix commands to invoke Aegis behavior, e.g.:
    Aegis goal: Refactor the auth module without breaking existing contracts.
    Grill me on whether we should ship a hosted version first.
    TDD Route: strict
    
  • The pack will automatically decide whether to run a lightweight fast‑path or engage the full evidence‑gathering workflow.

Development & testing

  • End‑to‑end test suite: bash tests/e2e/run-all.sh --full --host-profile fast.
  • Targeted checks for boundary compliance, workflow quality, install verification, etc. (see the tests/e2e/ scripts).
  • Contribution guidelines are in CONTRIBUTING.md.

License

  • MIT License.

Bottom line: Aegis is an open‑source “method pack” that layers disciplined engineering practices onto existing AI coding agents, aiming to make their output safer and more trustworthy while keeping the developer’s workflow lightweight.

Related

  • Project
  • Project
  • Project
  • Project
  • Project