gauntlet-resume · git:20260917.a5f7429 · 2026-09-17 · sha256 6090a10b9a1bade4
gauntlet-resume git:20260917.a5f7429A
Immutable. This exact content never changes and is served at /api/v1/blob/6090a10b9a1bade4.
---
name: gauntlet-resume
description: Use when a human wants to continue an interrupted gauntlet flow in a fresh session - from a pi-cohort handoff brief (file or pasted) or from a bare worktree that already holds a spec. Human-only; the sole resume entry point. Restores phase/plan tracker state through the legal arming sequence, never creates a worktree, never infers approval.
disable-model-invocation: true
argument-hint: "[<brief-file>] [<worktree-name-or-path>]"
---
> **Related skills:** Continues into `/skill:writing-plans`, `/skill:subagent-driven-development`, or `/skill:verification-before-completion` depending on the restored stage. `/skill:brainstorming` is where new ideas go - a free-form prompt is not a resume input.
# Gauntlet Resume
## Overview
Re-enter an interrupted gauntlet flow in a fresh session. Two inputs: a handoff brief
produced by pi-cohort's `/handoff` (grammar in `reference/brief-contract.md`), or a bare
worktree whose spec/plan artifacts are reconstructed into tracker state
(`reference/reconstruction.md`). Every check runs before any tracker mutation; every
stop names the offending path, field, or line.
**Announce at start:** "I'm using the gauntlet-resume skill to continue an interrupted flow."
## Boundaries
- Reads: anything.
- Writes: `phase_tracker` / `plan_tracker` state, only after every entry check passes
and every human question is answered. Nothing on disk.
- Never: `git worktree add`; infer approval from artifact presence; restore gate history,
closure-review evidence, or fix rounds; start a later phase directly (that does not arm
the flow).
## Arguments
`/skill:gauntlet-resume [<brief>] [<worktree>]` - zero to two positional tokens, plus
optional pasted text after the command line.
| Form | Meaning |
|---|---|
| `<brief-file>` | readable file whose line 1 starts `# Handoff:` |
| pasted text whose first line starts `# Handoff:` | inline brief (equivalent to a file) |
| `<worktree>` alone | bare name resolved as `<primary>/.worktrees/<name>`, or an absolute path; must already be a git worktree |
| `<brief> <worktree>` | brief plus an explicit worktree override (required when the brief's worktree field is `no`/`unavailable`/not a git repo; must equal the brief's worktree after `realpath` otherwise) |
| anything else | not a resume input - stop with "this is a new idea - run /skill:brainstorming" |
`<primary>` is the checkout owning `.worktrees/`: `dirname $(git rev-parse --git-common-dir)`
(not `--show-toplevel`, which returns the linked worktree when run inside one). A pasted
brief that needs an override uses the file form. This skill never runs `git worktree add`.
## Entry checks
In order. All before any tracker mutation; entry check 1 is read-only.
1. **Idle session.** `phase_tracker({ action: "status" })`. Any phase not pending ->
stop: "session already carries flow state - reset is your call".
2. **Target worktree.** Resolve from the brief's `worktree:` field, the override, or the
bare argument. Stops: path missing or `git -C <path> rev-parse --is-inside-work-tree`
fails; override and brief worktree differ after `realpath`; brief has no
`## Repo state` heading (prefix match: `## Repo state` or
`## Repo state: not a git repo`); brief worktree is `no`, `unavailable`, or
`not a git repo` and no override was given - except a `worktree: no` brief **without**
process state, which is the brainstorming route in Dispatch, not a stop. Other
`unavailable` fields inside `## Repo state` are legal.
3. **Session cwd binding.** `phase_tracker`, `plan_check`, and the flow guards resolve
every path against the extension's session cwd; a child-shell `cd` cannot relocate it.
If `realpath $(git rev-parse --show-toplevel)` in the session cwd differs from the
resolved worktree, stop: "restart pi in <worktree> and re-run". Every restoration
therefore runs with the session rooted in the resolved worktree.
4. **Drift notice.** Compare the brief's `HEAD` and `dirty` fields in `## Repo state`
with the live worktree (`git rev-parse HEAD`, `git status --porcelain`). Announce
differences. Informational, never a stop.
5. **Skills loaded.** For each name in `## Skills loaded` (none for
`## Skills loaded: none`): match against the frontmatter `name` of every
`skills/*/SKILL.md` in this package; `Read` each match's complete file into the
transcript; list non-matches as skipped. Loaded bodies are context only - no skill's
entry actions run until Dispatch names one.
## Dispatch
| Input | Route |
|---|---|
| brief with `## Process state` | process-state restore - `reference/brief-contract.md` "Process-state restore" |
| brief without process state, `## Skills loaded` names `chase-bug` | hotfix route below, before any artifact reconstruction, no tracker calls |
| brief without process state, `worktree: no` | invoke `/skill:brainstorming` with `## Intent` as the idea, in the current directory; resume creates no worktree - brainstorming's own Worktree First applies (a plain handoff is a new flow) |
| brief without process state, worktree present | `reference/reconstruction.md`, with `## Intent` and `## Decisions` carried into every confirmation prompt |
| bare worktree | `reference/reconstruction.md`; prompts state that no brief context is available (never invent Intent/Decisions) |
**Hotfix route.** `skills/chase-bug/hotfix.md` consumes only a hotfix record at
`$TMPDIR/hotfix-<slug>.md`. If `## Decisions` or `## Intent` names an existing record
path, hand it to hotfix.md and skip its worktree-create step when the brief's worktree
exists (reuse it). Otherwise invoke `/skill:chase-bug` triage with `## Intent` to
re-derive the record.
## Post-restore continuation
After a successful restore, print the closing line from `reference/brief-contract.md`
(gate history not restored; the task to re-validate), then continue in the stage's
owning skill **without** its reset-bearing entry:
| Active after restore | Continue in | Entry point |
|---|---|---|
| brainstorm | brainstorming checklist | on-disk state decides the step: draft marker on line 1 of the spec file -> step 4; spec title -> step 8. Never `/skill:brainstorming` entry (it resets both trackers) |
| plan | writing-plans body | skip its `start plan` call (already in_progress) |
| implement | subagent-driven-development | re-validate `<task>` first (re-run its `Tests:`), then the task loop from the first non-complete task |
| verify | verification-before-completion | full conformance gate; nothing carried over |
## Red flags — STOP
- Any `phase_tracker` or `plan_tracker` mutation before entry checks 1-5 pass and every
human question is answered.
- `start <phase>` for anything other than brainstorm as the first arming call.
- `complete` on a prior phase during restore (priors are `skip`ped with a `resume:` reason).
- Running `git worktree add`, or `cd`-ing to "fix" a cwd mismatch.
- Accepting a free-form prompt as a brief.
## Project overrides
If a gauntlet overrides file exists - checked in order:
`.pi/gauntlet-overrides.md`, `<repo root>/gauntlet-overrides.md`,
`<repo root>/doc/gauntlet-overrides.md`; first found wins - read it. Any
sections relevant to this skill - by name match, by topic (routing,
verification, worktrees, etc.), or by workflow convention - override or
extend the instructions above. Project-local `AGENTS.md` is already in
context - check it for project-specific routing tables, service paths, and
verification commands.