Add AI context generation system for multi-tool agent routing#1548
Open
Add AI context generation system for multi-tool agent routing#1548
Conversation
added 5 commits
March 23, 2026 10:19
…rthands Add animation shorthand expansion following the createSpecificTransformer pattern. The rule now reports an error and autofixes when users write `animation: 'slidein 3s ease-in'` instead of the expanded longhands. Handles all CSS spec cases: - Duration and delay (first time = duration, second = delay) - Timing functions: keywords (ease, linear, etc.) and functions (cubic-bezier(), steps()) - Iteration count: number or infinite - Direction: normal, reverse, alternate, alternate-reverse - Fill mode: forwards, backwards, both - Play state: running, paused - Animation name: any unclassified identifier - Comma-separated multi-animation returns CANNOT_FIX - !important support
- Add canonical workflow plugins (ai-dev/plugins/) for setup, authoring, and maintainer workflows - Add generator (tools/ai-context/generate-agents.js) that produces thin router files for Codex, Claude, Gemini, Cursor, and Copilot from a single source of truth - Add drift detection (ai:check-context) wired into the test script - Add llms.txt at docs static root for external tool discovery - Add validation commands, package map, conventions, do-not rules, and local override support to index.json - Add defineConsts extension nuance to authoring doc - Remove stylex-skills-rules-architecture.md from WF-MAINTAIN sources (meta-planning doc, not compiler context) - Keep WF-MAINTAIN detail in scoped files only, not global routers
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
workflow: benchmarks/perfComparison of performance test results, measured in operations per second. Larger is better.
|
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 changed / motivation?
AI agents (Cursor, Copilot, Claude Code, Gemini, Codex) need StyleX-specific context to avoid common mistakes like using legacy contextual syntax, writing disallowed shorthands, or misconfiguring bundler plugins. This PR adds a codegen system that produces tool-native context files from a single source of truth.
What's included:
ai-dev/plugins/— canonical workflow plugins (setup, authoring, maintainers) as JSON, plusindex.jsonregistry with validation commands, package map, conventions, and do-not rulestools/ai-context/generate-agents.js— generator that reads plugins and produces all tool-specific outputs belowAGENTS.md,CLAUDE.md,GEMINI.md.github/copilot-instructions.md,.github/instructions/*.instructions.md.cursor/rules/*.mdcpackages/docs/static/llm/AGENTS.md,packages/docs/static/llms.txtdefineConstsextension nuance added topackages/docs/static/llm/stylex-authoring.mdai:check-contextdrift detection wired intonpm testDesign principles:
packages/docs/static/llm/, metadata inai-dev/plugins/, generated files are read-only routers.mdcwithglobsfrontmatter, Copilot getsapplyToscoped instructions, Claude/Gemini get markdown routersWF-MAINTAINdetails only appear in scoped files, not global routersLinked PR/Issues
Closes #1450
Closes #1256
Additional Context
node tools/ai-context/generate-agents.js --checkpasses.npx eslint tools/ai-context/generate-agents.jspasses.Generated files are intentionally thin — they route to existing canonical docs (
stylex-installation.md,stylex-authoring.md,eslint-plugin/README.md) rather than duplicating content.Pre-flight checklist
Contribution Guidelines