Skip to main content

PILOT Execution Workflow

Workflow ID: WF-PILOT-001 Version: 1.0.0 Status: Active Effective Date: January 1, 2026 Owner: Hal Casteel, Founder/CEO/CTO, AZ1.AI INC


1. Overview

The PILOT Execution Workflow orchestrates the complete lifecycle of CODITECT platform development from session start to completion. It integrates:

  • Track-based task management (CODITECT-STD-001 nomenclature)
  • MoE Task Execution methodology (5-step process)
  • Agent discovery and invocation (/which, /agent)
  • Context preservation (/cx, /cxq)
  • Session logging (/session-log)
  • Document classification (/classify)

2. Workflow Diagram

┌─────────────────────────────────────────────────────────────────────────────┐
│ PILOT EXECUTION WORKFLOW │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 1: SESSION START │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ /orient │ → │ /cxq │ → │ /which │ → │ Read │ │ │
│ │ │ │ │ --recent │ │ <task> │ │ PILOT │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 2: TASK SELECTION │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ Identify │ → │ Check │ → │ Create │ │ │
│ │ │ Next Track │ │ Dependencies │ │ Invocation │ │ │
│ │ │ (A-G) │ │ │ │ │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 3: TASK EXECUTION │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ Execute │ → │ Verify │ → │ Update │ → │ Classify │ │ │
│ │ │ Agent │ │ Output │ │ PILOT │ │ Docs │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ ↓ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ PHASE 4: SESSION MANAGEMENT │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │/session-log│ → │ /cx │ → │ Checkpoint │ │ │
│ │ │ │ │ │ │ (if major) │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ ↓ │
│ Loop to Phase 2 │
│ │
└─────────────────────────────────────────────────────────────────────────────┘

3. Phase Details

Phase 1: Session Start

Purpose: Orient to current project state and establish session context.

StepCommand/ActionPurpose
1.1/orientExecute 5-step MoE Task Execution methodology
1.2/cxq --recent 200Load recent session context
1.3/cxq --decisions --limit 20Review recent decisions
1.4/which <task>Discover recommended H.P.001-AGENTS
1.5Read PILOT-PARALLEL-EXECUTION-PLAN.mdLoad current project state

Outputs:

  • Session orientation summary
  • Context loaded into working memory
  • Agent recommendations for pending tasks
  • Current track progress status

Phase 2: Task Selection

Purpose: Select next task(s) for execution using Track nomenclature.

StepActionDetails
2.1Identify Next TrackSelect from pending tracks (A-G)
2.2Check DependenciesVerify blocked_by fields are clear
2.3Create InvocationGenerate Task(subagent_type=..., prompt=...)
2.4Update TasklistAdd invocation to task item in PILOT plan

Track Selection Priority:

  1. Blocking tracks (tracks that block others)
  2. P0 Critical Path (highest priority)
  3. Active tracks (in_progress status)
  4. Sequential dependencies (unblocked tasks)

Invocation Format:

- [ ] A.1.1: Task description
- **Agent:** `Task(subagent_type="backend-development", prompt="Implement Track A.1.1...")`

Phase 3: Task Execution

Purpose: Execute selected task(s) with proper agent coordination.

StepActionDetails
3.1Execute AgentRun agent invocation (Task tool or /agent)
3.2Verify OutputConfirm task completion criteria met
3.3Update PILOT PlanMark task complete with details
3.4Classify DocumentsRun /classify on any new/modified documents

Verification Checklist:

  • Code compiles/passes linting
  • Tests pass (if applicable)
  • No security vulnerabilities introduced
  • Documentation updated (if applicable)

PILOT Plan Update Format:

- [x] A.1.1: Task description ✅
- **Completed:** 2026-01-01T19:00:00Z
- **Agent:** backend-development
- **Changes:** `path/to/file.py` - Added feature X

Phase 4: Session Management

Purpose: Preserve session context and create audit trail.

StepCommand/ActionTrigger
4.1/session-log "entry"After each significant task
4.2/cxPeriodically or before session end
4.3Create CheckpointAfter major milestone (track complete)

Session Log Entry Format:

### 2026-01-01T19:00:00Z - Track A.1.1 Complete

- **Track:** A.1.1 (Backend: Heartbeat: Background thread)
- **Changes:** Implemented background heartbeat thread
- **Files Modified:**
- `backend/core/heartbeat.py`
- `backend/tests/test_heartbeat.py`
- **Status:** Track A.1 25% complete

Checkpoint Triggers:

  • Track completion (e.g., "Track D: Security 100%")
  • Phase transition
  • Major milestone
  • End of day/session

