Skip to content

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

Merged
Ducksss merged 1 commit into
devfrom
claude/cli-authoring-batch
Aug 9, 2026
Merged

Ducksss merged 1 commit into
devfrom
claude/cli-authoring-batch

Conversation

@Ducksss

@Ducksss Ducksss commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Supersedes #445, which GitHub auto-closed when its base branch was deleted on the #442 merge. Same commit, rebased onto dev.

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:56
@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 1:01pm
payload-components-97bf Ready Ready Preview Aug 9, 2026 1:01pm

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

Too many files!

This PR contains 101 files, which is 1 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 642d861e-ee27-47fc-9a91-76ed23c07855

📥 Commits

Reviewing files that changed from the base of the PR and between 2f80da7 and 3d5208a.

⛔ Files ignored due to path filters (2)
  • public/blog/payload-block-not-rendering/figure-01-debug-tree.svg is excluded by !**/*.svg
  • public/blog/payload-components-doctor/figure-01-doctor-report.svg is excluded by !**/*.svg
📒 Files selected for processing (101)
  • AGENTS.md
  • README.md
  • content/docs/cli.mdx
  • content/docs/components/meta.json
  • payload-components/manifests/call-to-action-boxed.json
  • payload-components/manifests/call-to-action-centered.json
  • payload-components/manifests/call-to-action-signup.json
  • payload-components/manifests/comparator-grid.json
  • payload-components/manifests/comparator-stack.json
  • payload-components/manifests/comparator-table.json
  • payload-components/manifests/contact-routing-form.json
  • payload-components/manifests/content-columns.json
  • payload-components/manifests/content-community.json
  • payload-components/manifests/content-feature-media.json
  • payload-components/manifests/content-feature-split.json
  • payload-components/manifests/content-image-frame.json
  • payload-components/manifests/content-image-lead.json
  • payload-components/manifests/content-list-columns.json
  • payload-components/manifests/content-list-icons.json
  • payload-components/manifests/content-list.json
  • payload-components/manifests/content-quote.json
  • payload-components/manifests/content-rows.json
  • payload-components/manifests/content-showcase.json
  • payload-components/manifests/content-split-rows.json
  • payload-components/manifests/content-stats.json
  • payload-components/manifests/embed-basic.json
  • payload-components/manifests/faq-accordion.json
  • payload-components/manifests/faq-card.json
  • payload-components/manifests/faq-grid.json
  • payload-components/manifests/faq-grouped.json
  • payload-components/manifests/faq-icons.json
  • payload-components/manifests/faq-split.json
  • payload-components/manifests/feature-accordion.json
  • payload-components/manifests/feature-bento.json
  • payload-components/manifests/feature-cards-media.json
  • payload-components/manifests/feature-grid-basic.json
  • payload-components/manifests/feature-icon-grid.json
  • payload-components/manifests/feature-split.json
  • payload-components/manifests/feature-steps.json
  • payload-components/manifests/hero-aurora.json
  • payload-components/manifests/hero-basic.json
  • payload-components/manifests/hero-kinetic.json
  • payload-components/manifests/hero-product-tilt.json
  • payload-components/manifests/hero-video.json
  • payload-components/manifests/integration-cluster.json
  • payload-components/manifests/integration-connect.json
  • payload-components/manifests/integration-grid.json
  • payload-components/manifests/integration-list.json
  • payload-components/manifests/integration-marquee.json
  • payload-components/manifests/integration-orbit.json
  • payload-components/manifests/integration-split.json
  • payload-components/manifests/integration-testimonial.json
  • payload-components/manifests/logo-cloud-grid.json
  • payload-components/manifests/logo-cloud-hover.json
  • payload-components/manifests/logo-cloud-inline-wrap.json
  • payload-components/manifests/logo-cloud-inline.json
  • payload-components/manifests/logo-cloud-marquee.json
  • payload-components/manifests/pricing-cards-cta.json
  • payload-components/manifests/pricing-cards-muted.json
  • payload-components/manifests/pricing-cards.json
  • payload-components/manifests/pricing-enterprise.json
  • payload-components/manifests/pricing-split.json
  • payload-components/manifests/stats-proof.json
  • payload-components/manifests/team-grid.json
  • payload-components/manifests/team-roster.json
  • payload-components/manifests/testimonials-bento.json
  • payload-components/manifests/testimonials-grid.json
  • payload-components/manifests/testimonials-quote.json
  • payload-components/manifests/testimonials-rating.json
  • payload-components/manifests/testimonials-spotlight.json
  • payload-components/manifests/testimonials-wall.json
  • payload-components/schema/poc-manifest.schema.json
  • payload-components/templates/component-template/README.md
  • src/app/docs/[[...slug]]/page.tsx
  • src/components/site/ComponentDocHeader.tsx
  • tests/int/fumadocs-site.int.spec.ts
  • tests/int/payload-components-cli.int.spec.ts
  • tests/int/payload-components-doctor-command.int.spec.ts
  • tests/int/payload-components-doctor-orchestration.int.spec.ts
  • tests/int/payload-components-fixture.ts
  • tests/int/payload-components-manifest.int.spec.ts
  • tests/int/payload-components-namespaced.int.spec.ts
  • tests/int/payload-components-new-command.int.spec.ts
  • tests/int/payload-components-seed-runtime.int.spec.ts
  • tests/int/payload-components-template-seed.int.spec.ts
  • tests/int/payload-components-update-command.int.spec.ts
  • tools/payload-components/cli.ts
  • tools/payload-components/commands/add-template.ts
  • tools/payload-components/commands/add.ts
  • tools/payload-components/commands/diff.ts
  • tools/payload-components/commands/doctor.ts
  • tools/payload-components/commands/list.ts
  • tools/payload-components/commands/new.ts
  • tools/payload-components/commands/seed.ts
  • tools/payload-components/commands/update.ts
  • tools/payload-components/inventory.ts
  • tools/payload-components/manifest.ts
  • tools/payload-components/namespaced.ts
  • tools/payload-components/seed/seed-script.ts
  • tools/payload-components/seed/template-seed.ts
  • tools/payload-components/types.ts

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


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 merged commit 19bcbb4 into dev Aug 9, 2026
12 checks passed
@Ducksss
Ducksss deleted the claude/cli-authoring-batch branch August 9, 2026 13:59
Ducksss added a commit that referenced this pull request Aug 9, 2026
#443 caught something this branch missed. postcss is declared TWICE —
as a direct devDependency and as a pnpm override — and the original
commit only moved the override.

