Result Envelope Format
Sub-agents return results in this Markdown format:Fields
The phase name (e.g., “Proposal Created”, “Design Complete”, “Verification Report”)
The change name this result relates to (e.g., “add-dark-mode”). Omitted for sdd-init.
Result status:
success— Phase completed without issueswarning— Phase completed but with non-blocking concernsfailure— Phase failed or blocked
A concise executive summary (1-3 sentences) that the orchestrator can parse to understand what happened.
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”
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
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 usesStatus and Next Recommended to decide whether to:
- Proceed to the next phase automatically
- Ask the user for input
- Stop and report an error
Traceability
TheArtifacts 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
TheRisks 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
Statusaccurately (don’t returnsuccessif 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)