Skip to content

Epic: Squad review gate for agent-authored pull requests #1729

Open
6 of 7 issues completed
Open

Description

@bradygaster

Problem

The gh-aw SDLC lifecycle has no independent post-implementation review phase. /squad implement dispatches squad-implement-worker, which self-reviews its own diff and opens a PR. The only gates after that are human review and CI. A worker that misreads acceptance criteria produces a PR that no other agent inspects, and the epic merge-relay advances the next child regardless.

Goal

Add a /squad review capability that reviews both Squad-authored and Copilot-authored PRs, with reviewer independence enforced structurally (no edit: authority, no dispatch, no issue creation) rather than by prompt instruction.

Phases

Phase Scope Issues Status
0 Hardening — router concurrency, actor authorization, PR provenance markers, relay correctness, compile/budget CI gates, behavioral tests #1730, #1731, #1732 ✅ Complete (#1732 closed; #1730, #1731 closed)
1 /squad review MVP, advisory only #1733 ✅ Complete (#1733 closed)
2 Enforcement — required check, epic relay gated on review verdict #1734 🔲 Remaining — blocked on advisory soak (#1733) and Tier 1 false-green fixes; see #1828 as architecture/decision blocker
3 Optional human-initiated remediation worker #1735 🔲 Remaining — optional; wait for #1734 verdict/override semantics
4 Distribution and documentation #1736 ✅ Complete (#1736 closed)

📋 Current sequencing plan is in the Procedures triage comment below. Earlier Flight backlog sequencing remains historical context, but the required-check phase now explicitly waits for the Tier 1 false-green cluster because a permanently red or blind gate is equivalent to no gate.

Phase 0 is a prerequisite: a review gate is only meaningful if dispatch is trusted, PRs are machine-identifiable, and gh aw compile actually runs in CI. Phase 2 adds a second prerequisite: the broader gh-aw false-green cluster must land first so /squad review does not become a required check backed by blind instrumentation.

Design invariants

  • Reviewer independence is structural. The review workflow gets no edit: tool, no dispatch_workflow, no create-issue.
  • Verdicts are COMMENT or REQUEST_CHANGES only. The default GITHUB_TOKEN cannot APPROVE. Human approval stays mandatory in every phase.
  • Provenance detection is author-agnostic — marker first, branch prefix second, bot login third.
  • Automatic remediation is deliberately out of scope for the MVP. An auto-fixing reviewer stops being an independent reviewer.

Open decisions

Decision Recommendation
Auto-review default-on or opt-in? On for agent PRs, off for human PRs
Advisory or blocking at MVP? Advisory; blocking in Phase 2 only after Tier 1 false-green fixes land
Manual /squad review on any PR? Yes
Automatic remediation? No — Phase 3, human-initiated only
Human approval still required? Yes, always

Context

Derived from an end-to-end review of /squad implement and a decomposition assessment of workflows/squad.md. Conclusion of that assessment: keep the monolithic /squad router and the cohesive planning state machine intact; extract workers only at real authority/trigger boundaries. Implementation is one such boundary today; review is the next one.

Activity

  1. added
    wave:3-laterWave 3 — backlog, future
    and removed
    wave:1-nextWave 1 — immediate next sprint
    on Aug 20, 2026
  2. bradygaster commented on Aug 23, 2026

    @bradygaster
    CollaboratorAuthor

    Procedures triage brief — /squad review epic

    Owner & rationale

    Owner: Flight (squad:flight). This remains a cross-phase architecture and sequencing epic; Flight owns the release train and the point where advisory review becomes lifecycle policy.

    Files in scope

    Verified existing paths:

    • workflows\squad.md
    • workflows\squad-implement-worker.md
    • workflows\shared\squad.md
    • workflows\shared\squad-planning-ontology.md
    • workflows\shared\squad-planning-policy.md
    • est\gh-aw-quality.test.ts
    • est\gh-aw-implement-workflow.test.ts
    • docs\src\content\docs\guide\gh-aw.md

    Prompt-budget impact

    Current workflows\squad.md size is 62,398 B, leaving 37,602 B under the 100 KB ceiling. The epic should add only the Phase 0a router guard text, estimated +1–2 KB, projecting ~64.4 KB and ~35.6 KB headroom. If later phases add router prompt text, that is scope creep and must be budget-reviewed first.

    Dependencies

    Verification bar

    A no-op triage must fail a label audit: each issue in #1729/#1730/#1731/#1733/#1734/#1735/#1736 must have exactly one ype:, priority:, wave:, squad:, and go: label, and #1734 must explicitly name the six Tier 1 blockers before anyone marks it spec-ready.

    Out of scope

    No prompt implementation, no workflow edits, no source changes, no PR, no issue closure or retitle.

    Session-stall guard

    Before starting: this repo has phantom CRLF diffs (#1793). If git status shows files modified that you did not touch, run git diff --ignore-cr-at-eol. If that output is empty, the diff is line-ending churn, not real edits — run git add --renormalize . and continue. Do not halt and ask for confirmation; halting on phantom diffs is the documented cause of stuck sessions in this repo.

  3. bradygaster commented on Aug 23, 2026

    @bradygaster
    CollaboratorAuthor

    Procedures sequencing plan — Tier 3 /squad review

    Ordered execution plan

    1. Phase 0a: Add issue-scoped concurrency and actor authorization to the /squad router #1730 + Phase 0b: Add PR provenance marker and tighten implement-worker merge relay #1731 — Phase 0a/0b can run in parallel now that Phase 0c: Make gh aw compile non-skippable, add prompt-budget gate, replace string-assertion workflow tests #1732 and Merge-continuation dispatch destroyed by empty schema probe; #1766's prompt guard is insufficient #1772 are closed.
    2. Phase 1: Add /squad review workflow (advisory) #1733 — advisory /squad review, after Phase 0a: Add issue-scoped concurrency and actor authorization to the /squad router #1730/Phase 0b: Add PR provenance marker and tighten implement-worker merge relay #1731/Phase 0c: Make gh aw compile non-skippable, add prompt-budget gate, replace string-assertion workflow tests #1732.
    3. Phase 2: Enforce /squad review as a required check and gate epic relay on verdict #1734 — required check + relay gating, after Phase 1: Add /squad review workflow (advisory) #1733 advisory soak and Tier 1 false-green fixes.
    4. Phase 4: Ship /squad review in gh aw add and update the gh-aw guide #1736 — ship/docs. Advisory docs can follow Phase 1: Add /squad review workflow (advisory) #1733; enforcement docs/install wait for Phase 2: Enforce /squad review as a required check and gate epic relay on verdict #1734 + Tier 1.
    5. Deferred follow-up: Human-initiated review remediation worker #1735 — optional remediation, after Phase 1: Add /squad review workflow (advisory) #1733 and preferably after Phase 2: Enforce /squad review as a required check and gate epic relay on verdict #1734 verdict semantics are stable.

    Dependency arrows: #1732(closed) + #1772(closed) → (#1730 || #1731) → #1733 → #1734 → #1736(enforcement docs); #1733 → #1735(optional).

    Tier 1 false-green blockers

    #1734 is blocked on #1824, #1812, #1801, #1822, #1827, #1825. Reason: Phase 2 makes /squad review a required check. A required check is unsafe while the workstream has known no-op/false-green instrumentation: /squad cast can no-op green (#1824), activation can report false provenance (#1812), plan validation ships pre-filled ✅ (#1801), runbook queries can be dead and still pass (#1822), generated .lock.yml fails actionlint so lint cannot gate it (#1827), and the gh-aw activation CLI pin can drift silently (#1825).

    #1736 is conditionally blocked on the same set for any enforcement-facing docs/install story. Advisory-only docs after #1733 are not blocked by Tier 1, but must clearly say advisory means non-blocking.

    Prompt-budget projection

    Baseline workflows\squad.md: 62,398 B / 100,000 B, headroom 37,602 B. Projected direct additions:

    Phase Router prompt delta Projected router size Remaining headroom
    #1730 +1–2 KB ~63.4–64.4 KB ~35.6–36.6 KB
    #1731 +0 KB unchanged unchanged
    #1733 +0 KB unchanged unchanged
    #1734 +0 KB expected unchanged unchanged
    #1735 +0 KB unchanged unchanged
    #1736 +0 KB unchanged unchanged

    The chain as scoped does not exceed the 100 KB ceiling. Design warning: if #1733/#1735 are collapsed back into workflows\squad.md, the budget math changes immediately and should be rejected unless the router text is compressed elsewhere.

    Wave recommendation

    Keep the epic and all listed phases in wave:3-later. None of the Tier 1 false-green work depends on a /squad review phase landing first. Pull forward only #1734's research/design once Flight closes the six Tier 1 issues; do not promote enforcement before then.

    Epic body update

    I updated #1729's phase table because it was stale: it referenced Wave 1/2 sequencing and did not name the Tier 1 blockers for Phase 2 enforcement. The new table records #1732/#1772 as closed prerequisites, keeps this chain in Wave 3, and makes the #1734/#1736 Tier 1 dependency explicit.

  4. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  5. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  6. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  7. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  8. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  9. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  10. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  11. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: architect
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  12. added
    squad:agentic-workflows-devAssigned to agentic-workflows-dev (Agentic Workflows Engineer)
    and removed
    squad:architectAssigned to architect (Lead Architect)
    on Sep 24, 2026
  13. github-actions commented on Sep 24, 2026

    @github-actions
    Contributor

    📋 Assigned to agentic-workflows-dev (Agentic Workflows Engineer)

    Issue: #1729 — Epic: Squad review gate for agent-authored pull requests

    agentic-workflows-dev will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    agentic-workflows-dev, work on issue #1729

  14. bradygaster commented on Sep 28, 2026

    @bradygaster
    CollaboratorAuthor

    Current delivery map (2026-09-28):

    Keep this epic open until #2096 is merged, hosted evidence is durable, rollout/soak is complete, and optional #1735 is explicitly dispositioned.

  15. bradygaster commented on Sep 28, 2026

    @bradygaster
    CollaboratorAuthor

    Follow-up disposition complete: #1735 remains open as a shelved/deferred human-initiated remediation worker and explicitly does not gate #2096, #1734, hosted review-check validation, or this epic. The remaining epic gates are therefore #2096 merge, durable consumer evidence, and the documented rollout/soak.

  16. bradygaster commented on Sep 29, 2026

    @bradygaster
    CollaboratorAuthor

    Final implementation stack pin: da7861d (#2096). Hosted consumer acceptance is now running in the three private fixtures. This epic remains open for durable consumer evidence and review-check rollout/soak; deferred #1735 does not gate it.

  17. bradygaster commented on Sep 29, 2026

    @bradygaster
    CollaboratorAuthor

    Post-#2105 reconciliation

    The independent-review implementation is merged through 29e69f53, including exact-head relay enforcement, first-install hardening, and the dedicated GitHub App publisher boundary. This epic remains blocked, not complete: squad-review-authority and the reviewer App are not provisioned, the three private fixtures have not been rerun at the final SHA, and dev activation/soak evidence is absent. Track provisioning and reruns in #2103; keep this issue open for rollout acceptance.

  18. added
    wave:1-nextWave 1 — immediate next sprint
    wave1:P8Wave 1 PR group P8
    and removed
    wave:3-laterWave 3 — backlog, future
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gh-awGitHub Agentic Workflows integrationpriority:p1This sprintsquadSquad triage inbox — Lead will assign to a membersquad:agentic-workflows-devAssigned to agentic-workflows-dev (Agentic Workflows Engineer)triagedIssue has been triagedtype:epicParent issue that decomposes into sub-issueswave1:P8Wave 1 PR group P8wave:1-nextWave 1 — immediate next sprint

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions