From aida
AIDA - Multi-agent project generation with auto-init and full pipeline execution. Generate a complete project using multi-agent orchestration with TDD and quality gates. Enforces strict quality requirements via Stop Hooks (ralph-loop style).
npx claudepluginhub clearclown/claude-code-aida-red --plugin aidaThis skill uses the workspace's default tool permissions.
Generate a complete project using multi-agent orchestration with TDD and quality gates.
Applies Acme Corporation brand guidelines including colors, fonts, layouts, and messaging to generated PowerPoint, Excel, and PDF documents.
Builds DCF models with sensitivity analysis, Monte Carlo simulations, and scenario planning for investment valuation and risk assessment.
Calculates profitability (ROE, margins), liquidity (current ratio), leverage, efficiency, and valuation (P/E, EV/EBITDA) ratios from financial statements in CSV, JSON, text, or Excel for investment analysis.
Generate a complete project using multi-agent orchestration with TDD and quality gates.
/aida "Create a Twitter clone with Go backend and React frontend"
You MUST follow this protocol exactly. Do NOT deviate.
This command combines /aida:init + /aida:start + quality verification.
AIDA operates in strict mode by default:
When AIDA attempts to complete, the Stop Hook intercepts and:
./scripts/quality-gates.sh automatically| Requirement | Minimum | Enforced By |
|---|---|---|
| Backend Tests | 80+ | Stop Hook |
| Frontend Tests | 100+ | Stop Hook |
| E2E Tests | 20+ (actual execution) | Stop Hook + Gate 19 |
| Backend Coverage | 75%+ | Stop Hook |
| Frontend Coverage | 70%+ | Stop Hook |
| Docker | Build/Run/Health/E2E | Quality Gates |
| TDD Evidence | 10+ files | Gate 20 |
"DONE" can ONLY be output when:
quality_gates_passed: true in session.jsonGate 19 は Docker が起動中に Playwright E2E テストを実際に実行:
Gate 6: Docker Run → Gate 7: Health Check → Gate 19: E2E Execution → Cleanup
E2Eテストファイルの存在だけでは不十分。実際に実行してPASSする必要がある。
Gate 20 はTDDサイクル(RED-GREEN-REFACTOR)の証拠を検証:
# TDDサイクルを記録
./scripts/tdd-logger.sh start <feature>
./scripts/tdd-logger.sh red <test-file>
./scripts/tdd-logger.sh green <test-file>
./scripts/tdd-logger.sh refactor "<changes>"
./scripts/tdd-logger.sh complete
証拠は .aida/tdd-evidence/ に保存。10+ ファイル必須。
No exceptions. No shortcuts. No manual overrides.
Create all required directories:
mkdir -p .aida/state .aida/checkpoints .aida/artifacts/requirements .aida/artifacts/designs .aida/tasks .aida/results .aida/specs .aida/errors .aida/tdd-evidence
Derive project name from user request:
twitter-clonetodo-appnotes-appCreate .aida/state/session.json:
{
"session_id": "<UUID>",
"started_at": "<ISO8601>",
"mode": "aida",
"current_phase": "SPEC_PHASE",
"phase": 1,
"phase_name": "extraction",
"user_request": "$ARGUMENTS",
"project_name": "<derived>",
"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", "impl-backend", "impl-frontend", "impl-docker", "quality-gates"]
}
Create .aida/kanban.md:
# Project Kanban - {{PROJECT_NAME}}
## Current Status: SPEC_PHASE (Phase 1)
## Spec Phase
- [ ] Phase 1: Extraction & Architecture
- [ ] Phase 2: Structure & Schema
- [ ] Phase 3: Alignment
- [ ] Phase 4: Verification
## Impl Phase
- [ ] Backend Implementation (TDD)
- [ ] Frontend Implementation (TDD)
- [ ] Docker Setup
## Quality Gates (ALL 19 MUST PASS)
- [ ] Gate 1: Backend Build
- [ ] Gate 2: Backend Tests
- [ ] Gate 3: Frontend Build
- [ ] Gate 4: Frontend Tests
- [ ] Gate 5: Docker Build
- [ ] Gate 6: Docker Run
- [ ] Gate 7: Health Check
- [ ] Gate 19: E2E Test Execution (Playwright)
<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 .aida/artifacts/requirements/extraction.md
### Phase 2: Structure
1. Define directory structure
2. Create data schemas
3. Define API contracts
4. Write .aida/artifacts/designs/structure.md
### Phase 3: Alignment
1. Verify requirements consistency
2. Check for conflicts or gaps
3. Write .aida/artifacts/alignment.md
### Phase 4: Verification & Output
1. Review all specs for completeness
2. Write final specifications:
- .aida/specs/{{PROJECT}}-requirements.md (comprehensive, min 500 bytes)
- .aida/specs/{{PROJECT}}-design.md (technical design, min 500 bytes)
- .aida/specs/{{PROJECT}}-tasks.md (implementation tasks)
## Player Delegation
For parallel tasks, spawn player subagents using Task tool:
- subagent_type: "general-purpose"
- model: "haiku"
- Read agents/player.md for player protocol
## Completion Checklist
Before completing, verify:
- [ ] .aida/specs/{{PROJECT}}-requirements.md exists (min 500 bytes)
- [ ] .aida/specs/{{PROJECT}}-design.md exists (min 500 bytes)
- [ ] .aida/specs/{{PROJECT}}-tasks.md exists
## Completion Report
Write to .aida/results/spec-complete.json:
{
"task_id": "spec-{{PROJECT}}",
"status": "completed",
"completed_at": "ISO8601",
"outputs": {
"requirements": ".aida/specs/{{PROJECT}}-requirements.md",
"design": ".aida/specs/{{PROJECT}}-design.md",
"tasks": ".aida/specs/{{PROJECT}}-tasks.md"
},
"summary": "Specification phases 1-4 complete"
}
Update .aida/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, validate:
./scripts/validate-outputs.sh {{PROJECT}} spec
If validation fails:
If validation passes:
<MANDATORY_ACTION id="launch-leader-impl">
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-Impl: TDD Implementation Phase" |
| subagent_type | "general-purpose" |
| model | "sonnet" |
| run_in_background | false |
| prompt | See below |
Task Prompt:
You are AIDA Leader-Impl agent.
## CRITICAL INSTRUCTION
Read and follow the full instructions in: agents/leader-impl.md
## Current Session
- Session ID: {{SESSION_ID}}
- Project: {{PROJECT_NAME}}
- Working Directory: {{CWD}}
## Specifications (MUST READ)
- .aida/specs/{{PROJECT}}-requirements.md
- .aida/specs/{{PROJECT}}-design.md
- .aida/specs/{{PROJECT}}-tasks.md
## TDD Protocol (MANDATORY)
Every implementation MUST follow:
1. RED: Write failing test FIRST
2. GREEN: Minimal code to pass test
3. REFACTOR: Clean up while tests pass
NO code without tests. NO tests without running them.
## Player Delegation (MANDATORY - ALL THREE PLAYERS)
### Backend Player
- subagent_type: "general-purpose"
- model: "haiku"
- Must produce: backend/ (in project directory)
- Must have: minimum 5 test files (*_test.go)
- All tests MUST pass
### Frontend Player (MANDATORY - SEPARATE)
- subagent_type: "general-purpose"
- model: "haiku"
- Must initialize with: npm create vite@latest frontend -- --template react-ts
- Must produce: frontend/ (in project directory)
- Must have: minimum 3 test files (*.test.tsx)
- All tests MUST pass
### Docker Player
- subagent_type: "general-purpose"
- model: "haiku"
- Must produce: docker-compose.yml, Dockerfiles
- Use Podman-compatible image paths: docker.io/library/...
## Quality Gates (ALL MUST PASS)
After all players complete, run:
./scripts/quality-gates.sh {{PROJECT}}
Gates:
1. Backend Build: go build ./...
2. Backend Tests: go test ./...
3. Frontend Build: npm run build
4. Frontend Tests: npm test -- --run
5. Docker Build: docker compose build
6. Docker Run: docker compose up -d
7. Health Check: curl localhost:8080/health
## Completion Checklist
Before completing:
- [ ] Backend directory has working Go code
- [ ] Backend has minimum 5 test files
- [ ] Frontend directory has working React code (NOT EMPTY)
- [ ] Frontend has minimum 3 test files
- [ ] Docker compose works
- [ ] ALL quality gates pass
## Completion Report
Write to .aida/results/impl-complete.json:
{
"task_id": "impl-{{PROJECT}}",
"status": "completed",
"completed_at": "ISO8601",
"project_path": "./",
"quality_gates": {
"backend_build": true,
"backend_tests": true,
"frontend_build": true,
"frontend_tests": true,
"docker_build": true,
"docker_run": true,
"health_check": true,
"all_passed": true
},
"verification": {
"backend": {"test_count": N, "test_output": "..."},
"frontend": {"test_count": N, "test_output": "..."}
},
"summary": "Implementation complete, all quality gates passed"
}
Update .aida/state/session.json:
- current_phase: "COMPLETED"
- leaders.impl: "completed"
</MANDATORY_ACTION>
STOP: Wait for Task tool completion before proceeding.
After Leader-Impl completes, run full verification:
./scripts/quality-gates.sh {{PROJECT}}
All 7 gates MUST pass:
If any gate fails:
After all quality gates pass:
Update .aida/kanban.md:
# Project Kanban - {{PROJECT_NAME}}
## Status: COMPLETED
## Spec Phase - COMPLETE
- [x] Phase 1: Extraction & Architecture
- [x] Phase 2: Structure & Schema
- [x] Phase 3: Alignment
- [x] Phase 4: Verification
## Impl Phase - COMPLETE
- [x] Backend Implementation (TDD)
- [x] Frontend Implementation (TDD)
- [x] Docker Setup
## Quality Gates - ALL PASSED
- [x] Gate 1: Backend Build
- [x] Gate 2: Backend Tests
- [x] Gate 3: Frontend Build
- [x] Gate 4: Frontend Tests
- [x] Gate 5: Docker Build
- [x] Gate 6: Docker Run
- [x] Gate 7: Health Check
- [x] Gate 19: E2E Test Execution (Playwright)
Final Output:
AIDA Complete
Session: {{SESSION_ID}}
Project: {{PROJECT_NAME}}
Duration: {{DURATION}}
Generated Artifacts:
- Specs: .aida/specs/{{PROJECT}}-*.md
- Project: ./
Quality Gates: 7/7 PASSED
- Backend Build: PASS
- Backend Tests: PASS
- Frontend Build: PASS
- Frontend Tests: PASS
- Docker Build: PASS
- Docker Run: PASS
- Health Check: PASS
TDD Verification:
- Backend: {{N}} test files, all passing
- Frontend: {{N}} test files, all passing
To run the project:
docker compose up -d
open http://localhost:5173
To verify quality gates again:
./scripts/quality-gates.sh
/aida "Create X"
|
+-- Step 1: Auto-Initialize (directories)
|
+-- Step 2: Create Session (session.json, kanban.md)
|
+-- Step 3: Task tool (sonnet) --> [Leader-Spec]
| |
| +-- Task tool (haiku) --> [Player]
| +-- Task tool (haiku) --> [Player]
| |
| +--> .aida/specs/
|
+-- Step 4: Validate Specs (validate-outputs.sh)
|
+-- Step 5: Task tool (sonnet) --> [Leader-Impl]
| |
| +-- Task tool (haiku) --> [Backend Player]
| +-- Task tool (haiku) --> [Frontend Player]
| +-- Task tool (haiku) --> [Docker Player]
| |
| +--> ./
|
+-- Step 6: Quality Gates (quality-gates.sh)
| |
| +-- 7 mandatory gates
|
+-- Step 7: Report Completion
run_in_background: false ensures sequential executionsonnet, Players: haikuTo check progress during or after execution:
/aida:status
# Validate spec outputs
./scripts/validate-outputs.sh {{PROJECT}} spec
# Validate impl outputs
./scripts/validate-outputs.sh {{PROJECT}} impl
# Verify TDD compliance
./scripts/verify-tdd.sh {{PROJECT}} all
# Run all quality gates
./scripts/quality-gates.sh {{PROJECT}}
| Command | Description |
|---|---|
/aida:init | Initialize directories only |
/aida:start | Start spec phase only |
/aida:work | Continue current phase |
/aida:status | Check current status |
/aida:pipeline | Full automation (same as /aida) |
/aida:resume | Continue from last session state |
/aida:fix <project> | Fix existing project to meet all quality gates |