feat(instantsearch): add Source-of-truth check workflow step (1/4)#22
Open
vascobettencourt wants to merge 2 commits into
Open
feat(instantsearch): add Source-of-truth check workflow step (1/4)#22vascobettencourt wants to merge 2 commits into
vascobettencourt wants to merge 2 commits into
Conversation
Inserts a mandatory Source-of-truth check between Discover and Build that requires reading installed types, fetching live Algolia docs, and grepping installed CSS before writing any code not covered by a baked pattern. This closes the long tail of training-data drift (renderState shapes, future.* flags, recently shipped widgets) without baking every prop into the skill. Adds references/react/source-of-truth.md with concrete .d.ts paths and doc URL patterns. Updates technology-rules, anti-patterns, and glossary with the matching rules and terms (renderState, middleware, SSR, virtual/dynamic widgets, future flags, InstantSearch instance). Adds eval 10 to exercise the new workflow on future-flag setup. Co-authored-by: Cursor <cursoragent@cursor.com>
sarahdayan
reviewed
May 18, 2026
- source-of-truth.md: append `.md` to canonical Algolia doc URLs so agents fetch markdown (no HTML chrome). Replace the duplicated CSS grep section with a one-liner pointing to styling.md. - technology-rules.md: append `.md` to the Upgrade-guides link. Fold all Next.js / SSR guidance into the v7 import rule (App Router, Pages Router, Remix/SSR, CSR-only). Drop the legacy-libraries rule (overlaps with v6 rule and autocomplete/anti-patterns.md). Drop the middleware rule and the `[custom-widgets.md]` cross-ref (those land with PR 3 alongside the dedicated reference files). - anti-patterns.md: drop the SSR-doubling and middleware-specific entries; they belong with PR 3 alongside ssr.md / middleware.md. - glossary.md: keep the new terms but drop the cross-reference links to middleware.md / ssr.md (added back in PR 3). Net effect: PR 1 is now self-contained — all internal links resolve on this branch alone — and stops restating rules that already live in autocomplete/anti-patterns.md. Co-authored-by: Cursor <cursoragent@cursor.com>
Member
Author
|
Thanks for the review @sarahdayan! Pushed |
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.
What does this skill do?
Foundation PR splitting up the InstantSearch skill expansion. Adds the Source-of-truth check as a mandatory new workflow step (between Discover and Build) that requires the agent to (1) read installed
.d.tstypes, (2) fetch live Algolia docs at canonical URLs, and (3) grep installed CSS for class names — before writing any code not covered by a baked pattern. This single workflow change closes the long tail of training-data drift (renderState shapes,future.*flags, recently shipped widgets, helper APIs) without baking every prop into the skill.This is part 1 of 4. PRs 2, 3, 4 stack on this one.
Stack
What's in this PR
references/react/source-of-truth.mdwith concrete.d.tspaths and doc URL patterns.SKILL.mdworkflow restructured: insert Source-of-truth as Step 2, renumber Build/Style/Review.references/react/technology-rules.md: add the source-of-truth rule,future.*flag rule, SSR-by-framework rule, middleware rule, and three new "Never" rules (no rebuild-via-hooks, no guessed renderState, no legacy fallbacks).references/react/anti-patterns.md: rebuild-via-hooks, guessed prop shapes, custom widget when widget+classNames suffices, middleware-overlap-with-routing, App-Router-doubling-with-getServerState, training-data future flags.references/react/glossary.md: renderState, middleware, getServerState/SSR provider, virtual widget, dynamic widgets, future flags, InstantSearch instance, Insights.evals/evals.json: adds eval 10 (future.*flags lookup) — the cleanest test that the new workflow fires.Checklist
python3 scripts/validate_skills.py .passes (31/31)evals/evals.jsonexists with 6 prompts (5 original + eval 10)../other-skill/references.claude-plugin/marketplace.json(new skills only) — N/A, already registeredskills/Behavioral test
Eval 10 was exercised against this PR's content via a fresh subagent. The agent refused to name
future.*flags from training-data recall, named the exact.d.tspaths and the upgrade-guide URL, and asked for permission to do the lookup or for the type chunk to be pasted — exactly the behavior the workflow change was designed to produce. 5/5 expectations met.