Skip to main content

/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

OptionDescription
--statusShow 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-autoSemi-autonomous mode with human checkpoints
--dry-runPreview what would be executed
--resumeResume from last checkpoint
--new-session "focus"Start new session with focus description
--jsonOutput in JSON format
--verboseShow detailed execution logs

System Prompt

EXECUTION DIRECTIVE: When the user invokes /pilot, you MUST:

  1. IMMEDIATELY execute the 4-phase workflow
  2. ALWAYS show progress at each phase
  3. 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

TrackDomainPrimary Agent
ABackend APIbackend-development
BFrontend UIfrontend-react-typescript-expert
CDevOpsdevops-engineer
DSecuritysecurity-specialist
ETestingtesting-specialist
FDocumentationcodi-documentation-writer
GDMS Integrationprompt-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

CommandIntegration
/orientCalled in Phase 1 for session orientation
/whichCalled in Phase 2 for agent discovery
/agentCalled in Phase 3 for CODITECT agent execution
/cxCalled in Phase 4 for context capture
/cxqCalled in Phase 1 for context loading
/session-logCalled in Phase 4 for audit trail
/classifyCalled in Phase 3 for document classification
/checkpointCalled in Phase 4 for milestone checkpoints

Files Modified

FileWhen
PILOT-PARALLEL-EXECUTION-PLAN.mdTask completion
SESSION-LOG-YYYY-MM-DD.mdSession logging
context-storage/unified_messages.jsonlContext 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

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 /agent directly)
  • Context is stale (run /orient first)

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Skip orientationContext gapsRun /orient first
Ignore failuresCascading issuesHandle failures immediately
Cross-track jumpsBroken dependenciesComplete 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