← all repositories
GanyuanRan/Aegis

Reining in AI agents that code before they understand the goal

A method pack that stops AI coding agents from rewriting systems they have not read yet.

737 stars Shell Coding Assistants
Aegis
Velocity · 7d
+13
★ / day
Trend
accelerating
star history

What it does

Aegis is a collection of workflow rules and verification scripts that plug into existing AI coding hosts like Codex, Claude Code, and OpenCode. It acts as a procedural guardrail, forcing the agent to read project authority, plan against a baseline, and produce evidence before declaring success. The pack routes tasks by complexity—simple edits get light verification, while risky changes trigger full design specs and atomic task breakdowns.

The interesting bit

Rather than replacing your agent, Aegis sits in the prompt layer as a “method pack,” adding architecture-first discipline to the composable skill pattern pioneered by Superpowers. The clever part is its repair-plus-retirement track: when fixing a bug, the agent must state whether the old code path retires or remains as a fallback, which prevents the drift that usually accumulates during long sessions.

Key highlights

  • Baseline-first mandate: agents must read current project authority before making substantial changes.
  • Evidence-before-completion rule: no task is declared finished without fresh verification.
  • Portable across hosts: supports Codex, OpenCode, Claude Code, and others via host-scoped install guides and skill-discovery paths.
  • Complexity-aware routing: low-risk edits stay cheap, high-risk work triggers full planning and review gates.
  • Explicit non-authority: user instructions and target-project rules always outrank Aegis guidance.

Caveats

  • Fresh runtime evidence only exists for Codex and OpenCode; support for Claude Code, GitHub Copilot, Trae, and several other hosts is documented but still awaiting release-level smoke testing.
  • It is explicitly not a daemon or background runtime—just a method pack—so it cannot enforce policy if the host ignores its skill triggers.

Verdict

Teams already using AI agents on production codebases should look here if they are tired of agents refactoring half the repo to fix a one-line bug. If you are looking for a fully autonomous, self-enforcing AI governance platform, this is not it yet.

Frequently asked

What is GanyuanRan/Aegis?
A method pack that stops AI coding agents from rewriting systems they have not read yet.
Is Aegis open source?
Yes — GanyuanRan/Aegis is open source, released under the MIT license.
What language is Aegis written in?
GanyuanRan/Aegis is primarily written in Shell.
How popular is Aegis?
GanyuanRan/Aegis has 737 stars on GitHub and is currently accelerating.
Where can I find Aegis?
GanyuanRan/Aegis is on GitHub at https://github.com/GanyuanRan/Aegis.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.