If you find Agent Rigor helpful for your workflows, we'd appreciate a star!
Help your AI agent adopt software engineering best practices directly into its workflow.
The Problem • Quickstart • Core Philosophy • What's Inside • Evaluation
AI coding agents often struggle not from a lack of intelligence, but from a lack of engineering discipline. Left to their own devices, agents typically:
- Skip planning and jump straight to implementation.
- Write plausible-looking code that misses edge cases.
- Get trapped in "doom loops" (fix-forward spirals) instead of backing out of bad approaches.
- Suffer from context amnesia, forgetting lessons learned between sessions.
Agent Rigor is a framework of modular Agent Skills designed to encourage mature, battle-tested software engineering practices. It provides structured instructions, verification steps, and safeguards that guide agents toward empirical discipline at every step.
Turn your unpredictable, hallucinating AI into a relentless, Senior-level 10x Engineer.
Get Agent Rigor running in your project quickly.
Run this in your project root:
curl -sSL https://raw.githubusercontent.com/MeherBhaskar/agent-rigor/main/install.sh | bash(Or manually clone this repo into an .agents/ directory).
Just drop this prompt to your AI:
"I need to build [feature]. Read
.agents/SYSTEM_CORE.mdand begin."
Your agent will now plan, execute, review, and persist its context methodically.
Agent Rigor is pure markdown. It works natively with standard AI tools:
| 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. |
Checkout the examples/ folder for ready-to-use templates.
- Actionable Protocols: Instructions should be verifiable steps with exit criteria.
- Empirical Sovereignty: Claims require evidence; tests should pass.
- Atomic State Transitions: Code ideally moves only between known-good states.
- Anti-Rationalization: Anticipates common AI shortcuts (e.g., skipping tests).
- Dynamic Modularity: Triggers only necessary skills to save context tokens.
- Quickstart Guide — Step-by-step setup
- Cheatsheet — Quick reference for daily use
- Context Management — Understanding the modular architecture
- Contributing — Help us build smarter agents
Agent Rigor includes a library of 18 specialized Agent Skills. The Apex Kernel routes the agent to the appropriate Phase Director, loading only the necessary skills to help manage the context window.
Phase 1: Mission Synthesis
- Requirement Distillation - Extracts technical specifications from user requests.
- Strategic Decomposition - Breaks down requirements into independent, actionable sub-tasks.
- Interrogation Protocol - Questions the user to resolve ambiguities before writing code.
Phase 2: Execution Engine
- Convergent Iteration - Encourages code changes to move steadily toward the goal without regressions.
- State Checkpoint Protocol - Suggests committing known-good project states to allow rollbacks.
- Incremental Proof Cycles - Promotes continuous micro-testing during implementation.
Phase 3: Verification Matrix
- Pentagonal Audit - A 5-point code review evaluating security, performance, edge cases, state bounds, and types.
- Entropy Reduction - Cleans up technical debt, commented-out code, and temporary logs.
Phase 4: Cognitive Persistence
- Structural Cartography - Maintains a map of the codebase for efficient semantic navigation.
- Context Lifecycle - Manages the ingestion and eviction of data in the agent's context window.
- Source Verification - Encourages citing actual codebase locations rather than guessing paths.
Phase 5: Interface Protocols
- Bounded Observation - Helps prevent endlessly reading irrelevant files.
- Semantic Navigation - Promotes targeted file searches.
- User Escalation - Pauses the agent and asks the human when critical decisions are needed.
Phase 6: Adaptive Protocols
- Recursive Self-Correction - A protocol that activates when an agent gets stuck on a failing test suite.
- Scope Containment - Helps prevent "scope creep" by bounding the agent's actions to the original plan.
- Experiential Consolidation - Extracts lessons learned from failures for future tasks.
- Cascade Orchestration - Manages multi-step failures while maintaining the original goal intent.
| Task Category | Baseline ReAct | Superpowers | Agent-Skills | Agent-Rigor |
|---|---|---|---|---|
| Plan-Then-Build | 0.52 | 0.51 | 0.48 | 0.60 |
| Know When to Fold | 0.49 | 0.53 | 0.48 | 0.62 |
| Verify-Or-Die | 0.46 | 0.46 | 0.46 | 0.63 |
| Doom Loop Gauntlet | 0.45 | 0.45 | 0.45 | 0.55 |
| Don't Break the Build | 0.45 | 0.44 | 0.44 | 0.64 |
Key Finding: A strong positive correlation (
$r = 0.87$ ) was observed between process discipline and final outcome quality. Better processes generally lead to better code.