Skip to content

feat(cli): search lists the installed icons that answer an icon ask - #12183

Merged
josephfarina merged 6 commits into
mainfrom
josephfarina/search-icon-section
Nov 18, 2026
Merged

josephfarina merged 6 commits into
mainfrom
josephfarina/search-icon-section

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Record change: spec:AST-084 FR0, FR6, FR11 and DEC-2 state one rule (search reads icon sets only for an icon ask where icon features are on, and appends at most three icons in its own icons block without changing results or matchCount); spec:AST-083 FR1 says the block changes neither. Gates: CLI structure check, pnpm check:knowledge and strict typecheck of the touched files pass; the touched test files pass locally (Testing below).

User need

An agent building a page asks astryx search for the parts it needs, and often for an icon in the same breath (trash icon, SearchIcon). With an icon set installed, search answers the components and docs but never the installed icons, so the agent guesses an import or runs a second command it may not know exists. The icon finder already ranks the installed icons by meaning; search should hand its best few back when the query asks for one.

Problem and solution fit

  • A query asks for an icon when one word as typed is icon or icons, an installed set's name, or an icon export name (SearchIcon), and is not the exact name of a component or hook search reads (Icon, NavIcon, IconButton stay lookups). The rule lives once, beside the finder's filler words (asksForIcon).
  • The section needs the icon features on (iconFeatureGate(project)) and an installed set that loads (project.iconSets()). Search's adapter computes it, so disk-backed discovery stays in the adapter. The ask test reads only the sets' directory names; the sets themselves are read only for a query that asks. With no set, search reads no icon data.
  • Ranking is the finder's own: rankIcons over the installed sets in tie order (project set first), then answeringMatches. At most 3 icons, fewer when limit is smaller.
  • The icons come as a separate trailing data.icons = {matchCount, results}. data.results and data.matchCount do not change.

Current specification

  • spec:AST-084 states one rule for search and icon sets in FR0, FR6, FR11 and DEC-2: astryx search reads icon sets only for an icon ask where icon features are on, appends at most three icons in its own icons block, and never changes results or matchCount; promotion decides every other stable listing of icons. FR6 describes the section; FR0, FR11 and DEC-2 are amended to the same rule.
  • spec:AST-083 FR1 gains one sentence: the section changes neither results nor matchCount.
  • Experimental surface (spec:AST-017 FR27): the section appears only where icon features are on, and its types are marked @experimental.

Public delta and caller burden

  • JSON: data.icons is additive and present only for an icon ask with a set installed and no type. Each entry: domain: 'icon', name (<set>/<id>), set, id, package, score, reason, import, command (astryx experimental icon <set>/<id>). The finder has no description field, so entries carry none.
  • Types: new IconSearchEntry and SearchIconSection, and SearchResponse.data.icons?, all marked @experimental. SearchDomain and --type are unchanged.
  • Text: a trailing Icons (n) block, one line per icon: trash (glyphs): import {TrashIcon} from '@acme/glyphs';.
  • --type icon is not added: icons are not gathered candidates, and a typed search keeps to its one domain, so it lists no icons.
  • search()'s own doc is not edited: its text is itself a search result, and any icon wording there makes it match icon queries with no set installed. The section is documented in icon()'s experimental doc and the types.
  • Not touched: searchCore, build, exportSearchIndex, rankSearchIndex, the persisted gather cache. Icon sets are read on each call, so installing or removing one shows on the next search.

