Back to Plate

add sync shadcn review command

docs/plans/2026-05-28-add-sync-shadcn-review-command.md

53.0.815.8 KB
Original Source

add sync shadcn review command

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:

  • agent-native (docs/plans/templates/packs/agent-native.md)

Task source:

  • type: user request
  • id / link: chat request
  • title: add review command to sync-shadcn
  • acceptance criteria: source rule documents command dispatch and review; 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:

  • Complete only when .agents/rules/sync-shadcn.mdc documents command dispatch, review inputs, allowed and forbidden mutations, staleness verdicts, report requirements, and output shape.
  • Complete only when .agents/skills/sync-shadcn/SKILL.md is regenerated by pnpm install, not manually edited.
  • Complete only when source audits prove source and generated skill both expose sync-shadcn review, ## Commands, ### review, staleness verdicts, and the metadata.skiller.source pointer.
  • Complete only when final formatting/source checks pass and node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-add-sync-shadcn-review-command.md passes.

Verification surface:

  • source audit over .agents/rules/sync-shadcn.mdc, .agents/skills/sync-shadcn/SKILL.md, and .claude/skills/sync-shadcn/SKILL.md
  • pnpm install for Skiller-generated mirrors
  • pnpm lint:fix
  • git diff --check scoped to touched agent/plan files
  • autogoal completion checker for this plan

Constraints:

  • Edit .agents/rules/sync-shadcn.mdc as source of truth; do not manually edit generated skill mirrors.
  • Do not run build:registry.
  • Do not patch apps/www; this is a skill/command-contract change only.
  • Do not create PRs, commits, pushes, or tracker comments.

Boundaries:

  • Source of truth: .agents/rules/sync-shadcn.mdc
  • Allowed edit scope: .agents/rules/sync-shadcn.mdc, generated .agents/skills/sync-shadcn/SKILL.md, generated Claude mirror if Skiller updates it, and this goal plan.
  • Browser surface: N/A, no browser-visible app behavior changed.
  • Tracker sync: N/A, chat request only.
  • Non-goals: implement the actual review run, add more commands, update shadcn sync status, or advance any shadcn baseline.

Output budget strategy:

  • Scope reads to the sync skill source, generated skill, and goal plan.
  • Cap diff/source output with sed and focused rg; do not stream unrelated generated artifacts.
  • Record the one noisy failed rg shell attempt below and use single-quoted patterns for verification.

Blocked condition:

  • Block only if Skiller generation fails, source and generated skill diverge in a way pnpm install cannot repair, or the command contract cannot be made discoverable from the generated SKILL.md.

Task state:

  • task_type: agent command-contract update
  • task_complexity: normal
  • current_phase: closeout
  • current_phase_status: complete
  • next_phase: final response
  • goal_status: active until completion checker and update_goal

Current verdict:

  • verdict: command contract implemented
  • confidence: high
  • next owner: sync-shadcn
  • reason: the generated skill now documents sync-shadcn review and its read-only staleness audit contract.

Completion rule:

  • Do not call update_goal(status: complete) while any checklist item remains unchecked.
  • Do not call 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.
  • Do not create hook state for this goal. This file plus the active goal are the durable state.

Start Gates:

