name: project-orchestration description: Orchestrate multi-agent workflows for feature development using planning agents, context handoff, and stage management version: 1.0.0 author: opencode type: skill category: orchestration tags:
Purpose: Orchestrate multi-agent workflows for feature development
Coordinate multi-agent planning and execution workflows:
Pass minimal context between agents (RECOMMENDED for automation)
Human-readable planning narrative (for debugging/review)
Full feature delivery workflow
# Create context index
bash .opencode/skill/project-orchestration/router.sh create auth-system
# Get minimal context for specific agent
bash .opencode/skill/project-orchestration/router.sh get-context auth-system StoryMapper
# Track agent output
bash .opencode/skill/project-orchestration/router.sh add-output auth-system ArchitectureAnalyzer .tmp/architecture/auth-system/contexts.json
# Show full index
bash .opencode/skill/project-orchestration/router.sh show auth-system
# Initialize workflow
bash .opencode/skill/project-orchestration/router.sh stage-init auth-system
# Check status
bash .opencode/skill/project-orchestration/router.sh stage-status auth-system
# Mark stage complete
bash .opencode/skill/project-orchestration/router.sh stage-complete auth-system 1
# Rollback if needed
bash .opencode/skill/project-orchestration/router.sh stage-rollback auth-system 1
| Command | Description |
|---|---|
create <feature> |
Create context index for feature |
get-context <feature> <agentType> |
Get minimal context for specific agent |
add-output <feature> <agent> <path> |
Track agent output |
show <feature> |
Show full context index |
| Command | Description |
|---|---|
session-create <feature> <request> |
Create session context |
session-load <sessionId> |
Load session context |
session-summary <sessionId> |
Get session summary |
| Command | Description |
|---|---|
stage-init <feature> |
Initialize 8-stage workflow |
stage-status <feature> |
Show stage progress |
stage-complete <feature> <stage> |
Mark stage complete |
stage-rollback <feature> <stage> |
Rollback stage |
stage-validate <feature> <stage> |
Validate stage |
stage-abort <feature> |
Abort workflow |
.opencode/skill/project-orchestration/
├── SKILL.md # This file
├── router.sh # CLI router
├── scripts/
│ ├── context-index.ts # Lightweight context handoff
│ ├── session-context-manager.ts # Session context management
│ └── stage-cli.ts # 8-stage workflow management
└── workflows/
├── context-handoff.md # Detailed context handoff guide
├── 8-stage-delivery.md # Detailed 8-stage workflow guide
└── planning-agents.md # Planning agents integration guide
.opencode/skill/project-orchestration/scripts/context-index.ts.opencode/skill/project-orchestration/scripts/session-context-manager.ts.opencode/skill/project-orchestration/scripts/stage-cli.ts.tmp/context-index/{feature}.json.tmp/sessions/{session-id}/context.md.tmp/sessions/{session-id}/stage-tracking.json.opencode/skill/project-orchestration/workflows/context-handoff.md.opencode/skill/project-orchestration/workflows/8-stage-delivery.md.opencode/skill/project-orchestration/workflows/planning-agents.mdUse when: Multi-agent pipelines, performance-critical workflows, automated orchestration
How it works:
.tmp/context-index/{feature}.json)Example:
import { createContextIndex, getContextForAgent, addAgentOutput } from './scripts/context-index';
// Create index
createContextIndex('auth-system', { request: 'Build JWT auth' });
// Get minimal context for StoryMapper
const context = getContextForAgent('auth-system', 'StoryMapper');
// Returns: { contextFiles: [...], agentOutputs: { ArchitectureAnalyzer: "..." } }
// After agent completes, update index
addAgentOutput('auth-system', 'StoryMapper', '.tmp/story-maps/auth-system/map.json',
{ verticalSlice: 'user-login' });
Benefits:
Use when: Interactive sessions, human review, debugging, narrative tracking
How it works:
.tmp/sessions/{session-id}/context.md)Example:
import { createSession, updateSession, markStageComplete } from './scripts/session-context-manager';
// Create session
const sessionId = await createSession('auth-system', {
request: 'Build JWT authentication',
contextFiles: ['.opencode/context/core/standards/code-quality.md'],
exitCriteria: ['All endpoints implemented']
});
// Update after agent completes
await updateSession(sessionId, {
architectureContext: { boundedContext: 'authentication' }
});
await markStageComplete(sessionId, 'Stage 1: Architecture Decomposition', [
'.tmp/architecture/auth-system/contexts.json'
]);
Benefits:
| Feature | Context Index | Session Context |
|---|---|---|
| Format | JSON | Markdown |
| Size | Small (~200 lines) | Large (2000+ lines) |
| Audience | Agents only | Humans + Agents |
| Context per agent | Minimal (2-5 files) | Everything (all files) |
| Performance | Fast | Slower |
| Use case | Automated pipelines | Interactive sessions |
| Human readable | No | Yes |
| Debugging | Harder | Easier |
For most multi-agent workflows: Use Context Index (lightweight, fast, minimal context per agent)
For interactive development: Use Session Context (human-readable, complete narrative)
You can use both: Context Index for automation, Session Context for human review
The Multi-Stage Orchestration Workflow provides a systematic approach to complex feature development:
# Initialize workflow
bash .opencode/skill/project-orchestration/router.sh stage-init auth-system
# Check status
bash .opencode/skill/project-orchestration/router.sh stage-status auth-system
# Validate stage readiness
bash .opencode/skill/project-orchestration/router.sh stage-validate auth-system 1
# Mark stage complete
bash .opencode/skill/project-orchestration/router.sh stage-complete auth-system 1
# Rollback if needed
bash .opencode/skill/project-orchestration/router.sh stage-rollback auth-system 1
# Abort workflow
bash .opencode/skill/project-orchestration/router.sh stage-abort auth-system
Stage tracking files are stored in .tmp/sessions/{timestamp}-{feature}/stage-tracking.json
Each stage tracks:
The orchestration skill integrates with planning agents to enrich task metadata:
Provides bounded_context and module fields based on domain analysis.
Provides vertical_slice field for feature slice architecture.
Provides rice_score, wsjf_score, and release_slice fields for prioritization.
Provides contracts array for API/interface dependencies.
Provides related_adrs array for architectural decision references.
See workflows/planning-agents.md for detailed integration guide.
.opencode/skill/task-management/SKILL.md.opencode/docs/agents/planning-agents-guide.md.opencode/context/core/workflows/multi-stage-orchestration.md