# Squad Template Pack

These templates are rendered by `SquadCreator.create()` to bootstrap a new
squad under `.catalog/squads/<id>/`. The renderer is a minimalist substitution
engine — every `{{VAR}}` is replaced verbatim with the supplied value, no
escaping or conditionals (use the `TemplateRenderer` utility for richer
patterns).

## Files

| File | Purpose | Rendered to |
|---|---|---|
| `SQUAD.md.template` | Root squad index — frontmatter + agents table + embedded squad.yaml | `.catalog/squads/<id>/SQUAD.md` |
| `agent-template.md` | One agent persona stub | `.catalog/squads/<id>/agents/<agent>.md` (per agent) |
| `task-template.md` | One task definition stub | `.catalog/squads/<id>/tasks/<task>.md` (per task) |
| `checklist-template.md` | Quality gate checklist | `.catalog/squads/<id>/checklists/<checklist>.md` |

## Variables

### `SQUAD.md.template`

| Variable | Example | Notes |
|---|---|---|
| `SQUAD_ID` | `01-meta-framework-deep-research` | Slug, kebab-case |
| `SQUAD_NAME` | `deep-research-squad` | Human-friendly id |
| `SOURCE` | `aiobuilder-built` \| `lara-squads-import` \| `local` | Provenance tag |
| `STATUS` | `active` \| `draft` \| `archived` | Lifecycle state |
| `DESCRIPTION` | One-line description | |
| `VERSION` | `1.0.0` | semver |
| `SHORT_TITLE` | `Deep Research Squad` | UI display |
| `AUTHOR` | `OpenLife` \| operator name | |
| `LICENSE` | `MIT` | |
| `SLASH_PREFIX` | `deep-research` | CLI namespace |
| `TAGS_LIST` | YAML list lines, e.g. `  - research\n  - synthesis` | Indented for YAML |
| `AGENTS_TABLE` | Markdown table body | One row per agent |
| `COMPONENT_AGENTS` | YAML list of agent file names | Pre-indented |
| `COMPONENT_TASKS` | YAML list | |
| `COMPONENT_WORKFLOWS` | YAML list | |
| `COMPONENT_CHECKLISTS` | YAML list | |

### `agent-template.md`

| Variable | Example |
|---|---|
| `AGENT_ID` | `research-lead` |
| `AGENT_NAME` | `Research Lead` |
| `AGENT_ROLE` | `Lead coordinator` |
| `AGENT_TITLE` | `Senior Research Lead` |
| `ICON` | `🔬` |
| `WHEN_TO_USE` | `"when starting a deep-research workflow"` |
| `ROLE`, `STYLE`, `IDENTITY`, `FOCUS` | Persona fields |
| `PRINCIPLE_1..3` | Core principles |
| `COMMAND_1`, `COMMAND_1_DESC` | First custom command |
| `CAPABILITIES_LIST` | Markdown bullet list |

### `task-template.md`

| Variable | Example |
|---|---|
| `TASK_NAME` | `decompose-question` |
| `OWNER_AGENT` | `query-strategist` |
| `PURPOSE` | One-paragraph purpose |
| `INPUT_1`, `INPUT_2` | Bullet inputs |
| `OUTPUT_1`, `OUTPUT_2` | Bullet outputs |
| `STEP_1..3` | Numbered steps |
| `VALIDATION_1..2` | Bullet validators |
| `NOTES` | Free-form notes |

### `checklist-template.md`

| Variable | Example |
|---|---|
| `CHECKLIST_NAME` | `quality-gate` |
| `PURPOSE` | One-paragraph purpose |
| `ITEM_1..5` | Checklist line items |

## Extension contract

Operators may copy any template to `.catalog/squad-template-overrides/` to
override the default. SquadCreator looks at the override path first.
v1.2 ships only the four templates above; expand in v1.3 with the full
8-file Capability Pack (workflow, policies, tests, etc.).
