Repository navigation
docs(cli): agent docs name the prop names that differ from other libraries - #12252
josephfarina wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: one claim in the release note and description needs fixing. The agent-docs sentence itself is accurate, and its generated copies are in sync.
- The changeset (
.changeset/agent-text-astryx-names.md) and the description presentalignandjustifyon VStack and HStack as other libraries' names that Astryx lacks, but both stacks accept them as documented aliases (thealignandjustifyprops inVStack.tsxandHStack.tsx), so either drop the stacks clause from the sentence and the changeset, or say thathAlignandvAlignare the stacks' own names andalignandjustifystill work.
The other three clauses match Core's props. Both generator checks pass, and the described test run reproduces: 19 files, 495 passed, 2 expected fails.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the project agent docs and the computer-level skill carry the new step-3 sentence. Verified: one shared workflow constant, and the rendered
astryx initoutput. - Claim: buttons, badges, tokens and tabs take their text in
label, while Text, Heading and Link take children. Verified against the component props. - Claim: booleans start with
isorhas. Verified for component props. - Claim: every input takes
valueandonChange. Verified for each input the description lists. - Claim: VStack and HStack align with
hAlignandvAlign. Verified. False where it presentsalignandjustifyas wrong on stacks, because both stacks accept them as aliases. - Claim: agents now write these names right far more often. Not checkable from the pull request; for stacks it counts working aliases as wrong.
- Claim:
astryx upgradeorastryx initrefreshes a project's agent docs. Verified by the upgrade and init tests. - Claim: one constant feeds both the project agent docs and the skill. Verified.
- Claim: step 3 keeps its text and the line count stays the same. Verified.
- Claim: Core's setup-contract copy and the plugin skill are in sync. Verified: both checks pass, and both fail on drift.
- Claim: the test run gives 19 files, 495 passed, 2 expected fails. Verified.
- Claim: Grid keeps
alignandjustify, which is why the sentence names the stacks. The Grid part is verified; the implied contrast with the stacks is false. - File
.changeset/agent-text-astryx-names.md: finding (the stacks claim). - File
packages/cli/foundation/agent-docs/agent-doc-state.mjs: clear. - File
packages/core/scripts/agent-doc-state.mjs: clear (generated copy). - File
plugins/astryx/skills/astryx/SKILL.md: clear (generated).
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI. The step-3 sentence matches Core's props, both generated copies are in sync, and the release note no longer counts VStack and HStack's align and justify as wrong names. CI's build and test jobs have not run on this head: the main CI run was turned away for capacity before they started, so it needs a re-run before merge.
Claims and files checked
Review mode: incremental; reason: none
changed rules (0): none
- Claim, step 3 adds the quoted sentence and nothing else in the agent docs changes, line counts unchanged: verified. The block
astryx initwrites differs from the base's only on the step-3 line (31 lines each), and the skill stays at 20 lines. - Claim, the project docs and the computer-level skill render the workflow from one constant: verified,
agent-docs.mjs:651andcomputer-agent-text.mjs:274. - Claim, Button, Badge, Token and Tab take
label: verified,Button.tsx:389,Badge.tsx:206,Token.tsx:78,Tab.tsx:64. - Claim, Text, Heading and Link take children and do not render a
label: verified,Text.tsx:157,Heading.tsx:190,Link.tsx:303. Text and Heading have nolabelprop, and Link uses itslabelonly as the accessible name (Link.tsx:200). - Claim, booleans start with
isorhas(isOpen,isDisabled,isLabelHidden,hasDividers): verified. Of Core's 343 pure-boolean component props, onlyvalueand thedefaultIs…anddefaultHas…defaults differ. - Claim, each of the 20 listed inputs takes
valueandonChange: verified in each component's props. - Claim, VStack and HStack also accept
alignandjustify: verified,VStack.tsx:48,:54andHStack.tsx:48,:54. - Claim,
<Button>Save</Button>,checkedandopenare wrong on the base: verified.labelis required, CheckboxInput and Switch takevalue, and no component has anopenprop. - Claim, both generated copies are in sync: verified, both
--checkruns pass on this head. - Claim, the listed test run gives 19 files, 495 passed and 2 expected fails: verified, reproduced exactly.
- Claim, docs only, with no runtime, API, visual or policy change: verified. A built API-surface comparison of Core, the build package and the seven themes finds no change, and no CLI command, option or export changes.
- Claim, the before and after model test (and the release note's "far more often"): these are reported results with no data in the repository, so they are not checked and not relied on.
- Release note, the agent docs and the computer-level skill name these props in step 3: verified, the note matches the sentence.
- Release note,
astryx upgradeorastryx initrefreshes a project's agent docs: verified. Upgrade compares whole block bytes (api/upgrade/_adapter.mjs:570). - Release note, patch releases for the CLI and Core: verified, both packages ship the changed file.
- File
.changeset/agent-text-astryx-names.md: clear. - File
packages/cli/foundation/agent-docs/agent-doc-state.mjs: clear. - File
packages/core/scripts/agent-doc-state.mjs: clear. It is the generated copy, with an identical step 3. - File
plugins/astryx/skills/astryx/SKILL.md: clear. It is regenerated, with a matching managed hash.
…aries The workflow's third step in the agent docs and the computer-level skill now says that buttons, badges, tokens and tabs take their text in `label` (Text, Heading and Link take children), that booleans start with `is` or `has`, that every input takes `value` and `onChange`, and that VStack and HStack align with `hAlign` and `vAlign`. Coding agents that write props before they read a component reach for other libraries' names (children, checked, open, align and justify); this sentence gives them ours. Core's setup-contract copy and the plugin skill are regenerated.
VStack and HStack accept `align` and `justify` besides their own `hAlign` and `vAlign`, so the names other libraries use already work there. The sentence keeps the three cases where they do not.
1305549 to
b3be627
Compare
There was a problem hiding this comment.
Approved pending CI. The step-3 sentence matches Core's props at this head, and both generated copies are in sync. CI's build and test jobs have not run on this head: the CI run was turned away for capacity before they started, so it needs a re-run before merge. The Testing section's counts predate the rebase; the same command now runs 22 files, with 585 passing and 2 expected failures.
Claims and files checked
Review mode: full; reason: rebase
- Claim, step 3 adds the quoted sentence and nothing else in the agent docs changes, line counts unchanged: verified. The rendered project block and computer-level skill differ from the base's only on the step-3 line (and the skill's hash), with the same line counts.
- Claim, the project docs and the computer-level skill render the workflow from one constant: verified,
agent-docs.mjs:689andcomputer-agent-text.mjs:280. - Claim, Button, Badge, Token and Tab take
label: verified,Button.tsx:389,Badge.tsx:206,Token.tsx:78,TabList/Tab.tsx:64. - Claim, Text, Heading and Link take children and do not render a
label: verified,Text.tsx:157,Heading.tsx:190,Link.tsx:305; Text and Heading have nolabelprop, and Link uses itslabelonly as the accessible name (Link.tsx:443). - Claim, booleans start with
isorhas(isOpen,isDisabled,isLabelHidden,hasDividers): verified. Of Core's 345 boolean component props, onlyvalueand thedefaultIs…anddefaultHas…defaults differ. - Claim, each of the 20 listed inputs takes
valueandonChange: verified in each component's props. - Claim, VStack and HStack also accept
alignandjustify: verified,VStack.tsx:48,:54andHStack.tsx:48,:54. - Claim,
<Button>Save</Button>,checkedandopenare wrong on the base: verified.labelis required, CheckboxInput and Switch takevalue, and no component has anopenprop. - Claim, both generated copies are in sync: verified, both
--checkruns pass on this head. - Claim, the listed test run passes with 2 expected fails: verified; it now counts 22 files and 585 passing tests, not 19 and 495, because the rebase added three test files.
- Claim, docs only, with no runtime, API, visual or policy change: verified. A built API-surface comparison of Core, the build package and the seven themes finds no change, and no CLI command, option or export changes.
- Claim, the before and after model test (and the release note's "far more often"): reported results with no data in the repository, so not checked and not relied on.
- Release note, the agent docs and the computer-level skill name these props in step 3: verified, the note matches the sentence.
- Release note,
astryx upgradeorastryx initrefreshes a project's agent docs: verified. A block whose bytes differ is stale (agent-docs.mjs:447), and upgrade refreshes it. - Release note, patch releases for the CLI and Core: verified, both packages ship the changed file (
packages/core/package.json:917). - File
.changeset/agent-text-astryx-names.md: clear. - File
packages/cli/foundation/agent-docs/agent-doc-state.mjs: clear. - File
packages/core/scripts/agent-doc-state.mjs: clear. It is the generated copy, with an identical step 3. - File
plugins/astryx/skills/astryx/SKILL.md: clear. It is regenerated, with a matching managed hash.
- #12252 docs(cli): agent docs name the prop names that differ from other libraries Author: Joey Farina <[email protected]> - #12154 fix(core): a numeric typography weight builds through an extended base's adaptation rules Author: Joey <[email protected]> - #12092 fix(cli): theme build reads the Core it builds with for variant declarations, and names the build command alone Author: Joey Farina <[email protected]> - #12316 fix(core): a shorthand never follows its own longhand in one style merge Author: josephfarina <[email protected]> - #12357 fix(core): a Table stays the scroll region when a host scrolls every table's parent Author: Joey Farina <[email protected]> - #12349 fix(core): end a mouse drag a sandboxed frame never saw released Author: josephfarina <[email protected]> - #12425 fix(cli): use a stored doc parse only with the zod release that made it Author: Joey <[email protected]> - #12396 fix(AppShell): with the standard width points, a server-rendered shell hides its inline side nav on a phone before its script runs Author: Joey <[email protected]> - #12438 fix(charts): end dots draw whole and a thinned axis keeps its last label Author: Joey Farina <[email protected]> - #12448 fix(cli): upgrade outside a project names the project, not --from Author: Joey Farina <[email protected]> - #12459 fix(templates): the dashboard scorecard fits a phone screen Author: Joey Farina <[email protected]> - #12428 fix(core): Field labels draw in a bolder face than their description Author: Joey Farina <[email protected]> - #12435 fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral Author: Joey <[email protected]> - #12432 fix(templates): dashboard chart labels show whole instead of clipped by the chart edge Author: Joey Farina <[email protected]> - #12441 fix(cli): mark icon-set generated calls pure so apps drop unused icons Author: Joey Farina <[email protected]> - #12472 fix(MetadataListItem): a value breaks only a word longer than its line Author: Joey <[email protected]>
|
Landed in #12718. |
Reader impact
Coding agents read the Astryx agent docs (
astryx initwrites them intoAGENTS.mdand friends;astryx init --userwrites the computer-level skill). Many agents write props before they read a component, and then they write other libraries' names:<Button>Save</Button>instead oflabel,checkedinstead ofvalueon CheckboxInput and Switch,openinstead ofisOpen. The workflow already says to read a component's props first; it does not say which names differ, so an agent that skips that step has no hint.After this change, the third workflow step names the differences in one sentence:
Source of truth
label; Text, Heading and Link take children; booleans use theis/hasprefix (isOpen,isDisabled,isLabelHidden,hasDividers); every input root takesvalueandonChange(TextInput, TextArea, NumberInput, Selector, MultiSelector, ComplexSelector, Typeahead, DateInput, DateRangeInput, DateTimeInput, TimeInput, Slider, CheckboxInput, CheckboxList, Switch, RadioList, SegmentedControl, FileInput, ToggleButtonGroup, Calendar). VStack and HStack are left out on purpose: besides their ownhAlignandvAlign, they acceptalignandjustify, so the names other libraries use already work there.WORKFLOW_STEPSinpackages/cli/foundation/agent-docs/agent-doc-state.mjs, shared by the project agent docs and the computer-level skill.Correction
Step 3 keeps its text and adds the sentence above. Nothing else in the agent docs changes; the line count stays the same.
We tested the wording with coding models that wrote code from plain requests, with and without the sentence. Without it, the props it names were mostly wrong; with it, they were mostly right, and props it does not name did not change. A first draft said only "text goes in
label", and models then putlabelon Text, Heading and Link, which do not render it; this wording names those three, and that misuse went away.Evidence
Generated artifacts, regenerated and checked:
packages/core/scripts/agent-doc-state.mjs—node scripts/generate-setup-contract.mjs --check: in sync.plugins/astryx/skills/astryx/SKILL.md—node scripts/generate-agent-plugin-skill.mjs --check: in sync.Scope
Components: CLI agent docs (workflow step 3), Core setup-contract copy, agent plugin skill
Testing