docs/plans/2026-05-28-add-sync-shadcn-review-command.md
Objective:
Add a review command contract to the source sync-shadcn skill so
sync-shadcn review re-audits the current tracked shadcn range against
../shadcn/apps/v4 and the current Plate docs checkout before an old sync plan
is trusted for implementation.
Goal plan: docs/plans/2026-05-28-add-sync-shadcn-review-command.md
Template: docs/plans/templates/task.md
Primary template: docs/plans/templates/task.md
Applied packs:
Task source:
review command to sync-shadcnreview;
generated skill mirrors are synced by pnpm install; focused audits prove the
generated skill contains the command and still points to source rule.Completion threshold:
.agents/rules/sync-shadcn.mdc documents command
dispatch, review inputs, allowed and forbidden mutations, staleness
verdicts, report requirements, and output shape..agents/skills/sync-shadcn/SKILL.md is regenerated by
pnpm install, not manually edited.sync-shadcn review, ## Commands, ### review, staleness verdicts, and the
metadata.skiller.source pointer.node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-add-sync-shadcn-review-command.md
passes.Verification surface:
.agents/rules/sync-shadcn.mdc,
.agents/skills/sync-shadcn/SKILL.md, and .claude/skills/sync-shadcn/SKILL.mdpnpm install for Skiller-generated mirrorspnpm lint:fixgit diff --check scoped to touched agent/plan filesConstraints:
.agents/rules/sync-shadcn.mdc as source of truth; do not manually edit
generated skill mirrors.build:registry.apps/www; this is a skill/command-contract change only.Boundaries:
.agents/rules/sync-shadcn.mdc.agents/rules/sync-shadcn.mdc, generated
.agents/skills/sync-shadcn/SKILL.md, generated Claude mirror if Skiller
updates it, and this goal plan.Output budget strategy:
sed and focused rg; do not stream unrelated
generated artifacts.rg shell attempt below and use single-quoted
patterns for verification.Blocked condition:
pnpm install cannot repair, or the command contract cannot be made
discoverable from the generated SKILL.md.Task state:
update_goalCurrent verdict:
sync-shadcn review and its
read-only staleness audit contract.Completion rule:
update_goal(status: complete) while any checklist item remains
unchecked.update_goal(status: complete) until verification evidence is
recorded and
node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-add-sync-shadcn-review-command.md
passes.Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Loaded sync-shadcn and autogoal; source rule read before command design. |
| Active goal checked or created | yes | get_goal returned no active goal; create_goal created this command-contract objective. |
| Source of truth read before edits | yes | .agents/rules/sync-shadcn.mdc read; generated SKILL.md treated as mirror only. |
| Tracker comments and attachments read | N/A | Chat request only. |
| Video transcript evidence required | N/A | No video or screenshot source. |
docs/solutions checked for non-trivial existing-code work | N/A | Agent command-contract edit; durable shadcn context already covered by current skill policy and memory. |
| TDD decision before behavior change or bug fix | N/A | Documentation/skill command contract, no executable app behavior. |
| Branch decision for code-changing task | N/A | User did not ask for branch/PR work. |
| Release artifact decision | N/A | No package or release artifact. |
| Browser tool decision for browser surface | N/A | No browser surface changed. |
| PR expectation decision | N/A | User did not ask for PR. |
| Tracker sync expectation decision | N/A | No tracker target. |
| Output budget strategy recorded | yes | Scoped reads/audits only; no broad generated output streamed. |
| Agent-native pack selected | yes | .agents/** skill/rule surface changed. |
| Agent-facing action surface identified | yes | sync-shadcn review command dispatch and output contract. |
| Source rule versus generated mirror boundary identified | yes | Source rule edited; Skiller regenerated Codex/Claude skill mirrors via pnpm install. |
agent-native-reviewer loaded or waiver recorded | yes | Loaded reviewer; command contract has no UI parity gap because it is itself the agent action surface. |
Work Checklist:
/Users/zbeyens/git/plate..agents/** skill changes..agents/rules/** changed.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Prove command dispatch and review contract in source and generated skill | Focused rg found ## Commands, ### review, sync-shadcn review, staleness verdicts, output shape, and source metadata in source/Codex/Claude skill files. |
| Bug reproduced before fix | N/A | Record reason | This is a requested skill extension, not a bug fix. |
| Targeted behavior verification | yes | Audit generated skill text | sed -n '55,205p' .agents/skills/sync-shadcn/SKILL.md shows the new command section. |
| TypeScript or typed config changed | N/A | Record reason | Markdown rule/skill text only. |
| Package exports or file layout changed | N/A | Record reason | No package file layout or barrels changed. |
| Package manifests, lockfile, or install graph changed | N/A | Record reason | pnpm install reported lockfile up to date; no package manifest edit for this task. |
| Agent rules or skills changed | yes | Run pnpm install and verify generated skill sync | pnpm install passed and Skiller applied rules for Codex and Claude. |
| Workspace authority proof | yes | Run verification in owning repo | All commands ran from /Users/zbeyens/git/plate. |
| Browser surface changed | N/A | Record waiver | No visible web UI changed. |
| Browser final proof | N/A | Record waiver | No browser proof needed. |
| CI-controlled template output changed | N/A | Record reason | No registry/template output changed. |
| Package behavior or public API changed | N/A | Record reason | Skill command contract only; no package changeset. |
| Registry-only component work changed | N/A | Record reason | No registry component work. |
| Docs or content changed | N/A | Record reason | No docs site content changed. |
| High-risk mini gate | yes | Record failure mode, proof plan, and boundary | Failure mode: agent implements stale shadcn plan; boundary: command contract belongs in sync-shadcn; proof: generated command text requires upstream/local/status staleness checks and forbids mutation. |
| Agent-native review for agent/tooling changes | yes | Load reviewer and close findings | Reviewer loaded; no actionable gap because the new capability is exposed as a skill command and documented in generated mirrors. |
| Local install corruption suspected | N/A | Record reason | No install corruption signal. |
| Autoreview for non-trivial implementation changes | N/A | Record reason | Text-only skill contract; agent-native review is the relevant review lane. |
| PR create or update | N/A | Record reason | User did not ask for PR. |
| Task-style PR body verified | N/A | Record reason | No PR. |
| PR proof image hosting | N/A | Record reason | No PR/browser image. |
| Tracker sync-back | N/A | Record reason | No issue/Linear target. |
| Final handoff contract | yes | Fill final handoff fields | Filled below. |
| Final lint | yes | Run pnpm lint:fix | Passed; no fixes applied. |
| Output budget discipline | yes | Verify no unbounded output | One shell-quoted rg mistake recorded; successful audits were scoped. |
| Goal plan complete | yes | Run completion checker | Passed. |
| Agent source / generated sync | yes | Run pnpm install and verify generated mirrors | pnpm install passed; generated SKILL.md contains command section and source metadata. |
| Agent action discoverability | yes | Source-audit skill/rule path | Source/Codex/Claude skill audits show command section and review output shape. |
| Agent-native review | yes | Load reviewer and close findings | Reviewer loaded; no findings. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | Source rule, generated skill, autogoal, and agent-native reviewer read. | implementation |
| Implementation | complete | .agents/rules/sync-shadcn.mdc updated with command dispatch and review contract. | verification |
| Verification | complete | pnpm install and focused generated-skill audits passed; final lint/checker next. | closeout |
| PR / tracker sync | N/A | No PR/tracker requested. | final response |
| Closeout | complete | Final response after completion checker and goal close. | final response |
Findings:
sync-shadcn had no command dispatch section, so a future review invocation
could be interpreted as ordinary planning text instead of a staleness audit.Decisions and tradeoffs:
review is read-only except for a dated review artifact; it must not mutate
status.json, patch apps/www, delegate to task, or imply user acceptance.Implementation notes:
review purpose, inputs, allowed/forbidden actions, example checks,
verdict vocabulary, required report contents, and output shape.sync-shadcn review.Review fixes:
Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
rg command used a double-quoted pattern containing backticks, so zsh tried to execute review | 1 | Re-run with single-quoted pattern | Resolved; scoped audit passed. |
Verification evidence:
pnpm install passed; Skiller applied rules for Codex and Claude.rg proved source, Codex skill, and Claude skill contain
sync-shadcn review, ## Commands, ### review, stale-upstream, review
output shape, and generated source metadata.sed -n '55,205p' .agents/skills/sync-shadcn/SKILL.md shows the generated
command contract.cmp showed Codex and Claude skill mirrors are identical; source differs from
generated as expected because generated skill adds name and Skiller
metadata.git diff --check scoped to touched agent/plan files passed.pnpm lint:fix passed with no fixes applied.node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-add-sync-shadcn-review-command.md
passed.Final handoff contract:
pnpm install, source audits, generated skill audit, final lint,
completion checker.sync-shadcn review command contract added..agents/rules/sync-shadcn.mdc source rule.SKILL.md directly would be
overwritten and violate repo policy.review was requested; adding other commands
now would make the router speculative.Task-style PR body contract:
Final handoff / sync:
Timeline:
sync-shadcn review command contract to the source rule.pnpm install to regenerate skill mirrors.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout |
| Where am I going? | Final lint, completion checker, goal close |
| What is the goal? | Add the sync-shadcn review command contract and verify generated skill sync. |
| What have I learned? | The source rule was the only correct edit target; generated mirrors synced cleanly. |
| What have I done? | Added command dispatch/review docs, regenerated skill mirrors, and audited generated output. |
Open risks:
review command behavior will depend on the
next agent following the documented workflow; no standalone script was added.