Skip to content

Refactor prompt builder to use Go templates #590

@mariusvniekerk

Description

@mariusvniekerk

Summary

  • The prompt system currently uses string constants with inline prose conditionals (e.g. "If a tag is present...") to handle variable prompt content. As the prompt logic grows more conditional, this becomes fragile.
  • Switch to text/template for system prompt rendering so conditional sections (intent-alignment, review type variants, agent-specific instructions) are structural {{if}} blocks rather than natural-language hedges.
  • The builder would assemble a data struct describing what's available (commit message present, review type, agent capabilities) and render the appropriate template.

Spawned from #579.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions