Repository navigation
Description
Parent
What to build
Show every Session prompt at the top level of the repository as readable Markdown, generated from the same code the binary sends it from, so it can never drift.
The golden-file test that keeps the Prompts and skills page in sync also renders a prompts/ directory: one file per prompt entry the page already renders (nine in all), each named after the entry's id without the prompt- prefix (fresh.md, continuation.md, continuation-pr.md, spec-review.md, conflict-repair.md, foreign-conflict-repair.md, review-repair.md, ci-fix-repair.md, resume.md). Each file contains:
- a note saying it is generated from the prompt module and how to regenerate it
- the entry's title as a heading
- its "when" sentence
- the prompt text in a fenced code block, with the page's placeholders (the issue number shown as
#<n>), using a fence longer than any run of backticks in the text.
The page's links to home-page units are omitted.
In check mode, the test fails when a file is missing, differs, or is stale (a file in prompts/ that no prompt produces). The message names the file, shows a line diff and gives the regenerate command. The regeneration variable is renamed from UPDATE_PROMPTS_PAGE to UPDATE_PROMPTS, with no alias, and it now writes the page fragment and every prompts/ file and deletes stale ones. The test skips when prompts/ is absent, as it already does for site/ in the crates.io package, and prompts/ is not added to the package.
Nothing in how a Run builds or sends Session prompts changes.
Acceptance criteria
-
prompts/holds the nine prompt files described above, and runningUPDATE_PROMPTS=1 cargo test prompts_pagefrom a clean checkout changes nothing - Changing a Session prompt's wording makes
cargo testfail, naming theprompts/file, showing a line diff and theUPDATE_PROMPTS=1 cargo test prompts_pagecommand - A stray file in
prompts/makescargo testfail, and regenerating deletes it - A missing
prompts/file makescargo testfail, and regenerating restores it -
UPDATE_PROMPTS_PAGEis no longer referenced anywhere; the site page regenerates withUPDATE_PROMPTS - The test skips, and doesn't fail, when
prompts/is absent - A unit test covers choosing a code fence longer than any run of backticks in the prompt text
-
AGENTS.mdsaysprompts/is generated, so edit the prompt module and regenerate withUPDATE_PROMPTS=1 cargo test prompts_page -
README.md's regeneration paragraph namesUPDATE_PROMPTSand covers both the page andprompts/
Blocked by
None (can start immediately)
Activity