feat: single-source prompt generation, tightened prompts, drift guard#14
Open
rlorenzo wants to merge 1 commit into
Open
feat: single-source prompt generation, tightened prompts, drift guard#14rlorenzo wants to merge 1 commit into
rlorenzo wants to merge 1 commit into
Conversation
Make .claude/commands/*.md the canonical sources and add tools/generate, which derives the Codex/Copilot/Antigravity SKILL.md files and the shared loop prompts from them. A --check mode guards against drift via a new pre-commit hook and test/generate.bats. Prompt improvements (token-neutral or saving): - code-review: define High/Medium/Low severities and what makes a Low a blocker; define iteration N (loop now injects the number); scope OWASP mapping to security findings; replace the mixed apply_patch/diff example with a plain unified diff - code-review-followup / plan-review-followup: restate the read-only and scope guardrails that were lost on follow-up passes - code-review-response: cut ~40% of prose aimed at human readers while keeping decision criteria and response markers - plan-review: allow NO_FURTHER_FEEDBACK on the first pass so a clean plan skips the editor cycle - code-refinement: say how to discover the lint command and that missing tests should be added, not just identified - commitmsg: diff --stat first, full diff only where intent is unclear - dependency-review: prefer CLI/API lookups over web browsing, make community signals best-effort with an explicit SKIPPED status, trim rationale prose - review-pr: tool-neutral re-run wording shared by all agents - efficient-orchestration: concrete pause/resume fallback when the harness has no scheduled-wakeup primitive - all Claude commands: YAML frontmatter (description, plus allowed-tools for commitmsg and argument-hint for review-pr) Also: document /dependency-review in the README, gitignore the review loop output files, and update contributor docs for the generator flow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rk6ven8xHh8qdBMV7RqYWZ
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
Makes
.claude/commands/*.mdthe canonical prompt sources and addstools/generate, which derives the Codex/Copilot/AntigravitySKILL.mdfiles and the shared review-loop prompts from them. Also applies a round of prompt improvements (all token-neutral or token-saving) and closes several documentation/config gaps found in a repo review.Generator and drift guard
tools/generateregenerates all derived files;tools/generate --checkverifies they are in sync and lists stale files.generated-files-in-sync) runs the check locally and in CI;test/generate.batsadds five tests covering sync, drift detection, regeneration, and missing-description validation.review-prnow says "re-run this command" (tool-neutral), and the decorative---rules were dropped fromdependency-review.Prompt improvements
N—bin/code-review-loopnow injects the number on initial and follow-up passes; scope OWASP mapping to security findings; replace the mixed apply_patch/diff example with a plain unified diff.NO_FURTHER_FEEDBACKon the first pass so an already-clean plan skips a full editor + re-review cycle (the loop already checks the sentinel before cycle 1, so no script change was needed).git diff --staged --statfirst, full diff only where intent is unclear.npm view,gh api, OSV) over web browsing, make community signals best-effort with an explicit SKIPPED status instead of inviting invented results, trim rationale prose.description(surfaced by/helpandsetup), plusallowed-toolsfor commitmsg andargument-hintfor review-pr.Other fixes
/dependency-reviewin the README (it shipped in all four tool directories but was missing from Available Commands).Testing
test/run: 46/46 BATS tests pass (including the newgenerate.bats).shellcheck -xclean ontools/generateand all changed scripts.markdownlint-cli2clean on all 28 markdown files.tools/generate --checkpasses on the committed tree.Note for reviewers
The generated skills include changes their old copies didn't have (e.g.
review-pr's intro line), so the first./setuprun after merging will report those commands as updated — expected.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rk6ven8xHh8qdBMV7RqYWZ
Generated by Claude Code