Template Engine
How the GridWork HQ template engine works — markdown templates with YAML frontmatter, placeholder variables, and the Template Runner UI.
The template engine is the system that powers all 45+ templates in the Knowledge Vault. Each template is a Markdown file with YAML frontmatter that defines metadata, categorization, and placeholder variables. The Template Runner in the dashboard handles variable substitution and output generation.
Template Format
Every template follows the same structure:
---
name: "Client Proposal"
description: "Standard project proposal for new client engagements"
category: "proposals"
paired_pipeline: "propose"
variables:
- CLIENT_NAME
- PROJECT_SCOPE
- TIMELINE
- BUDGET_RANGE
---
# Proposal for {{CLIENT_NAME}}
## Project Overview
{{PROJECT_SCOPE}}
## Timeline
{{TIMELINE}}
## Investment
{{BUDGET_RANGE}}Frontmatter Schema
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name shown in the Template Runner |
description | string | Yes | One-line summary of the template purpose |
category | string | Yes | Grouping key — proposals, sops, audits, reports, briefs, pipelines |
paired_pipeline | string | No | Pipeline that generates output for this template |
variables | string[] | Yes | List of placeholder variable names used in the body |
Placeholder Variables
Templates use {{VAR_NAME}} placeholders that are replaced at generation time. There are two types:
Agency variables — set once during the setup wizard and reused across all templates:
{{AGENCY_NAME}}— your agency name{{AGENCY_EMAIL}}— primary contact email{{AGENCY_PHONE}}— phone number{{AGENCY_URL}}— website URL{{AGENCY_OWNER}}— owner name{{AGENCY_GITHUB_ORG}}— GitHub organization
Template-specific variables — filled per use in the Template Runner UI. These are listed in the variables frontmatter field.
Template Runner Flow
- Select a template from the Knowledge Vault page in the dashboard
- Select a client — the runner pre-fills any client-specific variables from the client record
- Agency variables auto-fill — all
{{AGENCY_*}}placeholders are replaced with your setup wizard values - Fill remaining variables — the runner shows input fields for any unfilled placeholders
- Generate — the completed template is saved to the client folder or downloaded
Template Categories
The 45+ templates span these categories:
| Category | Examples |
|---|---|
| Proposals | Client proposals, project scopes, retainer agreements |
| SOPs | Onboarding checklists, delivery workflows, QA processes |
| Audits | Site audits, SEO audits, accessibility reports |
| Reports | Monthly reports, project summaries, analytics reviews |
| Briefs | Content briefs, design briefs, brand guidelines |
| Pipeline Definitions | AI pipeline configuration files |
Adding a Template
Create a new .md file in the appropriate knowledge/ subdirectory with valid frontmatter. The Template Runner picks up new templates automatically — no code changes needed.
See Creating New Templates for a step-by-step guide.