Skip to content

fix(prompts): consolidate duplicate staging safety and forbidden commands sections#987

Merged
zbigniewsobiecki merged 2 commits intodevfrom
fix/consolidate-duplicate-prompt-sections
Mar 23, 2026
Merged

fix(prompts): consolidate duplicate staging safety and forbidden commands sections#987
zbigniewsobiecki merged 2 commits intodevfrom
fix/consolidate-duplicate-prompt-sections

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 23, 2026

Summary

  • Condensed the redundant Staging Safety block in commit-and-push.eta to a one-liner reference, since the full rules are already present in git.eta and git-ci.eta (which are always included before this partial)
  • git.eta and git-ci.eta keep their full Staging Safety blocks unchanged, as they may be used independently
  • implementation.eta Forbidden Commands were already in the correct state (brief inline note in Phase 4, full ### Forbidden Commands section 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

  • All 6292 unit tests pass (npm test)
  • git.eta Staging Safety block unchanged (verified by reading file)
  • git-ci.eta Staging Safety block unchanged (verified by reading file)
  • commit-and-push.eta condensed to one-liner reference
  • implementation.eta Forbidden Commands in Rules section only (already correct)
  • Rendered prompts for respond-to-review and respond-to-ci (which include commit-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

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@aaight
Copy link
Copy Markdown
Collaborator Author

aaight commented Mar 23, 2026

Fixed! Changed above to below in commit-and-push.eta line 5 — the directional reference now correctly points forward to the Git partial, which is rendered after this section in all three consumer templates (respond-to-review.eta, respond-to-ci.eta, respond-to-pr-comment.eta).

🕵️ claude-code · claude-sonnet-4-6 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@zbigniewsobiecki zbigniewsobiecki merged commit 5c0aa4d into dev Mar 23, 2026
9 checks passed
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.

3 participants