Skip to content

Generate prompts/README.md as the directory's entry point - #196

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-178
Sep 30, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-178

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

prompts/ gets a generated entry point, so one page shows every Session prompt and the claude command lines they are sent with.

 prompt_files()                  # checked by the golden-file test, written by UPDATE_PROMPTS
   fresh.md … resume.md          # one per Session prompt
+  README.md                     # readme(prompts)
+    generated-file note
+    intro (Session prompt)
+    claude … <prompt>                        ← command(None)
+    claude … --resume <session id> <prompt>  ← command(Some(SESSION_ID))
+    | title | when | [file](file) |          ← file_name(prompt), ×9
+    pointer to ../skills/ (Factory skills)

The page's command_line and the README share the new command(), so both render from claude_args. Because the README is one more PromptFile, the existing missing, changed and stale-file checks and UPDATE_PROMPTS=1 cargo test prompts_page cover it too. In the top-level README.md, step 4 now links skills/ and prompts/ together.

Evidence

  • Before: after adding README.md to prompt_files() and before regenerating, cargo test prompts_page failed:
    …/prompts/README.md is missing:
       19 + | Prompt | When it is sent | File |
       21 + | Fresh | Starts the implement session, … | [fresh.md](fresh.md) |
    Regenerate them with: UPDATE_PROMPTS=1 cargo test prompts_page
    
    After: regenerated, and the full cargo test suite passes. A new unit test checks the note, the Session prompt intro, both command lines, the ../skills/ pointer, and that the table's links are exactly the prompt files' names.

Merge Danger

Door: two-way

This adds only a generated doc and test-only code (prompts_page is #[cfg(test)]-only). The binary doesn't change.

Blast Radius: docs

From now on, a change to the claude arguments or to a prompt's title or when sentence also needs prompts/README.md regenerated.

Unaddressed findings

Standards

  • Near-duplicate generated-file note in markdown() and readme(): the two notes name different sources, so sharing a helper would only save the "don't edit. Regenerate with…" tail.
  • The test parses the Markdown table by hand: the reviewer accepted this as fine for a test. It is a small check with no need for a Markdown parser.

Spec

  • The intro prose ("headless … auto permission mode …") could drift from claude_args: it copies the Prompts and skills page's wording, which has the same exposure. The command lines themselves are generated and golden-checked.
  • The generated-file note doesn't name src/prompt.rs: the README takes nothing from src/prompt.rs. Its titles, when sentences and file names come from src/prompts_page.rs, and its command lines from src/session.rs.

Closes #178

🤖 Generated with Claude Code

@JacobStephens2
JacobStephens2 merged commit 4b18296 into main Sep 30, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-178 branch September 30, 2026 18:49
@JacobStephens2 JacobStephens2 mentioned this pull request Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate prompts/README.md as the directory's entry point

1 participant