diff --git a/OVERRIDING.md b/OVERRIDING.md index 172dd95..542dc20 100644 --- a/OVERRIDING.md +++ b/OVERRIDING.md @@ -24,7 +24,7 @@ default and shows the saved and effective choice for each role. | Role | `role` / `step` | Schemas | `communication_context` | RelayView admission | Maintained automatic default (launch order) | Other first-party packages | | --- | --- | --- | --- | --- | --- | --- | | Specification Designer | `designer` / `design` | 1 | No (schema 3 is rejected) | Admitted | `issue-designer-default` (pinned) | Default from release v0.15.0, not yet pinned: `specification-designer-default`. Manual: `designer-wayfinder`, `designer-grilling`, `designer-research`, `designer-domain-modeling`, `designer-triage`, `designer-to-spec`, `designer-to-tickets`, `designer-prototype`; the maintained configuration assigns none | -| Technical Coordinator | `coordinator` / `coordination` | 1, 3 | Yes | Not yet admitted | None | None published | +| Technical Coordinator | `coordinator` / `coordination` | 1, 3 | Yes | Not yet admitted | None | Automatic, in source for the proposed v0.17.0 release: `coordinator-dispatch`, `coordinator-communication` | | Planner | `planner` / `planning` | 1, 2, 3 | Yes | Admitted | `planner-investigation`, `planner-scope`, `planner-communication`, `research-auto` | Automatic: `codebase-design`. Manual: `grill-me`, `grilling`, `improve-codebase-architecture`, `research`, `to-questionnaire` | | Implementer | `implementer` / `implementation` | 1, 3 | Yes | Admitted | `implementer-investigation`, `implementer-handoff`, `implementer-communication` | Automatic: `tdd-auto`, `diagnosing-bugs`, `domain-modeling`. Manual: `tdd`, `pr`, `prototype`, `migrate-to-shoehorn`, `scaffold-exercises`, `shared-abstraction-refactor`, `split-large-files`, `writing-for-agents` | | Reviewer | `reviewer` / `review` | 1, 3 | Yes | Admitted | `reviewer-investigation`, `code-review-auto`, `reviewer-communication` | Manual: `code-review`, `c4-diff` | @@ -46,7 +46,10 @@ RelayView's Tester runs today without skill assignment, and RelayView has no Technical Coordinator role yet. This repository already validates both pairs and publishes the Tester packages described in [Tester packages](#tester-packages), so a fork can be prepared, but RelayView -refuses `tester` and `coordinator` packages until it adopts them; the +refuses `tester` and `coordinator` packages until it adopts them. The +Coordinator packages are in source for the proposed `v0.17.0` release and +become RelayView defaults only when RelayView adopts the role and pins that +release; the [contract](docs/authoritative/instruction-package-contract.md#relayview-adoption-of-the-tester-and-coordinator-pairs) lists the proposed releases and the owner changes each pair needs. @@ -60,20 +63,24 @@ method, through the owner's method-entry gate. Mode comes from the `SKILL.md` frontmatter: `disable-model-invocation: true` makes a package manual. Release is the sidecar's `source.reference`, the tag -whose bytes RelayView pins for that package. +whose bytes RelayView pins for that package. A release marked *not yet tagged* +is the planned tag; until it is published, the package exists only on `main` +and no RelayView bundle contains it. | Package | Role / step | Mode | Schema | Sidecar extra | Version | Release | RelayView maintained default | | --- | --- | --- | --- | --- | --- | --- | --- | -| `specification-designer-default` | `designer` / `design` | automatic | 1 | — | 0.15.0 | `v0.15.0` | Proposed Designer default | +| `specification-designer-default` | `designer` / `design` | automatic | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | Proposed Designer default | | `issue-designer-default` | `designer` / `design` | automatic | 1 | — | 0.13.0 | `v0.13.0` | Pinned Designer default; replaced by `specification-designer-default` once RelayView pins `v0.15.0` | -| `designer-domain-modeling` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-grilling` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-prototype` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-research` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-to-spec` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-to-tickets` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-triage` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | -| `designer-wayfinder` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0` | No | +| `designer-domain-modeling` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-grilling` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-prototype` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-research` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-to-spec` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-to-tickets` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-triage` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `designer-wayfinder` | `designer` / `design` | manual | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No | +| `coordinator-dispatch` | `coordinator` / `coordination` | automatic | 1 | — | 0.17.0 | `v0.17.0`, not yet tagged | No; role not yet admitted | +| `coordinator-communication` | `coordinator` / `coordination` | automatic | 3 | `communication_context` | 0.17.0 | `v0.17.0`, not yet tagged | No; role not yet admitted | | `planner-investigation` | `planner` / `planning` | automatic | 1 | — | 0.13.0 | `v0.13.0` | Planner automatic, 1st | | `planner-scope` | `planner` / `planning` | automatic | 2 | `issueClaim: status/in-progress` | 0.13.0 | `v0.13.0` | Planner automatic, 2nd | | `planner-communication` | `planner` / `planning` | automatic | 3 | `communication_context` | 0.14.0 | `v0.14.0` | Planner automatic, 3rd | @@ -103,8 +110,8 @@ whose bytes RelayView pins for that package. | `reviewer-communication` | `reviewer` / `review` | automatic | 3 | `communication_context` | 0.13.0 | `v0.13.0` | Reviewer automatic, 3rd | | `c4-diff` | `reviewer` / `review` | manual | 1 | — | 0.13.0 | `v0.13.0` | No | | `code-review` | `reviewer` / `review` | manual | 1 | — | 0.13.0 | `v0.13.0` | No | -| `tester-inspection` | `tester` / `testing` | automatic | 1 | — | 0.15.0 | `v0.15.0` | No; pair not yet admitted | -| `tester-communication` | `tester` / `testing` | automatic | 3 | `communication_context` | 0.15.0 | `v0.15.0` | No; pair not yet admitted | +| `tester-inspection` | `tester` / `testing` | automatic | 1 | — | 0.15.0 | `v0.15.0`, not yet tagged | No; pair not yet admitted | +| `tester-communication` | `tester` / `testing` | automatic | 3 | `communication_context` | 0.15.0 | `v0.15.0`, not yet tagged | No; pair not yet admitted | `tests/test_overriding.py` fails when this table disagrees with a package's sidecar or frontmatter. @@ -158,7 +165,7 @@ admission. | Communication | Tone, detail, examples, acknowledgements | Publication identity and order, mandatory status, complete durable artifacts; communication packages load only when the frozen `communication_context` treatment is on | Current | | Manual methods | When a method is worth invoking | `/skill:` reaches a session only if that name is in its captured assignment | Current | | Acceptance | Nothing | Operator acceptance requires a person | Current | -| Coordination | Wave-selection and contention heuristics, Control Tower reporting tone | Dispatch authority, resource leases, nudge budgets and cooldowns | Proposed | +| Coordination | Wave aggressiveness, contention heuristics, resource batching, when to escalate, Control Tower reporting tone | Ready state and prerequisites, dispatch through owner commands, the Operator's Autopilot toggle, resource leases, review policy, nudge budgets and cooldowns | Proposed | | Testing | How to exercise a candidate, which defects to look for, when to escalate, and how to present a proof summary | The Tester's tool and resource confinement, the exact-candidate binding of the Verification Proof Bundle and its fields, invalidation of proof from a superseded candidate, and the typed escalation record | Proposed | | Review tiers | How to frame a risk or escalation summary, and how the Specification Designer proposes proof artifacts, fast-test completeness, test resources, and a review stamp | Repository trust ceiling (Layer A), the Operator's per-specification stamp (Layer B), and the one-way escalation ratchet with typed reasons (Layer C): no agent may downgrade `operator_review_required` | Proposed | @@ -294,6 +301,37 @@ methods in the Specification Designer card, or list their IDs in `workflowPresets.designerSkills` and restart the owner; that list applies until an Operator saves a Designer choice in Settings. +## Customize the Technical Coordinator + +RelayView does not yet admit `coordinator` packages, so this describes how a +Coordinator fork is prepared now and assigned once RelayView adopts the pair. +The two maintained packages split the Coordinator's judgment into seams that +fork independently: + +| To change | Edit | For example | +| --- | --- | --- | +| Wave aggressiveness | The "Aggressiveness" section of `coordinator-dispatch`'s `wave-selection.md` | Admit a candidate unless contention is evident, or hold any two candidates that touch the same top-level directory | +| Contention heuristics | The "Implicit contention" list in `wave-selection.md` | Always serialize tasks that touch `migrations/`, or treat a shared staging environment as contended | +| Resource batching | The "Resource affinity" list in `wave-selection.md` | Follow the owner's Ready order strictly, accepting `ml-server` model reloads | +| When to escalate | The "Escalate" section of `coordinator-dispatch`'s `SKILL.md` | Raise `portfolio_conflict` for any overlap in a protected directory instead of sequencing it | +| Control Tower reporting tone | `coordinator-communication`'s `SKILL.md` | Lead with held issues, or report only changes since the last status | + +Fork each package you change under its own name with the +[fork and override recipe](#fork-and-override-recipe), for example +`team-coordinator-dispatch` with schema 1. A `coordinator-communication` fork +keeps schema 3 and `"treatment": "communication_context"`. An automatic set +replaces the whole assignment, so the Coordinator's set lists both the fork and +the package you did not fork. + +A fork changes the Coordinator's judgment, not the owner's gates. Under +RelayView's proposed operating model, the owner keeps every gate regardless of +the package: an issue with an open prerequisite never becomes Ready, the owner +grants and releases resource leases and carries out dispatch through its own +commands, the Operator toggles Autopilot, and no agent can lower a review tier. +A fork can change when the Coordinator raises `portfolio_conflict` or +`unique_resource_needed`, but not the escalation types or the one-way review +ratchet, and prose asking for a lower review tier has no effect. + ## Release identity A release tag pins public source. Published tags are never moved or rebuilt: a diff --git a/README.md b/README.md index 30b8ba4..a379977 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,8 @@ The MIT license covers this repository only. The contribution policy is in [CONT The automatic `code-review-auto` package supplies optional bounded, path-aware finding presentation. Broader two-axis standards/spec inspection remains in the manual `code-review` package. Both use only the assigned Reviewer capabilities; required adequacy, disposition and recovery stay with the owner. Automatic role communication packages (`planner-communication`, -`implementer-communication`, `reviewer-communication`, -`tester-communication`) use schema 3 with +`implementer-communication`, `reviewer-communication`, and the not yet admitted +`tester-communication` and `coordinator-communication`) use schema 3 with `treatment: "communication_context"`. This metadata declares their ablation boundary; it grants no tools or authority. Preserve the declaration in forks. RelayView rejects these packages in a named automatic set when the frozen @@ -76,4 +76,14 @@ The automatic `research-auto` Planner package supplies primary-source selection, The automatic Tester packages `tester-inspection` and `tester-communication`, versioned 0.15.0 for the not-yet-tagged `v0.15.0` release, teach the Building Inspector method: exercise the exact sealed candidate as a user, capture the requested proof, separate verified runtime observations from remaining manual Operator checks, and escalate with a typed reason. They are the proposed Tester defaults; RelayView admits them only after it adopts the `tester`/`testing` pair. See [Tester packages](OVERRIDING.md#tester-packages). -Planner direct-address presentation is supplied by planner-communication v0.14.0. Apart from the new Tester and Specification Designer packages, other packages retain their existing versions. Forks can replace this presentation while retaining communication_context treatment metadata. +The automatic Technical Coordinator packages target the proposed `v0.17.0` +release and are not yet tagged. `coordinator-dispatch` selects compatible +parallel waves, batches work around scarce resources such as `ml-server` and +GPU workers, and raises typed `portfolio_conflict` and `unique_resource_needed` +escalations. `coordinator-communication` (schema 3) shapes Control Tower status +reports. RelayView does not yet admit the `coordinator` role; when it does, its +owner keeps prerequisites, dispatch execution, resource leases and review policy. +[OVERRIDING.md](OVERRIDING.md#customize-the-technical-coordinator) shows which +seam to fork for each customization. + +Planner direct-address presentation is supplied by planner-communication v0.14.0. Apart from the new Tester, Specification Designer, and Coordinator packages, other packages retain their existing versions. Forks can replace this presentation while retaining communication_context treatment metadata. diff --git a/docs/authoritative/instruction-package-contract.md b/docs/authoritative/instruction-package-contract.md index 04e5cea..8f7b659 100644 --- a/docs/authoritative/instruction-package-contract.md +++ b/docs/authoritative/instruction-package-contract.md @@ -121,13 +121,15 @@ retained sessions. RelayView's owner admits only `planner`, `implementer`, `reviewer`, and `designer` packages. No released package declares `tester` or `coordinator` yet. `tester-inspection` (schema 1) and `tester-communication` (schema 3) -declare `tester`/`testing` in this repository with source reference `v0.15.0`; that tag -is not yet published. The planned releases below are proposed, not published: +declare `tester`/`testing` in this repository with source reference `v0.15.0`, +and `coordinator-dispatch` (schema 1) and `coordinator-communication` (schema 3) +declare `coordinator`/`coordination` with source reference `v0.17.0`; neither +tag is published yet. The planned releases below are proposed, not published: | Proposed release | New pair | Planned packages | | --- | --- | --- | | `v0.15.0` | `tester`/`testing` | `tester-inspection` (schema 1) and `tester-communication` (schema 3) | -| `v0.17.0` | `coordinator`/`coordination` | Coordinator automatic and manual methods (schema 1) and Coordinator communication (schema 3) | +| `v0.17.0` | `coordinator`/`coordination` | `coordinator-dispatch` (schema 1) and `coordinator-communication` (schema 3), in source; further Coordinator automatic and manual methods (schema 1) | Before RelayView pins a release containing either pair, it must: diff --git a/packages/coordinator-communication/SKILL.md b/packages/coordinator-communication/SKILL.md new file mode 100644 index 0000000..f95ac33 --- /dev/null +++ b/packages/coordinator-communication/SKILL.md @@ -0,0 +1,26 @@ +--- +name: coordinator-communication +description: Communication style for the Technical Coordinator; concise Control Tower status, proportional answers, Markdown and natural acknowledgements. +metadata: + relayview-display-name: Coordinator communication + relayview-version: 0.17.0 +--- + +Address the Operator as “you” and describe their decisions and next actions from their perspective. Name the responsible agent or RelayView when the software acts. Before publishing a reply, check that the Operator can tell who acts next and what, if anything, you need from them. + +Lead with the answer, decision, observed finding, or material uncertainty. Use detail proportional to the immediate question, including requested examples and technical mechanics, with no fixed word, line, or token limit. Keep inspection effort independent of conversational length. + +For a Control Tower status report, give these in order, omitting any that are empty: + +1. Autopilot state, and the running wave: each task, its phase, and how long it has been in that phase. +2. Resource state: each lease held or queued on `ml-server` (with the loaded model) and the GPU workers, and which tasks wait for it. +3. Held issues, each with its contention reason in one line. +4. Tasks the Portfolio Read Model shows as stalled, with the waiting reason the owner reports. +5. The pending Review Packet inbox count. +6. Anything awaiting the Operator's decision, such as a proposed wave or an escalation. + +Take every count, phase, and lease from the owner's current projections and give its as-of time. Use a short table when several tasks share the same columns; otherwise use a list. + +For user-facing Control Tower messages, use Markdown when it makes the answer easier to read. A simple reply may be plain prose. Use concise headings, lists, tables, and inline code only when they help the content; avoid decorative structure. When code needs a block, use a fenced code block with the correct language identifier if the language is known. + +Keep the acknowledgement brief, relaxed, clear, and professional. Use natural contractions and vary the wording to fit the request; do not default to “I understand…” or repeat the Operator's full checklist. A short receipt is enough when the task and authorization are already clear. Describe only work within your current authorization. Receipt never means dispatch, a granted lease, completed work, or approval. diff --git a/packages/coordinator-communication/relayview-skill.json b/packages/coordinator-communication/relayview-skill.json new file mode 100644 index 0000000..4ffaa81 --- /dev/null +++ b/packages/coordinator-communication/relayview-skill.json @@ -0,0 +1,16 @@ +{ + "schemaVersion": 3, + "source": { + "kind": "first-party", + "reference": "v0.17.0" + }, + "role": "coordinator", + "step": "coordination", + "treatment": "communication_context", + "files": [ + { + "path": "SKILL.md", + "sha256": "07d074f08d5266da38e7d8085bf8cfded33c8cb20751d6a64f842b4d522a1791" + } + ] +} diff --git a/packages/coordinator-dispatch/SKILL.md b/packages/coordinator-dispatch/SKILL.md new file mode 100644 index 0000000..9d1d6fb --- /dev/null +++ b/packages/coordinator-dispatch/SKILL.md @@ -0,0 +1,53 @@ +--- +name: coordinator-dispatch +description: Select compatible parallel waves from Ready issues, batch work around scarce resources, and escalate cross-task conflicts for the Technical Coordinator. +metadata: + relayview-display-name: Coordinator dispatch + relayview-version: 0.17.0 +--- + +# Coordinator dispatch + +You are the workspace's single Technical Coordinator: the Operator's contact for cross-task questions. You decide which Ready issues can safely run together and in what order. RelayView's owner decides what actually happens. The owner grants leases, enforces prerequisites and review policy, and carries out dispatch; you propose and request through the owner commands assigned to you. + +## Read the portfolio + +Build each decision from the owner's projections, read fresh for that decision: + +- the Portfolio Read Model: active tasks, their phases, waiting reasons, and pending Review Packets; +- the Ready issues, with their bodies and declared resource requirements; +- active branch and pull-request footprints: the files, modules, schemas, and interfaces each running task is changing; +- the Shared Resource and Lease Registry: which leases are held or queued, which model is loaded on `ml-server`, and which GPU workers are free; +- the Autopilot setting the Operator last chose, as the owner reports it. + +Work only through these projections and the owner commands assigned to you: read a task's footprint from the projection, not its worktree, and leave repository code and shell commands to the roles that own them. When a projection is missing or stale, say which one and treat the affected issue as not yet safe to dispatch. + +## Select a wave + +Follow the [wave selection guide](wave-selection.md). A wave is a set of Ready issues that can run in parallel with each other and with everything already running. For every candidate: + +1. Confirm the owner lists it as Ready; an open prerequisite keeps it out regardless of your judgment. +2. Check it against running work and the other candidates for implicit contention the tracker does not record. +3. Check its declared resources against the Lease Registry and group it with work that needs the same setup. +4. Admit it, or hold it with one concrete reason naming the other issue, file, schema, decision, or resource. + +## Autopilot + +- **When Autopilot is `Off`**, report portfolio status and propose waves for the Operator to approve. Present each proposed wave with its members, the held issues and their reasons, and the resource batching it assumes. Dispatch only a wave the Operator explicitly approves, through the owner's dispatch command. Just before dispatch, re-run the four selection steps for each member against fresh projections; dispatch the members that still pass and return the others to the Operator with the reason. +- **When Autopilot is `On`**, dispatch each compatible wave through the owner's dispatch command, then confirm from the Portfolio Read Model that each task started. Report any task that did not start, with the waiting reason the owner reports. +- When the Operator pauses Autopilot or starts a conversation, yield at the next safe turn boundary: dispatch nothing further, answer the Operator, and name any wave left partly dispatched. Tell the Operator that running tasks continue. After answering, follow the Autopilot setting the owner then reports: while it is `On`, dispatch compatible waves again; while it is `Off`, dispatch only what the Operator approves. + +## Escalate + +Escalate through the owner's escalation interface with one typed reason and a short risk summary the Operator can decide from: + +- `portfolio_conflict` when concurrent or candidate tasks interact semantically in a way that needs the Operator's judgment, such as two branches resolving the same architectural decision differently; +- `unique_resource_needed` when complete verification needs a resource the owner does not manage or cannot provide, such as specialized hardware, an external credential, or a manual check. + +An escalation only raises the attention a task needs; never request a lower review tier. Hold or sequence work yourself when ordering alone resolves the contention; escalate only what ordering cannot. + +## Check before finishing + +- Does every held issue name its blocker and the evidence you read? +- Does every queue reason come from the Lease Registry rather than an estimate? +- Did anything you reported as dispatched start, according to the Portfolio Read Model? diff --git a/packages/coordinator-dispatch/relayview-skill.json b/packages/coordinator-dispatch/relayview-skill.json new file mode 100644 index 0000000..ac8aedd --- /dev/null +++ b/packages/coordinator-dispatch/relayview-skill.json @@ -0,0 +1,19 @@ +{ + "schemaVersion": 1, + "source": { + "kind": "first-party", + "reference": "v0.17.0" + }, + "role": "coordinator", + "step": "coordination", + "files": [ + { + "path": "SKILL.md", + "sha256": "2e1f4ef4a6614434258378f96dd604bb58089779e7943a065e0426a5dceabff0" + }, + { + "path": "wave-selection.md", + "sha256": "449fe0c5e4085e2fa9f3373884fc46bb8dc6c552449f14fa19f855e96acd0bd5" + } + ] +} diff --git a/packages/coordinator-dispatch/wave-selection.md b/packages/coordinator-dispatch/wave-selection.md new file mode 100644 index 0000000..3c6f59d --- /dev/null +++ b/packages/coordinator-dispatch/wave-selection.md @@ -0,0 +1,23 @@ +# Wave selection guide + +## Implicit contention + +Hold two issues out of the same wave when they would change the same thing in incompatible ways. Look for: + +- **Overlapping files or modules.** Compare each candidate's likely footprint, from its issue body and acceptance criteria, with running branch and pull-request footprints and with the other candidates. Two edits to one module's public surface contend; two edits to unrelated functions in one large file usually do not. +- **Competing schema migration or interface versions.** Two tasks that each add a SQLite schema migration, or each bump the same API's minor version, must run in sequence. +- **An architectural decision still in flight.** When a running task or open specification is deciding a design question, hold candidates whose approach depends on the answer. +- **Competing external services.** Two tasks that exercise, reconfigure, or reset the same external service or test environment contend even when their code does not overlap. + +Name the evidence for each held pair: the file, module, migration, interface, decision, or service, and where you read it. When the evidence is only a guess from an issue title, say so and hold the candidate that comes later in the owner's Ready order. + +## Resource affinity + +- Group Ready tasks that need the same `ml-server` model, so the model loads once for the group. +- Prefer a candidate whose resource is free or already loaded over one that would force a reload, even when it comes later in the owner's Ready order. +- Size the wave to the free GPU workers the Lease Registry reports; extra GPU tasks wait in the queue. +- When a task waits, give its queue reason from the registry: the lease it waits for, who holds it, and its position, for example "waiting for `ml-server:qwen-27b`; held by #412; second in queue". + +## Aggressiveness + +The default is moderate: admit a candidate when you found no contention, and hold it when you found plausible contention you could not rule out. Among otherwise equal candidates, the owner's Ready order decides. Prefer a smaller wave whose members are clearly independent over a larger one that risks rework. diff --git a/tests/test_overriding.py b/tests/test_overriding.py index 7428297..f90de18 100644 --- a/tests/test_overriding.py +++ b/tests/test_overriding.py @@ -130,6 +130,13 @@ class OverrideGuideTests(unittest.TestCase): self.assertEqual(sorted(listed), sorted(packages)) self.assertEqual(set(seen), set(ROLE_STEPS)) + def test_coordinator_customization_names_the_seams_and_the_owner_gates(self): + text = section(self.text, "Customize the Technical Coordinator").lower() + for phrase in ("wave aggressiveness", "contention heuristics", "reporting tone", + "`coordinator-dispatch`", "`wave-selection.md`", "`coordinator-communication`", + "`portfolio_conflict`", "`unique_resource_needed`", "leases"): + self.assertIn(phrase.lower(), 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) diff --git a/tests/test_packages.py b/tests/test_packages.py index 9f12f65..8766406 100644 --- a/tests/test_packages.py +++ b/tests/test_packages.py @@ -25,7 +25,7 @@ class PackageTests(unittest.TestCase): self.assertNotIn("save a research file", text) def test_communication_packages_declare_their_treatment(self): - for role in ("planner", "implementer", "reviewer", "tester"): + for role in ("planner", "implementer", "reviewer", "tester", "coordinator"): package = ROOT / f"packages/{role}-communication" result = check_package(package) manifest = json.loads((package / "relayview-skill.json").read_text()) @@ -35,6 +35,46 @@ class PackageTests(unittest.TestCase): self.assertIn("acknowledgement", text) self.assertIn("Markdown", text) + def test_coordinator_packages_are_automatic_v0_17_0_coordination_guidance(self): + expected = {"coordinator-dispatch": (1, ["SKILL.md", "wave-selection.md"]), + "coordinator-communication": (3, ["SKILL.md"])} + for name, (schema, files) in expected.items(): + with self.subTest(package=name): + package = ROOT / "packages" / name + check_package(package) + manifest = json.loads((package / "relayview-skill.json").read_text()) + self.assertEqual(manifest["schemaVersion"], schema) + self.assertEqual((manifest["role"], manifest["step"]), ("coordinator", "coordination")) + self.assertEqual(manifest["source"], {"kind": "first-party", "reference": "v0.17.0"}) + self.assertEqual([item["path"] for item in manifest["files"]], files) + frontmatter = (package / "SKILL.md").read_text().split("---", 2)[1] + self.assertNotIn("disable-model-invocation", frontmatter) + self.assertIn("relayview-version: 0.17.0", frontmatter) + size = sum((package / path).stat().st_size for path in files + ["relayview-skill.json"]) + self.assertLess(size, 16 * 1024, "well under the 128 KiB package cap") + + def test_coordinator_dispatch_separates_judgment_from_owner_authority(self): + package = ROOT / "packages/coordinator-dispatch" + text = (package / "SKILL.md").read_text() + (package / "wave-selection.md").read_text() + for phrase in ("Portfolio Read Model", "Lease Registry", "branch and pull-request footprints", + "schema migration", "architectural decision", "ml-server", "GPU", + "Autopilot is `Off`", "Autopilot is `On`", "safe turn boundary", + "`portfolio_conflict`", "`unique_resource_needed`", "queue reason", + "The owner grants leases", "an open prerequisite keeps it out", + "leave repository code and shell commands to the roles that own them", + "re-run the four selection steps", "while it is `On`, dispatch compatible waves again"): + self.assertIn(phrase, text) + # Nudging, reorientation and the Working Ledger are out of scope here (issue #27). + for phrase in ("nudge", "reorient", "Working Ledger"): + self.assertNotIn(phrase, 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", + "Portfolio Read Model shows as stalled", + "Review Packet inbox", "Autopilot"): + self.assertIn(phrase, text) + def test_tester_release_sidecars_and_building_inspector_method(self): expected = { "tester-inspection": (1, None, (