Add Technical Coordinator recovery package (v0.17.0)
Add coordinator-recovery, an automatic coordinator/coordination package (schema 1) that triages a stalled task's blockers before any nudge, sends one bounded "please keep going" nudge within the owner's budget and cooldown, parks repeated stalls for the Operator with a diagnostic summary, rebuilds the Coordinator's posture from the Portfolio Read Model and Working Ledger after a context refresh, and records implicit contention edges in the ledger when discovered. The override guide, contract, and README list the package, show the recovery seams, and give a named set that swaps recovery without touching coordinator-dispatch. Refs #27 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d3b057510
commit
3cef92a36d
7 files changed
+195
-12
No files matched your search
@@ -137,6 +137,20 @@ class OverrideGuideTests(unittest.TestCase):
|
||||
"`portfolio_conflict`", "`unique_resource_needed`", "leases"):
|
||||
self.assertIn(phrase.lower(), text)
|
||||
|
||||
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,45 @@ 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)
|
||||
# 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_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