LoopOps Protocol
Use this skill when reusable agent behavior should become more than a better prompt.
The goal is to choose the smallest durable artifact that improves future runs:
prompt -> skill -> checklist -> script -> workflow -> loop
Do not promote work upward unless the extra machinery buys reliability, reuse, or cheaper future execution.
Artifact Ladder
Classify the candidate method first:
- Prompt: one-off instruction for this run.
- Skill: compact reusable context, procedure, or tool adapter loaded on demand.
- Checklist: ordered human/agent validation sequence.
- Script: deterministic repeatable action with parameters.
- Workflow: ordered tool/process execution with gates and evidence.
- Loop: workflow plus evaluator, memory write, retry policy, and stop rule.
Prefer the lowest artifact that handles the task reliably.
Loop Suitability Gate
Promote a workflow into a loop only when all are true:
- The goal has an observable completion condition.
- Progress can be evaluated without trusting the worker agent blindly.
- A retry is likely to improve the result.
- Cost can be bounded by iteration, time, token, or tool budget.
- Failure has a clear stop, rollback, or human-escalation path.
If any condition is missing, keep it as a supervised workflow or checklist.
Open vs Closed Loop
Use an open loop when:
- the solution space is unknown,
- discovery or exploration matters,
- multiple valid approaches may exist,
- the output is research, architecture, strategy, or design direction.
Use a closed loop when:
- acceptance criteria are known,
- tests, checks, or review criteria exist,
- regression risk matters,
- the task can be decomposed into verifiable steps.
Open loops need tighter budget limits. Closed loops need stronger evaluators.
Supervisor Contract
Every loop must define:
Goal:
Completion condition:
Loop type: open | closed
Worker action:
Evaluator:
Evidence:
Memory write:
Retry policy:
Budget:
Stop rule:
Rollback or escalation:
The evaluator can be a test command, lint/typecheck/build, browser check, static analysis, script, human review, or a separate model. Prefer deterministic evaluators when available.
Memory Policy
After each iteration, save only durable signal:
- current hypothesis,
- changed files or artifacts,
- verification result,
- blocker or failure mode,
- next intended action,
- reusable lesson if it generalizes.
Do not append raw logs, long transcripts, secrets, private data, or one-off observations to durable memory.
Skill Evolution
After a loop completes, update skills only with lessons that are:
- procedural,
- reusable,
- testable,
- not already covered by higher-priority instructions,
- worth their token cost.
Good updates:
- missing repo-specific command,
- repeated failure mode,
- verification step that caught a real issue,
- script or workflow that replaced repeated manual work,
- rejected path that should not be retried.
Bad updates:
- generic coding advice,
- motivational wording,
- model-behavior hacks,
- single-incident preferences,
- rules that increase context without reducing errors.
Cost Controls
Every loop must have at least two:
- max iterations,
- max wall-clock time,
- max token/tool budget if measurable,
- narrowest useful verification first,
- summarized memory instead of raw logs,
- stop after repeated identical blocker,
- human approval before external, destructive, expensive, or privacy-sensitive actions.
If cost cannot be bounded, do not run autonomously.
Compiler Rule
When the same step is repeated three times, decide whether to compile it:
- repeated prose instruction -> skill rule,
- repeated checklist -> workflow,
- repeated shell/Python/JS snippet -> script,
- repeated verification pattern -> evaluator,
- repeated failure recovery -> stop hook or escalation rule.
Prefer scripts and deterministic checks over longer instructions.
Final Report
When designing or updating a loop-capable method, report:
- chosen artifact level,
- why higher levels were rejected or accepted,
- supervisor contract if a loop is used,
- cost controls,
- memory writes,
- validation performed,
- skill/workflow/script files changed.
1---2name: loopops-protocol3description: Design and evolve agent skills into cost-bounded loops, workflows, scripts, and memory updates. Use when creating or auditing reusable agent methods, converting prompts or skills into workflows, designing open or closed agent loops, defining supervisor/evaluator contracts, or deciding whether repeated agent work should become a skill, checklist, script, workflow, or autonomous loop.4license: MIT5metadata:6 source: https://skillmd.com/skills/markoblogo/loopops-protocol7 abvx_status: experimental8 abvx_origin: original9---1011# LoopOps Protocol1213Use this skill when reusable agent behavior should become more than a better prompt.1415The goal is to choose the smallest durable artifact that improves future runs:1617```text18prompt -> skill -> checklist -> script -> workflow -> loop19```2021Do not promote work upward unless the extra machinery buys reliability, reuse, or cheaper future execution.2223## Artifact Ladder2425Classify the candidate method first:2627- **Prompt**: one-off instruction for this run.28- **Skill**: compact reusable context, procedure, or tool adapter loaded on demand.29- **Checklist**: ordered human/agent validation sequence.30- **Script**: deterministic repeatable action with parameters.31- **Workflow**: ordered tool/process execution with gates and evidence.32- **Loop**: workflow plus evaluator, memory write, retry policy, and stop rule.3334Prefer the lowest artifact that handles the task reliably.3536## Loop Suitability Gate3738Promote a workflow into a loop only when all are true:3940- The goal has an observable completion condition.41- Progress can be evaluated without trusting the worker agent blindly.42- A retry is likely to improve the result.43- Cost can be bounded by iteration, time, token, or tool budget.44- Failure has a clear stop, rollback, or human-escalation path.4546If any condition is missing, keep it as a supervised workflow or checklist.4748## Open vs Closed Loop4950Use an **open loop** when:5152- the solution space is unknown,53- discovery or exploration matters,54- multiple valid approaches may exist,55- the output is research, architecture, strategy, or design direction.5657Use a **closed loop** when:5859- acceptance criteria are known,60- tests, checks, or review criteria exist,61- regression risk matters,62- the task can be decomposed into verifiable steps.6364Open loops need tighter budget limits. Closed loops need stronger evaluators.6566## Supervisor Contract6768Every loop must define:6970```text71Goal:72Completion condition:73Loop type: open | closed74Worker action:75Evaluator:76Evidence:77Memory write:78Retry policy:79Budget:80Stop rule:81Rollback or escalation:82```8384The evaluator can be a test command, lint/typecheck/build, browser check, static analysis, script, human review, or a separate model. Prefer deterministic evaluators when available.8586## Memory Policy8788After each iteration, save only durable signal:8990- current hypothesis,91- changed files or artifacts,92- verification result,93- blocker or failure mode,94- next intended action,95- reusable lesson if it generalizes.9697Do not append raw logs, long transcripts, secrets, private data, or one-off observations to durable memory.9899## Skill Evolution100101After a loop completes, update skills only with lessons that are:102103- procedural,104- reusable,105- testable,106- not already covered by higher-priority instructions,107- worth their token cost.108109Good updates:110111- missing repo-specific command,112- repeated failure mode,113- verification step that caught a real issue,114- script or workflow that replaced repeated manual work,115- rejected path that should not be retried.116117Bad updates:118119- generic coding advice,120- motivational wording,121- model-behavior hacks,122- single-incident preferences,123- rules that increase context without reducing errors.124125## Cost Controls126127Every loop must have at least two:128129- max iterations,130- max wall-clock time,131- max token/tool budget if measurable,132- narrowest useful verification first,133- summarized memory instead of raw logs,134- stop after repeated identical blocker,135- human approval before external, destructive, expensive, or privacy-sensitive actions.136137If cost cannot be bounded, do not run autonomously.138139## Compiler Rule140141When the same step is repeated three times, decide whether to compile it:142143- repeated prose instruction -> skill rule,144- repeated checklist -> workflow,145- repeated shell/Python/JS snippet -> script,146- repeated verification pattern -> evaluator,147- repeated failure recovery -> stop hook or escalation rule.148149Prefer scripts and deterministic checks over longer instructions.150151## Final Report152153When designing or updating a loop-capable method, report:154155- chosen artifact level,156- why higher levels were rejected or accepted,157- supervisor contract if a loop is used,158- cost controls,159- memory writes,160- validation performed,161- skill/workflow/script files changed.