Repository navigation
fix(cli): recommend --skeleton in the build kit payload, not just the prose - #6255
Merged
Merged
Conversation
… prose `build` decides whether the closest page template is a direct match, and on a loose match it already tells a human to read the layout rather than scaffold it: RECOMMENDED START prints `template <name> --skeleton` and the PAGE TEMPLATES heading reads "use as a layout reference". The page entries in the payload did not agree. Their `command` was always `template <name>` — the scaffold — whatever `directMatch` said. Prose is what a human weighs; `command` is what a program reads, so the two audiences were handed opposite advice from the same kit. It matters most for the caller least able to notice. `template <name>` emits the whole page, and an agent given a full template it did not quite ask for will adapt it anyway, which is how a request for one screen comes back as a competent version of another. `--skeleton` offers the layout without the invitation. The kit now appends `--skeleton` to its page commands when `directMatch` is false. This is not CLI prefixing — the invocation is still the renderer's job, and the payload stays package-manager-agnostic. It also makes the rendered PAGE TEMPLATES records agree with the heading above them.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
PR Analysis Report
No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
ernestt
marked this pull request as ready for review
September 11, 2026 19:52
ernestt
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 11, 2026 19:52
Contributor
|
Let's try it! Maybe also an option for build to force it eitehr way incase someone wants to bypass. Maybe something like --recommend-skelton=auto|true|false or something? that has guides in the --help menu and we default to auto which this PR is. wdyt? |
josephfarina
approved these changes
Sep 11, 2026
4 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
buildalready decides whether the closest page template is a confident direct match, and on a loose match it tells a human to read the layout rather than scaffold it:The page entries in the payload did not agree with any of that. Their
commandwas always the scaffold command, whateverdirectMatchsaid:So the recommendation and the records under it disagreed, in the same output. Prose is what a human weighs;
commandis what a program reads.This is reachable often, not a corner: of 30 common one-word queries (
inbox,metrics,billing,alerts,queue,timeline, …), 14 land on a loose match with pages, because single-concept queries have no coverage requirement to fail.Why it matters more for agent callers
template <name>emits the whole page. An agent handed a full template it did not quite ask for will adapt it anyway — that is the cheapest thing to do with it — which is how a request for one screen comes back as a competent version of another.--skeletongives the same layout without the invitation.A human reads the sentence above the record and can disregard the command. A JSON consumer has only the field.
The change
buildKitappends--skeletonto its page commands whendirectMatchis false.This is not CLI prefixing: the invocation is still applied by the renderer through
formatCliCommand, and the payload stays package-manager-agnostic. Entries are copied rather than mutated, since they belong tosearch().It also fixes the rendered output, where the PAGE TEMPLATES records now agree with the heading above them.
After
Test plan
Three tests added to
packages/cli/api/build/build.test.mjs:notifications) recommends--skeletonon every page entry;contact form) recommends none;pnpm lint:strict— 0 errors (84 pre-existingno-raw-colorwarnings inpackages/lab/Sankey, untouched here).Verified end to end against the built CLI for both the
--jsonand the human-rendered paths; the transcripts above are that output.