feat(cli): help agents discover the right template, blocks & components from a plain-English idea#3097
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
🚀 Vercel Preview Deployment
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Adds `astryx build` — the page-building front door. `build "<idea>"` returns a composition kit (closest page template + blocks that cover parts + components), plus a Compose line; `build` with no args prints the how-to-build playbook. Reworks the shared search ranking it relies on so oblique natural-language queries work: query tokenization + stopwords, a synonym/intent map, light stemming, and page-template keyword enrichment (derived components + category). Co-authored-by: Cursor <cursoragent@cursor.com>
f1855d3 to
b5357a2
Compare
|
Pretty neat. Can you share the vibe test comparison with this strategy? |
build command with natural-language search ranking
Vibe-test comparison (before → after this strategy)@cixzhang — here's the before/after. I re-ran the vibe test on 10 stratified, colloquial prompts (the way people actually describe pages), comparing the pre-PR 1. Discovery recall (deterministic — no agent involved)Running the raw query through the CLI: old
Before: 0/10 returned anything. After: 10/10 surface a relevant template (8/10 as the top pick) plus the blocks to compose it. The old ranking simply doesn't match how people phrase UI ideas; the new 2. Agent runs (10 before / 10 after, one-shot)Both sets build green (these are capable models that work around gaps), so the signal is in how they get there:
The before-runs also surfaced two frictions the sibling PRs address (called out so the picture is complete, not attributed to this PR): the docs Quick Start omitting the required Honest caveats
Method10 stratified prompts; before = PRs' merge-base on |
Pre-1.0 repo requires patch bumps; changeset body needs a [category] tag. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
astryx build— the page-building front door:build "<idea>"returns a composition kit: the closest page template, the blocks that cover parts, and components to fill gaps, plus a one-lineCompose:suggestion.buildwith no args prints the how-to-build playbook.category).searchstill exposes the same engine as a flat universal lookup.Why
In vibe-testing, agents using the published CLI never used
search(0/20) and never discovered the 517-block library. A composition-orientedbuildfront door + better ranking got agents to discover and compose from pages and blocks.Test plan
npx vitest run packages/cli(search + api tests green)astryx build "pricing page"returns a kit incl. theRadioList — Pricing Tierblockastryx buildprints the playbookastryx search "data table with filters"returns relevant results (was "no results")Made with Cursor