-
Notifications
You must be signed in to change notification settings - Fork 0
Generate AI prompts from the upstream catalog #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,15 +6,18 @@ | |
| "scripts": { | ||
| "sync:docs": "node scripts/sync-docs.mjs", | ||
| "sync:docs:subset": "node scripts/sync-docs.mjs --subset", | ||
| "prepare:docs": "node scripts/prepare-docs.mjs --target docusaurus", | ||
| "prepare:docs": "node scripts/prepare-docs.mjs --target docusaurus && npm run prepare:prompts", | ||
| "prepare:docs:subset": "node scripts/prepare-docs.mjs --target docusaurus --subset", | ||
| "prepare:prompts": "node scripts/prepare-prompts.mjs", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "prepare:prompts:check": "node scripts/prepare-prompts.mjs --check", | ||
| "audit:docs": "node scripts/audit-docs.mjs", | ||
| "prepare": "npm run sync:docs && npm run prepare:docs", | ||
| "prepare:subset": "npm run sync:docs:subset && npm run prepare:docs:subset", | ||
| "test:docs-layout": "node --test scripts/docs-layout.test.mjs", | ||
| "test:prepare-prompts": "node --test scripts/prepare-prompts.test.mjs", | ||
| "install:site": "npm --prefix prototypes/docusaurus install", | ||
| "dev": "npm --prefix prototypes/docusaurus run start", | ||
| "build": "npm --prefix prototypes/docusaurus run build", | ||
| "build": "npm run prepare:prompts:check && npm --prefix prototypes/docusaurus run build", | ||
| "build:full": "npm run prepare && npm run build", | ||
| "cloudflare:deploy": "npm run build:full && npx wrangler pages deploy prototypes/docusaurus/build --project-name ${CLOUDFLARE_PAGES_PROJECT:-reactonrails-com}" | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # React on Rails AI Prompts | ||
|
|
||
| Source: https://reactonrails.com/prompts.json | ||
| Schema version: 1 | ||
|
|
||
| Paste into Cursor, Claude Code, Copilot, or any AI assistant. Each prompt points the agent at the official docs so it doesn't guess. | ||
|
|
||
| ## Get started | ||
|
|
||
| ### Start a new app | ||
|
|
||
| ID: create-app | ||
| Category: get-started | ||
| Doc: https://reactonrails.com/docs/getting-started/create-react-on-rails-app | ||
|
|
||
| Set up a new Rails app with React on Rails, using TypeScript and server-side rendering. Follow the official guide at https://reactonrails.com/docs/getting-started/create-react-on-rails-app and use the exact commands and versions it specifies — don't improvise. | ||
|
|
||
| ### Add to an existing Rails app | ||
|
|
||
| ID: install-existing | ||
| Category: get-started | ||
| Doc: https://reactonrails.com/docs/getting-started/existing-rails-app | ||
|
|
||
| Add React on Rails to my existing Rails app with TypeScript, keeping my current routes and conventions. Follow https://reactonrails.com/docs/getting-started/existing-rails-app and don't change any gem or package versions it doesn't tell you to. | ||
|
|
||
| ## Server rendering | ||
|
|
||
| ### Turn on React Server Components | ||
|
|
||
| ID: turn-on-rsc | ||
| Category: server-rendering | ||
| Doc: https://reactonrails.com/docs/pro/react-server-components | ||
|
|
||
| Turn on React Server Components in my React on Rails app (no license required). Follow https://reactonrails.com/docs/pro/react-server-components exactly, including the renderer and packer setup it specifies. | ||
|
|
||
| ### Add streaming SSR | ||
|
|
||
| ID: streaming-ssr | ||
| Category: server-rendering | ||
| Doc: https://reactonrails.com/docs/pro/streaming-ssr | ||
|
|
||
| Add streaming server-side rendering to my React on Rails app. Follow https://reactonrails.com/docs/pro/streaming-ssr exactly and don't change versions it doesn't ask you to. | ||
|
|
||
| ### Use async/Suspense rendering | ||
|
|
||
| ID: async-rendering | ||
| Category: server-rendering | ||
| Doc: https://reactonrails.com/docs/api-reference/ruby-api-pro#async_react_componentcomponent_name-options-- | ||
|
|
||
| Set up async (Suspense) rendering for a React on Rails component. Follow https://reactonrails.com/docs/api-reference/ruby-api-pro#async_react_componentcomponent_name-options-- exactly. | ||
|
|
||
| ## Migrate | ||
|
|
||
| ### Migrate from react-rails | ||
|
|
||
| ID: migrate-react-rails | ||
| Category: migrate | ||
| Doc: https://reactonrails.com/docs/migrating/migrating-from-react-rails | ||
|
|
||
| Migrate my app from react-rails to React on Rails, keeping my existing components working. Follow https://reactonrails.com/docs/migrating/migrating-from-react-rails and don't skip any step it lists. | ||
|
|
||
| ## Build features | ||
|
|
||
| ### Add code splitting | ||
|
|
||
| ID: code-splitting | ||
| Category: features | ||
| Doc: https://reactonrails.com/docs/building-features/code-splitting | ||
|
|
||
| Add code splitting / lazy loading to my React on Rails components. Follow https://reactonrails.com/docs/building-features/code-splitting exactly. | ||
|
|
||
| ## Optimize & go to production | ||
|
|
||
| ### Evaluate OSS vs Pro | ||
|
|
||
| ID: oss-vs-pro | ||
| Category: production | ||
| Doc: https://reactonrails.com/docs/getting-started/oss-vs-pro | ||
|
|
||
| Review my React on Rails setup and tell me whether OSS or Pro fits my workload, citing the tradeoffs. Base your answer on https://reactonrails.com/docs/getting-started/oss-vs-pro. | ||
|
|
||
| ### Set up the Node renderer | ||
|
|
||
| ID: node-renderer | ||
| Category: production | ||
| Doc: https://reactonrails.com/docs/pro/node-renderer | ||
|
|
||
| Set up the React on Rails Pro Node renderer for server rendering. Follow https://reactonrails.com/docs/pro/node-renderer exactly, including the configuration it specifies. | ||
|
|
||
| ### Add fragment caching | ||
|
|
||
| ID: fragment-caching | ||
| Category: production | ||
| Doc: https://reactonrails.com/docs/pro/fragment-caching | ||
|
|
||
| Add fragment caching to my server-rendered React on Rails components. Follow https://reactonrails.com/docs/pro/fragment-caching exactly. | ||
|
|
||
| ### Get a production license / upgrade to Pro | ||
|
|
||
| ID: upgrade-to-pro | ||
| Category: production | ||
| Doc: https://reactonrails.com/docs/pro/upgrading-to-pro | ||
|
|
||
| Walk me through upgrading my React on Rails app to Pro and getting a production license. Follow https://reactonrails.com/docs/pro/upgrading-to-pro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the inspected CI workflow (
.github/workflows/site-build-deploy.yml), thePrepare docsstep runs beforeBuild site; with this change,prepare:docsrewritesprompts.ts,prompts.json, andllms.txtbeforenpm run buildreachesprepare:prompts:check. That means a PR with hand-edited or stale generated prompt artifacts passes CI because the files are regenerated in the workspace first, leaving the committed tracked artifacts drifted after merge. If these artifacts are meant to be tracked, keep generation separate from the pre-build check or add a dirty-worktree/drift check before overwriting them.Useful? React with 👍 / 👎.