Include React Router Agent Skills in Official Templates #15099
Replies: 3 comments 8 replies
|
Potentially worth looking into Tanstack Intent: https://tanstack.com/intent/latest I am not that interest in being dependent on a 3rd party solution, but their approach ties skills to direct dependencies, which could be nice |
|
Another thought on our templates more generally: right now we really only surface Framework Mode templates. We also surface several adapters still. I would prefer if we had starters for each mode and reduced the number of templates. That's likely a place for another discussion, but the proliferation of templates is not super ideal, and some we've struggled with for years. Inevitably though if we get rid of a template, someone will complain. This is not in the main body because it's not a fully formed though, and something I just wanted to see if folks had thoughts on |
|
How do you plan on solving the chicken-and-egg problem with extending the docs with instructions on how to do an upgrade to the next version? Like deprecations and migration steps, etc. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Decsions
After discussing with the Steering Committee, this is what we have decided on. Happy to hear further from the community if there's confusion or differing opinions
remix-run/agent-skillsintoremix-run/react-routerrepo and archive existing reponode_modulesapi(this is just a repeat of JSDocs),community, etc.node_moduleswhen more information is neededReact Router has official templates for new projects and official agent skills that teach AI coding agents how to work with React Router correctly. Today those two entry points are separate. This proposal suggests bringing them together so projects created from the official templates can include React Router agent skills by default, or through an explicit
create-react-routeroption.The goal is to make new React Router apps easier for AI agents to work on without requiring users to discover and install the skills separately.
Current State
React Router agent skills currently live in
remix-run/agent-skillsand cover all 3 modes. React Router templates currently live inremix-run/react-router-templates.Because the skills are separate from the templates:
Proposed Future State
React Router should ship agent skills from the React Router repo and make them available to projects created from the official templates.
At a high level:
.agents/skills/react-router. This aligns with theremix-run/remixrepo which hosts it's Agent Skills directly in the repo.v7branch, andmainwill update to be whatever the current version is.This would let React Router v7 keep v7-specific guidance on a
v7branch while React Router v8 can evolve its own skills onmain.Template Integration
There are two reasonable options for including the skills in generated apps.
Option A: Include Skills Automatically
Every official template includes the relevant React Router skill files by default.
Benefits:
Tradeoffs:
Option B: Add a CLI Step
create-react-routerasks whether to include React Router agent skills, or exposes a flag such as:We could make this the default experience (at least in v8), giving the most middle-ground option between A and B.
Benefits:
Tradeoffs:
Documentation Source
There is a second decision point around how much documentation should live directly in the skill.
The Remix skill points agents toward README files inside the published
remixpackage, for example undernode_modules/remix/src/.../README.md. That works because the package can be the source of deeper reference material while the skill stays focused on workflow and high-level rules.React Router could follow a similar model, but it would likely require shipping more documentation inside the React Router packages. That may or may not be something we want.
There are two options here:
node_modules.For this proposal, these do not need to block the template integration. We can start by shipping the current skill content with the templates, then separately decide whether React Router packages should include additional docs for agents to reference.
All reactions