Configuration
The .bonsai.yaml file is the project configuration generated by bonsai init. It lives at the root of your project and tracks the project name, installed agents, their abilities, and scaffolding selections.
ProjectConfig
Section titled “ProjectConfig”The root object in .bonsai.yaml.
| Field | Type | Required | YAML Tag | Description |
|---|---|---|---|---|
project_name | string | Yes | project_name | The name of the project |
description | string | No | description | One-line project description |
docs_path | string | No | docs_path | Path to the documentation/station directory (e.g., station/) |
scaffolding | []string | No | scaffolding | List of installed scaffolding items (e.g., index, playbook, logs, reports) |
agents | map[string]InstalledAgent | No | agents | Map of agent name to agent configuration. Key is the agent type name. |
InstalledAgent
Section titled “InstalledAgent”Each entry in the agents map describes one installed agent.
| Field | Type | Required | YAML Tag | Description |
|---|---|---|---|---|
agent_type | string | Yes | agent_type | The agent type identifier (e.g., tech-lead, backend) |
workspace | string | Yes | workspace | Path to the agent’s workspace directory (e.g., station/, backend/) |
skills | []string | Yes | skills | List of installed skill names |
workflows | []string | Yes | workflows | List of installed workflow names |
protocols | []string | Yes | protocols | List of installed protocol names |
sensors | []string | Yes | sensors | List of installed sensor names |
routines | []string | Yes | routines | List of installed routine names |
custom_items | map[string]CustomItemMeta | No | custom_items | Metadata for user-created custom items (parsed from frontmatter) |
CustomItemMeta
Section titled “CustomItemMeta”Metadata for user-created custom abilities. These are parsed from YAML frontmatter in custom files and stored in the config so Bonsai can track them.
| Field | Type | Required | YAML Tag | Description |
|---|---|---|---|---|
display_name | string | No | display_name | Human-readable name for the custom item |
description | string | Yes | description | Description of the custom item |
event | string | No | event | Hook event (sensors only, e.g., PreToolUse) |
matcher | string | No | matcher | Tool filter (sensors only, e.g., Edit|Write) |
frequency | string | No | frequency | Execution frequency (routines only, e.g., 7 days) |
Example
Section titled “Example”This is the actual .bonsai.yaml from the Bonsai project itself (Bonsai manages its own workspace):
project_name: Bonsaidescription: CLI tool for scaffolding Claude Code agent workspacesdocs_path: station/scaffolding: - index - playbook - logs - reportsagents: tech-lead: agent_type: tech-lead workspace: station/ skills: - planning-template - review-checklist - issue-classification - pr-creation workflows: - code-review - planning - pr-review - security-audit - session-logging - test-plan - session-wrapup - issue-to-implementation - routine-digest protocols: - memory - scope-boundaries - security - session-start sensors: - context-guard - scope-guard-files - session-context - status-bar - routine-check - agent-review - dispatch-guard - subagent-stop-review routines: - backlog-hygiene - dependency-audit - doc-freshness-check - memory-consolidation - roadmap-accuracy - status-hygiene - vulnerability-scan custom_items: pr-creation: description: >- How to create well-structured pull requests — branch naming, title conventions, body template, draft workflow. routine-digest: description: >- Synthesize all pending routine reports into a consolidated digest — extract actionable items, present interactive Q&A for decisions, route results to plans or backlog. session-wrapup: description: >- End-of-session verification, review, cleanup, and summary — triggered by session wrap-up phrases.Related
Section titled “Related”- Lock File — How Bonsai tracks generated file hashes for conflict detection
- meta.yaml Schema — The metadata format for catalog abilities
- agent.yaml Schema — The definition format for agent types