Skip to content

feat(cli): experimental icon search answers phrases and export names - #12138

Merged
josephfarina merged 7 commits into
mainfrom
josephfarina/icon-search-words
Nov 17, 2026
Merged

josephfarina merged 7 commits into
mainfrom
josephfarina/icon-search-words

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #12138 → #12187 → #12205

User need

Agents and people ask astryx experimental icon for a glyph in a phrase: the glyph plus the control around it, such as copy button clipboard, info tooltip, or refresh icon button. Today the finder answers only a query it can match as a whole: the whole phrase, a word start, a partial match, or a query whose every word starts a part of one icon. A phrase that names a glyph next to a word no icon carries (button, tooltip) matches nothing, so the answer is an empty list and the caller gives up or guesses an export name. Agents usually write an icon request as a phrase like this.

Problem and solution fit

  • Word matches: when no reading of a query of several words answers, the finder's own search answer now ranks the icons that carry one or more of its words. A word weighs more the fewer searched icons carry it, so the word that names the glyph outweighs a common one, and a word no icon carries counts for nothing. The words that spell out the whole name of a definition the set's map names the icon for count twice: the map is the set author's own statement of what the icon means. The weights come from the installed sets themselves; there is no word list and no per-query rule.
  • Export names: a request written as an export name (SearchIcon, ChevronDownIcon, Bars3Icon, the form icon prints in its import lines) is one lower-cased token that matches no id. At the step that already leaves out filler words, the query is now also read with each word that holds a capital letter turned into the icon id its export name stands for, by the same rule that names icons when a set is written (SearchIcon asks for search; Bars3Icon for bars 3). That rule moves from the set writer to a small shared module, so the ranker does not load the writer. The reading whose best match scores higher answers, and the word as typed wins a tie, so PaperClip icon still finds a paperclip icon where a set keeps the compound whole, and finds paper-clip where a set splits it. Word matches read the words of both readings, so PaperClip button leads with paperclip or paper-clip alike.

Current specification

docs/specs/AST-084-icon-sets/spec.md FR6 owns how astryx experimental icon <words> ranks icons. This PR adds sentences to FR6 for the export-name reading, the word-match step, its score and its order, and that FR7's missing-id suggestions and FR13's fitting definitions never include word matches. The record edit describes the code in this PR only.

Public delta and caller burden

  • astryx experimental icon <words> and icon() from @astryxdesign/cli/api (both experimental): a query of several words that matched nothing now returns word matches, with score: 20 and a reason such as words "copy", "clipboard".
  • A query holding a word written as an export name can now be answered by its split reading when that reading scores higher. A missing <set>/<id> written as an export name (<set>/XMark) is read the same way, so its suggestions lead with the icon it names; suggestions for other missing ids are unchanged.
  • No new CLI option, response field, or type. matchCount, --limit, and --set behave as before. rankIcons() (internal) takes {words: true} to ask for word matches; only the finder's search answer passes it.
  • Unchanged: every query that any reading already answered keeps its answer; single words that are not export names; missing-id suggestions for a <set>/<id> that is not written as an export name; the definitions icon add lists; the icon-set checks' suggestions.

Before: astryx experimental icon "copy button clipboard" --set <set> returns matches: [].
After: it returns clipboard-copy (or the set's equivalent) first, then the icons that carry only one of the words.

Design and alternatives

  • The word step runs after every existing reading, and only in the finder's search answer, so it cannot displace an existing answer or reach a caller that looks for a near spelling or a fitting definition.
  • Order of word matches: they share one score, so they keep set order first, as every equal score does (the project's set leads). Within a set: weight ln((icons searched + 1) / (icons that carry the word + 1)), summed over the words an icon carries, with the words that spell a mapped definition's whole name counted twice; then the icon whose id holds fewer parts that no query word names (a word carried only as a tag names no id part); then id order.
  • An icon carries a word when the word, or its plural or singular, is one of its id parts, a part of one of its words, or a part of a word of a definition the set maps it for.
  • Rejected: re-ranking word-start and partial answers with the same weights. It changed answers that are right today.
  • Rejected: a list of control words to drop (button, tooltip). The weights already ignore words that no icon carries, and a list would need upkeep for every new word.
  • Rejected: putting a mapped definition's icon first whenever the query names the definition. One short definition word (menu, text) then outranked an icon that carries more of the query; counting those words twice keeps the evidence additive.
  • Rejected: adding each library's own search tags to the icons' words. The broad tags let more icons match through the existing tiers and made the answers worse in three of the four sets.
  • Rejected: replacing the word as typed with its export-name split. A set that keeps a compound word whole (paperclip) lost its exact answer.

Evidence

  • On a fixed set of agent-style icon requests with accepted icons per set, for four published icon sets: the requests that returned nothing now mostly return an accepted icon first, in every set; every request that already had an answer keeps exactly the same answer; no set lost a right answer. The same holds on a second, larger request set that was never used to tune the change.
  • In a project with no icon set, the finder's definitions answer (the Core built-in names) gets the same lift: requests that a built-in name serves now mostly get that name first, where most got no definition before.
  • Missing-id suggestions for mistyped multi-part ids (arrow-up-rigth, circle-chek, magnifying-glas) are identical before and after: arrow-up-right, circle-check, magnifying-glass first.
  • New tests in packages/cli/api/icon/icon.test.mjs: export names (SearchIcon, ChevronDownIcon, XMarkIcon, and with digits Bars3Icon, Cog8ToothIcon, Squares2X2Icon); the better of the split and typed readings (PaperClip icon, LightBulb icon in a set with whole compound ids and in one with split ids), and word matches over the words of both (PaperClip button); a phrase with a word no icon carries; a rare word outweighs a common one; a word carried only as a tag names no id part; set order first among word matches; word matches only with {words: true}; definition words and plural or singular forms count; words that name a mapped definition count twice; queries that existing readings answer, and unanswerable single words, stay as they were.

Scope

Components: cli (foundation/discovery/icon-ranking.mjs, foundation/text/icon-id.mjs moved from foundation/discovery/icon-set-writer.mjs, api/icon/search/search.mjs, api/icon/icon.doc.mjs), AST-084 FR6

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

  • npx vitest run --project node packages/cli/api/icon/icon.test.mjs packages/cli/clients/cli/commands/icon.test.mjs packages/cli/foundation/discovery/icon-set-checks.test.mjs packages/cli/foundation/discovery/template-icons.test.mjs packages/cli/api/icon/search/icon-index.test.mjs packages/cli/foundation/discovery/icon-set-writer.test.mjs packages/cli/clients/cli/commands/icon-authoring.test.mjs
  • node scripts/check-cli-structure.mjs
  • pnpm check:knowledge
  • pnpm specs:for --diff origin/main

Writing rubric results

R1 narration: none; the FR6 sentences state what the ranking does, in the present tense.
R2 research: none in the record; the measurement stays in this description.
R3 evidence: the FR6–FR8 verification row names the new cases as states; no basis cell names a pull request.
R4 rejected alternatives: none added to the record.
R5 change references: none.
R6 open questions: none touched.
R7 project status: none.

@vercel

vercel Bot commented Nov 16, 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 17, 2026 3:59am UTC

Request Review

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

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 4:12 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@josephfarina josephfarina changed the title feat(cli): experimental icon search answers a phrase by the words icons carry feat(cli): experimental icon search answers phrases and export names Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 256661f

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.24 MB packed (+2.3 kB); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@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.

Approval waits on an engineering owner's decision on three new spec:AST-084 FR6 requirements: the word-match tier (score 20) and its ranking, the doubled weight for query words that spell a mapped definition's name, and reading an export name as its words. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner), or amends or rejects them, and also rules whether word matches order by weight or by set order, since a backup set's icon can now lead the main set's icons at the same score, unlike the unchanged FR6 equal-score sentence, FR8 and the icon-sets guide. The planned rebase onto #12128 and #12131 makes a new head, which needs its own approval. These fixes are needed either way:

  • The equal-weight tie-break (icon-ranking.mjs:471) counts a word carried only as a tag as a named id part, so lock button ranks padlock (tagged lock) ahead of lock-open, against the stated "fewer id parts the query does not name, then id"; count the id parts no query word names instead.
  • <set>/<id> for a missing multi-part id now suggests word matches instead of the nearest spellings, so the typo arrow-up-rigth no longer suggests arrow-up-right (detail.mjs:49-62); keep word matches out of this caller, or state the change in FR7.
  • icon add now lists definitions that share a single word at score 20 (for circle-check-big: contrast, error, info, stop), which FR13's "definitions that fit it" does not cover (add.mjs:536-571); keep word matches out of this caller, or state it in FR13.
Claims and files checked

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

  • Release note: a query of several words that no icon matches as a whole returns word matches at score 20 — verified (icon-ranking.mjs:404-408; test at icon.test.mjs:610-629).
  • Release note: the icon carrying the rarest words comes first — verified (icon-ranking.mjs:463-470; test at icon.test.mjs:631-643).
  • Release note: a word that names a definition the set maps an icon for counts twice for that icon — verified (icon-ranking.mjs:499-511; test at icon.test.mjs:653-666).
  • Release note: a word no icon carries counts for nothing — verified (only carried words are summed, icon-ranking.mjs:467).
  • Release note: an export name such as SearchIcon or ChevronDownIcon reads as its words — verified (icon-ranking.mjs:270, 282-286; test at icon.test.mjs:566-579).
  • Release note and description: a query that already had an answer keeps it — verified for searches (icon-ranking.mjs:403-407; the test at icon.test.mjs:668-681 passes before and after); the missing-id hints and the icon add listing do change (findings above).
  • Description: ties keep set order, then fewer id parts the query does not name, then id — false for the middle key (icon-ranking.mjs:471).
  • Description: an icon carries a word through its id parts, its words, or a mapped definition's words, including plural or singular — verified (icon-ranking.mjs:439-448, 519-526; test at icon.test.mjs:645-651).
  • Description: the weight formula, with mapped-definition name words counted twice — verified (icon-ranking.mjs:463-470).
  • Description: copy button clipboard returned no matches before and returns clipboard-copy first after — verified (the new test fails on the base and passes on the head).
  • Description: no new option, field or type; --limit, --set and matchCount unchanged — verified (search.mjs:59-77, icon.type.mjs:50).
  • Description: the listed test run, the strict typecheck and the knowledge check pass — verified (focused tests and the knowledge check rerun; CI typecheck passed).
  • Description: four published icon sets answer agent-style requests better — not checkable; the requests and data are not in the pull request.
  • Description: writing rubric results for the record edit — verified (present tense, no research, status or references added).
  • File .changeset/icon-search-words.md — clear.
  • File docs/specs/AST-084-icon-sets/spec.md — awaits owner approval; its tie-break sentence is not what the code does; the FR6–FR8 verification row names no new case.
  • File packages/cli/api/icon/icon.doc.mjs — clear; matches the code.
  • File packages/cli/api/icon/icon.test.mjs — clear; no case where the asked word is carried only as a tag.
  • File packages/cli/foundation/discovery/icon-ranking.mjs — tie-break at line 471; the new tier reaches the detail and add callers through line 408.

Automated review (maintainer link)

@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.

Approval waits on an engineering owner's decision on the three new spec:AST-084 FR6 requirements: the word-match tier (score 20) and its ranking, the doubled weight for query words that spell a mapped definition's name, and reading an export name as its words. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner), or amends or rejects them, and also rules whether word matches order by weight or by set order: a backup set's icon can now lead the main set's icons at the same score, unlike the unchanged FR6 equal-score sentence and FR8, and once rebased the same question reaches rankIconIndex() under spec:AST-033 FR2a's index order. The planned rebase onto #12131 makes a new head, which needs its own approval. These fixes are needed either way:

  • Miss: Reading an export name at the filler-word step replaces the word as typed, so in a set whose ids keep a compound word whole, PaperClip icon and LightBulb icon, which find paperclip and lightbulb at 90 on main, now return only an unrelated word match at 20 (icon-ranking.mjs:270); rank both the unsplit and the split query and keep the reading with the better answer.
  • <set>/<id> for a missing multi-part id now suggests word matches instead of the nearest spellings, so the typo arrow-up-rigth no longer suggests arrow-up-right (detail.mjs:49-62); keep word matches out of this caller, or state the change in FR7.
  • The equal-weight tie-break (icon-ranking.mjs:471) counts a word carried only as a tag as a named id part, so lock button ranks padlock (tagged lock) ahead of lock-open, against the stated "fewer id parts the query does not name, then id"; count the id parts no query word names instead.
  • icon add now lists definitions that share a single word at score 20 (for circle-check-big: contrast, error, info, stop), which FR13's "lists the definitions that fit it" does not cover (add.mjs:536-571); keep word matches out of this listing, or state it in FR13.
  • The changeset's "Word matches appear only where nothing answered before" and the description's "The word stage changes no query that already had an answer" are false at this head, because PaperClip icon, <set>/<id> typos and icon add all answered before and now get word matches; fix those or say what changes for them.
Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim, phrases that nothing matches as a whole now return word matches at score 20 with the words in the reason: verified (icon-ranking.mjs:404-408, :484-488; test at icon.test.mjs:610-629).
  • Claim, a word weighs ln((icons + 1) / (carriers + 1)), summed per icon, and words that spell a mapped definition's whole name count twice: verified (icon-ranking.mjs:463-470, :499-511; tests at icon.test.mjs:631-666).
  • Claim, ties keep set order, then fewer id parts the query does not name, then id: false for words carried only as tags (icon-ranking.mjs:471).
  • Claim, an icon carries a word through an id part, a part of one of its words or a mapped definition's word, singular or plural: verified (icon-ranking.mjs:439-448, :519-526; test at icon.test.mjs:645-651).
  • Claim, the word stage changes no query that already had an answer: false (PaperClip icon, <set>/<id> typos, icon add).
  • Claim, export names read as their words (SearchIcon, ChevronDownIcon at 90, XMarkIcon): verified (test at icon.test.mjs:566-579).
  • Claim, icon arrowUp now reads as arrow up: verified by reading icon-ranking.mjs:269-286.
  • Claim, no new option, field or type, and matchCount, --limit and --set behave as before: verified (no API rows; option code unchanged).
  • Claim, queries the existing tiers answer as typed with a whole word, single words that are not export names, and queries whose words no icon carries stay unchanged: verified (icon-ranking.mjs:403, :408; test at icon.test.mjs:668-681).
  • Claim, copy button clipboard returns the combined icon first, then icons carrying one word: verified (test at icon.test.mjs:610-629).
  • Claim, measured gains on four published icon sets: not verifiable from the repository.
  • Changeset, word matches at 20 with the rarest words first, mapped-definition words counted twice, uncarried words counting for nothing, export names read as words: verified (same evidence as above).
  • Changeset, word matches appear only where nothing answered before: false (see findings).
  • File .changeset/icon-search-words.md: finding (false claim).
  • File docs/specs/AST-084-icon-sets/spec.md: awaits the owner decision; the verification row names no word-match case (non-blocking).
  • File packages/cli/api/icon/icon.doc.mjs: follows the owner decision on ordering.
  • File packages/cli/api/icon/icon.test.mjs: clear; missing the export-name, tie and caller cases the fixes need.
  • File packages/cli/foundation/discovery/icon-ranking.mjs: findings (export-name split, tie-break, word matches reaching other callers).

