diff --git a/OVERRIDING.md b/OVERRIDING.md index 542dc20..811b0df 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 | Automatic, in source for the proposed v0.17.0 release: `coordinator-dispatch`, `coordinator-communication` | +| 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`. Manual, in source for the same release: `coordinator-wave-audit`, `coordinator-tracker-hygiene` | | 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` | @@ -81,6 +81,8 @@ and no RelayView bundle contains it. | `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 | +| `coordinator-wave-audit` | `coordinator` / `coordination` | manual | 1 | — | 0.17.0 | `v0.17.0`, not yet tagged | No; role not yet admitted | +| `coordinator-tracker-hygiene` | `coordinator` / `coordination` | manual | 1 | — | 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 | @@ -305,8 +307,8 @@ until an Operator saves a Designer choice in Settings. 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: +The maintained packages split the Coordinator's judgment into seams that fork +independently: | To change | Edit | For example | | --- | --- | --- | @@ -315,6 +317,8 @@ fork independently: | 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 | +| On-request wave audit | `coordinator-wave-audit`'s `SKILL.md` | Audit one milestone by default, or add a section for issues that touch `migrations/` | +| Tracker proposals | `coordinator-tracker-hygiene`'s `SKILL.md` | Draft only issue comments, never prerequisite edges, or use the team's comment template | Fork each package you change under its own name with the [fork and override recipe](#fork-and-override-recipe), for example @@ -323,6 +327,27 @@ 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. +`coordinator-wave-audit` and `coordinator-tracker-hygiene` are manual methods: +their text reaches a Coordinator session only when the Operator sends +`/skill:` and the name is in that session's captured manual assignment. +Both return proposals. The wave audit dispatches nothing, and tracker hygiene +drafts prerequisite edges and issue comments that change the tracker only once +the Operator approves each one. A fork keeps schema 1 and +`disable-model-invocation: true`. Once RelayView adopts the pair, the manual +methods would sit in their own set with `invocationMode: manual`, apart from +the automatic set: + +```yaml +trustedSkills: + sets: + - id: coordinator-on-request + name: Coordinator on request + role: coordinator + step: coordination + invocationMode: manual + members: [coordinator-wave-audit, team-coordinator-tracker-hygiene] +``` + 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 diff --git a/README.md b/README.md index a379977..a2a05f2 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,14 @@ 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. +reports. Two manual methods for the same release run only when the Operator +invokes them with `/skill:`: `coordinator-wave-audit` returns a +structured wave plan for the whole Ready queue without dispatching, and +`coordinator-tracker-hygiene` drafts prerequisite-edge and issue-comment +proposals from recorded contention for the Operator to approve. RelayView does +not yet admit the `coordinator` role; when it does, its owner keeps +prerequisites, dispatch execution, resource leases, tracker changes and review +policy. [OVERRIDING.md](OVERRIDING.md#customize-the-technical-coordinator) shows which seam to fork for each customization. diff --git a/docs/authoritative/instruction-package-contract.md b/docs/authoritative/instruction-package-contract.md index 8f7b659..4b2f82a 100644 --- a/docs/authoritative/instruction-package-contract.md +++ b/docs/authoritative/instruction-package-contract.md @@ -122,14 +122,16 @@ 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`, -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: +and `coordinator-dispatch` (schema 1), `coordinator-communication` (schema 3), +and the manual `coordinator-wave-audit` and `coordinator-tracker-hygiene` +(schema 1) 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-dispatch` (schema 1) and `coordinator-communication` (schema 3), in source; further Coordinator automatic and manual methods (schema 1) | +| `v0.17.0` | `coordinator`/`coordination` | `coordinator-dispatch` (schema 1) and `coordinator-communication` (schema 3), and the manual `coordinator-wave-audit` and `coordinator-tracker-hygiene` (schema 1), in source; further Coordinator automatic methods (schema 1) | Before RelayView pins a release containing either pair, it must: diff --git a/packages/coordinator-tracker-hygiene/SKILL.md b/packages/coordinator-tracker-hygiene/SKILL.md new file mode 100644 index 0000000..b324c57 --- /dev/null +++ b/packages/coordinator-tracker-hygiene/SKILL.md @@ -0,0 +1,42 @@ +--- +name: coordinator-tracker-hygiene +description: On request, review implicit contention recorded in the Working Ledger and draft minimal prerequisite-edge or issue-comment proposals for Operator approval. +disable-model-invocation: true +metadata: + relayview-display-name: Coordinator tracker hygiene + relayview-version: 0.17.0 +--- + +# Coordinator tracker hygiene + +The Operator invoked this review with `/skill:coordinator-tracker-hygiene` to turn contention the Coordinator has only recorded for itself into tracker changes people can see. Treat any text the Operator sent with the command as the review's scope, such as a set of issues or an epic; without it, review every recorded edge. + +Never change the tracker silently. This method drafts proposals; it adds no prerequisite, posts no comment, and changes no label or status on its own. + +## Read the recorded edges + +Read the implicit contention edges recorded in the Coordinator Working Ledger, and for each edge read the current state of both issues from the owner's projections: whether each is open, Ready, running, or merged; its prerequisites as the tracker records them; and the evidence the ledger gives for the edge. Work only through the owner's projections and the commands assigned to you, and leave repository code and shell commands to the roles that own them. + +## Classify each edge + +Put each edge in exactly one group: + +- **Ordering need:** one issue cannot be done correctly until the other lands, such as a schema migration another issue builds on, or an interface one issue changes and the other consumes. Draft a prerequisite edge. +- **Coordination note:** the issues can run in either order but not together, such as two edits to one module's public surface or a shared test environment. Draft an issue comment. +- **Already recorded:** the tracker already carries an equivalent prerequisite or comment. Propose nothing. +- **Stale:** either issue is closed or merged, or the evidence no longer holds. Propose nothing for the tracker, and list it so the Operator can retire it from the ledger. + +When the evidence is only a guess from issue titles, say so and prefer a coordination note to a prerequisite edge. + +## Draft minimal proposals + +Keep each proposal as small as the evidence allows: + +- **Prerequisite edge:** name the issue that waits, the issue it requires, and one sentence of evidence. Propose only the direct edge, never one the tracker already implies through another prerequisite. Before proposing it, check that it would not form a cycle with the prerequisites the tracker already records, and flag an edge that would hold back an issue that is already running. +- **Issue comment:** name the issue to comment on and give the exact comment text, ready to post: the other issue, what both touch, and the order you suggest. Draft one comment per edge, on the issue that should wait. + +## Present and apply + +Present the proposals grouped as above, in the owner's Ready order, with "None" under an empty group. Each proposal needs the Operator's explicit approval. Apply an approved proposal only through an owner command assigned to you and confirm from a fresh projection that it took effect; when no such command is assigned, give the Operator the exact change to make. Approval of one proposal is not approval of the others. + +End with a one-line summary: edges reviewed, proposals drafted, and stale edges found. diff --git a/packages/coordinator-tracker-hygiene/relayview-skill.json b/packages/coordinator-tracker-hygiene/relayview-skill.json new file mode 100644 index 0000000..a76b6c9 --- /dev/null +++ b/packages/coordinator-tracker-hygiene/relayview-skill.json @@ -0,0 +1,15 @@ +{ + "schemaVersion": 1, + "source": { + "kind": "first-party", + "reference": "v0.17.0" + }, + "role": "coordinator", + "step": "coordination", + "files": [ + { + "path": "SKILL.md", + "sha256": "79f5a267a5fbe7fac2a9f52031cbd29d5aa575a19f5d97751e746a3236d3e6b1" + } + ] +} diff --git a/packages/coordinator-wave-audit/SKILL.md b/packages/coordinator-wave-audit/SKILL.md new file mode 100644 index 0000000..3e902d4 --- /dev/null +++ b/packages/coordinator-wave-audit/SKILL.md @@ -0,0 +1,58 @@ +--- +name: coordinator-wave-audit +description: On request, audit the entire Ready queue against running work and return a structured parallel wave plan for the Operator. +disable-model-invocation: true +metadata: + relayview-display-name: Coordinator wave audit + relayview-version: 0.17.0 +--- + +# Coordinator wave audit + +The Operator invoked this audit with `/skill:coordinator-wave-audit`, usually while Autopilot is `Off` or during backlog grooming. Audit the entire Ready queue, not only the next wave, and return a wave plan the Operator can approve, edit, or set aside. Treat any text the Operator sent with the command as the audit's scope, such as a label, milestone, or set of issues; without it, audit every Ready issue. + +Dispatch nothing from this audit, change no issue, and request no lease. The plan is a proposal: the Operator approves a wave separately, and every member is checked again against fresh projections before it is dispatched. + +## Read the portfolio + +Read each of the owner's projections fresh for this audit, and note its as-of time: + +- the Ready issues in the owner's Ready order, with their bodies, acceptance criteria, and declared resource requirements; +- the Portfolio Read Model: active tasks, their phases and how long they have been in them, waiting reasons, and pending Review Packets; +- active branch and pull-request footprints: the files, modules, schemas, and interfaces each running task is changing; +- the Shared Resource and Lease Registry: leases held and queued, the model loaded on `ml-server`, and free GPU workers. + +Work only through these projections and the owner commands assigned to you: read a footprint from the projection, not a worktree, and leave repository code and shell commands to the roles that own them. When a projection is missing or stale, name it and keep the issues it affects out of Safe Parallel Wave 1. + +## Audit every Ready issue + +For each Ready issue, in the owner's Ready order: + +1. Confirm the owner still lists it as Ready; an open prerequisite keeps it out regardless of your judgment, and it belongs under Blocked/Stale. +2. Compare its likely footprint with every running task and every other Ready issue. Look for overlapping files or modules, a competing schema migration or API version bump, an architectural decision still in flight, and a shared external service or test environment. +3. Compare its declared resources with the Lease Registry, and group it with issues that need the same `ml-server` model or GPU setup. +4. Note anything that makes it look stale: a Ready issue whose footprint a merged or running change already covers, an issue that names a closed or superseded issue, or a running task the Portfolio Read Model shows with no progress and no waiting reason. + +For every contention or anomaly, name the evidence and where you read it. When the evidence is only a guess from an issue title, say so. + +## Return the wave plan + +Return these four sections in this order. Write "None" under an empty section rather than omitting it, so the Operator can tell the audit covered it. + +### Safe Parallel Wave 1 + +The largest set of Ready issues with no contention found among themselves or with running work, and whose resources are free or already loaded. List each issue with one line on why it is independent. Where two candidates conflict, keep the one earlier in the owner's Ready order and list the other under Contention Pairs. + +### Contention Pairs + +Each pair of issues, or an issue and a running task, that should not run together. Give the shared file, module, schema, interface, decision, or service; where you read it; and the order you suggest. Mark a pair whose contention ordering cannot resolve, such as two branches deciding the same architectural question differently, as needing the Operator's judgment. + +### Resource-Affinity Batches + +Groups of Ready issues that need the same `ml-server` model or GPU setup, in the order that minimizes reloads. Give each batch's resource, its members, and the queue reason from the Lease Registry for any batch that must wait. + +### Blocked/Stale + +Ready issues held by an open prerequisite or a missing projection, issues that look stale, and running tasks that look stalled. Give each its reason and the smallest next step for the Operator to consider, such as closing a duplicate or confirming a prerequisite. + +End with a one-line summary: Ready issues audited, the size of Safe Parallel Wave 1, and how many need the Operator's decision. diff --git a/packages/coordinator-wave-audit/relayview-skill.json b/packages/coordinator-wave-audit/relayview-skill.json new file mode 100644 index 0000000..b0d53cc --- /dev/null +++ b/packages/coordinator-wave-audit/relayview-skill.json @@ -0,0 +1,15 @@ +{ + "schemaVersion": 1, + "source": { + "kind": "first-party", + "reference": "v0.17.0" + }, + "role": "coordinator", + "step": "coordination", + "files": [ + { + "path": "SKILL.md", + "sha256": "24d7c3587be9c32da55b93ec11da0bafdabbecf8c04b7823c36f1b9e75b199a5" + } + ] +} diff --git a/tests/test_overriding.py b/tests/test_overriding.py index f90de18..4a5eb03 100644 --- a/tests/test_overriding.py +++ b/tests/test_overriding.py @@ -134,7 +134,9 @@ class OverrideGuideTests(unittest.TestCase): 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"): + "`portfolio_conflict`", "`unique_resource_needed`", "leases", + "`coordinator-wave-audit`", "`coordinator-tracker-hygiene`", + "`/skill:`", "invocationmode: manual"): self.assertIn(phrase.lower(), text) def test_layer_four_template_is_a_valid_user_package(self): diff --git a/tests/test_packages.py b/tests/test_packages.py index 8766406..c143b19 100644 --- a/tests/test_packages.py +++ b/tests/test_packages.py @@ -75,6 +75,44 @@ class PackageTests(unittest.TestCase): "Review Packet inbox", "Autopilot"): self.assertIn(phrase, text) + def test_coordinator_manual_methods_are_v0_17_0_manual_coordination_guidance(self): + for name in ("coordinator-wave-audit", "coordinator-tracker-hygiene"): + 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"], 1) + 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"]], ["SKILL.md"]) + frontmatter = (package / "SKILL.md").read_text().split("---", 2)[1] + self.assertRegex(frontmatter, r"(?m)^disable-model-invocation: true$") + self.assertIn("relayview-version: 0.17.0", frontmatter) + size = sum((package / path).stat().st_size for path in ("SKILL.md", "relayview-skill.json")) + self.assertLess(size, 16 * 1024, "well under the 128 KiB package cap") + + def test_coordinator_wave_audit_returns_a_structured_wave_plan_without_dispatching(self): + text = (ROOT / "packages/coordinator-wave-audit/SKILL.md").read_text() + for phrase in ("/skill:coordinator-wave-audit", "entire Ready queue", + "branch and pull-request footprints", "Lease Registry", + "Safe Parallel Wave 1", "Contention Pairs", "Resource-Affinity Batches", + "Blocked/Stale", "schema migration", "ml-server", + "Dispatch nothing", "an open prerequisite keeps it out", + "leave repository code and shell commands to the roles that own them"): + self.assertIn(phrase, text) + # The four sections appear in the order the Operator reads them. + order = [text.index(f"### {heading}") for heading in ( + "Safe Parallel Wave 1", "Contention Pairs", "Resource-Affinity Batches", "Blocked/Stale")] + self.assertEqual(order, sorted(order)) + + def test_coordinator_tracker_hygiene_drafts_proposals_and_never_mutates_silently(self): + text = (ROOT / "packages/coordinator-tracker-hygiene/SKILL.md").read_text() + for phrase in ("/skill:coordinator-tracker-hygiene", "Working Ledger", + "implicit contention edges", "prerequisite edge", "issue comment", + "Operator approval", "Never change the tracker silently", + "cycle", "Already recorded", "Stale"): + self.assertIn(phrase, text) + def test_tester_release_sidecars_and_building_inspector_method(self): expected = { "tester-inspection": (1, None, (