Skip to main content

Overview

AIOX uses Handlebars templates to generate consistent files across the framework. Templates are stored in .aiox-core/development/templates/ and used by agents to create documentation, code, and configuration files.
string
.aiox-core/development/templates/
string
Handlebars.js with custom helpers
string
.md, .yaml, .js, .json (various)

Template Categories

Documentation Templates

template
Standard AIOX documentation templatePurpose: Create consistent documentation structureVariables:
  • {{TITLE}} - Document title
  • {{VERSION}} - Document version
  • {{DATE}} - Last updated date
  • {{STATUS}} - Document status (Active, Draft, Deprecated)
Usage:
template
Deep research prompt generator for agent creationPurpose: Generate structured research prompts for specialist-based agentsVariables:
  • {{specialist_name}} - Human expert name
  • {{specialist_slug}} - Slug format identifier
  • {{activity}} - Specific activity area
  • {{domain}} - Domain expertise
  • {{agent_purpose}} - Agent’s primary purpose
  • {{scope_items}} - Research scope areas (array)
  • {{sources}} - Recommended sources (array)
  • {{deliverables}} - Expected outputs (array)
Template Structure:

Workflow Templates

template
Agent handoff workflow templatePurpose: Structure handoff between agents in workflow chainsSchema:
Used by: Workflow chain system for agent coordination
template
Subagent execution step templatePurpose: Structure prompts for multi-step agent workflowsVariables:
  • {{step_number}} - Current step number
  • {{total_steps}} - Total workflow steps
  • {{step_description}} - Step description
  • {{inputs}} - Required inputs
  • {{outputs}} - Expected outputs
  • {{validation}} - Validation criteria

Service Templates

directory
Complete service scaffolding templatePurpose: Generate new service modules with consistent structureStructure:
Service Types:
  • api-integration - External API client service
  • utility - Utility/helper service
  • agent-tool - MCP tool integration service
Usage:

Pattern Templates

template
Code intelligence integration patternPurpose: Document pattern for integrating code analysis toolsSections:
  • Pattern overview
  • Integration points
  • Configuration requirements
  • Usage examples
  • Error handling

Quality Gate Templates

template
PTC (Pre-Task Check) entity validation templatePurpose: Validate entity definitions before task executionValidates:
  • Schema compliance
  • Required fields
  • Relationship integrity
  • Naming conventions
template
Quality gate checkpoint templatePurpose: Define quality gates for workflow stagesStructure:
template
Research aggregation templatePurpose: Aggregate research findings into structured formatSections:
  • Research summary
  • Key findings
  • Patterns identified
  • Recommendations
  • Source attribution

Template Variables

Templates use Handlebars syntax for variable substitution:

Basic Variables

string
Simple string substitutionExample: {{agent_name}}"Dex"
conditional
Conditional rendering
loop
Array iteration

Custom Helpers

AIOX extends Handlebars with custom helpers:
helper
Generate ISO 8601 timestamp
helper
Convert string to slug format
helper
Convert to uppercase
helper
Generate markdown table from array

Template Usage Patterns

Creating from Template

Agents use templates via commands:

Template Resolution

Templates are resolved from multiple locations:
  1. Project templates - .aiox-core/development/templates/
  2. Framework templates - Core template library
  3. Custom templates - User-defined in templates/

Template Overrides

object
Override default template behavior in project-config.yaml

Squad Templates

directory
Agent squad template directoryPurpose: Create multi-agent squads for complex workflowsStructure:
directory
Full squad scaffolding with examplesIncludes:
  • Agent definitions
  • Workflow chains
  • Task definitions
  • Integration patterns
  • Documentation templates

Template Best Practices

  • Use clear, descriptive variable names
  • Provide default values where appropriate
  • Document required vs. optional variables
  • Include usage examples in template comments
  • Use consistent formatting and structure
  • Use snake_case for template variables
  • Prefix boolean variables with has_, is_, should_
  • Use plural names for arrays (items, commands, agents)
  • Be explicit about data types in documentation
  • Group related templates in subdirectories
  • Use clear, descriptive file names
  • Include README.md for complex template sets
  • Version templates when making breaking changes
  • Maintain backward compatibility when possible
  • Document all template variables
  • Provide usage examples
  • Explain when to use each template
  • Include sample output
  • Note any dependencies or requirements

Template Validation

script
Location: .aiox-core/utils/template-validator.jsValidates:
  • Handlebars syntax correctness
  • Required variables present
  • Helper function availability
  • Output format correctness
Usage:

Creating Custom Templates

Create project-specific templates:
  1. Create template file:
  2. Define template structure:
  3. Register with agent:
  4. Use in command:

Reference: .aiox-core/development/templates/