From 514d8b515b483cb091367700c7da8bfa3f549531 Mon Sep 17 00:00:00 2001 From: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Date: Wed, 16 Sep 2026 16:43:38 +0800 Subject: [PATCH] docs(steward): give the manager one bounded team-plan procedure The steward could describe a team but had no shipped procedure for the owner's one-sentence request, so the shape of the answer -- and whether anything was created before confirmation -- depended entirely on the Turn. The manager guidance now carries one bounded procedure: answer a team request with a single preview that names the lanes and their Agents, the first bounded Todo per lane, the quota envelope, the acceptance signal, and the stop condition, in that order; build every lane from Agents and Todos Core already knows and from capabilities the current profile grants, naming an unstaffable lane as a gap instead of inventing one; treat the preview as a proposal, never an effect; and apply only after the owner confirms that exact preview, through the canonical owners already named in the preview (Agent registration, Todo creation, quota or goal policy), with one readback afterwards. This is the instruction surface the manager already reads every Turn, so it ships behaviour without adding a contract, a command, or a second owner that nothing calls yet. The preview itself spends no quota and creates no Todo. Verified: tests/test_manager_team_plan_guidance.py asserts the ordered preview fields, the confirmation gate, the canonical-owner routing, the gap-not-guess rule, and the no-quota-for-preview rule; the manager context, handoff and channel-binding suites pass apart from the pre-existing test_every_production_steward_caller_passes_the_machine_defaults failure that also fails on origin/main. Public-boundary scan of both changed paths is clean. Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> --- .../skills/loopx-manager/SKILL.md | 19 ++++++++++++ tests/test_manager_team_plan_guidance.py | 30 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 tests/test_manager_team_plan_guidance.py diff --git a/loopx/capabilities/manager_context/skills/loopx-manager/SKILL.md b/loopx/capabilities/manager_context/skills/loopx-manager/SKILL.md index 800b81bf7c..2b911ec641 100644 --- a/loopx/capabilities/manager_context/skills/loopx-manager/SKILL.md +++ b/loopx/capabilities/manager_context/skills/loopx-manager/SKILL.md @@ -94,6 +94,25 @@ or an explicit reason for deferral/rejection. A plan is not the execution result of an implementation request. Only use `handoffs` for troubleshooting or an explicit follow-up; the original exchange must not depend on a second question. +When one owner sentence asks for a team rather than a single task, answer with +one plan preview before anything is created. The preview names, in this order: +the lanes and the Agent each one runs on; the first bounded Todo per lane with +its declared priority; the quota or cadence envelope that bounds them; the +acceptance signal that ends each lane; and the stop condition that ends the +team. Build every lane from Agents and Todos Core already knows, and from the +capabilities the current profile actually grants. Name a requested lane you +cannot staff as a gap, with the missing registration or grant, instead of +inventing a lane, an Agent, or a capability. + +A team preview is a proposal, never an effect. Do not create Todos, register +Agents, set quota, or start work until the owner confirms that exact preview; +state what will be created and which canonical owner creates it — Agent +registration, Todo creation, quota or goal policy — so the owner sees where +each effect lands. After confirmation, apply through those owners only, reuse +the Agent and Todo identities the preview named, and report one readback of +what now exists. Never widen the confirmed scope while applying it, and never +charge quota for the preview itself. + Core owns truth and permissions. This skill supplies reasoning guidance, not new authority. Keep front-end and group answers within their respective scopes; give concise, concrete answers with source and coverage notes where they matter. diff --git a/tests/test_manager_team_plan_guidance.py b/tests/test_manager_team_plan_guidance.py new file mode 100644 index 0000000000..9dd6c01e3b --- /dev/null +++ b/tests/test_manager_team_plan_guidance.py @@ -0,0 +1,30 @@ +"""The steward's shipped guidance owns the one-sentence team plan contract.""" + +from __future__ import annotations + +from loopx.chat_manager import manager_skill_text + + +def test_manager_guidance_orders_one_team_preview_before_any_effect() -> None: + """A team request is answered with one preview, never with silent creates.""" + + text = manager_skill_text() + + ordered = [ + "the lanes and the Agent each one runs on", + "the first bounded Todo per lane", + "quota or cadence envelope", + "acceptance signal", + "stop condition", + ] + positions = [text.index(marker) for marker in ordered] + assert positions == sorted(positions), ordered + + # The preview gates every effect, and the effects keep their canonical owners. + assert "proposal, never an effect" in text + assert "until the owner confirms that exact preview" in text + assert "Agent\nregistration, Todo creation, quota or goal policy" in text + assert "charge quota for the preview itself" in text + # An unstaffable lane is named as a gap rather than invented. + assert "as a gap, with the missing registration or grant" in text + assert "inventing a lane, an Agent, or a capability" in text