Context
PR #125 shipped the AI-agent prompts as a hand-authored site module (prototypes/docusaurus/src/constants/prompts.ts) plus a /prompts page and home Quick Start. We're moving the canonical source of the prompts to react_on_rails (mirroring how docs/CHANGELOG already sync) and publishing a public llms.txt + prompts.json so AI agents can fetch the canonical set. This issue covers the site-side wiring. The upstream canonical prompts.yml and the eval harness are tracked in the cross-linked react_on_rails issue.
Scope (reactonrails.com)
- Extend
scripts/sync-docs.mjs to copy upstream prompts.yml → content/upstream/prompts.yml (the CHANGELOG copy is the precedent for syncing a non-docs upstream file).
- Add
scripts/prepare-prompts.mjs (Node ESM + a node --test companion mirroring scripts/docs-layout.test.mjs). It reads the synced YAML, resolves each doc_route to an absolute reactonrails.com URL, validates the route resolves against the prepared doc slugs (fail the build on a dangling link), and emits:
prototypes/docusaurus/src/constants/prompts.ts — GENERATED ("do not edit" header); replaces today's hand-authored file; PromptCard / /prompts / home consumers unchanged.
prototypes/docusaurus/static/llms.txt and static/prompts.json — served at /llms.txt and /prompts.json.
- Wire
prepare-prompts into npm run prepare (after prepare:docs, so prepared slugs exist for validation); update build:full.
- Add a guard so a hand-edited
prompts.ts that drifts from prompts.yml fails CI.
Depends on / merge order
Requires the upstream prompts.yml (cross-linked react_on_rails issue). Merge upstream first, or land with a temporary in-repo fallback prompts.yml removed once upstream merges (per the README merge-order rule).
Acceptance
- Generated
prompts.ts reproduces the currently shipped prompt content (no visual change).
/llms.txt and /prompts.json return the canonical prompt set.
- Route validation fails the build on a dangling doc link.
npm run build:full stays green.
Refs
Context
PR #125 shipped the AI-agent prompts as a hand-authored site module (
prototypes/docusaurus/src/constants/prompts.ts) plus a/promptspage and home Quick Start. We're moving the canonical source of the prompts toreact_on_rails(mirroring how docs/CHANGELOG already sync) and publishing a publicllms.txt+prompts.jsonso AI agents can fetch the canonical set. This issue covers the site-side wiring. The upstream canonicalprompts.ymland the eval harness are tracked in the cross-linkedreact_on_railsissue.Scope (reactonrails.com)
scripts/sync-docs.mjsto copy upstreamprompts.yml→content/upstream/prompts.yml(the CHANGELOG copy is the precedent for syncing a non-docs upstream file).scripts/prepare-prompts.mjs(Node ESM + anode --testcompanion mirroringscripts/docs-layout.test.mjs). It reads the synced YAML, resolves eachdoc_routeto an absolute reactonrails.com URL, validates the route resolves against the prepared doc slugs (fail the build on a dangling link), and emits:prototypes/docusaurus/src/constants/prompts.ts— GENERATED ("do not edit" header); replaces today's hand-authored file;PromptCard//prompts/ home consumers unchanged.prototypes/docusaurus/static/llms.txtandstatic/prompts.json— served at/llms.txtand/prompts.json.prepare-promptsintonpm run prepare(afterprepare:docs, so prepared slugs exist for validation); updatebuild:full.prompts.tsthat drifts fromprompts.ymlfails CI.Depends on / merge order
Requires the upstream
prompts.yml(cross-linkedreact_on_railsissue). Merge upstream first, or land with a temporary in-repo fallbackprompts.ymlremoved once upstream merges (per the README merge-order rule).Acceptance
prompts.tsreproduces the currently shipped prompt content (no visual change)./llms.txtand/prompts.jsonreturn the canonical prompt set.npm run build:fullstays green.Refs
docs/superpowers/specs/2026-06-04-home-quick-start-prompts-design.md,docs/superpowers/plans/2026-06-04-home-quick-start-prompts.md