Back to Plate

{{TITLE}}

docs/plans/templates/sync-shadcn.md

53.0.913.3 KB
Original Source

{{TITLE}}

Objective: TODO: Write the exact active sync-shadcn objective after creating this file.

Flow mode: planning mode by default: one-shot execution to write a reviewable range plan, directly apply qualifying micro-overlap fixes when the sync-shadcn rule allows it, then stop for user review of remaining slices. Implementation mode for bigger chunks starts only on a later user instruction that accepts a named plan and slice. Use collaborative planning only when the user asks to decide policy before any range plan is written.

Goal plan: {{PLAN_PATH}}

Primary template: docs/plans/templates/sync-shadcn.md

Applied packs:

  • none by default
  • add docs if docs/content pages are edited during an accepted implementation
  • add browser if browser-visible docs UI is edited
  • add agent-native if .agents/**, .claude/**, .codex/**, skills, commands, prompts, or user-action tooling are edited

Sync source:

  • upstream repo: shadcn-ui/ui
  • upstream clone: ../shadcn
  • upstream app: ../shadcn/apps/v4
  • Plate docs app: apps/www
  • durable state: docs/sync/shadcn/status.json
  • durable policy: docs/sync/shadcn/decisions.md
  • run artifacts: docs/sync/shadcn/runs/<date>-<base>-to-<target>/

Completion threshold:

  • Planning-only run: complete only when the upstream range has exact base and target SHAs, ancestry is proven or the ref problem is recorded, every upstream added/modified/deleted apps/v4 file is classified in a durable inventory, decision counts reconcile to the upstream TSV, the plan lists recommended slices and real questions, lastPlannedCommit points at the target, lastSyncedCommit is unchanged unless the whole range is accepted and complete, every direct micro-overlap merge is recorded and verified or marked N/A, the final response asks the user to review the remaining plan and invoke sync-shadcn again with the accepted plan/slice, and node .agents/rules/autogoal/scripts/check-complete.mjs {{PLAN_PATH}} passes.
  • Accepted implementation run: complete only when the accepted slice is implemented and verified, excluded/forked rows remain recorded, partial sync or baseline advancement semantics are updated in status.json, and node .agents/rules/autogoal/scripts/check-complete.mjs {{PLAN_PATH}} passes.

Verification surface:

  • ../shadcn git commands for fetch/pull, base/target resolution, ancestry, upstream commit list, and apps/v4 file status.
  • Run artifacts: upstream-name-status.tsv, upstream-numstat.tsv, upstream-commits.txt, inventory.md, plan.md, and screenshots for visual scopes.
  • Source audits in apps/www, content/docs, docs/sync/shadcn, and relevant docs/solutions/** notes.
  • JSON parse and commit-semantics check for docs/sync/shadcn/status.json.
  • For implementation slices only: focused typecheck/lint/test/browser proof owned by the touched Plate surface.

Constraints:

  • Do not run build:registry.
  • Do not edit generated registry output, template output, or generated skill mirrors by hand.
  • Do not write .patch files into sync run directories. Inspect focused diffs on demand and summarize the relevant hunks in Markdown.
  • Do not patch apps/www during planning-only runs except for qualifying micro-overlap direct merges recorded in the sync plan.
  • Do not advance lastSyncedCommit until every upstream row through the target is accounted for and the user accepts the final accounting.
  • Preserve settled Plate policy unless the user explicitly changes it: discard v0/create/charts/colors/theme/customizer surfaces; keep Plate API MDX, CN docs, MCP, Plate Plus hooks, GA, home page, editor demos, registry content, lazy registry-source loading, and sidebar accordion/filter UX.

Boundaries:

  • Allowed planning edits: docs/sync/shadcn/**, this goal plan, generated run artifacts, and qualifying micro-overlap direct merges when the rule permits them.
  • Allowed implementation edits only in implementation mode, after later user acceptance of a named plan/slice: the files named by the accepted slice plus required lock/config/test/doc updates.
  • Non-goals: broad shadcn mirroring, homepage/create/theme adoption, registry build output, and unrelated docs redesign.

Output budget strategy:

  • Do not stream broad upstream diffs or full generated registry output into chat. Save complete TSVs under the run directory. Do not save .patch artifacts.
  • Use counts and focused slices first: git diff --name-status, git diff --numstat, git log --oneline, wc -l, and narrow sed/rg reads.
  • Cap command output for source reads. If output is still too large, write an artifact summary and inspect exact ranges.

Blocked condition:

  • Block only when the upstream clone/ref state is invalid, the target range cannot be proven, a required user policy decision changes whether the plan is truthful, or verification tooling cannot instantiate/check the goal plan after a real repair attempt.

Sync state:

  • base commit: pending
  • target commit: pending
  • range kind: pending
  • run directory: pending
  • planning status: active
  • implementation status: pending user acceptance
  • user review status: pending until final planning handoff asks for review
  • baseline status: do not advance until completion gates prove it

Current verdict:

  • verdict: pending
  • confidence: pending
  • recommended next owner: sync-shadcn
  • reason: pending

Completion rule:

  • Do not call update_goal(status: complete) while any required checklist item remains unchecked. If an item does not apply, check it and add N/A: <reason>.
  • Do not call update_goal(status: complete) until the range plan or accepted implementation evidence is recorded below and node .agents/rules/autogoal/scripts/check-complete.mjs {{PLAN_PATH}} passes.
  • Do not create hook state. This plan, docs/sync/shadcn/status.json, and the run artifact directory are the durable state.

Start Gates:

GateAppliesEvidence
autogoal loaded and active goal checked/createdpendingpending
sync-shadcn skill/rule readpendingpending
Output budget strategy recorded before broad upstream commandspendingpending
docs/sync/shadcn/status.json readpendingpending
docs/sync/shadcn/decisions.md readpendingpending
Prior migration plans/solution notes checkedpendingpending
../shadcn clone exists and was fetched/pulled intentionallypendingpending
Base and target refs resolved to exact SHAspendingpending
Base ancestry or ref problem provenpendingpending
Planning-only vs implementation mode decidedpendingpending
User-review boundary recordedpendingpending

Work Checklist:

  • Objective, threshold, verification surface, constraints, boundaries, and blocked condition are filled from the active goal.
  • Upstream range recorded with exact base SHA, target SHA, commit dates, and target subject.
  • Run directory created under docs/sync/shadcn/runs/.
  • Complete upstream inventories saved: upstream-name-status.tsv, upstream-numstat.tsv, and upstream-commits.txt.
  • Focused diffs inspected on demand and summarized; no .patch files were written into the repo.
  • For visual scopes, upstream shadcn and Plate screenshots were captured at matching viewport(s), with visible deltas recorded in the plan.
  • Every changed upstream apps/v4 row is classified in inventory.md with status, path, subsystem, Plate owner, decision, and evidence.
  • Decision counts reconcile to the upstream TSV row count.
  • Added, modified, and deleted groups are summarized with actionable rows separated from exclusions/no-ops.
  • Recommended merge slices are ordered and include class, files, why, and verification.
  • Micro-overlap direct merges are recorded with upstream file, Plate file, change, why direct, and verification; otherwise N/A.
  • Settled exclusions and Plate forks are recorded with policy evidence.
  • Real needs-question rows are isolated; settled policy is not re-asked.
  • docs/sync/shadcn/status.json update semantics are recorded: lastPlannedCommit, lastPlan, partial sync, or baseline advancement.
  • Planning-mode final handoff explicitly asks the user to review the plan and invoke sync-shadcn again with the accepted plan path and slice.
  • Workspace authority recorded for each verification command or artifact.
  • Output budget discipline followed; large evidence stayed in artifacts.
  • Final handoff shape is filled before closeout.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdpendingProve the planning or accepted-implementation threshold named abovepending
Upstream range artifacts existpendingVerify required run artifacts are non-empty or record a target-only bootstrap exceptionpending
Inventory completenesspendingReconcile inventory.md row count with upstream-name-status.tsvpending
Decision accountingpendingVerify decision counts cover every upstream row and no needs-question row is hiddenpending
Status JSON parse and semanticspendingParse docs/sync/shadcn/status.json; verify planned/synced commit semanticspending
Source-backed Plate mappingpendingRecord local rg/file evidence for every actionable adoption, fork, exclusion, or question grouppending
Visual comparison screenshotspendingFor visual scopes, capture upstream shadcn and Plate screenshots at matching viewport(s), then record visible deltas; otherwise N/Apending
Planning-only no implementation editspendingVerify no apps/www implementation patch was made, or record and verify qualifying micro-overlap direct mergespending
Accepted implementation verificationpendingIf a slice was accepted, run its focused typecheck/test/lint/browser/source proof; otherwise N/Apending
Browser surface changedpendingCapture browser proof when accepted implementation touches visible docs UI or when visual planning needs parity evidence; otherwise N/Apending
Package manifests, lockfile, or install graph changedpendingRun pnpm install and relevant package checks when touched; otherwise N/Apending
Agent rules or skills changedpendingRun pnpm install and verify generated skill sync when touched; otherwise N/Apending
CI-controlled generated outputpendingVerify no generated registry/template output was manually edited, or record intentional ownerpending
Baseline advancementpendingAdvance lastSyncedCommit only if all rows through target are complete and accepted; otherwise record why unchangedpending
User review boundarypendingIn planning mode, stop and ask the user to review the plan; in implementation mode, record the accepted plan/slicepending
Output budget disciplinependingVerify broad output was artifacted/capped, or record accidental output and recoverypending
Goal plan completeyesRun node .agents/rules/autogoal/scripts/check-complete.mjs {{PLAN_PATH}}pending

Phase / pass table:

PhaseStatusEvidenceNext
Intake and baseline readin_progresscreated planupstream range evidence
Upstream range evidencependingclassification
Classification and local mappingpendingplan artifact
Plan artifact and status updatependinguser review stop
User review stoppendingfinal response or later implementation
Accepted implementationpendingverification or N/A; implementation mode only
Verification and baseline decisionpendingcloseout
Closeoutpendingfinal response

Decision counts:

DecisionCountNotes
adopt-upstreampendingpending
smart-mergependingpending
plate-forkpendingpending
exclude-upstreampendingpending
delete-plate-residuependingpending
no-oppendingpending
needs-questionpendingpending

Recommended merge slices:

OrderSliceClassFilesWhyVerification
pendingpendingpendingpendingpendingpending

Questions:

  • Pending.

Findings:

  • None yet.

Decisions and tradeoffs:

  • None yet.

Error attempts:

Error / failed attemptCountNext different moveResolution
None yet0

Verification evidence:

  • Pending.

Final handoff:

  • Range: pending
  • Plan artifact: pending
  • Inventory artifact: pending
  • Decision counts: pending
  • Micro auto-merges: pending or N/A
  • Recommended first slice: pending
  • Review request: pending
  • Question: pending or N/A; must ask for review before implementation in planning mode
  • Status JSON: pending
  • Verification: pending
  • Baseline: pending

Timeline:

  • {{CREATED_AT}} Sync Shadcn goal plan created.

Reboot status:

QuestionAnswer
Where am I?Intake and baseline read
Where am I going?Upstream evidence, classification, plan artifact, status update, closeout
What is the goal?TODO: Fill from Objective
What have I learned?See Findings
What have I done?See Timeline

Open risks:

  • Pending.