docs/plans/templates/autoclosure.md
Objective: TODO: State the already-started work and exact clean/ship threshold.
Goal plan: {{PLAN_PATH}}
Template: {{TEMPLATE_PATH}}
Completion threshold:
pnpm check passing, review findings closed, authorized
GitHub delivery complete, and the goal checker passing.Verification surface:
pnpm check, and PR read-back.Constraints:
Boundaries:
Output budget strategy:
Blocked condition:
Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Existing PR or local future-PR slice resolved | pending | exact PR or dedicated current task plan |
| Dedicated task invocation and plan for exact PR | pending | pending |
| Task evidence verified at PR head | pending | body path + head file + exact PR owner |
| Active source/plan reconstructed | pending | pending |
| Intended delta and exclusions recorded | pending | pending |
| Closure matrix classified | pending | pending |
| Live PR feedback target resolved | conditional | exact compliant PR for full resolve-pr-feedback mode; N/A after verified noncompliant close |
| Feedback proof checkout bound to PR head | conditional | local committed HEAD = fetched PR ref = live headRefOid for a compliant PR |
| Unfiltered feedback inventory | conditional | raw top-level comments/reviews plus all resolved/unresolved inline threads compared with helper output for a compliant PR |
| GitHub delivery expectation recorded | pending | pending |
| Active goal checked or created | pending | pending |
Closure matrix:
| Lane | Applies | Owner/proof | Status |
|---|---|---|---|
| per-PR task ownership | pending | exact PR + dedicated task plan | pending |
| noncompliant close | pending | required comment + CLOSED read-back | pending |
| source behavior | pending | pending | pending |
| package/API/build | pending | pending | pending |
| CI-controlled template output | pending | owner repair + clean output | pending |
| docs/content | pending | pending | pending |
| registry/changelog | pending | pending | pending |
| browser | pending | pending | pending |
| changeset | pending | pending | pending |
| agent workflow | pending | pending | pending |
| live PR feedback | conditional | compliant: resolve-pr-feedback + final P1 read-back; noncompliant: N/A with comment/CLOSED receipts | pending |
| cleanup/review | pending | pending | pending |
| repository check | yes | pnpm check | pending |
| GitHub delivery | pending | pending | pending |
Work Checklist:
task invocation and dedicated task plan; a batch
plan or aggregate autoclosure is not used as a substitute.task plan and defers
feedback/merge until delivery creates the exact PR, records it in the
plan at head, and passes the task compliance gate.CLOSED state were read
back and no source review, repair, merge, or release work continued.resolve-pr-feedback ran for the exact compliant PR; every
actionable P1-or-higher finding was fixed, proved, replied to, and
resolved or received the required top-level reply receipt.HEAD, fetched PR ref, and live
headRefOid matched before proof/reply/resolution and after every push.
For a noncompliant PR, this and all feedback gates are N/A with the
required remediation-comment and CLOSED receipts.headRefOid fetch
matches the OID recorded in that receipt, and a post-comment helper/raw
feedback fetch still shows zero actionable P1-or-higher items and no new
URL lacking a verdict or explicit deferral, except the verified receipt.Error attempts:
| Failure signature | Count | Next different move | Resolution |
|---|---|---|---|
| None yet | 0 |
Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Per-PR task ownership | pending | Record exact PR and dedicated task-plan path | pending |
| Noncompliant PR disposition | pending | Verify task evidence or comment then close and read back | pending |
| Targeted behavior proof | pending | Run smallest missing owning proof | pending |
| Source/generated audit | pending | Prove correct source and regenerated mirrors | pending |
| Package/docs/registry/browser closure | pending | Run every applicable local contract | pending |
| Feedback proof checkout | conditional | Compliant PR only: require local committed HEAD = fetched PR ref = live headRefOid before proof/reply/resolution and at terminal verification | pending |
| Live PR feedback resolution | conditional | Compliant PR only: run full resolve-pr-feedback and close every actionable P1-or-higher finding; otherwise N/A with noncompliant stop receipts | pending |
| Feedback priority classification | conditional | Compliant PR only: persist P0-P3 plus rationale for every actionable item; classify ambiguous P1-versus-lower as P1 | pending |
| Final P1 proof replay | conditional | Compliant PR only: after the final material branch push, rerun every P1-or-higher proof, including resolved/outdated items | pending |
| Final live feedback read-back | conditional | Compliant PR only: re-fetch helper plus unfiltered top-level/all-thread inventories; require zero actionable P1-or-higher and explicit P2-or-lower deferrals | pending |
| External terminal receipt | conditional | Compliant PR only: post/read exact-head receipt; require receipt/live/fetched/local OID equality and no unrecorded helper/raw URL except that verified receipt | pending |
| Cleanup | pending | Run bounded cleanup or N/A | pending |
| Agent-native reviewer | pending | Run for workflow changes or N/A | pending |
| Final lint | yes | Run pnpm lint:fix | pending |
| Repository check | yes | Run pnpm check | pending |
| GitHub delivery | pending | Commit/push/open or update PR and read back | pending |
| Autoreview | yes | Resolve every accepted actionable finding | pending |
| Goal plan complete | yes | Run node .agents/skills/autogoal/scripts/check-complete.mjs {{PLAN_PATH}} | pending |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Inventory | in_progress | plan created | missing proof |
| Repair | pending | review | |
| Review/checks | pending | delivery | |
| Delivery | pending | final audit | |
| Closeout | pending | final |
Verification evidence:
Timeline:
Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Inventory |
| Where am I going? | Repair, review/checks, delivery, final audit |
| What is the goal? | TODO |
| What have I learned? | See closure matrix |
| What have I done? | See timeline |
Open risks: