You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Orchestrator.agent.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ Do NOT use `vscode/askQuestions` for questions answerable from codebase evidence
79
79
- Use `revision_mode: initial_create` when no active plan exists.
80
80
- Use `revision_mode: in_place_update` for ordinary PLAN_REVIEW fixes to an active draft/current plan. The payload-selected path is `active_plan_path`, and Planner must return the same `plan_path`.
81
81
- Use `revision_mode: new_artifact_supersession` only for accepted-baseline replacement, user-requested new artifacts, material invalidation, or independent citation needs. The payload-selected path is `existing_plan_path`, and the new Planner output should set `revision_of` to that prior path.
82
-
- Apply the Universal Model Resolution Rule before every Planner dispatch. For replan/update dispatches, the outer `agent/runSubagent` call must include the resolved outer `model`, and the Planner payload must include payload-level `model`, `trace_id`, review-loop `iteration_index`, `revision_mode`, `revision_reason`, and exactly the selected path field for the mode: `active_plan_path` for `in_place_update` or `existing_plan_path` for `new_artifact_supersession`.
82
+
- Apply the Universal Model Resolution Rule before every Planner dispatch. For replan/update dispatches, deterministic mode must include the resolved outer `model`, while auto mode intentionally omits outer `model`; the Planner payload must include `runtime_model_mode`, payload-level `model` when deterministic mode requires it, `trace_id`, review-loop `iteration_index`, `revision_mode`, `revision_reason`, and exactly the selected path field for the mode: `active_plan_path` for `in_place_update` or `existing_plan_path` for `new_artifact_supersession`.
83
83
- Serialize write-capable Planner revisions by `(trace_id, active_plan_path)`. Never run two write-capable Planner updates to the same plan in parallel; parallel review agents may read the same `plan_path` but must not edit it.
84
84
- Phase 3 structural validation is not behavior-complete. `cd evals && npm run test:structural` confirms schema structure and legacy compatibility only; Phase 4 owns conditional enforcement behavior tests and scenario migration for `revision_mode`, selected path fields, `trace_id`, and `iteration_index`.
85
85
@@ -178,7 +178,7 @@ This rule covers all dispatch paths without exception: Plan Review Gate reviewer
178
178
179
179
### Dispatch Tool-Call Contract (Required Fields)
180
180
181
-
Every `agent/runSubagent` call must include these outer tool-call fields:
181
+
Every `agent/runSubagent` call must follow these outer tool-call envelope rules:
182
182
-**`agentName`** — the verified target-agent field (string). Placing the agent name only inside prompt prose or a delegation payload is non-compliant.
183
183
-**`model`** — mode-conditional outer runtime selector from the Universal Model Resolution Rule. In deterministic mode (opt-in for pinned dispatch), pass the resolved primary as the outer `model` field and never omit it. In auto mode (the default), omit the outer `model` field intentionally so Copilot selects the model automatically.
184
184
-**Prompt/context payload** — scope, deliverables, and relevant context references.
@@ -265,7 +265,7 @@ For `CodeReviewer-subagent`, `PlanAuditor-subagent`, and `AssumptionVerifier-sub
265
265
- If a legacy phase omits `executor_agent`, do not infer silently. Route the plan back through `REPLAN` to Planner and stop the implementation batch until the phase is reissued with an explicit executor.
266
266
- Build a `phase_task_card` for executor payloads when the phase has `phase_task_card_path`, the plan uses `resource_profile: small_local`, or `governance/runtime-policy.json``resource_profiles.small_local.require_phase_task_card` applies. The card must include objective, allowed files, forbidden areas, context artifacts, validation commands, acceptance checks, max changed files, and escalation rule.
267
267
- When `phase_task_card` budgets are exceeded, do not widen the phase silently. Route to Planner with `needs_replan` or stop with `NEEDS_INPUT` according to the card's escalation rule.
268
-
-**Model Resolution:** Apply the Universal Model Resolution Rule (see Execution Protocol preamble above) before delegating execution: look up `phase.executor_agent` in `agent_role_index`, resolve `roles[role].by_tier[complexity_tier]`, and pass the resolved primary model as the `model` parameter. If the tier entry is `{ "inherit_from": "default" }`, use the role's default `primary`. Only pass a fallback list if `agent/runSubagent` explicitly supports one.
268
+
-**Model Resolution:** Apply the Universal Model Resolution Rule (see Execution Protocol preamble above) before delegating execution: look up `phase.executor_agent` in `agent_role_index`, resolve `roles[role].by_tier[complexity_tier]`, and derive the primary model from the tier entry or role default. In deterministic mode, pass that resolved primary as the outer `model` parameter. In auto mode, omit the outer `model` parameter intentionally so platform auto-selection can choose the runtime model. Only pass a fallback list if `agent/runSubagent` explicitly supports one.
269
269
- Delegate execution to the declared executor agent.
270
270
- Verification Build Gate: after the implementation subagent reports completion, verify build success. Either confirm the execution report includes `build.state: PASS`, or if build evidence is absent or ambiguous, run the project's build command directly. If the build fails, route through Failure Classification Handling before proceeding.
271
271
- Delegate to CodeReviewer-subagent for phase code review (apply Universal Model Resolution Rule). Code review is mandatory for all complexity tiers — see `governance/runtime-policy.json → review_pipeline_by_tier.code_review`. Pass the changed files list, phase scope, and executor agent execution report.
@@ -341,7 +341,7 @@ When a subagent returns a `failure_classification`, Orchestrator routes automati
341
341
|`escalate`| STOP — transition to `WAITING_APPROVAL`, present to user | 0 |
342
342
|`model_unavailable`| Retry the same agent up to `retry_budgets.model_unavailable_max` times; on exhaustion, escalate to user via `WAITING_APPROVAL`| retry_budgets.model_unavailable_max |
343
343
344
-
If retry limit is exhausted, escalate to user with accumulated failure evidence. For all dispatch actions in this table (retry or replan), apply the Universal Model Resolution Rule to resolve the `model` parameter — including needs_replan Planner dispatch. A `needs_replan` Planner dispatch that updates an active plan must follow Planner Revision Modes: include outer `model`, payload-level `model`, `trace_id`, review-loop `iteration_index`, `revision_mode`, `revision_reason`, and either `active_plan_path` for `in_place_update` or `existing_plan_path` for `new_artifact_supersession`.
344
+
If retry limit is exhausted, escalate to user with accumulated failure evidence. For all dispatch actions in this table (retry or replan), apply the Universal Model Resolution Rule — including needs_replan Planner dispatch. A `needs_replan` Planner dispatch that updates an active plan must follow Planner Revision Modes: include outer `model` only in deterministic mode, omit outer `model` in auto mode, include payload-level `model` when deterministic mode requires it, and include `runtime_model_mode`, `trace_id`, review-loop `iteration_index`, `revision_mode`, `revision_reason`, and either `active_plan_path` for `in_place_update` or `existing_plan_path` for `new_artifact_supersession`.
@@ -410,4 +410,4 @@ Use `plans/templates/plan-document-template.md` for full authoring rules. Inline
410
410
- No batching of todo completions across phases. Each completion is a separate `#todos` call, made at the moment of phase verification — not aggregated for later flushing.
411
411
- No phase work may resume after a context compaction or session restart without first reconciling the `#todos` state against actual plan-artifact reality.
412
412
- If uncertain and cannot verify safely: `ABSTAIN`.
413
-
- No `agent/runSubagent` dispatch may omit the `model` parameter. Every dispatch must apply the Universal Model Resolution Rule from Execution Protocol.
413
+
- No deterministic-mode `agent/runSubagent` dispatch may omit the outer `model` parameter. Auto-mode dispatches intentionally omit outer `model` and must carry `runtime_model_mode: auto` in the payload. Every dispatch must apply the Universal Model Resolution Rule from Execution Protocol.
"description": "Broken dispatch omits model because no complexity_tier is available yet instead of using the target role top-level primary.",
377
+
"description": "Broken deterministic-mode dispatch omits model because no complexity_tier is available yet instead of using the target role top-level primary.",
0 commit comments