agentleFS
botdigit-officialbotdigit-official/agent-blueprint/skills/15-autonomous-loop-and-simplification/SKILL.md

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
  1. Distinctive:

    Zero Over-Engineering: Every pull request and feature diff is audited by a dedicated simplification gatekeeper to strip away speculative …

    line 16
  2. Distinctive:

    Do not build extensibility hooks for hypothetical future features.

    line 102
  3. Distinctive:

    If an interface or trait has only one implementation, remove the interface and use the concrete struct/function directly.

    line 106
  4. Distinctive:

    Avoid abstract factory patterns, strategy objects, and generic middleware unless at least 3 distinct consumers exist right now.

    line 107
  5. Distinctive:

    Prefer 20 lines of clear, standard sequential code over 5 lines of dense functional metaprogramming or complex reflection.

    line 110
  6. Very specific:

    Do not add a new npm package, crate, or Python package for utilities that take 5 lines of native standard library code (e.g.

    line 114
  7. Distinctive:

    When refactoring, if the code size increased by 50% without new functional capabilities, the refactor is considered a failure.

    line 117
  8. Distinctive:

    If 2 consecutive review cycles produce zero file modifications or zero git commits, terminate the review loop immediately.

    line 138

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  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 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 Pipeline

The 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 AgentCore MandateFailure Trigger
qualityMemory safety, race conditions, OWASP Top 10, error handlingUncaught promises, unwrap(), missing auth
implementationValidates code fulfills the plan specificationsScope creep, missing acceptance criteria
testingVerifies automated unit & regression coverageMissing tests for new logic, weak assertions
simplificationGuards against over-engineering and premature generalizationUnnecessary layers, generic factories, YAGNI violations
documentationConfirms living docs, API contracts, and changelog syncOutdated 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 ──► Database

Loop Guardrails & Stalemate Prevention

To prevent infinite execution loops or circular AI debates:

  1. 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.
  2. Review Patience Limit (review-patience):
    • If 2 consecutive review cycles produce zero file modifications or zero git commits, terminate the review loop immediately.
  3. Graceful Pause & Plan Editing:
    • Developers can edit TASK.md or the plan file between iterations. When resumed, the loop re-reads the plan with fresh context.
  4. Plan Archiving:
    • Once all tasks and reviews pass, move or tag the plan under docs/plans/completed/ or mark complete in TASK.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.