Expand description
Spec template system for creating specs from reusable templates.
Templates are markdown files with YAML frontmatter containing variable definitions.
They can be stored in .chant/templates/ (project) or ~/.config/chant/templates/ (global).
§Template Format
---
name: add-feature
description: Add a new feature with tests
variables:
- name: feature_name
description: Name of the feature
required: true
- name: module
description: Target module
default: core
type: code
labels:
- feature
---
# Add {{feature_name}} feature
## Problem
The {{module}} module needs {{feature_name}} functionality.Structs§
- Spec
Template - A spec template with its metadata and content
- Template
Frontmatter - Template frontmatter containing metadata and variable definitions
- Template
Variable - A variable definition within a template
Enums§
- Template
Source - Where a template was loaded from
Constants§
- GLOBAL_
TEMPLATES_ DIR - Directory name for global templates
- PROJECT_
TEMPLATES_ DIR - Directory name for templates within .chant/
Functions§
- find_
template - Find a template by name (project templates take precedence)
- global_
templates_ dir - Get the path to the global templates directory
- load_
all_ templates - Load all available templates (project templates override global ones with the same name)
- parse_
var_ args - Parse a list of “key=value” strings into a HashMap
- project_
templates_ dir - Get the path to the project templates directory