Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chant
intent driven development

Prompts

A markdown file that defines agent behavior. Lives in .chant/prompts/.

# .chant/prompts/standard.md
---
name: standard
purpose: Default execution prompt
---

# Execute Spec

You are implementing a spec for {{project.name}}.

## Your Spec

**{{spec.title}}**

{{spec.description}}

## Instructions

1. **Read** the relevant code first
2. **Plan** your approach before coding
3. **Implement** the changes
4. **Verify** each acceptance criterion
5. **Commit** with message: `chant({{spec.id}}): <description>`

Template Variables

Prompts support variable substitution using {{variable}} syntax.

VariableDescription
{{project.name}}Project name from config
{{spec.id}}Full spec identifier
{{spec.title}}Spec title (first # heading)
{{spec.description}}Full spec body content
{{spec.target_files}}Target files from frontmatter
{{worktree.path}}Worktree path (parallel execution)
{{worktree.branch}}Branch name (parallel execution)

Note: Advanced templating ({{#if}}, {{#each}}) is not implemented. Only simple {{variable}} substitution is supported.

Built-in Prompts

PromptPurpose
bootstrap(Default) Minimal prompt that delegates to chant prep
standardRead → Plan → Implement → Verify → Commit
splitSplit driver into group members
documentWrite user-facing documentation
researchDeep root cause analysis for issues
merge-conflictResolve git conflicts during rebase

See Prompt Guide: Built-in Prompts for full examples and detailed explanations.

Prompt Selection

chant work 001                # Uses default prompt (bootstrap)
chant work 001 --prompt tdd   # Uses TDD prompt

Selection Order

  1. --prompt CLI flag (highest priority)
  2. prompt: in spec frontmatter
  3. defaults.prompt from config

Custom Prompts

Create custom prompts in .chant/prompts/:

# .chant/prompts/security-review.md
---
name: security-review
purpose: Security-focused code review
---

# Security Review

Review {{spec.target_files}} for security issues.

Use with: chant work 001 --prompt security-review


For comprehensive guidance, examples, and advanced techniques, see the Prompt Guide.