Skip to content

docs(cli): experimental icon sets — explain the icon model in one place - #12688

Closed
josephfarina wants to merge 1 commit into
mainfrom
josephfarina/icon-model-overview
Closed

josephfarina wants to merge 1 commit into
mainfrom
josephfarina/icon-model-overview

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Reader impact

People who make an icon set, and agents that pick icons, had the mechanics (new-set, add, map, new-definition, the finder) spread over many sections of astryx docs cli/experimental/icon-sets, but no one place said what the model is. After this change, the guide's first content section says it in four short paragraphs:

  • Astryx owns generic meanings: each icon definition is a name, one sentence that says the job, and a few words. It names no library and no drawing.
  • A library maps its icons onto them where it already lives: in its own package, or in the integration package that already ships for it. No separate add-on package, and no change to Astryx.
  • A meaning the library needs that Astryx lacks is added in that same package (experimental icon new-definition, or --new-definition on add), and it hooks in like an Astryx definition.
  • How agents pick: astryx experimental icon <words> puts the icon a set maps to the matching definition first (main set before backups), while related icons stay findable by their own words (search vs find in document).

Source of truth

AST-084 FR4 (definitions are typed doc files; a set's own definition needs no change to Astryx and maps only within that set), FR6 (definition match scores 100; equal scores follow set order; an icon answers to the name and words of every definition it draws), FR8 (main set and backups), FR9 (templates declare definitions).

Correction

The "How it works" section of the icon-sets guide is rewritten to state the model above; the existing paragraph "The CLI knows no icon library…" stays. No other section, page or route changes. Experimental docs only (AST-017 FR27): no stable command's output changes.

Evidence

  • Real CLI output from this branch in a project with a Lucide-based icon set installed: experimental icon search → the set's search icon first (reason: definition "search"); experimental icon "find in document" → the icon mapped to documentSearch first. Both match the paragraph's example.
  • No-context reader test: a fresh model with no Astryx knowledge, allowed only to run astryx docs … against this branch, answered two questions.
    • "How do I make my icon library work with Astryx's experimental icon features, do I need a separate add-on package, and what if Astryx has no meaning for an icon?" → found the guide in 8 reads; answered: map in the package you already publish or its existing integration, no add-on, new-set/add/map, re-export the generated module, new-definition for a missing meaning that maps only within the set, PR to share it. Correct.
    • "With an icon set installed, how do I pick an icon for a plain search box vs searching inside a document, and which comes first?" → experimental icon search (set's search icon first) vs experimental icon "find in document" (documentSearch first), main set before backups, take the first match and paste its import. Correct.
    • Without the word "experimental" in the first question, the reader stayed in the stable docs and never reached the guide. That is by design while icon sets are experimental (stable docs do not point at experimental pages), so it is not changed here.

Scope

Components: cli (docs)

  • This PR changes documentation only, or names every necessary generated artifact.
  • Runtime, API, visual, and policy changes were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

CI=1 pnpm exec vitest run --project node packages/cli/test/core-doc-quality.test.mjs packages/cli/clients/cli/commands/docs.icon-set.test.mjs packages/cli/api/docs — 20 files, 214 tests pass. Prettier clean.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 18, 2026 9:02pm UTC

Request Review

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b5c777a

@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 9:09 PM UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b5c777a

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: the CI tests have not run on this head, because the run was cancelled when the CI ceiling was full; re-run all jobs or push again so they run.

The rewritten "How it works" section matches the icon-set spec, and each ranking and ownership statement holds when run against the CLI at this head. One optional wording suggestion is left inline: the sentence about where a set's own definition shows up should name astryx docs cli/experimental/icon-definitions, since astryx experimental icon --definitions lists only Astryx's definitions.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Changeset: an [experimental] patch release note for @astryxdesign/cli — verified (the changeset check passes).
  • Changeset: the guide opens with the icon model in one place — verified: it is the first section after the experimental notice.
  • Astryx owns generic meanings, each a camelCase name, one sentence and a few words that name no library or drawing — verified against the definition doc type and files.
  • A library maps its icons in its own or its existing integration package, with no add-on and no change to Astryx — verified against the icon-set spec.
  • A missing meaning is added in that package with experimental icon new-definition or add --new-definition, and answers to its name and words — verified with a fixture run.
  • astryx experimental icon <words> returns the set's icon for the named meaning first, main set before backups, with related icons after; search and find in document behave as described — verified with a fixture run.
  • Only the "How it works" section changes, and stable output is unchanged — verified (the diff; the experimental-isolation and guide tests pass).
  • The cited tests pass and Prettier is clean — verified.
  • The run against a Lucide-based set and the no-context reader test — the author's own evidence, not reproduced.
  • File .changeset/icon-model-overview.md — clear.
  • File packages/cli/assets/docs/tree/icon-sets.doc.mjs — one non-blocking wording suggestion (line 53).

Automated review (maintainer link)

},
{
type: 'prose',
text: 'When your library draws something no definition covers, add the meaning in the same package: `astryx experimental icon new-definition <name> --description ... --words ... --icon <id>`, or `--new-definition` on `experimental icon add`. It hooks in like an Astryx definition: `astryx experimental icon` answers to its name and words, and once the package is installed the definitions list shows it with the package that ships it. It maps only within your set; to offer it to every set, see Share a definition with every set.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: "the definitions list shows it with the package that ships it" holds for astryx docs cli/experimental/icon-definitions, but astryx experimental icon --definitions (which this guide calls the list of every definition) leaves a set's own definitions out, so an author who checks there will not find theirs. Suggested wording: "once the package is installed, astryx docs cli/experimental/icon-definitions lists it with the package that ships it".

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12618 fix(cli): search's text icons label + icon-ask wording
  Author: @josephfarina
- #12688 docs(cli): experimental icon sets — explain the icon model in one place
  Author: @josephfarina
- #12123 fix(core): MultiSelector search trigger no longer carries aria-required
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12844.

@github-actions
github-actions Bot deleted the josephfarina/icon-model-overview branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — b5c777a4 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant