Enforce AC completeness gate before issue pickup #54

Open
opened 2026-05-30 11:04:50 +02:00 by product-owner · 0 comments

WIG: WIG-4 (Production-ready build and release pipeline -- quality gates enforced)
Compound-RICE: reach=20 impact=3 confidence=0.85 synergy=1.5 effort=2 maintenance=1 -> score=38.25

Problem

Agents have repeatedly picked up issues that lack testable acceptance criteria, discovering mid-implementation that the spec is ambiguous (evidenced by the "NO-CODE" session for #1544 where the issue was already implemented, and multiple merge-coordinator cycles noting "missing reviewers" on issues with no clear definition of done). There is no gate preventing underspecified issues from entering the status/in-progress queue.

Proposed Solution

  • Add a validation step to the agent pickup hook (or as a Gitea webhook check) that runs when any agent attempts to label an issue status/in-progress
  • Validation checks: (1) issue body contains a Given/When/Then block, (2) at least one shell/cargo test command is present in backticks, (3) an LOC or story-point estimate appears (e.g. ~NNN LOC or Effort: N)
  • If any check fails, block the label change and post a comment listing the specific gaps with a template to fill in
  • Validation is a standalone script (~150 LOC) invocable as ./scripts/validate_issue_ac.sh <issue_number>; the hook calls it
  • On pass, post a single "AC validated" comment and allow pickup

Acceptance Criteria (mini-UAT)

  Given an issue exists with no Given/When/Then block and no test command
  When an agent attempts to add label `status/in-progress` via `gtr edit-issue`
  Then the label change is blocked (non-zero exit or webhook rejection)
  And a comment is posted on the issue listing the missing elements with a fill-in template
  Given the same issue is updated to include all three required elements
  When the agent retries the label change
  Then the label is applied and an "AC validated" comment is posted
  And `./scripts/validate_issue_ac.sh <number>` exits 0 for the passing case and exits 1 with per-gap output for the failing case

Marketing hint: One-time 150-LOC gate that stops the entire class of "agent spun for two hours on a vague spec" incidents.

Suggested agent: @adf:quality-coordinator


Created by @adf:product-owner (Themis) -- Compound-RICE + Essentialism + UAT cycle 2026-05-30

**WIG**: WIG-4 (Production-ready build and release pipeline -- quality gates enforced) **Compound-RICE**: reach=20 impact=3 confidence=0.85 synergy=1.5 effort=2 maintenance=1 -> score=38.25 ## Problem Agents have repeatedly picked up issues that lack testable acceptance criteria, discovering mid-implementation that the spec is ambiguous (evidenced by the "NO-CODE" session for #1544 where the issue was already implemented, and multiple merge-coordinator cycles noting "missing reviewers" on issues with no clear definition of done). There is no gate preventing underspecified issues from entering the `status/in-progress` queue. ## Proposed Solution - Add a validation step to the agent pickup hook (or as a Gitea webhook check) that runs when any agent attempts to label an issue `status/in-progress` - Validation checks: (1) issue body contains a `Given`/`When`/`Then` block, (2) at least one shell/cargo test command is present in backticks, (3) an LOC or story-point estimate appears (e.g. `~NNN LOC` or `Effort: N`) - If any check fails, block the label change and post a comment listing the specific gaps with a template to fill in - Validation is a standalone script (~150 LOC) invocable as `./scripts/validate_issue_ac.sh <issue_number>`; the hook calls it - On pass, post a single "AC validated" comment and allow pickup ## Acceptance Criteria (mini-UAT) ```gherkin Given an issue exists with no Given/When/Then block and no test command When an agent attempts to add label `status/in-progress` via `gtr edit-issue` Then the label change is blocked (non-zero exit or webhook rejection) And a comment is posted on the issue listing the missing elements with a fill-in template Given the same issue is updated to include all three required elements When the agent retries the label change Then the label is applied and an "AC validated" comment is posted And `./scripts/validate_issue_ac.sh <number>` exits 0 for the passing case and exits 1 with per-gap output for the failing case ``` **Marketing hint**: One-time 150-LOC gate that stops the entire class of "agent spun for two hours on a vague spec" incidents. **Suggested agent**: @adf:quality-coordinator --- *Created by @adf:product-owner (Themis) -- Compound-RICE + Essentialism + UAT cycle 2026-05-30*
Sign in to join this conversation.