Skip to main content
Every sub-agent in Agent Teams Lite returns a structured result envelope to the orchestrator. This contract ensures consistent communication and enables the orchestrator to make informed decisions about next steps.

Result Envelope Format

Sub-agents return results in this Markdown format:

Fields

string
required
The phase name (e.g., “Proposal Created”, “Design Complete”, “Verification Report”)
string
The change name this result relates to (e.g., “add-dark-mode”). Omitted for sdd-init.
enum
required
Result status:
  • success — Phase completed without issues
  • warning — Phase completed but with non-blocking concerns
  • failure — Phase failed or blocked
string
required
A concise executive summary (1-3 sentences) that the orchestrator can parse to understand what happened.
list
required
List of artifacts created or updated:
  • engram mode: Observation IDs (e.g., #obs_12345)
  • openspec mode: File paths (e.g., openspec/changes/add-dark-mode/proposal.md)
  • none mode: “None (ephemeral)” or inline artifact description
What the orchestrator should do next. Be specific:
  • “Ready for specs (sdd-spec)”
  • “Ready for implementation (sdd-apply)”
  • “Blocked: resolve open questions in design before proceeding”
list
Any issues, warnings, or concerns discovered during the phase:
  • CRITICAL: Must be resolved before proceeding
  • WARNING: Should be addressed but won’t block
  • SUGGESTION: Nice-to-have improvements
If none, say “None.”

Example: Proposal Created (openspec mode)

Example: Verification Failed

Example: Init with Engram

Why This Contract Exists

Consistency

Every sub-agent speaks the same language. The orchestrator doesn’t need custom parsers for each phase.

Decision Making

The orchestrator uses Status and Next Recommended to decide whether to:
  • Proceed to the next phase automatically
  • Ask the user for input
  • Stop and report an error

Traceability

The Artifacts field creates a clear audit trail:
  • In engram mode: observation IDs enable retrieval via mem_get_observation
  • In openspec mode: file paths enable filesystem inspection
  • In none mode: inline results are logged in the conversation

Error Handling

The Risks field ensures issues don’t get silently lost. The orchestrator surfaces CRITICAL risks to the user immediately.

Sub-Agent Responsibilities

Each sub-agent MUST:
  • Return a result envelope in this exact format
  • Set Status accurately (don’t return success if there are CRITICAL risks)
  • Be specific in Next Recommended (don’t just say “continue”)
  • List ALL artifacts created or updated
  • Flag risks with severity levels (CRITICAL / WARNING / SUGGESTION)
The orchestrator relies on this contract to make autonomous decisions about workflow progression.