Skip to content

config.yaml Reference

The config.yaml file is an optional configuration placed alongside your template. It controls the interview experience without modifying the template itself. The Analyzer merges it into the manifest; the Orchestrator reads only the manifest.

meta:
display_name: "Consulting Agreement"
description: "Standard consulting engagement agreement"
variables:
client_name:
label: "Client's Legal Name"
question: "What is the client's full legal name?"
default: ""
required: true
format_hint: "Full legal name as registered"
payment_method:
type: choice
choices: [bank_transfer, cheque, crypto]
default: "bank_transfer"
include_ip_assignment:
type: boolean
question: "Does this engagement involve IP assignment?"
default: false
groups:
- name: "Parties"
variables: [client_name, client_address]
- name: "IP Assignment"
condition: include_ip_assignment
variables: [ip_ownership_entity, ip_assignment_date]
- name: "Milestones"
loop: milestones
variables: [description, date, amount]
validation:
- rule: "end_date > effective_date"
message: "The end date must be after the effective date"

Optional. Metadata about the template.

FieldTypeRequiredDescription
display_namestringNoHuman-readable name shown to the user when Claude confirms the matched template. Defaults to the directory name.
descriptionstringNoShort description of the template’s purpose. Used internally and may appear in future template directory features.
meta:
display_name: "Consulting Agreement"
description: "Standard consulting engagement agreement"

Optional. A map of variable names to override settings. Only variables that need customization need to be listed here — unlisted variables use defaults inferred from the template.

Each key is a variable name that appears in the template. The value is an object with any combination of the fields below.

FieldTypeRequiredDescription
labelstringNoShort label for the variable, shown as a heading for the question.
questionstringNoThe full question text Claude asks the user. Overrides the auto-generated question.
defaultanyNoDefault value pre-filled during the interview. Use "today" for date types to resolve to the current date.
requiredbooleanNoWhether the variable must be provided. Default: true.
format_hintstringNoAdditional formatting guidance shown alongside the question.
typestringNoExplicit variable type. See Variable types below. If omitted, the type is inferred from the variable name suffix.
choiceslistConditionalList of valid values. Required when type is choice. Ignored otherwise.

The type field accepts the following values:

TypeDescription
textFree text input. The default for most variables.
dateA calendar date. The special default "today" resolves to the current date.
numberA numeric value — currency, quantity, percentage.
emailAn email address. Validated for email format.
phoneA phone number. Accepts international formats.
booleanA yes/no question. Used as the gate for {% if %} conditional sections.
choiceOne of a fixed set of options. Requires the choices field.

If type is omitted, it is inferred from the variable name suffix (e.g., *_date becomes date, *_email becomes email). See Variable Type Reference for the full inference table.

variables:
client_name:
label: "Client's Legal Name"
question: "What is the client's full legal name?"
required: true
format_hint: "Full legal name as registered"
effective_date:
type: date
default: "today"
payment_method:
type: choice
choices: [bank_transfer, cheque, crypto]
default: bank_transfer
include_ip_assignment:
type: boolean
default: false
question: "Does this engagement involve IP assignment?"

Optional. Controls interview grouping and ordering. A list of group objects that batch related variables under a heading and present them together.

Without groups, Claude presents variables one at a time in template order. With groups, related variables are collected together.

FieldTypeRequiredDescription
namestringYesDisplay name for the group, shown as a heading during the interview.
variableslistYesList of variable names to collect in this group.
conditionstringNoName of a boolean variable. The group is only shown when that variable is true. The gate variable must be collected before this group.
loopstringNoName of a loop collection. The group collects items for that {% for %} loop. Must match the collection name in the template (e.g., milestones for {% for milestone in milestones %}).
groups:
- name: "Parties"
variables: [client_name, client_address, consultant_name, consultant_address]
- name: "Engagement Terms"
variables: [effective_date, end_date, governing_law]

A group gated on a boolean variable. Claude asks the gate question first; if the answer is no, the entire group is skipped.

groups:
- name: "IP Assignment"
condition: include_ip_assignment
variables: [ip_ownership_entity, ip_assignment_date]

A group that maps to a {% for %} loop in the template. Claude collects items one at a time, prompting for the sub-fields on each pass.

groups:
- name: "Milestones"
loop: milestones
variables: [description, date, amount]

Optional. A list of cross-field validation rules evaluated after all values are collected but before rendering. If a rule fails, Claude reports the error message and prompts the user to re-enter the offending values.

FieldTypeRequiredDescription
rulestringYesA Python-style boolean expression using variable names. Evaluated against all collected values.
messagestringYesError message shown to the user when the rule evaluates to false.
validation:
- rule: "end_date > effective_date"
message: "The end date must be after the effective date."
- rule: "service_fee > 0"
message: "The service fee must be a positive number."

Rules have access to all collected variable values and use Python expression syntax.