Skip to content

refactor(prompts): deduplicate Squint protocol across agent templates#985

Merged
zbigniewsobiecki merged 1 commit intodevfrom
refactor/deduplicate-squint-protocol-in-templates
Mar 23, 2026
Merged

refactor(prompts): deduplicate Squint protocol across agent templates#985
zbigniewsobiecki merged 1 commit intodevfrom
refactor/deduplicate-squint-protocol-in-templates

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 23, 2026

Summary

  • Reduces inline Squint steps in 5 agent templates (implementation, planning, splitting, review, respond-to-planning-comment) from 4-6 bullet points to 1-2 line references, eliminating ~2000 wasted tokens per template
  • The squint-exploration partial already contains the full, detailed Squint protocol — templates now point to it with a brief reference rather than duplicating it inline
  • Preserves review.eta's unique "Squint for Conflict Detection" section (dependency direction audit, duplicate symbol detection, feature flow impact), which has no equivalent in the partial

Changes

For each of the 5 templates, the squint-enabled branch of the <% if (it.squintEnabled) { %> block in the Repository Grounding / Phase 1 section was shortened:

  • Before: 4-6 bullet points listing squint features show, squint flows show, squint modules show, squint symbols list --file commands verbatim
  • After: 1-2 lines: "Consult the pre-loaded Squint overview" + "Use the Squint Codebase Intelligence Protocol (below) to explore features, flows, and modules before reading source files"

The <%~ include("partials/squint-exploration") %> directives remain unchanged in all templates. The squintEnabled conditional gating is preserved. All existing tests pass without modification since the squint commands (squint features show, squint flows show, squint modules show) are still present in the rendered output via the partial.

Test plan

  • All 82 prompts tests pass (tests/unit/agents/prompts.test.ts)
  • Full unit test suite passes (6292 tests, 332 files)
  • Lint passes (zero issues)
  • Type check passes (zero errors)
  • squintEnabled=true prompts still contain squint protocol (from partial)
  • squintEnabled=false prompts still contain fallback message (from partial)

Trello card: https://trello.com/c/N8oh8llZ/511-as-a-developer-i-want-the-squint-protocol-deduplicated-across-templates-so-that-prompts-are-shorter-and-easier-to-maintain

🤖 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.

LGTM — Clean deduplication that removes ~2000 wasted tokens per template while preserving all functionality.

Verified:

  • All 5 templates still include <%~ include("partials/squint-exploration") %>, so the full Squint protocol is present in rendered output
  • review.eta correctly preserves its unique "Squint for Conflict Detection" section (dependency direction audit, duplicate symbol detection, feature flow impact) which has no equivalent in the partial
  • The squint symbols list --filesquint symbols show --file change in implementation.eta Phase 3 is actually a bug fix — it aligns with the canonical command in the partial (line 59)
  • squintEnabled conditional gating is preserved in all templates
  • All 7 CI checks pass

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

@zbigniewsobiecki zbigniewsobiecki merged commit 98e6145 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