Repository navigation
Remove the experimental layout command - #6615
Conversation
The layout command (expand/check/grammar) was experimental and is unused. Remove the command, its api/layout subject, CommandDocs, response types, tests and its README/manifest entries. The XLE engine it wrapped stays: it is published as @astryxdesign/cli/xle and used by the sandbox. The ERR_LAYOUT_PARSE and ERR_LAYOUT_INVALID codes stay registered — a shipped error code is never removed (architecture:cli-surface INV3).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
|
The four landed-but-unreleased [fix] changesets for `astryx layout ...` would otherwise put four fixes to the command in the same release that removes it. Also clears five places that named the command in passing: the handler lists in api/template/template.mjs and foundation/discovery/template-adapter.mjs, the path-confinement parity note in api/upgrade/run/run.mjs, and "command groups like `theme` / `layout`" in the CommandDoc schema and its type.
There was a problem hiding this comment.
Thanks for the thorough removal — the scope is clean and the classification is right. Removing astryx layout and its API functions is a breaking change, and the changeset treats it as one (minor bump on 0.x), names what is gone, is plain that there is no replacement and no codemod, and points programmatic callers at the still-public @astryxdesign/cli/xle. Keeping the XLE engine and keeping ERR_LAYOUT_PARSE / ERR_LAYOUT_INVALID registered are both the right calls, as is deleting the four unreleased changesets that only described fixes to this command and re-homing the generic tests layout used to carry.
Approval is waiting on a maintainer decision, for two things this PR deliberately leaves open:
- The governing spec for CLI command admission still lists the
layouthandler in its current-state inventory. That record is now stale, so a maintainer needs to update the existing spec for this intentional change (or identify the authority that lets the code land ahead of the update) before this can be approved on spec grounds. experimental.xle.componentsneeds a maintainer decision. Its only reader is removed here, so after this PR the key is still accepted — and the README and config reference still describe it as registering custom components for the layout expander — while it silently does nothing. Please have a maintainer settle whether it is retained as explicitly inert/deprecated, or removed with its own migration. Either way, the README row, the config reference and the changeset wording ("still an accepted config key") should say plainly that it has no effect, rather than describing it as functional.
One smaller item to fix before these changesets ship together: a few other unreleased changesets still describe layout behaviour in the present tense (exit codes for a bare astryx layout, the astryx layout --json error envelope, the layout expand help/fixture text). If they release alongside this removal they will read as current facts about a command that no longer exists, so the layout clauses should be edited out of those files (their other release notes are genuine and should stay).
Everything else I checked held up: no live references to the removed functions remain outside changelog history, the generated README delta is only the expected rows, and the design-system Layout component, the astryx docs layout guide and past changelog entries are correctly untouched.
[Automated review]
Its only reader was the layout command. Calling it "still an accepted config key" was true but read as functional; the changeset now says the key is inert and that its fate is undecided.
#6498 added a `namespace` field to the seven layout .doc.mjs files this branch deletes; delete wins, the command is going. It also added three doc-graph artifacts that enumerate the command: doc-routes.json (7 cli#commands-layout* / cli#api-layout-* rows), doc-routes.ids.json (4 command + 3 function ids) and the doc-loads expectation for clients/cli/commands/layout.mjs. All removed. The `astryx docs layout` guide topic and its five sections stay, as do the Layout component and block ids -- those are the design system, not the command.
There was a problem hiding this comment.
Thanks for the thorough removal - the scope is clean and the classification is right. Removing astryx layout and its API functions is a breaking change, and the changeset treats it as one (minor bump on 0.x), names what is gone, is plain that there is no replacement and no codemod, and points programmatic callers at the still-public @astryxdesign/cli/xle. Keeping the XLE engine and keeping ERR_LAYOUT_PARSE / ERR_LAYOUT_INVALID registered are both the right calls, as is deleting the four unreleased changesets that only described fixes to this command and re-homing the generic tests layout used to carry.
Approval is waiting on a maintainer decision, for two things this PR deliberately leaves open:
- The governing spec for CLI command admission still lists the
layouthandler in its current-state inventory. That record is now stale, so a maintainer needs to update the existing spec for this intentional change (or identify the authority that lets the code land ahead of the update) before this can be approved on spec grounds. experimental.xle.componentsneeds a maintainer decision. Its only reader is removed here, so after this PR the key is still accepted - and the README and config reference still describe it as registering custom components for the layout expander - while it silently does nothing. The changeset now says plainly that it has no effect, which helps; please have a maintainer settle whether it is retained as explicitly inert/deprecated, or removed with its own migration, and make the README row and config reference match that decision.
One smaller item to fix before these changesets ship together: a few other unreleased changesets still describe layout behaviour in the present tense (exit codes for a bare astryx layout, the astryx layout --json error envelope, the layout expand help/fixture text). If they release alongside this removal they will read as current facts about a command that no longer exists, so the layout clauses should be edited out of those files (their other release notes are genuine and should stay).
Everything else checked held up: no live references to the removed functions remain outside changelog history, the generated README delta is only the expected rows, and the design-system Layout component, the astryx docs layout guide and past changelog entries are correctly untouched.
[Automated review]
doc-routes.test.mjs (b) checks each group row's count against the ids file. Removing 4 command ids and 3 function ids leaves command at 30 and function at 38.
There was a problem hiding this comment.
Thanks for the thorough removal — the scope is clean and the classification is right. Removing astryx layout and its API functions is a breaking change, and the changeset treats it as one (minor bump on 0.x), names what is gone, is plain that there is no replacement and no codemod, and points programmatic callers at the still-public @astryxdesign/cli/xle. Keeping the XLE engine and keeping ERR_LAYOUT_PARSE / ERR_LAYOUT_INVALID registered are both the right calls, as is deleting the four unreleased changesets that only described fixes to this command and re-homing the generic tests layout used to carry.
Approval is waiting on a maintainer decision, for two things this PR deliberately leaves open:
- The governing spec for CLI command admission still lists the
layouthandler in its current-state inventory: "the component, discover, layout, search, template, and theme handlers read project state or files themselves (FR1)". That record is now stale, so a maintainer needs to update the existing spec for this intentional change (or identify the authority that lets the code land ahead of the update) before this can be approved on spec grounds. experimental.xle.componentsneeds a maintainer decision. Its only reader is removed here, so after this PR the key is still accepted — and the README and config reference still describe it as registering custom components for the layout expander — while it silently does nothing. The governing claim is: "Every configuration key is permanent public surface under FR3 and FR14, and it asks every consumer to make a decision." The changeset now says plainly "it now has no effect" and "Whether the key is kept as explicitly inert or removed with its own migration is not settled here", which helps; please have a maintainer settle whether it is retained as explicitly inert/deprecated, or removed with its own migration, and make the README row and config reference match that decision.
One smaller item to fix before these changesets ship together: a few other unreleased changesets still describe layout behaviour in the present tense (exit codes for a bare astryx layout, the astryx layout --json error envelope, the layout expand help/fixture text). If they release alongside this removal they will read as current facts about a command that no longer exists, so the layout clauses should be edited out of those files (their other release notes are genuine and should stay).
Everything else checked held up: no live references to the removed functions remain outside changelog history, the generated README delta is only the expected rows, and the design-system Layout component, the astryx docs layout guide and past changelog entries are correctly untouched.
[Automated review]
Main gained new uses of the layout command since this branch (a template replacement test that expanded through layout, three text/JSON parity cases), so those go with the command. Also: - experimental.xle.components stays accepted so existing configs keep loading, and the config type, config reference, README and changeset now say it has no effect. - AST-042's inventory no longer lists the layout handler, and its command counts drop to 16 top-level commands and 25 commands that name a function. - The layout clauses come out of four unreleased changesets that described other commands, so the release notes do not describe a removed command. - doc-routes counts and the docs-graph floor follow the removed docs.
There was a problem hiding this comment.
Thanks for settling the open items from the last rounds — this revision addresses each one, and the removal checks out.
Removing astryx layout and its API functions is a breaking change, and it is treated as one: [breaking] changeset with a minor bump, a plain statement that there is no replacement and no codemod, template/component scaffolding as the alternative, and the still-public @astryxdesign/cli/xle (checkExpression/expandExpression) for programmatic callers. Keeping the engine barrel and keeping ERR_LAYOUT_PARSE/ERR_LAYOUT_INVALID registered are the right calls.
What is settled in this revision:
experimental.xle.componentsis now documented consistently as having no effect — in the changeset, the README, the config reference and the config type — while staying accepted so existing configs keep loading, with guidance to delete it.- The CLI command-admission record's inventory is updated alongside the code it describes (command and function-doc counts, layout handler removed); approval here rests on the current normative claims, not on that proposed text.
- The generic tests the layout command used to carry keep their coverage on surviving commands, and the release notes that have since shipped are no longer part of this change.
Static verification at this revision found no live references to the removed command or functions outside changelog history, the retained engine export and its sandbox consumer are untouched, and the remote checks for this revision corroborate the reported test results. Approval is recommended; the remaining owner-approval check is the normal maintainer merge gate.
[Automated review]
Main's #6867 changed the generated README tables, so this takes main's README; the tables are regenerated in the next commit. The CLI blog post told readers that `astryx layout` sketches a page from an expression, and `astryx blog` serves that post to agents from the published feed, so the sentence goes with the command.
|
/approve-spec 2f89ae3 |
#6615 removes the layout command, so the case asserting that `layout expand ''` keeps ERR_MISSING_ARGUMENT would fail with ERR_UNKNOWN_COMMAND once both land. The changeset and the helper's comment no longer name layout either, so the release notes do not describe a removed command. The rule they state for a positional with other sources (--file, stdin) stays.
There was a problem hiding this comment.
Thanks for the thorough removal — the scope is clean and the classification is right. Removing astryx layout and its API functions is a breaking change, and it is treated as one: [breaking] changeset with a minor bump, a plain statement that there is no replacement and no codemod, template/component scaffolding as the alternative, and the still-public @astryxdesign/cli/xle (checkExpression/expandExpression) for programmatic callers. Keeping the engine barrel and keeping ERR_LAYOUT_PARSE/ERR_LAYOUT_INVALID registered are the right calls, and the generic tests the layout command used to carry keep their coverage on surviving commands.
One correction is needed before this is ready: the README's config table still describes experimental.xle.components as "Register app-local components so layout (XLE) expressions can reference them by name", but its only reader is removed here, so the key now has no effect. The changeset, the config reference and the config type all say that plainly — please bring the README row in line with them (retained so existing configs keep loading, no effect, delete it), so every consumer surface agrees.
Everything else I checked held up: no live references to the removed command or functions remain outside changelog history, the retained engine export and its sandbox consumer are untouched, and the design-system Layout component, the astryx docs layout guide and past changelog entries are correctly untouched.
[Automated review]
…nents has no effect Taking main's README to resolve the table conflict brought back the old row. The config table is written by hand, not generated, so regenerating did not restore it. It now matches the config type, the config reference and the changeset.
|
/approve-spec 0e42b73 |
There was a problem hiding this comment.
Thanks for the thorough removal — the scope is clean and the classification is right. Removing astryx layout and its API functions is a breaking change, and it is treated as one: [breaking] changeset with a minor bump, a plain statement that there is no replacement and no codemod, template/component scaffolding as the alternative, and the still-public @astryxdesign/cli/xle (checkExpression/expandExpression) for programmatic callers. Keeping the engine barrel and keeping ERR_LAYOUT_PARSE/ERR_LAYOUT_INVALID registered are the right calls, and the generic tests the layout command used to carry keep their coverage on surviving commands.
The remaining items from earlier rounds are settled in this revision: experimental.xle.components is now documented consistently as having no effect — in the changeset, the README config table, the config reference and the config type — while staying accepted so existing configs keep loading, with guidance to delete it; and the CLI command-admission record's inventory is updated alongside the code it describes. Static verification found no live references to the removed command or functions outside changelog history, the retained engine export and its sandbox consumer are untouched, and the design-system Layout component, the astryx docs layout guide and past changelog entries are correctly untouched.
Approval is recommended; the remaining owner-approval check is the normal maintainer merge gate.
[Automated review]
…out half Review fix. The count was the drop in '/template-assets/' substrings, so one reference whose query held a second fixture path counted twice. The count now comes from the replacement pass itself (replaceDemoMedia in the template adapter, the same code as #6870, so the two PRs merge cleanly), one per replaced reference. copy.mjs uses it instead of its own helper. The layout half is gone: #6615 removes the layout command, so layout expand no longer gets a receipt field, and the changeset names template only.
Take main's removal of the experimental layout command; keep integration-docs test deletions; regenerate README. (reference-blocks + doctor link fixes from prior commits included.) Co-authored-by: Cursor <[email protected]>
- buildKit searched limit=60 across all domains; the search titles-tier
floods multi-word queries with doc matches, burying page templates past
the cutoff (build.test 'news feed' -> 0 pages). Search wider for
candidates, cap the surfaced kit to the caller's limit.
- add-a-topic linked {@link generic:themes}, but themes is a namespace now
(doctor one-route-per-doc failure). Use namespace:themes.
- Remove leftover api/layout generated declarations after main's #6615.
Co-authored-by: Cursor <[email protected]>
- buildKit searched limit=60 across all domains; the search titles-tier
floods multi-word queries with doc matches, burying page templates past
the cutoff (build.test 'news feed' -> 0 pages). Search wider for
candidates, cap the surfaced kit to the caller's limit.
- add-a-topic linked {@link generic:themes}, but themes is a namespace now
(doctor one-route-per-doc failure). Use namespace:themes.
- Remove leftover api/layout generated declarations after main's #6615.
Co-authored-by: Cursor <[email protected]>
…ion verify` (#6737) * cli docs: integration guides, a last pass on every doc, and integration verify * Audit fixes: old command spelling, search without Core, retitled sections, guide corrections * Second audit round: build and search ranking, codemod guides, task titles, older-CLI facts * Round 3: stable-CLI wording, doctor unknown subcommands, rename and version drift tests * feat(cli): let doc sections include canonical docs * Restore the integration guide work lost on Sep 29: Make a package, Components, and Templates Reconstructed on 2026-09-30 by replaying the recorded edits from the lost work tree onto this branch. The rendered Templates routes match review draft V16 byte for byte. Also merges current main, which now includes #6768. * fix(cli): dedupe sameWord in search, drop duplicated single-component section, regenerate README tables Co-authored-by: Cursor <[email protected]> * wip(cli-docs): restructure cli/integrations into phases; add namespace intros; make-a-package -> Quick Start Co-authored-by: Cursor <[email protected]> * refactor(cli-docs): rename contribute namespace -> Building Blocks Co-authored-by: Cursor <[email protected]> * docs(cli): add Building Blocks intro (what you can add, mix freely) Co-authored-by: Cursor <[email protected]> * docs(cli): group Building Blocks into Types and Configuration Co-authored-by: Cursor <[email protected]> * docs(cli): make Configuration its own namespace under Building Blocks (types stay top-level) Co-authored-by: Cursor <[email protected]> * fix(cli-docs): re-point grade-template-with-agent example routes under building-blocks/templates Co-authored-by: Cursor <[email protected]> * docs(cli): replace banned word 'tarball' with '.tgz file' / packed package (keep quoted CLI error) Co-authored-by: Cursor <[email protected]> * docs(cli): flatten components (drop single-item Advanced group) Co-authored-by: Cursor <[email protected]> * docs(cli): inline overview into describe-the-component, retire overview page, drop 'consumers' Co-authored-by: Cursor <[email protected]> * test(cli): migrate doc test expectations to the restructured tree (tree, docs); move devDependency note to quick-start Co-authored-by: Cursor <[email protected]> * docs(cli): single-component — one ComponentDoc orientation link up front; drop per-section field embeds (lighter usage/props/examples) Co-authored-by: Cursor <[email protected]> * docs(cli): document ComponentDoc `replaces` as a first-class field - Declare `replaces` on ComponentBaseDoc (type), ComponentBaseSchema (validation), and component.doc.mjs (schema doc) so it is a documented contract, not a passthrough-only field. - Fixes the broken `reference` embed in replace-a-core-component (the guide embedded fields:['replaces'] but the schema never declared it) — also clears a real-tree reference-gap failure in reference-blocks.test. - replace-a-core-component: drop banned word 'autolink' -> 'the automatic pick'. Co-authored-by: Cursor <[email protected]> * docs(cli): start-a-template — lead with the component-vs-template distinction, drop re-definition that echoed the templates landing summary Co-authored-by: Cursor <[email protected]> * docs(cli): replace-a-core-template — drop banned words (autolink -> picked automatically / configured explicitly; 'fails closed' -> 'is safe by default') templates.test asserted 'fails closed' (enforcing a banned word); updated to 'is safe by default' to match. Co-authored-by: Cursor <[email protected]> * test(cli): drop brittle templates.test content-assertion (exact-string doc coupling fights editing; re-add non-brittle coverage at the end) Co-authored-by: Cursor <[email protected]> * test(cli): remove the integration-docs test suite (content/route-coupled) These assert exact doc prose, routes, and tree structure, so they break on every wording tweak or restructure during this authoring pass. Removing them per the 'explore now, add non-brittle tests at the end' plan. Kept reference-blocks.test (fixture-based embed mechanism, not coupled to our content). Co-authored-by: Cursor <[email protected]> * docs(cli): inline template-assets-overview into the Assets namespace intro; retire the separate page (owner-table orientation now opens the namespace, 4 asset guides remain as children) Co-authored-by: Cursor <[email protected]> * docs(cli): restructure templates Quality into a 'How to write good templates' namespace - New write-good-templates namespace: the dissolved template-quality overview (what good means + the review loop) is now its intro; children are the rubric and grade-with-agent. - Moved the TEMPLATE_RUBRIC source-of-truth into template-grading-rubric (its owner) and gave the rubric the score overview (grade bands + version). - Reparented template-grading-rubric and grade-template-with-agent under write-good-templates; repointed grade-with-agent's import + prompt routes and test-template-in-app's link. Retired template-quality. Co-authored-by: Cursor <[email protected]> * docs(cli): expand themes into a namespace Convert the single themes guide into a Themes namespace with an intro and 7 guides: add-a-theme, generate-a-palette, define-the-theme, ship-fonts-and-assets, use-a-theme-in-an-app, document-the-theme, themes-on-older-clis. New content from real theme-integration reviews: fonts/keyframes do not travel with 'theme add' (export ./fonts.css, ship the files, import once, not the root); light-dark() is colors-only; never set Core --_* private vars; document a theme by extending the core 'theme' topic (not agentDocs). Co-authored-by: Cursor <[email protected]> * docs(cli): rewrite themes to install-and-apply + extends (not copy) An integration theme is the same shape as a standalone theme package: apps install the package, apply it with <Theme>, and customize with extends. No copy. - add-a-theme: scaffold blank, or --from to fork an existing theme as a start - define-the-theme: add 'build on another theme' with extends - use-a-theme-in-an-app: install + apply + extend, point to the core theme docs - document-the-theme: extend the core theme topic (no copy/fonts step) - remove ship-fonts-and-assets (a copy-only problem) Matches delegated task T291109887 (agentcloud implementing the CLI to match). Co-authored-by: Cursor <[email protected]> * docs(cli): drop themes-on-older-clis guide Transitional edge case — themes are new in 0.7, so there is no installed base of theme-consuming apps on older CLIs. The durable action (declare the optional @astryxdesign/cli peer) already lives in add-a-theme/define-the-theme, and versioning owns compatibility. Co-authored-by: Cursor <[email protected]> * docs(cli): themes — add fonts-and-assets guide (designer learnings) Ship a theme's fonts and keyframes so they load when an app installs + applies it: every weight/style, unicode-range, font-display: swap, license, ship the files; keyframes + sideEffects; and verify in the browser (italic face resolves, no system fallback, animations run, contrast holds). Linked from the intro and use-a-theme-in-an-app. Co-authored-by: Cursor <[email protected]> * docs(cli): palette preview — 'ship in your package' not 'copy' (install model) Co-authored-by: Cursor <[email protected]> * docs(cli): rewrite generate-a-palette for first-time authors Explain what a palette is, why you generate it from seeds, and how; drop the confusing 'palette request' term for 'palette config' (matches the palette.config.json file). Co-authored-by: Cursor <[email protected]> * docs(cli): define-the-theme — explain what a token is and why you map palette to tokens Co-authored-by: Cursor <[email protected]> * docs(cli): correct themes font model — theme names fonts, app loads them fonts-and-assets claimed the package ships font files and 'nothing extra in the app', the opposite of theme.template.ts: Astryx never loads a font file. Rewrite to name fonts in typography tokens and have the app load them (hosted link or self-host @font-face). Fix the same error that leaked into use-a-theme-in-an-app. Co-authored-by: Cursor <[email protected]> * docs(cli): document-the-theme — tell users which fonts to load (closes fonts loop) Co-authored-by: Cursor <[email protected]> * fix(cli): dedupe reference-problem loop in integration doc checks A merge left the packageReferenceProblems loop pasted twice in authoring-checks, so each un-includable reference block was reported twice (reference-blocks.test: expected 5, got 10). Remove the duplicate. Co-authored-by: Cursor <[email protected]> * fix(cli): restore build-kit page matches + fix themes doc link - buildKit searched limit=60 across all domains; the search titles-tier floods multi-word queries with doc matches, burying page templates past the cutoff (build.test 'news feed' -> 0 pages). Search wider for candidates, cap the surfaced kit to the caller's limit. - add-a-topic linked {@link generic:themes}, but themes is a namespace now (doctor one-route-per-doc failure). Use namespace:themes. - Remove leftover api/layout generated declarations after main's #6615. Co-authored-by: Cursor <[email protected]> * fix(cli): repoint score-ledger to grading-rubric; declare CLI peer in theme fixture - template-score-ledger imported the deleted template-quality.doc.mjs; the TEMPLATE_RUBRIC owner is template-grading-rubric.doc.mjs after the Quality restructure. - pack-check.lifecycle fixture ships a theme with no @astryxdesign/cli peer, which themes_need_cli (this PR) flags; declare the peer so the fixture is a valid theme package. Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Joey Farina <[email protected]> Co-authored-by: Cursor <[email protected]>
…6887) `astryx layout expand`, `astryx layout check` and `astryx layout grammar` shipped in published `@astryxdesign/[email protected]`, as ordinary registered top-level commands with documented examples, manifest entries, a `layout` docs topic, and the `layout.expand` / `layout.check` / `layout.grammar` response schemas. Four fixes to them (#6564, #6569, #6565, #6572) are in 0.6.4's changelog. They are a stable released CLI surface under `spec:AST-017` FR3. #6615 removed that surface in one step. `spec:AST-017` (authority: current) does not allow this yet: - FR28 requires a replacement-first deprecation patch and a public `DEP-*` record before a removal becomes eligible. There is none. - FR31 allows a removal only when its `DEP-*` and `CLN-*` ids appear in a frozen minor manifest. There is no such manifest. - FR37 requires an owner-approved public minor plan before freeze. There is no approved minor plan. - FR22 forbids retroactively demoting a released stable surface to experimental. `layout` was never behind an experimental boundary: FR27 requires a dedicated experimental namespace, and only the `experimental.xle.components` config key had one — the command did not. So this reverts #6615 and drops its `[breaking]` Changeset. Effect on the next release, measured with `changeset status`: - before: all ten fixed-group packages bump **minor** -> 0.7.0 - after: all ten bump **patch** -> 0.6.5 The ten manifests read 0.6.4, which is the published base; the target is derived from that base plus the highest pending bump. One `minor` Changeset in a `fixed` group moves all ten, which is why a single unplanned removal re-targeted the whole release. This is compatibility restoration, not new behavior. Nothing is invented and no deprecation metadata is added: `layout` returns to exactly its 0.6.4 shape, and its deprecation is left to be decided explicitly under AST-017. Because the removal was never published, main after this change is identical to 0.6.4 for consumers, so the restoration needs no Changeset of its own. The retained `@astryxdesign/cli/xle` barrel and the `experimental.xle.components` config key are untouched. Conflicts with later main commits were resolved toward main, not toward the revert: - `packages/cli/README.md` keeps main's rewritten descriptions and is regenerated, so the `layout` row and config row come from the restored docs. - `packages/cli/test/docs-graph.test.mjs` stays deleted; #6737 removed it for unrelated reasons. - `doc-routes.ids.json` keeps both `integration verify` (#6737) and the layout ids. Note for a follow-up: #6737 re-added the layout ids to `packages/cli/test/doc-routes.ids.json` while the command stayed deleted, so main currently claims four layout commands and three layout functions that do not exist. This change makes that file honest again. Test plan: - `npx vitest run --root . packages/cli` — 5314 passed, 0 failed - `pnpm check:repo` — passes, including `check:changesets` - `npx changeset status` — all ten packages at patch (0.6.5), none at minor - `astryx layout grammar|check|expand` run again from the built CLI - `astryx manifest --json` reports 17 top-level commands, matching the restored `spec:AST-042` text
#6887 restored the layout command, so the layout half this PR dropped for #6615 applies again: layout expand splices template blocks and replaces their demo media without saying so (AST-028 FR11). This restores it as it was before that drop, with one change: the count comes from replaceDemoMedia in the template adapter, the same pass template copy uses, so one reference counts once however many fixture paths its URL carries.
…#6567) * fix(cli): say when a template copy replaced demo media Copying a template swaps Astryx demo images and video for placeholders, but the receipt never said so. `template.copy` now reports `demoMediaReplaced`, and the text output names the file whose media the consumer has to supply. * fix(cli): say when layout expand replaced demo media Expanding a layout splices template blocks through the same demo media replacement as a template copy, but `layout.expand` never said so. It now reports `demoMediaReplaced` from the copy path's shared count, and the text output states it, as a trailing comment when the code is printed. * fix(cli): count each replaced demo media reference once; drop the layout half Review fix. The count was the drop in '/template-assets/' substrings, so one reference whose query held a second fixture path counted twice. The count now comes from the replacement pass itself (replaceDemoMedia in the template adapter, the same code as #6870, so the two PRs merge cleanly), one per replaced reference. copy.mjs uses it instead of its own helper. The layout half is gone: #6615 removes the layout command, so layout expand no longer gets a receipt field, and the changeset names template only. * docs(cli): regenerate the README tables on current main * fix(cli): layout expand says when it replaced demo media again #6887 restored the layout command, so the layout half this PR dropped for #6615 applies again: layout expand splices template blocks and replaces their demo media without saying so (AST-028 FR11). This restores it as it was before that drop, with one change: the count comes from replaceDemoMedia in the template adapter, the same pass template copy uses, so one reference counts once however many fixture paths its URL carries. * docs(cli): regenerate the README tables on current main --------- Co-authored-by: Joey Farina <[email protected]>
Removes the
astryx layoutcommand and everything that existed only to serve it. It was experimental in practice and is unused.The three subcommands were enumerated from the capability manifest (
clients/cli/lib/manifest.mjs) and cross-checked against the group'sCommandDoc.subcommands, not from the request:expand,check,grammar. There is no fourth.What is gone
clients/cli/commands/layout.mjs+ 4 CommandDocs (layout,layout-expand,layout-check,layout-grammar)api/layout/—_adapter.mjs,expand/,check/,grammar/, 3 FunctionDocs, the barrel,layout.type.mjslayoutExpand,layoutCheck,layoutGrammarand the layout types, from bothapi/index.mjsandapi/json/index.tsJSON_SUPPORTEDallowlist inclients/cli/index.mjs; response-type map and examples inlib/manifest.mjslayout.expand,layout.check,layout.grammarinresponse-types.doc.mjs[fix]changesets written only aboutastryx layout …(cli-spec-layout-expand-confine-file,-expand-text-keys,-repeat-cap,-stdin-cap). Without this, the next release ships a changelog advertising four fixes to a command the same release removes.github/scripts/cli-api-types-verify.mjsimportedlayoutExpand/layoutCheck/layoutGrammarby name from the packed tarball — the one break that would otherwise have surfaced only after landingGenerated artifacts were regenerated, never hand-edited:
pnpm -F @astryxdesign/cli readme(4 lines — 1 command row, 3 response-type rows);readme:checkpasses.foundation/xleis kept, deliberatelypackage.jsonexports the engine publicly as@astryxdesign/cli/xle("./xle"→foundation/xle/browser.mjs), independently of the command. Deleting it would have silently dropped a second public API, so it stays. Its only cross-package consumer, the sandbox'slayout-dslpage, importscheckExpression/expandExpressionfrom that barrel and is untouched.The dependency arrow only ever pointed one way —
api/layout→foundation/xle, never back — so nothing inxlebroke. Comments describing the engine relative to the command were reworded, and the banner the expander writes into generated TSX no longer names a command that does not exist (// Generated by the Astryx XLE expander — …).ERR_LAYOUT_PARSEandERR_LAYOUT_INVALIDare kept, deliberatelyBoth were thrown only by
api/layout, so by usage they would go. They stay becausearchitecture:cli-surfaceINV3 is explicit: "codeis stable and append-only. Once shipped, a code's meaning never changes and the code is never removed." The same record callsfoundation/response/error-codes.mjs"the frozen, append-only code set."Their descriptions stay accurate: both still describe what the retained
@astryxdesign/cli/xleengine reports about a layout expression. Removing them would change a current architecture record, which does not belong in a code PR.Breaking, with a migration
[breaking]changeset,minorbump perspec:AST-017FR7 (0.x). TheCommandDoccarried no experimental or WIP marker, so the published contract treatedlayoutas stable regardless of how it was used in practice.FR8 requires migration evidence. No codemod can rewrite a
layoutinvocation into another command, so the changeset gives concrete instructions rather than a vacuous codemod, and says plainly that there is no replacement:build/templatefor scaffolding, nothing at all forcheckandgrammar, and@astryxdesign/cli/xlefor programmatic callers.Every remaining
layouthit in the repo, triagedA repo-wide grep for
layoutreturns several hundred hits. Almost all are unrelated, and a delete-by-name would have broken working code.Kept — the design-system
Layoutcomponent and its family.packages/core/src/Layout/,FormLayout,ChatLayout,LayoutContent/Header/Footer/Panel, their docs, tests, stories, a11y baseline keys, shadcn registry routes,--layout-padding-*tokens,docs/families/layout-primitives.mdandlayout-regions.md,docs/architecture/container-padding.md.Kept —
packages/cli/assets/docs/layout.doc.mjsandlayout.doc.dense.mjs. The hit that most looks like it should go and must not.astryx docs layoutis the design-system layout guide (category: 'guide', a sibling of spacing/color/typography) about building an app layout outside-in. Neither file mentionsastryx layout, XLE, or XLO even once, andAGENTS.mdtells agents to readastryx docs layoutbefore writing any page.Kept — generic English. "layout skeleton" (
template --skeleton), "stop layout" (palette generation), "source/file/package layout",layout: 'inline'(a formatter option),layout_gap(a gap-report category),useIsomorphicLayoutEffect, CSSlayoutin the StyleX capability list, and'layout'inGLOBAL_REVIEW_TRIGGERS.Kept — history.
packages/cli/CHANGELOG.mdentries about pastlayoutreleases. Shipped history is not rewritten.Updated — prose naming the command in passing: handler lists in
api/template/template.mjsandfoundation/discovery/template-adapter.mjs, the path-confinement parity note inapi/upgrade/run/run.mjs, "command groups liketheme/layout" in theCommandDocschema and its type, the subcommand-doc example inscripts/check-cli-structure.mjs, and theERR_LAYOUT_PARSEnote infoundation/xle/parse.mjs.Updated — the doc-graph artifacts #6498 added, after merging it in. None of these would surface in a grep for the command's own files:
packages/cli/test/doc-routes.json— the 7cli#commands-layout*andcli#api-layout-*rows removed. Thelayouttopic row and its five section rows (layout#overview,#scaffold,#structure,#spacing,#breakpoints) stay — that is the design-system guide, not the command.packages/cli/test/doc-routes.ids.json— the 4@astryxdesign/cli/commandids and 3@astryxdesign/cli/functionids removed, with the group counts corrected. The 38Layout*component and block ids stay.packages/cli/foundation/doc-compiler/doc-loads.test.mjs— the load expectation forclients/cli/commands/layout.mjsremoved.CLI_DOC_NAMESPACESand thecli-docsdoctor check needed no change; they never named layout.Left on purpose, and they need a decision
These are real traces of the command that this PR does not remove, because each belongs to someone else's work:
.changeset/cli-spec-document-target-paths.mddocuments how bothtemplateandlayoutread their path arguments. This is the landed half of the#6571work, and the ordering between that PR and this one is not this PR's call. Untouched deliberately.[fix]changesets mention the command in passing while being mostly about other commands —cli-spec-exit-codes-in-help.md("bareastryx layoutexits 1"),cli-spec-help-error-envelope.md("astryx layout --json"),cli-spec-template-fixture-rewrite.md("astryx template <name> <path>andastryx layout expand"). Unlike the four removed above, deleting these would throw away genuine release notes fortemplate,discover,manifestandhelp. They need a surgical edit of the layout clause by whoever owns them, not deletion here.apps/docsite/src/content/blog/posts/the-astryx-cli.mdtells readers "astryx layoutsketches a page's structure from a short expression". A published blog post is editorial content, not CLI surface.docs/specs/AST-042-cli-command-admission/spec.mdlists "the component, discover, layout, search, template, and theme handlers read the environment". Now stale, but a spec edit does not ride a code PR — follow-up for the AST-042 owner.Known consequence
experimental.xle.componentsinastryx.config.mjshad exactly one reader,api/layout/_adapter.mjs. After this PR nothing reads it. The changeset now says so plainly rather than describing the key as functional: it is accepted and has no effect.It is not removed here on purpose — it is namespaced to
xle, the engine this PR keeps, and removing it pulls in the shipped v0.1.3migrate-layout-components-to-experimentalcodemod and its upgrade-ordering tests, rewriting released migration history. That is well outside "delete the layout command", but it should be decided rather than forgotten.Tests: substituted, not dropped
Three tests used
layoutas a vehicle for generic behavior. Losing the behavior with the command would have been a silent coverage regression, so each was re-homed:command-result-coverage.test.mjs—NO_ACTION_OF_THEIR_OWNwas['layout']and is now[]. That is a live assertion that every shipped command has an action, not a hole.debug-result-summary.test.mjs— "says so explicitly when a command has no result set" usedlayout check. Ten commands were probed;astryx doctorreports exactly{resultKind:'none', resultCount:null, emptyResult:null, directMatch:null}, the same shape, and is read-only. Swapped in.json-shim.test.mjs— the two cases asserting that a group with no subcommand emitsERR_MISSING_ARGUMENTwere removed, because no remaining shipped group can produce this error:theme,integrationanddoctor integrationeach have an action of their own and answerERR_INVALID_OPTIONinstead (verified by running them). The synthetic-group test immediately below them covers the mechanism — it builds a group at runtime and asserts the identical code and suggestions without depending on any shipped command. Its siblinghelp layout --jsonmoved tohelp theme --json.exit-codes.test.mjs—expect(commandDocs.length).toBeGreaterThan(30)was a tripwire against the doc list failing to load; removing 4 CommandDocs took the count to exactly 30, so it is now> 25.test-noderan 12m51s on this branch, so the assertion genuinely executed rather than being skipped by a specialized lane.Verification
One test fails on this branch and it fails identically on unmodified
main— this PR is not the cause.packages/cli/test/doc-routes.test.mjs > (a) maps every current routereports sixScrollableArea*blocks missing fromdoc-routes.ids.json. Verified by fetching pristine34b4692ainto a clean tree, installing, building core, and running that test alone: same six errors, no layout involvement. #6490 added the ScrollableArea block examples and #6498 added the ids file that must enumerate every block; neither updated the other. It needs a six-line fix in that fixture by whoever owns those changes.The same test's assertion (b) names only routes that exist was broken by this PR and is fixed here: each group row carries a
countchecked against the ids file, so removing 4 command ids and 3 function ids required@astryxdesign/cli/command34 → 30 and@astryxdesign/cli/function41 → 38.Two agent sessions produced this deletion independently, without contact. They converged on four non-obvious calls: keep
foundation/xle, keep both error codes as append-only, lower theexit-codestripwire to exactly> 25, and reword the generated-TSX banner to the same sentence. Four identical judgment calls is reasonable evidence they are the right ones. This PR is the union; the remaining delta was folded in as later commits.Gates were run on a separate full checkout with the box otherwise idle — a first run taken under concurrent lint and typecheck load was discarded as unreliable, since a green obtained under contention is worth as little as a red.
pnpm test, change vs unmodified baseline in the same tree: 44 failing files on baseline, the same 44 with the change — identical file sets. 77 vs 78 failing tests, and that difference is three alternating cases inside.github/scripts/accessibility-audit.integration.test.mjs, a file present in both failure sets and untouched here. The failures are two environmental clusters: locale/ICU (Calendar,DateInput,Timestamp,numberParser,plainDate,i18n/*,charts/formatters) and 30s/60s parallel-suite timeouts.check:repo(all 14 checks), all four CLI typechecks (json-api,authoring,template-docs,strict),readme:check,sync-exports --checkandadd-copyright --check: pass.tsc -p tsconfig.json: 790 errors on unmodified baseline, 789 with the change — the pre-existing ".d.mtsnot generated withoutsync:api-types" condition, one fewer because the layout line is gone. Not a CI gate; CI runs the per-package typechecks, which pass.eslinton every changed file: clean. Whole-repoeslint .segfaults in that verification container identically on unmodified baseline, so it is the container, not this change.Rebased on main (c15eda6) and the review items settled
layoutExpand, and the text/JSON parity test had threelayoutcases marked "remove these cases when the layout command is deleted". The layout-only test and the layout half of the chained-alias test are gone. The template half still runs.experimental.xle.componentsstays accepted and is documented as having no effect. Removing it would turn every config that still sets it into a config error. That is a break for those callers, with no gain, because nothing reads the key. The config type's JSDoc, the generated README config row, the config reference, and the changeset now all say: no effect, still accepted so existing configs keep loading, delete it.spec:AST-042is updated in this PR. Its inventory no longer lists the layout handler among the handlers that read the environment, and its counts are now 16 top-level commands and 25 commands that name the function they call.check:cli-structurereports the same 16 handlers and 25 FR1 functions.[fix]notes this PR used to delete and the four notes that mentionlayoutwhile documenting other commands. Those notes were accurate for 0.6.4, which still haslayout, so this PR no longer touches any of them. The removal ships in the next release undercli-remove-layout-command.md.doc-routes.json, the command and function group counts are now 30 and 38, which matchesdoc-routes.ids.json. The docs-graph walk's sanity floor drops from 90 to 80 loaded docs.Evidence, re-run after merging main at 934b9b3 (v0.6.4): the full CLI node suite (341 files, 5,468 tests),
check:changesets,check:cli-structure, andcheck:knowledgepass. Evidence on the earlier tree: the full CLI node suite (336 files, 5,415 tests),check:cli-structure,check:knowledge,check:changesets,readme:check,typecheck:json-api,typecheck:authoring,cli-api-types-verify,sync-exports, copyright, eslint, and prettier all pass. The branch also merges cleanly with main at 71f8be3.Final check before merge (head 2f89ae3, on main 505e3d8)
layoutcommand row and the threelayout.*response-type rows are gone.apps/docsite/src/content/blog/posts/the-astryx-cli.mdsaid thatastryx layoutsketches a page from an expression, andastryx blogserves that post to agents from the published feed. That one sentence is removed.astryx layout,layoutExpand/layoutCheck/layoutGrammar, orlayout.expand/check/grammar, except in this PR's own changeset.@astryxdesign/cli/xleengine (a separate public export used by the sandbox demo page), theERR_LAYOUT_*codes (a shipped code is never removed), past CHANGELOG entries, and theexperimental.xle.componentskey. The key is accepted but documented everywhere as having no effect. It stays because the released v0.1.3 upgrade codemod writes it, and a strict config would otherwise reject the result.check:cli-structure,check:knowledge,check:changesets,readme:check,typecheck:json-api,typecheck:authoring,cli-api-types-verify,sync-exports, copyright, eslint, and prettier all pass.README row fix (head 0e42b73, on main 9143f03)
CodeBunny's review of 2f89ae3 caught a real miss. When I resolved the README conflict with main's copy, the hand-written config-table row for
experimental.xle.componentswent back to "Register app-local components…". That table is not generated, so regenerating did not restore it. The row now says "No effect…", like the type, the config reference and the changeset, and prettier re-padded the table. All six hand-written README lines of the earlier approved head are present again. On main 9143f03 plus this head: the full CLI node suite (346 files, 5,508 tests) and every gate listed above pass.