Skip to content

Composition Stack

Playbooks, skills, commands, and agents in the composition stack.

An LLM agent session has a fixed context window. A monolithic agent that holds all operational and domain knowledge in its persona will context-collapse on long workflows.

The composition stack externalizes expertise procedurally:

  • load minimum harness contract at session start
  • provision domain expertise on demand
  • delegate vertical slices to isolated agent contexts
  • enforce transitions deterministically outside agent control

Each layer has one responsibility. Higher layers orchestrate. Lower layers store or execute procedural knowledge.


Playbook (.pb.yaml) atomic domain procedure
↑ composes into
Skill (SKILL.md) SDLC orchestration composition
↑ invoked by
Command orchestration entry point
↑ executes
Workflow stage (YAML) stage contract bound to DSL
↑ delegates to
Agent (.md persona) isolated cognitive execution context
↑ coordinated by
Runtime harness lifecycle, hooks, gates, memory, trace

The agent sits inside the harness — not at the top of the stack.

Composition stack: Playbook composes into Skill, invoked by Command, bound to Workflow, delegated to Agent, coordinated by Runtime Harness


Playbooks — procedural operational specifications

Section titled “Playbooks — procedural operational specifications”

Location: .sdlc/playbooks/domains/{domain}/{name}.pb.yaml

A playbook is not documentation, not a long prompt, not informal instructions. It is an executable procedural specification:

  • what must be done
  • how to do it
  • how to measure and validate
  • completion criteria
  • constraints and fallbacks

Lazy-loaded via sdlc_playbook.py provision — never at sessionStart.

Acquisition: /sdlc:learn (research → synthesis → materialize → deliver).

See Playbooks.


Skills — procedural composition structures

Section titled “Skills — procedural composition structures”

Location: {specialization_layer}/skills/{name}/SKILL.md

Skills organize SDLC operations. They may compose multiple playbooks for a task class:

SkillComposes
worktreeGit isolation protocol
spec-writerIntent → structured spec
{provider}-ticketWork-items API (generated per integration)
handoffSession continuity recording
qa-recordingMulti-resolution browser evidence
browser-userAuthenticated browser via user MCP

A skill is not required to be atomic. It coordinates capabilities and playbooks as needed.


Location: {specialization_layer}/commands/{name}.md

Commands represent high-level intent. They do not execute procedures directly. They trigger:

  • workflow stage graph from DSL binding
  • skill invocations at stage boundaries
  • playbook provision when playbooks_when: matches
  • gate checks before stage transitions

The command is the operator interface. The harness executes the chain.


Location: .sdlc/workflows/*.yaml

Machine-readable stage graphs: agents, inputs, outputs, blocking behavior, success criteria.

Workflows are runtime-neutral. They bind to commands via sdlc.yaml:

workflows:
feature:
definition: .sdlc/workflows/feature-flow.yaml
trigger: /implement-feature

See Workflows.


Location: {specialization_layer}/agents/{name}.md

One stage, one persona, one scope. Subagents dispatch in isolated worktrees/threads.

AgentStage
plannerDecomposition, interfaces, E2E scenarios
implementerProduction code from plan
reviewerArchitecture rule gate
qaBrowser-native validation
deployerStaged release pipeline
incident-resolverProduction triage → fix PR

Separation prevents the same context from writing and certifying the same code.


The orchestrator is a composer — manifest owner, wave orderer, gate enforcer. It composes feature-flow executions; it does not reimplement them.

StageDelegates to
decompositionplanner
work-items-hierarchy/spec:create per slice
execution/implement-feature per ticket (subagent, worktree)
deploy/deploy-release
reflect/sdlc:reflect + /handoff

Forbidden: implement {target_root}/** in main session; mark stages complete without gate passage; consolidate tickets into one worktree.


LayerNature
Playbook constraintsDeterministic bounds on procedure
Workflow success criteriaDeterministic completion definition
Gate scriptsDeterministic transition enforcement
Agent reasoning within stageAdaptive inference

The stack separates what must be true to proceed (deterministic) from how to accomplish the stage (adaptive).


Think of the harness as an operating system:

  • Playbooks = specialized drivers (loaded on demand)
  • Skills = system calls (orchestration primitives)
  • Commands = shell entry points
  • Workflows = process definitions
  • Agents = processes (isolated address spaces)
  • Gates = kernel enforcement — no process marks itself done
  • DSL = system configuration

The LLM is compute inside a process — not the OS.


The /sdlc:learn pipeline that produced architecture doc review capability:

/sdlc:learn "architecture documentation artistry"
→ pb.engineering.pedagogical-profiles
→ pb.docs.architecture-review
→ pb.docs.visual-enrichment-gate
→ pb.docs.architecture-artistry (orchestrator)
→ /sdlc:e2e docs-artistry-20260530
→ gpt-image-2 light-blueprint illustrations
→ Starlight content elevation

This is the meta-pattern: learn adds playbooks to the catalog; e2e implements vertical outcomes; gates verify assets on disk.

See Playbooks and Architecture.

See Architecture.