Overview
Thetemplate-builder command creates custom, reusable templates for ArcKit commands. It enables organizations to standardize their documentation patterns, compliance frameworks, and report formats by creating templates that can be used across multiple projects.
This command empowers teams to extend ArcKit’s capabilities and adapt it to their specific organizational requirements, industry standards, or custom frameworks.
Usage
Key Features
- Custom Template Creation: Build templates for any ArcKit command
- Template Types: Support for multiple formats (Markdown, HTML, JSON, YAML)
- Variable Substitution: Define placeholders that get filled from project data
- Section Management: Modular sections that can be included/excluded
- Validation Rules: Define required fields and validation logic
- Template Library: Organize templates by category and use case
- Version Control: Track template versions and changes
- Preview Mode: Test templates before deployment
Arguments
Optional Arguments
--command <name>: Target ArcKit command for the template (e.g.,service-assessment,presentation)--type <format>: Template format -markdown,html,json,yaml, ortext(default:markdown)--name <string>: Template name/identifier--category <string>: Template category (e.g., “compliance”, “quality”, “custom”)--interactive: Launch interactive template builder wizard--base-template <path>: Start from an existing template--preview: Generate preview with sample data--output <path>: Custom output directory (default:templates/custom/)--variables <list>: Define template variables (comma-separated)
Output
Generates a custom template file with:Template Structure
-
Template Metadata
- Template name and version
- Target command and format
- Author and creation date
- Description and usage instructions
-
Variable Definitions
- Variable names and types
- Default values
- Validation rules
- Description and examples
-
Template Content
- Structured content with placeholders
- Conditional sections
- Loops and iterations
- Formatting instructions
-
Validation Rules
- Required sections
- Field constraints
- Cross-field validation
- Custom validation logic
Example Output Location
Examples
Create Basic Template
Interactive Template Builder
- Target command selection
- Template format
- Section definitions
- Variable configuration
- Validation rules
Create from Base Template
Create HTML Report Template
Create with Preview
Define Custom Variables
Prerequisites
Optional but Helpful
- Base Templates: Existing ArcKit templates to use as starting points
- Template Requirements: Document defining what the template should include
- Sample Data: Example data to test template rendering
- Style Guides: Organizational formatting and content standards
Template Types
By Command Category
-
Compliance Templates
- Custom assessment frameworks
- Industry-specific standards (ISO, NIST, SOC2)
- Regional compliance requirements
-
Quality Templates
- Custom analysis reports
- Specialized traceability formats
- Technical debt assessments
-
Publishing Templates
- Branded presentation themes
- Custom report layouts
- Executive summary formats
-
Integration Templates
- API documentation formats
- Contract specifications
- Interface definitions
By Format
- Markdown: Documentation, reports, assessments
- HTML: Interactive dashboards, web reports
- JSON/YAML: Machine-readable contracts, configurations
- Text: Plain text reports, logs
Template Variables
Supported variable types:-
Project Variables: Automatically populated from project metadata
{{project.name}},{{project.version}},{{project.owner}}
-
Date/Time Variables: Dynamic timestamps
{{date.today}},{{date.year}},{{time.now}}
-
User Variables: Current user information
{{user.name}},{{user.email}},{{user.role}}
-
Custom Variables: User-defined placeholders
{{custom.framework_version}},{{custom.assessment_level}}
-
Computed Variables: Calculated from project data
{{computed.risk_score}},{{computed.completion_rate}}
Template Sections
Conditional Sections
Iterative Sections
Reusable Sections
Validation Rules
Define validation for:- Required Fields: Must be present
- Format Constraints: Regex patterns, length limits
- Value Constraints: Allowed values, ranges
- Cross-field Rules: Dependencies between fields
- Custom Logic: JavaScript validation functions
Interactive Builder Workflow
The interactive mode guides you through:- Command Selection: Choose target ArcKit command
- Template Type: Select output format
- Section Definition: Define major sections
- Variable Configuration: Set up placeholders
- Validation Setup: Define required elements
- Preview & Test: Review with sample data
- Save & Register: Store in template library
Template Organization
Directory Structure
Template Naming Convention
Using Custom Templates
Once created, use templates with the--template flag:
Integration with Other Commands
Create Template from Existing Output
Preview Template with Real Data
Best Practices
- Start Simple: Begin with basic templates and add complexity gradually
- Use Base Templates: Build on existing ArcKit templates when possible
- Document Variables: Clearly document all custom variables and their purpose
- Version Templates: Use semantic versioning for template changes
- Test Thoroughly: Preview templates with various data scenarios
- Organize Logically: Group templates by category and purpose
- Share Reusable Sections: Extract common sections for reuse
- Include Examples: Provide sample variable values in template documentation
- Validate Early: Define validation rules during template creation
- Maintain Registry: Keep template metadata up to date
Advanced Features
Template Inheritance
Create template hierarchies:Template Composition
Combine multiple templates:Dynamic Content
Include computed sections based on project analysis:Related Commands
service-assessment- Use custom assessment templatespresentation- Use custom slide templatesanalyze- Use custom analysis report templatespages- Use custom documentation templates
Resources
- Template Syntax Guide - Handlebars templating
- Markdown Guide - Markdown formatting
- YAML Specification - YAML format reference