Design and alternatives

  • Rejected: icons as gathered candidates in results (moves scores, counts and order for every query; search's contract is that results are the lexical matches).
  • Rejected: splitting export names for the icon word (IconButton would open the section).

Evidence

  • With no set installed, --json and text output of button, dark mode, trash icon, SearchIcon, IconButton, icons, delete, data table, glyphs home, chevron down icon are byte-identical to main (stdout and stderr).
  • With a fixture set installed, every query that does not ask for an icon answers exactly as with none, IconButton, NavIcon and Icon included. With four large sets installed, --json and text output of button, dark mode, IconButton, delete and data table are byte-identical to the output with no set.
  • An integration component that declares the keyword icon keeps its place: for icon and icons, results and matchCount serialize byte-identically with and without a set, and icons is only appended after them.
  • No query in the search and build test files that is not about icons opens the section.

Scope

Components: cli search (api, text view), icon finder ask rule

  • 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

  • search.icons.test.mjs (new, 12): ask rule; no set → no icons key for icon and other queries; set installed → other queries deep-equal the no-set answer; icon asks keep results/matchCount and add the trailing section with the exact entry shape; an integration component that declares the keyword icon keeps its place; cap 3 and limit: 1; type → none; install → section, remove → none on the next call; a project look (experimental.iconVariant: 'solid') → the block prints the look's import, as astryx experimental icon does; two packages that each ship a set named glyphs → each entry's name and command read <package>/glyphs/trash, and each command answers; CLI text: trailing block, otherwise identical.
  • Pass locally with CI=1: search.icons 12/12, search 78/78, search command text 33/33, search discover line 7/7, experimental-isolation 54/54, icon 52/52, search-return-type 1/1.
  • Added time per search, warm, median of 15, four synthetic sets of 324, 2,029, 1,581 and 2,264 icons, on a heavily loaded host: a query that does not ask for an icon +1.1 ms (+0.4 ms with no set); an icon ask +40 to +49 ms, which is the existing set read plus the finder's own ranking.

Writing rubric results

R1 narration: FR11 and DEC-2 said icons join search "at promotion" as a plan; rewritten as present-tense rules (what search reads, what it appends, what promotion decides). The FR6 and AST-083 sentences state what search does.
R2 research: none in the records; latency numbers live in this description.
R3 evidence: the FR0, FR11 verification row now names what the isolation tests check (search's results and matchCount with a set installed; an icon ask may append its icons block); it cites facts, no change.
R4 rejected alternatives: none in the records; two listed in this description.
R5 change references: none in the records.
R6 open questions: none added.
R7 project status: none; no release or promotion timing is stated.

@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 18, 2026 6:02am 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 18, 2026, 6:12 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 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.

Not ready yet: approval waits on an owner decision about letting stable astryx search list installed icons before promotion, and three fixes are needed whatever that decision is.

  • packages/cli/api/search/_adapter.mjs:21 imports foundation/integrations/icon-features.mjs, which is in neither this branch nor main (it arrives with #12176), so astryx search, astryx build, astryx experimental icon and the @astryxdesign/cli/api entry fail with ERR_MODULE_NOT_FOUND, and CI's smoke test, typecheck and node tests fail on it.
  • packages/cli/api/search/_icons.mjs:14-18 imports the disk-reading icon ranker outside the search adapter, which architecture:cli-surface INV21 forbids and the Lint guardrail check rejects, so the section should be computed from _adapter.mjs (or _icons.mjs imported only there).
  • The edited spec:AST-084 still says in FR0, FR11 and DEC-2 that search never reads icon sets and that icons join it only at promotion, which contradicts the new FR6 sentence, so those claims need amending in this pull request if the direction is approved.

Approval needs an engineering owner to decide whether search may read icon sets before promotion, reversing spec:AST-084 FR0, FR11 and DEC-2, and to record that decision by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner. The new IconSearchEntry, SearchIconSection and SearchResponse.data.icons types would also read better tagged @experimental, like the icon finder's own response types.

Claims and files checked

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

Claims:

  • Experimental icon search answers a multi-word phrase with word matches at score 20, rarest words first: verified in the ranker (icon-ranking.mjs rankWords) and by a direct run of it; the astryx experimental icon command itself fails to load at this head.
  • Words naming a mapped definition count twice: verified (mappedNameWords; the copy/pile case ranks the mapped icon first).
  • A word no icon carries counts for nothing: verified in effect (it is in no icon's sum).
  • An export-name word such as SearchIcon or ChevronDownIcon reads as its words: verified (both answer at 90).
  • A query that already had an answer keeps it: verified for the tested cases (arrow up to line keeps 90).
  • With an icon set installed, search lists up to three icons after the results in JSON and text: false at this head (search fails to load); the code shape matches (_icons.mjs, iconBlock).
  • Results and their count do not change: verified in code (search.mjs appends icons after the ranked answer); its tests cannot run at this head.
  • A search with --type lists no icons: verified in code (search.mjs:84).
  • With no icon set installed, every search answers as before: false at this head (every search fails to load).
  • The section needs the icon feature gate and reads sets only for an icon ask: the gate module is missing (false at this head); reading sets only after the ask test is verified (_icons.mjs).
  • The ask rule (icon words, set names, export names, declared names excluded) lives beside the finder's filler words: verified (asksForIcon).
  • The icon section is an experimental surface under the experimental-isolation rule: false against the current icon-set record, whose FR0, FR11 and DEC-2 keep search off icon sets until promotion.
  • Search's own doc, searchCore, build, the search index and the gather cache are untouched: verified in the diff.
  • Outputs are byte-identical to the base without a set, and the search, icon and return-type tests pass: false at this head (the test suite's global setup fails on the missing module; the CLI smoke test fails); the latency figures were not reproducible.

Files:

  • .changeset/icon-search-words.md: clear.
  • .changeset/search-icon-section.md: its "every search answers as before" line is false at this head (missing module).
  • docs/specs/AST-083-result-order/spec.md: proposed FR1 sentence awaits the owner decision.
  • docs/specs/AST-084-icon-sets/spec.md: proposed FR6 text awaits the owner decision; FR0, FR11 and DEC-2 left contradicting it (blocking).
  • packages/cli/api/icon/icon.doc.mjs: clear (describes the held behavior).
  • packages/cli/api/icon/icon.test.mjs: clear in content; cannot load at this head.
  • packages/cli/api/search/_adapter.mjs: imports a missing module (blocking).
  • packages/cli/api/search/_icons.mjs: disk discovery outside the adapter, INV21 (blocking).
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear in content; cannot run at this head.
  • packages/cli/api/search/search.mjs: clear apart from calling _icons.mjs directly (see INV21).
  • packages/cli/api/search/search.type.mjs: new types lack @experimental (non-blocking).
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: clear; the proposed FR6 weight wording is imprecise (non-blocking).
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same set-name rule, extracted).

Automated review (maintainer link)

Comment thread packages/cli/api/search/_adapter.mjs Resolved
Comment thread packages/cli/api/search/_icons.mjs Resolved
Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
Comment thread packages/cli/api/search/search.type.mjs Resolved
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · d999f8c

Storybook · Sandbox · built from this PR's head

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

API changes: cli +4 · ~1 · −0

5 API changes (advisory)
Package Where Signature Usage
+ cli ./api · Types · type IconSearchEntry type IconSearchEntry import type {IconSearchEntry} from '@astryxdesign/cli/api'
+ cli ./api · Types · type SearchIconSection type SearchIconSection import type {SearchIconSection} from '@astryxdesign/cli/api'
+ cli ./json · Also exported from an earlier entry point · IconSearchEntry IconSearchEntry (./api) import {IconSearchEntry} from '@astryxdesign/cli/json'
+ cli ./json · Also exported from an earlier entry point · SearchIconSection SearchIconSection (./api) import {SearchIconSection} from '@astryxdesign/cli/json'
~ cli ./api · Types · type SearchResponse data: { query: string; matchCount: number; results: SearchResultEntry[] } → data: { query: string; matchCount: number; results: SearchResultEntry[]; icons?: SearchIconSection | undefined } import type {SearchResponse} from '@astryxdesign/cli/api'; const x: SearchResponse = {data: …}

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.

Not ready yet: approval waits on an engineering owner's decision to let stable astryx search list installed icons before promotion, and two fixes are needed whatever that decision is.

  • packages/cli/api/search/_adapter.mjs:21 imports foundation/integrations/icon-features.mjs, which is in neither this branch nor main (it arrives with #12176), so astryx search, astryx build, astryx experimental and the @astryxdesign/cli/api entry fail to load, and until #12176's opt-in sentence lands, showing icons in a project with no experimental.iconSet goes against spec:AST-017 FR27.
  • Miss: iconQuery now splits every mixed-case word, not only export names, before it drops filler words (packages/cli/foundation/discovery/icon-ranking.mjs:300), so PaperClip icon finds nothing and GitHub icon falls from 90 to a score-20 word match or to nothing, where the base answers both at 90, which makes the changeset line "A query that already had an answer keeps it" untrue.

Approval needs an engineering owner to decide whether search may read icon sets for an icon ask before promotion, as the amended spec:AST-084 FR0, FR6, FR11 and DEC-2 and spec:AST-083 FR1 now say, and to record that by commenting /approve-spec <full head SHA> on a head that also carries #12176; the author may do so as an engineering owner. #12138, which the description plans to rebase onto, describes keeping the typed reading on ties and keeping word matches out of missing-icon suggestions, so taking its ranking would address both. The earlier INV21 and record-consistency findings are fixed at this head.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Phrase queries in the icon finder return word matches at score 20, rarest words first: verified (rankWords; the finder's phrase tests pass).
  • Words that name a mapped definition count twice: verified (mappedNameWords; its test passes).
  • A word no icon carries counts for nothing: verified in effect (it is in no icon's sum); the record's reason for it is worded wrongly (non-blocking).
  • An export-name word such as SearchIcon or ChevronDownIcon reads as its words: verified.
  • A query that already had an answer keeps it: false (PaperClip icon, GitHub icon).
  • With a set installed, search adds up to three icons after the results, in JSON and text: false at this head (search does not load); verified on this head merged with #12176.
  • Results and their count do not change: verified on the merged tree (tests and equal match counts).
  • A search with --type lists no icons: verified.
  • With no set installed, every search answers as before: false at this head (search does not load); the no-set test passes on the merged tree.
  • The ask rule (icon words, set names, export names, component and hook names excluded) lives beside the filler words: verified (asksForIcon).
  • The block needs the icon feature gate, is computed in the adapter, reads only set directory names for the ask test and reads sets only for an ask: verified in code; the gate module is missing at this head.
  • Ranking is the finder's own, capped at three or limit: verified (_icons.mjs, tests).
  • Entry fields, the Icons (n) text block and the trailing position: verified on the merged tree.
  • The amended records state one rule for search: verified; the amendments still need an owner's approval.
  • The block is an experimental surface under the isolation rule: false on the current records until #12176's opt-in sentence lands; the types carry @experimental (verified).
  • SearchDomain, --type, search's own doc, searchCore, build, the search index and the gather cache are untouched, and sets are read on each call: verified in the diff and by the install-and-remove test.
  • Byte-identical outputs, the four-large-set comparison and the latency figures: not reproduced.
  • The search, icon and return-type tests pass: the icon and return-type tests pass at this head; the search icon tests pass only with #12176 merged in.

Files:

  • .changeset/icon-search-words.md: false claim "A query that already had an answer keeps it" (blocking).
  • .changeset/search-icon-section.md: "every search answers as before" is false at this head (missing module).
  • docs/specs/AST-083-result-order/spec.md: proposed sentence awaits the owner decision.
  • docs/specs/AST-084-icon-sets/spec.md: proposed rule awaits the owner decision; "icon features are on" needs #12176 (blocking); weight wording (non-blocking).
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.test.mjs: clear (passes); no test pins PaperClip icon.
  • packages/cli/api/search/_adapter.mjs: imports a missing module (blocking).
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear in content; loads only with #12176.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: export-name split drops answers (blocking); word matches reach missing-icon suggestions (non-blocking).
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/test/experimental-isolation.test.mjs: clear.

Automated review (maintainer link)

Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved

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

Not ready yet: approval waits on an engineering owner's decision to let stable astryx search list installed icons before promotion, and two fixes are needed whatever that decision is.

  • packages/cli/api/search/_adapter.mjs:21 imports foundation/integrations/icon-features.mjs, which is in neither this branch nor main (it arrives with #12176), so astryx search, astryx build, astryx experimental and the @astryxdesign/cli/api entry fail to load, and until #12176's opt-in sentence lands, showing icons in a project with no experimental.iconSet goes against spec:AST-017 FR27.
  • rankIcons ranks word matches over the export-name reading alone (packages/cli/foundation/discovery/icon-ranking.mjs:449), so astryx experimental icon PaperClip button and astryx search PaperClip button icon find nothing where the same queries in lower case find paperclip, which goes against the proposed FR6 text that counts every icon carrying one of the query's words.

Approval needs an engineering owner to decide whether search may read icon sets for an icon ask before promotion, as the amended spec:AST-084 FR0, FR6, FR11 and DEC-2 and spec:AST-083 FR1 now say, and to record it by commenting /approve-spec <full head SHA> on a head that also carries #12176; the author may do so as an engineering owner. Rebasing onto #12176 and onto #12138's current head, which already reads both readings for word matches, addresses both fixes. The earlier PaperClip icon regression, the adapter-boundary finding and the missing @experimental tags are fixed at this head.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • An icon ask is a query with icon or icons, an installed set's name, or an icon export name as typed, never the exact name of a component or hook, and the rule sits beside the finder's filler words: verified (asksForIcon, icon-ranking.mjs:263-282, and its tests).
  • The section needs the icon features on and a set that loads, and the search adapter computes it: verified in code; the gate module is missing at this head.
  • The ask test reads only set directory names, the sets are read only for an ask, and with no set search reads no icon data: verified (_icons.mjs:35-40, _adapter.mjs:54-82).
  • Ranking is the finder's own over the sets in tie order, at most three icons and fewer under a smaller limit: verified (_icons.mjs:41-45 and the tests).
  • The icons trail the results, and results and matchCount do not change: verified on this branch merged with #12176 (tests).
  • The icon-set record states one rule for search, and the result-order record gains one sentence: verified; both await an owner decision.
  • The section is an experimental surface shown only where icon features are on, with experimental types: the types are tagged; on the current records the opt-in is experimental.iconSet, so this needs #12176.
  • Entry fields, the trailing Icons (n) text block, no --type icon, and unchanged search domains and --type: verified.
  • Search's own doc is not edited, and the section is documented in the icon finder's doc and the types: verified.
  • The lexical ranker, build, the search index and the gather cache are untouched, and sets are read on each call: verified (diff, and the install-and-remove test on the merged tree).
  • With no set installed, the listed queries print what the base prints: false at this head (search does not load); the no-set test passes on the merged tree.
  • An integration component that declares the keyword icon keeps its place: verified on the merged tree (test).
  • With four large sets the other queries are unchanged, and the latency figures: not reproduced.
  • The search, icon and return-type tests pass: the icon and return-type tests pass at this head; the search icon tests pass only with #12176 merged in.
  • Finder changeset, phrases: word matches at score 20, the project's set first, rarer words first, mapped definition words counted twice: verified (tests and a ranking probe).
  • Finder changeset, scope: word matches only in the finder's own answer and only where nothing answered before: verified (other callers pass no word option).
  • Finder changeset, export names: an export-name word is also read as its words, and an answered query changes only when the split reading scores higher: verified for the scored tiers; the word-match step reads only the split reading (blocking above).
  • Search changeset: with a set installed an icon ask lists up to three icons after the results, and a typed search lists none: verified on the merged tree.
  • Search changeset: with no icon set installed every search answers as before: false at this head (search does not load).

Files:

  • .changeset/icon-search-words.md: clear.
  • .changeset/search-icon-section.md: "every search answers as before" is false at this head (missing module).
  • docs/specs/AST-083-result-order/spec.md: proposed sentence awaits the owner decision.
  • docs/specs/AST-084-icon-sets/spec.md: proposed rule awaits the owner decision; "icon features are on" needs #12176 (blocking); the word-match sentence is not met by the code (blocking, code side); weight wording (non-blocking).
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.test.mjs: clear (passes); no test for a mixed-case word in a phrase.
  • packages/cli/api/icon/search/search.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: imports a missing module (blocking).
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear in content; loads only with #12176.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: word matches read only the split reading (blocking).
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/test/experimental-isolation.test.mjs: clear (passes on the merged tree).

Automated review (maintainer link)

Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
@josephfarina
josephfarina force-pushed the josephfarina/search-icon-section branch from 7fac55f to 246ac99 Compare November 17, 2026 09:09
@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (icon-set owner, covering this pull request): where icon features are on (an icon-set package is installed), astryx search adds its own icons block with up to three installed icons, and only for icon asks. The block is left out when no installed icon answers. Existing results are unchanged, and with no icon-set package the output is byte-identical to before. This is experimental, behind the icon gate.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 246ac99

@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 for one record fix; nothing else in this review blocks approval.

The direction is settled: an engineering owner approved the amended icon-set and result-order records at this exact head, and the code matches them, with results and matchCount unchanged and every search in a project without an icon-set package printing exactly what main prints.

  • Miss: the FR0, FR11 verification row of docs/specs/AST-084-icon-sets/spec.md (line 781) still says that search for icon and icon set with a set opted in gains no field or section and that search with a set installed answers as with no set, which contradicts the amended FR11 (and astryx search icon set with a set installed now appends a cog icon), so please amend that row to the new rule and retitle the isolation suite "with an icon set installed and configured, search is unchanged" to match.

Two optional wording fixes: FR6 and the icon-ranking.mjs header still say word matches serve only the finder's own answer, and FR0 and the icon-features.mjs header do not list search among the readers of the icon gate.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • An icon ask is a word typed as icon or icons, an installed set's name, or an icon export name, never an exact component or hook name, and the rule sits beside the finder's filler words: verified (icon-ranking.mjs:274-287, ask-rule tests).
  • The block needs the icon gate on and a set that loads, and the search adapter computes it: verified (_adapter.mjs:54-82, CLI structure check).
  • The ask test reads only set directory names, the sets are read only for an ask, and with no set no icon data is read: verified (_icons.mjs:35-40).
  • Ranking is the finder's own over the sets in tie order, at most three icons and fewer under a smaller limit: verified (_icons.mjs:41-46, tests).
  • The icons trail the results, and results and matchCount do not change: verified (tests, CLI runs with and without a set).
  • The icon-set record states one rule for search in FR0, FR6, FR11 and DEC-2: false, its FR0/FR11 verification row still states the old rule (blocking above).
  • The result-order record gains one sentence: verified.
  • The block appears only where icon features are on and its types are marked experimental: verified (search.type.mjs:43, :58, :72).
  • Entry fields, the trailing Icons (n) text block, no --type icon, and unchanged search domains and --type: verified.
  • Search's own doc is not edited, and the block is documented in the experimental icon finder doc and the types: verified (icon.doc.mjs:14, :19).
  • The lexical ranker, build, the search index and the gather cache are untouched, and sets are read on each call: verified (diff, install-and-remove test).
  • With no set installed, the listed queries print exactly what main prints, stdout and stderr: verified (ten queries, text and JSON, on this branch merged into main).
  • With a fixture set installed, queries that do not ask answer as with none, IconButton, NavIcon and Icon included: verified (test).
  • With four large sets, other queries stay unchanged, and the latency figures: not reproduced.
  • An integration component that declares the keyword icon keeps its place: verified (test).
  • No query in the search tests that is not about icons opens the block: consistent (search tests pass).
  • The listed tests pass and the CLI structure check is clean: verified.
  • Changeset: with an icon set installed, an icon ask lists up to three icons after the results, the results and their count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: FR0/FR11 verification row left unamended (blocking); FR6 word-match wording and FR0 reader list (non-blocking).
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: header wording (non-blocking).
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/test/experimental-isolation.test.mjs: suite title states the old rule (part of the blocking finding).

Automated review (maintainer link)

Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
@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 62e55e1

@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. CI's test-node legs, and the test summary that waits on them, fail at this head before running any test, because the Node leg-planning budget is already exceeded on main without this change; every other CI job passes, so those checks need a fix on main and a re-run here before merge.

The earlier request is resolved: the icon-set record's verification row now states the search rule, and the isolation suite is retitled to match. An engineering owner approved the amended icon-set and result-order records at this exact head, and the code matches them: results and matchCount are unchanged, and with no icon-set package installed, search prints exactly what main prints.

  • Optional: name packages/cli/api/search/search.icons.test.mjs in that verification row (or in the record's verified_by), since it is the test that proves the appended icons block.
Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • An icon ask is a word typed as icon or icons, an installed set's name, or an icon export name, never an exact component or hook name, and the rule sits beside the finder's filler words: verified (icon-ranking.mjs:244-288, ask-rule tests).
  • The block needs icon features on and a set that loads, and search's adapter computes it: verified (_adapter.mjs:54-82, CLI structure check).
  • The ask test reads only set directory names, the sets are read only for an ask, and with no set no icon data is read: verified (_adapter.mjs:66-77, _icons.mjs:36-40).
  • Ranking is the finder's own over the sets in tie order, then the answering matches, at most three and fewer under a smaller limit: verified (_icons.mjs:41-46, tests).
  • The icons trail as a separate data.icons, and results and matchCount do not change: verified (tests; runs with and without a set).
  • The icon-set record states one rule for search in FR0, FR6, FR11 and DEC-2: verified (record lines 119-120, 158-160, 268-275, 397-402, 812-815 and the verification row at 783).
  • The result-order record gains one sentence: verified (lines 55-57).
  • The block appears only where icon features are on, and its types are marked experimental: verified (search.type.mjs:43, :58, :72).
  • Entry fields, the trailing Icons (n) text block, no --type icon, and unchanged search domains and --type: verified (_icons.mjs:47-57, commands/search.mjs:222-235, tests).
  • Search's own doc is not edited, and the block is documented in the experimental icon finder doc and the types: verified (icon.doc.mjs:19).
  • The lexical ranker, build, the search index pair and the gather cache are untouched, and sets are read on each call: verified (diff; install-and-remove test).
  • With no set installed, the ten listed queries print exactly what main prints, text and JSON, stdout and stderr: verified (this branch merged into main, compared with main).
  • With a fixture set installed, queries that do not ask answer as with none, IconButton, NavIcon and Icon included: verified (tests; runs).
  • With four large sets installed, the five listed queries stay byte-identical: verified (runs with four synthetic sets of the listed sizes).
  • An integration component that declares the keyword icon keeps its place: verified (test).
  • No query in the search and build tests that is not about icons opens the block: verified (no other search or build test installs an icon set).
  • Added time: a query that does not ask adds no measurable time, and an icon ask over four large sets adds tens of milliseconds: consistent (about 0 ms and about 50 ms, measured on a loaded machine).
  • The listed tests pass and the CLI structure check is clean: verified (this head, and this head merged into main).
  • The writing-rubric results match the record edits: verified.
  • Changeset: with an icon set installed, an icon ask lists up to three icons after the results, the results and their count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear; one optional note on the verification row.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/foundation/integrations/icon-features.mjs: clear.
  • packages/cli/test/experimental-isolation.test.mjs: clear.

Automated review (maintainer link)

Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
@josephfarina
josephfarina force-pushed the josephfarina/search-icon-section branch from 62e55e1 to e6e41b5 Compare November 17, 2026 12:54
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec e6e41b5

@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: CI's capacity check found no room at this head, so test-node and typecheck have not run yet. Re-run the CI workflow and merge once the required checks pass.

An engineering owner approved the amended icon-set and result-order records at this exact head, and the code matches them. results and matchCount are unchanged, a typed search lists no icons, and with no icon-set package installed search prints exactly what main prints.

  • Optional: name packages/cli/api/search/search.icons.test.mjs in the icon-set record's FR0/FR11 verification row (or in its verified_by), since that test proves the appended icons block.
Claims and files checked

Review mode: full; reason: rebase

Claims:

  • An icon ask is a word typed as icon or icons, an installed set's name or an icon export name, never an exact component or hook name, and the rule sits beside the finder's filler words: verified (icon-ranking.mjs:244-288, ask-rule tests).
  • The block needs icon features on and a set that loads, and search's adapter computes it: verified (_adapter.mjs:54-81, CLI structure check).
  • The ask test reads only set directory names, the sets are read only for an ask, and with no set no icon data is read: verified (_adapter.mjs:61-76, _icons.mjs:36-40).
  • Ranking is the finder's own over the sets in tie order, then the answering matches, at most three and fewer under a smaller limit: verified (_icons.mjs:41-46, tests).
  • The icons trail as a separate data.icons, and results and matchCount do not change: verified (tests; runs with no set, one set and four sets).
  • The icon-set record states one rule for search in FR0, FR6, FR11 and DEC-2: verified (record lines 119-120, 158-160, 236, 268-275, 397-402, 827-831 and the verification row at 798).
  • The result-order record gains one sentence: verified (lines 55-57).
  • The block appears only where icon features are on, and its types are marked experimental: verified (_adapter.mjs:61, search.type.mjs:43, :58, :72).
  • Entry fields, the trailing Icons (n) text block, no --type icon, and unchanged search domains and --type: verified (_icons.mjs:47-57, commands/search.mjs:222-235, tests; the heading reads Icons (n of m) when capped).
  • Search's own doc is not edited, and the block is documented in the experimental icon finder doc and the types: verified (icon.doc.mjs:19).
  • The lexical ranker, build, the search index pair and the gather cache are untouched, and sets are read on each call: verified (diff; install-and-remove test).
  • With no set installed, the ten listed queries print exactly what main prints, stdout and stderr: verified (this head's CLI against main's, text and JSON, exit codes included).
  • With a fixture set installed, queries that do not ask answer as with none, IconButton, NavIcon and Icon included: verified (tests; runs).
  • With four large sets installed, the five listed queries stay byte-identical: verified (runs with four synthetic sets of the listed sizes).
  • An integration component that declares the keyword icon keeps its place: verified (test).
  • No query in the search and build tests that is not about icons opens the block: verified (those suites pass unchanged).
  • Added time: a query that does not ask adds about a millisecond, and an icon ask over four large sets adds tens of milliseconds: consistent (within noise, and 54 to 63 ms in a four-set project here).
  • The listed tests pass and the CLI structure check is clean: verified (this head; CI lint).
  • The writing-rubric results match the record edits: verified.
  • Changeset: with an icon set installed, an icon ask lists up to three icons after the results, the results and their count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear; one optional note on the verification row.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/foundation/integrations/icon-features.mjs: clear.
  • packages/cli/test/experimental-isolation.test.mjs: clear.

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.

Approved pending CI: CI found no room at this head, so its test, typecheck and build jobs did not run; re-run all jobs (or push) so they run before merge.

The earlier finding is fixed: search's icons block now comes from the icon finder's own ranking with the project's look, so a project with experimental.iconVariant: 'solid' gets TrashSolidIcon from astryx search trash icon, as from astryx experimental icon trash, and the new test covers it. An engineering owner approved the icon-set and result-order record changes at this exact head, and with no icon set installed search prints exactly what the base prints.

Optional: the Testing section counts 10 tests in search.icons.test.mjs; there are 11 now.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • An icon ask is a word typed as icon or icons, an installed set's name, or an icon export name, never an exact component or hook name, and the rule sits beside the finder's filler words: verified (icon-ranking.mjs:243-288, ask-rule tests).
  • The block needs icon features on and a set that loads, search's adapter computes it, the ask test reads only set directory names, and the sets are read only for an ask: verified (_adapter.mjs:54-86, _icons.mjs:43-48).
  • With no set, search reads no icon data: verified (the gate is off before any set read; 20 base-against-head runs identical).
  • Ranking is the finder's own over the sets in tie order, capped at three and fewer under a smaller limit: verified (_icons.mjs:49-52 calls the finder's ranking with the project's look; cap tests; --limit 2 run).
  • The icons trail as a separate data.icons, and results and matchCount do not change: verified (tests; head JSON equals the base apart from icons).
  • The icon-set record states one rule for search across its placement, finder, search and decision clauses, and the result-order record gains one sentence: verified (record diff).
  • The block appears only where icon features are on, and its types are marked experimental: verified (_adapter.mjs:61, search.type.mjs:43, :58, :72).
  • Entry fields, no description field, the trailing Icons (n) text block, no --type icon, and unchanged search domains and --type: verified (_icons.mjs:55-65, commands/search.mjs:223-236, JSON and text runs).
  • Search's own doc is unchanged, and the block is documented in the icon finder's doc and the types: verified (icon.doc.mjs:19).
  • The lexical ranker, build, the search index and the gather cache are untouched, and sets are read on each call: verified (diff; install-and-remove test).
  • With no set installed, the ten listed queries print exactly what the base prints, stdout and stderr: verified (head CLI against base CLI, text and JSON).
  • With a fixture set installed, queries that do not ask answer as with none, Icon, IconButton and NavIcon included: verified (tests; button and IconButton runs).
  • With four large sets installed, five non-ask queries stay byte-identical: verified by code path (a query with no ask word returns before any set read, _icons.mjs:44-46); not re-measured with large sets.
  • A component that declares the keyword icon keeps its place: verified (test).
  • No non-icon query in the search and build tests opens the block: verified (none of their 134 literal queries holds an ask word).
  • The listed suites pass and the CLI structure check is clean: verified (search.icons 11, search-return-type 1, experimental-isolation 54, icon 52, search 78; structure check passes); the stated count of 10 for search.icons predates the added look test.
  • The added-time figures: not re-measured warm; cold runs show about 8 ms more import time and no measurable change in a whole search.
  • The writing-rubric results match the record edits: verified.
  • Changeset: with an icon set installed an icon ask lists up to three icons after the results, results and count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/foundation/integrations/icon-features.mjs: clear.
  • packages/cli/test/experimental-isolation.test.mjs: clear.

Automated review (maintainer link)

With an icon set installed, a search with no type whose query asks for an
icon (a word as typed that is icon or icons, a set's name, or an icon export
name that is not a component or hook name) also returns up to three icons,
ranked by the icon finder, as a trailing icons section. The results and
their count do not change; with no set installed, search answers as before.
…ch rule in the icon-set record

The adapter computes the section, so disk-backed discovery stays in it.
FR0, FR11 and DEC-2 state the same rule as FR6: search reads icon sets only
for an icon ask where icon features are on, appends at most three icons in
its own block, and never changes results or matchCount. The section's types
are marked experimental.
…r headers name search's icons block

The FR0/FR11 verification row checks search's results and matchCount with a
set installed and lets an icon ask append its icons block. FR0 and the gate's
header list search among the gate's readers; FR6 and the ranker's header say
the icons block takes word matches too. The isolation suite's title says it
checks search's results.
The block takes the icon finder's own answer (rankIconSets with the
project's looks), so with experimental.iconVariant it prints the look's
import, as astryx experimental icon <words> does.
@josephfarina josephfarina reopened this Nov 18, 2026
@josephfarina
josephfarina force-pushed the josephfarina/search-icon-section branch from c948e48 to 4442093 Compare November 18, 2026 03:56
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 4442093

@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 small fixes in search's icon block. The icon-set and result-order record changes are owner-approved at this head, and with no icon set installed search still prints exactly what the base prints.

  • Miss: packages/cli/foundation/discovery/icon-ranking.mjs:262-263 redefines the icon export-name pattern that icon-set-discovery.mjs already exports as ICON_EXPORT_NAME_RE (used by Doctor's import check and the integration export-name check), so import it beside definitionsByIcon and delete the copy so search's ask test cannot drift from that contract.
  • Miss: when two installed packages ship a set of one name, packages/cli/api/search/_icons.mjs:58 and :65 give both entries the bare name glyphs/trash and the command astryx experimental icon glyphs/trash, which exits 1 because the icon-set record requires the qualified <package>/<set> form for such a name, so qualify the set in both fields when another installed set shares it and add a test for that case.

Optional: after the rebase, "Icons are not among them" in the result-order record's FR1 follows the searchCore sentence, so "Icons are not among the results:" keeps its subject.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • The icon-set record states one search rule across its placement, finder, search and decision clauses, and the result-order record says the block changes neither results nor count: verified (record diff).
  • The CLI structure check, the knowledge check and a strict typecheck of the touched files pass, and the touched tests pass: verified (both checks pass; strict typecheck errors only in two untouched page templates that need a built theme; 116 test files, 2,214 tests pass).
  • An icon ask is a word typed as icon or icons, an installed set's name, or an icon export name, never an exact component or hook name, and the rule lives once beside the finder's filler words: verified (icon-ranking.mjs:243-288, ask-rule tests); its export-name pattern is the copy named above.
  • The block needs icon features on and a set that loads, search's adapter computes it, the ask test reads only set directory names, the sets are read only for an ask, and with no set no icon data is read: verified (_adapter.mjs:54-86, _icons.mjs:43-47).
  • Ranking is the finder's own over the sets in tie order, capped at three and fewer under a smaller limit: verified (_icons.mjs:49-52; --limit 1 prints Icons (1 of 2)).
  • The icons trail as a separate data.icons, and results and matchCount do not change: verified (tests; head JSON without icons equals the base JSON).
  • The block appears only where icon features are on, and its types are marked experimental: verified (_adapter.mjs:61, search.type.mjs).
  • Entry fields, no description field, the trailing Icons (n) text block, no --type icon, and unchanged search domains: verified (_icons.mjs:56-66, commands/search.mjs:223-236, text and JSON runs); the name and command fields are wrong for two sets of one name (finding above).
  • Search's own doc is unchanged, and the block is documented in the icon finder's doc and the types: verified (icon.doc.mjs:19).
  • The lexical ranker, build, the search index and the gather cache are untouched, and sets are read on each call: verified (diff; install-and-remove test).
  • With no set installed, the ten listed queries print exactly what the base prints, stdout and stderr: verified (20 base-against-head runs, text and JSON).
  • With a fixture set installed, queries that do not ask answer as with none, Icon and IconButton included: verified (tests; base-against-head runs).
  • With four large sets installed, five non-ask queries stay byte-identical: verified by code path (a query with no ask word returns before any set read); not re-run with large sets.
  • A component that declares the keyword icon keeps its place: verified (test).
  • No non-icon query in the search and build tests opens the block: verified (none of their literal queries holds an ask word).
  • The listed suite counts (11, 78, 33, 7, 54, 52 and 1): verified.
  • The added time per search: not re-measured at that precision; whole runs here stayed within noise of the base.
  • The writing-rubric results match the record edits: verified.
  • Changeset: with an icon set installed an icon ask lists up to three icons after the results, results and count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: optional wording note (line 62).
  • docs/specs/AST-084-icon-sets/spec.md: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: blocking finding (lines 58 and 65).
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: blocking finding (lines 262-263).
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior).
  • packages/cli/foundation/integrations/icon-features.mjs: clear.
  • packages/cli/test/experimental-isolation.test.mjs: clear.

Automated review (maintainer link)

Comment thread packages/cli/api/search/_icons.mjs Resolved
Comment thread docs/specs/AST-083-result-order/spec.md Resolved
…age>/<set>

An entry's name and command qualify its set when another installed set
shares the name, so the command runs (iconSetName, shared with the unlisted
sets fix). The ask rule reads the icon export-name pattern the icon-set
discovery exports instead of a copy.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec f7757f1

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 18, 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: the shipped guides and the description still need to catch up with search's icon block. The icon-set and result-order record changes are owner-approved at this head, both earlier code findings are fixed, and with no icon set installed search still prints exactly what the base prints.

  • Miss: packages/cli/assets/docs/tree/icon-sets.doc.mjs:35 and :517 and packages/cli/authoring/config/config.doc.mjs:83 still say astryx search never returns icons, and the icon-sets guide's "Where icon sets show up" table has no search row, so readers in projects with an icon set are told the opposite of what search now does; restate those sentences, add a search row, and add search's data.icons to that table's JSON types row.
  • The description's Testing section counts 11 tests in search.icons.test.mjs ("new, 11" and "11/11"), but the file has 12 at this head, including the new two-packages test, so update the count and list that case (a description edit, no commit needed).
Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • The icon-set record states one search rule across its placement, finder, search and decision clauses, and the result-order record says the block changes neither results nor count: verified (record diff).
  • The CLI structure check, the knowledge check and a strict typecheck of the touched files pass, and the touched tests pass: verified (both checks pass; strict typecheck errors only in two untouched page templates that need a built theme; 116 test files, 2,215 tests pass).
  • An icon ask is a word typed as icon or icons, an installed set's name, or an icon export name, never an exact component or hook name, and the rule lives once beside the finder's filler words: verified (icon-ranking.mjs:244-288, ask-rule tests; the export-name pattern is now the shared one).
  • The block needs icon features on and a set that loads, search's adapter computes it, the ask test reads only set directory names, the sets are read only for an ask, and with no set no icon data is read: verified (_adapter.mjs:54-86, _icons.mjs:44-48).
  • Ranking is the finder's own over the sets in tie order, capped at three and fewer under a smaller limit: verified (_icons.mjs:50-53; --limit 1 prints Icons (1 of 2)).
  • The icons trail as a separate data.icons, and results and matchCount do not change: verified (tests; head JSON without icons equals the base JSON).
  • The block appears only where icon features are on, and its types are marked experimental: verified (_adapter.mjs:61, search.type.mjs).
  • Entry fields, no description field, the trailing Icons (n) text block, no --type icon, and unchanged search domains: verified (_icons.mjs:56-71, commands/search.mjs:223-236, text and JSON runs); a set two packages ship is written <package>/<set>, as the icon-set record names such a set.
  • Search's own doc is unchanged, and the block is documented in the icon finder's doc and the types: verified (icon.doc.mjs:19); the icon-sets guide and the config field reference still contradict it (first finding).
  • The lexical ranker, build, the search index and the gather cache are untouched, and sets are read on each call: verified (diff; install-and-remove test).
  • With no set installed, the ten listed queries print exactly what the base prints, stdout and stderr: verified (20 base-against-head runs, text and JSON).
  • With a fixture set installed, queries that do not ask answer as with none, Icon, NavIcon and IconButton included: verified (tests; base-against-head runs).
  • With four large sets installed, five non-ask queries stay byte-identical: verified by code path (a query with no ask word returns before any set read); not re-run with large sets.
  • A component that declares the keyword icon keeps its place: verified (test).
  • No non-icon query in the search and build tests opens the block: verified (no other search or build test installs an icon set).
  • The listed suite counts: false for the icon-section file (12 tests, not 11, second finding); the search, command text, discover line, isolation, icon and return-type counts are verified.
  • Consumer docs ship with the feature: false (first finding).
  • The added time per search: not re-measured.
  • The writing-rubric results match the record edits: verified.
  • Changeset: with an icon set installed an icon ask lists up to three icons after the results, results and count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear; the guides it should agree with are the first finding.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear (12 tests; second finding is about the description).
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior for the existing callers).
  • packages/cli/foundation/integrations/icon-features.mjs: clear.
  • packages/cli/test/experimental-isolation.test.mjs: clear.

Automated review (maintainer link)

Comment thread packages/cli/api/icon/icon.doc.mjs Resolved
… shows icons

Where icon features are on, an icon ask in astryx search also lists up to
three installed icons in its own icons block after the results; results and
matchCount never hold an icon, and a --type search lists none. The guide's
table gains a search row.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec d999f8c

@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: CI found no room at this head, so its test, typecheck and build jobs did not run; re-run all jobs. Both earlier findings are fixed: the icon-sets guide and the experimental.iconSet field reference now say where search shows icons, and the description's test count matches the file. The icon-set and result-order record changes are owner-approved at this head, and with no icon set installed search prints exactly what the base prints.

  • Non-blocking: the guide's new astryx search row (packages/cli/assets/docs/tree/icon-sets.doc.mjs:541) could add that a component or hook name such as NavIcon is not an icon ask, and that the follow-up command appears only in --json.
Claims and files checked

Review mode: incremental; reason: none

Claims:

  • The icon-set record states one search rule across its placement, finder, search and decision clauses, and the result-order record says the block changes neither results nor count: verified (record diff).
  • The CLI structure check, the knowledge check and a strict typecheck of the touched files pass, and the touched tests pass: verified (both checks pass; strict typecheck errors only in two untouched page templates that need a built theme; 116 test files, 2,215 tests pass).
  • An icon ask is a word typed as icon or icons, an installed set's name, or an icon export name, never an exact component or hook name, and the rule lives once beside the finder's filler words: verified (icon-ranking.mjs:244-288, ask-rule tests).
  • The block needs icon features on and a set that loads, search's adapter computes it, the ask test reads only set directory names, the sets are read only for an ask, and with no set no icon data is read: verified (_adapter.mjs:54-86, _icons.mjs:44-48).
  • Ranking is the finder's own over the sets in tie order, capped at three and fewer under a smaller limit: verified (_icons.mjs:50-53 through the finder's ranking; --limit 1 prints Icons (1 of 3)).
  • The icons trail as a separate data.icons, and results and matchCount do not change: verified (tests; head JSON without icons equals the base JSON).
  • The block appears only where icon features are on, and its types are marked experimental: verified (_adapter.mjs:61, search.type.mjs:43, :58, :72).
  • Entry fields, no description field, the trailing Icons (n) text block, no --type icon, and unchanged search domains and --type: verified (_icons.mjs:55-71, commands/search.mjs:223-236, text and JSON runs).
  • Search's own doc is unchanged, and the block is documented in the icon finder's doc and the types: verified (icon.doc.mjs:19; the icon-sets guide and the config field now describe it too).
  • The lexical ranker, build, the search index and the gather cache are untouched, and sets are read on each call: verified (diff; install-and-remove test).
  • With no set installed, the ten listed queries print exactly what the base prints, stdout and stderr: verified (16 queries in text and JSON, and the stable field reference, against the base).
  • With a fixture set installed, queries that do not ask answer as with none, Icon, NavIcon and IconButton included: verified (tests; base-against-head runs).
  • With four large sets installed, five non-ask queries stay byte-identical: verified by code path (a query with no ask word returns before any set read) and fixture runs; not re-run with large sets.
  • A component that declares the keyword icon keeps its place: verified (test).
  • No non-icon query in the search and build tests opens the block: verified (no other search or build test installs an icon set).
  • The listed suite counts (12, 78, 33, 7, 54, 52 and 1): verified (vitest at this head).
  • The added time per search: partly verified (re-timed with a small fixture set: about 1 to 2 ms for a query that does not ask; the large-set figure for an icon ask was not reproduced).
  • The writing-rubric results match the record edits: verified.
  • One capability, no unrelated changes, consumer docs and tests ship with it, and no internal context in public text: verified (one formatting reflow in _adapter.mjs; guides updated; scan of added lines, commits, title, body and branch).
  • Changeset: with an icon set installed an icon ask lists up to three icons after the results, results and count do not change, a typed search lists none, and with no set every search answers as before: verified.

Files:

  • .changeset/search-icon-section.md: clear.
  • docs/specs/AST-083-result-order/spec.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/search/_adapter.mjs: clear.
  • packages/cli/api/search/_icons.mjs: clear.
  • packages/cli/api/search/search-return-type.test.mjs: clear.
  • packages/cli/api/search/search.icons.test.mjs: clear.
  • packages/cli/api/search/search.mjs: clear.
  • packages/cli/api/search/search.type.mjs: clear.
  • packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear, with the non-blocking note above; agrees with the icon finder doc and the field reference.
  • packages/cli/authoring/config/config.doc.mjs: clear.
  • packages/cli/clients/cli/commands/search.mjs: clear.
  • packages/cli/foundation/discovery/icon-ranking.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear (same behavior for the existing callers).
  • packages/cli/foundation/integrations/icon-features.mjs: clear.
  • packages/cli/test/experimental-isolation.test.mjs: clear.

Automated review (maintainer link)

],
[
'`astryx search`',
"A search with no `--type` that asks for an icon (a word `icon` or `icons`, an installed set's name, or an export name such as `SearchIcon`) lists up to three installed icons in an `icons` block after its results, ranked as `astryx experimental icon <words>` ranks them, each with its import line and the command that reads it. The results and their count never hold an icon, and a search with `--type` lists none.",

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: this row defines an ask without the exception the finder doc states, that a component or hook name (NavIcon, Icon) is not one (icon-ranking.mjs:279), and the text view prints only id (set): import, so the command is JSON-only. Suggested: "...or an export name such as SearchIcon that is not a component or hook name..." and "each with its import line (and, in --json, the command that reads it)".

@josephfarina josephfarina reopened this Nov 18, 2026
@josephfarina
josephfarina merged commit b2cf0a1 into main Nov 18, 2026
135 of 141 checks passed
@github-actions
github-actions Bot deleted the josephfarina/search-icon-section branch November 19, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — d999f8c6 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