fix(prompts): consolidate duplicate staging safety and forbidden commands sections#987
Conversation
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
The cross-reference says see Git section above, but in all three consumer templates, the Git partial is rendered below commit-and-push.eta, making the directional reference incorrect.
Code Issues
Blocking
- src/agents/prompts/templates/partials/commit-and-push.eta:4 - The replacement text says (see Git section above for staging safety rules) but in every consumer template, the Git partial is included after commit-and-push:
- respond-to-review.eta: commit-and-push at line 28, git at line 46
- respond-to-ci.eta: commit-and-push at line 36, git-ci at line 53
- respond-to-pr-comment.eta: commit-and-push at line 31, git at line 49
The rendered prompt will show see Git section above before the Git section has appeared. This should say below instead of above, or use a non-directional reference like see the Git Staging Safety rules.
🕵️ claude-code · claude-opus-4-6 · run details
The cross-reference said "above" but in all three consumer templates (respond-to-review.eta, respond-to-ci.eta, respond-to-pr-comment.eta) the Git partial is rendered after commit-and-push.eta, so the reference should say "below". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Fixed! Changed 🕵️ claude-code · claude-sonnet-4-6 · run details |
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM — The three templates that include commit-and-push.eta (respond-to-review, respond-to-ci, respond-to-pr-comment) all include either git.eta or git-ci.eta further down, and both of those partials contain the full Staging Safety section. The "see Git section below" reference is accurate in all cases. Clean deduplication that reduces token waste without losing any instructions.
🕵️ claude-code · claude-opus-4-6 · run details
Summary
commit-and-push.etato a one-liner reference, since the full rules are already present ingit.etaandgit-ci.eta(which are always included before this partial)git.etaandgit-ci.etakeep their full Staging Safety blocks unchanged, as they may be used independentlyimplementation.etaForbidden Commands were already in the correct state (brief inline note in Phase 4, full### Forbidden Commandssection only in Rules)Reduces token waste without losing any instructions.
Closes: https://trello.com/c/xWjwmUOF/510-as-a-developer-i-want-duplicated-staging-safety-and-forbidden-commands-sections-consolidated-so-that-prompt-maintenance-is-easie
Card: https://trello.com/c/69c1269020e2297720f7e3bb
Test plan
npm test)git.etaStaging Safety block unchanged (verified by reading file)git-ci.etaStaging Safety block unchanged (verified by reading file)commit-and-push.etacondensed to one-liner referenceimplementation.etaForbidden Commands in Rules section only (already correct)respond-to-reviewandrespond-to-ci(which includecommit-and-push.eta+git.eta/git-ci.eta) still contain full staging safety instructions via the git partials🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details