Files
gstack/ship/sections/plan-completion.md.tmpl
T
Garry Tanandcapy-ai[bot] 5b9b8372c4 feat: honest work and gate integrity — gate-edit detector, review/ship gate pass, zero-run green, claims-need-evidence kernel (#3114)
* docs(designs): honest work and gate integrity plan (autoplan-reviewed)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(e2e): review-gate-integrity rule case registered in touchfiles and the PR profile

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(honesty): claims-need-evidence kernel, no_claim card field, CEO value test, implementer dispatch rules, ACCEPTANCE_EDITED, Honest Work ethos

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(gate-diff): gate-edit detector lib + CLI, patch fixtures, calibration script, tests_ran in gstack-evidence

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(gate-diff): RH-15? only on CI/config floors after calibration

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* feat(review,ship): Gate Integrity category, GATE_SCAN_BLOCK, one-way gate disposition, actor stamping, ZERO-RUN lanes, draft-while-open

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: re-measure parity and context budgets on the integrated tree

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(touchfiles): gate-diff fixtures and helpers select review-gate-integrity

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: archaeology lint wording, paid-file census, harness-version non-behavioral record

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: pin review Step 3.5 rename, plan-path placeholder, mktemp template, per-stream evidence tail

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: ACCEPTANCE_EDITED fence substitutes the <plan-path> placeholder

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(gate-diff): shallow boundary commits report no_base instead of a whole-tree inventory; recalibrate

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-10 22:33:01 +00:00

68 lines
3.4 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.
````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. 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}}
---