Skip to main content

Crate chant

Crate chant 

Source
Expand description

§Chant - Intent Driven Development

Chant is a specification-driven development tool that enables reproducible, auditable AI-assisted development workflows.

§Overview

Specs define work intentions as markdown files with YAML frontmatter. The chant CLI executes them in isolated git worktrees, ensuring reproducibility and auditability of all changes.

§Core Concepts

  • Specs: Markdown files describing work to be done, with acceptance criteria
  • Worktrees: Isolated git worktrees for spec execution
  • Providers: Pluggable AI model backends (Claude, Ollama, OpenAI)

§Modules

  • spec - Spec parsing, frontmatter handling, and lifecycle management
  • spec_group - Spec group/driver orchestration logic
  • config - Configuration management for chant projects
  • git - Git provider abstraction for PR creation
  • provider - AI model provider abstraction
  • worktree - Isolated git worktree operations
  • id - Spec ID generation with date-based sequencing
  • prompt - Prompt template management
  • merge - Spec merge logic and utilities

§Example

use std::path::Path;
use chant::spec::{Spec, SpecStatus};
use chant::config::Config;

// Load project configuration
let config = Config::load().expect("Failed to load config");

// Load a spec from a file
let spec = Spec::load(Path::new(".chant/specs/2026-01-24-01m-q7e.md"))
    .expect("Failed to load spec");

// Check spec status
match spec.frontmatter.status {
    SpecStatus::Pending => println!("Spec is pending"),
    SpecStatus::Completed => println!("Spec is complete"),
    _ => {}
}

Modules§

agent
Agent runtime for ollama with function calling support.
config
Configuration management for chant projects.
conflict
Conflict detection and resolution spec creation.
deps
Cross-repository dependency resolution for specs.
derivation
Derivation engine for extracting values from multiple sources.
diagnose
Diagnostic utilities for checking spec execution status.
formatters
Output formatters for status data
git
Git operations for branch management and merging.
id
Spec ID generation with date-based sequencing.
merge
Spec merge logic and utilities.
merge_driver
Git merge driver for spec files.
merge_errors
Actionable error messages for merge operations.
paths
Default path constants for chant directory structure.
pid
PID tracking for running work processes
prompt
Prompt template management and variable substitution.
prompts
Bundled Prompt Management
provider
Model provider abstraction for invoking AI agents.
retry
Retry logic with exponential backoff for failed specs.
score
Scoring utilities for spec quality analysis.
scoring
Spec quality scoring system
site
Static site generation for chant specs.
spec
Spec parsing, frontmatter handling, and spec lifecycle management.
spec_group
Spec group/driver orchestration logic.
spec_template
Spec template system for creating specs from reusable templates.
status
Status data aggregation for specs
takeover
Takeover command for intervening in running work processes
tools
Tool definitions for ollama-rs function calling integration.
ui
Centralized UI formatting and color utilities
validation
Output schema validation for spec agent outputs.
worktree
Low-level git worktree operations.