Repository navigation
feat(cli): experimental icon sets — icon definitions, astryx experimental icon, templates that use the installed set - #7759
Conversation
…config (AST-084) IconSetDoc and IconSetData types with sealed parsers and self-docs, the manifest iconSets root, and the iconSet project config field. The static descriptor reader is shared by theme and icon-set descriptors.
Project.iconSets() reads each loaded integration iconSets root without executing anything, withdraws invalid or unresolvable sets, and picks the project set from iconSet, else the only set.
icon <words> (icon.search), icon <set>/<id> (icon.detail), icon --list (icon.list); astryx search gains the icon domain, ranked below equal component and doc matches.
Static export check with re-exports followed, theme-map check against fills, upstream drift and license-notice warnings, and the doctor icon-sets check.
template show and copy map icon imports to the project set by meaning (shared name, then id, then words), keep unmatched icons, and report every icon under icons; printed source reports on stderr.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
An icon may list reviewed matches for icons in other sets. Template mapping applies exact and strong matches before the shared name, id, and words rules; a likely match is only suggested on a kept icon. Unknown confidence or a match naming its own set makes the data file invalid.
Draft record of the icon-set contract as the CLI implements it, with the parts not yet in the CLI named in Current-state impact.
Writes the set directory with its typed IconSetDoc and a starter data file (module = the package, no icons), declares the iconSets root through the shared manifest writer, and adds it to package.json files. Same receipt, dry run, no-clobber, rollback, and post-write verify as the other kinds; integrationAddIconSet is the typed per-kind API.
icon-set is a discover kind: package lists carry iconSets, --type icon-set keeps them, a catalog entry may carry iconCount and fills, and discover <package>/<set> shows description, license, icon count, default, fills, and the command that searches its icons.
The iconSets root joins the doc type check: each set descriptor, including one discovery withdraws, is checked against IconSetDoc like ThemeDoc.
An exact query is a name match (the id, or a word that is an id part) or a meaning match (one of the other words). Meaning matches lead unless more searched icons are named for the query than tagged with it; within a score, whole id before id part, earlier tag first. delete now finds trash before the icon that draws the Delete key; user keeps the user icon first.
FR2 names integration add icon-set; FR6 gains the name/meaning reading rule (DEC-5); current-state impact drops what the CLI now implements; changeset updated.
cli/integrations/building-blocks/icon-sets: integration add icon-set, the data file fields, generating it from a library's tags, the integration check codes, and how apps find icons and how templates follow iconSet. A test pins that "icon set", "add icons", and "ship icons" find it first.
…declared template icons (AST-084) Astryx owns a folder of typed icon definitions (IconDefinitionDoc); a set maps each definition to one of its icons in its data file's `map` and may add its own definitions. Templates declare which definition each imported icon draws, so mapping is a lookup with no library knowledge and no guessing. New commands write a set one verified icon at a time (`icon add`, `icon map`, `icon use`, `integration add icon-definition`, `integration add icon-set --from`) through a set-owned generated module and an optional adapter. `integration check` enforces the icon export contract, follows package re-exports, reads createElement/jsx theme-map entries, and reports unmapped definitions with suggestions. Guide, AST-084 record, and changeset updated.
…finition sections
There was a problem hiding this comment.
Changes requested: the owner approval at this revision settles the spec direction and the lint fix is in, but two things remain.
- CI
test-node (1/4)fails 7 tests inpackages/cli/test/experimental-isolation.test.mjson the merge with currentmain, because the goldens still carry guide titles thatmainhas since changed (#7934); regenerating them from amaincheckout with the recipe in the test's header fixes it. - About 21,900 authored lines still land as one unit although set authoring, template mapping and discover's
icon-setkind stack on the core, so please land the core first with those layers as a stack, or show why the core cannot merge without them.
[Automated review]
| "type": "docs.node", | ||
| "children": [ | ||
| "author-a-theme: Author a theme", | ||
| "browser-support: Browser Support", |
There was a problem hiding this comment.
Current main titles this guide "Browser support" (#7934), so this golden and the other goldens that record stable docs titles and search snippets fail 7 tests in CI test-node (1/4) on the merge. Regenerating them from a main checkout with the recipe in the header of packages/cli/test/experimental-isolation.test.mjs fixes it.
…and leaks, not main's prose
|
/approve-spec 8b13733 |
… lists never fail under --next either
|
/approve-spec 8eda69e |
There was a problem hiding this comment.
Changes requested: the owner approval at this revision settles the spec direction and the isolation goldens now hold against main, but three things remain.
- About 22,100 authored lines still land as one unit although set authoring, template mapping and discover's
icon-setkind stack on the core, so please land the core first with those layers as a stack, or show why the core cannot merge without them. .changeset/cli-icon-sets.mdsaysastryx searchnever changes, but in a project with no icon setastryx search experimentalnow returns 6 results instead of 3, because the stablevalidateIntegrationand response-types descriptions point atastryx docs cli/experimental; please drop that pointer and reword the note.- The isolation guard now skips every
cliroute and compares prose-free skeletons, so it would not catch that leak; please scan the stableclireference docs for leak sentences, or have the owner restate thespec:AST-084Verification row to what the guard proves.
[Automated review]
| '@astryxdesign/cli': patch | ||
| --- | ||
|
|
||
| [experimental] Icon sets: an integration can ship an icon set, agents find icons by meaning and get the exact import line, and copied templates use the project's icons. Everything here is experimental and may change or be removed in a patch release; a project that does not set `experimental.iconSet` sees no change in any stable command apart from the marked `experimental` group in help and in `astryx manifest` (and its `--json`), which list that group and its commands, and the marked experimental entries in the `astryx docs cli` listings, and `astryx search` never changes. With a package that ships icon sets installed, the warnings an older CLI gave about its manifest key `experimental` (in `astryx doctor` and `astryx doctor integration validate <package>`, and a one-line nudge to run it from other commands) go away, and `doctor integration` checks that package's icon sets only in a project that sets `experimental.iconSet`; and `astryx integration check` reports icon-set findings for a package that declares `experimental.iconSets` (below). |
There was a problem hiding this comment.
This says astryx search never changes, but in a project with no icon set and no experimental.iconSet, astryx search experimental returns 6 results here and 3 on the CLI without the feature: the field reference's new stability row and the validateIntegration and response-types descriptions, which now point at astryx docs cli/experimental, match. Saying that search never returns icons or experimental docs would be accurate.
| type: 'integration.validate', | ||
| description: | ||
| "The result envelope: `data.validated`, false when nothing was validated — with no `package.json` at all, `data.issues` carries one `no_package` error-severity issue so the command exits 1; with a `package.json` but no integration manifest, `data.issues` is empty, which means \"not looked at\", not \"healthy\"; `data.name` and `data.version` of the validated package (both null when `data.validated` is false; `data.name` is `(local package)` when the local package.json has no readable name), plus `data.issues`, an AstryxIntegrationIssue[] of {code, severity: `warning` | `error`, message, fix?, file?, line?}: `fix` is the change that resolves the issue, and `file` and `line` where it is, relative to the package, when the check knows them; and `data.notes` when there are any: {code, message, next?} information beside the issues; a note fails nothing by default, and one with `next: true` counts as a warning under `integration check --next`, fails `integration check --strict --next`, and fails `--strict` from the next minor release. Notes include `invalid_cli_command` for a `cliCommand` that was ignored as malformed and `cli_peer_version` when the running CLI is outside the `@astryxdesign/cli` peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message: `duplicate_component_doc`, `symlinked_root`, `unreadable_file`, `invalid_package_json` (no `name` or `version`), `no_provider_id`, and `source_without_component_doc` for a doc whose file name differs from its source only in letter case where the two still pair; and `doc_name_mismatch` and `unknown_block_component` (see `docNames` and `blockComponents`); they become warnings in the next minor release. For the commands a topic writes, `runner_command` (written with a package runner), `plain_command` (written bare), `package_manager_command` (written for one package manager) and `doc_token` (a token that does not parse) notes each give the file, line and the token to write. A `doc_target_not_found` note names a doc whose `replaces` or `extends` names no topic and no guide of the CLI's docs or the package's own (such as a namespace, with the guides below it), so it changes nothing unless an app also installs a package that provides it, and a `doc_section_unplaced` note a section whose `before` or `after` names no section of the topic or guide it extends, so it is added at the end, and a `duplicate_guide_replacement` note two docs of the package that replace one guide, of which only the last is read; they become warnings in the next minor release. When the manifest loads, `data.docTypes` holds the doc type check: `status` (`checked` | `skipped`), `reason` when skipped, `typescript`, `docs` (doc values checked), `findings` ({doc, line, export, type, field, problem: `unknown_field` | `missing_field` | `wrong_type`, severity: `warning`, message, fix}), `unchecked` ({doc, reason}: a doc that could not be fully checked, or a root its reader cannot read), and `fixtures` when the components or docs root holds test fixture docs under `__tests__`: how many, none of them checked. When the manifest loads, `data.docNames` lists the component doc names it could not judge: `status` (`checked`), `findings` (always empty; a doc name the module its import names provably does not export is a `doc_name_mismatch` note, with its fix in the message) and `unchecked` ({file, name, reason}: a doc whose `name` differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, `data.blockComponents` lists the component names templates give in `exampleFor` or `componentsUsed` that could not be judged: `status` (`checked`), `findings` (always empty; a name neither the package nor Core has, and the template does not import, is an `unknown_block_component` note, with its fix in the message) and `unchecked` ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is a note in `data.notes`, its fix inside the message, listed only: it does not fail this command or `integration check --strict`, and fails `--strict` from the next minor release. The codes are `component_import_not_exported`, `component_import_other_package`, `component_import_missing_name`, `example_import_not_exported`, `example_import_missing_name`, `template_import_not_exported`, `template_import_outside_root`, `template_private_import`, `template_import_missing_name` and `template_no_default_export`. When the manifest loads, `data.publicImports` is `{status: 'checked', findings: [], unchecked}`: `unchecked` lists each import the check could not judge, as {file, specifier, reason}, the reason starting `example <label>:` for an import in a component example: an `exports` target not built yet; a module whose export list cannot be read in full (CommonJS, or a declaration file it cannot read); a root import in a package with no `exports` (the root module `main` names is not read); every name an import (other than a component doc's own component) names that its module does not export, while a TypeScript file in the package has a `declare module` block for a relative path or the package's own name or a subpath of it, which can add names to that module (a `declare module` in a comment, `declare global`, a wildcard such as `'*.css'`, and another package's name do not count; a file whose text has `declare module` but that cannot be parsed counts); the same for every such name when the package has more than 5,000 files to search for that block; a deep path into build output not built yet in a package with no `exports`; a template import of Core when `@astryxdesign/core` is not installed beside the package (a `packages/core` of the workspace under another name does not count); every import of the package's own name when package.json has no `name` or a `name` that is not a bare package name; one entry for the whole check when package.json cannot be read; and an import of a subpath whose `exports` entry has only a `types` target, unless it is `import type`, every binding is an inline `type`, or every name it imports is a type its types file declares: a value import of a name that file does not declare as a type, a namespace or side-effect import, or any import when the types file cannot be read (it may be build output). `integration check` counts the unchecked as not compared; they never fail it.", | ||
| "The result envelope: `data.validated`, false when nothing was validated — with no `package.json` at all, `data.issues` carries one `no_package` error-severity issue so the command exits 1; with a `package.json` but no integration manifest, `data.issues` is empty, which means \"not looked at\", not \"healthy\"; `data.name` and `data.version` of the validated package (both null when `data.validated` is false; `data.name` is `(local package)` when the local package.json has no readable name), plus `data.issues`, an AstryxIntegrationIssue[] of {code, severity: `warning` | `error`, message, fix?, file?, line?}: `fix` is the change that resolves the issue, and `file` and `line` where it is, relative to the package, when the check knows them; and `data.notes` when there are any: {code, message, next?} information beside the issues; a note fails nothing by default, and one with `next: true` counts as a warning under `integration check --next`, fails `integration check --strict --next`, and fails `--strict` from the next minor release. Notes include `invalid_cli_command` for a `cliCommand` that was ignored as malformed and `cli_peer_version` when the running CLI is outside the `@astryxdesign/cli` peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message: `duplicate_component_doc`, `symlinked_root`, `unreadable_file`, `invalid_package_json` (no `name` or `version`), `no_provider_id`, and `source_without_component_doc` for a doc whose file name differs from its source only in letter case where the two still pair; and `doc_name_mismatch` and `unknown_block_component` (see `docNames` and `blockComponents`); they become warnings in the next minor release. For the commands a topic writes, `runner_command` (written with a package runner), `plain_command` (written bare), `package_manager_command` (written for one package manager) and `doc_token` (a token that does not parse) notes each give the file, line and the token to write. A `doc_target_not_found` note names a doc whose `replaces` or `extends` names no topic and no guide of the CLI's docs or the package's own (such as a namespace, with the guides below it), so it changes nothing unless an app also installs a package that provides it, and a `doc_section_unplaced` note a section whose `before` or `after` names no section of the topic or guide it extends, so it is added at the end, and a `duplicate_guide_replacement` note two docs of the package that replace one guide, of which only the last is read; they become warnings in the next minor release. When the manifest loads, `data.docTypes` holds the doc type check: `status` (`checked` | `skipped`), `reason` when skipped, `typescript`, `docs` (doc values checked), `findings` ({doc, line, export, type, field, problem: `unknown_field` | `missing_field` | `wrong_type`, severity: `warning`, message, fix}), `unchecked` ({doc, reason}: a doc that could not be fully checked, or a root its reader cannot read), and `fixtures` when the components or docs root holds test fixture docs under `__tests__`: how many, none of them checked. When the manifest loads, `data.docNames` lists the component doc names it could not judge: `status` (`checked`), `findings` (always empty; a doc name the module its import names provably does not export is a `doc_name_mismatch` note, with its fix in the message) and `unchecked` ({file, name, reason}: a doc whose `name` differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, `data.blockComponents` lists the component names templates give in `exampleFor` or `componentsUsed` that could not be judged: `status` (`checked`), `findings` (always empty; a name neither the package nor Core has, and the template does not import, is an `unknown_block_component` note, with its fix in the message) and `unchecked` ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is a note in `data.notes`, its fix inside the message, listed only: it does not fail this command or `integration check --strict`, and fails `--strict` from the next minor release. The codes are `component_import_not_exported`, `component_import_other_package`, `component_import_missing_name`, `example_import_not_exported`, `example_import_missing_name`, `template_import_not_exported`, `template_import_outside_root`, `template_private_import`, `template_import_missing_name` and `template_no_default_export`. When the manifest loads, `data.publicImports` is `{status: 'checked', findings: [], unchecked}`: `unchecked` lists each import the check could not judge, as {file, specifier, reason}, the reason starting `example <label>:` for an import in a component example: an `exports` target not built yet; a module whose export list cannot be read in full (CommonJS, or a declaration file it cannot read); a root import in a package with no `exports` (the root module `main` names is not read); every name an import (other than a component doc's own component) names that its module does not export, while a TypeScript file in the package has a `declare module` block for a relative path or the package's own name or a subpath of it, which can add names to that module (a `declare module` in a comment, `declare global`, a wildcard such as `'*.css'`, and another package's name do not count; a file whose text has `declare module` but that cannot be parsed counts); the same for every such name when the package has more than 5,000 files to search for that block; a deep path into build output not built yet in a package with no `exports`; a template import of Core when `@astryxdesign/core` is not installed beside the package (a `packages/core` of the workspace under another name does not count); every import of the package's own name when package.json has no `name` or a `name` that is not a bare package name; one entry for the whole check when package.json cannot be read; and an import of a subpath whose `exports` entry has only a `types` target, unless it is `import type`, every binding is an inline `type`, or every name it imports is a type its types file declares: a value import of a name that file does not declare as a type, a namespace or side-effect import, or any import when the types file cannot be read (it may be build output). `integration check` counts the unchecked as not compared; they never fail it. `data.olderCliNotes` ({file, kind: `template` | `namespace`, field, message}), for the local package, lists each descriptor field a release before 0.7.4 refuses while the package's CLI peer range admits one: `stability` on a template or namespace doc, and a template's experimental field (its values are on the `cli/experimental` routes); it is present only when it has entries, is never counted, and never fails a check. Experimental fields are documented on their own routes under `astryx docs cli/experimental`.", |
There was a problem hiding this comment.
The closing sentence, "Experimental fields are documented on their own routes under astryx docs cli/experimental", puts an experimental pointer in a stable function doc that every project reads, and it is why astryx search experimental finds this doc without the opt-in. The olderCliNotes text reads fine without it; the same sentence closes the integration.validate description in foundation/response/response-types.doc.mjs line 398.
| const experimental = (/** @type {string} */ route) => | ||
| route === 'cli' || route.startsWith('cli/'); |
There was a problem hiding this comment.
Treating every cli/ route as experimental skips the stable cli/api/functions/* and cli/api/enums/* docs entirely, so the leak sentence added to validateIntegration.doc.mjs passes. Skipping only reads that carry stability: 'experimental' would keep FR0's exception for the experimental command and function docs and still scan the stable reference docs for LEAK_WORDS.
…an experimental neighbor; the guard scans every stable cli node and searches for experimental and icon set
|
/approve-spec 0997d77 |
There was a problem hiding this comment.
Changes requested: the owner approval at this revision settles the spec direction, and the release-note and guard-coverage points from the last round are fixed, but three things remain.
- About 22,200 authored lines still land as one unit although set authoring, template mapping and discover's
icon-setkind stack on the core, so please land the core first with those layers as a stack, or show concretely why the core cannot merge without them. - The icon-sets guide says a project without
experimental.iconSetsees no stable change apart from the help line, but the manifest, theastryx docs clilistings andastryx search experimentalchange too, asspec:AST-084FR0 lists; please give the guide that list. - The goldens' regeneration recipe in
packages/cli/test/experimental-isolation.test.mjssaysvitest run -uon the file, but vitest 4 reads the path as the value of-uand updates the whole suite; please write it asvitest run <file> --update.
[Automated review]
| content: [ | ||
| { | ||
| type: 'prose', | ||
| text: 'Icon sets are experimental: the `astryx experimental icon` commands, the `experimental.iconSet` key in astryx.config, the `experimental.iconSets` key in an integration manifest, the data file, icon definitions, and the output and JSON of all of them can change, or go away, in any patch release without a deprecation period. A project that does not set `experimental.iconSet` sees no change in any stable command apart from the `experimental` group in help: templates, discover, and doctor answer as they do with no icon set installed. `astryx search` never returns icons or these docs; to find an icon by meaning, use `astryx experimental icon <words>`.', |
There was a problem hiding this comment.
Without experimental.iconSet a project also sees the experimental group in astryx manifest, the marked entries in the astryx docs cli listings, and one more astryx search experimental result (the field reference's stability section); with an icon-set package installed, the older CLI's warnings about the manifest key go away. spec:AST-084 FR0 and .changeset/cli-icon-sets.md list those differences, so "no change in any stable command apart from the experimental group in help" understates them.
| * While main lacks the icon-set feature (before the feature lands), the | ||
| * goldens are main's own output: regenerate them from a checkout of main | ||
| * with `GOLDEN_CLI_BIN=<main>/packages/cli/clients/cli/bin/astryx.mjs | ||
| * GOLDEN_CLI_ROOT=<main>/packages/cli vitest run -u` on this file. That runs |
There was a problem hiding this comment.
With the repository's vitest 4.1.11, -u takes an optional value (-u, --update [type]), so vitest run -u packages/cli/test/experimental-isolation.test.mjs reads the path as the update type and runs every test file in update mode with GOLDEN_CLI_ROOT set. Writing the flag after the file (vitest run packages/cli/test/experimental-isolation.test.mjs --update) regenerates exactly the 38 goldens; the same wording is on lines 33 and 51.
… without the opt-in; the guard's update recipe names the file before --update
|
/approve-spec 68cb24f |
|
/approve-spec c1e34f0 |
There was a problem hiding this comment.
Changes requested: the owner approval at this revision settles the spec direction, and the guide and regeneration-recipe points from the last round are fixed, but two things remain.
- About 22,250 authored lines still land as one unit although set authoring, template mapping and discover's
icon-setkind stack on the core, so please land the core first with those layers as a stack, or show concretely why the core cannot merge without them. astryx experimental icon useappendsexperimental: {iconSet}after a spread in astryx.config (export default {...base}), which overrides the spread'sexperimentalobject and silently drops settings such asexperimental.xle.componentswhile printing[ok]; please refuse a spread there, as the writer already refuses non-literal values, and add a test.
[Automated review]
| ); | ||
| if (!holder) { | ||
| const created = j.objectExpression([]); | ||
| object.properties.push(j.objectProperty(j.identifier(each), created)); |
There was a problem hiding this comment.
When the object on the path has no literal experimental but spreads another object (export default {...base}), this pushes a new experimental: {} after the spread, which overrides the spread's whole experimental object. With base = {experimental: {xle: {components: {...}}}}, astryx experimental icon use glyphs prints [ok] and the config then evaluates to {"experimental":{"iconSet":"glyphs"}}, so xle.components silently stops applying. Treating a spread element on the path like a non-literal value (the refuse() error above) would keep the header's promise that such a config is refused rather than rewritten; a test with export default {...base} would pin it.
|
Maintainer decision: why each layer belongs with the core, concretely.
Each slice alone either has no consumer or no producer. All of it sits behind one opt-in, and the isolation guard proves stable output unchanged without it. One PR is the accepted shape. |
…dow a spread; icon use refuses with ERR_WRITE_FAILED and leaves the config as it was
|
/approve-spec fc351ce |
There was a problem hiding this comment.
Changes requested: the owner approval at this revision settles the spec direction, and the experimental icon use spread fix from the last round works, but the scope finding remains. About 22,500 authored lines still land as one unit, and set authoring, template mapping, and discover's icon-set kind with Doctor's icon-sets check each stack on the core, so please land the core first with those layers as a stack, or show concretely why the core cannot merge without one of them. The reasons in the latest maintainer decision do not hold at this revision: the shared fixture packages/cli/test-utils/icon-set-fixture.mjs writes a complete set without any writer, Project.iconSets() already uses experimental.iconSet to put the project's set first in lookups, and FR17 has the template icons report and experimental icon --list show a missing or withdrawn set.
[Automated review]
Maintainer decision: one PR (see the decision comments). Every other review item is resolved on fc351ce.
Experimental (AST-017 FR27): every icon-set surface sits behind
astryx experimentalandexperimental.*config/manifest keys, so it can change in patch releases. Stable surfaces read icon sets only whenexperimental.iconSetis configured, andastryx searchnever does; guard tests prove stable output equals main with no set and with a set configured. Validate adds two additive, never-failing fields:iconSets(optional definitions a set leaves unmapped, with exact-id suggestions) andolderCliNotes(a template or namespace descriptor that setsstabilityor a template that declaresicons, while the package still admits a CLI before 0.7.3; CLI 0.7.2 and earlier drop such descriptors). The issue severity union is unchanged.One pull request. The maintainer's standing rule for this repository is one pull request per piece of work, with no size-based splits; that was confirmed for this pull request. Reformatting is limited to files with real changes.
User need
An agent building with Astryx needs an icon for "delete" or "settings" and has no way to ask the CLI, so it guesses an import. Templates and blocks hard-code one icon library, so a copied page ignores the icon set the project already uses. Teams with their own icon library have no supported way to plug it in.
Problem and solution fit
IconDefinitionDocfiles, one per meaning (close,delete,settings…): name, description, search words. 132 ship; 29 are Core's built-in icon names. Theicon-definitionsdocs namespace adopts every definition, Astryx's and each installed set's, soastryx docsandastryx searchfind them. A set can add its own definitions in the same format; proposing one to Astryx is a PR copying the file.experimental.iconSets; each set folder holds a descriptor and a data file: icons (id, export, words, variants) and a set-levelmapfrom definition to icon. Built-in definitions must be mapped (error); other Astryx definitions are optional (listed in the additiveiconSetsreport); a set's own unmapped definitions warn..d.tsandthemeIcons): plain re-exports for components, oradapt(source)through the set's declared adapter for data objects, SVG strings, fonts.<Name>Iconexport of the set package's public entry, a component taking SVG props, drawn incurrentColor, sized to its box.themeIconscovers the built-in definitions:defineTheme({icons: themeIcons}).Commands
All under
astryx experimental icon(the genericastryx experimentalgroup is new; icon is its first child):astryx experimental icon <words>/<set>/<id>/--list(coverage) — find icons by meaning, with the import line.astryx experimental icon use <set>— writesexperimental.iconSet.astryx experimental icon add <Export> --from <module>— shows which definitions fit;--definitionmaps it;--new-definition --description --wordscreates the set's own definition.--default,--variant,--id.astryx experimental icon map <definition> <icon> [--remove].astryx experimental icon new-set <name> [--from <module>] [--exclude …]— scaffold, or wrap a whole library.astryx experimental icon new-definition <name>.astryx searchnever reads icon sets; icon lookup by meaning is onlyastryx experimental icon <words>. Search's docs gatherer skips docs marked experimental, so stable search output equals main with or without a configured set (guard tests). Joiningastryx searchhappens at promotion.integration check/doctor— data, map, export contract, generated module and types, theme map; exact-id suggestions only.Current specification
Draft record
spec:AST-084in this PR. Projectsarchitecture:cli-surfaceINV24, INV28, INV32, INV34, INV35 andspec:AST-039FR5/FR6/FR11. Runtime icon resolution is unchanged.Design and alternatives
Follow-ups, not here: icons join
astryx searchas a section gatherer at promotion;astryx buildpicking icons.Evidence
@acmefixtures cover every command, check code and mapping path.integration check0 errors / 0 warnings.Scope
Testing
On main b2c4f18 (merged; clean against newer main): full CLI node suite 482 files, 8,469 passed (2 expected failures, 3 skipped).
pnpm build;typecheck:strict,typecheck:json-api,typecheck:authoring,typecheck:template-docs0 errors;cli-api-types-verify,check:cli-structure,readme:check,check:knowledge,check:changesets([experimental]for icon surfaces;[feat]for the generalstabilitydoc field andolderCliNotes) pass; eslint 0 errors; docsite route-resolution passes. Isolation guard tests compare stablesearch,template,discover,doctor,integration verifyand every stable docs topic and docs-tree node against the base CLI's output, with no icon set and with one installed. Docsite tests 649 passed. Formatting-only edits outside the change were dropped.Command admission (spec:AST-042 FR4, FR7; spec:AST-053 FR13)
astryx experimentalis the one new top-level command.spec:AST-084(current, approved by an approval owner) authorizes it in FR0. Each command below sits inside its parent's one job. For each one: the question it answers, why an option on the parent or on an existing subcommand cannot answer it, its FR1 function, and how its exact selector position classifies under AST-053 FR11 E1–E5.experimental icon [query...]experimentalis a group with no job of its own. Stableastryx searchmust stay icon-free without the opt-in (AST-017 FR27, AST-084 FR8). No stable command may gain an experimental subcommand (AST-084 FR0).iconquery: not eligible, fails E1. It is free text, so several words form one query.<set>/<id>is one spelling of the same position, not a separate exact selector.experimental icon add <export>experimental iconis a read-only lookup, so a write cannot be one of its options.mapedits a map entry for an icon the set already has, and cannot add the icon or verify the export.iconAddexport: not eligible, fails E1 and E4. The command writes the set's data file and generated module.experimental icon map <definition> [icon]addadds icons, andnew-definitioncreates definitions. Pointing an existing definition at an existing icon is neither, and as an option onaddit would need an export to verify.iconMapdefinition: not eligible, fails E1 and E4 (writes the data file). It also fails E5, becauseiconfollows it.experimental icon use <set>astryx.config, and the read-onlyexperimental iconmust not write. No stable command may change behavior for icon sets (FR27).iconUseset: not eligible, fails E1 and E4 (writesastryx.config).experimental icon new-set <name>integration addmust gain no experimental kind (AST-084 FR0).addandmapwork on a set that already exists.iconNewSetname: not eligible, fails E1 and E4 (creates files).experimental icon new-definition <name>integration addmust gain no experimental kind (FR0).add --new-definitioncreates a definition only while adding an icon. This command creates one alone, optionally pointed at an existing icon.iconNewDefinitionname: not eligible, fails E1 and E4 (creates files).None of these commands is eligible for the AST-053 batch contract, so none adopts it. Each exclusion names its failed condition above.
Writing rubric results
spec:AST-084
spec:AST-046 (one sentence added to FR2)
spec:AST-051 (one sentence each added to FR5 and FR7)
architecture:cli-surface (one sentence added to INV35)