docs/plans/2026-08-20-sync-autoclosure-task-contract.md
Objective: Sync autoclosure and per-PR task enforcement into Plate; done when source owners, generated mirrors, checks, and a compliant PR are verified.
Goal plan: docs/plans/2026-08-20-sync-autoclosure-task-contract.md
Template: docs/plans/templates/task.md
Primary template: docs/plans/templates/task.md
Applied packs:
Flow mode:
Linked plans:
Task source:
../better-convex -> ../plateautoclosure rule and plan
template; every PR requires one exact task invocation and plan; invalid PRs
are commented and closed with the GPT-5.6 high-effort recommendation; source
owners regenerate all mirrors; Plate checks pass; and the delivery PR itself
carries valid exact task evidence.Timed checkpoint:
Completion threshold:
pnpm install regenerates root, Codex, and Claude mirrors; source/mirror
audits find the exact contract and no stale missing-plan PR-body shape.agent-native-reviewer, autoreview, pnpm lint:fix, and pnpm check pass
with no accepted/actionable finding remaining.node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-08-20-sync-autoclosure-task-contract.md passes.Verification surface:
pnpm install, source/mirror rg audits, both agent reviews,
pnpm lint:fix, pnpm check, and the goal-plan checker from ../plate.gh.Constraints:
Boundaries:
.agents/AGENTS.md, .agents/rules/task.mdc, templates, and VISION forks.skills-lock.json edits.Output budget strategy:
Blocked condition:
Task state:
Current verdict:
Pre-solution issue challenge:
.agents source rules, project templates,
and .agents/AGENTS.md, regenerated by pnpm install.SKILL.md files would be wrong and
would be overwritten; source-level adaptation is mandatory.Completion rule:
update_goal(status: complete) while any required checklist item
remains unchecked. If an item does not apply, check it and add N/A: <reason>.update_goal(status: complete) until every completion threshold
above is satisfied, final handoff evidence is recorded, and
node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-08-20-sync-autoclosure-task-contract.md passes.Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Timed checkpoint parsed | no | N/A: no duration requested. |
| Skill analysis before edits | yes | sync-skills, autogoal, and task loaded; agent reviews selected for closeout. |
| Active goal checked or created | yes | Active goal names this exact plan and completion threshold. |
| Source of truth read before edits | yes | Both AGENTS sources, skiller configs, VISION files, autoclosure source/template, and Plate task source/template read. |
| Tracker comments and attachments read | no | N/A: no tracker source. |
| Video transcript evidence required | no | N/A: no video evidence. |
| Pre-solution issue challenge required | no | N/A: direct workflow request, not public issue claim. |
| Reproduction verdict before implementation | yes | Source inventory proves missing autoclosure and missing per-PR task gates. |
| Repro escalation ladder selected | no | N/A: static agent contract, no runtime/browser behavior. |
| Suggested fix reviewed against durable boundary | yes | Patch source rules/templates and regenerate; never edit generated mirrors. |
docs/solutions checked for non-trivial existing-code work | no | N/A: explicit cross-repo contract sources own the change. |
| TDD decision before behavior change or bug fix | no | N/A: declarative agent workflow sync; source/mirror audits are the honest proof. |
| Branch decision for code-changing task | yes | codex/sync-autoclosure-task-contract created from Plate main. |
| Release artifact decision | no | N/A: no package or registry behavior; no changeset/changelog. |
| Browser tool decision for browser surface | no | N/A: no browser surface. |
| PR expectation decision | yes | task requires a dedicated verified PR for this non-trivial agent change. |
| Tracker sync expectation decision | no | N/A: no tracker. |
| Output budget strategy recorded | yes | Named bounded owner reads and capped generated/check output. |
| Agent-native pack selected | yes | Materialized in this plan. |
| Agent-facing action surface identified | yes | PR task evidence, invalid-PR comment/close, feedback/P1 gate, receipt, and delivery actions. |
| Source rule versus generated mirror boundary identified | yes | .agents/AGENTS.md and .agents/rules/*.mdc are source; root/skills are generated. |
agent-native-reviewer loaded or waiver recorded | yes | Required after implementation; skill source already identified and will be loaded fully before use. |
Work Checklist:
pnpm run reinstall once only if failures show
the documented React/install corruption signature; otherwise N/A.../plate;
GitHub read-back uses the Plate repository.agent-native-reviewer, then autoreview --mode local..agents/rules/** changed.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Run the command, proof, source audit, or artifact check named in this plan | Contract audit and pnpm check passed in Plate. |
| Pre-solution issue challenge verdict | no | N/A: direct workflow request, not tracker bug. | N/A |
| Repro escalation ladder | no | N/A: no runtime/browser claim. | N/A |
| Bug reproduced before fix | no | N/A: no bug. | N/A |
| Targeted behavior verification | yes | Run focused test/proof for changed behavior or record N/A | Source/mirror assertions and clean structured review passed. |
| TypeScript or typed config changed | no | N/A: Markdown/TOML-owned agent contract only. | N/A |
| Package exports or file layout changed | no | N/A: no package exports. | N/A |
| Package manifests, lockfile, or install graph changed | no | N/A: pnpm install is generated sync only; no manifest/lock owner change intended. | N/A |
| Agent rules or skills changed | yes | Run pnpm install and verify generated skill sync | Passed in /Users/zbeyens/git/plate; root/Codex/Claude mirrors regenerated. |
| Workspace authority proof | yes | Run verification in the owning repo/package/app/route/tool and record cwd; do not count the wrong workspace as proof | All install/audit/lint/check/review commands ran in /Users/zbeyens/git/plate. |
| Browser surface changed | no | N/A: no browser surface. | N/A |
| Browser final proof | no | N/A: no rendered output. | N/A |
| CI-controlled template output changed | no | N/A: docs/plans/templates/** are project-owned workflow templates, not Plate registry templates. | N/A |
| Package behavior or public API changed | no | N/A: no package/API change or changeset. | N/A |
| User-visible registry output changed | no | N/A: no registry output. | N/A |
| Docs or content changed | no | N/A: operational goal plans/rules only; no public docs/content. | N/A |
| High-risk mini gate | yes | For public API/runtime/package-boundary/browser/agent-action/command-contract changes, record realistic failure mode, proof plan, and why the chosen boundary is right; otherwise N/A | Exact-head evidence and P1 receipt gates prevent compliant-close and unresolved-P1 failure modes; source-owned boundary survives generation. |
| Agent-native review for agent/tooling changes | yes | For .agents/**, .claude/**, .codex/**, skills, hooks, commands, prompts, or user-action tooling, load .agents/skills/agent-native-reviewer/SKILL.md and close accepted/actionable findings, or record N/A | Incremental review PASS; discoverability/shared-workspace parity intact. |
| Local install corruption suspected | no | N/A unless a documented corruption signature appears. | N/A |
| Autoreview for non-trivial implementation changes | yes | Load .agents/skills/autoreview/SKILL.md; use dirty local --mode local, branch/PR --mode branch --base <base>, or committed slice --mode commit --commit <ref> until no accepted/actionable findings, or record N/A for docs-only/trivial/no local patch | Local review found one P1 bootstrap defect; fixed/regenerated; rerun exited clean with no findings. |
| PR create or update | pending | Run check before PR work and sync PR body to the task-style final handoff | pending |
| Task-style PR body verified | pending | Verify the PR body with gh pr view --json body; it must preserve auto-release blocks when applicable, must not include a current-PR self-link, and must use the kitcn PR #270 emoji format: ๐ Fixes ..., ๐ข 95-100% confidence, Phase / ๐งช Tests / ๐ Browser table, and bold emoji Outcome/Caveat/Design/Verified sections | pending |
| PR proof image hosting | no | N/A: no browser proof image. | N/A |
| Tracker sync-back | no | N/A: no tracker. | N/A |
| Final handoff contract | pending | Fill the final handoff fields below with exact PR/issue/confidence/tests/browser/outcome/caveats/design/verification content or N/A reason | pending |
| Final lint | yes | Run pnpm lint:fix or scoped equivalent | Passed; 3,286 files checked, no fixes. |
| Output budget discipline | yes | Verify no unbounded high-volume command output was streamed, or record the accidental output and recovery | Bounded owner reads/audits; full required check output was capped and polled. |
| Timed checkpoint | no | N/A: no duration requested. | N/A |
| Goal plan complete | yes | Run node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-08-20-sync-autoclosure-task-contract.md | pending |
| Agent source / generated sync | yes | Run pnpm install when .agents/rules/** changed and verify generated mirrors | Passed; generated source metadata and Claude symlink verified. |
| Agent action discoverability | yes | Source-audit the skill/rule path an agent will read | Root AGENTS plus generated task and autoclosure skills expose the actions. |
| Agent-native review | yes | Load .agents/skills/agent-native-reviewer/SKILL.md and close accepted findings, or record N/A | PASS; no accepted finding. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | completed | source/destination owners and forks inventoried | implementation |
| Implementation | completed | source rules/templates patched; managed mirrors regenerated | verification |
| Verification | completed | source/mirror audits, reviews, lint, and full check passed | PR sync |
| PR / tracker sync | in_progress | dedicated branch staged | final response |
| Closeout | pending | final response |
Findings:
.agents sources by pnpm install.Decisions and tradeoffs:
bun commands and kitcn lanes to Plate pnpm, registry, docs, browser,
template-output, and package ownership.resolve-pr-feedback as the live-feedback owner; do not resurrect the
excluded legacy pr-comment-resolver.skills-lock.json; autoclosure is a
repo-local rule and all required hard-gate dependencies already exist.Implementation notes:
codex/sync-autoclosure-task-contract.pnpm install regenerated root AGENTS plus Codex/Claude task and autoclosure
mirrors; package lock and external skill lock stayed unchanged.Review fixes:
task/autoclosure skills; agent and user share
the same PR, git ref, plan, and GitHub feedback surfaces; no UI action or
isolated agent workspace exists. No actionable parity finding.patch is correct at 0.82 confidence.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
| Autoreview refused an untracked generated Claude skill symlink as sensitive | 1 | Stage the authorized whole-checkout task patch, then rerun the same local review | Resolved by staging the authorized full patch. |
| Autoreview found no-PR autoclosure bootstrap dead-end | 1 | Add explicit local slice -> PR delivery -> compliance ordering | Fixed in source rule/template; pending generated sync and review rerun. |
Verification evidence:
.agents/rules/autoclosure.mdc plus
docs/plans/templates/autoclosure.md; Plate lacked both before this patch.pnpm install in /Users/zbeyens/git/plate completed and generated
.agents/skills/autoclosure/SKILL.md, .claude/skills/autoclosure/SKILL.md,
task mirrors, and root AGENTS.md from Plate source owners.$task, GPT-5.6 high-or-higher, exact task-plan
evidence, P1 replay, terminal receipt, and pnpm check; no donor kitcn/bun,
fixture/scenario, package-skill, auto, or deslop contract remains.git diff --cached --check and contract assertions passed.pnpm lint:fix passed with no fixes.pnpm check passed: lint, 54 package builds, 54 package typechecks, and all
fast, slow, and slowest test lanes completed with zero failures. One existing
sidebar hook warning remained non-blocking.Final handoff contract:
.agents sources plus project-owned goal templates.SKILL.md edits are overwritten.Task-style PR body contract:
<!-- auto-release:start --> block. If a changeset is
part of the diff and repo policy expects auto release, include that block.๐ Fixes #123 or ๐ Fixes โ N/A, then
exactly one
๐งญ Task plan: docs/plans/2026-08-20-sync-autoclosure-task-contract.md
line, then an emoji confidence line like ๐ข 95-100% confidence.| Phase | ๐งช Tests | ๐ Browser |.Reproduced and Verified rows. Mark passing proof with ๐ข, repro or
failing proof with ๐ด, and non-applicable cells with โ N/A.**โ
Outcome**, **โ ๏ธ Caveat**,
**๐๏ธ Design**, and **๐งช Verified**.Summary / Verification PR body, an
adaptive prose body from a git helper skill, plain ## Outcome sections, or
an unrelated generated badge footer unless the caller or repo template
explicitly asks for it.gh pr view --json body output or a concise source-backed summary
of that output.Final handoff / sync:
Timeline:
pnpm install regenerated mirrors;
source/mirror and agent-native parity audits passed.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | PR / tracker sync |
| Where am I going? | Dedicated PR creation, exact task evidence, closeout |
| What is the goal? | Port autoclosure and exact per-PR task enforcement into Plate. |
| What have I learned? | See Findings |
| What have I done? | Implemented, regenerated, reviewed, linted, and passed the full repository gate. |
Open risks: