Repository navigation
feat(cli): doctor --json, changelogs, a scaffolder, third-party registries, and template seeding - #445
feat(cli): doctor --json, changelogs, a scaffolder, third-party registries, and template seeding#445Ducksss wants to merge 1 commit into
Conversation
…tries, and template seeding Five features that close gaps the install lifecycle work opened, stacked on #442. **doctor --json + exit codes.** `list` and `diff` gained `--json`; `doctor` did not, so the install story was not fully CI-checkable. Findings are now collected rather than printed as they happen, so one run renders either the human report (byte-identical to before) or JSON. Every finding carries a scope — project, scripts, state, or a component name — and the exit code separates the two failures that need different responses: 2 means the project cannot accept installs at all, 1 means a recorded install drifted. **Changelogs and content-breaking upgrades.** `update` could move a consumer from 0.1.0 to 0.2.0 with no way to say what changed, and no way to signal that stored Payload data needed migrating first. Manifests now carry release notes, validated on load: real semver, ordered newest first, the manifest's own version present, and a `breaking` entry must declare its migration — otherwise `update` could refuse an upgrade without being able to explain why. `diff` prints pending entries; `update` holds a breaking component back entirely until --accept-breaking. That is deliberately not --force: one means "discard my local edits", the other means "I have migrated my content". Seeded from real history — stats-proof and content-quote were already at 0.2.0 from the logoLabel change. **payload-components new.** Adding a component touches a dozen files whose shape is entirely derivable from the slug. The generator writes those, appends to the mechanical lists, and prints the decisions it refuses to guess: where the component ranks in the curated catalog order, its dbName abbreviation (checked against every existing block), the Content model prose, the demo copy. **Third-party registries.** `add @scope/name` was documented in content/docs/registry.mdx and never implemented; the pinned shadcn supports it natively. The boundary is explicit: files only, https only, no Payload wiring, no install state, and --demo/--localized rejected, because a third-party item has no manifest to record a contract against. **add-template --demo.** One draft Page per page of a concept, reusing writeSeedScript unchanged. The blocker was that the ownership record was keyed to the first manifest, and every shipped template starts three to five of its pages with the same block — so those pages would all have claimed the same record. Ownership identity is now an optional, explicit part of SeedTarget that defaults to the old behavior, leaving all 27 pinned seed tests untouched. Also fixes two things found while mapping the authoring surface: hero-aurora and hero-kinetic existed as doc pages but were missing from the sidebar (the meta check only ran one direction — now it runs both), and the component-template README still named four files that have since become derived. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Five features stacked on #442, each closing a gap that PR's work opened or exposed.
doctor --json+ distinct exit codes (#19)listanddiffgained--jsonin #442;doctordid not, so the install storystill wasn't fully CI-checkable.
Findings are now collected rather than printed as they happen, so one run
renders either the human report or JSON. The text output is byte-identical — its
exact strings are pinned by the doctor orchestration spec, and two committed blog
figures excerpt
doctorCommandby anchor.Every finding carries a
scope(project,scripts,state, or a componentname) so CI can group without parsing prose, and the exit code separates the two
failures that need different responses:
012Changelogs and content-breaking upgrades
updatecould move a consumer from0.1.0to0.2.0with no way to say whatchanged — and no way to signal that stored Payload data had to be migrated first.
A field rename would have silently broken content.
Manifests now carry release notes, validated on load: real semver, ordered
newest first, the manifest's own version present, and a
breakingentry mustdeclare its
dataMigration— otherwiseupdatecould refuse an upgrade withoutbeing able to explain why.
diffprints the entries an upgrade would apply, plus any migration.updateholds a breaking component back entirely until--accept-breaking.That is deliberately not
--force. One means "discard my local edits", theother means "I have migrated my content" — different decisions, different flags.
Seeded from real history, not invented:
stats-proofandcontent-quotewerealready at
0.2.0from thelogoLabelchange in #360. A component's newest entryalso surfaces on its docs page once it moves past its first release.
payload-components new <slug>Adding a component touches a dozen files whose shape is entirely derivable from
the slug. The generator writes those and appends to the mechanical lists (registry
item, demos registry, docs sidebar, CLI help, README inventory table).
It then prints the decisions it refuses to guess: where the component ranks in
the curated catalog order, its
dbNameabbreviation (checked for uniquenessagainst every existing block), the Content model prose, the demo copy. Catalog
order is ranked, not chronological — auto-appending would quietly degrade it.
Third-party registries —
add @scope/nameDocumented in
content/docs/registry.mdxsince forever, never implemented. Thepinned shadcn supports it natively.
The boundary is explicit and enforced: files only, https only, no Payload
wiring, no install state, and
--demo/--localizedrejected — a third-partyitem has no manifest, so there is no contract to record or manage.
add-template --demoOne draft Page per page of a concept, reusing
writeSeedScriptunchanged.The blocker: the ownership record was keyed to the first manifest, and every
shipped template starts three to five of its pages with the same block — so all
of those pages would have claimed the same private record. Ownership identity is
now an optional, explicit part of
SeedTargetthat defaults to the old behavior,leaving all 27 pinned seed tests untouched. Two new runtime tests run generated
template scripts against the existing
payloadstub and prove two pages sharing afirst block stay fully independent.
Seeded blocks carry each block's own sample content, not the curated preview copy
— that lives in site-only demo data, not Payload field shape. It lands as a draft
for exactly that reason.
Two bugs found while mapping the authoring surface
hero-auroraandhero-kineticwere missing from the docs sidebar. 67 docpages, 65 entries. The meta check only ran one direction; it now runs both.
(
componentsIntro,componentFamilies.countLabel,about/page.tsx,not-found.tsx) that have since become derived, and omitted the README tableand the count pins that are still hand-maintained.
Verification
lint·format:check·tsc·test:registrytest:inttest:e2e(production mode)Two committed blog figures changed:
tools/blog/visual-system/catalog.tsexcerptsdoctorCommandby anchor, so the refactor requiredpnpm blog:visuals:figures.🤖 Generated with Claude Code