Automated review (maintainer link)

Comment thread .changeset/icon-search-words.md Resolved
@josephfarina
josephfarina force-pushed the josephfarina/icon-search-words branch from b8cd5cd to 07627e6 Compare November 17, 2026 02:12
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 07627e6

Owner decision (icon-set records owner, covering this head): the three AST-084 FR6 additions are approved. (1) A query of several words that nothing else answers lists word matches, ranked first by the number of id parts that no query word names. (2) Query words that spell a mapped definition's name weigh double. (3) An export name is read as its words, both the typed and the split reading are ranked, and the better reading answers (the typed one on a tie). Word matching is opt-in, so near-spelling suggestions for <set>/<id>, the fitting definitions of icon add and the icon-set checks do not change.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 07627e6

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026

@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.

Changes requested: one fix in the word stage, then this is ready for another look.

  • A compound written as an export name drops out of the word stage: rankWords receives only the split reading (packages/cli/foundation/discovery/icon-ranking.mjs:419), so in a set that keeps paperclip whole, PaperClip button answers paper-plane and scroll while paperclip button answers paperclip; ranking the word stage over the words of both readings, with a test for that phrase, fixes it.

The spec:AST-084 FR6 additions carry an engineering owner's approval for this head, and the earlier findings (the unnamed-id-part tie break, word matches in <set>/<id> and icon add, the filler-step split, the changeset wording) are fixed. Optional: one test that <set>/<id> or icon add with a multi-part id still takes no word matches.

