docs/plans/templates/sync-shadcn.md
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:
docs if docs/content pages are edited during an accepted implementationbrowser if browser-visible docs UI is editedagent-native if .agents/**, .claude/**, .codex/**, skills,
commands, prompts, or user-action tooling are editedSync source:
shadcn-ui/ui../shadcn../shadcn/apps/v4apps/wwwdocs/sync/shadcn/status.jsondocs/sync/shadcn/decisions.mddocs/sync/shadcn/runs/<date>-<base>-to-<target>/Completion threshold:
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.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.upstream-name-status.tsv, upstream-numstat.tsv,
upstream-commits.txt, inventory.md, plan.md, and screenshots for
visual scopes.apps/www, content/docs, docs/sync/shadcn, and relevant
docs/solutions/** notes.docs/sync/shadcn/status.json.Constraints:
build:registry..patch files into sync run directories. Inspect focused diffs
on demand and summarize the relevant hunks in Markdown.apps/www during planning-only runs except for qualifying
micro-overlap direct merges recorded in the sync plan.lastSyncedCommit until every upstream row through the target
is accounted for and the user accepts the final accounting.Boundaries:
docs/sync/shadcn/**, this goal plan, generated run
artifacts, and qualifying micro-overlap direct merges when the rule permits
them.Output budget strategy:
.patch
artifacts.git diff --name-status,
git diff --numstat, git log --oneline, wc -l, and narrow sed/rg
reads.Blocked condition:
Sync state:
Current verdict:
Completion 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 the range plan or accepted
implementation evidence is recorded below and
node .agents/rules/autogoal/scripts/check-complete.mjs {{PLAN_PATH}}
passes.docs/sync/shadcn/status.json, and the
run artifact directory are the durable state.Start Gates:
| Gate | Applies | Evidence |
|---|---|---|
autogoal loaded and active goal checked/created | pending | pending |
sync-shadcn skill/rule read | pending | pending |
| Output budget strategy recorded before broad upstream commands | pending | pending |
docs/sync/shadcn/status.json read | pending | pending |
docs/sync/shadcn/decisions.md read | pending | pending |
| Prior migration plans/solution notes checked | pending | pending |
../shadcn clone exists and was fetched/pulled intentionally | pending | pending |
| Base and target refs resolved to exact SHAs | pending | pending |
| Base ancestry or ref problem proven | pending | pending |
| Planning-only vs implementation mode decided | pending | pending |
| User-review boundary recorded | pending | pending |
Work Checklist:
docs/sync/shadcn/runs/.upstream-name-status.tsv,
upstream-numstat.tsv, and upstream-commits.txt..patch files were
written into the repo.apps/v4 row is classified in inventory.md with
status, path, subsystem, Plate owner, decision, and evidence.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.sync-shadcn again with the accepted plan path and slice.Completion Gates:
| Gate | Applies | Required action | Evidence |
|---|---|---|---|
| Named verification threshold | pending | Prove the planning or accepted-implementation threshold named above | pending |
| Upstream range artifacts exist | pending | Verify required run artifacts are non-empty or record a target-only bootstrap exception | pending |
| Inventory completeness | pending | Reconcile inventory.md row count with upstream-name-status.tsv | pending |
| Decision accounting | pending | Verify decision counts cover every upstream row and no needs-question row is hidden | pending |
| Status JSON parse and semantics | pending | Parse docs/sync/shadcn/status.json; verify planned/synced commit semantics | pending |
| Source-backed Plate mapping | pending | Record local rg/file evidence for every actionable adoption, fork, exclusion, or question group | pending |
| Visual comparison screenshots | pending | For visual scopes, capture upstream shadcn and Plate screenshots at matching viewport(s), then record visible deltas; otherwise N/A | pending |
| Planning-only no implementation edits | pending | Verify no apps/www implementation patch was made, or record and verify qualifying micro-overlap direct merges | pending |
| Accepted implementation verification | pending | If a slice was accepted, run its focused typecheck/test/lint/browser/source proof; otherwise N/A | pending |
| Browser surface changed | pending | Capture browser proof when accepted implementation touches visible docs UI or when visual planning needs parity evidence; otherwise N/A | pending |
| Package manifests, lockfile, or install graph changed | pending | Run pnpm install and relevant package checks when touched; otherwise N/A | pending |
| Agent rules or skills changed | pending | Run pnpm install and verify generated skill sync when touched; otherwise N/A | pending |
| CI-controlled generated output | pending | Verify no generated registry/template output was manually edited, or record intentional owner | pending |
| Baseline advancement | pending | Advance lastSyncedCommit only if all rows through target are complete and accepted; otherwise record why unchanged | pending |
| User review boundary | pending | In planning mode, stop and ask the user to review the plan; in implementation mode, record the accepted plan/slice | pending |
| Output budget discipline | pending | Verify broad output was artifacted/capped, or record accidental output and recovery | pending |
| Goal plan complete | yes | Run node .agents/rules/autogoal/scripts/check-complete.mjs {{PLAN_PATH}} | pending |
Phase / pass table:
| Phase | Status | Evidence | Next |
|---|---|---|---|
| Intake and baseline read | in_progress | created plan | upstream range evidence |
| Upstream range evidence | pending | classification | |
| Classification and local mapping | pending | plan artifact | |
| Plan artifact and status update | pending | user review stop | |
| User review stop | pending | final response or later implementation | |
| Accepted implementation | pending | verification or N/A; implementation mode only | |
| Verification and baseline decision | pending | closeout | |
| Closeout | pending | final response |
Decision counts:
| Decision | Count | Notes |
|---|---|---|
adopt-upstream | pending | pending |
smart-merge | pending | pending |
plate-fork | pending | pending |
exclude-upstream | pending | pending |
delete-plate-residue | pending | pending |
no-op | pending | pending |
needs-question | pending | pending |
Recommended merge slices:
| Order | Slice | Class | Files | Why | Verification |
|---|---|---|---|---|---|
| pending | pending | pending | pending | pending | pending |
Questions:
Findings:
Decisions and tradeoffs:
Error attempts:
| Error / failed attempt | Count | Next different move | Resolution |
|---|---|---|---|
| None yet | 0 |
Verification evidence:
Final handoff:
Timeline:
Reboot status:
| Question | Answer |
|---|---|
| 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: