Merge main (Coordinator recovery package) into ISSUE-28
Keep both the recovery and the manual-method rows in the role, package, and owner-boundary matrices; list recovery's seams and both fork examples (recovery automatic set, manual on-request set) in the Coordinator section; and name all five Coordinator packages as in source in the README and the contract. Align tracker hygiene with coordinator-recovery's ledger: use its single "Working Ledger" name, record an edge resolved only when either issue closes or the shared change lands, and list an edge whose evidence merely looks doubtful without changing its ledger entry. Refs #28 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
073c1cd8db
9 files changed
+230
-25
No files matched your search
@@ -145,6 +145,20 @@ class OverrideGuideTests(unittest.TestCase):
|
||||
self.assertIn("wave audit", boundary[0][1])
|
||||
self.assertIn("tracker changes", boundary[0][2])
|
||||
|
||||
def test_coordinator_recovery_is_overridable_without_dispatch(self):
|
||||
text = section(self.text, "Customize the Technical Coordinator")
|
||||
for phrase in ("`coordinator-recovery`", "nudge", "reorientation", "Working Ledger",
|
||||
"named set", "Settings → Skills", "nudge budgets and cooldowns"):
|
||||
self.assertIn(phrase.lower(), text.lower())
|
||||
members = re.search(r"members: \[(.*?)\]", text).group(1).split(", ")
|
||||
self.assertIn("coordinator-dispatch", members)
|
||||
self.assertIn("coordinator-communication", members)
|
||||
self.assertNotIn("coordinator-recovery", members)
|
||||
fork = [name for name in members if name.endswith("-coordinator-recovery")]
|
||||
self.assertEqual(len(fork), 1, members)
|
||||
self.assertIn("role: coordinator", text)
|
||||
self.assertIn("step: coordination", text)
|
||||
|
||||
def test_layer_four_template_is_a_valid_user_package(self):
|
||||
template = section(self.text, "Layer-4 authoring template")
|
||||
skill = re.search(r"```markdown\n(.*?)```", template, re.S).group(1)
|
||||
|
||||
@@ -37,6 +37,7 @@ class PackageTests(unittest.TestCase):
|
||||
|
||||
def test_coordinator_packages_are_automatic_v0_17_0_coordination_guidance(self):
|
||||
expected = {"coordinator-dispatch": (1, ["SKILL.md", "wave-selection.md"]),
|
||||
"coordinator-recovery": (1, ["SKILL.md"]),
|
||||
"coordinator-communication": (3, ["SKILL.md"])}
|
||||
for name, (schema, files) in expected.items():
|
||||
with self.subTest(package=name):
|
||||
@@ -68,6 +69,58 @@ class PackageTests(unittest.TestCase):
|
||||
for phrase in ("nudge", "reorient", "Working Ledger"):
|
||||
self.assertNotIn(phrase, text)
|
||||
|
||||
def test_coordinator_recovery_triages_blockers_before_a_bounded_nudge(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
for phrase in ("Portfolio Read Model", "Lease Registry", "waiting reason",
|
||||
"Operator input", "external gate", "held or queued lease",
|
||||
"Never nudge a task that is waiting",
|
||||
"resume it", "please keep going", "current stage",
|
||||
"nudge budget", "cooldown", "the owner refuses a nudge",
|
||||
"stop nudging", "park", "diagnostic summary"):
|
||||
self.assertIn(phrase, text)
|
||||
# A second stall after a nudge, at any stage, ends nudging for the task.
|
||||
self.assertIn("When the task stalls again after a nudge, at any stage,", text)
|
||||
self.assertNotIn("at the same stage after a nudge", text)
|
||||
# Blocker triage comes before any nudge.
|
||||
self.assertLess(text.index("## Triage before nudging"), text.index("## Nudge a stalled task"))
|
||||
|
||||
def test_coordinator_recovery_reorients_from_owner_state_not_chat_memory(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
for phrase in ("fresh session", "context refresh", "Portfolio Read Model", "Working Ledger",
|
||||
"active waves", "held leases", "contention edges", "nudge counts",
|
||||
"pending Review Packets", "closed issues",
|
||||
"not a record of the portfolio", "the owner's state wins"):
|
||||
self.assertIn(phrase, text)
|
||||
# Durable state is read from the owner, never recalled from the conversation.
|
||||
lowered = text.lower()
|
||||
for phrase in ("remember", "recall", "from memory", "earlier in the conversation"):
|
||||
self.assertNotIn(phrase, lowered)
|
||||
|
||||
def test_coordinator_recovery_follows_autopilot_and_yields_to_the_operator(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
autopilot = text[text.index("## Autopilot"):text.index("## Reorient after a context refresh")]
|
||||
for phrase in ("When Autopilot is `Off`", "propose", "the Operator approves",
|
||||
"When Autopilot is `On`", "pauses Autopilot or starts a conversation",
|
||||
"safe turn boundary", "the Autopilot setting the owner then reports"):
|
||||
self.assertIn(phrase, autopilot)
|
||||
# Every mention of the ledger uses one name.
|
||||
self.assertNotIn("Coordinator Working Ledger", text)
|
||||
|
||||
def test_coordinator_recovery_keeps_the_working_ledger_concise_and_current(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
for phrase in ("## Keep the Working Ledger", "when you discover it", "one line",
|
||||
"the evidence", "resolved", "never changes the issue tracker"):
|
||||
self.assertIn(phrase, text)
|
||||
|
||||
def test_coordinator_recovery_stays_independent_of_dispatch(self):
|
||||
text = (ROOT / "packages/coordinator-recovery/SKILL.md").read_text()
|
||||
# Wave selection and its typed escalations belong to coordinator-dispatch,
|
||||
# so an Operator can replace either package without the other.
|
||||
for phrase in ("wave-selection", "coordinator-dispatch", "`portfolio_conflict`", "`unique_resource_needed`"):
|
||||
self.assertNotIn(phrase, text)
|
||||
self.assertNotIn("{", text)
|
||||
self.assertNotIn("```", text)
|
||||
|
||||
def test_coordinator_communication_reports_the_control_tower(self):
|
||||
text = (ROOT / "packages/coordinator-communication/SKILL.md").read_text()
|
||||
for phrase in ("running wave", "lease", "ml-server", "held", "contention",
|
||||
|
||||
Reference in new issue
Block a user