deliver-backlog
Delivery orchestrator — drive a set of backlog cards and specs through create-spec, refine-spec, spec, run-spec and finalize-spec in dependency-safe waves, resume-safe across sessions, with maintainer checkpoints at spec approval; runs unattended only inside the maintainer's autonomy grant
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- deliver-backlog
- description
- Delivery orchestrator — drive a set of backlog cards and specs through create-spec, refine-spec, spec, run-spec and finalize-spec in dependency-safe waves, resume-safe across sessions, with maintainer checkpoints at spec approval; runs unattended only inside the maintainer's autonomy grant
- argument-hint
- [status | start <MH-n,spec:name,...> | approve-spec <spec> | max-items N]
03 SKILL.md 正文
Deliver Backlog
This is the Claude Code adapter for .agents/skills/mythhelm-deliver-backlog/SKILL.md. AGENTS.md and WORKFLOW.md are shared policy; the Claude hooks and slash commands below are client-specific mechanics.
Takes a set of backlog cards (and specs without a card) from wherever each one stands to merged, finalized code, through the project's own lifecycle: /create-spec → /refine-spec → /spec → /run-spec → /finalize-spec. This skill orchestrates; it never implements. The lifecycle skills and the agents they dispatch write the specs, the code, the reviews and the product requests. The orchestrator writes run state only through scripts/orchestration/delivery.py.
Resume-safe. The run lives on disk in the main checkout's orchestration/ (INTENT.md, RUN-LOG.md, QUESTIONS.md; formats in orchestration/README.md). Every invocation starts at Step 0, which reconciles that state with ground truth: spec directories and tasks.md on origin/main, pull requests on GitHub. Where they disagree, ground truth wins and the recorded stage is corrected. Re-invoking after a crash, a cleared context or a finished session continues the run; it never restarts it or repeats a completed stage.
Input
$ARGUMENTS selects the mode:
| Arguments | Mode |
|---|---|
| (empty) | Resume the run and keep executing. With no run on disk, use the grant's scope as start, or ask for a scope |
start <ids> |
Start a run over those cards and specs (MH-3,spec:foo). Under a grant, every id must be in its scope |
status |
Step 0 only: reconcile and report, advance nothing |
approve-spec <spec> |
The maintainer's spec checkpoint for one spec, then resume |
max-items N |
Resume, advance at most N stage transitions, then report and stop |
approve-spec is the maintainer's decision. It counts only when the maintainer typed it or the dispatching prompt carries it from them; this skill never issues it to itself.
Invocation contexts
- Slash command: runs Step 0 and then the loop. Without a grant the maintainer is present: a spec checkpoint or a blocking question may be asked directly, then recorded with
delivery.py. - Model-invoked: the same.
- Non-interactive (a headless or heartbeat-started session, or any session under a live grant): never asks. Every question is filed with
delivery.py question, the affected items are parked, and independent work continues; a spec checkpoint becomes a question and the item waits atapproval..claude/hooks/guard-blocking-ask.shblocks the synchronous form. When nothing actionable remains, the final report ends with the lineAWAITING MAINTAINER: <reason>.
Rules for the whole run
- The grant is the maintainer's.
scripts/orchestration/autonomy.sh statusshows it. Never grant, renew or edit it (.claude/hooks/guard-autonomy.shblocks it); revoking is allowed. What a grant permits is inknowledge/autonomy.md: continuing unattended within the scope, merging pull requests that passautonomy.py merge-check, and, when the maintainer passed--allow-pm-sync, the lifecycle status moves of granted cards. Nothing else: no push tomain, no tag, release or workflow run, no otherproduct/change, no heartbeat installation. - Scope is fixed. Work only on the run's items, and under a grant only on items in its scope. A card that should join the run is a question for the maintainer, never a silent addition.
- The lifecycle is authoritative. Enter each item at its current stage; never repeat or skip one. Each lifecycle skill does its own bookkeeping (lifecycle pull requests, PM-sync requests, retrospectives). The per-stage commands are in the loop below.
- Merges under a grant go through
python3 scripts/orchestration/autonomy.py merge-checkandgh pr merge <n> --squash --match-head-commit <sha>(/run-spec-worktree-merge,/finalize-spec-publish). A pull request it refuses is not merged by any other route: fix what it names, or file a question. - Lanes for shared resources. At the start of the invocation mint a token (
scripts/orchestration/lane.sh token) and keep it to yourself. Holdrun:deliveryfor the whole invocation; takeindexaround any commit in the main checkout,spec:<name>around a lifecycle move you make by hand, andproductaround a product write. Never pass the token to a worker, and tell workers never to calllane.sh. - Run state through the script.
delivery.py item|run|log|questionare the only writers oforchestration/; each stamps its line with the clock. Never write a timestamp yourself, never edit those files, and cite entries by question id or timestamp, never by line number. Workers never writeorchestration/: they report, and you record. - Trust nothing reported. After every dispatch, check what actually happened:
git -C <main checkout> rev-parse HEAD,git fetch originand the pull request on GitHub. A skill's own commit-and-push instructions can override a read-only dispatch prompt, so an unexpected commit or push is a finding to report, not a surprise to absorb. - Uncommitted files you did not write in the main checkout belong to another session. Never commit, move or discard them. Before calling them a conflict, check whether each matches a blob already on origin/main (
git hash-object <file>againstgit rev-parse <commit>:<file>over recent commits): stale residue of merged work is common and needs no action from you.
Step 0: Resume
scripts/orchestration/status.sh: the grant, the run, lanes, specs in flight, open pull requests with unresolved-thread counts, main's CI. Do not re-read the state files end to end; the digest is the resume.- Take the run lane:
scripts/orchestration/lane.sh acquire run:delivery --owner <token> --note "deliver-backlog". Refused means another live session runs this delivery: report that and stop. - No run on disk: go to Plan. Otherwise
python3 scripts/orchestration/delivery.py reconcileand correct every<- differsrow withdelivery.py item <id> --stage <stage>(ground truth wins; the correction is logged). - Answered questions (
QUESTIONS.mdentries whose Status isansweredsince the last run): apply each answer, unpark its items withdelivery.py item, and log what you did. - Route by
$ARGUMENTS:statusreports and stops (release the lane);approve-spec <spec>moves that item fromapprovaltorun-specand logs "approved by the maintainer"; otherwise continue with the loop.
Plan (a new run)
- Resolve the scope:
start <ids>, else the grant's scope. Refuse ids outside the grant. python3 scripts/orchestration/delivery.py init --scope <ids>.- For each card, read it in
product/backlog.mdand its Spec field. For each spec, find its state (scripts/harness/spec-lifecycle.sh resolve <name>). Record spec and stage withdelivery.py item <id> --spec <name> --stage <stage>: no spec iscreate-spec;unrefined/isrefine-spec;refined/isspec;todo/isapproval(orrun-specwhen the grant skips the checkpoint or the spec was already approved);in-progress/isrun-spec;unfinalized/isfinalize-spec;done/isdone. - Dependencies: from each card's Summary and each spec's requirements and design, record
--dependsedges and a--wavenumber in topological order. A cycle, or an edge you cannot ground in the text, is a question.
The loop
Repeat until nothing is actionable or max-items is reached:
-
python3 scripts/orchestration/delivery.py actionablelists the items an agent can advance now. Specifying runs ahead of dependencies;run-specandfinalize-specwait until every dependency isdone. Take the lowest wave first. Run at most one/run-specand one/finalize-specat a time; specifying other items meanwhile is fine. -
Advance the item one stage and record it:
Stage Do Then create-spec/create-spec MH-<n>--spec <name> --stage refine-specrefine-spec/refine-spec <name>--stage specspec/spec <name>--stage run-specwhen the grant's spec checkpoint is off; otherwise file one question "Approve spec <name>" (the spec's path and a summary of its tasks) and--stage approval --note Q-<n>approvalNothing: the maintainer approves with approve-spec <name>or by answering the questionStep 0 moves it to run-specrun-spec/run-spec <name>--stage finalize-specwhen it reports the spec inunfinalized/finalize-spec/finalize-spec <name>(never--release)--stage done -
A lifecycle skill that stops (a task out of attempts, a review that will not converge, a question the spec does not answer): record its stop report with
delivery.py log, file a question when the maintainer must decide, park the item (--stage parked --note Q-<n>), and continue with the next actionable item. -
Circuit breaker. Two items parked for the same kind of failure, or a third of the run parked: stop taking new work (
delivery.py run --status paused), file one question describing the pattern, and report.
Escalation
Decide yourself, and record it with delivery.py log: the implementation approach, test strategy, ordering within the dependency graph, and recommended defaults for choices the specs leave open inside their own scope.
Escalate with delivery.py question (context, a recommended default, the affected items), park only those items and continue: conflicting or ambiguous requirements, anything that changes scope or a card, destructive or irreversible steps, anything needing credentials, a release or a push to main, and any case where two reasonable readings would build different things. Never take the risky default without an answer.
Finish
When every item is done or parked with a question: delivery.py run --status complete (only when all are done), release the run lane, and revoke the grant if the whole scope is done (scripts/orchestration/autonomy.sh revoke --reason "run complete"). Remind the maintainer of scripts/harness/prune-merged.sh for the merged branches.
Output
A report: the grant's state and time left; items advanced in this invocation with their stage transitions and pull request numbers; parked items with their question ids; open questions; the next action the following invocation will take. When nothing actionable remains, end with a final line AWAITING MAINTAINER: <reason>, which lets .claude/hooks/continue-run.sh release the session.
04 同仓库更多 Skills
mythhelm-deliver-backlog
Coordinate a MYTHHELM backlog run with the shared stage checks and maintainer checkpoints.
mythhelm-bootstrap
Orient a Grok Build session in the MYTHHELM repository before task or spec work.
vendor-consult
Run one advisory stage consult (premise-ground, spec-validate, task-review, change-review, stuck-oracle, dossier) with an optional external vendor, then adjudicate the answer at its anchors
update-docs
Bring README, docs/, knowledge/, WORKFLOW.md and CLAUDE.md in line with what a shipped spec or a merged change actually did — find every statement the change made stale, fix it where readers look, and add only the new facts they need
triage
Score an idea or a GitHub issue against the master spec's stages, gates and commitments, check it for duplicates, and recommend whether it becomes a backlog card; read-only
test-driven-development
Red-green-refactor for Go — use when implementing any feature, bug fix or behaviour change, before writing implementation code