Install
openclaw skills install @ojusave/loop-engineeringRun bounded, evidence-backed work loops
openclaw skills install @ojusave/loop-engineeringDo the requested work now through the smallest trustworthy feedback loop. Keep the task central. Do not teach loop theory, expose hidden reasoning, or turn the workflow into paperwork.
Run this workflow when the user explicitly invokes it, asks to keep it active for the current task or thread, or when an applicable personal, workspace, or project instruction says to use it by default. Once activated for a task, keep it active for substantive follow-ups in that task until the user opts out or clearly replaces the task. The user does not need to repeat the skill tag. Carrying the preference into unrelated new threads still requires an applicable persistent instruction; do not pretend thread memory is global configuration.
When loop-by-default is active, match the loop to the work. Use Light for a narrow answer, clarification, or reversible edit. Escalate to Standard or Deep only when stronger evidence, iteration, or coordination can materially improve the outcome.
Treat a follow-up in the same task as a delta to the current outcome contract: retain the main outcome, guardrails, proof requirement, completed work, and unresolved asks; change only what the new message adds, corrects, or replaces. Start a new contract when the user clearly replaces the task. Never use continuity to preserve a stale assumption after the user has corrected it.
Understand the request before choosing research, tools, agents, subagents, workflows, or graphs. Preserve the user's raw request as evidence, then identify the intended stakeholder, outcome or decision, current state, constraints, authority boundaries, evidence gaps, and required next use. Treat proposed mechanisms as hypotheses until they are justified by that outcome.
For a narrow, clear request, do not rewrite it into a larger prompt. Proceed with the obvious Light loop. For a complex request, compile the understanding into the success card below. Ask only when a missing choice would materially change the outcome, risk, or authority required. When the user asks to rewrite a specific artifact but has not supplied it, request the artifact and stop. Do not substitute a generic template unless the user explicitly asks for one.
Record only what will change the work:
Starting point:
Target:
Measure and threshold:
Proof required: ARTIFACT VERIFIED | OUTCOME VALIDATED | DECISION READY
Guardrails and exclusions:
Next use or decision:
Infer obvious fields. Ask only when a missing choice is consequential or impossible to infer safely. Do not let later failures weaken the target, proof requirement, guardrails, or authority boundaries.
Do not manufacture iteration. If feedback cannot change the next action, perform one pass and verify it.
Deep is not automatically graph-shaped. Complete the outcome contract before selecting an execution mechanism. When a Deep task has genuinely independent workstreams, distinct authority or failure boundaries, branching work that must converge, or durable dependencies across artifacts or sessions, read references/orchestration.md and declare an execution topology before creating handoffs. Otherwise keep one parent loop with the smallest necessary checks.
Before planning specialists, use the strongest mode actually available:
A named role or undelivered template is not a handoff. Do not claim a specialist participated unless something actually received the task and returned findings.
Use the smallest set of checks capable of observing material failure. A specialist is a check owner, not automatically another agent.
references/engineering-loop.md.references/product-ux-loop.md before implementation.references/ui-visual-loop.md after implementation.references/accessibility-loop.md.references/freshness-portability.md before choosing.references/research-loop.md.references/source-integrity.md.references/strategy-loop.md.references/audience-value-loop.md.references/article-loop.md, then references/editorial-loop.md.references/prompt-generation.md.Read references/orchestration.md only when more than one check owner participates or a handoff is needed. Read references/verification.md when proof is ambiguous, subjective, high-impact, or easy to fake. Read references/foundations.md and references/adaptive-task-design.md only for deep loops, loop-design work, or when the initial route fails. Use references/examples.md only when an example would resolve uncertainty.
For each meaningful cycle:
A failed attempt can be useful when it eliminates a material hypothesis. A new artifact without measured change or useful learning is not progress. Change strategy after the same direction fails twice; stop STAGNATED when no credible alternative remains.
Use memory by default. For deep or genuinely multi-cycle work, run:
python3 <skill-directory>/scripts/init_loop_state.py --task "<concise task>" --mode deep
The script keeps .loop/ outside version control without editing the tracked .gitignore unless --edit-gitignore is explicitly supplied. Never store secrets, credentials, personal data, copied production data, or hidden reasoning in loop state.
Create a handoff only when another check owner will actually receive it:
python3 <skill-directory>/scripts/create_handoff.py \
--from-loop "<source>" \
--to-loop "<recipient>" \
--objective "<bounded task>" \
--artifact "<path or artifact>" \
--uncertainty "<what remains unknown>" \
--acceptance "<observable checks>" \
--state-dir "<.loop task directory>"
The generated artifact inherits the parent success criteria and separates the request, specialist return, and parent closure. Deliver it through the selected execution mode. Record the return and closure with scripts/complete_handoff.py; run --help for the bounded fields. Validate each phase:
python3 <skill-directory>/scripts/validate_handoff.py <handoff> --stage request
python3 <skill-directory>/scripts/validate_handoff.py <handoff> --stage return
python3 <skill-directory>/scripts/validate_handoff.py <handoff> --stage closed
The specialist returns exactly one status: PASS, REWORK_REQUIRED, BLOCKED, or NEEDS_HUMAN_JUDGMENT, plus evidence and one evidence state. PASS never makes the whole assignment complete by itself. The parent records its disposition and rechecks the integrated result.
scripts/check_blog_slop.py for article drafts, then perform editorial review; the script is only a warning tool.Verification asks whether the artifact meets its specification. Validation asks whether it works for the intended stakeholder and context. Prefer direct observation of the contracted outcome; deterministic checks are not automatically stronger than representative use.
Report one evidence state:
NO RELIABLE EVIDENCEARTIFACT VERIFIEDOUTCOME VALIDATEDDECISION READYReport one assignment status:
COMPLETE: the scoped target and required proof are reached, guardrails pass, and no required work remains.NEEDS HUMAN JUDGMENT: the remaining choice depends on taste, priorities, risk, values, or authority.BLOCKED: a required external dependency, access, permission, or evidence source is unavailable.NOT FEASIBLE: the requested outcome cannot be achieved safely or credibly within the constraints.STAGNATED: two consecutive parent cycles produced neither measurable progress nor decision-relevant learning, the hypothesis changed, and no credible intervention remains.Do not use model confidence or a self-authored score as the only approval. For persistent changes to this workflow, its prompt, rubric, routing, or evaluator, require representative before-and-after cases and an independent or cold check.
Lead with the delivered result. Mention files changed, decisive checks, and material limitations only when useful. Keep detailed state, handoff receipts, cycle logs, and internal vocabulary out of the response unless the user asks for them.
Honor any active response-shaping skill as a presentation constraint rather than copying its instructions into this workflow. When the user activates i-have-adhd, use its loaded contract for progress and final responses while Loop Engineering continues to own task execution, evidence, and stopping. Do not make the optional companion skill a prerequisite for Loop Engineering.
End with the assignment status and evidence state, but do not force a nine-part process report onto a simple task.