agentleFS
douincdouinc/agent-skills/skills/loop-engineering/SKILL.md

loop-engineering

Skill1 starsChanged 5 months agoMITView on GitHub

Use when a software or repository development task requires multiple actions, repeated verification, recovery from failed attempts, or explicit completion, blocking, or user-decision criteria.

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use aegis-gateway, deploy-vercel-render and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • vpeetla-aiSkill

    aegis-gateway

    Integrate AegisAI gateway before tool side effects (notify, publish, deploy). Use when adding Slack/Telegram/WhatsApp notify, content publish, or any irreversible external action in VAP, AegisLoop, or ai-content-factory.

    Also in 6 projects that use this

  • vpeetla-aiSkill

    deploy-vercel-render

    Deploy vpeetla-ai demos: Vercel static/Next.js frontends, Render FastAPI backends, env vars, free tier gotchas. Use when shipping demos, fixing deploy failures, or adding render.yaml / vercel.json.

    Also in 6 projects that use this

  • HermeticOrmusSkill

    langgraph-orchestration

    LangGraph stateful multi-agent graphs with categorical coordination patterns and cyclic workflows. Use when building stateful AI agent systems, implementing multi-agent orchestration with conditional routing, creating cyclic workflows with persistence, or designing graph-based AI pipelines with checkpointing and human-in-the-loop patterns.

    Also in 6 projects that use this

  • junimnjwSkill

    agentic-engineering

    Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing.

    Also in 7 projects that use this

  • +8 more from vpeetla-ai

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a bounded control loop where each iteration reduces uncertainty or advances an observable result.

    line 10
  2. Very specific:

    trivial: run goal → action → verification once.

    line 26
  3. Distinctive:

    local: run the full loop with local evidence.

    line 27
  4. Distinctive:

    cross-cutting: run the full loop and apply Graph Escalation.

    line 28
  5. Distinctive:

    Read loop-protocol.md before iterating and stop-conditions.md before declaring an outcome.

    line 30
  6. Distinctive:

    Verify: run the planned check and compare expected with actual evidence.

    line 38
  7. Very specific:

    When graph-engineering is installed, it is a REQUIRED SUB-SKILL for those cross-cutting cases.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “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

Loop Engineering

Overview

Use a bounded control loop where each iteration reduces uncertainty or advances an observable result.

Entry Contract

Before acting, establish:

  • one objective and its boundaries;
  • observable completion evidence;
  • safety, authority, and compatibility constraints;
  • an iteration, time, or tool budget;
  • the smallest verification command or observation that can test the next action.

Infer only reversible, low-risk defaults. If missing information would materially change public behavior, cost, scope, or an irreversible action, return needs-user-decision.

Classify the task before acting:

  • trivial: run goal → action → verification once;
  • local: run the full loop with local evidence;
  • cross-cutting: run the full loop and apply Graph Escalation.

Read loop-protocol.md before iterating and stop-conditions.md before declaring an outcome.

Run the Loop

Repeat plan → act → verify → decide:

  1. Plan: choose one falsifiable hypothesis, one bounded action, and its expected evidence.
  2. Act: perform the smallest authorized action that tests the hypothesis or advances the objective.
  3. Verify: run the planned check and compare expected with actual evidence.
  4. Decide: complete, retry with new evidence, replan, block, or request user direction.

Track the protocol state in task memory or temporary scratch space. Never add loop transcripts, chain-of-thought, or speculative reasoning to durable project documentation.

Graph Escalation

Broaden local evidence into a map when:

  • a public interface, shared schema, global configuration, or deployment boundary changes;
  • failures appear in multiple components or layers;
  • the same dependency knowledge is repeatedly rediscovered;
  • impact or rollout order cannot be established from the local module.

When graph-engineering is installed, it is a REQUIRED SUB-SKILL for those cross-cutting cases. If unavailable, build a compact evidence-backed impact map inline and continue; do not fail only because the companion skill is absent.

graph-engineering never needs to invoke this skill.

Progress and Final Output

During long tool work, report evidence, the decision, and next action at least every 60 seconds without exposing private reasoning.

Finish with exactly one outcome:

OutcomeRequired report
completeacceptance evidence, verification commands or observations, test limitations, and intentional changes
blockedblocking condition, attempts made, recoverable workspace state, and next action
needs-user-decisiondecision required, evidence, and materially different options

Common Mistakes

MistakeCorrection
Repeating the same actionRequire new evidence or replan.
Treating a passing check as sufficientMatch it to every completion criterion.
Expanding scope after each failureExpand only across an observed dependency boundary.
Calling ambiguity a technical blockerUse needs-user-decision when user intent must govern.
Persisting execution history as architecturePersist only stable, evidence-backed project knowledge.

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.