Dependabot raised GHSA-fxqj-rqcc-2cmp against both manifest paths for
exactly that reason: one alert on pnpm-lock.yaml (the resolution) and a
second on package.json (the declared devDependency range). The override
already forced the tree to 8.5.23, so nothing was actually resolving
vulnerable — but the declaration was still an exact pin on 8.5.18, and
the package.json alert tracks the declaration.

Also merges origin/dev, which has moved to 1.3.0 (#442, #447, #448,
#449) since this branch was cut.

Verified against current dev: lint, format:check, source:build,
tsc --noEmit, test:registry all clean, and 505 int tests passing.
pnpm install --frozen-lockfile passes, so the lockfile and manifest
agree the way CI checks them.

Co-Authored-By: Claude Opus 5 <[email protected]>
Ducksss added a commit that referenced this pull request Aug 9, 2026
…ble pins (#444)

* security(deps): unstick the js-yaml and postcss overrides off vulnerable pins

Both pins had gone stale the same way fast-uri did in #441: the override
version that was patched when it was written now sits inside the
advisory's widened range, so the pin was holding the tree ON a known
vulnerable version rather than off one.

  js-yaml   pin 4.3.0   GHSA-5p4m-2wfm-xmqj (high)   >= 4.0.0, < 4.3.1
  postcss   pin 8.5.18  GHSA-fxqj-rqcc-2cmp (medium) <= 8.5.22

Bumps js-yaml to 4.3.1 and postcss to 8.5.23, and widens the js-yaml
range key from <4.3.0 to <4.3.1 so the override still covers everything
the advisory does.

Both surfaced on main the moment #437 promoted, because Dependabot only
reports against the default branch. They will not close until this
reaches main in turn.

Verified: lint, format:check, source:build, tsc --noEmit clean, and
381 int tests passing.

Co-Authored-By: Claude Opus 5 <[email protected]>

* security(deps): bump the postcss devDependency alongside the override

#443 caught something this branch missed. postcss is declared TWICE —
as a direct devDependency and as a pnpm override — and the original
commit only moved the override.

Dependabot raised GHSA-fxqj-rqcc-2cmp against both manifest paths for
exactly that reason: one alert on pnpm-lock.yaml (the resolution) and a
second on package.json (the declared devDependency range). The override
already forced the tree to 8.5.23, so nothing was actually resolving
vulnerable — but the declaration was still an exact pin on 8.5.18, and
the package.json alert tracks the declaration.

Also merges origin/dev, which has moved to 1.3.0 (#442, #447, #448,
#449) since this branch was cut.

Verified against current dev: lint, format:check, source:build,
tsc --noEmit, test:registry all clean, and 505 int tests passing.
pnpm install --frozen-lockfile passes, so the lockfile and manifest
agree the way CI checks them.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>

This branch was successfully deployed

2 active deployments
Preview – payload-components-97bf — 3d5208ac Deployed Aug 9, 2026 by vercel[bot]
Preview – payload-components — 3d5208ac 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