/looptimal:looptimalfrom looptimal
Looptimal — turns an objective into a delivered, VERIFIED OUTCOME by designing, war-gaming, and running the right loop or mission route. Use on 'looptimal', '/looptimal', 'run an outcome loop', 'orchestrate this objective to done', 'plan and ship this goal', or any non-trivial objective that needs a sealed acceptance suite, the right execution driver, and independent verification before you call it done. ALSO handles loop-design wizard requests ('design a loop', 'build a loop', 'new loop', 'loop wizard', or a vague recurring task to automate) via the 'design' fast-path (Stage 2 only, no outcome orchestration). For a single, non-recurring deliverable you still want proven — not trivial, just not a reusable loop — it routes to mission / goal-run when bounded iteration is useful, or degrades to 'single-pass' mode when one pass is enough: Frame → (Analyze if multi-domain) → light pre-mortem → Execute → Verify-outcome → Persist, skipping reusable-loop scaffolding. When the objective's shape is ambiguous, asks one upfront mode-fork question (single-pass / bounded mission or recurring system / just a blueprint) before any Frame work starts. Runs an 8-stage pipeline: 0 Frame (hash-pinned SEALED acceptance suite) → 1 Analyze (Capability Manifest + local capability readiness) → 2 Design-loop / Route (wizard: Task / Recurring / Supervised / Persistent-ratchet / Orchestration, mission / goal-run, single-pass, or REJECT) → 3 Plan → 4 Simulate (roll forward N steps, pre-mortem, harden) → [human GO] → 5 Execute (domain-expert sub-agents, maker ≠ checker) → 6 Verify-outcome (separate checker re-runs the SEALED suite vs live state) → 7 Persist. Fast-path hints: say 'design' or 'loop wizard' for Stage 2 blueprint only; 'single-pass' for one verified pass with no loop; 'skip wizard' to bypass the interview in Stage 2; 'skip simulate' to jump to Plan after Design-loop with explicit risk callout; 'fast path' for Frame + Design-loop + Plan then stop. If install looks broken — skill won't trigger, a script errors, profile won't resolve — run 'looptimal doctor' via scripts/looptimal-doctor.py.
Trending skills
7-day visitors to each skill page
Ships in looptimal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn an objective into a delivered, verified outcome: seal the acceptance criteria, pick or reject the right loop, war-game the plan, execute with domain experts, and gate completion on a separate verifier re-running the sealed suite against live state — never on self-reported GREEN.
The loop-design wizard (formerly the standalone LoopPrint) is embedded as Stage 2: Design-loop. It also runs as a design fast-path when you only want a loop blueprint without outcome orchestration.
./.looptimal/profile.yaml → ~/.looptimal/profile.yaml → scripts/looptimal-detect.py → generic defaults. Contract: references/agent-foundry.md.Activation line examples:
Looptimal's loop-worthiness judgment is the Decision Gate (Step 1 of the wizard, below) — but today that only fires deep in Stage 2, after Frame and Analyze have already run. Decide the shape before any of that work starts instead:
This surfaces the same loop-worthiness call the Decision Gate already makes as the user's own judgment, upfront and cheap, instead of only reachable after Analyze, Design-loop, and Plan have already been spent on the wrong shape (Frame runs regardless of the chosen mode, so it's never wasted). If Stage 0/1 evidence later contradicts the chosen mode — a "single-pass" objective turns out to clearly recur or need iteration until a gate, or a "recurring system" doesn't survive the Decision Gate — say so plainly and let the user redirect. Never silently override their choice; never silently comply with a mode the evidence doesn't support.
python3 scripts/looptimal-detect.py # probe markers; suggest profile
# or read ./.looptimal/profile.yaml → ~/.looptimal/profile.yaml
Supplies state_dir, dispatch.maker, dispatch.checker, verifier.default, optional banner. Generic defaults: loops/<slug>/, shell verifier.
| Stage | Name | Job | Reference |
|---|---|---|---|
| 0 | Frame | Turn the objective into a hash-pinned, SEALED acceptance suite. Every criterion asserts an outcome (not a symptom) and binds a domain outcome-oracle. Inputs are non-writable by the maker. Emit acceptance-suite.yaml + acceptance-suite.sha256. | references/pipeline.md |
| 1 | Analyze | Produce a Capability Manifest and local capability readiness inventory: domains, integration map, risks, dependencies, available skills/plugins/connectors/MCPs/agents/data. Delegate deep definition work to esat when stakes warrant tri-model stress-test. | references/pipeline.md |
| 2 | Design-loop / Route | Run the loop-design wizard or route the objective. Pick archetype — Task (bounded delivery), Recurring (scheduled freshness), Supervised (autonomous within guardrails), Persistent-ratchet (each pass strictly improves an outcome metric), Orchestration (multi-actor / multi-repo), mission / goal-run, single-pass — or REJECT only for hard no-verifier/meta-loop/symptom-only cases. | references/pipeline.md |
| 3 | Plan | Build a consensus task graph: nodes, dependencies, per-task acceptance hooks tied to the sealed suite, blast-radius tags, rollback notes. | references/pipeline.md |
| 4 | Simulate | Roll the loop forward N steps; pre-mortem failure modes (reward-hacking, silent failure, partial completion, env drift); harden the plan. Present findings and any deltas to the sealed suite (re-hash + user ack). | references/pipeline.md |
| — | Human GO | Explicit approval to execute. Surface top risks, irreversibles, open dependencies. No GO → no Execute. | references/pipeline.md |
| 5 | Execute | Spin up dynamic domain-expert sub-agents per the binding profile. Maker ≠ checker at iteration gates. Resumable, idempotent steps; rollback paths for partial failure. Pre-action gates on irreversibles. | references/pipeline.md |
| 6 | Verify-outcome | A separate checker re-runs the SEALED suite against live state. Ignore loop self-reported GREEN. Gate on an evidence bundle. | references/pipeline.md |
| 7 | Persist | Write durable state: objective hash, suite hash, what worked/failed, oracle results, remediation class, resume pointers, lessons for next run. | references/pipeline.md |
If a prior run exists under state_dir and the objective hash matches, resume from the last incomplete stage. If the objective changed materially, re-Frame (new suite hash). Never resume across a hard REJECT without a fresh Design-loop / Route.
The wizard enforces the four atoms, runs the route decision gate, and then branches. Reusable-loop routes generate the full LoopPrint artifact package. Mission / goal-run routes emit route.md + a mission package (mission.yaml after Stage 3) and continue to Stage 3 Plan without reusable-loop scaffolding. Single-pass routes emit route.md plus the light pre-mortem and follow the single-pass Degrade path. It lives in Stage 2 of the full pipeline and also runs standalone as the design fast-path.
Run scripts/loopprint-detect.py (or read ./.loopprint/profile.yaml → ~/.loopprint/profile.yaml) to get state_dir, verifier.default, dispatch, marker_path, runner, banner. Generic defaults: loops/<slug>/, verify.sh. Contract: references/profiles.md. Never hardcode harness conventions.
Run the Tier-0 test in references/decision-gate.md: 4 conditions + 30-second checklist. Report the route with one line of reasoning per condition. Recurrence remains the reusable-loop amortization test, not the whole orchestration gate: non-recurring but verifier-backed work can route to mission / goal-run or single-pass. Hard REJECT remains mandatory when there is no external verifier/human checkpoint, when the objective is self-referential/meta-loop, or when success is symptom-only with no behavioral anchor.
Immediately branch on the selected route:
loops/<slug>/, and run loopprint-lint.route.md with driver, state artifact, verifier, stop/budget, autonomy level, readiness gaps, and why no reusable loop blueprint is being produced; then continue to Stage 3 Plan, which emits mission.yaml, task-graph.yaml, execute-scope.yaml, and looptimal-lint.txt.route.md with verifier, state artifact, stop, readiness gaps, and a 3-scenario light pre-mortem; then follow the single-pass Degrade path instead of Stage 3/4.route.md with the human checkpoints and external checker, then continue only through the supervised path that matches those gates.reject.md with the unverifiable/unsafe reason and honest alternative; stop unless the user reframes the objective.Ask 3–5 targeted questions (not more):
Force a concrete value for each atom. Do not proceed with any left vague:
state_dir; what it records: attempt log, what failed, current hypothesis, context.Pin the archetype's full profile — work pattern (from references/patterns.md) and verifier/stop shape:
verifier.shape: ratchet + stop.budget.verifier.kind: critic-panel; panel: {n, quorum_k, threshold}; judge ≠ maker; cross-provider strongest.autonomy: checkpoint.Pattern = the work; verifier shape/kind + stop + autonomy = how it's gated and when it stops — orthogonal axes.
Create loops/<slug>/ and write the package from templates/:
| File | Purpose |
|---|---|
loop-spec.yaml | Four atoms + pattern + budget, machine-readable |
state.md | Durable State artifact, seeded at iteration 0 |
maker.sh | Maker step — SEPARATE process from verify.sh (maker ≠ checker) |
verify.sh | External verifier as an exit-code gate |
run-this-loop.sh | Engine-agnostic runner; emits metrics.jsonl + state.jsonl each iteration |
safety-checklist.md | Human checkpoints + budget guardrails + maker≠checker checker identity |
flow.mmd | Mermaid diagram of this loop |
Record profile.dispatch.checker in safety-checklist.md; note cross-provider option when 2+ CLIs available from loopprint-detect.py.
After generation: preflight with bash run-this-loop.sh --check. Use loopprint-report.py loops/<slug>/metrics.jsonl for cost-per-accepted-change; loopprint-skillify.py loops/<slug> to promote a GREEN loop to a reusable skill (only after sealed checker passes). loopprint-ls.py for rot radar.
Self-check (required): run scripts/loopprint-lint.py loops/<slug>/loop-spec.yaml. Do not present the blueprint as ready until it prints GREEN. RED = empty or self-grading verifier, missing safety limit, unfilled placeholder.
Show the generated file tree and a 3-line summary (Goal / Verifier / Stop). Offer and wait:
run-this-loop.sh (respecting autonomy level from Step 2).Never auto-run. Step 6 is a stop-and-confirm.
Say "skip wizard" or "direct run" to bypass Steps 1–4's interview for a reusable-loop route: read or accept an existing loop-spec.yaml (or a one-paragraph goal), backfill missing atoms with sensible defaults, call out anything defaulted, generate the package (Step 5), stop at Step 6. If the Decision Gate routes the objective to mission / goal-run or single-pass, skip LoopPrint artifact generation and emit the corresponding route.md branch instead. Never silently invent a verifier — if there's no external gate, say so and ask.
python3 scripts/looptimal-lint.py <state_dir>/mission.yaml
Do not proceed until it prints GREEN. RED = writable verifier inputs, symptom-only criteria, missing oracle binding, maker=checker collapse, missing safety limit, meta-loop shape — fix and re-lint.
Loop-design output is gated separately:
python3 scripts/loopprint-lint.py loops/<slug>/loop-spec.yaml
python3 scripts/looptimal-doctor.py # bottom-up health check; copy-pasteable fix per problem
python3 scripts/looptimal-doctor.py --fix # apply SAFE repairs (chmod +x, relink dangling symlink)
python3 scripts/looptimal-doctor.py --json # machine-readable findings
python3 scripts/loopprint-doctor.py # diagnose the loop-design wizard install
python3 scripts/loopprint-doctor.py --fix # safe repairs for wizard scripts
Apply safe fix: lines yourself; for anything that re-clones, edits user config, or deletes, confirm with the user first. One-shot heal — re-run once to confirm no FAIL, then stop. Full map: references/troubleshooting.md.
loopprint-skillify applies only after the sealed checker passes.looptimal-persona-promote applies only after Stage 6 is checker GREEN.Author: Renn Labs. MIT.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub renn-labs/looptimal --plugin looptimal