Skip to content

Review council should validate that PR addresses the originating issue's acceptance criteria #563

Description

@jflowers

Problem

The review council evaluates PRs across multiple quality dimensions (correctness, architecture, security, testing, conventions) but does not systematically validate that the PR actually addresses the GitHub issue that initiated the pipeline. The review-context skill's Protocol 2 (Issue Linking) conditionally fetches linked issues and acceptance criteria, but this is optional — not a gate — and only fires when an explicit PR number is provided.

This means a PR can pass all quality checks while silently drifting from the originating requirement. The review council answers "is this code good?" but not "is this the right code?"

Proposal

Add a first-class intent-satisfaction check to the Divisor review council (CODE review mode) that validates the PR's changes against the originating issue's acceptance criteria.

Design requirements

  1. Issue-ID threading through the pipeline. The issue number fed at the start of /uf.unleash must be threaded as required, machine-readable state through the entire pipeline to review time — not optional, not conditional on a PR number being manually provided. Today /uf.unleash is spec-centric (keyed off branch name → spec artifacts); the issue reference needs to travel alongside.

  2. Acceptance-criteria grounding. The check is only as trustworthy as the acceptance criteria it checks against. When intake-kit is in the flow (intake-kit → ADR → issue), the issue's ACs have already passed intake-kit's Tester persona testability gate (behavioral language, no implementation leakage, verifiable Given/When/Then). When intake-kit is NOT in the flow, the check degrades to best-effort semantic evaluation against whatever the issue says — still valuable, but less rigorous. This is honest and should be documented.

  3. Deviation escape hatch. Sometimes the PR legitimately reveals the acceptance criteria were wrong (e.g., the spec assumed an API that doesn't exist). This must route to governance (amend the PRD/issue), not silently pass or hard-fail. This connects to the IMPLEMENTATION_DEVIATION typed interruption from Discussion ProPrposal: Asynchronous Agent Coordination & Typed Guardrails via OpenCode Background Listeners #444 — a mid-pipeline discovery that invalidates the plan escalates rather than fakes a green.

Where this lives

The check could be:

  • An expansion of the existing review-context Protocol 2 (from optional to mandatory, with AC-satisfaction evaluation)
  • A new concern owned by divisor-guard (intent fidelity is already Guard's domain)
  • A dedicated check in the orchestrator's consolidation phase

Relationship to eval harness

This is a concrete, scoped instance of the eval-harness gap (ROADMAP.md Horizon 2): "does agent output satisfy success criteria?" The eval harness is the general capability; this issue is the specific application within the review council. Building this first may inform the eval harness design.

Architectural note: symmetric two-council pattern

With intake-kit validating the PRD/issue before build (input-side council) and the Divisor review council validating the PR after build (output-side council), the system gains end-to-end traceability from requirement to implementation — using the same 5-persona council pattern on both ends.

Cross-references

Activity

  1. added
    enhancement
    on Aug 31, 2026
  2. added 2 commits that reference this issue on Oct 4, 2026
    c2ece32
    9e7b544
  3. jflowers commented on Nov 2, 2026

    @jflowers
    ContributorAuthor

    Triage Summary

    The Divisor review panel assessed this issue with six review personas and classifies it as a valid enhancement — 6/6 panel votes, objective evidence.

    What the panel verified

    The gap is real and structural. The review-context skill documents Protocol 2 (Issue Linking) as conditional for /uf.review-council: it runs only when an explicit PR number is provided, skips entirely for local pre-PR reviews (the /uf.unleash Step 6 path), and continues without blocking on fetch failures — advisory context, never a gate. The council's existing intent validation (divisor-guard) checks implementation against spec artifacts resolved from the branch, not against the originating GitHub issue. The pre-PR review council therefore has no machine-readable path from a branch back to the originating issue's acceptance criteria.

    Issue threading terminates before review time. Tier routing records issue_number in branch-scoped checkpoint state and OpenSpec changes may carry originating_issue in .openspec.yaml; both are consumed only by /uf.finale to emit Closes #N in the PR body. No review-time consumer exists today.

    The proposal is cohesive and actionable. The three design requirements — machine-readable issue-ID threading, acceptance-criteria grounding with a documented rigor gradient (intake-kit-validated Given/When/Then ACs vs. best-effort semantic evaluation), and a deviation escape hatch that routes to governance instead of silently passing or hard-failing — are causally linked into one capability. Splitting would fragment them.

    Recommendations and next steps

    • Route this through a spec workflow (agent/workflow change per AGENTS.md); the cross-component reach (unleash pipeline state, review-context skill, council orchestration, possibly the divisor-guard definition) may exceed three stories and warrant the Speckit tier.
    • Extend the two existing threading mechanisms (branch-scoped checkpoint state and .openspec.yaml) rather than introducing a third state path.
    • Sequence the deviation escape hatch carefully: Discussion ProPrposal: Asynchronous Agent Coordination & Typed Guardrails via OpenCode Background Listeners #444's IMPLEMENTATION_DEVIATION typed interruption is not implemented in this repository, so the spec should define an interim governance routing while that infrastructure is absent.
    • Knowledge-graph search during triage surfaced an in-flight PR referencing Closes #563 (feat: strengthen acceptance-criteria validation in review pipeline #631) that describes implementing rigorous/best-effort evaluation modes and a deviation escape hatch. Reconcile against its current state before assigning new spec work; merge state is not determinable from the indexed snapshot.

    Similar issues

    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

enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions