apply-turbo-handoffs
Audit the turbo skill lessons that /self-improve writes into this repo's .turbo/handoff/ from other projects, apply the ones the…
Iteratively review and revise a plan until no new findings survive evaluation. Use when the user asks to \"refine the plan\", \"iterate on the plan\", \"tighten the plan\", or \"improve the plan\".
Claude Code
$ npx -y skills add tobihagemann/turbo --skill refine-plan --agent claude-code
Codex
$ npx skills add tobihagemann/turbo --skill refine-plan -a codex -y
Cursor
$ npx skills add tobihagemann/turbo --skill refine-plan -a cursor -y
Gemini CLI
$ npx skills add tobihagemann/turbo --skill refine-plan -a gemini-cli -y
GitHub Copilot
$ npx skills add tobihagemann/turbo --skill refine-plan -a github-copilot -y
OpenCode
$ npx skills add tobihagemann/turbo --skill refine-plan -a opencode -y
Windsurf
$ npx skills add tobihagemann/turbo --skill refine-plan -a windsurf -y
name: refine-plan description: "Iteratively review and revise a plan until no new findings survive evaluation. Use when the user asks to \"refine the plan\", \"iterate on the plan\", \"tighten the plan\", or \"improve the plan\"."
Loop the review pipeline over a plan until no new findings are accepted. Writes back to the plan file in place.
At the start of every invocation (including re-runs from Step 5), use `TaskCreate` to create a task for each step:
1. Resolve the plan 2. Run `/review-plan` skill 3. Run `/evaluate-findings` skill 4. Run `/apply-findings` skill 5. Re-run `/refine-plan` skill if changed
1. **Explicit path** — use it 2. **Explicit slug** — resolve to `.turbo/plans/<slug>.md` 3. **Single file** — Glob `.turbo/plans/*.md`. If exactly one file exists, use it 4. **Most recent** — most recently modified file 5. **Legacy fallback** — `.turbo/plan.md` if `.turbo/plans/` does not exist 6. **Nothing found** — tell the user to run `/turbo:plan` and stop
If multiple candidates exist and the choice is non-obvious, use `AskUserQuestion`.
State the resolved path before continuing.
Unless an explicit path or slug was passed, confirm the resolved plan still describes work that remains to be done. The signal is a frontmatter `status:` of `done`.
When the signal fires, output it as text. Then use `AskUserQuestion` to offer:
On **Leave the plan alone**, mark the remaining refine steps deleted, then use the TaskList tool and proceed to any remaining task.
Once the plan is settled, resolve the ledger as Loop State describes.
Loop state lives in a ledger at `.turbo/loops/refine-plan-<label>-<tag>.md`. The label is the resolved plan's slug, or the file's basename for a legacy single-file fallback. The tag is the output of `head -c 4 /dev/urandom | xxd -p`, minted once when the loop starts. The ledger records `Branch:` (the unmodified branch name, or `(detached)`), `Plan:` (the resolved plan path), a one-line purpose, and per iteration an `Iteration <N>: <state>` line, its verdicts, and Step 5's classification. A ledger that exists belongs to an active loop.
Resolve the ledger:
Once the ledger resolves, use `TaskUpdate` to write its path into this invocation's Step 5 task description. After a compaction, this invocation reads its ledger path back from that task.
**Iteration state.** The current iteration's state line reads `open` until Step 5 reaches a gate, `awaiting <gate>` while Step 5 waits on the user at one (the prose-only round, the skip permission, the hard cap, the context-signal question recorded with the gate it wraps, or a hands-on check), and `classified` once Step 5 has settled whether another iteration runs. On a continued ledger, read the last iteration's state:
A compaction in flight is not a resume: this invocation continues its own iteration.
**Recording.** Have the ledger path in context when Steps 2 and 3 run, so recorded verdicts are honored. Append each Skip, Escalate, and Apply verdict with its reason under the current iteration as Steps 3-4 reach it, along with the user's resolution of an Escalate.
**Closing the loop.** Delete the ledger at a convergence stop, at a stop the user chooses at a gate, and at a stop granted at the skip gate. Keep it when escalating to `/consult-oracle`, since the oracle's answer decides what follows.
Run the `/review-plan` skill on the resolved plan. Supply every Skip and
Reusable workflows for planning, building, reviewing, and shipping with Claude Code and Codex.
Audit the turbo skill lessons that /self-improve writes into this repo's .turbo/handoff/ from other projects, apply the ones the…
Apply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and…
Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, architecture rot,…
Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked…
Enforce existence, reuse, mirror, and symmetry principles to keep new code minimal and consistent with surrounding code. Use when…
Run autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.