Repository navigation
feat(cli): where icon features are on, the agent block sends agents to the icon finder - #12210
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
josephfarina
left a comment
There was a problem hiding this comment.
Wording review (agent docs): OK.
- The line is exactly the measured text. It sits right under the runner line and writes the bare
astryxcommand, which the runner line above it covers. - The computer-level skill stays free of experimental commands, and a test proves it.
- The changeset and the spec sentence describe the same rule in the present tense.
Optional, not blocking: the experimental.iconSet test also installs an icon-set package, so it does not isolate the config path. If the config alone is meant to turn the line on, as the changeset says, a case with no package installed would show it.
f19ca5d to
cf943e0
Compare
696ea51 to
ed82bab
Compare
|
/approve-spec ed82bab |
There was a problem hiding this comment.
Requesting changes for one false sentence in the pull request description; the code, the new AST-084 sentence, the changeset and the tests check out, and the spec sentence carries an engineering owner's approval for this head.
- The description says
doctor's agent-docs freshness check expects the new line because it compares against the same rendered block, butcheckAgentDocsinpackages/cli/api/doctor/doctor.mjsonly checks that the Astryx block is present; onlyastryx upgradecompares the block, so please reword that sentence (for example: "astryx initwrites the line, andastryx upgradereports a block without it and rewrites it with--apply;doctorchecks only that the block is there").
Two optional suggestions are inline: move the new iconFeatures JSDoc paragraph off the version parameter, and have the config-only test assert that the line is present.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset: with an icon-set package installed or
experimental.iconSetset, the block thatinitandupgradewrite gains the line under the runner line: verified (agent-docs.mjs:651,:827; tests; a config-only render). - Changeset: with icon features off, the block does not change: verified (
agent-docs.mjs:651;agent-docs.test.mjs:400-409). renderAgentDocsBlockpasses the gate's answer andgenerateCompressedIndexadds the line right under the runner line: verified.- The line writes the bare command and the runner line above it names the project's runner: verified (
agent-docs.test.mjs:416-417). - Off, the block is byte-for-byte the same: verified (the only off-path change is the conditional push).
- The computer-level agent text never gets the line, and a test proves it: verified (
agent-docs.test.mjs:421-425). - AST-084 FR0 gains one sentence and the agent-docs test joins its verified files: verified (
spec.md:23,:129-133). - Installing an icon-set package counts as an opt-in under AST-017 FR27: verified on the base branch, where the stacked pull request adds that sentence.
initandupgradewrite the line: verified (api/init/run/run.mjs:126,api/upgrade/_adapter.mjs:558).doctor's agent-docs check compares against the same rendered block: false (api/doctor/doctor.mjs:843-950checks markers only).- No JSON shape changes and no caller burden: verified.
- The five listed tests exist and cover what they say: verified; the config-only test compares with the gate rather than asserting the line.
- Without a pack the block is identical; with a pack it differs by the one line only: verified (rendered blocks compared).
- Test runs: the agent-docs, icon-set, init, upgrade, doctor and experimental-isolation suites (34 files) and the knowledge check pass at this head; the full CLI suite, the repository check, the strict typecheck, ESLint and Prettier were not re-run.
- File
.changeset/icon-finder-agent-line.md: clear. - File
docs/specs/AST-084-icon-sets/spec.md: clear. - File
packages/cli/foundation/agent-docs/agent-docs.mjs: non-blocking JSDoc placement note. - File
packages/cli/foundation/agent-docs/agent-docs.test.mjs: non-blocking assertion note.
e34f57b to
9f75bc0
Compare
ed82bab to
3ca1021
Compare
|
/approve-spec 3ca1021 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The gated agent-block line, the new AST-084 FR0 sentence (approved by an engineering owner for this head), the changeset and the tests check out, and the earlier description fix and both optional suggestions are in.
- Miss: (optional) where
experimental.iconSetnames a set that no installed package ships, the block still says to paste the import the finder prints, butastryx experimental iconthere prints only an install step; the approved FR0 sentence covers this case, so nothing needs to change unless you want the finder's no-set answer to say what to do instead.
Claims and files checked
Review mode: full; reason: rebase
- Changeset: with an icon-set package installed or
experimental.iconSetset, the block thatinitandupgradewrite gains the line under the runner line: verified (agent-docs.mjs:667,:843; tests; rendered blocks). - Changeset: with icon features off, the block does not change: verified (a no-pack block is byte-identical at the base and the head).
renderAgentDocsBlockpasses the gate's answer andgenerateCompressedIndexadds the line right under the runner line: verified (agent-docs.mjs:664-668,:843).- The line writes the bare command and the runner line above it names the project's runner: verified (
agent-docs.test.mjs:412-419). - Off, the block is byte-for-byte the same: verified (same sha256 at base and head).
- The computer-level agent text never gets the line, and a test proves it: verified (
agent-docs.test.mjs:421-425). - AST-084 FR0 gains one sentence and the agent-docs test joins its verified files: verified (
spec.md:23,:129-133). - Installing an icon-set package is an opt-in under AST-017 FR27: verified on
main. - The before/after table (unchanged without an opt-in; one line under the runner line with one): verified.
initwrites the line,upgradereports a block without it and rewrites it with--apply, anddoctorchecks only that the block is there: verified (api/init/run/run.mjs:172,api/upgrade/_adapter.mjs:558,api/doctor/doctor.mjs:843-950).- No JSON shape changes and no caller burden: verified.
- The line shows only where a finder answer can lead to a pack icon: verified for installed sets; a configured set that is not installed gets an install step instead of an import (the optional note above).
- The block names the runner once and every command below it is bare: verified.
- The five listed tests exist and cover what they say: verified; the config-only test now asserts the gate is on.
- Without a pack the rendered block is identical; with a pack it differs by the one line only: verified (rendered blocks compared).
- One capability, no unrelated changes, and no internal context: verified (four files; nothing internal in the added lines, title, body or commits).
- Test runs: the agent-docs, icon-gate, experimental-isolation, init, doctor and upgrade suites (12 files), the knowledge and changeset checks, and ESLint pass at this head; Prettier passes on every added line; the strict typecheck reports only two template pages that need a theme build; the full CLI suite and the repository check were not re-run.
- The author's agent experiment and the reasons for rejecting the other placements: not checkable from the code.
- Writing rubric: the FR0 sentence is present tense, with no narration, research, references or open questions: verified.
- File
.changeset/icon-finder-agent-line.md: clear. - File
docs/specs/AST-084-icon-sets/spec.md: clear. - File
packages/cli/foundation/agent-docs/agent-docs.mjs: clear. - File
packages/cli/foundation/agent-docs/agent-docs.test.mjs: clear.
PR Analysis Report🔎 Preview ·
|
…o the icon finder Where an icon-set package is installed or experimental.iconSet is set, the agent block that init and upgrade write carries one line under its runner line: "Need an icon? Run `astryx experimental icon <what it means>` and paste the import it prints, instead of copying one from a template or other code." Where icon features are off, the block does not change. The computer-level agent text never carries it.
…ly experimental.iconSet set
…config-only test asserts the line is there
3ca1021 to
2ea912c
Compare
|
/approve-spec 2ea912c |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet. The gated agent-block line, the new icon-set FR0 sentence (approved by an engineering owner for this head), the release note and the tests check out after the rebase, and both earlier optional suggestions are in.
- Optional: where
experimental.iconSetnames a set that no installed package ships, the block still says to paste the import the finder prints, butastryx experimental iconthere prints only an install step; the approved FR0 sentence covers this case, so nothing needs to change unless you want the finder's no-set answer to say what to do instead.
Claims and files checked
Review mode: full; reason: rebase
- Release note: with an icon-set package installed or
experimental.iconSetset, the block thatinitandupgradewrite gains the line under the runner line: verified (agent-docs.mjs:676,:856; tests; rendered blocks). - Release note: with icon features off, the block does not change: verified (a no-pack block is byte-identical at the base and the head).
renderAgentDocsBlockpasses the gate's answer andgenerateCompressedIndexadds the line right under the runner line: verified (agent-docs.mjs:673-676,:856).- The line text is the same in the code, the spec sentence, the release note and the description: verified (byte-for-byte).
- The line writes the bare command and the runner line above it names the project's runner: verified (
agent-docs.test.mjs:428-435). - Off, the block is byte-for-byte the same: verified (same sha256 at base and head).
- The computer-level agent text never gets the line, and a test proves it: verified (
agent-docs.test.mjs:437-441). - The icon-set spec's FR0 gains one sentence and the agent-docs test joins its verified files: verified (
spec.md:24,:131-135). - Installing an icon-set package is an opt-in under the release spec's FR27: verified.
- The before/after table (unchanged without an opt-in; one line under the runner line with one): verified.
initwrites the line,upgradereports a block without it and rewrites it with--apply, anddoctorchecks only that the block is there: verified (api/init/run/run.mjs:171,:186;api/upgrade/_adapter.mjs:558-571,:611;api/doctor/doctor.mjs:1122-1229).- No JSON shape changes and no caller burden: verified.
- The line shows only where a finder answer can lead to a pack icon: verified for installed sets; a configured set with no package gets an install step instead of an import (the optional note above).
- The block names the runner once and every command below it is bare: verified.
- The five listed tests exist and cover what they say: verified (
agent-docs.test.mjs:412-457), and they pass. - Without a pack the rendered block is identical; with a pack it differs by the one line only: verified (rendered blocks compared).
- One capability, no unrelated changes, and no internal context: verified (four files; nothing internal in the added lines, title, body, branch or commits).
- Test runs: the agent-docs, icon-gate, experimental-isolation, init, upgrade, search-icons and MCP suites (17 files, 552 tests), the knowledge and changeset checks, and ESLint pass at this head; Prettier finds nothing in the added lines (the same whole-file differences exist on the base); the strict typecheck reports only two template pages that need a theme build; the full CLI suite and the repository check were not re-run.
- The author's agent experiment and the reasons for rejecting the other placements: not checkable from the code.
- Writing rubric: the FR0 sentence is present tense, with no narration, research, references or open questions: verified.
- File
.changeset/icon-finder-agent-line.md: clear. - File
docs/specs/AST-084-icon-sets/spec.md: clear. - File
packages/cli/foundation/agent-docs/agent-docs.mjs: clear. - File
packages/cli/foundation/agent-docs/agent-docs.test.mjs: clear.
User need
An agent building a page that needs icons almost never asks Astryx for one. It copies an icon from the template it scaffolded, from the starter app's own code, or installs a library the template imports. In a project that installed an icon-set package, that means the pack the project chose goes unused, and in every project the icons drift away from the ones Astryx would pick for the meaning.
We tested where a pointer to the icon finder has to live for agents to act on it. Agents doing everyday tasks that need icons (a sidebar, a text toolbar, an empty state) without ever being told "icon" were given the same one-line pointer in three places: the agent instructions that
astryx initwrites, the end ofastryx component Icon/IconButtonoutput, and the template-copy output. Only the line in the agent instructions changed what they did: with it, every run asked the finder before writing an icon, and in a project with a pack the icons came from the pack. Lines at the end of command output were rarely seen, because agents trim long output and often print templates instead of copying them.Problem and solution fit
Where icon features are on (
iconFeatureGate(project).on: an installed icon-set package, orexperimental.iconSet),renderAgentDocsBlockpassesiconFeatures: trueandgenerateCompressedIndexadds one line right under the runner line:Need an icon? Run \astryx experimental icon ` and paste the import it prints, instead of copying one from a template or other code.`The line writes the bare command, like every other command in the block; the runner line directly above it names the project's runner.
Where icon features are off, the block is byte-for-byte the block it was.
The computer-level agent text (
computer-agent-text.mjs) never gets the line: it keeps experimental commands out (spec:AST-081FR8). A test proves it.Current specification
spec:AST-084(icon sets) FR0 gains one sentence: where icon features are on, the agent docs block carries this line under its runner line; where they are off, it has none.agent-docs.test.mjsjoins itsverified_by.spec:AST-017FR27: installing an icon-set package is an opt-in, so an omitted opt-in still leaves the stable block unchanged.Public delta and caller burden
experimental.iconSetexperimental.iconSetsetCLI: run every command as …astryx initwrites the line, andastryx upgradereports a block without it and rewrites it with--apply;doctorchecks only that the Astryx block is there. No JSON shape changes. Caller burden: none.Design and alternatives
component Icon/IconButtonoutput, and the template-copy note. Agents trim command output (| head,| grep) and print templates rather than copy them, so a line at the end of output rarely reaches them.Evidence
agent-docs.test.mjs, "the icon finder line in the agent block":experimental.iconSetin the config turns it on too;experimental.iconSetwith no package installed: the line shows exactly wheniconFeatureGatesays icon features are on for that project, so it cannot drift from the gate;Scope
Components: CLI agent docs (
packages/cli/foundation/agent-docs/agent-docs.mjs)Testing
pnpm exec vitest run --project node packages/cli: all pass except one Yarn Plug'n'Play row (G59) that fails the same way on the base without this change on the test machine (no Yarn runtime there).pnpm check:repo,pnpm check:knowledge,pnpm -F @astryxdesign/cli typecheck:strict, ESLint and Prettier on the changed files.Writing rubric results