/steer:work¶
Execute a GitHub issue end-to-end from local Claude Code. The same door carries
the backlog: /steer:work issues manages it and never edits code,
while the subcommands below read an issue and deliver it.
When to use
Use to start, resume, check, or finish a specific issue.
Argument hint: [start | resume | status | finish | queue | drive | debug | spike [<question>] | qa | promote | tidy | review | walkthrough <feature> | issues <mode>] [--reviewed | --hotfix | --handoff] [#issue ...]
Review gates - finish and --reviewed
finish runs an independent code gate on every non-Trivial change (a
--hotfix always counts as non-Trivial): a fresh
adversarial reviewer checks correctness, other instances of the fixed
pattern, peer consistency, introduced risk, touched docs and the tests
both ways - a rule nothing would catch breaking, and a test that earns no
place; a database,
UI or security specialist joins when the diff enters that domain; a
verifier tries to refute each high finding before it reaches the author
(specialists and verifiers run as steer-pr-reviewer, on a mid tier; the
general reviewer stays on the session model, briefed diff-first to about
80 tool calls);
and a bounded fix loop follows: it stops on a round with no confirmed
high finding, re-reviews only while that count drops round over round,
and never runs more than 4 rounds. Under Orca you can ask for a Codex
second opinion in the first round, through Orca orchestration; it never
replaces a gate reviewer.
Add --reviewed for an independent plan-gate review and plan sign-off
before implementing: the reviewer checks what the plan misses, searches
the repo for existing code the plan would duplicate, and flags every
design choice the plan leaves to implementation. High-risk work gets the
plan gate without the flag (except under --hotfix). Its sign-off is
asked only where the plan is hard to reverse - it deletes or rewrites
stored data, changes security or access posture, touches /infra, real
credentials, payment data or real third-party calls, or changes how
production deploys or releases; any other High-risk plan is built once
vetted and goes under the PR's Notes for the reviewer. With no dev in
the session, in/out scope recorded on the issue stands in for the
sign-off, and with none recorded start asks for scope on the issue and
stops before any code; a pre-production repo needs no sign-off, except
for a plan touching what is never relaxed. A reviewer that returns
no report is retried once, then reported not run - never as clean.
The shared protocol and rubric live in
templates/reference/REVIEW-LOOP.md.
--hotfix - the production-incident fast-path
Add --hotfix only for a genuine production incident - a change to an
already-deployed system with real users/data and an active outage or
regression (rule 61-gates -> Hotfix). "Urgent" feature work is not a hotfix, and
"production is down" alone does not open it: the skill declines the lane
when the CLAUDE.md delivery mode is solo-trunk or policy/delivery.yml
rules production out, opens it on a live feature, and with neither asks
which deployed environment is down, planning on the normal flow until the
answer names one. The lane
relaxes ceremony and ordering - the issue may be filed after-the-fact on a
hotfix/<n>-slug branch cut from and merged into prod (carrying its own
patch cut, then merged back into main - see
Deployment), and the PR goes to the front of the review queue with the same approvers as a release (a PO and a dev) - but keeps every human
authority gate (merge / deploy stay human-gated; pushing the branch and
opening the PR are autonomous, as everywhere). It still runs the local
gates and finish's code gate whatever the diff's size, but always opens
the PR ready for review, whatever the gate left open, and watches its CI to
conclusion itself. Once the fire is
out, a mandatory follow-up backfills the issue, the spec/ADR, puts the
incident's root cause on the enforcement ladder,
and writes a /spec/history/ entry: Definition of Done is deferred, never waived.
--handoff - one pass, then hand over
Add --handoff (or say "I'll take it from here") when someone will pick
the work up afterwards. finish then runs each fix loop once instead of to
convergence: the local gates once, with only mechanical autofixes
(formatter, lint --fix) and a re-run to record what is left; one
code-gate round whose findings are listed, not fixed; pre-flight and the
drift check as reports, with no base merged in. The PR always opens as a
draft and CI is not watched. Its Notes for the reviewer open with a
Handed over - not verified list, and the issue stays in-progress. The
Definition of Done is not waived - its open items pass to whoever takes
over, and a later finish #N without the flag runs the full loops.
Refused with --hotfix, in solo-trunk, and by queue and drive.
End-to-end flow¶
flowchart TD
START["/steer:work start #123"] --> VALIDATE[Read + validate the issue]
VALIDATE --> CLAIM[Claim it, self-assign, set in-progress]
CLAIM --> BRANCH[Create or reuse issue/* branch<br/>from the default branch + work marker]
BRANCH --> SPEC[Load linked /spec]
SPEC --> IMPL[Implement + test<br/>commit autonomously]
IMPL --> PROGRESS[Update progress on the issue]
PROGRESS --> FINISH["/steer:work finish #123"]
FINISH --> GATES[Run local gates until green]
GATES --> CLEAN{Code gate clean?}
CLEAN -->|yes| RPR[Open the PR ready<br/>transition to validate]
RPR --> CI[CI runs, watched to conclusion]
CLEAN -->|only cheap-to-reverse notes| RPR
CLEAN -->|hard-to-reverse or fact-only notes, author present| ASK{{Ask the author each of those in-session}}
ASK -->|all answered| RPR
ASK -->|decide later| PR
CLEAN -->|no| PR[Open a draft PR]
PR --> STATE[Transition to validate and stop]
STATE --> READY{{Author answers the notes, marks it ready}}
READY --> CI
CI -->|red| FIX["/steer:work resume #123<br/>fix locally, push once, re-watch"]
FIX --> CI
CI -->|green| REVIEW{{Reviewer reviews}}
Delivery mode¶
How the work reaches main is governed by the repo's delivery mode, declared
in the product CLAUDE.md ## Delivery mode section (the same marker the steer
hooks read - solo-trunk vs pr-flow; absent or unreadable -> pr-flow).
Issue-first holds in both modes - High-risk
work and the six value cases are tied to a GitHub issue; the modes differ only in
the branch/PR ceremony around it.
| pr-flow (default) | solo-trunk (pre-MVP greenfield) | |
|---|---|---|
| Branch | issue/<n> branch + spec/.work marker |
none - commit straight to main |
| Marker | written for Stop-hook reconciliation | skipped (stay on main) |
| Delivery | push + open the PR autonomously; the merge review is the human gate (server-enforced by branch protection) | Closes #N trunk commit + push under Commit autonomy (rule 45) |
| Terminal evidence | merged PR | closed issue from the trunk commit |
Determine the mode once at start / finish. In solo-trunk, wherever a step below
says branch, marker, or PR, skip it and substitute the trunk commit -
validation, managed-block progress, CI-watch (via gh run watch on the trunk push),
and the Definition of Done are unchanged. Committing to main is authorized in this
mode; deploy stays human-gated all the same, and graduating the repo to the PR
flow is /steer:setup protect's job, never this skill's.
When an issue touches deployment, release or infrastructure work, start first
compares the repo's spec/.version with the plugin. A minor version or more
behind, it says so before claiming anything and offers
/steer:setup sync first, because the current
scaffold may already ship what the issue asks for. Declined, under --hotfix,
or in an unattended worker, it continues and notes the lag in the PR (in
solo-trunk, the trunk commit body).
Modes¶
| Mode | What it does |
|---|---|
start |
Validate, claim (self-assigns the invoking GitHub user), branch from the freshly fetched default branch - never the checked-out work branch; stacking on another PR only when the issue needs its unmerged code (cut from the fetched parent, its PR on --base <parent>; /steer:reference stacks), and targeting a batch/* branch when the dev lands many fixes as one merge - + write the work marker (pr-flow) or stay on main (solo-trunk), load specs (a draft intent is enough to build on - it never stops to ask for its approval), pick up the non-blocking questions gated at implementation as decisions this slice makes, grep spec/learnings/ frontmatter for prior lessons that match the issue (a quiet no-op, in any shell, when the directory does not exist), classify the change (rule 80-change-class, the heavier class when arguable) - High-risk runs the plan gate even without --reviewed - then begin implementing, a defect through debug (cause before fix). |
resume |
Pick a claimed issue back up where it left off - including offering to re-enter the Claude Code session that last worked it. |
status |
Report progress on the issue(s) - read-only. |
finish |
Run the local gates (mise run ci, else mise run check) until green before any push - CI is the confirming run, not the iteration loop, and a push made earlier goes to a draft PR. Capture any non-obvious lesson on the enforcement ladder. Just before the push, scripts/finish-preflight.sh checks the committed branch against the freshly fetched default branch, or the base its PR targets (--base: a stack parent, a batch/<slug> branch, prod for a hotfix): it lists the conflicting paths, reports a parent whose PR closed or merged (a merged one even when GitHub hid it by retargeting the PR to the default branch, found in the PR's automatic base-change history), and prints the merges that bring the base in. After a squash-merged parent those merges record the squash with -s ours, since the branch already holds the parent's content, so a child that edits its parent's lines does not conflict with the squash. finish runs those merges (git merge --no-edit, never a rebase, so no force-push) whenever the branch is behind or its parent merged, so CI runs on the current base, an unpushed branch included; it runs them over a conflict only when every conflicting path is mechanical, and otherwise stops before the push with the paths. A closed parent stops the push. A PR that is a layer of a GitHub native stack takes no merge, since a merge commit blocks the stack from merging: behind its base it stops the push, unless its parent merged and the stack holds only that parent and this PR - then gh stack unstack comes first; when the PR or its stack cannot be read (no gh included), conflicts are still predicted but no merge is run, and a branch holding a merge commit is never linked into a native stack (/steer:reference stacks section 6). What the helper cannot check (offline, no gh) it reports as unchecked, never as a conflict. The same run reports an ADR or numbered migration the branch adds whose number the default branch or an open PR already uses, naming that PR: taken on the default branch, an ADR is renumbered and a migration stops the push; taken by an open PR, the branch with no PR yet or the higher PR number renumbers its ADR, and any collision left in place is listed for the reviewer (known limitations). Then open the PR (pr-flow; a dependent branch's PR targets its parent and is linked into a native stack only when the gh stack extension is installed and the parent's PR is yours, on the default branch and in no stack) - the first push of the new issue/<n> branch sets the upstream (git push -u origin <branch>; later pushes are a plain git push) - and transition to validate. The PR opens ready only when the code gate came back clean - no high finding is open (a Trivial change, which skips the gate, qualifies), nothing is left unanswered under Notes for the reviewer, no drift class is flagged, no question awaits confirmation - and finish then watches its CI to conclusion; a later clean finish readies an earlier draft. finish sorts each reviewer note (a medium finding, a design question) first: one whose resolution is cheap to reverse becomes a default taken - it applies its recommendation, files the follow-up issue the note names, and records Default taken: <what>, because <why> - and never a question. When you are the PR's author and in the session, it asks you the rest - a note that is hard to reverse or turns on a fact only you have - before the push, one question per note with a recommended resolution and Decide later, records your answers under the notes, applies any change one asks for, and readies the PR. Anything else opens as a draft and stops: the author reads it and marks it ready, which starts CI and makes that run theirs. When the feature's intent is still draft, the PR ticks PO acceptance -> Not yet and names it: the PO approves before the merge. In solo-trunk, commit straight to main with a Closes #N trailer and watch CI to conclusion (gh run watch) - on a draft intent it offers the approval once first, and without it commits with Refs #N and leaves the issue at validate. A red build - on a ready PR, picked up by resume, or on the trunk push - is reproduced and fixed locally, then pushed once, never a push per attempt. Every push to a ready PR or to the solo-trunk main is a full CI run, so follow-up work - what one of your messages or one review asks for - is committed fix by fix and pushed once, at the end of that turn. When work must be pushed before the round is done, a PR the agent readied earlier in the same conversation, with no review submitted since, goes back to draft first (gh pr ready --undo); at the round's end the agent pushes its last commits and readies it again only if it still qualifies. Any other ready PR stays ready and gets only green commits, once. When the branch changes a contract.md, the PR body's Spec delta lists the added, modified and removed requirement IDs, derived from the git diff (each removed one with a Reason and a Migration line). The PR also lists each question start picked up, for its owner to confirm on the running change. With no authenticated gh, the PR is opened or updated through the GitHub MCP server (always as a draft, since its CI cannot be watched), and with neither it prints the compare URL for you to open as a draft; the CI watch needs gh, so without it a ready PR's or trunk push's CI is reported as not watched. |
queue #A #B ... |
Deliver several independent issues one after another, one fresh worker each - see below. Entered automatically when an implement ask names two or more issues. |
drive [--max N] [--label <l>] |
One autonomous cycle over your PRs, your review queue and ready issues - see below. Not issue-scoped. |
review [#PR ...] [--mine] |
Clear the PR review queue in one batch - see below. Not issue-scoped. |
debug [#N \| <symptom>] |
Root cause before the fix - see below. With only a symptom and no fix asked, diagnosis only and not issue-scoped. |
spike [<question>] |
Answer one named question with throwaway local code - see below. Not issue-scoped. |
qa [#N] |
Opt-in browser QA of the flows the branch diff touches - see below. |
promote |
Not issue-scoped - ships what is already merged. Run by a dev or the PO. Reads policy/delivery.yml's production_gate (absent -> prod-branch-pr), shows what would ship, cuts a release/vX.Y.Z snapshot branch from the default branch with the changelog cut committed on it, opens the Release PR release/vX.Y.Z -> prod - one PR per release - and stops: merging it deploys production and is the human's gate, approved by a PO team member and a dev team member. While it is open, non-prod runs the release branch for the PO to test, QA fixes go in as qa-fix/<n> PRs into it, and main keeps taking merges that deploy once it closes; after the merge, merge-back.yml pushes a merge-back branch at prod's tip for a dev to merge into main with a merge commit, which brings the changelog cut to main; the next Release PR fails ci:promotion until it lands. Any other gate value (github-environment, manual, none) stops there: there is no promotion PR to open. |
tidy |
Not issue-scoped - sweeps loose files at the repo root into /spec/reference, /spec/design and, for a runbook, /spec/app/runbooks: confidently classified strays move now, every rename and delete waits for a yes. Changes where files live, never behavior. |
Issue queue - /steer:work queue¶
queue delivers a list of independent issues in one run, in the order given.
You don't have to name it: an implement ask naming two or more issues ("fix #12
and #15", /steer:work #12 #15) runs as a queue automatically, unless you ask
for them combined in one branch. The session orchestrates and implements
nothing itself:
- Triage from metadata - an issue claimed by someone else, not ready,
High-risk with no agreed scope, or dependent on another queued issue is set
aside with its reason. Dependent work belongs in a stack or a
batch/*branch, not a queue. - One fresh worker per issue, in its own worktree. It loads the rules,
runs the normal
start->finishflow (local gates, code gate, a PR off the default branch - ready on a clean gate, else a draft) and returns a short card. Every non-Trivial issue also gets the independent plan gate by default, without stopping for your sign-off;--reviewedadds the sign-off, and a plan whose high findings will not resolve comes back to you instead of being built. In solo-trunk the workers run one at a time in the main checkout. A worker that passes its budget of about 200 tool calls checkpoints its work and returns a partial card; a fresh worker resumes the issue, and a second partial records it as blocked. - Verify, don't trust - the PR exists, targets the default branch (a ready
one with a clean gate and green CI on its card), and the issue is in
validate. - Record and continue - a blocked issue is recorded and the next one
starts. Human gates (
--reviewedplan sign-off, an unresolved plan, aProposedADR, a product question) are asked in the session, and so are the reviewer notes that kept a worker's PR a draft, when you are its author; the worker then readies it. The queue stops early only on a failure that would hit every issue.
Under Orca, ask for it and each issue gets a visible Orca workspace instead of
a subagent (orca worktree create --reference <issue-url> --agent claude
--prompt "/steer:work #N"). The workspaces run in
parallel, you answer each one's gates in its own chat, and the orchestrator
verifies the branches when you come back. Subagents stay the default.
It ends with one table of issue -> PR or blocker, and points at
/steer:work review --mine for any draft whose notes you deferred. The orchestrator never merges
or readies a PR. --reviewed carries over to every worker; --hotfix and --handoff are refused.
Autonomous cycle - /steer:work drive¶
drive runs one cycle without a prompt per step. The session orchestrates and
implements nothing itself; every change is made by a fresh worker running the
ordinary resume or start -> finish flow.
- Your open PRs first - one with red CI, a conflict, or changes requested on its current head goes to a worker that addresses the feedback, pushes once when every point is done, comments what changed and re-requests review. A PR already tried at its current head waits for a human instead of being retried.
- PRs waiting on your review - attended, each gets a review card and nothing is posted; unattended, the queue is only listed.
- New issues, up to
--max(default 3) - ready, unclaimed issues, set aside and run asqueuedoes. In an unattended run every worker opens a draft.
Each cycle ends on Drive: idle or Drive: work remains, so /goal can drain
the backlog (/goal run /steer:work drive until a report ends with "Drive:
idle") and a self-paced /loop /steer:work drive keeps watching. A run nobody
watches needs the policy/automation.yml opt-in, which drive asks for and
writes on a branch with its PR. It refuses solo-trunk, and it never merges,
approves, creates an issue or deploys.
Batch review - /steer:work review¶
review drains a review queue in one pass. It reads every PR awaiting your review (review-requested:@me, or the numbers
given - /steer:work review #12 for one PR) and does the reviewer's legwork in parallel:
- Triage from metadata in one
gh pr listcall - draft, red CI and conflicting PRs go straight to Blocked without a review. A stacked PR adds one lookup for a GitHub native stack: merging it merges every PR below it, so its readiness is judged across the whole stack. - Recall before review. A PR you already reviewed at its current head -
your own posted approval or change request, or a card stored in the
git-ignored
spec/.work/reviews/by an earlier session - gets no reviewer. A moved head is reviewed as a delta from that commit (in full after a force-push), whichever session reviewed it first. - One
steer-pr-reviewerper remaining PR, all at once, each reading the diff first and returning a seven-line card: what it does, change class, tests and contract coverage, drift flags, findings withpath:line, design questions for the author, a suggested verdict. A fresh verifier then tries to refute each card's high findings, given only the claim (path:lineand what goes wrong), not the reviewer's reason it blocks: a refuted one leaves the card; one it cannot back with a failing input or a path through the code stays marked unconfirmed. Each card is stored inspec/.work/reviews/before you are asked, so a session that ends first loses nothing - only in a repo that git-ignores that directory, as the scaffold does; elsewhere nothing is stored and your posted reviews are the only memory. - Five buckets - Ready, Changes, Look (High-risk, drift-flagged, or built on an intent its PO has not approved yet: never batch-approved), Reviewed (your review is already posted at this head) and Blocked. Two exemptions keep a PR out of Look, decided by a script on the full PR diff, not by the reviewer: a High-risk PR whose diff only moves version pins or lockfiles, and drift flags that are exactly the boxes the changed paths imply (which paths imply a box). Its Ready line names the exemption.
- One question, one command. You reply with the Ready PRs to approve
(or
readyfor all of them); the approvals post in a single command, and a PR pushed to since its card was built is skipped. The command runs the same in sh, bash and zsh, and names each PR it could not look up or approve rather than reporting it as changed. Findings on the Changes PRs you name post as change requests. - Then each Look PR, presented whole - its full card in one message, one decision for the PR - never in parts.
The approval is yours: nothing is pre-selected, an ambient "ok" approves nothing, and an unattended loop never approves. It never merges.
review --mine is the author's side - your own queued PRs, which GitHub will
not let you approve. It asks you any reviewer note left unanswered on a
finished draft, then marks it ready, routes red or conflicting
ones to resume, retargets an independent stacked PR onto the default branch
(a native stack is reported to you instead - leaving one is a restructuring),
and asks you who should review an unassigned one.
Debugging - /steer:work debug¶
Any defect - a bug issue, a failing test or check, a red build finish must
fix, a --hotfix incident - follows one procedure before a line of product code
changes:
- Reproduce with a command that fails every time - ideally the regression
test the Testing rule requires - and check what changed since the last
known-good state (
git bisectwhen one is known). - Trace to the source - where the bad value is first produced, not where it surfaced - comparing against a working sibling path.
- One hypothesis at a time, each tested with the smallest change that can refute it and reverted when it does.
- State the causal chain from trigger to symptom with
file:lineat each step, the fix, and where the regression test lives. - Fix test-first at the source, then run the full local gates.
A regression test is for a defect that reached the default branch. A defect in the branch's own unmerged change - a red build, a review finding - corrects or extends the tests that change already carries instead.
Three refuted hypotheses or failed fixes stop the loop and report what was ruled
out. A cause that is a wrong responsibility, shared state or a broken assumption
goes to the dev as a design question (a contract.md change or an ADR), never a
workaround. Asked only "why is this failing?", it stops at the findings and
edits nothing.
Spikes - /steer:work spike¶
A spike answers one question that talk cannot settle - "can library X stream this?", "one long form or three steps?" - with code that is local, time-boxed and disposable. Its product is the finding, never the code:
- Name the question - a
Q-NNNthat settles with a prototype, or aProposedADR's options. No question, no spike. - Frame it in
spikes/<slug>/SPIKE.md: the question, what result settles it, the options, a time-box. The rootspikes/is git-ignored by the scaffold.gitignore(/spikes/); a repo without that line gets it from/steer:setup syncfirst. - Build the smallest thing that answers it, in
spikes/<slug>/only. Tests, lint and the Definition of Done are relaxed; real secrets,/infra, deploys and real third-party calls are not, and a spike into a High-risk area uses local services and generated data only. Product code never imports fromspikes/. - Land the findings in the spine - the
Q-NNNblock, the ADR, or thecontract.md- as evidence and a recommendation. The decider still decides. Those/specedits ship as usual, on a branch and PR in PR flow. - Close - building the answer is
/steer:work start, rewritten with tests; the spike directory is deleted on the dev's yes.
The spike itself needs no issue, branch or PR, because none of its code is
committed. The write-path nudges stay silent inside the root spikes/.
Code meant to grow into the product is a prototype, not a spike: bootstrap and
issue-first apply to it unchanged.
Browser QA - /steer:work qa¶
Tests cover the code; qa clicks through what the diff changed before the
reviewer has to. On the work not yet in origin/<default> - the work branch, or
the unpushed trunk commits in solo-trunk - with the app on a fresh local stack:
- Map the flows the diff reaches - changed pages, routes, components and
handlers, and the user flows that lead to them - plus the touched feature's
acceptance criteria when it has an
intent.md. - Drive each flow in a real browser: the happy path, then empty and invalid input, a second role where access logic changed, back and reload, a narrow viewport - watching console errors and failed requests as well as the page.
- Fix or file. Breakage this diff introduced is fixed through
debug, with the change's own tests corrected or extended; anything larger, needing a product decision, or already broken on the default branch becomes a separate linked issue. - Capture before/after screenshots of each changed screen, at desktop and
narrow width, from the default branch (booted in a throwaway worktree) and
from the branch. They are pushed to a hidden ref,
refs/steer-assets/<branch>, which is not a branch and which a default clone never fetches, and linked asgithub.comblob URLs pinned to a commit SHA, which render in a private repo's PR body. The ref is kept as review evidence;git push origin --delete refs/steer-assets/<branch>prunes it. Solo-trunk has no PR body, so it skips this step. - Record the flows driven, what passed, what was fixed and what was filed
under the PR's Notes for the reviewer, and the before/after table under
Visual changes, then
finishagain for the new commits.
It is opt-in: finish suggests it when the diff touches UI paths and never
runs it. The driver is the walkthrough's - the Playwright CLI with a shell, the
Playwright MCP without, and under Orca its built-in browser, so you can watch
the run in the IDE - and no QA script is committed; a check worth keeping
becomes a regression test. Local, seeded data only: never a deployed
environment or a real account.
Walkthrough - show the feature working¶
walkthrough <feature> is for the PO or client who asks "show me" rather than
"send me the spec". From an approved intent and the app running locally, it
plans one captioned scene per user-experience step, finds stable locators with
the Playwright CLI, and commits scripts/demo/<feature>_walkthrough.* with a
mise run demo:record task. It then records, checks every scene on an ffmpeg
contact sheet, and hands you the MP4 with what a viewer should know (seeded
data, the version recorded, any real names on screen).
The script is the deliverable, not the video: the video is git-ignored, and
re-running mise run demo:record reproduces it after the data or UI change.
Record on a fresh stack after mise run dev:setup, because leftover local
state shows up on camera.
Learnings - enforcement first¶
When a unit of work turned on reasoning that is non-obvious and absent from the
final code, tests and docs ("X fails because Y; symptom Z misleads"), finish
puts the lesson on the first rung that can carry it: a regression test, a lint
rule or hook, a contract.md rule, a product CLAUDE.md pattern, a
/steer:report for a steer defect - and only then a learning file at
spec/learnings/<slug>.md (template templates/spec/learning.md), updating a
matching one rather than adding a second. Writing nothing is the normal outcome;
whatever is written ships in the same PR. start and the --reviewed plan
reviewer grep the learnings' area: / symptoms: / applies_when: frontmatter
and read only the matches; /steer:audit code proposes retiring or promoting
stale ones. Full prose: /steer:reference traceability.
Drift flags before the push¶
finish composes the whole PR body before its pre-flight and hands it to
scripts/finish-preflight.sh --body <file>. The helper derives, from the paths
the branch changes since its merge base with the base, which boxes of the PR
template's drift checklist they imply, and compares them with the ticked boxes.
A box the diff implies but the body leaves unticked is ticked, or left with a
note saying why it does not apply; a ticked box no path implies keeps its tick
and gets a note asking the reviewer to confirm it. Either way the PR opens as a
draft. The helper only reports: it never edits the body, never unticks a box,
and never decides drift - that stays with the reviewer (rule 50-done -> Drift
gates). Which paths map to which box:
known limitations.
Architecture map before the push¶
The same pre-flight runs scripts/architecture-map.sh on the branch and on its
merge base, and reports only what the branch introduced: a path the root
ARCHITECTURE.md cites that no longer exists, or a top-level, apps/* or
packages/* directory the file never names. finish updates ARCHITECTURE.md
on the branch and ticks Architecture/stack drift, so, like any
ARCHITECTURE.md change, the PR opens as a draft; a finding never stops the
push. Gaps that predate the branch are /steer:audit code's, whose DX & docs
dimension runs the same helper over the whole tree. A cited path counts only when
its first segment is a top-level entry, so a module specifier or a runtime path
(nitro/vite, uploads/...) is not checked, and a directory counts as named
only when it appears as a path or as an entry of a fenced tree, not as a bare
word. A backticked URL route under a top-level directory name (/plans,
/api/health beside api/) reads as a path, so it can name that directory or
read as missing. A cited path the work tree's
.gitignore covers (build output, .env.local) is not missing.
Closing refs across repositories¶
A bare Closes #N names an issue in the PR's own repository. If
/spec/tracker.md declares a repository: other than the repo the code lives in -
a team centralizing issues in a dedicated tracker repo, or a polyrepo member
whose spine lives in the workspace - then Closes #N misses the tracker issue and
it silently stays open. Nothing warns, and because finish reads the merged
PR as its lifecycle-transition evidence, the issue never advances state either.
The qualified Closes owner/repo#N does cross repositories: GitHub closes the
tracker issue when the PR merges into the default branch.
finish therefore resolves both sides before writing any closing ref: the
declared tracker (steer_tracker_repo, lib/scope.sh) against the actual repo
(gh repo view --json nameWithOwner).
In a polyrepo member
the mismatch is structural rather than incidental - the tracker is always the
workspace's - so the qualified form is written every time. start also
resolves the spine from spec/PRODUCT.md before reading the tracker or a
feature's specs: a member carries neither spec/tracker.md nor
spec/features/**, and a missing local intent.md means the workspace has not
been read yet, never that the feature is unspecified. The spec update that a
behavior change requires lands as its own change in the workspace repo.
| Closing ref | Who closes the issue | |
|---|---|---|
| Same repo, or either value unreadable | Closes #N - unchanged |
GitHub, on merge |
| Proven mismatch | Closes owner/repo#N |
GitHub, on merge - read it back after; still open, /steer:tracker-sync close |
Only a demonstrated mismatch diverts. An absent tracker file, an unresolved
[owner/repository] placeholder, an empty value, or a failed gh call all keep
Closes #N, so the ordinary same-repo path is untouched. In solo-trunk the same
rule governs the commit trailer - and matters more there, since the closed issue
is the only terminal evidence.
Local work marker¶
start writes a local, git-ignored marker at spec/.work/<branch>.md (slashes ->
underscores). Its existence is what the end-of-turn
Stop-hook reconciliation uses to recognize a branch as
issue-governed - ahead of any branch-name guess - so an unconventionally named
but properly claimed branch is still recognized.
The marker also records a newest-first list of the Claude Code session(s)
that worked the branch. The Stop hook keeps the most-recent session at the head
each turn, and resume reads it: if a different prior session is recorded, it
offers claude --resume <id> (and the transcript path) so you can re-enter that
conversation for context. These session ids are local-only breadcrumbs - they
stay in the git-ignored marker and never reach the tracker.
Nothing in git prunes spec/.work/, so start, resume and finish do: they
read every marker's issue through the tracker and delete the markers of closed
issues; status only reports them. The status band and its Work claims pane
also leave out a marker whose branch exists neither locally nor on a remote, or
whose pushed upstream is gone, so finished work is not offered as a resume.
Orca workspace links¶
Under Orca, start attaches the issue URL to the checkout's Orca workspace and
finish attaches the issue and its PR (orca reference add). Orca's sidebar
then shows both, and orca reference find <url> locates the agent working on
an issue. The call names the workspace by path, so a queue worker in a nested
worktree links its issue to its own entry, never to the parent's workspace. It
is best-effort: a failure is reported in one line and never blocks the work.
Outside Orca nothing runs.
Those links also group an epic's work. When queue or drive opens an Orca
workspace for an issue that has a tracker parent, and exactly one workspace in
the repo has that parent's URL attached, the new workspace is nested under it,
so Orca's sidebar shows the epic with its children. The epic's URL gets
attached when you open its workspace from the issue in Orca, or with orca
reference add; a URL Orca only saw in a terminal does not count. Only the
direct parent is looked up. With no parent, or zero or several matches, the
workspace is created as before.
Native Claude Code delivery features¶
Claude Code's own delivery tools fit this flow without moving the merge gate.
/steer:reference conventions has the detail:
/batchtakes one umbrella issue. Each unit opens its PR against abatch/<slug>branch cut from the default branch, withRefs #N, and the singlebatch/<slug>-> default PR closes the umbrella./autofix-prpushes CI and review fixes to the PR branch. Tell it to leave drift flags to the human reviewer.- Plan mode produces an acceptable plan for a Behavioral change. Leave
plansDirectoryunset, or point it at a git-ignored path, so plan files stay out of the spine. claude --worktree "#<n>"opens a pull request, not an issue. To start an issue, runstartinside any worktree.
Rules it follows¶
- One issue per branch/PR by default (in solo-trunk, one trunk commit per
issue, each closing its own
#N). - Git and PR delivery follow the repo's commit-autonomy rules - commits, pushes, and opening the PR are autonomous; merging is gated. See the Authorization model.
finishopens its PR as a draft and stops unless its code gate came back clean, or its only notes are defaults it took on cheap-to-reverse choices or ones you answered in the session, when it opens it ready and watches its CI (a--hotfixalways opens it ready, a--handoffalways as a draft); a draft's CI runs once the author marks it ready. Every run after that - a ready PR's, a trunk push's - is watched to green and a red build fixed before the work counts as done - the skill pre-approvesgit push/gh pr create|edit|readyplus read-only CI status (gh pr checks,gh run view,gh run watch) for this; the merge step stays gated. If you have stepped away, the in-turn watch blocks the turn; re-enter monitoring via the harness/loopovergh pr checksor a background watch (steer ships no background poller). Merge and deploy remain a human's call.- A change that ships brings a changelog fragment -
mise run changelog:new, one file under.changes/unreleased/.mise run ciand the required check both fail without one (ci:changelog), and editing someone else's pending fragment does not count - the gate wants a file added.CHANGELOG.mditself is generated at release and never hand-edited. - All tracker-metadata I/O routes through
/steer:tracker-sync, and execution needs only its core operations -find,get,create,update-state,claim,comment,link-delivery,close. They key off thesteer:*markers in the issue body rather than GitHub-native metadata, solink-deliveryrecords the PR in pr-flow and the closing trunk commit in solo-trunk. Every body write is a guarded read-modify-write that fails closed: an empty candidate, or one that changes anything outside the managed block and the markers, is refused, never written. On theghpath the bundledscripts/issue-body.sh(marker-set,managed-replace) performs it byte for byte, so no agent hand-rolls the rewrite in shell.