Skip to content

Expand dispatch-advisor skill to cover full dispatch lifecycle #663

Open

Description

@jflowers

Parent: #659 (Phase 1)

Problem

The full dispatch protocol (discover reviewers → acquire sibling evidence → plan via policy tool → invoke runs → consolidate → prepare lessons → finalize) is described in prose across 3 command files:

  • uf.review-council.md (~500 tokens)
  • uf.triage-issue.md (~500 tokens)
  • uf.address-feedback.md (~500 tokens)

The existing dispatch-advisor skill (93 lines) covers only the planning step — it does not describe the full lifecycle (evidence acquisition, invocation, consolidation, lesson preparation, finalization).

Proposed Solution

Expand .opencode/skills/dispatch-advisor/SKILL.md to document the complete dispatch lifecycle:

  1. Discover reviewers (read .opencode/agents/, filter divisor-*.md)
  2. Acquire sibling evidence (via acquire_sibling_evidence tool)
  3. Build dispatch plan (via plan_review_dispatch tool — already documented)
  4. Invoke all included runs (via dispatch_agent_run tool for dispatch-planned runs)
  5. Consolidate findings (merge, deduplicate, severity-calibrate)
  6. Prepare lessons (via prepare_lesson_learning tool)
  7. Finalize dispatch (via finalize_review_dispatch tool)

Note: Step 4 uses dispatch_agent_run (not invoke_agent) for dispatch-planned runs. dispatch_agent_run validates runs against the dispatch plan and review matrix, while invoke_agent is reserved for ad-hoc agent calls outside the dispatch workflow. See PR #686 for the dispatch_agent_run tool implementation.

Commands replace their inline protocol descriptions with: "Execute the dispatch protocol per the dispatch-advisor skill."

Acceptance Criteria

  • dispatch-advisor skill expanded with steps 1-2 and 4-7
  • All 3 command files updated to reference the skill
  • Each command reduces its dispatch section by ~400 tokens
  • Fail-closed protocol documented once (currently repeated 3×)
  • No behavioral change — dispatch works identically
  • Tests pass (make check)

Estimated Token Savings

~1,200 tokens (3 files × ~400 tokens each, minus the ~skill expansion).

Activity

  1. added
    enhancement
    refactor
    on Oct 5, 2026
  2. self-assigned this
    on Oct 5, 2026
  3. jflowers commented on Nov 2, 2026

    @jflowers
    ContributorAuthor

    Triage Summary

    Verdict: VALID — enhancement (objective), unanimous panel vote (5/5).

    The Divisor review panel assessed this issue through five personas (adversary, architect, curator, guard, sre). All five return VALID with category enhancement; the panel records no dissent and no duplicate candidates.

    Panel Findings

    • Duplication verified. The dispatch lifecycle prose repeats across the three named command files — including the fail-closed consolidation blocks at uf.review-council.md:456, uf.triage-issue.md:1083, and uf.address-feedback.md:557 — and the dispatch-advisor skill (105 lines at HEAD) explicitly disclaims the lifecycle back half ("Execution belongs to the separate invocation contract"), so consolidation, lesson preparation, and finalization live only in the command copies.
    • The predicted drift has already materialized. uf.address-feedback.md:1241 still mandates execution through dispatch_agent_run while the skill (SKILL.md:96-97) mandates dispatch_review_runs and forbids individual dispatch_agent_run calls. The triplicated fail-closed protocol now exists in conflicting versions — the exact failure mode the "fail-closed protocol documented once" criterion eliminates.
    • Scope has grown beyond the issue's estimate. The same protocol family also appears in uf.review-pr.md, uf.unleash.md, and speckit.testreview.md, so actual token savings exceed the ~1,200-token estimate.
    • Governance fit. The issue is Phase 1 of parent epic Epic: Token Reduction for Command & Agent Files (~47-60% savings) #659 (token reduction) with measurable token deltas (DE-004), aligns with Constitution Principle VI (agent context as a scarce shared resource) and default-pack CS-004 (DRY), and carries a "No behavioral change" anchor with make check verification.

    Notes for the Spec Phase

    • The issue's step 4 names dispatch_agent_run (PR feat: extract shared agent executor and add dispatch_agent_run tool #686 vintage); the current surface supersedes it with the dispatch_review_runs aggregate (DE-005), and steps 6-7 predate dual-mode consolidate_dispatch finalization. The "No behavioral change" criterion anchors the expansion to the current tool chain: plan_review_dispatch → dispatch_review_runs → consolidate_dispatch.
    • The skill has a scaffold mirror at internal/scaffold/assets/opencode/skills/dispatch-advisor/SKILL.md enforced by byte-parity drift tests; the implementing PR must sync it.
    • The consolidation sweep should decide explicitly whether uf.review-pr.md, uf.unleash.md, and speckit.testreview.md join this Phase 1 scope; leaving stale copies behind re-creates the divergence the change eliminates.

    Classification

    Field Value
    Verdict VALID (5/5)
    Category enhancement
    Objectivity objective
    Duplicates none found
    Split not recommended

    The enhancement label is already applied to this issue.

    This triage was performed by the Divisor review panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementrefactor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions