mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-02 23:14:33 +01:00
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
66 lines
3.2 KiB
Cheetah
66 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.
|
|
|
|
**Before dispatch, the parent binds the plan:**
|
|
|
|
{{PLAN_COMPLETION_GATE_SHIP:discovery}}
|
|
|
|
**Subagent prompt:** Substitute `<base>` and supply the bound plan's absolute path
|
|
or complete text, including user-approved scope changes. When discovery printed the
|
|
not-run line, skip dispatch. The child does not inherit the parent's conversation.
|
|
**By packet:** `~/.claude/skills/gstack/bin/gstack-review-packet build --audit plan-completion
|
|
--base <base> --plan-file <bound plan> --out-dir .gstack/tmp/review-packets-audit` writes the
|
|
audit prompt, the whole plan and the diff into one packet; brief the child only with Step 7's
|
|
packet brief and read the LAST line of its `out=` file.
|
|
|
|
The audit's prompt is `ship/sections/audit-plan-completion.md`; build inlines it into the packet, so
|
|
never read it yourself. Its `out=` file ends with one JSON line of exactly these seven fields:
|
|
{"total_items":N,"done":N,"changed":N,"partial":N,"not_done":N,"unverifiable":N,"summary":"<markdown checklist for PR body>"}
|
|
|
|
**Parent processing:**
|
|
|
|
1. Check the task's terminal status. Without successful completion and valid LAST-line
|
|
JSON, use the audit-failure fallback below (that JSON is its `out=` file's last line). 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. Run the parent-computed Acceptance edits check below on the bound plan; it adds
|
|
`ACCEPTANCE_EDITED` beside the child's classes and never changes the child's
|
|
seven fields.
|
|
4. 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.
|
|
|
|
{{PLAN_COMPLETION_GATE_SHIP:acceptance}}
|
|
|
|
**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). Never fail open
|
|
silently: a skipped audit would let unverified plan items ship as done.
|
|
|
|
---
|
|
|
|
{{PLAN_COMPLETION_GATE_SHIP}}
|
|
|
|
{{PLAN_VERIFICATION_EXEC}}
|
|
|
|
{{SCOPE_DRIFT}}
|
|
|
|
{{LEARNINGS_SEARCH:query=release ship version changelog merge pr}}
|
|
|
|
---
|