Claims and files checked

Review mode: full; reason: rebase

  • Changeset: a multi-word query nothing matches returns word matches at score 20 — verified (icon.test.mjs phrase test; probe of copy button clipboard).
  • Changeset: the project's set first, rarest words first within a set — verified (icon-ranking.mjs:496-506; set-order and weight tests).
  • Changeset: words naming a mapped definition count twice, uncarried words count for nothing — verified (icon-ranking.mjs:482-489, 522-534; double-count test).
  • Changeset: word matches only in the search's own answer and only where nothing answered — verified (search.mjs:114, 170; icon-ranking.mjs:418-419; opt-in test).
  • Changeset: export names read as words, and an answered query changes only for a better split match — verified (icon-ranking.mjs:414-417, strict comparison; export-name tests).
  • Description: copy button clipboard returned nothing and now returns clipboard-copy first — verified (probe on base and head).
  • Description: PaperClip icon finds paperclip in a whole-compound set and paper-clip in a split one — verified (tie test).
  • Description: no new option, field or type; matchCount, --limit and --set unchanged — verified (no doc or type change; existing tests pass).
  • Description: only the finder's search opts into word matches, so <set>/<id> hints, icon add and set-check hints are unchanged — verified (detail.mjs:50, add.mjs:537, icon-set-checks.mjs:1132; identical hints for arrow-up-rigth).
  • Description: queries an existing reading answered keep their answers, and plain single words are unchanged — verified for the word stage (icon-ranking.mjs:410, 418); the export-name reading can still win with a higher score, as the description's own bullet says.
  • Description: an icon carries a word through its id parts, its words or a mapped definition's words — verified (icon-ranking.mjs:458-467, 542-549).
  • Description: the measured lift on published icon sets and in a project with no set — not checkable here, as no published set is in the repository.
  • Description: the listed tests exist and pass — verified (63 files, 1433 tests pass at the head; 8 of the new tests fail on the base).
  • .changeset/icon-search-words.md — clear.
  • docs/specs/AST-084-icon-sets/spec.md — clear (FR6 additions owner-approved for this head).
  • packages/cli/api/icon/icon.doc.mjs — clear.
  • packages/cli/api/icon/icon.test.mjs — no case for an export name inside a phrase (finding above).
  • packages/cli/api/icon/search/search.mjs — clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs — finding at line 419.

