Repository navigation
Prompts and skills page, generated from the source - #79
Merged
Merged
Conversation
The claude session arguments move into session::claude_args, which the session runs with and the page's renderer reads. The renderer, test-only in src/prompts_page.rs, renders every prompt with highlighted placeholders, the command line, and every embedded Factory skill raw into the fragment in site/prompts/index.html. A golden-file test fails with a diff and the update command when the fragment is stale, and skips when site/ is absent, as in the crates.io package. The home page's skill labels link to the page's anchors, and the page links back to the units and shows the published commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lback label Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Prompts and skills page at
/prompts/, generated from the same code the binary runs.src/ ├── session.rs # run(): Command::new("claude").args(claude_args(...)) +│ # claude_args(): the one shared definition of the arguments ├── plugin.rs # SKILLS, now pub, read by the renderer too +└── prompts_page.rs # #[cfg(test)] renderer + golden-file test site/ ├── index.html # press line skill labels → /prompts/#skill-<name> ├── main.js # fills the commit label from /commit.txt +└── prompts/index.html # page; fragment between generated markersThe page includes the fragment literally, between marker comments in
site/prompts/index.html, because the site has no build step or server-side includes. The commit label is filled in bymain.jsfrom thecommit.txtthatpublish.shwrites. Without it (locally, or JS off) the label reads "As of the commit ofmainthis copy of the site comes from".Evidence
Page (1440 and 390 wide, with a stand-in
commit.txt):Golden file:
cargo testfails:skills/tdd/tests.md.After:
UPDATE_PROMPTS_PAGE=1 cargo test prompts_pagerewrites the fragment, andcargo testpasses again.cargo packageand ran the tests with their own target dir:skipping: no …/thirdshift-0.2.0/site (the crates.io package leaves it out)… ok.tests/packaging.rspasses.claude_argsproduces the same arguments in the same order. All Run tests pass unchanged:cargo testgives 14 suites ok, and clippy is clean./prompts/#skill-*link on the home page, and every/#unit-Nand in-page link on/prompts/, against the ids that exist.Merge Danger
Door: two-way
Blast Radius: site
Only
/prompts/and the home page's skill labels change what visitors see. The binary's behaviour doesn't change: the session arguments are only refactored. From now on, any PR that changes a prompt, theclaudearguments or a skill must regenerate the page, orcargo testfails. That is intended.Unaddressed findings
Standards
prompts_page.rsandsite/index.html. The site has no templating. A new skill without a unit panics the renderer; renaming a unit is rare and shows on review.PLACEHOLDERSarray, andhighlightedmarks any<base>-style text. No prompt's fixed text uses those tokens (<run-id>isn't one). A unit test covers escaping versus highlighting.u64::MAXissue-number sentinel is only swapped after#. Every prompt uses the number only asCloses #<n>. The review confirmed there are no stray occurrences.UPDATEconstant, the marker comment and the README). They are plain strings for different readers. I didn't think a macro for them was worth it.Spec
releases/latest. GitHub has no stable URL for the latest tag's tree. Resolving it would need an extra GitHub API call from the page, or deploy changes.Closes #68
🤖 Generated with Claude Code