Skip to content

docs(cli): agent docs name the prop names that differ from other libraries - #12252

Closed
josephfarina wants to merge 2 commits into
mainfrom
josephfarina/agent-text-astryx-names
Closed

josephfarina wants to merge 2 commits into
mainfrom
josephfarina/agent-text-astryx-names

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Reader impact

Coding agents read the Astryx agent docs (astryx init writes them into AGENTS.md and friends; astryx init --user writes the computer-level skill). Many agents write props before they read a component, and then they write other libraries' names: <Button>Save</Button> instead of label, checked instead of value on CheckboxInput and Switch, open instead of isOpen. 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:

Astryx names differ from other libraries: buttons, badges, tokens and tabs take their text in label (Text, Heading and Link take children), booleans start with is or has (isOpen, isDisabled), and every input takes value and onChange.

Source of truth

  • Core's component props: Button, Badge, Token and Tab take label; Text, Heading and Link take children; booleans use the is/has prefix (isOpen, isDisabled, isLabelHidden, hasDividers); every input root takes value and onChange (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 own hAlign and vAlign, they accept align and justify, so the names other libraries use already work there.
  • The workflow lines are one constant, WORKFLOW_STEPS in packages/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 put label on 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

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

Testing

pnpm exec vitest run --project node packages/cli/foundation/agent-docs packages/cli/api/init packages/cli/test/docs-graph.test.mjs packages/cli/api/upgrade
# 19 files, 495 passed, 2 expected fails
node scripts/generate-setup-contract.mjs --check
node scripts/generate-agent-plugin-skill.mjs --check

@vercel

vercel Bot commented Nov 17, 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 11:18pm UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one 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 present align and justify on VStack and HStack as other libraries' names that Astryx lacks, but both stacks accept them as documented aliases (the align and justify props in VStack.tsx and HStack.tsx), so either drop the stacks clause from the sentence and the changeset, or say that hAlign and vAlign are the stacks' own names and align and justify still 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 init output.
  • 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 is or has. Verified for component props.
  • Claim: every input takes value and onChange. Verified for each input the description lists.
  • Claim: VStack and HStack align with hAlign and vAlign. Verified. False where it presents align and justify as 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 upgrade or astryx init refreshes 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 align and justify, 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).

Automated review (maintainer link)

Comment thread .changeset/agent-text-astryx-names.md Resolved
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b3be627

⏳ Building… Until it's ready, Storybook · Sandbox open the branch's previous preview.

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


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI. The 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 init writes 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:651 and computer-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 no label prop, and Link uses its label only as the accessible name (Link.tsx:200).
  • Claim, booleans start with is or has (isOpen, isDisabled, isLabelHidden, hasDividers): verified. Of Core's 343 pure-boolean component props, only value and the defaultIs… and defaultHas… defaults differ.
  • Claim, each of the 20 listed inputs takes value and onChange: verified in each component's props.
  • Claim, VStack and HStack also accept align and justify: verified, VStack.tsx:48, :54 and HStack.tsx:48, :54.
  • Claim, <Button>Save</Button>, checked and open are wrong on the base: verified. label is required, CheckboxInput and Switch take value, and no component has an open prop.
  • Claim, both generated copies are in sync: verified, both --check runs 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 upgrade or astryx init refreshes 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.

Automated review (maintainer link)

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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI. The 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:689 and computer-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 no label prop, and Link uses its label only as the accessible name (Link.tsx:443).
  • Claim, booleans start with is or has (isOpen, isDisabled, isLabelHidden, hasDividers): verified. Of Core's 345 boolean component props, only value and the defaultIs… and defaultHas… defaults differ.
  • Claim, each of the 20 listed inputs takes value and onChange: verified in each component's props.
  • Claim, VStack and HStack also accept align and justify: verified, VStack.tsx:48, :54 and HStack.tsx:48, :54.
  • Claim, <Button>Save</Button>, checked and open are wrong on the base: verified. label is required, CheckboxInput and Switch take value, and no component has an open prop.
  • Claim, both generated copies are in sync: verified, both --check runs 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 upgrade or astryx init refreshes 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.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 18, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #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]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12718.

@github-actions
github-actions Bot deleted the josephfarina/agent-text-astryx-names branch November 19, 2026 06:05

This branch was successfully deployed

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