DSL Syntax Reference
The .weave configuration language is block-structured and declarative. It is not TypeScript, JSON, or YAML.
Syntax Conventions
| Feature | Syntax |
|---|---|
| Comments | # line comment |
| Strings | "double-quoted" |
| Multi-line strings | """ ... """ |
| Arrays | ["item1", "item2"] |
| Booleans | bare true / false |
| Enums | bare identifiers (allow, deny, primary, ...) |
| Numbers | bare numeric literals (0.1, 1) |
| Named blocks | keyword name { ... } |
| Scalar key-value | key value (no colon, no semicolon) |
Top-Level Blocks
| Block | Purpose |
|---|---|
agent name { ... } | Define a named agent |
category name { ... } | Domain routing by file pattern |
workflow name { ... } | Multi-step execution pipeline |
settings { ... } | Global settings (log_level) |
continuation { ... } | Session recovery and idle behavior |
analytics { ... } | Telemetry settings |
disable agents [...] | Exclude named agents from materialisation |
disable hooks [...] | Disable named lifecycle hooks |
disable skills [...] | Disable named skills globally |
extend before-plan [...] | Insert steps into workflows that publish the before-plan extension point |
Agent Block
weave
agent loom {
description "Loom (Main Orchestrator)"
prompt_file "loom.md"
models ["claude-sonnet-4-5", "gpt-4o"]
mode primary
temperature 0.1
tool_policy {
read allow
write allow
execute allow
delegate allow
network ask
}
triggers [
{ domain "Orchestration" trigger "Complex multi-step tasks" }
{ domain "Architecture" trigger "System design and planning" }
]
skills ["tdd", "code-review"]
}
# Minimal agent with inline prompt
agent my-helper {
prompt "You are a helpful assistant that answers questions concisely."
models ["claude-sonnet-4-5"]
mode subagent
temperature 0.3
}Agent Fields
| Field | Type | Description |
|---|---|---|
description | string | Human-readable label |
prompt | string | Inline prompt text. Mutually exclusive with prompt_file. |
prompt_file | string | Path to .md file in the prompts/ directory. Mutually exclusive with prompt. |
prompt_append | string | Inline text appended after the primary prompt. Mutually exclusive with prompt_append_file. |
prompt_append_file | string | Path to .md file appended after the primary prompt. Mutually exclusive with prompt_append. |
models | string[] | Ordered model preference list |
mode | primary | subagent | all | Adapter-facing context hint |
temperature | number | Sampling temperature hint |
tool_policy | block | Abstract capability map |
triggers | array | Delegation metadata: { domain "..." trigger "..." } |
skills | string[] | Skill names to load |
Tool Policy
weave
tool_policy {
read allow # allow | deny | ask
write allow
execute allow
delegate deny
network ask
}Category Block
weave
category backend {
description "Backend APIs, services, persistence"
models ["anthropic/claude-sonnet-4-5"]
patterns ["src/api/**", "src/server/**", "src/db/**"]
prompt_append "Focus on API contracts, data integrity, and backwards compatibility."
temperature 0.2
tool_policy {
read allow
write allow
delegate deny
}
}Each category generates a shuttle-{name} agent descriptor (e.g. shuttle-backend). Adapters decide how those descriptors are materialised.
Category Fields
| Field | Type | Description |
|---|---|---|
description | string | Human-readable label |
models | string[] | Model preference list |
patterns | string[] | Glob patterns for file-based routing |
prompt_append | string | Text appended to the base shuttle prompt |
prompt_append_file | string | File path appended to the base shuttle prompt |
temperature | number | Temperature hint |
tool_policy | block | Tool policy overrides |
Workflow Block
weave
workflow quick-fix {
description "Fix a bug and get it reviewed"
version 1
step fix {
name "Implement the fix"
type autonomous
agent shuttle
prompt "Fix the following issue: {{instance.goal}}"
completion agent_signal
}
step review {
name "Code review"
type gate
agent weft
prompt "Review the fix for: {{instance.goal}}. Respond with [APPROVE] or [REJECT]."
completion review_verdict
on_reject pause
}
}Step Types
| Type | Meaning |
|---|---|
autonomous | Agent works alone |
interactive | User can intervene |
gate | Approve/reject checkpoint |
Completion Methods
| Method | Syntax |
|---|---|
agent_signal | bare identifier |
user_confirm | bare identifier |
plan_created | block with plan_name |
plan_complete | block with plan_name |
review_verdict | bare identifier |
Settings, Continuation, and Analytics
weave
settings {
log_level INFO # DEBUG | INFO | WARN | ERROR
}
continuation {
recovery {
compaction true
}
idle {
enabled true
work true
workflow true
}
}
analytics {
enabled true
use_fingerprint false
}Disable Directives
weave
disable agents ["warp", "spindle"]
disable hooks ["on-session-idle"]
disable skills ["tdd"]Prompt Templates
All prompt and prompt_append values are rendered as Mustache templates. Key placeholders:
| Placeholder | Description |
|---|---|
{{agent.name}} | Agent's logical name |
{{agent.description}} | Agent's description |
{{agent.mode}} | primary, subagent, or all |
{{{delegation.section}}} | Full delegation block (Mermaid + bullets) |
{{#delegation.targets}} | Iterate over delegation targets |
See Prompt Composition for full template context documentation.
Configuration Locations
| Scope | Path |
|---|---|
| Global | ~/.weave/config.weave |
| Project | .weave/config.weave |
Project values override global for scalars. Objects deep-merge. Arrays union-merge.
