How It Works
The Orchestrator
The orchestrator is responsible for:- Parsing user intent
- Resolving which sub-agent(s) to launch
- Passing context and configuration to sub-agents
- Interpreting sub-agent results
- Deciding the next recommended action
Sub-Agents
Each sub-agent is a skill loaded dynamically via theskill tool. Sub-agents are:
| Sub-Agent | Phase | Responsibility |
|---|---|---|
| sdd-init | Initialize | Detect stack, bootstrap persistence |
| sdd-explore | Explore | Investigate codebase, analyze approaches |
| sdd-propose | Propose | Create change proposal with scope and intent |
| sdd-spec | Specify | Write delta specifications (requirements + scenarios) |
| sdd-design | Design | Create technical design with architecture decisions |
| sdd-tasks | Plan | Break down implementation into concrete tasks |
| sdd-apply | Implement | Write code following specs and design |
| sdd-verify | Verify | Validate implementation against specs |
| sdd-archive | Archive | Sync delta specs to main specs, archive change |
Communication Protocol
Sub-agents communicate with the orchestrator via structured result envelopes.Result Envelope Structure
Every sub-agent returns a result following the result contract:- Should we proceed to the next phase?
- Should we ask the user for input?
- Should we fix issues first?
Persistence Modes
Sub-agents operate in one of three persistence modes:| Mode | Storage | Project Files | Use Case |
|---|---|---|---|
| engram | Memory (Engram tool) | Never created | Ephemeral exploration, no file pollution |
| openspec | Filesystem (openspec/) | Yes | Audit trail, team collaboration, long-term projects |
| none | Inline return only | Never created | One-off questions, prototyping |
artifact_store.mode to each sub-agent. Sub-agents follow the persistence contract to determine read/write behavior.
Skill Loading
Sub-agents are loaded dynamically using theskill tool:
- Frontmatter with metadata (name, description, version, trigger conditions)
- Instructions for the sub-agent
- Shared conventions (loaded from
skills/_shared/)
Why This Architecture?
Separation of Concerns
Each sub-agent has a single, well-defined responsibility. The orchestrator doesn’t need to know HOW to write specs — it just needs to know WHEN to launch the spec-writer.Reusability
Sub-agents can be composed into different workflows. For example:/sdd-newlaunches: explore → propose → spec → design → tasks/sdd-continuelaunches: apply → verify/sdd-explorelaunches: explore only
Testability
Each sub-agent can be tested in isolation by passing it a mock context and validating the result envelope.Extensibility
New sub-agents can be added without modifying the orchestrator’s core logic. Just add a new skill and teach the orchestrator when to trigger it.Version 2.0 Enhancements
Agent Teams Lite v2.0 introduced:- TDD support in
sdd-apply: Detects TDD mode and follows RED → GREEN → REFACTOR - Real execution in
sdd-verify: Runs tests and builds, not just static analysis - Spec compliance matrix: Cross-references spec scenarios with test results
- Coverage validation: Optional coverage threshold enforcement
- Behavioral evidence: Verification now requires PASSING tests, not just code existence