Skip to content

feat: add variable interpolation to workflow system prompts #6

@norrietaylor

Description

@norrietaylor

Problem

Workflow system prompts are static Markdown files. When the same workflow runs against different repositories, the prompt cannot adapt its instructions based on the target codebase (language, framework, naming conventions).

Proposed Solution

Add template variable interpolation to system prompts using {{variable}} syntax. Variables are resolved from:

  1. Workflow inputs (e.g., {{repository-ref}})
  2. Built-in context variables (e.g., {{codebase_language}}, {{repository_name}})
  3. Environment variables (e.g., {{env.CI}})

Example

You are reviewing a {{codebase_language}} codebase in the {{repository_name}} repository.
Focus on {{codebase_language}}-specific best practices.

Acceptance Criteria

  • System prompts support {{variable}} interpolation before being passed to the agent
  • Variables resolve from workflow inputs, built-in context, and environment
  • Unresolved variables raise a clear error for required vars, or are left as-is for optional
  • Existing prompts without templates continue to work unchanged

Source

Backlog item from Phase 1 Open Questions (Workflow Authoring section).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions