Skip to content

DSL Syntax Reference

The .weave configuration language is block-structured and declarative. It is not TypeScript, JSON, or YAML.

Syntax Conventions

FeatureSyntax
Comments# line comment
Strings"double-quoted"
Multi-line strings""" ... """
Arrays["item1", "item2"]
Booleansbare true / false
Enumsbare identifiers (allow, deny, primary, ...)
Numbersbare numeric literals (0.1, 1)
Named blockskeyword name { ... }
Scalar key-valuekey value (no colon, no semicolon)

Top-Level Blocks

BlockPurpose
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

FieldTypeDescription
descriptionstringHuman-readable label
promptstringInline prompt text. Mutually exclusive with prompt_file.
prompt_filestringPath to .md file in the prompts/ directory. Mutually exclusive with prompt.
prompt_appendstringInline text appended after the primary prompt. Mutually exclusive with prompt_append_file.
prompt_append_filestringPath to .md file appended after the primary prompt. Mutually exclusive with prompt_append.
modelsstring[]Ordered model preference list
modeprimary | subagent | allAdapter-facing context hint
temperaturenumberSampling temperature hint
tool_policyblockAbstract capability map
triggersarrayDelegation metadata: { domain "..." trigger "..." }
skillsstring[]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

FieldTypeDescription
descriptionstringHuman-readable label
modelsstring[]Model preference list
patternsstring[]Glob patterns for file-based routing
prompt_appendstringText appended to the base shuttle prompt
prompt_append_filestringFile path appended to the base shuttle prompt
temperaturenumberTemperature hint
tool_policyblockTool 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

TypeMeaning
autonomousAgent works alone
interactiveUser can intervene
gateApprove/reject checkpoint

Completion Methods

MethodSyntax
agent_signalbare identifier
user_confirmbare identifier
plan_createdblock with plan_name
plan_completeblock with plan_name
review_verdictbare 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:

PlaceholderDescription
{{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

ScopePath
Global~/.weave/config.weave
Project.weave/config.weave

Project values override global for scalars. Objects deep-merge. Arrays union-merge.

Released under the MIT License.