services/computer-use-mcp/planning-orchestration-contract.md
This document defines the first contract for a future Planning Orchestration
Layer in computer-use-mcp.
It is not a runtime planner implementation. It does not execute lanes, call a model, mutate memory, or register MCP tools. The goal is to fix the authority boundary before any cross-lane planner is introduced.
Current repo facts:
WorkflowDefinition is a static workflow template and execution path.coding_plan_changes is coding-lane internal DAG/session planning.TaskMemory is current-run recovery data, not plan authority.The Planning Orchestration Layer is a future layer above individual lanes:
AIRI Host / User Goal
-> Planning Orchestration Layer
-> Lane Router
-> coding / desktop / browser_dom / terminal / human lanes
-> tool evidence and runtime trace
-> Plan Reconciler
-> Verification Gate / Human Approval
-> Final Result
The tested contract lives in:
src/planning-orchestration/contract.tssrc/planning-orchestration/contract.test.tsThe current contract defines:
PlanSpecPlanStatePlanLanePlanReconcilerDecisionPlanSpec describes intended current-run work.
Each step includes:
idlane: coding | desktop | browser_dom | terminal | humanintentallowedToolsexpectedEvidenceriskLevelapprovalRequiredWithout allowedTools and expectedEvidence, a plan is only prose. The future
router and reconciler must treat those fields as constraints, not decoration.
PlanState is current-run runtime state.
It may record:
It must not be written to Workspace Memory, plast-mem, or Run Evidence Archive by this contract. Future projection may show a bounded plan-state summary, but only as runtime guidance.
Any model-visible plan block must start with:
Current execution plan (runtime guidance, not authority):
It must also state:
Lower entries are weaker:
Consequences:
Future PlanReconciler decisions are limited to:
continuereplanrequire_approvalfailready_for_final_verificationready_for_final_verification is not completion. The verification gate still
decides whether the run can report success.
test(computer-use-mcp): define plan state projection contract
feat(computer-use-mcp): add current-run plan state projection
test(computer-use-mcp): define plan evidence reconciliation contract
feat(computer-use-mcp): route plan steps across lanes