feat(cli): search sees your integrations, and build stops calling one word a match - #5320
Draft
josephfarina wants to merge 2 commits into
Draft
feat(cli): search sees your integrations, and build stops calling one word a match#5320josephfarina wants to merge 2 commits into
josephfarina wants to merge 2 commits into
Conversation
… word a match `search` gathered components straight off the resolved core directory, so a package listed in `astryx.config.mjs` was reachable by `component` and `template` and invisible to the one command whose job is finding things. The search command even loaded a `Project` already — purely to print integration warnings beside results that could not contain an integration's components. It now gathers through `Project`, so an integration's components rank next to Core's and carry their own `package` and `import`, and one broken integration is still skipped rather than failing the command. Component candidates now index `features` and best-practice text as well as the one-line description, at a lower tier. The reader's vocabulary usually lives there: `Banner` describes itself as "a persistent message", and only its guidance names the form errors and maintenance notices someone would actually search for. The tiers stay apart because collapsing them is worse than not indexing at all — `Toast` is "a brief, non-blocking notification" and would tie with every component that mentions notifications in passing advice, and ties break alphabetically. `build` reported a direct match on one incidental word. A page's keywords include every component its source renders, so "actionable warning banner" scored `login`, `contact-form` and `documentation-design` at 95 apiece on "banner" alone — exactly the direct-match threshold — and offered three pages that are not warnings as the place to start. Coverage was garnishing the score by up to 15 points when it should have been gating: matching one of three concepts is not the claim that matching three is. Results now carry `matchedTerms`/`queryTerms`, and the pages group gates on them. A kit that comes back thin now says what to try. Left unsaid, an empty kit reads as "the package has nothing for this" rather than "these words missed", and the caller falls back on whatever it already believed about the package — which is the failure `build` exists to prevent.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes to the two commands an agent reaches for first.
searchcould not see integrationssearchgathered components straight off the resolved core directory, so a package listed inastryx.config.mjswas reachable bycomponentandtemplateand invisible to the one command whose job is finding things. The search command already loaded aProject— purely to print integration warnings beside results that could not contain an integration's components.It now gathers through
Project, so an integration's components rank next to Core's and carry their ownpackageandimport. The per-integration skip+warn policy is inherited, so one broken manifest is skipped rather than failing the command, andProjectis loaded once per search and shared with the docs gatherer.Usage guidance was not indexed
Component candidates carried name + keywords +
usage.description. The reader's vocabulary usually lives further down:Bannerdescribes itself as "a persistent message", and only its guidance names the form errors and maintenance notices someone would search for.featuresand best-practice text are now indexed, at a tier below the description. The tiers stay apart deliberately — collapsed into one,Toast("a brief, non-blocking notification") ties with every component that mentions notifications in passing advice, and ties break alphabetically.MIN_TOKEN_SCOREmoves with the new tier, since it gates which per-token hits count in the multi-word pass andbuildsends multi-word queries almost exclusively.buildcalled a one-word coincidence a direct matchNone of those is a warning page. A page's keywords include every component its source renders, so each keyword-matched "banner" at 90; the multi-word branch adds a coverage garnish of up to 15 points, landing exactly on the 95 direct-match threshold. Coverage was decorating the score when it should have been gating it — matching one of three concepts is not the claim that matching three is.
Results now carry
matchedTerms/queryTerms(a whole-phrase match reports full coverage), and the pages group gates on them. Consumers no longer have to parse"matches 1/3 terms: banner"back out of the reason string.A thin kit says what to try
Left unsaid, an empty kit reads as "the package has nothing for this" rather than "these words missed", and the caller falls back on whatever it already believed about the package — which is the failure
buildexists to prevent.build.kitnow carries an optionalhintwhen the kit is nearly empty, naming the browse commands; the renderer prints it.Testing
lint:strictclean on every touched file;check:cli-structure,typecheck:authoring,typecheck:strict,readme:checkall pass; API declarations regenerated withsync:api-types.directMatchpositive control:build "contact form"still reports a direct match at 2/2 coverage.The type additions are additive.