Automated review (maintainer link)

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec ff39f86

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026

@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.

Changes requested: two fixes, then this is ready for another look. The spec:AST-084 FR6 additions are approved for this head, and the earlier word-stage finding is fixed: PaperClip button now puts paperclip first where a set keeps it whole.

  • Miss: exportNameWords (packages/cli/foundation/discovery/icon-ranking.mjs:284-288) re-implements the export-name split that iconIdOf in foundation/discovery/icon-set-writer.mjs already owns and disagrees with it on digits, so export names such as Bars3Icon, Cog8ToothIcon and Squares2X2Icon miss their own icons (bars-3, cog-8-tooth, squares-2x2); read each capitalised word through iconIdOf, drop the copy, and add a digit case to the tests.
  • Miss: the description says missing-id suggestions for <set>/<id> are unchanged, but an id written as an export name (<set>/XMark, <set>/ChevronDown) now gets the split reading's matches as its hints, so the description should say so, or the split reading should be opt-in there too.
Claims and files checked

Review mode: full; reason: spec-record

  • Claim (changeset): a phrase no icon matches as a whole gets score-20 word matches, the project's set first and the rarest words first within a set: verified (icon-ranking.mjs:499-514, new tests).
  • Claim (changeset): a word naming a mapped definition counts twice and a word no icon carries counts for nothing: verified (icon-ranking.mjs:489-492, 525-537).
  • Claim (changeset): word matches appear only in the search's own answer and only where nothing answered before: verified (search.mjs:114, search.mjs:170, icon-ranking.mjs:419-420).
  • Claim (changeset): an export name is also read as its words and an answered query changes only when the split reading scores higher: verified (icon-ranking.mjs:415-418), apart from the digit split above.
  • Claim (description): the finder answers nothing today for a phrase with a word no icon carries: verified on the base.
  • Claim (description): word weights come from the installed sets, with no word list: verified.
  • Claim (description): SearchIcon asks for search, PaperClip icon finds paperclip or paper-clip, and PaperClip button leads with either: verified (tests and probes).
  • Claim (description): a request written as an export name, the form the command prints in its import lines, is read as its words: false for names with digits (first finding).
  • Claim (description): FR6 gains the export-name reading, the word step, its score and order, and the FR7 and FR13 exclusion: verified.
  • Claim (description): new matches report score 20 with a words "…" reason: verified (new test).
  • Claim (description): no new option, field or type, matchCount, --limit and --set as before, and only the finder's search answer asks for word matches: verified.
  • Claim (description): answered queries, single words that are not export names, icon add definitions and set-check suggestions are unchanged: verified.
  • Claim (description): missing-id suggestions for <set>/<id> are unchanged: false for an id written as an export name (second finding).
  • Claim (description): mistyped multi-part ids keep identical hints: verified (arrow-up-rigth, circle-chek, magnifying-glas).
  • Claim (description): measured gains over four published icon sets and a held-out request set: not checkable here, as the data is not in the repository.
  • Claim (description): the listed new tests and testing commands: verified; the new cases fail on the base and pass on the head, the four test files and the knowledge check pass.
  • File .changeset/icon-search-words.md: clear.
  • File docs/specs/AST-084-icon-sets/spec.md: clear.
  • File packages/cli/api/icon/icon.doc.mjs: clear.
  • File packages/cli/api/icon/icon.test.mjs: clear; it has no digit export-name case and no <set>/<id> or icon add case with a multi-part id.
  • File packages/cli/api/icon/search/search.mjs: clear.
  • File packages/cli/foundation/discovery/icon-ranking.mjs: first finding.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 256661f

