loop-engineering
Skill4 starsChanged 4 months agoMITView on GitHub
Use when a repeatable task must become a bounded Trigger -> Execute -> Verify -> State loop, scheduled automation, goal agent, or metric-driven research cycle.
33 other projects use a version of this.
Adopted by
Most recently taken up by
- vpeetla-ai/venkat-ai-platformtheir own version, first seen Nov 8, 2026
- victor-hac-work/loop-engineering-skillstheir own version, first seen Nov 8, 2026
- jggomez/expert-ai-developer-skillstheir own version, first seen Nov 6, 2026
- Hakkadaikon/hymmetheir own version, first seen Oct 26, 2026
- vpeetla-ai/swarm-agent-patterntheir own version, first seen Oct 20, 2026
- axross/skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use aegis-gateway, deploy-vercel-render and 9 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-aiSkillaegis-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-aiSkilldeploy-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
HermeticOrmusSkilllanggraph-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
- +8 more from vpeetla-ai
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- bojieli/ai-agent-book-projects★ 53ksame name
- bojieli/ai-agent-book★ 53ksame name
- huytieu/COG-second-brain★ 1.3ksame name
- akitaonrails/my-skills★ 283same name
- jggomez/expert-ai-developer-skills★ 31same name
- aiconnai/agentshield★ 21same name
- sxivansx/loop-engineering★ 10same name
- victor-hac-work/loop-engineering-skills★ 5same name
- aiconnai/engram★ 3same name
- Connected-Mate/fable-mindset★ 2same name
23 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-engineeringSkill
- agent-teams-commandSkill
- context-managerSkill
- graph-engineeringSkill
- harness-engineeringSkill
- verify-before-claimSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Goal: run until a defined end state or cap.
- Distinctive: line 34
Automation: start from an external schedule/event.
- Very specific: line 39
Use graph-engineering instead when explicit data dependencies, independent branches, typed joins, or node-local recovery create measurable …
- Distinctive: line 54
Write this contract before acting:
- Distinctive: line 71
Orient: update one hypothesis; choose the smallest action that can change the metric.
- Distinctive: line 72
Decide: check scope, permissions, expected evidence, and rollback.
- Distinctive: line 74
Verify: use a deterministic check or independent checker.
- Distinctive: line 76
Stop/continue: stop on success, cap, permission boundary, regression, repeated signature, or no useful work.
- Very specific: line 78
Use single-agent by default, maker-checker for ambiguous/high-risk evaluation, and manager-workers only for genuinely independent work with …
- Very specific: line 80
If a validated Graph owns the dependency topology, this skill owns only the bounded retry behavior inside its declared loop nodes.
- Distinctive: line 123
Every iteration changes evidence, state, or diagnosis within finite budgets.
“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.
Files
Loop Engineering
<skill_contract>
<input>A repeatable task with inspectable state, finite budgets, permissions, and an independent verifier.</input>
<output>A validated Trigger -> Execute -> Verify -> State contract plus resumable run receipts.</output>
<done>The declared metric or stop condition is supported by fresh validator and verifier evidence.</done>
<non_goals>Dependency-graph orchestration, unbounded autonomy, or self-certified completion.</non_goals>
Build loops only when repeated execution creates evidence. Every loop needs admission, a validated contract, durable state, independent evaluation, bounded retries, stop/recovery rules, and a final receipt.
Usage Template
Provide: objective, trigger, scope/non-goals, inputs, state/artifact paths, metric, verifier, permissions, budgets, stop condition, recovery, and write-back. See references/ci-repair-loop-example.md for a worked contract.
Workflow
<intake>Select one mode:
- Goal: run until a defined end state or cap.
- Loop: poll/iterate while eligible work exists.
- Automation: start from an external schedule/event; the trigger is not execution evidence.
- AutoResearch: vary experiments against an objective metric in a sandbox.
Admit only if work is repeatable, outputs are inspectable, a verifier exists, failures are recoverable, and autonomy is worth the orchestration/review cost. Otherwise use a one-shot workflow.
Use graph-engineering instead when explicit data dependencies, independent
branches, typed joins, or node-local recovery create measurable value. A Graph
node may use this Loop contract for local repetition; Graph width does not
replace finite Loop depth.
</intake><unknowns_gate>
Classify unknowns as known, probeable, testable, or blocked. Missing objective, verifier, permission boundary, budget, or recovery is NEEDS_INPUT; do not infer these controls from intent. Unknown implementation details may be resolved inside the loop only when the probe is bounded and reversible.
</unknowns_gate>
<execute>Write this contract before acting:
Objective: Mode: Goal | Loop | Automation | AutoResearch
Trigger: Scope: Non-goals:
Owner: Inputs:
Artifacts path: State path: Work clock:
Success metric: Evidence: Verifier:
Topology: single-agent | maker-checker | manager-workers
Max iterations: Time limit: Budget:
Review budget: Stop condition:
Write-back: Permission boundary: Recovery:Validate it with scripts/validate_loop_contract.py --strict. Then iterate:
- Observe: load durable state, fresh environment evidence, budgets, and last error.
- Orient: update one hypothesis; choose the smallest action that can change the metric.
- Decide: check scope, permissions, expected evidence, and rollback.
- Act: execute one bounded action and capture artifact/diff/receipt.
- Verify: use a deterministic check or independent checker; compare metric and guardrails.
- State: append diagnosis, action, evidence, delta, budget, and next decision atomically.
- Stop/continue: stop on success, cap, permission boundary, regression, repeated signature, or no useful work.
Use single-agent by default, maker-checker for ambiguous/high-risk evaluation, and manager-workers only for genuinely independent work with an explicit integration gate.
If a validated Graph owns the dependency topology, this skill owns only the
bounded retry behavior inside its declared loop nodes.
</execute><evaluate>The verifier must test the declared result rather than reward activity. Check evidence freshness, metric movement, guardrails, scope, and state replay. For external or consequential actions, require approval and verified rollback before crossing the boundary.
</evaluate><retry_policy>
max_attempts equals the contract's finite max iterations. Retry only after a named diagnosis and a changed input, tool, scope, or strategy. Stop on the same failure signature twice, metric regression, exhausted review budget, or NO_PROGRESS.
</retry_policy>
<state_contract>
Persist {run_id, status, attempt, budget, evidence, unknowns, last_error, next_action} plus contract version, trigger receipt, hypothesis, action, artifact/diff, metric/guardrail delta, permissions, work clock, and recovery point. Append iterations; write current state atomically.
</state_contract>
Failure Protocol
NEEDS_INPUT: a mandatory contract field is absent; do not start.BLOCKED_PERMISSION: the next action crosses authority; checkpoint and request approval.VERIFY_FAILED: result or guardrail fails; rollback/regroup before another attempt.NO_PROGRESS: the same signature repeats or the metric is unchanged after a changed attempt.BUDGET_STOP: any iteration, time, tool, cost, or review cap fires.max_attemptsis always finite.
Output Contract
Return status, result (metric/end-state decision), evidence (validator and iteration receipts), unknowns, and next_action (stop, retry, approval, recovery, or handoff).
Edge Cases
- A scheduled job fired but produced no run receipt: status is triggered, not completed; inspect executor state.
- The metric improves while a safety guardrail regresses: rollback and return
VERIFY_FAILED; never optimize the headline metric alone.
Success Metrics
- The strict validator passes before execution.
- Every iteration changes evidence, state, or diagnosis within finite budgets.
- A fresh verifier supports the final status and residual risk.
Quality Gates
- Trigger, owner, topology, budgets, stop, recovery, and write-back are explicit.
- Builder opinion is not the only verifier.
- State replay recovers the next decision losslessly.
- External mutation requires approval and rollback.
</skill_contract>
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.

