Behaviour-Tree Editor
App: apps/bt_editor/
A GUI editor for AI behaviour trees (engine PLM-217, ADR 0068) — author a
tree as data and write a .bt.toml the runtime loads. A GUI can’t draw a Wren closure, so leaves are
named and referenced by name.
The scaffolding shows the authoring spine end to end:
- Palette — composites (Sequence / Selector / Parallel), decorators (Inverter / Succeeder), and every
leaf from the live
Bt.leafCatalog. Click a palette button to add that node as a child of the selected node. - Canvas — the rooted tree drawn as boxes + parent→child wires; click a node to select it.
- Save + validate — serialize the tree to
trees/enemy.bt.tomland round-trip it throughBt.load(the hardened loader) to prove the authored tree is valid; the status line shows OK or the diagnostic.
The engine runs the tree; your game owns the policy (HP, damage, phase thresholds). A regular enemy,
mini-boss, and boss are the same machinery — they differ only in the data (0, ~2, and 4+ phase
entries via PhaseEvaluator + a phase_switch node).
Run from root
Section titled “Run from root”% ./plume3d bt_editorVerify headless
Section titled “Verify headless”% ./plume3d --test apps/bt_editorChecks the data surface (registerLeaf / leafCatalog / load). The author→save→load round-trip and the
phase model are covered by tests/unit/test_bt_load_wren.cpp.