Goal to Release
Turn broad goals into issue-backed, reviewable, verified releases. Own
sequencing, evidence, review hygiene, and closeout. Route concrete domain work
to narrower skills instead of duplicating their mechanics.
Operating Model
Use live evidence first: repo instructions, worktree, branch, open issues, PRs,
review threads, CI, deploy state, docs, scripts, and recent reviewer feedback.
Treat memory and prompt history as leads to verify when facts can drift.
Keep a working goal ledger. Use working notes for short, single-PR work. Use a
durable ledger by default when the goal spans multiple issues/PRs, stacked or
parallel branches, repo-wide modernization, dependency upgrades, release
orchestration, cross-session execution, or any user-requested handoff. Then use
scripts/new_goal_ledger.py to create an isolated untracked goal directory.
Read goal-ledger-lifecycle.md before
creating, auditing, distilling, or handing off durable ledgers.
If live inspection is forbidden, produce a provisional ledger and mark
unverified live facts as TBD or UNVERIFIED.
Modes:
plan-only: issue/PR/release plan only.
preflight: discover repo surfaces, gates, risks, and PR-readiness before
implementation or publication.
implement: build one or more lanes.
monitor: babysit hosted CI/reviews/deploys.
closeout: prove issues, PRs, docs, deploys, evidence, and summaries are
complete.
retrospective: extract reusable workflow lessons.
Core Workflow
Ground
- Read repo instructions and relevant docs/code first.
- Inspect worktree and branch state; preserve unrelated dirty work.
- If user edits are unrelated, keep them out of staging and commits. If they
overlap files you must touch, inspect the exact diff and adapt around it;
use a separate branch/worktree when that is the cleanest safe path. Never
stash, discard, reset, or rewrite user work without explicit approval.
- Identify existing issues, branches, PRs, reviews, checks, deployments, and
goal ledgers before creating new ones.
Charter
- State objective, non-goals, success criteria, release/deploy boundary, and
user steering.
- If the goal is larger than one reviewable PR, create or update one issue
per coherent lane.
- Reorder lanes when evidence shows a force multiplier; record the rationale
in the ledger and issue/PR text.
Preflight
- For nontrivial lanes, run or reason through
scripts/goal_preflight.py.
- Build a repo-adapted gate plan from discovered surfaces, not a generic
checklist.
- Read preflight-gates.md for conditional
gates and evidence expectations.
Plan the PR graph
- Default to serial PRs for coupled work.
- Use parallel or stacked PRs only when lanes are independent or explicitly
ordered.
- Every stack records base branch, dependency, retarget plan, validation
scope, and merge order.
- For stacked work, open each PR against its immediate base branch. Merge the
root PR first, then retarget or rebase the next PR onto the new target
branch, refresh hosted checks/reviews, and only then merge the next stack
layer.
Research and decide
- Use current official docs, source, package repos, or deployed behavior for
dependency, platform, API, deploy, security, and architecture choices.
- Score meaningful choices when the decision is not obvious.
- Encode durable decisions in issues, PR bodies, ADRs, specs, or docs.
Implement lanes
- Keep the active branch narrow and semantic.
- Hard-cut obsolete paths when the goal requires entropy reduction.
- Update tests, docs, fixtures, generated metadata, and runbooks that are
part of the changed contract.
- Do not absorb adjacent redesigns silently; split them into follow-up
issues or lanes.
Verify before PR publication
- Run focused checks while iterating.
- Before opening a nontrivial PR, run repo-native gates required by touched
surfaces and mandatory bounded subagent review.
- Record exact local command outcomes separately from hosted CI and deploy
proof.
Ship and monitor
- Commit by semantic intent; do not stage unrelated files.
- PR bodies include linked issue, summary, validation, docs impact,
deploy/provider notes, screenshots when relevant, and residual risks.
- Read review-and-merge-loop.md when
opening, updating, or merging PRs.
- Refetch live hosted review threads after every push. Fix valid comments,
rebut stale or suboptimal comments with evidence, resolve addressed
threads, and wait for fresh checks/reviews.
Close out
- Verify issues, PRs, branches, docs, deploys, review decisions, unresolved
review threads, and follow-ups from live sources.
- If deploy evidence is not applicable, record the exact reason instead of
leaving deploy state blank.
- Run
scripts/audit_goal_ledger.py --strict for durable ledgers.
- When a durable goal is achieved, run
scripts/distill_goal_summary.py so
future agents can load summary.md or summary.json before raw ledgers.
Retrospect
- Summarize shipped changes, decisions, user steering, validation, deploy
evidence, and reusable workflow lessons.
- Generalize only repeated cross-repo patterns into skills. Repo-specific
lessons belong in repo docs, issues, PRs, or AGENTS guidance.
Skill Routing
Use narrower skills just in time:
$dependency-upgrade plus package-manager/Turborepo skills for dependency
modernization, release notes, lockfiles, and package graph risk.
$subspawn for bounded independent sidecars and pre-PR expert review.
$commit for semantic staging and commits.
$babysit-pr for hosted PR monitoring.
$repo-docs-align for source-of-truth docs reconciliation.
$hard-cut, $reducing-entropy, $clean-code, security, web, Rust, Vercel,
or repo-specific skills when the active lane touches those domains.
Do not load or restate those skills before their lane needs them.
Stop Conditions
Stop and ask only when proceeding risks data loss, secrets exposure, production
impact without approval, destructive git history, or an ambiguous public/API
contract break. Otherwise make a reasonable decision, document evidence, and
continue.
Failure Modes To Guard
- Review-reactive churn: run preflight and subagent review before PRs.
- Scope ballooning: split adjacent redesigns into follow-up lanes.
- Stale hosted state: refetch reviews/checks after every push.
- False closeout: audit the ledger and live sources before claiming done.
- Ledger archaeology: distill achieved goals into
summary.md and
summary.json.
- Over-delegation: keep critical path and final synthesis local.
- Plan fossilization: update issues, PRs, and docs when reality changes.
1---2name: goal-to-release3description: Orchestrate issue-backed goals from ambiguous request to shipped release with ledgers, adaptive PR graphs, preflight gates, review loops, deploy evidence, closeout audits, and retrospectives. Use for multi-issue/product/platform/maintenance goals, GitHub issue/PR planning, stacked or parallel branches, release babysitting, or goal handoff. Skip isolated fixes unless they need release planning.4---56# Goal to Release78Turn broad goals into issue-backed, reviewable, verified releases. Own9sequencing, evidence, review hygiene, and closeout. Route concrete domain work10to narrower skills instead of duplicating their mechanics.1112## Operating Model1314Use live evidence first: repo instructions, worktree, branch, open issues, PRs,15review threads, CI, deploy state, docs, scripts, and recent reviewer feedback.16Treat memory and prompt history as leads to verify when facts can drift.1718Keep a working goal ledger. Use working notes for short, single-PR work. Use a19durable ledger by default when the goal spans multiple issues/PRs, stacked or20parallel branches, repo-wide modernization, dependency upgrades, release21orchestration, cross-session execution, or any user-requested handoff. Then use22`scripts/new_goal_ledger.py` to create an isolated untracked goal directory.23Read [goal-ledger-lifecycle.md](references/goal-ledger-lifecycle.md) before24creating, auditing, distilling, or handing off durable ledgers.2526If live inspection is forbidden, produce a provisional ledger and mark27unverified live facts as `TBD` or `UNVERIFIED`.2829Modes:30- `plan-only`: issue/PR/release plan only.31- `preflight`: discover repo surfaces, gates, risks, and PR-readiness before32 implementation or publication.33- `implement`: build one or more lanes.34- `monitor`: babysit hosted CI/reviews/deploys.35- `closeout`: prove issues, PRs, docs, deploys, evidence, and summaries are36 complete.37- `retrospective`: extract reusable workflow lessons.3839## Core Workflow40411. **Ground**42 - Read repo instructions and relevant docs/code first.43 - Inspect worktree and branch state; preserve unrelated dirty work.44 - If user edits are unrelated, keep them out of staging and commits. If they45 overlap files you must touch, inspect the exact diff and adapt around it;46 use a separate branch/worktree when that is the cleanest safe path. Never47 stash, discard, reset, or rewrite user work without explicit approval.48 - Identify existing issues, branches, PRs, reviews, checks, deployments, and49 goal ledgers before creating new ones.50512. **Charter**52 - State objective, non-goals, success criteria, release/deploy boundary, and53 user steering.54 - If the goal is larger than one reviewable PR, create or update one issue55 per coherent lane.56 - Reorder lanes when evidence shows a force multiplier; record the rationale57 in the ledger and issue/PR text.58593. **Preflight**60 - For nontrivial lanes, run or reason through `scripts/goal_preflight.py`.61 - Build a repo-adapted gate plan from discovered surfaces, not a generic62 checklist.63 - Read [preflight-gates.md](references/preflight-gates.md) for conditional64 gates and evidence expectations.65664. **Plan the PR graph**67 - Default to serial PRs for coupled work.68 - Use parallel or stacked PRs only when lanes are independent or explicitly69 ordered.70 - Every stack records base branch, dependency, retarget plan, validation71 scope, and merge order.72 - For stacked work, open each PR against its immediate base branch. Merge the73 root PR first, then retarget or rebase the next PR onto the new target74 branch, refresh hosted checks/reviews, and only then merge the next stack75 layer.76775. **Research and decide**78 - Use current official docs, source, package repos, or deployed behavior for79 dependency, platform, API, deploy, security, and architecture choices.80 - Score meaningful choices when the decision is not obvious.81 - Encode durable decisions in issues, PR bodies, ADRs, specs, or docs.82836. **Implement lanes**84 - Keep the active branch narrow and semantic.85 - Hard-cut obsolete paths when the goal requires entropy reduction.86 - Update tests, docs, fixtures, generated metadata, and runbooks that are87 part of the changed contract.88 - Do not absorb adjacent redesigns silently; split them into follow-up89 issues or lanes.90917. **Verify before PR publication**92 - Run focused checks while iterating.93 - Before opening a nontrivial PR, run repo-native gates required by touched94 surfaces and mandatory bounded subagent review.95 - Record exact local command outcomes separately from hosted CI and deploy96 proof.97988. **Ship and monitor**99 - Commit by semantic intent; do not stage unrelated files.100 - PR bodies include linked issue, summary, validation, docs impact,101 deploy/provider notes, screenshots when relevant, and residual risks.102 - Read [review-and-merge-loop.md](references/review-and-merge-loop.md) when103 opening, updating, or merging PRs.104 - Refetch live hosted review threads after every push. Fix valid comments,105 rebut stale or suboptimal comments with evidence, resolve addressed106 threads, and wait for fresh checks/reviews.1071089. **Close out**109 - Verify issues, PRs, branches, docs, deploys, review decisions, unresolved110 review threads, and follow-ups from live sources.111 - If deploy evidence is not applicable, record the exact reason instead of112 leaving deploy state blank.113 - Run `scripts/audit_goal_ledger.py --strict` for durable ledgers.114 - When a durable goal is achieved, run `scripts/distill_goal_summary.py` so115 future agents can load `summary.md` or `summary.json` before raw ledgers.11611710. **Retrospect**118 - Summarize shipped changes, decisions, user steering, validation, deploy119 evidence, and reusable workflow lessons.120 - Generalize only repeated cross-repo patterns into skills. Repo-specific121 lessons belong in repo docs, issues, PRs, or AGENTS guidance.122123## Skill Routing124125Use narrower skills just in time:126- `$dependency-upgrade` plus package-manager/Turborepo skills for dependency127 modernization, release notes, lockfiles, and package graph risk.128- `$subspawn` for bounded independent sidecars and pre-PR expert review.129- `$commit` for semantic staging and commits.130- `$babysit-pr` for hosted PR monitoring.131- `$repo-docs-align` for source-of-truth docs reconciliation.132- `$hard-cut`, `$reducing-entropy`, `$clean-code`, security, web, Rust, Vercel,133 or repo-specific skills when the active lane touches those domains.134135Do not load or restate those skills before their lane needs them.136137## Stop Conditions138139Stop and ask only when proceeding risks data loss, secrets exposure, production140impact without approval, destructive git history, or an ambiguous public/API141contract break. Otherwise make a reasonable decision, document evidence, and142continue.143144## Failure Modes To Guard145146- **Review-reactive churn**: run preflight and subagent review before PRs.147- **Scope ballooning**: split adjacent redesigns into follow-up lanes.148- **Stale hosted state**: refetch reviews/checks after every push.149- **False closeout**: audit the ledger and live sources before claiming done.150- **Ledger archaeology**: distill achieved goals into `summary.md` and151 `summary.json`.152- **Over-delegation**: keep critical path and final synthesis local.153- **Plan fossilization**: update issues, PRs, and docs when reality changes.