{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://ccc.local/schemas/run.schema.json",
"type": "object",
"additionalProperties": false,
"required": [
"run_id",
"goal",
"status",
"stage",
"active_role",
"active_agent_id",
"active_task_card_id",
"active_thread_id",
"task_card_ids",
"latest_handoff_id",
"child_agents",
"specialist_executors",
"latest_verified_checkpoint",
"latest_verification",
"latest_failure",
"latest_orchestrator_synthesis",
"latest_response",
"latest_entry_trace",
"review_policy",
"way_clarification_request",
"prompt_refinement",
"raw_thread_ids",
"created_at",
"updated_at",
"completed_at"
],
"properties": {
"run_id": {
"type": "string",
"minLength": 1
},
"goal": {
"type": "string",
"minLength": 1
},
"status": {
"type": "string",
"enum": ["queued", "active", "blocked", "completed", "failed", "cancelled"]
},
"stage": {
"type": "string",
"enum": ["way", "handoff", "execution", "verification", "compatibility"]
},
"active_role": {
"enum": ["orchestrator", "way", "explorer", "code specialist", "documenter", "verifier", null]
},
"active_agent_id": {
"enum": ["captain", "tactician", "scout", "raider", "scribe", "arbiter", null]
},
"active_task_card_id": {
"type": ["string", "null"],
"minLength": 1
},
"active_thread_id": {
"type": ["string", "null"],
"minLength": 1
},
"task_card_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"latest_handoff_id": {
"type": ["string", "null"],
"minLength": 1
},
"child_agents": {
"type": "array",
"items": {
"$ref": "#/$defs/childAgent"
}
},
"specialist_executors": {
"type": "array",
"items": {
"$ref": "#/$defs/specialistExecutor"
}
},
"latest_verified_checkpoint": {
"anyOf": [
{
"$ref": "#/$defs/verifiedCheckpointRecord"
},
{
"type": "null"
}
]
},
"latest_verification": {
"anyOf": [
{
"$ref": "#/$defs/verificationRecord"
},
{
"type": "null"
}
]
},
"latest_failure": {
"anyOf": [
{
"$ref": "#/$defs/failureRecord"
},
{
"type": "null"
}
]
},
"latest_orchestrator_synthesis": {
"anyOf": [
{
"$ref": "#/$defs/orchestratorSynthesisRecord"
},
{
"type": "null"
}
]
},
"latest_response": {
"anyOf": [
{
"$ref": "#/$defs/synthesizedRunResponse"
},
{
"type": "null"
}
]
},
"latest_entry_trace": {
"anyOf": [
{
"$ref": "#/$defs/latestEntryTraceRecord"
},
{
"type": "null"
}
]
},
"review_policy": {
"anyOf": [
{
"$ref": "#/$defs/reviewPolicy"
},
{
"type": "null"
}
]
},
"ccc_loop": {
"type": ["object", "null"],
"additionalProperties": true
},
"latest_captain_intervention": {
"anyOf": [
{
"$ref": "#/$defs/captainIntervention"
},
{
"type": "null"
}
]
},
"latest_sentinel_intervention": {
"anyOf": [
{
"$ref": "#/$defs/sentinelIntervention"
},
{
"type": "null"
}
]
},
"way_clarification_request": {
"anyOf": [
{
"$ref": "#/$defs/wayClarificationRequestRecord"
},
{
"type": "null"
}
]
},
"prompt_refinement": {
"anyOf": [
{
"$ref": "#/$defs/promptRefinementRecord"
},
{
"type": "null"
}
]
},
"prompt_refinement_handoff_decision": {
"$ref": "#/$defs/promptRefinementHandoffDecisionRecord"
},
"goal_bridge": {
"$ref": "#/$defs/goalBridgeRecord"
},
"raw_thread_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"created_at": {
"type": "string",
"minLength": 1
},
"updated_at": {
"type": "string",
"minLength": 1
},
"completed_at": {
"type": ["string", "null"],
"minLength": 1
}
},
"$defs": {
"reviewPolicy": {
"type": "object",
"additionalProperties": false,
"required": [
"decision",
"state",
"risk",
"required",
"recommended_reviewers",
"reviewer_cap",
"active_reviewers",
"reason_code",
"summary",
"recorded_at"
],
"properties": {
"decision": {
"type": "string",
"enum": ["skip", "recommend_single", "require", "suppress_for_resource_limit", "suppress_for_runtime_pressure"]
},
"state": {
"type": "string",
"enum": ["skipped", "recommended", "required", "running", "passed", "needs_work", "blocked", "reclaimed", "suppressed"]
},
"risk": {
"type": "string",
"enum": ["low", "moderate", "high"]
},
"required": {
"type": "boolean"
},
"recommended_reviewers": {
"type": "integer",
"minimum": 0
},
"reviewer_cap": {
"type": "integer",
"minimum": 0
},
"active_reviewers": {
"type": "integer",
"minimum": 0
},
"reason_code": {
"type": "string",
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"resource_pressure": {
"anyOf": [
{
"$ref": "#/$defs/reviewResourcePressure"
},
{
"type": "null"
}
]
},
"recorded_at": {
"type": ["string", "null"],
"minLength": 1
}
}
},
"reviewResourcePressure": {
"type": "object",
"additionalProperties": false,
"required": [
"source",
"high_pressure",
"pressure_reason",
"stale_worker_count",
"timed_out_worker_count",
"reclaim_needed_worker_count",
"active_run_count",
"token_total",
"token_soft_limit"
],
"properties": {
"source": {
"type": "string",
"minLength": 1
},
"high_pressure": {
"type": "boolean"
},
"pressure_reason": {
"type": ["string", "null"],
"minLength": 1
},
"stale_worker_count": {
"type": "integer",
"minimum": 0
},
"timed_out_worker_count": {
"type": "integer",
"minimum": 0
},
"reclaim_needed_worker_count": {
"type": "integer",
"minimum": 0
},
"active_run_count": {
"type": "integer",
"minimum": 0
},
"token_total": {
"type": "integer",
"minimum": 0
},
"token_soft_limit": {
"type": ["integer", "null"],
"minimum": 1
}
}
},
"captainIntervention": {
"type": "object",
"additionalProperties": false,
"required": [
"classification",
"rationale",
"chosen_next_action",
"budget_snapshot",
"next_action_blocked",
"stale_output_policy",
"stale_output_summary",
"evidence_paths",
"open_questions",
"authority",
"recorded_at"
],
"properties": {
"classification": {
"type": "string",
"enum": ["clarification_only", "bounded_scope_amendment", "direction_or_risk_correction"]
},
"rationale": {
"type": "string",
"minLength": 1
},
"chosen_next_action": {
"type": "string",
"enum": ["amend_same_worker", "reclaim", "reassign", "close", "clarify", "no_action"]
},
"budget_snapshot": {
"type": ["object", "null"],
"additionalProperties": true
},
"next_action_blocked": {
"type": "boolean"
},
"next_action_block_reason": {
"type": ["string", "null"],
"enum": ["retry_budget_exhausted", "reassign_budget_exhausted", "budget_exhausted", "retry_budget_unavailable", "reassign_budget_unavailable", "reassign_target_missing", null]
},
"pending_follow_up": {
"anyOf": [
{
"$ref": "#/$defs/captainPendingFollowUp"
},
{
"type": "null"
}
]
},
"stale_output_policy": {
"type": ["string", "null"],
"minLength": 1
},
"stale_output_summary": {
"type": ["string", "null"],
"minLength": 1
},
"summary": {
"type": ["string", "null"],
"minLength": 1
},
"subagent_status": {
"type": ["string", "null"],
"minLength": 1
},
"evidence_paths": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"open_questions": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"authority": {
"const": "captain_decides_intervention"
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"sentinelIntervention": {
"type": "object",
"additionalProperties": false,
"required": [
"classification",
"rationale",
"next_action",
"summary",
"source",
"child_agent_id",
"subagent_status",
"evidence_paths",
"open_questions",
"policy_drift",
"authority",
"recorded_at"
],
"properties": {
"classification": {
"type": "string",
"enum": ["observe", "warn", "enforce"]
},
"rationale": {
"type": "string",
"minLength": 1
},
"next_action": {
"type": "string",
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string",
"enum": ["sentinel_subagent", "policy_drift_guardrail"]
},
"child_agent_id": {
"type": "string",
"minLength": 1
},
"subagent_status": {
"type": ["string", "null"],
"minLength": 1
},
"evidence_paths": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"open_questions": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"policy_drift": {
"type": "object",
"additionalProperties": true
},
"authority": {
"const": "sentinel_guardrail"
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"captainPendingFollowUp": {
"type": "object",
"additionalProperties": false,
"required": [
"status",
"action",
"source_task_card_id",
"assigned_role",
"assigned_agent_id",
"lane_id",
"scope",
"prompt",
"budget_key",
"budget_snapshot",
"dedupe_key",
"queued_at",
"authority"
],
"properties": {
"status": {
"type": "string",
"enum": ["queued", "consumed"]
},
"action": {
"type": "string",
"enum": ["amend_same_worker", "reassign"]
},
"source_task_card_id": {
"type": "string",
"minLength": 1
},
"assigned_role": {
"type": "string",
"minLength": 1
},
"assigned_agent_id": {
"type": "string",
"minLength": 1
},
"lane_id": {
"type": ["string", "null"],
"minLength": 1
},
"scope": {
"type": ["string", "null"],
"minLength": 1
},
"prompt": {
"type": "string",
"minLength": 1
},
"budget_key": {
"type": "string",
"enum": ["retry", "reassign"]
},
"budget_snapshot": {
"type": ["object", "null"],
"additionalProperties": true
},
"dedupe_key": {
"type": "string",
"minLength": 1
},
"queued_at": {
"type": "string",
"minLength": 1
},
"consumed_at": {
"type": ["string", "null"],
"minLength": 1
},
"consumed_task_card_id": {
"type": ["string", "null"],
"minLength": 1
},
"authority": {
"const": "captain_owned_follow_up"
}
}
},
"childAgent": {
"type": "object",
"additionalProperties": false,
"required": ["agent_id", "parent_agent_id", "role", "status", "task_card_id"],
"properties": {
"agent_id": {
"type": "string",
"minLength": 1
},
"parent_agent_id": {
"type": ["string", "null"],
"minLength": 1
},
"role": {
"type": "string",
"enum": ["orchestrator", "way", "explorer", "code specialist", "documenter", "verifier"]
},
"status": {
"type": "string",
"enum": ["queued", "running", "completed", "failed", "cancelled"]
},
"task_card_id": {
"type": ["string", "null"],
"minLength": 1
},
"lane_id": {
"type": ["string", "null"],
"enum": ["raider-a", "raider-b", "raider-c", "raider-d", null]
}
}
},
"specialistExecutor": {
"type": "object",
"additionalProperties": false,
"required": ["executor_id", "status", "task_card_id", "delegation_id", "child_agent_id"],
"properties": {
"executor_id": {
"type": "string",
"minLength": 1
},
"status": {
"type": "string",
"enum": ["queued", "running", "completed", "failed", "cancelled"]
},
"task_card_id": {
"type": "string",
"minLength": 1
},
"lane_id": {
"type": ["string", "null"],
"enum": ["raider-a", "raider-b", "raider-c", "raider-d", null]
},
"delegation_id": {
"type": "string",
"pattern": "^delegation-[0-9]{4,}$"
},
"child_agent_id": {
"type": "string",
"minLength": 1
}
}
},
"verificationRecord": {
"type": "object",
"additionalProperties": false,
"required": ["state", "summary", "recorded_at"],
"properties": {
"state": {
"type": "string",
"enum": ["pending", "passed", "needs_work", "blocked"]
},
"summary": {
"type": "string",
"minLength": 1
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"verifiedCheckpointRecord": {
"type": "object",
"additionalProperties": false,
"required": ["task_card_id", "title", "summary", "recorded_at"],
"properties": {
"task_card_id": {
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"failureRecord": {
"type": "object",
"additionalProperties": false,
"required": ["stage", "reason", "summary", "recorded_at"],
"properties": {
"stage": {
"type": "string",
"enum": ["way", "handoff", "execution", "verification", "compatibility"]
},
"reason": {
"type": "string",
"enum": [
"surface_mismatch",
"invalid_output",
"timeout",
"cancelled",
"blocked_dependency",
"verification_failed",
"unknown"
]
},
"summary": {
"type": "string",
"minLength": 1
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"wayClarificationRequestRecord": {
"type": "object",
"additionalProperties": false,
"required": ["way_attempt_id", "summary", "clarification_request", "recorded_at"],
"properties": {
"way_attempt_id": {
"type": "string",
"pattern": "^attempt-[0-9]{4,}$"
},
"summary": {
"type": "string",
"minLength": 1
},
"clarification_request": {
"type": "string",
"minLength": 1
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"promptRefinementRecord": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"state",
"enabled",
"execution_mode",
"owner",
"captain_gate",
"longway_materialization_allowed",
"task_card_creation_allowed",
"source",
"task_card_id",
"created_at",
"consumed_at",
"recorded_at",
"ghost_contract"
],
"properties": {
"schema": {
"type": "string",
"const": "ccc.prompt_refinement.v1"
},
"state": {
"type": "string",
"enum": ["disabled", "planned", "executed"]
},
"enabled": {
"type": "boolean"
},
"execution_mode": {
"type": "string",
"enum": ["internal", "bounded_runtime_deterministic"]
},
"execution_status": {
"type": "string",
"enum": ["disabled", "completed"]
},
"owner": {
"type": "string",
"const": "captain"
},
"captain_gate": {
"type": "string",
"const": "accept_adjust_reject"
},
"longway_materialization_allowed": {
"type": "boolean"
},
"task_card_creation_allowed": {
"type": "boolean"
},
"source": {
"type": "string",
"const": "ccc_promptsmith"
},
"task_card_id": {
"type": "string",
"minLength": 1
},
"created_at": {
"type": "string",
"minLength": 1
},
"consumed_at": {
"type": ["string", "null"],
"minLength": 1
},
"recorded_at": {
"type": "string",
"minLength": 1
},
"ghost_contract": {
"type": "object",
"additionalProperties": true,
"required": [
"schema",
"source",
"owner",
"input_contract",
"output_contract",
"status_evidence"
],
"properties": {
"schema": {
"type": "string",
"const": "ccc.promptsmith_ghost_contract.v1"
},
"source": {
"type": "string",
"const": "ccc_promptsmith"
},
"owner": {
"type": "string",
"const": "ccc_promptsmith"
},
"input_contract": {
"type": "object",
"additionalProperties": true,
"required": ["source", "required_fields", "public_override_allowed"]
},
"output_contract": {
"type": "object",
"additionalProperties": true,
"required": ["state", "fields", "status_surface_allowed"]
},
"status_evidence": {
"type": "object",
"additionalProperties": true,
"required": ["status_surface_allowed", "model_dispatch_required"]
}
}
},
"refined_brief": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"language",
"source",
"execution_mode",
"created_at",
"summary"
],
"properties": {
"schema": {
"type": "string",
"const": "ccc.prompt_refinement_brief.v1"
},
"language": {
"type": "string",
"const": "en"
},
"source": {
"type": "string",
"const": "deterministic_start_payload"
},
"execution_mode": {
"type": "string",
"const": "deterministic_no_model_dispatch"
},
"created_at": {
"type": "string",
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1,
"maxLength": 700
}
}
},
"ghost_runtime_dispatch": {
"type": "object",
"additionalProperties": true
},
"captain_decision": {
"type": "object",
"additionalProperties": true
}
}
},
"promptRefinementHandoffDecisionRecord": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"state",
"visibility",
"execution_mode",
"owner",
"source",
"task_card_id",
"created_at",
"updated_at",
"handoff",
"captain_gate",
"brief_contract",
"dispatch_allowed",
"longway_materialization_allowed",
"task_card_creation_allowed"
],
"properties": {
"schema": {
"type": "string",
"const": "ccc.prompt_refinement_handoff_decision.v1"
},
"state": {
"type": "string",
"enum": ["pending_captain_decision", "accepted"]
},
"visibility": {
"type": "string",
"const": "internal"
},
"execution_mode": {
"type": "string",
"enum": ["internal_non_executing", "bounded_runtime_deterministic"]
},
"execution_status": {
"type": "string",
"enum": ["completed", "pending"]
},
"owner": {
"type": "string",
"const": "captain"
},
"source": {
"type": "string",
"const": "ccc_promptsmith"
},
"task_card_id": {
"type": "string",
"minLength": 1
},
"created_at": {
"type": "string",
"minLength": 1
},
"updated_at": {
"type": "string",
"minLength": 1
},
"handoff": {
"type": "object",
"additionalProperties": false,
"required": ["from", "to", "stage"],
"properties": {
"from": {
"type": "string",
"const": "ghost"
},
"to": {
"type": "string",
"const": "captain"
},
"stage": {
"type": "string",
"const": "pre_materialization"
}
}
},
"captain_gate": {
"type": "object",
"additionalProperties": false,
"required": ["state", "allowed_decisions", "decision", "decided_at"],
"properties": {
"state": {
"type": "string",
"enum": ["pending", "accepted"]
},
"allowed_decisions": {
"type": "array",
"items": {
"type": "string",
"enum": ["accept", "adjust", "reject"]
},
"minItems": 3,
"maxItems": 3,
"uniqueItems": true
},
"decision": {
"enum": ["accept", "adjust", "reject", null]
},
"decided_at": {
"type": ["string", "null"],
"minLength": 1
}
}
},
"brief_contract": {
"type": "object",
"additionalProperties": false,
"required": ["language", "refined_brief_persisted", "status_surface_allowed"],
"properties": {
"language": {
"type": "string",
"const": "en"
},
"refined_brief_persisted": {
"type": "boolean",
"const": true
},
"status_surface_allowed": {
"type": "boolean",
"const": true
},
"ghost_contract_source": {
"type": "string",
"const": "ccc_promptsmith"
}
}
},
"dispatch_allowed": {
"type": "boolean"
},
"longway_materialization_allowed": {
"type": "boolean"
},
"task_card_creation_allowed": {
"type": "boolean"
}
}
},
"goalBridgeRecord": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"state",
"enabled",
"visibility",
"execution_mode",
"owner",
"mode",
"task_card_id",
"created_at",
"recorded_at",
"brief_contract",
"truth_contract",
"specialist_policy",
"public_api"
],
"properties": {
"schema": {
"type": "string",
"const": "ccc.goal_bridge.v1"
},
"state": {
"type": "string",
"enum": ["planned", "accepted"]
},
"enabled": {
"type": "boolean",
"const": true
},
"visibility": {
"type": "string",
"const": "internal"
},
"execution_mode": {
"type": "string",
"enum": ["internal_non_executing", "bounded_internal"]
},
"execution_status": {
"type": "string",
"enum": ["completed"]
},
"owner": {
"type": "string",
"const": "captain"
},
"mode": {
"type": "string",
"const": "captain_owned"
},
"task_card_id": {
"type": "string",
"minLength": 1
},
"created_at": {
"type": "string",
"minLength": 1
},
"recorded_at": {
"type": "string",
"minLength": 1
},
"accepted_goal_brief": {
"type": "object",
"additionalProperties": true
},
"subgoal_context": {
"type": "object",
"additionalProperties": true
},
"brief_contract": {
"type": "object",
"additionalProperties": false,
"required": ["language", "max_lines", "require_verifiable_stop"],
"properties": {
"language": {
"type": "string",
"const": "en"
},
"max_lines": {
"type": "integer",
"minimum": 1
},
"require_verifiable_stop": {
"type": "boolean",
"const": true
}
}
},
"truth_contract": {
"type": "object",
"additionalProperties": false,
"required": ["host_goal_state_is_truth", "authoritative_state"],
"properties": {
"host_goal_state_is_truth": {
"type": "boolean",
"const": false
},
"authoritative_state": {
"type": "array",
"items": {
"type": "string",
"enum": [
"longway",
"task_cards",
"fan_in_records",
"review_decisions",
"fallback_records",
"verification_capsules"
]
},
"minItems": 1,
"uniqueItems": true
}
}
},
"specialist_policy": {
"type": "object",
"additionalProperties": false,
"required": [
"allow_specialist_goal_context",
"allow_specialist_set_goal",
"allow_specialist_clear_goal",
"allow_specialist_override_goal",
"max_subgoal_lines",
"require_captain_acceptance"
],
"properties": {
"allow_specialist_goal_context": {
"type": "boolean"
},
"allow_specialist_set_goal": {
"type": "boolean",
"const": false
},
"allow_specialist_clear_goal": {
"type": "boolean",
"const": false
},
"allow_specialist_override_goal": {
"type": "boolean",
"const": false
},
"max_subgoal_lines": {
"type": "integer",
"minimum": 1
},
"require_captain_acceptance": {
"type": "boolean",
"const": true
}
}
},
"public_api": {
"type": "object",
"additionalProperties": false,
"required": [
"public_command",
"public_skill",
"public_entrypoint",
"set_goal_api_guaranteed"
],
"properties": {
"public_command": {
"type": "boolean",
"const": false
},
"public_skill": {
"type": "boolean",
"const": false
},
"public_entrypoint": {
"type": "boolean",
"const": false
},
"set_goal_api_guaranteed": {
"type": "boolean",
"const": false
}
}
}
}
},
"orchestratorSynthesisRecord": {
"type": "object",
"additionalProperties": false,
"required": [
"task_card_id",
"next_step",
"boundary",
"summary",
"user_message",
"recommended_action",
"decision_class",
"allowed_next_actions",
"decision_source",
"worker_result_count",
"review_outcome",
"recorded_at"
],
"properties": {
"task_card_id": {
"type": "string",
"minLength": 1
},
"next_step": {
"type": "string",
"enum": [
"execute_task",
"verify_task",
"await_fan_in",
"await_verification",
"await_repair_decision",
"await_operator",
"halt_completed",
"halt_failed",
"halt_cancelled"
]
},
"boundary": {
"type": "string",
"enum": ["continue", "manual_hold", "terminal"]
},
"provenance_header": {
"type": ["string", "null"],
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"user_message": {
"type": "string",
"minLength": 1
},
"recommended_action": {
"type": "string",
"enum": ["advance", "verify", "resolve", "retry", "replan", "escalate", "none"]
},
"decision_class": {
"type": "string",
"enum": [
"continue_execute",
"continue_verify",
"continue_fan_in",
"manual_resolve",
"manual_retry",
"manual_replan",
"manual_escalate",
"terminal_success",
"terminal_failure",
"terminal_cancelled"
]
},
"allowed_next_actions": {
"type": "array",
"items": {
"type": "string",
"enum": ["advance", "verify", "resolve", "retry", "replan", "escalate", "none"]
}
},
"decision_source": {
"type": "string",
"enum": ["orchestrator_policy"]
},
"worker_result_count": {
"type": "integer",
"minimum": 0
},
"review_outcome": {
"type": ["string", "null"],
"enum": ["pass", "repair", "hold", "pending", null]
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"synthesizedRunResponse": {
"type": "object",
"additionalProperties": false,
"required": [
"boundary",
"summary",
"user_message",
"recommended_action",
"decision_class",
"allowed_next_actions",
"decision_source",
"worker_result_count",
"review_outcome",
"recorded_at"
],
"properties": {
"boundary": {
"type": "string",
"enum": ["manual_hold", "terminal"]
},
"provenance_header": {
"type": ["string", "null"],
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"user_message": {
"type": "string",
"minLength": 1
},
"recommended_action": {
"type": "string",
"enum": ["advance", "verify", "resolve", "retry", "replan", "escalate", "none"]
},
"decision_class": {
"type": "string",
"enum": [
"continue_execute",
"continue_verify",
"continue_fan_in",
"manual_resolve",
"manual_retry",
"manual_replan",
"manual_escalate",
"terminal_success",
"terminal_failure",
"terminal_cancelled"
]
},
"allowed_next_actions": {
"type": "array",
"items": {
"type": "string",
"enum": ["advance", "verify", "resolve", "retry", "replan", "escalate", "none"]
}
},
"decision_source": {
"type": "string",
"enum": ["orchestrator_policy"]
},
"worker_result_count": {
"type": "integer",
"minimum": 0
},
"review_outcome": {
"type": ["string", "null"],
"enum": ["pass", "repair", "hold", "pending", null]
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
},
"latestEntryTraceRecord": {
"type": "object",
"additionalProperties": false,
"required": [
"request",
"run_selection",
"requester_session_id",
"continuity_strategy",
"continuity_summary",
"entry_boundary",
"upstream_codex_binary_intercept_supported",
"run_decision_reason",
"summary",
"answer_trace",
"recorded_at"
],
"properties": {
"request": {
"type": "string",
"minLength": 1
},
"run_selection": {
"type": "string",
"enum": ["new_run_created", "existing_run_reused", "no_run_created"]
},
"requester_session_id": {
"type": ["string", "null"],
"minLength": 1
},
"continuity_strategy": {
"type": "string",
"enum": ["session_fresh_run_first", "session_bound_first", "workspace_run_search"]
},
"continuity_summary": {
"type": "string",
"minLength": 1
},
"entry_boundary": {
"type": "string",
"enum": ["explicit_cli_or_mcp", "explicit_auto_entry", "session_instruction_plus_wrapper"]
},
"upstream_codex_binary_intercept_supported": {
"const": false
},
"run_decision_reason": {
"type": "string",
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"sentinel_intervention": {
"anyOf": [
{
"$ref": "#/$defs/sentinelIntervention"
},
{
"type": "null"
}
]
},
"answer_trace": {
"type": "object",
"additionalProperties": false,
"required": [
"request_shape",
"mutation_intent",
"companion_tool_route_class",
"companion_tool_names",
"companion_tool_operation",
"tool_owner_role",
"tool_owner_model",
"tool_owner_variant",
"tool_execution_state",
"tool_execution_owner",
"workflow_variant_selection",
"selected_role",
"execution_path",
"follow_proof",
"completion_rule",
"budget_class",
"review_requirement",
"why_selected",
"why_not_local",
"why_not_heavier_role"
],
"properties": {
"request_shape": {
"type": "string",
"enum": ["existence_check", "lookup", "survey", "diagnosis", "way", "mutation", "verification", "synthesis"]
},
"mutation_intent": {
"type": "string",
"enum": ["none", "explicit_or_strong"]
},
"companion_tool_route_class": {
"type": "string",
"enum": ["none", "workspace_inspection", "docs_lookup", "git_inspection", "git_mutation", "multi_source_evidence"]
},
"companion_tool_names": {
"type": "array",
"items": {
"type": "string",
"enum": ["filesystem", "git", "context7", "fetch", "openaiDeveloperDocs"]
}
},
"companion_tool_operation": {
"type": "string",
"enum": ["none", "read", "mutation"]
},
"tool_owner_role": {
"type": ["string", "null"],
"enum": ["captain", "tactician", "scout", "raider", "scribe", "arbiter", "sentinel", "companion_reader", "companion_operator", null]
},
"tool_owner_model": {
"type": ["string", "null"],
"minLength": 1
},
"tool_owner_variant": {
"type": ["string", "null"],
"enum": ["low", "medium", "high", "xhigh", null]
},
"tool_execution_state": {
"type": "string",
"enum": ["not_applicable", "selected_policy_only", "route_backed_specialist_owned", "degraded_host_fallback"]
},
"tool_execution_owner": {
"type": ["string", "null"],
"enum": ["captain", "tactician", "scout", "raider", "scribe", "arbiter", "sentinel", "companion_reader", "companion_operator", null]
},
"execution_plan": {
"type": "object",
"additionalProperties": false,
"required": [
"version",
"composition_owner",
"ccc_mcp_role",
"request_traits",
"phases",
"modifiers",
"current_phase",
"next_phase",
"summary"
],
"properties": {
"version": {
"const": 1
},
"composition_owner": {
"const": "host_captain"
},
"ccc_mcp_role": {
"const": "capability_catalog_state_and_worker_launch"
},
"request_traits": {
"type": "object",
"additionalProperties": false,
"required": [
"needs_way",
"needs_investigation",
"needs_mutation",
"needs_review",
"needs_ownership_check",
"output_kind",
"mutation_mode",
"parallel",
"risk"
],
"properties": {
"needs_way": {
"type": "boolean"
},
"needs_investigation": {
"type": "boolean"
},
"needs_mutation": {
"type": "boolean"
},
"needs_review": {
"type": "boolean"
},
"needs_ownership_check": {
"type": "boolean"
},
"output_kind": {
"type": "string",
"enum": ["answer", "docs", "code", "mixed"]
},
"mutation_mode": {
"type": "string",
"enum": ["none", "conditional", "required"]
},
"parallel": {
"type": "boolean"
},
"risk": {
"type": "string",
"enum": ["low", "medium", "high"]
}
}
},
"phases": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"phase",
"owner_agent",
"requires_codex_exec",
"skill_contract",
"preconditions",
"handoff_inputs"
],
"properties": {
"phase": {
"type": "string",
"enum": ["way", "inspect", "gate", "ownership_check", "document", "mutate", "verify", "fan_in", "synthesize"]
},
"owner_agent": {
"type": "string",
"enum": ["captain", "tactician", "scout", "raider", "scribe", "arbiter", "sentinel"]
},
"requires_codex_exec": {
"type": "boolean"
},
"skill_contract": {
"type": "string",
"minLength": 1
},
"preconditions": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"handoff_inputs": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
}
}
},
"modifiers": {
"type": "object",
"additionalProperties": false,
"required": [
"output_kind",
"mutation_mode",
"review_required",
"evidence_required",
"ownership_check",
"parallel",
"fanout_cap"
],
"properties": {
"output_kind": {
"type": "string",
"enum": ["answer", "docs", "code", "mixed"]
},
"mutation_mode": {
"type": "string",
"enum": ["none", "conditional", "required"]
},
"review_required": {
"type": "boolean"
},
"evidence_required": {
"type": "boolean"
},
"ownership_check": {
"type": "boolean"
},
"parallel": {
"type": "boolean"
},
"fanout_cap": {
"type": "integer",
"minimum": 1
}
}
},
"current_phase": {
"type": "string",
"enum": ["way", "inspect", "gate", "ownership_check", "document", "mutate", "verify", "fan_in", "synthesize"]
},
"next_phase": {
"type": ["string", "null"],
"enum": ["way", "inspect", "gate", "ownership_check", "document", "mutate", "verify", "fan_in", "synthesize", null]
},
"summary": {
"type": "string",
"minLength": 1
}
}
},
"workflow_variant_selection": {
"type": "object",
"additionalProperties": false,
"required": [
"workflow_variant",
"workflow_skill_id",
"workflow_agent_route",
"workflow_summary",
"operator_visible"
],
"properties": {
"workflow_variant": {
"type": "string",
"enum": [
"read_only",
"mutation",
"way",
"verification",
"parallel",
"investigate_only",
"investigate_then_document",
"diagnose_then_fix",
"fix_only",
"plan_then_implement",
"implement_then_review",
"verify_only",
"ownership_drift_check",
"parallel_fanout"
]
},
"workflow_skill_id": {
"type": "string",
"enum": [
"captain_read_only",
"captain_mutation",
"captain_way",
"captain_verification",
"captain_parallel",
"captain_investigate_only",
"captain_investigate_then_document",
"captain_diagnose_then_fix",
"captain_fix_only",
"captain_plan_then_implement",
"captain_implement_then_review",
"captain_verify_only",
"captain_ownership_drift_check",
"captain_parallel_fanout"
]
},
"workflow_agent_route": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": ["captain", "tactician", "scout", "raider", "scribe", "arbiter", "sentinel"]
}
},
"workflow_summary": {
"type": "string",
"minLength": 1
},
"operator_visible": {
"const": false
}
}
},
"selected_role": {
"type": "string",
"enum": ["captain", "tactician", "scout", "raider", "scribe", "arbiter"]
},
"execution_path": {
"type": "string",
"enum": ["captain_local", "run_reused", "new_run"]
},
"follow_proof": {
"type": "string",
"enum": ["ccc_route_visible", "degraded_host_fallback", "captain_local_only"]
},
"completion_rule": {
"type": "string",
"enum": ["continue_ccc", "answer_now", "degraded_boundary"]
},
"budget_class": {
"type": "string",
"enum": [
"low_cost_read_only",
"low_cost_investigation",
"way_budget",
"implementation_budget",
"verification_budget"
]
},
"review_requirement": {
"type": "string",
"enum": ["none", "optional", "required"]
},
"why_selected": {
"type": "string",
"minLength": 1
},
"why_not_local": {
"type": "string",
"minLength": 1
},
"why_not_heavier_role": {
"type": "string",
"minLength": 1
}
}
},
"recorded_at": {
"type": "string",
"minLength": 1
}
}
}
}
}