15-autonomous-loop-and-simplification
Skill1 starsChanged 53 days agoMITView on GitHub
Version: 1.0.0 Compatible: agent_blueprint >= 1.0 Requires: orchestrator, context-engineering, phase-loop-delivery, testing Outputs: plan.md, review-report.md, simplification-audit.md Inspired by the autonomous Ralph Loop in Ralphex (umputun/ralphex), this skill provides the autonomous execution loop for AI coding agents and introduces a strict Anti-Overengineering & Simplification Review Pipeline. It guarantees two non-negotiable outcomes: 1. Unattended Execution Reliability: Agents iteratively process plans task-by-task with fresh session bounds, run validation commands after every step, and commit atomically without token fatigue. 2. Zero Over-Engineering: Every pull request…
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Zero Over-Engineering: Every pull request and feature diff is audited by a dedicated simplification gatekeeper to strip away speculative …
- Distinctive: line 102
Do not build extensibility hooks for hypothetical future features.
- Distinctive: line 106
If an interface or trait has only one implementation, remove the interface and use the concrete struct/function directly.
- Distinctive: line 107
Avoid abstract factory patterns, strategy objects, and generic middleware unless at least 3 distinct consumers exist right now.
- Distinctive: line 110
Prefer 20 lines of clear, standard sequential code over 5 lines of dense functional metaprogramming or complex reflection.
- Very specific: line 114
Do not add a new npm package, crate, or Python package for utilities that take 5 lines of native standard library code (e.g.
- Distinctive: line 117
When refactoring, if the code size increased by 50% without new functional capabilities, the refactor is considered a failure.
- Distinctive: line 138
If 2 consecutive review cycles produce zero file modifications or zero git commits, terminate the review loop immediately.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
15 — Autonomous Execution Loop & Anti-Overengineering Review
Version: 1.0.0
Compatible: agent_blueprint >= 1.0
Requires: orchestrator, context-engineering, phase-loop-delivery, testing
Outputs: plan.md, review-report.md, simplification-audit.md
Purpose
Inspired by the autonomous Ralph Loop in Ralphex (umputun/ralphex), this skill provides the autonomous execution loop for AI coding agents and introduces a strict Anti-Overengineering & Simplification Review Pipeline.
It guarantees two non-negotiable outcomes:
- Unattended Execution Reliability: Agents iteratively process plans task-by-task with fresh session bounds, run validation commands after every step, and commit atomically without token fatigue.
- Zero Over-Engineering: Every pull request and feature diff is audited by a dedicated simplification gatekeeper to strip away speculative abstractions, bloated factories, and premature generalizations.
The Autonomous Execution Loop (Ralph Loop)
┌────────────────────────────────────────────────────────┐
│ 1. Read Plan & Extract Next Uncompleted Task │
│ (Finds `### Task N:` with `- [ ]` checkboxes) │
└──────────────────────────┬─────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 2. Execute Task in Fresh Bounded Session │
│ (Minimal context window; target files only) │
└──────────────────────────┬─────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 3. Run Validation Commands │
│ (e.g., `cargo test`, `npm test`, `golangci-lint`) │
└──────────────────────────┬─────────────────────────────┘
│
┌────────────┴────────────┐
│ Pass? │
▼ ▼
[YES] [NO]
┌──────────────┐ ┌────────────────────────┐
│ Mark `[x]` │ │ Forensics & Retry │
│ Atomic Commit│ │ (Max 3 retries before │
└──────┬───────┘ │ graceful pause) │
│ └────────────────────────┘
▼
All Tasks Completed?
├── NO ──► Loop back to Step 1 with fresh session
└── YES ──► Advance to Multi-Agent Review PipelineThe 5-Agent Review Pipeline
Once all plan tasks pass their validation commands, the changes undergo an automated 5-agent review before declaring completion:
┌────────────────────────┐
│ FEATURE DIFF FOR REVIEW│
│ (`git diff main...HEAD`)│
└───────────┬────────────┘
│
┌──────────────┬─────────────┼──────────────┬──────────────┐
▼ ▼ ▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐ ┌──────────────┐ ┌───────────┐
│ QUALITY │ │IMPLEMENT. │ │ TESTING │ │SIMPLIFICATION│ │DOCUMENTAT.│
│ │ │ │ │ │ │(Anti-Overeng)│ │ │
│ Bugs, │ │ Verifies │ │ Coverage, │ │ Strips bloat,│ │ Syncs │
│ security, │ │ stated │ │ edge cases│ │ premature │ │ docs/ and │
│ race cond.│ │ goals only│ │ & mocks │ │ abstractions│ │ CHANGELOG │
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘ └──────┬───────┘ └─────┬─────┘
└──────────────┴─────────────┼──────────────┴───────────────┘
│
▼
┌────────────────────────┐
│ Consolidated Fix Wave │
│ (Apply surgical fixes) │
└────────────────────────┘| Review Agent | Core Mandate | Failure Trigger |
quality | Memory safety, race conditions, OWASP Top 10, error handling | Uncaught promises, unwrap(), missing auth |
implementation | Validates code fulfills the plan specifications | Scope creep, missing acceptance criteria |
testing | Verifies automated unit & regression coverage | Missing tests for new logic, weak assertions |
simplification | Guards against over-engineering and premature generalization | Unnecessary layers, generic factories, YAGNI violations |
documentation | Confirms living docs, API contracts, and changelog sync | Outdated docs/, missing [Unreleased] changelog entry |
The Anti-Overengineering Standard (simplification)
AI coding agents have a notorious tendency to over-engineer: generating generic interfaces for single implementations, complex event buses for simple function calls, and multi-tier abstractions where a 10-line helper suffices.
The simplification review rule must evaluate every modified file against these 6 Anti-Bloat Laws:
1. The YAGNI Law (You Aren't Gonna Need It)
- Do not build extensibility hooks for hypothetical future features.
- Build strictly for the stated requirement today.
2. Concrete Over Abstract
- If an interface or trait has only one implementation, remove the interface and use the concrete struct/function directly.
- Avoid abstract factory patterns, strategy objects, and generic middleware unless at least 3 distinct consumers exist right now.
3. Fewer Lines, Zero Cleverness
- Prefer 20 lines of clear, standard sequential code over 5 lines of dense functional metaprogramming or complex reflection.
- Code should be immediately readable by a junior engineer without external documentation.
4. Zero Unnecessary Dependencies
- Do not add a new npm package, crate, or Python package for utilities that take 5 lines of native standard library code (e.g.
left-pad, trivial string manipulations, basic HTTP clients).
5. Net Deletion is a Feature
- When refactoring, if the code size increased by 50% without new functional capabilities, the refactor is considered a failure.
- Actively delete dead code, unused parameters, obsolete comments, and redundant wrappers.
6. Minimal Sufficient Architecture
Over-Engineered (REJECT):
Controller ──► DTOAssembler ──► ServiceFacade ──► DomainService ──► GenericRepositoryInterface ──► SqliteRepo
Minimal & Clean (APPROVE):
Route Handler ──► Query/Service Function ──► DatabaseLoop Guardrails & Stalemate Prevention
To prevent infinite execution loops or circular AI debates:
- Max Task Iterations:
- Any single plan task is limited to 3 execution attempts. If validation commands still fail after 3 attempts, pause and prompt the developer.
- Review Patience Limit (
review-patience):- If 2 consecutive review cycles produce zero file modifications or zero git commits, terminate the review loop immediately.
- Graceful Pause & Plan Editing:
- Developers can edit
TASK.mdor the plan file between iterations. When resumed, the loop re-reads the plan with fresh context.
- Developers can edit
- Plan Archiving:
- Once all tasks and reviews pass, move or tag the plan under
docs/plans/completed/or mark complete inTASK.md.
- Once all tasks and reviews pass, move or tag the plan under
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- 00-orchestratorSkill
- 01-discoverySkill
- 02-project-contextSkill
- 03-business-architectureSkill
- 04-architectureSkill
- 05-documentationSkill
- 06-codebase-auditSkill
- 07-securitySkill
- 08-testingSkill
- 09-performanceSkill
- 10-auditSkill
- 11-controlled-source-of-truthSkill
- 12-context-engineeringSkill
- 13-phase-loop-deliverySkill
- 14-forensics-and-debuggingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

