Docs menu

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   (the Steward's own)

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): .Merge() folds another Steward's registries into this one. Operations, Capabilities, Agents, services and OnInit hooks merge; direct registrations override merged entries with the same name. Governance is NOT merged - the merged Steward's guardrails are ignored, per the no-aggregation rule.
const AdminPlane = Steward('AdminPlane', 'Auth, users and audit')
  .Merge(AuthPlane)
  .Merge(UserPlane)
  .Merge(AuditPlane);

The governance cascade

When a Steward runs an Operation, every guardrail on the way must accept:

  1. The Steward's own guardrail, checked before the Operation starts, with the Operation's name as the Action.
  2. Each Capability, Agent and Workflow's own guardrail, checked when the Operation calls it.

Operations don't carry guardrails of their own; to restrict one Operation, the Steward's guardrail matches on its name (for example ActionAllowlistPolicy). Each level governs itself, and nothing is inherited: a nested Steward doesn't take its parent's guardrail.

Which entity do I use?

Use...When
AgentThe work needs an AI/LLM, or spawns an external tool
CapabilityA reusable, deterministic tool or cross-cutting concern
OperationA strategy composing capabilities / agents / sub-operations
WorkflowMulti-step work with state, approval gates, or persistence
GovernanceAccess control, validation, a policy you attach
StewardThe 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.


On fathym.com: Holonic →

On this page