Skip to content

fix(enhancer): resolve unprocessed Handlebars templates in agent prompts#607

Merged
acreeger merged 1 commit intomainfrom
fix/enhancer-agent-template-rendering
Feb 16, 2026
Merged

fix(enhancer): resolve unprocessed Handlebars templates in agent prompts#607
acreeger merged 1 commit intomainfrom
fix/enhancer-agent-template-rendering

Conversation

@acreeger
Copy link
Collaborator

Summary

  • IssueEnhancementService was loading all agents without template variables, causing raw Handlebars syntax (e.g. {{#unless DRAFT_PR_NUMBER}}[PR NUMBER MISSING]{{/unless}}) to leak into Claude Code prompts
  • Now loads only iloom-issue-enhancer.md (instead of all agents) with proper template variables
  • Added DIRECT_PROMPT_MODE conditional to the enhancer agent template to strip issue-specific sections (comment routing, MCP tool docs, recap, error handling) when enhancing raw text descriptions via il add-issue
  • Fixed AgentManager to only warn about "unknown agent" in settings when the agent file truly doesn't exist on disk, not when it was intentionally filtered out by pattern

Test plan

  • All 3841 tests pass
  • pnpm build succeeds
  • Run il add-issue "some description" and verify no raw Handlebars in logs/prompts
  • Run il add-issue --enhance <issue-number> and verify issue-mode sections render correctly

IssueEnhancementService was loading all agents without template variables,
causing raw Handlebars syntax (e.g. {{#unless DRAFT_PR_NUMBER}}) to leak
into Claude Code prompts. Now loads only the enhancer agent with proper
template variables. Adds DIRECT_PROMPT_MODE conditional to strip
issue-specific sections (comment routing, MCP tools, recap, error handling)
when enhancing raw text descriptions. Also fixes AgentManager to only warn
about unknown agents when the file truly doesn't exist on disk, not when
intentionally filtered out.
@acreeger acreeger merged commit ee0ae73 into main Feb 16, 2026
4 checks passed
@acreeger acreeger deleted the fix/enhancer-agent-template-rendering branch February 16, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant