diff --git a/packages/core/src/plugin/command/orchestration-policy.md b/packages/core/src/plugin/command/orchestration-policy.md index becee83c62..648c4a0c74 100644 --- a/packages/core/src/plugin/command/orchestration-policy.md +++ b/packages/core/src/plugin/command/orchestration-policy.md @@ -267,6 +267,22 @@ of it in the same wake turn with exactly one of: 4. A reasoned stop — tell the user, finding by finding, why no further wave is warranted. Silence is not a stop decision. +Classify the findings first; the class selects the option: + +| Finding nature | Disposal | +| --- | --- | +| Bounded within the current scope | Option 1, same graph, tier unchanged | +| Reveals cross-module, contract, persistence, or boundary risk the current shape cannot cover | Option 1 escalated: append full-shaped assurance lanes (broader review axes, extra verification) instead of the lite correction alone | +| The situation itself was misclassified (a change assumed, an unknown-cause defect found; a repair assumed, a design gap found) | Option 3 only — the single legitimate route switch; start the workflow whose backbone matches the real deliverable and name which prior evidence carries over | +| Unbounded or foggy — findings that no bounded wave can discharge | Option 4, or escalate to the user with a decision request; do not launder fog into a speculative wave | + +Route reselection is never the default: same-objective work stays in one +workflow, and escalation keeps additive semantics — full-shaped assurance +lanes are appended waves, not replacement graphs. The tier discriminator is +risk only (reversibility, module span, public contracts, concurrency, +persistence, migration, identity, authorization, upstream executables, +CI/release). Role or block count never selects a tier. + Merely summarizing a non-ACCEPT verdict and ending the turn is an orchestration failure. The runtime's `orchestrator_unresponsive` guard only fires for workflows that are still live; a checkpoint that terminalizes its diff --git a/packages/core/src/plugin/command/workflow-routing.md b/packages/core/src/plugin/command/workflow-routing.md index bdd6fda2ad..878aea801b 100644 --- a/packages/core/src/plugin/command/workflow-routing.md +++ b/packages/core/src/plugin/command/workflow-routing.md @@ -53,12 +53,18 @@ suffice, work is reversible, and no high-risk boundary is involved. Use `full` when any are true: requirements or design are uncertain; work crosses modules or write owners; a public contract, concurrency, persistence, migration, identity, authorization, upstream executable dependencies, CI/release, or -production behavior is in scope. A single matching custom workflow has no tier -to infer: read and retarget it directly. - -If a lite reporting gate returns non-`ACCEPT`, let that graph finish and use -additive `extend` with new node IDs after reassessing the live library. Do not -pause or replan a completed workflow; the parent owns this control decision. +production behavior is in scope. Only these risk dimensions select a tier — +never role count or block count, which are consequences of risk, not causes. +A single matching custom workflow has no tier to infer: read and retarget it +directly. + +If a lite reporting gate returns non-`ACCEPT`, let that graph finish and +dispose of the verdict under the Verdict Disposal Contract. When the findings +cross any `full` criterion above, the correction wave MUST be full-shaped: +escalate by appending full-shaped assurance lanes with new node IDs in the +same workflow — a tier escalation is an additive wave, never a replacement +workflow. Do not pause or replan a completed workflow; the parent owns this +control decision. The primary reference follows the final artifact, not every concern. For code or repairs, review, security, and performance are secondary assurance in that diff --git a/packages/core/test/plugin/command.test.ts b/packages/core/test/plugin/command.test.ts index e49d44aede..253aac387e 100644 --- a/packages/core/test/plugin/command.test.ts +++ b/packages/core/test/plugin/command.test.ts @@ -118,8 +118,10 @@ describe("CommandPlugin.Plugin", () => { expect(CommandPlugin.WorkflowContent).toContain("upstream executable dependencies") expect(CommandPlugin.WorkflowContent).toContain("single matching custom workflow") expect(CommandPlugin.WorkflowContent).toContain("Do not concatenate two complete references") - expect(CommandPlugin.WorkflowContent).toContain("additive `extend` with new node IDs") - expect(CommandPlugin.WorkflowContent).toContain("Do not\npause or replan a completed workflow") + expect(CommandPlugin.WorkflowContent).toContain("never role count or block count, which are consequences of risk") + expect(CommandPlugin.WorkflowContent).toContain("dispose of the verdict under the Verdict Disposal Contract") + expect(CommandPlugin.WorkflowContent).toContain("the correction wave MUST be full-shaped") + expect(CommandPlugin.WorkflowContent).toContain("Do not pause or replan a completed workflow") }), ) @@ -249,6 +251,9 @@ describe("CommandPlugin.Plugin", () => { ) expect(CommandPlugin.OrchestrationPolicyContent).toContain("escapes that guard") expect(CommandPlugin.OrchestrationPolicyContent).toContain("Silence is not a stop decision") + expect(CommandPlugin.OrchestrationPolicyContent).toContain("Classify the findings first; the class selects the option") + expect(CommandPlugin.OrchestrationPolicyContent).toContain("The situation itself was misclassified") + expect(CommandPlugin.OrchestrationPolicyContent).toContain("Role or block count never selects a tier") expect(CommandPlugin.WorkflowFactsContent).toContain("Verdict Disposal Contract") }), )