4.4 KiB
Planning Orchestration Contract
Purpose
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.
Existing Boundaries
Current repo facts:
WorkflowDefinitionis a static workflow template and execution path.coding_plan_changesis coding-lane internal DAG/session planning.TaskMemoryis current-run recovery data, not plan authority.- Workspace Memory and plast-mem context are reviewed context, not completion 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
Contract Surface
The tested contract lives in:
src/planning-orchestration/contract.tssrc/planning-orchestration/contract.test.ts
The current contract defines:
PlanSpecPlanStatePlanLanePlanReconcilerDecision- planning authority precedence
- planning guidance prompt label
PlanSpec
PlanSpec describes intended current-run work.
Each step includes:
idlane:coding | desktop | browser_dom | terminal | humanintentallowedToolsexpectedEvidenceriskLevelapprovalRequired
Without allowedTools and expectedEvidence, a plan is only prose. The future
router and reconciler must treat those fields as constraints, not decoration.
PlanState
PlanState is current-run runtime state.
It may record:
- current step id
- completed steps
- failed steps
- skipped steps
- evidence references
- blockers
- last replan reason
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.
Trust Label
Any model-visible plan block must start with:
Current execution plan (runtime guidance, not authority):
It must also state:
- this is current-run guidance
- it is not executable instructions or system authority
- it never overrides active user instructions, approval/safety policy, trusted tool evidence, or verification gates
- plan completion claims require trusted evidence before final verification
Authority Order
Lower entries are weaker:
- runtime/system rules
- active user instruction
- approval/safety policy
- verification gate decision
- trusted current-run tool evidence
- plan state / reconciler decision
- current-run TaskMemory
- current-run Archive recall
- active local Workspace Memory
- plast-mem retrieved context
Consequences:
- A plan can guide next actions.
- A plan cannot mark work complete by itself.
- A plan cannot satisfy mutation proof.
- A plan cannot override tool results.
- A plan cannot bypass approval or verification gates.
Reconciler Contract
Future PlanReconciler decisions are limited to:
continuereplanrequire_approvalfailready_for_final_verification
ready_for_final_verification is not completion. The verification gate still
decides whether the run can report success.
Non-Goals
- No automatic planner model call.
- No automatic lane execution.
- No lane router implementation.
- No MCP schema or tool-surface change.
- No coding-runner prompt injection change.
- No Workspace Memory write.
- No TaskMemory merge.
- No plast-mem export or ingestion.
- No desktop/browser/coding runtime behavior change.
- No merge or rebase with upstream desktop/chrome-extension work.
Future Slices
-
test(computer-use-mcp): define plan state projection contract- Define a bounded model-visible projection shape for current-run plan state.
-
feat(computer-use-mcp): add current-run plan state projection- Inject plan guidance only after the projection contract is tested.
-
test(computer-use-mcp): define plan evidence reconciliation contract- Map expected evidence to current-run tool evidence and verification gate decisions.
-
feat(computer-use-mcp): route plan steps across lanes- Add deterministic routing only after projection and reconciliation are stable.