Template Variables
Complete reference of all template variables available in Nenjo prompt templates.
Template variables use the {{ variable }} syntax (double curly braces with spaces). They are replaced with runtime values when the prompt is rendered before each agent execution.
Syntax
{{ ticket.title }} -- standard form (with spaces)
{{ticket.title}} -- compact form (no spaces, also supported)
\{{ ticket.title }} -- escaped form (renders as literal {{ ticket.title }})Both {{ name }} and {{name}} forms are supported. To include literal curly braces in your prompt, prefix with a backslash: \{{ name }} renders as {{ name }} without substitution.
Variable Reference
Ticket
Available in ticket_task and gate_eval templates.
| Variable | Description |
|---|---|
{{ ticket.id }} | Unique ticket UUID |
{{ ticket.title }} | Short summary of the work item |
{{ ticket.description }} | Full description with requirements |
{{ ticket.acceptance_criteria }} | Conditions for completion |
{{ ticket.tags }} | Comma-separated labels |
{{ ticket.source }} | Origin -- user for human-created tickets, or a role name (e.g. reviewer) when routed from a gate |
{{ ticket.status }} | Current status: open, ready, in_progress, done |
{{ ticket.priority }} | Priority level: low, medium, high, critical |
{{ ticket.type }} | Work type: bug, feature, task |
{{ ticket.slug }} | URL-safe ticket identifier |
{{ ticket.complexity }} | Estimated complexity score |
Project
Available in all templates.
| Variable | Description |
|---|---|
{{ project.id }} | Project UUID |
{{ project.name }} | Display name of the project |
{{ project.description }} | Project overview and goals |
{{ project.working_dir }} | Absolute path to the project workspace directory |
Chat
Available in chat_task templates.
| Variable | Description |
|---|---|
{{ chat.message }} | Current user message |
{{ message }} | Legacy alias for {{ chat.message }} |
Gate
Available in gate_eval templates.
| Variable | Description |
|---|---|
{{ gate.criteria }} | The evaluation criteria for the gate step |
{{ gate.previous_output }} | Output from the preceding agent step to evaluate |
{{ criteria }} | Legacy alias for {{ gate.criteria }} |
{{ previous_output }} | Legacy alias for {{ gate.previous_output }} |
Pipeline
Available in all templates when running inside a pipeline.
| Variable | Description |
|---|---|
{{ pipeline.name }} | Name of the active pipeline |
{{ pipeline.step }} | Current step name within the pipeline |
{{ step.metadata }} | Arbitrary JSON metadata from the step's config |
Role
Available in all templates.
| Variable | Description |
|---|---|
{{ role_local.name }} | Name of the executing role |
{{ role_local.description }} | Description of the role's purpose |
Agent
Available in all templates.
| Variable | Description |
|---|---|
{{ agent.name }} | Name of the executing agent |
{{ agent.model }} | LLM model name (e.g. claude-sonnet-4-20250514, gpt-4o) |
Git
Available in ticket_task and gate_eval templates when the project has a linked repository.
| Variable | Description |
|---|---|
{{ git.branch }} | Current working branch (e.g. agent/<run>/<slug>) |
{{ git.target_branch }} | Target branch for merges/PRs (from project settings) |
{{ git.work_dir }} | Absolute path to the worktree directory for this execution |
Global
Available in all templates.
| Variable | Description |
|---|---|
{{ global.timestamp }} | Current UTC timestamp (ISO 8601) |
{{ global.run_id }} | Unique ID for the current execution run |
Context Blocks
These variables expand into pre-built XML structures. See Context Blocks for details on what each block contains.
| Variable | Description |
|---|---|
{{ context.roles }} | Available roles with descriptions and assigned agents |
{{ context.pipelines }} | Active pipelines with names and descriptions |
{{ context.documents }} | Project document listing with file names and sizes |
{{ context.skills }} | Skill instructions, guidelines, and reference docs |
{{ context.modes }} | Active mode session context (auto-appended when in a mode) |
{{ context.memory }} | Relevant memories from past interactions |
Council Subtask
Available when an agent is executing a council-delegated subtask.
| Variable | Description |
|---|---|
{{ parent_task }} | The parent task that spawned this subtask |
{{ subtask_description }} | Description of the specific subtask to complete |
Template Examples
Ticket Task
You are working on the following ticket in project {{ project.name }}.
## Ticket
- **Title**: {{ ticket.title }}
- **Description**: {{ ticket.description }}
- **Acceptance Criteria**: {{ ticket.acceptance_criteria }}
- **Priority**: {{ ticket.priority }}
- **Type**: {{ ticket.type }}
## Git Context
Branch: {{ git.branch }}
Target: {{ git.target_branch }}
Working directory: {{ git.work_dir }}
## Available Context
{{ context.documents }}
{{ context.memory }}
{{ context.roles }}Chat Task
Respond to the user's message in the context of project {{ project.name }}.
{{ context.memory }}
User message: {{ chat.message }}Gate Evaluation
Evaluate the following output against the acceptance criteria.
## Ticket Context
- **Title**: {{ ticket.title }}
- **Acceptance Criteria**: {{ ticket.acceptance_criteria }}
## Criteria
{{ gate.criteria }}
## Output to Evaluate
{{ gate.previous_output }}Variable Resolution
Variables are resolved at prompt render time from the RenderContext, which is populated from:
- Task data -- Ticket fields, chat message, or gate criteria (from
TaskType) - Agent/Role metadata -- Name, model, description (from
AgentInstance) - Pipeline context -- Pipeline name, step name, execution run ID (from
PipelineContext) - Project data -- Name, description, working directory (from bootstrap)
- Git state -- Branch, target branch, worktree path (from execution setup)
- Context blocks -- Pre-built XML strings (computed by
AgentInstance.build_prompts()) - Global values -- Timestamp (computed at render time), run ID (from pipeline)
If a variable has no value at render time, the {{ variable }} placeholder remains in the output as-is.