Files
gstack/ship/sections/plan-completion.md.tmpl
T
garrytan 79092b22ea fix(evals): cut path variance at its measured sources
- gstack-qa-evidence capture prints startedAt/completedAt/durationMs and, for
  --deadline captures, remainingMs; the functional report takes durations from
  them. The section clock notice asks for one clock read up front instead of one
  after every checkpoint (QA runs spent 7-14% of tool calls on date -u).
- ship plan-completion: skip the audit dispatch when discovery already found no
  plan (the dispatch-vs-skip conflict produced an optional 60-100 s subagent).
- materialize/checkpoint validation errors state the expected schema, so a
  rejected annotations file is fixable in one call instead of blocking the phase.
- session-runner counts turns from the transcript when a run times out, so
  timeouts stop reporting 'turn 0'.
2026-09-30 15:59:58 +00:00

60 lines
3.2 KiB
Cheetah

## Step 8: Plan Completion Audit
Complete this section in order:
1. Dispatch the audit, validate its result and resolve its Gate Logic.
2. Collect the plan's executable checks in Step 8.1; do not run them yet.
3. Run Step 8.2 Scope Drift.
4. Run Prior Learnings, including its setting question when offered, then proceed to Step 9 for review and QA.
**Dispatch this step as a subagent** using Agent, `subagent_type: "general-purpose"`
and `run_in_background: false`. Use Step 7's shared foreground-dispatch rule.
The child reads the plan and every referenced
code file; the parent validates its report and applies the gates below.
**Subagent prompt:** Substitute `<base>` and supply the active plan's absolute path
or complete text, including user-approved scope changes. If none is known, say
so; the child runs the fallback search below. If discovery found no plan, skip
dispatch. The child does not inherit the parent's conversation.
````text
You are running a ship-workflow plan completion audit. The base branch is `<base>`. Use `git diff origin/<base>` and inspect untracked files from `git status` to see the full proposed change. Do not commit or push. Report only: classify every item, but do not execute Gate Logic, ask the user, or advance the workflow. The parent applies those gates to your report.
{{PLAN_COMPLETION_AUDIT_SHIP}}
After your analysis, output a single JSON object with exactly these seven fields on the LAST LINE of your response (no other text after it):
{"total_items":N,"done":N,"changed":N,"partial":N,"not_done":N,"unverifiable":N,"summary":"<markdown checklist for PR body>"}
Counts map one-to-one to the classifications above and sum to total_items. No plan or no actionable items means all counts are zero with the skip reason in summary. Do not classify work as deferred; only the parent can record a user-approved deferral.
````
**Parent processing:**
1. Check the task's terminal status. Without successful completion and valid LAST-line
JSON, use the audit-failure fallback below. Require exactly the seven declared
fields: nonnegative integer counts whose classification sum equals `total_items`,
and a string `summary`. Missing,
extra or invalid fields fail. Valid no-plan/no-actionable reports retain zero counts
and their summary.
2. Store counts for Step 20 and `summary` for Step 19's `## Plan Completion`.
3. Apply Gate Logic below before continuing. Carry approved deferrals, with item text
and plan path, to Step 14; keep them separate from dropped scope. The gate supplies
the required PR notes and per-item manual verification evidence.
**Audit-failure fallback:** On failure, invalid JSON or no final output after ~10
minutes, stop any live child and confirm it stopped before an inline audit with the same
extraction/classification logic; never race a late result. If that also fails,
AskUserQuestion: A) Skip audit and ship, recording the reason in the PR body and
Step 20 metrics; B) Stop and fix the audit (recommended/default). Silent fail-open
is the failure shape that VAS-449 surfaced.
---
{{PLAN_COMPLETION_GATE_SHIP}}
{{PLAN_VERIFICATION_EXEC}}
{{SCOPE_DRIFT}}
{{LEARNINGS_SEARCH:query=release ship version changelog merge pr}}
---