Start AIDA multi-agent pipeline with Task tool delegation
Launches multi-agent pipeline to generate comprehensive project specifications and implementation tasks.
/plugin marketplace add clearclown/claude-code-aida/plugin install clearclown-aida@clearclown/claude-code-aida<project description>Start a new AIDA pipeline for the given project description.
/aida:start "Create a Twitter clone application"
Ensure output/ directory exists (run /aida:init if not).
You MUST follow this protocol exactly. Do NOT deviate.
Create output directories:
mkdir -p output/state output/checkpoints output/artifacts/requirements output/artifacts/designs output/tasks output/results output/specs output/projects output/errors
Create output/state/session.json:
{
"session_id": "<UUID>",
"started_at": "<ISO8601>",
"current_phase": "SPEC_PHASE",
"phase": 1,
"phase_name": "extraction",
"user_request": "$ARGUMENTS",
"project_name": "<derived from request>",
"phase_history": [
{"phase": "INITIALIZING", "entered_at": "<ISO8601>", "exited_at": "<ISO8601>"}
],
"leaders": {
"spec": "pending",
"impl": "pending"
},
"active_agents": [],
"completed_tasks": [],
"pending_tasks": ["spec-requirements", "spec-design", "spec-tasks"]
}
Analyze user request and create output/feature_list.json:
[
{
"id": "feat-<name>",
"name": "Feature Name",
"description": "Feature description",
"spec_status": "pending",
"impl_status": "pending"
}
]
<MANDATORY_ACTION id="launch-leader-spec">
YOU MUST INVOKE THE TASK TOOL NOW.
Do NOT just describe the Task tool call - actually execute it.
Use these exact parameters:
| Parameter | Value |
|---|---|
| description | "Leader-Spec: Specification Phases 1-4" |
| subagent_type | "general-purpose" |
| model | "sonnet" |
| run_in_background | false |
| prompt | See below |
Task Prompt:
You are AIDA Leader-Spec agent.
## CRITICAL INSTRUCTION
Read and follow the full instructions in: agents/leader-spec.md
## Current Session
- Session ID: {{SESSION_ID}}
- Project: {{PROJECT_NAME}}
- User Request: {{USER_REQUEST}}
- Working Directory: {{CWD}}
## Your Mission
Execute Phases 1-4 of the AIDA pipeline:
### Phase 1: Extraction & Architecture
1. Analyze user requirements thoroughly
2. Extract core features and constraints
3. Design high-level architecture
4. Write output/artifacts/requirements/extraction.md
### Phase 2: Structure
1. Define directory structure
2. Create data schemas
3. Define API contracts
4. Write output/artifacts/designs/structure.md
### Phase 3: Alignment
1. Verify requirements consistency
2. Check for conflicts or gaps
3. Write output/artifacts/alignment.md
### Phase 4: Verification & Output
1. Review all specs for completeness
2. Write final specifications:
- output/specs/{{PROJECT}}-requirements.md (comprehensive)
- output/specs/{{PROJECT}}-design.md (technical design)
- output/specs/{{PROJECT}}-tasks.md (implementation tasks)
## Player Delegation
For parallel tasks, spawn player subagents using Task tool with model: haiku.
Read agents/player.md for player protocol.
## Completion Checklist
Before completing, verify:
- [ ] output/specs/{{PROJECT}}-requirements.md exists (min 500 bytes)
- [ ] output/specs/{{PROJECT}}-design.md exists (min 500 bytes)
- [ ] output/specs/{{PROJECT}}-tasks.md exists
- [ ] output/results/spec-complete.json written
## Completion Report
Write to output/results/spec-complete.json:
{
"task_id": "spec-{{PROJECT}}",
"status": "completed",
"completed_at": "ISO8601",
"outputs": {
"requirements": "output/specs/{{PROJECT}}-requirements.md",
"design": "output/specs/{{PROJECT}}-design.md",
"tasks": "output/specs/{{PROJECT}}-tasks.md"
},
"summary": "Specification phases 1-4 complete"
}
Update output/state/session.json with:
- current_phase: "IMPL_PHASE"
- phase: 5
- leaders.spec: "completed"
</MANDATORY_ACTION>
STOP: Do NOT proceed to Step 4 until Task tool has been invoked and Leader-Spec completes.
After Leader-Spec completes, update output/state/session.json:
{
"current_phase": "IMPL_PHASE",
"phase": 5,
"leaders": {
"spec": "completed",
"impl": "pending"
},
"active_agents": [],
"completed_tasks": ["spec-requirements", "spec-design", "spec-tasks"]
}
Create/update output/kanban.md:
# Project Kanban - {{PROJECT_NAME}}
## Phase 1: Extraction - COMPLETE
- [x] Session initialized
- [x] Requirements extraction
- [x] Architecture design
## Phase 2: Structure - COMPLETE
- [x] Directory structure
- [x] Data schemas
- [x] API contracts
## Phase 3: Alignment - COMPLETE
- [x] Requirements consistency verified
## Phase 4: Verification - COMPLETE
- [x] Spec review complete
- [x] Final specs written
## Phase 5: Implementation - PENDING
- [ ] Backend implementation (TDD)
- [ ] Frontend implementation (TDD)
- [ ] Docker environment
- [ ] Quality gates verification
Next: Run /aida:work to start implementation phase
On success:
AIDA Pipeline Started
Session: <SESSION_ID>
Project: <PROJECT_NAME>
Phase: Spec phases complete, ready for implementation
Specifications generated:
- output/specs/{{PROJECT}}-requirements.md
- output/specs/{{PROJECT}}-design.md
- output/specs/{{PROJECT}}-tasks.md
Next steps:
- Review generated specifications
- Run /aida:work to start implementation
- Or run /aida:status for current status
/aida:start
|
v
[You] --> Task tool --> [Leader-Spec]
|
+--> Task tool --> [Player] (haiku, parallel)
+--> Task tool --> [Player] (haiku, parallel)
|
v
output/specs/
run_in_background: false ensures specs are readyBefore reporting success, verify:
# Check spec files exist
ls -la output/specs/
test -f output/specs/*-requirements.md
test -f output/specs/*-design.md
test -f output/specs/*-tasks.md
# Validate output structure
./scripts/validate-outputs.sh {{PROJECT}} spec
If validation fails, the pipeline has not started correctly.
/startInitiates the task orchestration workflow using the three-agent system (task-orchestrator, task-decomposer, and dependency-analyzer) to create a comprehensive execution plan.