loop-converge
Author and optionally direct-launch a two-node loop-graph run whose North Star is code convergence — delete unused code, merge duplicates, reuse, slim. Use…
Compile one durable loop-graph run into executor, ledger, directives, ops, and supervisor artifacts under a dated `.longgraph` directory, then present copy-ready host prompts. Use directly for a custom multi-round shape with gated milestones, independent audit, cross-host
$ npx -y skills add levi-qiao/longgraph-skill --skill loop-graph --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/loop-graphContext preview
The summary Claude sees to decide when to auto-load this skill.
Compile one durable loop-graph run into executor, ledger, directives, ops, and supervisor artifacts under a dated `.longgraph` directory, then present copy-ready host prompts. Use directly for a custom multi-round shape with gated milestones, independent audit, cross-host
name: loop-graph description: Use only when the user explicitly invokes /loop-graph or names this skill. Compiles a custom loop-graph run. Do not use unless named. Existing runtime nodes are self-contained. disable-model-invocation: true
This is the **shared compiler**, not a goal-specific workflow. It owns the graph shape, the five runtime artifact schemas, generic interview mechanics, and host handoff. A focused preset owns only its North Star, proof, interview questions, recommended work shape, method guards, knobs, and slug; it never forks templates or adds a runtime node.
Use [`../loop-converge/SKILL.md`](../loop-converge/SKILL.md) for code cleanup, [`../loop-deliver/SKILL.md`](../loop-deliver/SKILL.md) for requirement delivery, and [`../loop-research/SKILL.md`](../loop-research/SKILL.md) for evidence-led solution selection. Use this skill directly only when a custom pack is genuinely needed. The exact contract is in [`docs/preset-contract.md`](docs/preset-contract.md).
Turns a vague long-horizon request ("make it production-ready", "accuracy above baseline", "finish the migration") into a small **graph of agent nodes** that stays on-spec across many rounds:
Why a graph, not a loop: an agent grinding a long task **is inside the context that drifted**, so it rationalizes scope creep and calls half-done work "done". The nodes talk only through durable, inspectable state (ledger, git tree, directives file) — never a shared, polluted context.
**Each node runs on its own timer, and no node ever wakes another.** The executor fires, closes several verified rounds on warm context, and ends. The supervisor fires on a slower cadence, audits, appends corrections, and ends. A correction is picked up on the executor's next fire. Two independent clocks and one file edge — no dispatch, no resume prompt, no liveness protocol, and therefore nothing that can leave the run waiting for a wake that never comes.
┌─────────────┐ reads / rewrites ┌──────────────┐
│ EXECUTOR │ ───────────────────▶ │ │
│ node │ ◀─────────────────── │ ledger.md │ ← single scoreboard
│ (own timer) │ │ (shared state)│
└─────────────┘ └──────────────┘
▲ ▲
│ reads each round │ reads only (never writes it)
│ │
┌───────────────┐ appends corrections ┌──────────────────┐
│ directives.md │ ◀──────────────────── │ SUPERVISOR │ ← separate context,
└───────────────┘ │ node (own timer) │ slower cadence
└──────────────────┘
│ checkpoint-commits clean work
│ escalates human-only calls
▼
git / youFive live artifacts from a short interview:
1. **`executor.md`** — executor prompt: one task book, one cadence, anti-bloat rules, stop conditions, red lines. 2. **`ledger.md`** — the single scoreboard both nodes read; the executor rewrites it every round. 3. **`directives.md`** — the bounded one-way corrections queue: current STANDING locks + not-yet-folded numbered corrections; folded ones rotate into a cold archive. 4. **`ops.md`** — the exact context index and gates every cold node follows, plus current environment/data/host lifecycle facts when applicable; update facts in place, never as a timeline. 5. **`supervisor.md`** *(optional)* — supervisor prompt, scheduled; independently re-verifies claimed-done work, checkpoint-commits what passes, decides pending items, and corrects drift / steers the plan via the directives file.
**Run directory — fixed, one per run.** Everything above goes in `.longgraph/<YYYY-MM-DD-slug>/` at the repo root (workspace root for multi-repo runs), plus an `archive/` subdir for in-run rotations. **A new run always creates `.longgraph/…` from the templates — never retarget or edit a previous run's files**: patching stale prompts wastes tokens and leaves leftover text steering toward the old goal. The old directory stays untouched (it *is* the archive); distill what still holds into the new ledger's starting snapshot and copy still-in-force STANDING directives forward. Commit the run directory unless data policy forbids — it's the durable state the graph depends on.
Runtime contract ids are `longgraph.loop-graph.*`.
Invariants: **ledger = the only scoreboard**; **one independently verifiable work item (which may be one coherent workset) per round → verify → update ledger**; **the supervisor steers only through `directives.md` (a one-way edge) — it never edits the ledger or shares the executor's context**.
**Not** for a one-shot edit, or when success needs a human to judge every time — say so, suggest a plain task.
Interview in the user's language and mirror it in the prose inside the artifacts (goals, notes, red lines). Keep structural keywords, headings, and field names as in the templates so files stay tool-friendly.
Long-horizon agent skill for Claude Code, Cursor, Codex & Grok Build. Stop agent drift with a durable ledger, a clean-context supervisor, and verified gates.
Author and optionally direct-launch a two-node loop-graph run whose North Star is code convergence — delete unused code, merge duplicates, reuse, slim. Use…
Author and optionally direct-launch a two-node loop-graph run for implementing a product or engineering requirement through verified vertical slices. Use when…
Author and optionally direct-launch a two-node loop-graph run that compares feasible technical approaches with open-source evidence, primary research, and…