Agent Rigor – Stop your AI coding assistant from doom-looping
Agent Rigor is a structured framework that prevents AI coding agents from falling into doom-loops by enforcing mandatory protocols, verification gates, and anti-rationalization safeguards. It uses a progressive disclosure system with three context tiers and six operational phases to enforce empirical discipline at every step.
Notifications You must be signed in to change notification settings
Fork 0
Star 2
BranchesTags
Open more actions menu
Folders and files
NameName
Last commit message
Last commit date
Latest commit
History
8 Commits
8 Commits
assets
assets
examples
examples
skills
skills
templates
templates
.gitignore
.gitignore
CHEATSHEET.md
CHEATSHEET.md
CONTEXT_MANAGEMENT.md
CONTEXT_MANAGEMENT.md
CONTRIBUTING.md
CONTRIBUTING.md
QUICKSTART.md
QUICKSTART.md
README.md
README.md
SYSTEM_CORE.md
SYSTEM_CORE.md
install.sh
install.sh
Repository files navigation
Strict empirical discipline for your AI coding assistant.
Stop watching your AI agent code itself into a corner. Give it discipline.
Quickstart • Philosophy • Architecture • Supported Agents
🚀 Why Agent Rigor?
Most AI coding agents fail not because they lack intelligence, but because they lack discipline. When left to their own devices, they:
❌ Skip planning and jump straight to implementation.
❌ Write plausible-looking code that doesn't actually work.
❌ Get trapped in "doom loops" (fix-forward spirals).
❌ Forget what they learned between sessions (context amnesia).
❌ Suffer from "context rot" by loading too many instructions at once.
Agent Rigor solves this. It provides a structured, multi-layer progressive disclosure framework: a set of mandatory protocols, verification gates, and anti-rationalization safeguards that force empirical discipline at every step.
🛡️ Core Philosophy
Actionable Protocols: Every instruction is a verifiable step with exit criteria, not an essay.
Empirical Sovereignty: Claims require evidence. "Seems right" is never sufficient.
Atomic State Transitions: The codebase moves between known-good states. Broken states are never committed.
Anti-Rationalization: Every skill actively anticipates and rebuts the excuses agents use to skip discipline.
Progressive Disclosure: The agent reads only the files it needs for the current phase, saving tokens and preventing instruction neglect.
🏗️ Architecture
The system is organized into a robust 3-tier hierarchy using Progressive Disclosure to prevent context window collapse.
The 3-Tier Context Hierarchy
L1: Apex Kernel (SYSTEM_CORE.md): Always-on routing and non-negotiable laws.
L2: Phase Directors (00_PHASE_DIRECTOR.md): Just-in-time orchestration loaded only when entering a phase.
L3: Skill Protocols (skills/*.md): Deep execution guidelines loaded only when requested by the Director.
The Operational Loop
graph TD A[Phase 1: Mission Synthesis] -->|PLAN.md| B(Phase 2: Execution Engine) B -->|Committed Code| C{Phase 3: Verification Matrix} C -->|CRITICAL Findings| B C -->|Zero Findings| D[Phase 4: Cognitive Persistence] D -->|Context Snapshot| A
subgraph Phase 6: Adaptive Protocols Z[Self-Correction / Scope Defense / Consolidation] end
B -.->|3-Strike Failure| Z Z -.->|Recovery| B
Loading
🛠️ The 6 Operational Phases
Phase Purpose Key Skills
- Mission Synthesis
Requirements & Planning Requirement Distillation, Strategic Decomposition
- Execution Engine
Implementation & Testing Convergent Iteration, State Checkpointing
- Verification Matrix
Quality & Review Gates Pentagonal Audit, Entropy Reduction
- Cognitive Persistence
Memory & Knowledge Context Lifecycle, Structural Cartography
- Interface Protocols
Safe Environment Interaction Bounded Observation, Semantic Navigation
- Adaptive Protocols
The Immune System Recursive Self-Correction, Scope Containment
⚡ Quickstart
Get Agent Rigor working in your project in under 2 minutes.
- Bootstrap Your Project
Run the installation script in your project root:
curl -sSL https://raw.githubusercontent.com/MeherBhaskar/agent-rigor/main/install.sh | bash
(Alternatively, clone this repo into an .agents/ directory).
- Tell Your Agent to Start
Simply prompt your agent with:
"I need to build [feature]. Read .agents/SYSTEM_CORE.md and begin Phase 1 (Mission Synthesis)."
The agent will automatically read the Phase 1 Director, create a PLAN.md, and orchestrate its own work through implementation, review, and context saving.
🤖 Supported Agents
Agent Rigor is pure markdown and platform-agnostic. It works natively with:
Agent / IDE Integration Method
Cursor Point to .agents/SYSTEM_CORE.md in your .cursorrules or .mdc files.
Claude Code Include a reference in your CLAUDE.md.
GitHub Copilot Reference in .github/copilot-instructions.md.
Gemini CLI / Antigravity Include in .agents/AGENTS.md.
Aider Pass via --read .agents/SYSTEM_CORE.md.
See the examples/ folder for ready-to-use configuration templates.
🤝 Contributing
We welcome contributions to make agents smarter and more disciplined! Please see our Contributing Guidelines to understand how to design skills that agents actually follow.
If this framework saves your agent from a doom loop, consider leaving a ⭐!
About
A self-sufficient operating system for autonomous coding agents.
Resources
Readme
Contributing
Contributing
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
2 stars
Watchers
0 watching
Forks
0 forks
Report repository
Releases
No releases published
Packages 0
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Shell 100.0%