GridWork HQ
Knowledge Vault

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

FieldTypeRequiredDescription
namestringYesDisplay name shown in the Template Runner
descriptionstringYesOne-line summary of the template purpose
categorystringYesGrouping key — proposals, sops, audits, reports, briefs, pipelines
paired_pipelinestringNoPipeline that generates output for this template
variablesstring[]YesList 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

  1. Select a template from the Knowledge Vault page in the dashboard
  2. Select a client — the runner pre-fills any client-specific variables from the client record
  3. Agency variables auto-fill — all {{AGENCY_*}} placeholders are replaced with your setup wizard values
  4. Fill remaining variables — the runner shows input fields for any unfilled placeholders
  5. Generate — the completed template is saved to the client folder or downloaded

Template Categories

The 45+ templates span these categories:

CategoryExamples
ProposalsClient proposals, project scopes, retainer agreements
SOPsOnboarding checklists, delivery workflows, QA processes
AuditsSite audits, SEO audits, accessibility reports
ReportsMonthly reports, project summaries, analytics reviews
BriefsContent briefs, design briefs, brand guidelines
Pipeline DefinitionsAI 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.

On this page