@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 required unit, UI and build jobs are still running on this head. The spec:AST-084 FR6 additions are approved for this head, and both earlier findings are fixed: export names are now read through iconIdOf, so Bars3Icon, Cog8ToothIcon and Squares2X2Icon find their own icons, and the description now says how <set>/<id> suggestions change for an id written as an export name.

  • Optional: one <set>/<id> test with a mistyped multi-part id and one with an export-name id (<set>/XMark) would hold the callers that take no word matches and the new suggestion.
Claims and files checked

Review mode: incremental; reason: none

  • Claim (changeset): a query of several words that no icon matches as a whole returns score-20 word matches, the project's set first and rarer words first within a set: verified (icon-ranking.mjs:422-424, 501-511; new tests).
  • Claim (changeset): a word naming a mapped definition counts twice, and a word no icon carries counts for nothing: verified (icon-ranking.mjs:487-494, 527-539; test).
  • Claim (changeset): word matches appear only in the search's own answer and only where nothing answered before: verified (search.mjs:114, 170; icon-ranking.mjs:421-422).
  • Claim (changeset): an export name is also read as its words, and an answered query changes only when the split reading scores higher: verified (icon-ranking.mjs:415-420; no query the base answered changed across 2,616 cross-library export names).
  • Claim (description): today a phrase holding a word no icon carries returns an empty list: verified on the base.
  • Claim (description): word weights come from the installed sets, with no word list or per-query rule: verified (rankWords).
  • Claim (description): an export name is read by the rule that names icons when a set is written, now in a small shared module, so the ranker does not load the writer: verified (icon-id.mjs:20-40, icon-ranking.mjs:72, 286, icon-set-writer.mjs:59, 64).
  • Claim (description): SearchIcon asks for search and Bars3Icon for bars 3: verified (tests).
  • Claim (description): the typed reading wins a tie, so PaperClip icon finds paperclip or paper-clip, and PaperClip button leads with either: verified (tests; LightBulb icon is exercised in the whole-compound set only).
  • Claim (description): the record edit adds FR6 sentences for the export-name reading, the word step, its score and order, and keeps word matches out of missing-id suggestions and fitting definitions, describing only this code: verified.
  • Claim (description): multi-word queries that matched nothing return score-20 matches with a words "…" reason: verified (test).
  • Claim (description): a missing <set>/<id> written as an export name leads with the icon it names, and other missing ids keep their suggestions: verified (probe over Heroicons- and Lucide-shaped sets).
  • Claim (description): no new option, field or type; matchCount, --limit and --set as before; only the finder's search answer asks for word matches: verified.
  • Claim (description): answered queries, single words that are not export names, other missing-id suggestions, icon add definitions and set-check suggestions stay as they were: verified (the word step runs only after every reading is empty; those callers pass no words; probes).
  • Claim (description): copy button clipboard returns clipboard-copy first, then icons that carry one of the words: verified (probe).
  • Claim (description): word matches keep set order, then weight, then fewer id parts no query word names, then id, and a word carried only as a tag names no id part: verified (icon-ranking.mjs:495-511; test).
  • Claim (description): an icon carries a word through its id parts, its words or a mapped definition's words, plural or singular included: verified (icon-ranking.mjs:463-472, 547-554).
  • Claim (description): mistyped multi-part ids keep identical suggestions: verified on base and head; which icon leads depends on the set's ids.
  • Claim (description): the rejected alternatives and their measured effects: not checkable here, apart from replacing the typed word with its split, whose loss of a whole compound's exact answer an earlier revision showed.
  • Claim (description): the writing-rubric results (present-tense FR6 sentences; no research, pull request or project status in the record) and the scope checklist (one capability, nothing unrelated, no internal context): verified against the record diff and every added line.
  • Claim (description): measured gains over four published icon sets, a held-out request set and the no-set built-in names: not checkable here, as the data is not in the repository.
  • Claim (description): the listed new tests and testing commands: verified; the seven test files pass (270 tests), the structure and knowledge checks pass, and the new digit case fails on the previous revision; the spec-routing lookup was not rerun.
  • File .changeset/icon-search-words.md: clear.
  • File docs/specs/AST-084-icon-sets/spec.md: clear.
  • File packages/cli/api/icon/icon.doc.mjs: clear.
  • File packages/cli/api/icon/icon.test.mjs: clear; it has no <set>/<id> caller case (non-blocking).
  • File packages/cli/api/icon/search/search.mjs: clear.
  • File packages/cli/foundation/discovery/icon-ranking.mjs: clear.
  • File packages/cli/foundation/discovery/icon-set-writer.mjs: clear.
  • File packages/cli/foundation/text/icon-id.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 4d42236 into main Nov 17, 2026
79 checks passed
@github-actions
github-actions Bot deleted the josephfarina/icon-search-words branch November 18, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 256661f2 Deployed Nov 17, 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