4. Track Nomenclature Integration

This workflow uses CODITECT-STD-001 Agentic Communication Standard Track nomenclature:

TrackDomainRepository
Track ABackend APIcoditect-cloud-infra/backend
Track BFrontend UIcoditect-cloud-frontend
Track CDevOps & DeploymentInfrastructure/K8s
Track DSecurity HardeningCross-cutting
Track EIntegration TestingTest suites
Track FDocumentationDocs sites
Track GDMS IntegrationDocument Management

Task Identifier Format:

Track <LETTER>.<MAJOR>.<MINOR>

Examples:
- Track A.1.1 → Backend: Heartbeat: Background thread
- Track D.2.3 → Security: P1 Security: Error response hardening

5. Component Integration

Skills Used

SkillPurposeLocation
moe-task-execution5-step MoE methodologyH.P.003-SKILLS/moe-task-execution/SKILL.md
session-loggingSession log managementH.P.003-SKILLS/session-logging/SKILL.md
pilot-executionThis workflowH.P.003-SKILLS/pilot-execution/SKILL.md

Commands Used

CommandPurpose
/orientSession orientation
/which <task>Agent discovery
/agent <name> "task"CODITECT agent invocation
/cxContext extraction
/cxqContext query
/classifyDocument classification
/session-logSession log updates
/pilotWorkflow orchestration (this workflow)

Agents Mapped to Tracks

TrackPrimary AgentFallback Agent
Track Abackend-developmentsenior-architect
Track Bfrontend-react-typescript-expertgeneral-purpose
Track Cdevops-engineercloud-architect
Track Dsecurity-specialistcoditect-adr-specialist
Track Etesting-specialistcodi-qa-specialist
Track Fcodi-documentation-writerqa-reviewer
Track Gprompt-analyzer-specialistgeneral-purpose

Scripts Used

ScriptPurpose
session-orient.pySession orientation
context-db.pyContext database operations
unified-message-extractor.pyContext extraction
moe_classifier/classify.pyDocument classification
session_log_manager.pySession log management

Hooks

HookTriggerAction
post-session-log-update.pyAfter session log updateAuto-classify log file
session-retrospective.pySession endCapture learnings

6. Execution Modes

Interactive Mode (Default)

Human-guided execution with agent assistance:

/pilot
# → Runs Phase 1 (orientation)
# → Presents recommended next tasks
# → Human selects task(s)
# → Agent executes
# → Human confirms completion
# → Loop

Semi-Autonomous Mode

Agent-driven with human checkpoints:

/pilot --semi-auto
# → Runs Phase 1-3 automatically
# → Pauses for human approval at:
# - Track transitions
# - Security-related tasks
# - Deployment tasks

Dry-Run Mode

Preview without execution:

/pilot --dry-run
# → Shows what would be executed
# → No actual changes
# → Validates dependencies

7. Error Handling

Task Failure

1. Log failure in session log
2. Mark task as failed in PILOT plan
3. Analyze failure (agent or infrastructure)
4. Create retry invocation if recoverable
5. Escalate to human if unrecoverable

Context Corruption

1. Restore from last checkpoint
2. Re-run /cx to rebuild context
3. Verify PILOT plan state
4. Resume from last known-good task

Agent Timeout

1. Log timeout in session log
2. Check agent output for partial completion
3. Create continuation invocation
4. Retry with increased timeout if needed

8. Success Metrics

MetricTargetMeasurement
Task Completion Rate95%+completed / attempted
Context Preservation100%sessions with /cx capture
Session Log Coverage100%significant tasks logged
Classification Accuracy85%+moe_confidence score
Track ProgressPer PILOT planpercentage complete

9. Quick Reference

Start Session

/pilot              # Full workflow
/orient # Just orientation

During Session

/which <task>       # Find best agent
/agent <name> "x" # Invoke CODITECT agent
Task(subagent_type="x", prompt="y") # Claude Code agent
/session-log "x" # Log progress
/classify path/ # Classify documents

End Session

/cx                 # Capture context
/session-log --view # Review log
/checkpoint # Create checkpoint (if milestone)

DocumentPurpose
CODITECT-STD-001Track nomenclature standard
PILOT-PARALLEL-EXECUTION-PLAN.mdActive project plan
ADR-048Architecture decision
/pilot commandCommand reference
pilot-execution skillSkill definition

Workflow Owner: Hal Casteel, Founder/CEO/CTO, AZ1.AI INC Review Cycle: Weekly during active development Next Review: January 8, 2026