docs/plans/2026-05-28-sync-shadcn-skill.md
Objective:
Create a repo-local sync-shadcn skill and durable
docs/sync/shadcn tracking area so future agents can compare
../shadcn/apps/v4 against apps/www, track the exact upstream commit Plate is
synced to, inventory every upstream added/modified/deleted docs-app change, and
plan what to adopt, exclude, fork, or smart-merge before implementation.
Goal plan: docs/plans/2026-05-28-sync-shadcn-skill.md
Template: docs/plans/templates/task.md
Primary template: docs/plans/templates/task.md
Applied packs:
Task source:
../shadcn, stores durable state under docs/sync/shadcn,
plans added/updated/deleted upstream changes, and recommends adopt/exclude/
fork/smart-merge decisions before docs sync implementation.Completion threshold:
.agents/rules/sync-shadcn.mdc exists as the source-of-truth skill
rule..agents/skills/sync-shadcn/SKILL.md exists and points back
to the source rule..claude/skills/sync-shadcn exists as the generated Claude skill link.docs/sync/shadcn/status.json records the upstream repo, app path, Plate app,
and current seeded upstream commit.docs/sync/shadcn/decisions.md records settled keep/fork/exclude policy,
including no v0, no public create/charts/colors by default, keep lazy
/api/registry-source/[name], and keep Plate sidebar accordion UX on
upstream primitives.AGENTS.md and .agents/AGENTS.md mention when to use the skill.node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-sync-shadcn-skill.md
passes.Verification surface:
pnpm installnode -e JSON parse and baseline assertion for
docs/sync/shadcn/status.jsongit -C ../shadcn rev-parse origin/main compared with the recorded baselinerg source audit across source rule, generated skill, AGENTS files, and
docs/sync/shadcntest -L .claude/skills/sync-shadcn and generated skill file existencegit diff --check scoped to the changed agent/docs sync filespnpm exec biome check scoped to supported changed filescheck-complete.mjs commandConstraints:
apps/www docs behavior for this task.Boundaries:
.agents/rules/sync-shadcn.mdc, generated skill
output from pnpm install, AGENTS skill listings, docs/sync/shadcn/**, and
this goal plan.Output budget strategy:
sed, rg, and status checks.docs/sync/shadcn/runs/
instead of streaming huge diffs into chat.Blocked condition:
The task would block only if Skiller generation failed, ../shadcn was missing
or not a shadcn checkout, or the user rejected seeding the initial baseline from
the current local upstream clone. None of those occurred.
Task state:
Current verdict:
Completion rule:
Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
| Skill analysis before edits | yes | Read .agents/AGENTS.md, shadcn-parity, generated skill conventions, existing migration plans, and relevant solution notes. |
| Active goal checked or created | yes | Created this plan with autogoal task template plus agent-native/docs packs. |
| Source of truth read before edits | yes | Read the user request, previous shadcn migration decisions, and the provided task skill shape. |
| Tracker comments and attachments read | N/A | Local chat request, no tracker. |
| Video transcript evidence required | N/A | No video evidence. |
docs/solutions checked for non-trivial existing-code work | yes | Read shadcn restart, sidebar parity, init route, registry schema, namespace, and Fumadocs metadata notes. |
| TDD decision before behavior change or bug fix | N/A | No runtime behavior or bug fix. |
| Branch decision for code-changing task | N/A | No commit/PR requested; current branch retained. |
| Release artifact decision | N/A | No package or registry source change. |
| Browser tool decision for browser surface | N/A | No browser surface changed. |
| PR expectation decision | yes | No PR requested. |
| Tracker sync expectation decision | N/A | No tracker. |
| Output budget strategy recorded | yes | See Output budget strategy. |
| Agent-native pack selected | yes | This changes agent skill behavior. |
| Agent-facing action surface identified | yes | New sync-shadcn skill plus AGENTS discovery lines. |
| Source rule versus generated mirror boundary identified | yes | Edited .agents/rules/sync-shadcn.mdc; generated mirrors came from pnpm install. |
agent-native-reviewer loaded or waiver recorded | yes | Read and applied agent-native-reviewer; no action-parity gap because this adds an agent workflow, not a UI-only action. |
| Docs pack selected | yes | Added durable docs/sync policy files. |
docs-creator loaded | yes | Read docs style/workflow lane guidance. |
| Docs lane selected | yes | Workflow/reference docs for future agent sync runs. |
| Target docs and nearest sibling docs read | yes | Read shadcn migration plans and sync-skill prior plans. |
| Docs style doctrine read | yes | Read relevant docs-creator sections. |
| Documented source owner identified | yes | Source owner is .agents/rules/sync-shadcn.mdc; durable state owner is docs/sync/shadcn. |
Work Checklist:
/Users/zbeyens/git/plate
except the upstream SHA check in ../shadcn.pnpm install.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | yes | Run the recorded source audits and checks. | Verification evidence section records each command. |
| Bug reproduced before fix | N/A | No bug fix. | N/A. |
| Targeted behavior verification | yes | Verify generated skill, status JSON, upstream baseline, and AGENTS discoverability. | Source audits passed. |
| TypeScript or typed config changed | N/A | No TS/config type surface changed. | N/A. |
| Package exports or file layout changed | N/A | No package export layout changed. | N/A. |
| Package manifests, lockfile, or install graph changed | N/A | pnpm install ran for Skiller sync; lockfile had no relevant tracked diff. | pnpm install passed. |
| Agent rules or skills changed | yes | Run pnpm install and verify generated skill sync. | pnpm install passed; generated skill metadata points to .agents/rules/sync-shadcn.mdc. |
| Workspace authority proof | yes | Run proof in Plate and upstream clone where owned. | Plate checks ran in /Users/zbeyens/git/plate; upstream SHA check ran in ../shadcn. |
| Browser surface changed | N/A | No browser route/UI changed. | N/A. |
| Browser final proof | N/A | No browser route/UI changed. | N/A. |
| CI-controlled template output changed | N/A | No template output changed. | N/A. |
| Package behavior or public API changed | N/A | No package behavior/public API changed. | N/A. |
| Registry-only component work changed | N/A | No registry component source changed. | N/A. |
| Docs or content changed | yes | Verify source-backed claims and local links where applicable. | Source audit and JSON/status checks passed; docs are workflow/reference, not app MDX. |
| High-risk mini gate | yes | Record failure mode, proof plan, and boundary. | Failure mode: future agents skip exact upstream refs or reimport discarded shadcn surfaces. Proof: skill mandates status JSON, full inventory, decisions table, and user confirmation before implementation. Boundary: source rule plus docs/sync/shadcn ledger is the durable owner. |
| Agent-native review for agent/tooling changes | yes | Load reviewer and close findings. | Reviewer read; no findings because the change adds an agent workflow and discoverability. |
| Local install corruption suspected | N/A | No corruption-shaped failure occurred. | N/A. |
| Autoreview for non-trivial implementation changes | N/A | Docs/tooling-only source rule change; no runtime implementation diff. | Manual source/agent-native review plus focused checks used instead. |
| PR create or update | N/A | No PR requested. | N/A. |
| Task-style PR body verified | N/A | No PR. | N/A. |
| PR proof image hosting | N/A | No PR/browser proof. | N/A. |
| Tracker sync-back | N/A | No tracker. | N/A. |
| Final handoff contract | yes | Report outcome, caveat, and verification. | Final response will summarize changed files and checks. |
| Final lint | yes | Run scoped supported linter/formatter check and whitespace check. | pnpm exec biome check ... checked supported files; git diff --check passed. |
| Output budget discipline | yes | Avoid unbounded output. | One rg command had shell backtick noise and was rerun safely; no large diff streamed. |
| Goal plan complete | yes | Run check-complete.mjs. | Recorded in final verification evidence. |
| Agent source / generated sync | yes | Run pnpm install. | Passed. |
| Agent action discoverability | yes | Audit AGENTS and generated skill text. | rg found AGENTS entries and generated metadata. |
| Agent-native review | yes | Apply reviewer. | No findings. |
| Docs source-backed claim audit | yes | Verify decisions against prior plans/solutions and current status. | Prior migration artifacts and source audits read. |
| Docs links / routes / previews | yes | Verify local file paths and route names by source audit. | rg source audit passed. |
| Docs MDX/content parser | N/A | No app MDX content changed. | N/A. |
| Plugin page specifics | N/A | No plugin page changed. | N/A. |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and source read | complete | Read AGENTS, shadcn parity, migration plans, solution notes, and generated skill conventions. | implementation |
| Implementation | complete | Added source rule, sync ledger, decisions table, AGENTS entry, and generated skill output. | verification |
| Verification | complete | pnpm install, JSON/upstream/source audits, symlink check, Biome supported-file check, and diff whitespace check passed. | closeout |
| PR / tracker sync | N/A | No PR/tracker requested. | final response |
| Closeout | complete | Plan updated with evidence; final checker run required. | final response |
Findings:
.agents/AGENTS.md is the source-of-truth instruction file and generated
SKILL.md files must not be edited directly.../shadcn at
4a4dc8eb0fc793d8e9225e780183ad605f15d2c2, matching the seeded
status.json baseline./api/registry-source/[name].Decisions and tradeoffs:
docs/sync/shadcn with a JSON baseline plus a
human-readable decisions table.origin/main commit because
the active migration branch already records the completed shadcn base work,
while preserving a note that the original plan did not record an exact SHA.task.lastSyncedCommit for future ranges until every upstream row
is accounted for.Implementation notes:
.agents/rules/sync-shadcn.mdc..agents/skills/sync-shadcn/SKILL.md through
pnpm install..claude/skills/sync-shadcn symlink through Skiller.docs/sync/shadcn/README.md, status.json, and decisions.md..agents/AGENTS.md; generated root AGENTS.md synced through
Skiller.Review fixes:
rg
pattern.Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
rg pattern with backticks triggered zsh command substitution noise | 1 | Quote the pattern with single quotes and avoid shell-interpreted backticks | Rerun passed and found the expected skill/status lines. |
Verification evidence:
pnpm install: passed; Skiller applied rules for Claude Code and Codex, and
Fumadocs source generation completed.node -e JSON parse/baseline assertion for docs/sync/shadcn/status.json:
passed with status baseline ok.git -C ../shadcn rev-parse origin/main compared to status.json
lastSyncedCommit: passed with upstream baseline ok.rg -n 'sync-shadcn|lastSyncedCommit|Complete Upstream Inventory|registry-source|Discard upstream \/create`, `/charts`, `/colors`|source: .agents/rules/sync-shadcn.mdc' ...`:
passed and found AGENTS entries, generated metadata, baseline tracking,
inventory requirement, exclusions, and lazy source policy.test -L .claude/skills/sync-shadcn && test -f .agents/skills/sync-shadcn/SKILL.md:
passed with claude symlink and codex skill ok.git diff --check -- <changed agent/docs sync files>: passed.pnpm exec biome check .agents/AGENTS.md AGENTS.md docs/sync/shadcn/README.md docs/sync/shadcn/decisions.md docs/sync/shadcn/status.json:
passed; Biome checked its supported file in that set and reported no fixes.node .agents/rules/autogoal/scripts/check-complete.mjs docs/plans/2026-05-28-sync-shadcn-skill.md:
passed with [autogoal] complete.Final handoff contract:
docs/sync/shadcn ledger.Task-style PR body contract:
Final handoff / sync:
../shadcn and the migration
branch; future runs must use full range plans before advancing it.Timeline:
pnpm install to generate skill mirrors.check-complete.mjs; plan passed.Reboot status:
| Question | Answer |
|---|---|
| Where am I? | Closeout after implementation and verification. |
| Where am I going? | Run the plan checker, then final response. |
| What is the goal? | Create a comprehensive sync-shadcn skill with exact upstream baseline tracking. |
| What have I learned? | Source rules own generated skills; current upstream baseline is 4a4dc8eb0fc793d8e9225e780183ad605f15d2c2; prior docs settle major keep/exclude policy. |
| What have I done? | Added the skill rule, generated mirrors, AGENTS discovery, status JSON, decisions table, README, and this plan. |
Open risks:
status.json: the initial exact SHA is
seeded from the current local upstream clone because the earlier migration
notes did not record a SHA.