Skip to content

feat(cli): doctor --json, changelogs, a scaffolder, third-party registries, and template seeding - #445

Closed
Ducksss wants to merge 1 commit into
claude/cli-lifecycle-featuresfrom
claude/cli-authoring-batch
Closed

Ducksss wants to merge 1 commit into
claude/cli-lifecycle-featuresfrom
claude/cli-authoring-batch

Conversation

@Ducksss

@Ducksss Ducksss commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Five features stacked on #442, each closing a gap that PR's work opened or exposed.

doctor --json + distinct exit codes (#19)

list and diff gained --json in #442; doctor did not, so the install story
still 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 doctorCommand by anchor.

Every finding carries a scope (project, scripts, state, or a component
name) so CI can group without parsing prose, and the exit code separates the two
failures that need different responses:

Code Meaning
0 healthy
1 the project is fine, but a recorded install has drifted
2 the project itself cannot accept installs

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 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 breaking entry must
declare its dataMigration — otherwise update could refuse an upgrade without
being able to explain why.

  • diff prints the entries an upgrade would apply, plus any migration.
  • 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" — different decisions, different flags.

Seeded from real history, not invented: stats-proof and content-quote were
already at 0.2.0 from the logoLabel change in #360. A component's newest entry
also 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 dbName abbreviation (checked for uniqueness
against 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/name

Documented in content/docs/registry.mdx since forever, never implemented. The
pinned shadcn supports it natively.

The boundary is explicit and enforced: files only, https only, no Payload
wiring, no install state
, and --demo / --localized rejected — a third-party
item has no manifest, so there is no contract to record or manage.

add-template --demo

One draft Page per page of a concept, reusing writeSeedScript unchanged.

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 SeedTarget that defaults to the old behavior,
leaving all 27 pinned seed tests untouched. Two new runtime tests run generated
template scripts against the existing payload stub and prove two pages sharing a
first 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-aurora and hero-kinetic were missing from the docs sidebar. 67 doc
    pages, 65 entries. The meta check only ran one direction; it now runs both.
  • The component-template README was stale — it named four files
    (componentsIntro, componentFamilies.countLabel, about/page.tsx,
    not-found.tsx) that have since become derived, and omitted the README table
    and the count pins that are still hand-maintained.

Verification

Step Result
lint · format:check · tsc · test:registry 0
test:int 498 passed, 1 skipped (+41)
test:e2e (production mode) 397 passed, all 5 batches

Two committed blog figures changed: tools/blog/visual-system/catalog.ts excerpts
doctorCommand by anchor, so the refactor required pnpm blog:visuals:figures.

🤖 Generated with Claude Code

…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]>
Copilot AI lite review requested due to automatic review settings August 9, 2026 12:05
@vercel

vercel Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
payload-components Ready Ready Preview Aug 9, 2026 12:08pm
payload-components-97bf Ready Ready Preview Aug 9, 2026 12:08pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • dev

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: feb27f4f-9d8d-44bc-9392-aa1f57d3faac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ducksss

Ducksss commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #447 — GitHub auto-closed this when the #442 merge deleted its base branch. Same commit, rebased onto dev.

This branch was successfully deployed

2 active deployments
Preview – payload-components — e87fc2b2 Deployed Aug 9, 2026 by vercel[bot]
Preview – payload-components-97bf — e87fc2b2 Deployed Aug 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants