/pilot - PILOT Execution Workflow Orchestrator
Orchestrate the complete PILOT project execution workflow with Track-based task management (A-G), MoE methodology, agent discovery, and automated session management.
Workflow: Uses PILOT-EXECUTION-WORKFLOW Skill: Uses pilot-execution Standard: Uses CODITECT-STD-001
Usage
# Full workflow (interactive mode)
/pilot
# Quick status check
/pilot --status
# Execute specific track
/pilot --track A
# Execute specific task
/pilot --task A.1.1
# Semi-autonomous mode (auto-execute, pause at milestones)
/pilot --semi-auto
# Dry-run mode (preview without execution)
/pilot --dry-run
# Resume from checkpoint
/pilot --resume
# Start new session
/pilot --new-session "Session focus"
# JSON output for scripting
/pilot --json
Options
| Option | Description |
|---|---|
--status | Show current workflow status without execution |
--track <A-G> | Execute tasks for specific track only |
--task <X.Y.Z> | Execute specific task by Track ID |
--semi-auto | Semi-autonomous mode with human checkpoints |
--dry-run | Preview what would be executed |
--resume | Resume from last checkpoint |
--new-session "focus" | Start new session with focus description |
--json | Output in JSON format |
--verbose | Show detailed execution logs |
System Prompt
EXECUTION DIRECTIVE:
When the user invokes /pilot, you MUST:
- IMMEDIATELY execute the 4-phase workflow
- ALWAYS show progress at each phase
- ALWAYS update session log and PILOT plan
DO NOT:
- Skip any phase without explicit user override
- Execute tasks without agent recommendation (/which)
- Complete without session log update (/session-log)
The user invoking the command IS the confirmation.
The 4-Phase Workflow
Phase 1: Session Start (Orientation)
Execute session orientation using MoE Task Execution methodology:
# Step 1.1: Find project plan and checkpoints
Glob("**/PILOT*.md")
Glob("**/CHECKPOINT*.md")
# Step 1.2: Load recent context
/cxq --recent 200
/cxq --decisions --limit 20
# Step 1.3: Agent discovery for pending tasks
/which <pending-task-description>
# Step 1.4: Read PILOT plan
Read PILOT-PARALLEL-EXECUTION-PLAN.md
Output:
🚀 PILOT Execution Workflow - Session Start
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Project Status:
Track A: Backend API - 85% ████████░░
Track B: Frontend UI - 80% ████████░░
Track C: DevOps - 60% ██████░░░░
Track D: Security - 100% ██████████ ✅
Track E: Integration Tests - 0% ░░░░░░░░░░
Track F: Documentation - 70% ███████░░░
📌 Recommended Next Tasks:
1. Track A.1.1: Heartbeat background thread
Agent: backend-development
2. Track E.1.1: Signup → payment → activation flow
Agent: testing-specialist
3. Track C.1.1: Backend Docker image
Agent: devops-engineer
💡 Context Loaded: 200 recent messages, 20 decisions
Phase 2: Task Selection
Select next task using Track nomenclature (CODITECT-STD-001):
Track Priority Order:
1. Blocking tracks (tracks that block others)
2. P0 Critical Path
3. Active tracks (in_progress)
4. Sequential dependencies (unblocked)
Selected: Track A.1.1 - Heartbeat background thread
Agent Recommendation: backend-development
Invocation: Task(subagent_type="backend-development", prompt="...")
Phase 3: Task Execution
Execute selected task with agent coordination:
# Execute agent
Task(subagent_type="backend-development", prompt="Implement Track A.1.1...")
# OR use CODITECT agent
/agent backend-development "Implement Track A.1.1..."
# Verify output
# - Code compiles
# - Tests pass
# - No security issues
# Update PILOT plan
# Mark task complete with details
# Classify any new documents
/classify path/to/new/file.md
Phase 4: Session Management
Preserve session context and create audit trail:
# Log progress
/session-log "Track A.1.1 Heartbeat Implementation" \
--issue "Needed background thread for license heartbeat" \
--fix "Implemented asyncio-based heartbeat with 30-second interval" \
--files "backend/core/heartbeat.py,backend/tests/test_heartbeat.py"
# Capture context (periodically or at session end)
/cx
# Create checkpoint (if milestone reached)
/checkpoint "Track A.1 Complete"
Track Reference
| Track | Domain | Primary Agent |
|---|---|---|
| A | Backend API | backend-development |
| B | Frontend UI | frontend-react-typescript-expert |
| C | DevOps | devops-engineer |
| D | Security | security-specialist |
| E | Testing | testing-specialist |
| F | Documentation | codi-documentation-writer |
| G | DMS Integration | prompt-analyzer-specialist |
Examples
Morning Session Start
/pilot
Runs full workflow: orientation → task selection → execution → session management.
Check Status Only
/pilot --status
Shows track progress without starting execution.
Execute Specific Track
/pilot --track A
Focuses on Track A (Backend API) tasks only.
Execute Specific Task
/pilot --task A.1.1
Executes Track A.1.1 directly with appropriate agent.
Semi-Autonomous Mode
/pilot --semi-auto
Runs tasks automatically, pausing for human approval at:
- Track transitions
- Security-related tasks
- Deployment tasks
Preview Without Execution
/pilot --dry-run
Shows what would be executed without making changes.
Integration with Other Commands
| Command | Integration |
|---|---|
/orient | Called in Phase 1 for session orientation |
/which | Called in Phase 2 for agent discovery |
/agent | Called in Phase 3 for CODITECT agent execution |
/cx | Called in Phase 4 for context capture |
/cxq | Called in Phase 1 for context loading |
/session-log | Called in Phase 4 for audit trail |
/classify | Called in Phase 3 for document classification |
/checkpoint | Called in Phase 4 for milestone checkpoints |
Files Modified
| File | When |
|---|---|
PILOT-PARALLEL-EXECUTION-PLAN.md | Task completion |
SESSION-LOG-YYYY-MM-DD.md | Session logging |
context-storage/unified_messages.jsonl | Context capture |
context-storage/checkpoints/ | Checkpoint creation |
Error Handling
Task Execution Failure
1. Log failure in session log
2. Mark task as failed in PILOT plan
3. Analyze failure cause
4. Present recovery options:
- Retry with same agent
- Retry with different agent
- Skip and continue
- Escalate to human
Context Database Unavailable
1. Warn user about limited context
2. Continue with file-based context (PILOT plan, checkpoints)
3. Suggest running /cx --rebuild when available
Related
- Workflow: PILOT-EXECUTION-WORKFLOW
- Skill: pilot-execution
- Standard: CODITECT-STD-001
- ADR: ADR-048
- PILOT Plan: PILOT-PARALLEL-EXECUTION-PLAN.md
Success Output
When pilot execution completes:
✅ COMMAND COMPLETE: /pilot
Track: <track-letter>
Tasks executed: N
Progress: X% → Y%
Next: <next-task-id>
Completion Checklist
Before marking complete:
- PILOT plan loaded
- Track status analyzed
- Tasks executed/reported
- Progress updated
Failure Indicators
This command has FAILED if:
- ❌ PILOT plan not found
- ❌ Invalid track specified
- ❌ Context database unavailable
- ❌ Agent execution failed
When NOT to Use
Do NOT use when:
- No PILOT plan exists
- Need single task (use
/agentdirectly) - Context is stale (run
/orientfirst)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skip orientation | Context gaps | Run /orient first |
| Ignore failures | Cascading issues | Handle failures immediately |
| Cross-track jumps | Broken dependencies | Complete track before switching |
Principles
This command embodies:
- #3 Complete Execution - Full task workflow
- #9 Based on Facts - Uses plan data
- #5 No Assumptions - Follows documented plan
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Command Version: 1.0.0 Created: 2026-01-01 Author: CODITECT Core Team