Composition Patterns
Everything is a holon - whole and part. Composition is how the parts assemble into larger wholes without losing what they are.
The holonic hierarchy
Steward (root)
├── Operations (strategy)
├── Capabilities (behavioral)
├── Agents (behavioral)
├── Workflows (behavioral)
└── Governance (cascades down)
The Steward is the container. Operations are the mutable strategy layer. Capabilities, Agents, and Workflows are the behavioral holons they compose.
Vertical vs horizontal
- Vertical (parent → child): an Operation composes Capabilities and Agents; a Steward composes Operations. The standard nesting.
- Horizontal (peer → peer):
Mergecombines peer Stewards. Operations, Capabilities, and Agents merge by name (a later definition overrides an earlier one); allOnInithandlers run. Governance is NOT merged - each entity keeps its own, per the no-aggregation rule.
const AdminPlane = Merge(AuthPlane, UserPlane, AuditPlane);
The governance cascade
When a Steward runs an Operation, guardrails evaluate in order, and all must accept for execution to proceed:
- Operation self-governance
- Capability self-governance
- Agent self-governance
- Engine governance (from the Steward's defaults)
Each level governs itself; nothing silently reaches across a boundary.
Which entity do I use?
| Use... | When |
|---|---|
| Agent | The work needs an AI/LLM, or spawns an external tool |
| Capability | A reusable, deterministic tool or cross-cutting concern |
| Operation | A strategy composing capabilities / agents / sub-operations |
| Workflow | Multi-step work with state, approval gates, or persistence |
| Governance | Access control, validation, a policy you attach |
| Steward | The root container that hosts and runs them all |
A quick decision tree: needs AI? → Agent. Otherwise a reusable tool? → Capability (with output hooks if callers need to interact with a resource). Otherwise a strategy composing others? → Operation (→ Workflow if it's multi-step with durable state). The container around all of it is always the Steward.
- Back to Patterns · or move on to the Guides → to build your own