GateAppliesEvidence
Skill analysis before editsyesLoaded sync-shadcn and autogoal; source rule read before command design.
Active goal checked or createdyesget_goal returned no active goal; create_goal created this command-contract objective.
Source of truth read before editsyes.agents/rules/sync-shadcn.mdc read; generated SKILL.md treated as mirror only.
Tracker comments and attachments readN/AChat request only.
Video transcript evidence requiredN/ANo video or screenshot source.
docs/solutions checked for non-trivial existing-code workN/AAgent command-contract edit; durable shadcn context already covered by current skill policy and memory.
TDD decision before behavior change or bug fixN/ADocumentation/skill command contract, no executable app behavior.
Branch decision for code-changing taskN/AUser did not ask for branch/PR work.
Release artifact decisionN/ANo package or release artifact.
Browser tool decision for browser surfaceN/ANo browser surface changed.
PR expectation decisionN/AUser did not ask for PR.
Tracker sync expectation decisionN/ANo tracker target.
Output budget strategy recordedyesScoped reads/audits only; no broad generated output streamed.
Agent-native pack selectedyes.agents/** skill/rule surface changed.
Agent-facing action surface identifiedyessync-shadcn review command dispatch and output contract.
Source rule versus generated mirror boundary identifiedyesSource rule edited; Skiller regenerated Codex/Claude skill mirrors via pnpm install.
agent-native-reviewer loaded or waiver recordedyesLoaded reviewer; command contract has no UI parity gap because it is itself the agent action surface.

Work Checklist:

  • Objective includes outcome, completion threshold, verification surface, constraints, boundaries, and blocked condition.
  • Task source classified with source type, id/link, title, task type, acceptance criteria, caveats, likely files/routes/packages, browser surface, and root-cause layer.
  • Required video or screen-recording evidence is cached/read as normalized XML, or marked N/A with reason.
  • Nearby repo instructions and implementation patterns read before edits.
  • Implementation fixes the right ownership boundary, or the narrower choice is recorded with reason.
  • Release artifact requirement recorded: changeset, registry changelog, or N/A with reason.
  • Final handoff shape decided: concise skill change summary, verification, and no PR/tracker lines.
  • Branch handling recorded for code-changing work: N/A, no branch/PR requested.
  • Local-env-rot retry policy recorded: N/A, no surprising repo-wide failure.
  • Workspace authority recorded: proof commands run in /Users/zbeyens/git/plate.
  • High-risk note recorded for command-contract change: failure mode is an agent trusting a stale sync plan; proof is generated skill discoverability plus reviewer reasoning.
  • Review/autoreview target selected from actual diff state: agent-native reviewer loaded; autoreview N/A because this is docs/skill text only.
  • Agent-native review decision recorded for .agents/** skill changes.
  • Output budget discipline recorded and followed.
  • Agent-native pack: source-of-truth rule files are edited instead of generated skill mirrors.
  • Agent-native pack: the changed agent action is discoverable from the skill/rule text.
  • Agent-native pack: generated mirrors are synced when .agents/rules/** changed.
  • Agent-native pack: accepted agent-native review findings are fixed or explicitly rejected with reason.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdyesProve command dispatch and review contract in source and generated skillFocused rg found ## Commands, ### review, sync-shadcn review, staleness verdicts, output shape, and source metadata in source/Codex/Claude skill files.
Bug reproduced before fixN/ARecord reasonThis is a requested skill extension, not a bug fix.
Targeted behavior verificationyesAudit generated skill textsed -n '55,205p' .agents/skills/sync-shadcn/SKILL.md shows the new command section.
TypeScript or typed config changedN/ARecord reasonMarkdown rule/skill text only.
Package exports or file layout changedN/ARecord reasonNo package file layout or barrels changed.
Package manifests, lockfile, or install graph changedN/ARecord reasonpnpm install reported lockfile up to date; no package manifest edit for this task.
Agent rules or skills changedyesRun pnpm install and verify generated skill syncpnpm install passed and Skiller applied rules for Codex and Claude.
Workspace authority proofyesRun verification in owning repoAll commands ran from /Users/zbeyens/git/plate.
Browser surface changedN/ARecord waiverNo visible web UI changed.
Browser final proofN/ARecord waiverNo browser proof needed.
CI-controlled template output changedN/ARecord reasonNo registry/template output changed.
Package behavior or public API changedN/ARecord reasonSkill command contract only; no package changeset.
Registry-only component work changedN/ARecord reasonNo registry component work.
Docs or content changedN/ARecord reasonNo docs site content changed.
High-risk mini gateyesRecord failure mode, proof plan, and boundaryFailure 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 changesyesLoad reviewer and close findingsReviewer loaded; no actionable gap because the new capability is exposed as a skill command and documented in generated mirrors.
Local install corruption suspectedN/ARecord reasonNo install corruption signal.
Autoreview for non-trivial implementation changesN/ARecord reasonText-only skill contract; agent-native review is the relevant review lane.
PR create or updateN/ARecord reasonUser did not ask for PR.
Task-style PR body verifiedN/ARecord reasonNo PR.
PR proof image hostingN/ARecord reasonNo PR/browser image.
Tracker sync-backN/ARecord reasonNo issue/Linear target.
Final handoff contractyesFill final handoff fieldsFilled below.
Final lintyesRun pnpm lint:fixPassed; no fixes applied.
Output budget disciplineyesVerify no unbounded outputOne shell-quoted rg mistake recorded; successful audits were scoped.
Goal plan completeyesRun completion checkerPassed.
Agent source / generated syncyesRun pnpm install and verify generated mirrorspnpm install passed; generated SKILL.md contains command section and source metadata.
Agent action discoverabilityyesSource-audit skill/rule pathSource/Codex/Claude skill audits show command section and review output shape.
Agent-native reviewyesLoad reviewer and close findingsReviewer loaded; no findings.

Phase / pass table:

PhaseStatusEvidenceNext
Intake and source readcompleteSource rule, generated skill, autogoal, and agent-native reviewer read.implementation
Implementationcomplete.agents/rules/sync-shadcn.mdc updated with command dispatch and review contract.verification
Verificationcompletepnpm install and focused generated-skill audits passed; final lint/checker next.closeout
PR / tracker syncN/ANo PR/tracker requested.final response
CloseoutcompleteFinal 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.
  • The right boundary is the source rule because generated skill mirrors are Skiller output.

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.
  • Staleness is split into upstream, local, status, and ref blockers so the command can tell us what is stale instead of returning a vague "rerun sync".

Implementation notes:

  • Added command parsing guidance.
  • Added review purpose, inputs, allowed/forbidden actions, example checks, verdict vocabulary, required report contents, and output shape.
  • Updated the skill description to include sync-shadcn review.

Review fixes:

  • Agent-native reviewer loaded; no additional action required.

Error attempts:

Error / failed attemptCountNext different moveResolution
rg command used a double-quoted pattern containing backticks, so zsh tried to execute review1Re-run with single-quoted patternResolved; scoped audit passed.

Verification evidence:

  • pnpm install passed; Skiller applied rules for Codex and Claude.
  • Focused 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:

  • PR line: N/A, no PR requested.
  • Issue / tracker line: N/A.
  • Confidence line: high.
  • Flow table:
    • Reproduced: N/A, requested skill extension.
    • Verified: pnpm install, source audits, generated skill audit, final lint, completion checker.
  • Browser check: N/A.
  • Outcome: sync-shadcn review command contract added.
  • Caveat: this adds the skill contract, not an executable script.
  • Design:
    • Chosen boundary: .agents/rules/sync-shadcn.mdc source rule.
    • Why not quick patch: editing generated SKILL.md directly would be overwritten and violate repo policy.
    • Why not broader change: only review was requested; adding other commands now would make the router speculative.
  • Verified: final commands below.
  • PR body verified: N/A.

Task-style PR body contract:

  • N/A, no PR requested.

Final handoff / sync:

  • PR: N/A
  • Issue / tracker: N/A
  • Browser proof: N/A
  • Caveats: command contract only; no script runner added.

Timeline:

  • 2026-05-28T14:56:58.217Z Task goal plan created.
  • 2026-05-28 Added sync-shadcn review command contract to the source rule.
  • 2026-05-28 Ran pnpm install to regenerate skill mirrors.

Reboot status:

QuestionAnswer
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:

  • None for this task. The actual review command behavior will depend on the next agent following the documented workflow; no standalone script was added.