Skip to content

Scaffolding

Scaffolding is the shared project infrastructure that Bonsai generates inside the station directory. It gives agents a common source of truth for project status, plans, decisions, and reports — so they can coordinate without you repeating context.

During bonsai init, you choose which scaffolding modules to include. Here’s the full structure:

  • Directorystation/
    • INDEX.md — project snapshot (required)
    • DirectoryPlaybook/ — operational playbook (required)
      • Status.md — live task tracker
      • Roadmap.md — long-term milestones
      • Backlog.md — ideas, bugs, debt
      • DirectoryPlans/
        • DirectoryActive/ — numbered implementation plans
      • DirectoryStandards/
        • SecurityStandards.md — security rules
    • DirectoryLogs/ — activity logs (required)
      • FieldNotes.md — your notes to agents
      • KeyDecisionLog.md — architectural decisions
      • RoutineLog.md — routine execution history
    • DirectoryReports/ — completion reports (optional)
      • report-template.md — report format
      • DirectoryPending/ — unreviewed reports

Scaffolding is organized into four modules. Three are required; one is optional.

INDEX

Required. Project snapshot — what the project is, who the agents are, and where everything lives. Every agent reads this at session start.

Playbook

Required. Operational playbook — status tracking, roadmap, backlog, implementation plans, and security standards. The heart of project coordination.

Logs

Required. Activity logs — your field notes to agents, settled architectural decisions, and routine execution history.

Reports

Optional. Completion reports — template and staging area for structured agent work summaries. Code agents write reports here after finishing plans.

The project snapshot. Contains a high-level overview of the project — tech stack, current phase, agent registry, and a document map linking to everything else.

Every agent reads INDEX.md at session start via the session-context sensor. It’s the entry point for understanding “what is this project?”

The operational core. Five files that keep the project organized:

FilePurposeWho uses it
Status.mdLive task tracker — in progress, pending, doneAll agents check before starting work
Roadmap.mdLong-term milestones and phasesContext for where tasks fit in the big picture
Backlog.mdIdeas, bugs, tech debt, feature requestsAgents add items here instead of fixing things out of scope
Plans/Active/Numbered implementation plansTech Lead writes them; code agents execute them
Standards/SecurityStandards.mdHard security rules across all agentsReferenced by the security protocol

The project’s memory across sessions:

FilePurposeWho writes it
FieldNotes.mdYour notes to the agents — changes made outside sessions, new requirements, context the agent wouldn’t otherwise haveYou (the human)
KeyDecisionLog.mdSettled architectural decisions — checked before proposing alternatives, prevents re-litigating resolved discussionsThe Tech Lead
RoutineLog.mdRoutine execution history — when each routine ran and what it foundThe Tech Lead (after running routines)

The optional module. When code agents finish executing a plan, they write a structured completion report to Reports/Pending/. The Tech Lead reviews these during code review workflows.

If you skip the Reports module during setup, the reporting workflow and subagent-stop-review sensor still function — the report submission steps simply become no-ops.

ModuleRequiredWhy
INDEXYesEvery agent needs to know what the project is
PlaybookYesStatus tracking, plans, and standards are core to coordination
LogsYesSession context, decisions, and field notes are essential bridges between sessions
ReportsNoUseful for multi-agent setups with formal review, but not essential for solo workflows

Several routines exist specifically to maintain scaffolding health:

RoutineScaffolding it maintainsWhat it does
status-hygienePlaybook/Status.mdArchives old Done items, validates Pending items
backlog-hygienePlaybook/Backlog.mdFlags stale items, escalates P0s, cross-references with Status and Roadmap
roadmap-accuracyPlaybook/Roadmap.mdEnsures roadmap reflects what’s actually built and planned
doc-freshness-checkAll docsDetects documentation that has drifted from recent code changes

This is why scaffolding and routines work as a system — the scaffolding provides the shared documents, and the routines keep them accurate.

Unlike abilities (which can be re-rendered with bonsai update), scaffolding files are write-once. If a scaffolding file already exists when you re-run generation, Bonsai skips it — your content is never overwritten.

This means you can freely edit Status.md, add items to Backlog.md, and customize the Roadmap without worrying about Bonsai clobbering your changes.