orchestration-schemas.cspec
1 # Orchestration Schemas 2 # Migrated from: alpha-delta-orchestrator/schemas.cspec 3 # Purpose: Schema definitions for AI worker coordination 4 5 metadata: 6 id: ORCH-SCHEMAS 7 name: orchestration_schemas 8 version: 1.0.0 9 migrated_from: alpha-delta-orchestrator 10 migration_date: 2026-01-12 11 12 # ============================================================================= 13 # META TYPES 14 # ============================================================================= 15 16 types: 17 iso8601: string # ISO 8601 datetime format 18 19 enums: 20 priority: 21 critical: 1 # Blocks other work, immediate attention 22 high: 2 # Important, should be next 23 normal: 3 # Standard priority 24 low: 4 # Nice to have, when idle 25 26 worker_role: 27 planner: "Analyzes architecture, creates task cspecs" 28 executor-alpha: "Implements ALPHA chain features" 29 executor-delta: "Implements DELTA exchange features" 30 executor-infra: "CI/CD, tooling, infrastructure" 31 docs: "Converts cspec to markdown, maintains docs" 32 33 task_status: 34 pending: "In queue, not yet assigned" 35 assigned: "Assigned to worker, not started" 36 active: "Worker is executing" 37 blocked: "Waiting for human input or dependency" 38 completed: "Successfully finished" 39 failed: "Failed with error" 40 41 result_status: 42 success: "Task completed fully" 43 partial: "Some objectives met, others remain" 44 blocked: "Cannot proceed without input" 45 failed: "Task failed with error" 46 47 question_priority: 48 blocking: "Cannot proceed without answer" 49 important: "Affects approach but can continue" 50 fyi: "Informational, no response required" 51 52 # ============================================================================= 53 # TASK SCHEMA 54 # ============================================================================= 55 56 schemas: 57 task_v1: 58 description: "Task definition for worker assignment" 59 fields: 60 meta: 61 id: "string - Unique: task_YYYYMMDD_HHMMSS_shortname" 62 created: "iso8601" 63 priority: "priority enum" 64 role: "worker_role enum" 65 parent_id: "string? - Parent task if subtask" 66 context: 67 load: "string[] - Paths relative to alpha-delta-context/" 68 session: "string? - Session file to resume" 69 task: 70 title: "string - Short descriptive title" 71 objective: "string - What success looks like" 72 steps: "string[]? - Detailed instructions" 73 constraints: "string[] - Rules to respect" 74 acceptance: "string[] - Measurable criteria" 75 refs: 76 spec_sections: "string[] - Format: filename.cspec#section" 77 depends_on: "string[] - Task IDs this depends on" 78 blocks: "string[] - Task IDs that depend on this" 79 80 result_v1: 81 description: "Task completion result" 82 fields: 83 meta: 84 task_id: "string - ID of completed task" 85 worker: "string - Worker name" 86 started: "iso8601" 87 completed: "iso8601" 88 status: "result_status enum" 89 output: 90 summary: "string - Brief description" 91 files_created: "string[]" 92 files_modified: "string[]" 93 commits: "string[] - Commit SHAs" 94 branch: "string? - Feature branch name" 95 artifacts: 96 cspec_outputs: "string[] - New cspec files" 97 code_paths: "string[] - Code files affected" 98 tests_passed: "int?" 99 tests_failed: "int?" 100 coverage: "float? - 0.0-1.0" 101 follow_up: 102 new_tasks: "task_v1[] - Spawned subtasks" 103 blockers: "blocker_v1[] - Blockers encountered" 104 questions: "question_v1[] - Questions for human" 105 106 question_v1: 107 description: "Human escalation question" 108 fields: 109 meta: 110 id: "string - q_YYYYMMDD_HHMMSS_shortname" 111 worker: "string" 112 task_id: "string" 113 created: "iso8601" 114 priority: "question_priority enum" 115 question: 116 summary: "string - One-line for UI" 117 context: "string - Background information" 118 detail: "string - Full question text" 119 options: "option_v1[]? - Suggested options" 120 response: 121 answered: "iso8601?" 122 answer: "string?" 123 selected_option: "string? - Option ID" 124 125 option_v1: 126 description: "Question option" 127 fields: 128 id: "string" 129 label: "string - Short label" 130 description: "string - Full description" 131 implications: "string[] - What this choice means" 132 133 blocker_v1: 134 description: "Task blocker" 135 fields: 136 id: "string - blk_YYYYMMDD_HHMMSS_shortname" 137 severity: "enum[hard|soft]" 138 blocker: 139 title: "string" 140 description: "string" 141 resolution: "string - What's needed" 142 owner: "enum[human|planner|executor|external]" 143 status: 144 state: "enum[active|resolved|wontfix]" 145 resolved_at: "iso8601?" 146 resolution_notes: "string?" 147 148 session_v1: 149 description: "Context preservation for resumption" 150 fields: 151 meta: 152 id: "string - session_YYYYMMDD_HHMMSS_topic" 153 worker: "string" 154 created: "iso8601" 155 last_updated: "iso8601" 156 context: 157 task_id: "string" 158 objective: "string" 159 active_files: "string[]" 160 session_decisions: "string[]" 161 state: 162 completed_steps: "string[]" 163 remaining_steps: "string[]" 164 notes: "string[]" 165 pending_changes: "string?" 166 resume: 167 instruction: "string - What to do next" 168 context_load: "string[] - Additional cspecs" 169 170 # ============================================================================= 171 # USAGE WITH CLAUDE CODE TASK TOOL 172 # ============================================================================= 173 174 usage_notes: 175 - "These schemas define structured communication for AI workers" 176 - "In Claude Code, use Task tool with subagent_type for spawning" 177 - "Workers receive prompts; results returned as structured data" 178 - "Questions can be asked via AskUserQuestion tool"