docs/plans/2026-06-16-release-lanes-autogoal-workflow.md
Objective: Repair beta/latest release lanes; done when main is merged, agent-owned release-lanes workflow is implemented, generated skills synced, and focused release tests pass.
Goal plan: docs/plans/2026-06-16-release-lanes-autogoal-workflow.md
Template: docs/plans/templates/task.md
Primary template: docs/plans/templates/task.md
Applied packs:
Task source:
codex/upstream-beta-release-workflowsorigin/main into the branchmain/nextmain -> next sync PR automationCompletion threshold:
origin/main is merged into the branch.main -> next sync PR creation.release-lanes derived skill and docs/plans/templates/release-lanes.md
define the fully automated direct-sync lane.promote-beta entrypoints are replaced or routed to the release-lanes
workflow..agents/skills/** output is synced from .agents/rules/**.pnpm install, and lint pass.node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-16-release-lanes-autogoal-workflow.md passes.Verification surface:
git merge origin/mainpnpm installnode --test tooling/scripts/release-workflow.test.mjs tooling/scripts/auto-release-pr.test.mjs tooling/scripts/prepare-release-changesets.test.mjspnpm lint:fixsync-main-to-next, promote-beta, release-lanes, and generated skill mirrorsnode .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-16-release-lanes-autogoal-workflow.mdConstraints:
Boundaries:
.agents/rules/**, generated .agents/skills/**, .claude/skills/**, .github/workflows/**, tooling/scripts/**, package.json, docs/plans/templates/**, focused tests.main or next remotely during implementation.Output budget strategy:
git show, git diff, rg, and focused sed ranges. Avoid
dumping full generated docs, package changelogs, or workflow logs.Blocked condition:
origin/main produces real source conflicts outside
known release/workflow files, focused tests expose a release safety hole that
needs a product decision, or GitHub/npm credentials are required for a live
release action.Task state:
Current verdict:
Pre-solution issue challenge:
main -> next sync will create too many conflict-review loops.release-lanes skill/template plus focused scripts/tests; CI keeps publish guards onlyCompletion 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-06-16-release-lanes-autogoal-workflow.md passes.Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Used autogoal; re-read .agents/skills/autogoal/SKILL.md before closeout. |
| Active goal checked or created | yes | get_goal showed active goal for this plan and objective. |
| Source of truth read before edits | yes | User request, PR #5030, release workflows, release scripts, and generated agent skill/rule boundary read. |
| Tracker comments and attachments read | yes | PR #5030 inspected with gh pr view 5030; no visual attachments needed for release tooling. |
| Video transcript evidence required | N/A: no video source | Release workflow/tooling task has no video or screen recording input. |
| Pre-solution issue challenge required | yes | Recorded as design correction: PR-only sync is validly rejected for deterministic release metadata conflicts. |
| Reproduction verdict before implementation | N/A: architecture correction | No runtime bug claim; source-level workflow audit was the honest proof surface. |
| Repro escalation ladder selected | yes | Tests/source audit only; Playwright, Browser, and screenshot are N/A because no browser surface changed. |
| Suggested fix reviewed against durable boundary | yes | Accepted direct agent-owned release-lanes workflow; rejected routine CI-created sync PR. |
docs/solutions checked for non-trivial existing-code work | N/A: release lane workflow | Existing release scripts/workflows were the owning source of truth. |
| TDD decision before behavior change or bug fix | yes | Release workflow tests were updated around direct sync, beta pre mode, versioning, and verifier behavior. |
| Branch decision for code-changing task | yes | Continued on codex/upstream-beta-release-workflows, PR #5030 branch. |
| Release artifact decision | yes | No changeset: CI/workflow/agent tooling only, no package runtime/API release. |
| Browser tool decision for browser surface | N/A: no browser surface | No route, UI, console, network, or visual behavior changed. |
| PR expectation decision | yes | PR #5030 is open; PR body sync required after passing pnpm check. |
| Tracker sync expectation decision | yes | PR body sync only; no separate issue/Linear tracker. |
| Output budget strategy recorded | yes | Plan records targeted git, rg, and focused file reads; broad output avoided except required pnpm check. |
| Agent-native pack selected | yes | agent-native pack applied because .agents/**, .claude/**, AGENTS, and skill text changed. |
| Agent-facing action surface identified | yes | release-lanes skill/rule owns promote, direct sync, beta pre-mode, and release verification. |
| Source rule versus generated mirror boundary identified | yes | .agents/rules/*.mdc and docs/plans/templates/*.md are source; .agents/skills/** generated by pnpm install. |
agent-native-reviewer loaded or waiver recorded | yes | Agent-native review performed in the review loop; accepted findings fixed. |
Work Checklist:
<video-transcripts> XML, or marked N/A with reason.valid, not reproduced, invalid,
wont-fix, partially valid, or platform limitation. Feature, docs,
support, or cleanup requests with no bug claim may mark reproduction
N/A with reason.[@Browser](plugin://browser@openai-bundled) next when tests or
Playwright cannot reproduce or cannot model the surface honestly;
screenshot or explicit visual-proof waiver when visual/native state
matters..agents/**, .claude/**,
.codex/**, skills, hooks, commands, prompts, or user-action tooling..agents/rules/** changed, or N/A reason is recorded.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Run the command, proof, source audit, or artifact check named in this plan | pnpm check; focused release tests; direct-sync dry run; source audit; pnpm install; pnpm lint:fix. |
| Pre-solution issue challenge verdict | yes | Record reporter claim, suggested fix, repro verdict, validity verdict, durable boundary, and hard-stop/pivot decision before implementation | Verdict valid: PR-only sync is wrong for frequent release metadata conflicts; durable boundary is release-lanes. |
| Repro escalation ladder | N/A: architecture correction | For bug/behavior claims, record test/source-level, Playwright, Browser, and screenshot/visual-proof outcomes or N/A/blocker reasons before not reproduced | No bug repro; source audit and release tests are owning proof. |
| Bug reproduced before fix | N/A: no runtime bug | Record failing test/repro or N/A with reason | Workflow ownership correction, not a user-visible runtime bug. |
| Targeted behavior verification | yes | Run focused test/proof for changed behavior or record N/A | node --test tooling/scripts/release-workflow.test.mjs tooling/scripts/auto-release-pr.test.mjs tooling/scripts/prepare-release-changesets.test.mjs passed 38 tests. |
| TypeScript or typed config changed | yes | Run relevant typecheck | pnpm check ran package build/typecheck: 54 successful build tasks and 54 successful typecheck tasks. |
| Package exports or file layout changed | no | Run pnpm brl before final verification and keep generated barrel updates | No package exports or barrel-owned layout changed. |
| Package manifests, lockfile, or install graph changed | yes | Run pnpm install and relevant package checks | pnpm install passed; lockfile already up to date; Skiller and MDX postinstall completed. pnpm check passed. |
| Agent rules or skills changed | yes | Run pnpm install and verify generated skill sync | pnpm install regenerated/synced skills; git status --short clean after install. |
| 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 commands ran in /Users/zbeyens/git/plate. |
| Browser surface changed | N/A: no browser surface | Capture Browser Use proof or record explicit waiver/blocker | Release workflows/scripts/skills only. |
| Browser final proof | N/A: no browser surface | Attach screenshot or exact browser verification caveat when browser proof applies | No route or UI changed. |
| CI-controlled template output changed | no | Restore generated template output or record why it is intentionally kept | No templates/** output changed in this task. |
| Package behavior or public API changed | no | Add a changeset or record why no changeset applies | No package runtime/API release; no changeset needed. |
| User-visible registry output changed | N/A: no registry output | Use the registry-changelog pack: add/update apps/www/src/registry/changelog/entries/*.mdx, run node tooling/scripts/generate-ui-changelog-entries.mjs --write, run node tooling/scripts/generate-ui-changelog-entries.mjs --check, or record N/A | No registry docs/output changed. |
| Docs or content changed | yes | For docs-heavy work, use --template docs; for incidental docs, verify source-backed claims, links, examples, and rendered output or record N/A | Agent/release workflow docs only; source-backed by release scripts/workflows and generated skills. |
| 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 | Failure mode: direct sync could publish wrong beta metadata or sweep dirty files; tests cover beta pre mode, versioning before commit, verifier safety, and clean-worktree guard. |
| 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 | Review loop accepted/fixed direct-sync release safety and agent action discoverability findings. |
| Local install corruption suspected | N/A: no install corruption | Run pnpm run reinstall once, rerun the exact failing command, or record N/A | No local-env-rot failure shape remained after normal checks. |
| 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 | Final autoreview passed clean with focused release tests. |
| PR create or update | yes | Run check before PR work and sync PR body to the task-style final handoff | pnpm check passed before PR body update. |
| Task-style PR body verified | yes | 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 | gh pr view 5030 --json body shows ๐ Fixes โ N/A, ๐ข 95-100% confidence, the required phase table, bold emoji sections, no current-PR self-link, and no auto-release block needed. |
| PR proof image hosting | N/A: no browser proof | If PR body needs browser proof, replace local image paths with hosted GitHub URLs or record N/A | No screenshots required. |
| Tracker sync-back | N/A: PR only | Post concise issue/Linear sync after PR exists, or record N/A/blocker | No separate issue/Linear tracker. |
| Final handoff contract | yes | Fill the final handoff fields below with exact PR/issue/confidence/tests/browser/outcome/caveats/design/verification content or N/A reason | Filled below. |
| Final lint | yes | Run pnpm lint:fix or scoped equivalent | pnpm lint:fix passed; no fixes applied. |
| Output budget discipline | yes | Verify no unbounded high-volume command output was streamed, or record the accidental output and recovery | Broad reads were scoped; required pnpm check output was capped and polled. |
| Goal plan complete | yes | Run node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-16-release-lanes-autogoal-workflow.md | Passed. |
| Agent source / generated sync | yes | Run pnpm install when .agents/rules/** changed and verify generated mirrors | pnpm install passed; generated .agents/skills/release-lanes/SKILL.md and promote-beta mirror source rules. |
| Agent action discoverability | yes | Source-audit the skill/rule path an agent will read | rg shows release-lanes in .agents/AGENTS.md, AGENTS.md, .agents/rules/release-lanes.mdc, generated skills, workflows, and tests. |
| Agent-native review | yes | Load .agents/skills/agent-native-reviewer/SKILL.md and close accepted findings, or record N/A | Accepted findings fixed; final review clean. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | PR #5030 and release workflow/script/agent-skill boundaries read. | done |
| Implementation | complete | release-lanes source rule/template added, promote-beta shimmed, CI sync PR job removed, direct sync script hardened. | done |
| Verification | complete | pnpm install, focused tests, dry run, lint, pnpm check, and source audit passed. | done |
| PR / tracker sync | complete | PR body update/verification recorded below; no separate tracker. | final response |
| Closeout | complete | Goal plan check passed; final response remains. | final response |
Findings:
main -> next sync is the wrong ownership boundary because the
high-friction part is deterministic release metadata repair, not PR review.pnpm ci:version, and verify
release metadata before push.next; the real --push path now refuses dirty checkouts..agents/rules/**; pnpm install is the sync step.Decisions and tradeoffs:
release-lanes as the durable owner for latest/beta maintenance; keep
promote-beta only as a compatibility shim.sync-main-to-next --push; dry run plus unit tests prove the
behavior without mutating next.Implementation notes:
.agents/rules/release-lanes.mdc and docs/plans/templates/release-lanes.md
define the agent-owned release lane..agents/rules/promote-beta.mdc routes old prompts into release-lanes..github/workflows/release.yml no longer opens routine main-to-next sync PRs..github/workflows/promote.yml tells maintainers to run release-lanes after
latest publish.tooling/scripts/release-branch-prs.mjs direct sync owns beta pre-state,
generated changesets, versioning, dirty-worktree guard, and verifier safety.tooling/scripts/release-workflow.test.mjs covers the release-lane contract.Review fixes:
[skip release] on versioned sync commits would block
beta publishing. Fixed with dynamic commit message: skip only when no beta
changesets are generated..changeset/pre.json in the sync
commit.pnpm ci:version before
committing direct sync metadata.next.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
| Release-skip logic was too broad | 1 | Make commit message depend on whether beta changesets were generated | Fixed and covered by tests. |
| Beta pre-mode assumption was too weak | 1 | Restore pre-state in script instead of relying on repo state | Fixed and covered by tests. |
| Generated changesets were not enough to publish beta | 1 | Version before commit in direct sync | Fixed and covered by tests. |
Verification evidence:
git log --oneline --decorate -5 shows merge commit 8c2998f2a9 from
origin/main and head 5faed37f9d on codex/upstream-beta-release-workflows.pnpm install passed in /Users/zbeyens/git/plate; lockfile up to date,
Skiller apply completed, MDX postinstall completed.pnpm lint:fix passed in /Users/zbeyens/git/plate; no fixes applied.node --test tooling/scripts/release-workflow.test.mjs tooling/scripts/auto-release-pr.test.mjs tooling/scripts/prepare-release-changesets.test.mjs
passed 38 tests in /Users/zbeyens/git/plate.node tooling/scripts/release-branch-prs.mjs sync-main-to-next --dry-run
passed in /Users/zbeyens/git/plate; dry run would restore beta pre mode,
run pnpm ci:version, commit chore: sync main to next, and avoid pushing.pnpm check passed in /Users/zbeyens/git/plate; lint emitted one
pre-existing sidebar hook warning, build/typecheck succeeded for 54 tasks,
fast/slow/slowest test suites passed.rg -n "sync-main-to-next|mainToNextSyncBranch|main-to-next-sync|release-lanes|promote-beta" .agents AGENTS.md .github tooling/scripts docs/plans/templates/release-lanes.md
shows release-lanes discoverability, promote-beta compatibility, no old
sync PR branch builder, and only negative test references for the removed CI job.git status --short was clean after pnpm install and verification.node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-16-release-lanes-autogoal-workflow.md
passed.Final handoff contract:
codex/upstream-beta-release-workflows.pnpm install, pnpm lint:fix,
pnpm check, source audit; browser N/A.release-lanes; CI no
longer opens routine main-to-next sync PRs.sync-main-to-next --push refuses dirty checkouts before
mutating next.release-lanes skill/template plus tested release scripts.pnpm check; focused release tests; direct sync dry run; source audit; autoreview clean.gh pr view 5030 --json body confirmed task-style body, no self-link, and no auto-release block needed.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
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:
pnpm check.Timeline:
origin/main into codex/upstream-beta-release-workflows.release-lanes source rule/template and generated skill mirrors.main -> next sync PR automation.pnpm install, focused release tests, dry run, pnpm lint:fix,
pnpm check, and source audit passed.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout. |
| Where am I going? | Commit/push plan update, mark goal complete, final response. |
| What is the goal? | Repair beta/latest release lanes with agent-owned release-lanes, merged main, synced generated skills, and passing release tests. |
| What have I learned? | Direct sync must own beta metadata repair and safety checks; CI should not create routine sync PR churn. |
| What have I done? | Implemented release-lanes workflow, removed sync PR automation, verified scripts/tests/checks, and recorded evidence. |
Open risks:
sync-main-to-next --push
is not run by this PR and must be run by the release-lanes workflow when a
real sync is needed.