Templates
Templates control how your final content is wrapped and presented. AI Brief uses a two-layer template system with user overrides.
Default Templates
Built-in templates ship with AI Brief in src/templates/default/:
| Template | File | Description |
|---|---|---|
| Blog | default/blog.md | Wraps content with YAML frontmatter |
| Slides | default/slide.md | Marp-compatible slide wrapper |
| Story | default/story.md | User story format |
| Brief | default/brief.md | Document brief format |
Template Resolution Chain
Templates are resolved in this order:
- User override —
src/templates/user/{format}.md - Default —
src/templates/default/{format}.md - Fallback — Plain passthrough without template
Customizing Templates
Creating a User Override
- Copy the default template to the user directory:bash
cp src/templates/default/blog.md src/templates/user/blog.md - Edit
src/templates/user/blog.mdto your needs - The system will use your version instead of the default
Template Variables
Templates use syntax:
- Blog template:
+ - Slide template:
for slide content - Story template: Standard markdown with acceptance criteria sections
Installation Behavior
When you run ./install.sh:
- Default templates are copied into the target project as
ai-brief/templates/{format}/default.md - If a
user.mdtemplate already exists in the target, it is preserved - Existing
default.mdfiles are backed up as.bakbefore overwriting