Skip to content

Bug: bugfix protocol consult templates contain SPIR criteria (causes wrong REQUEST_CHANGES on bugfix PRs) #742

@waleedkadous

Description

@waleedkadous

Summary

codev/protocols/bugfix/consult-types/pr-review.md and impl-review.md are byte-identical (pr-review) or near-identical (impl-review) to their SPIR equivalents. Codex (and any consult model) correctly follows the SPIR-flavored instructions in those files, producing REQUEST_CHANGES verdicts on legitimate bugfix PRs for criteria that don't apply to the BUGFIX protocol.

This is a content bug, not a routing bug — the --protocol bugfix flag already routes correctly to the bugfix-specific templates. Those templates just contain SPIR text.

Reporter

Shannon architect (cross-project Codev consumer). Reported 2026-05-14 ~20:30 PDT via team channel. Observed 4× the same evening on Shannon PRs #1357, #1358, #1359, #1370 — all BUGFIX-protocol.

Symptoms

Codex returns REQUEST_CHANGES on bugfix PRs citing three recurring objections:

  1. "Missing codev/specs/plans/reviews artifacts" — the SPIR three-document trinity. BUGFIX produces reproduction-target + verification-receipt instead.
  2. "status.yaml build_complete: false" — porch keeps this false for every bugfix project; only flips for SPIR. Strict-mode rules forbid the builder from editing status.yaml manually. The check treats it as a builder-fixable issue.
  3. "Commit format should be [Spec NNNN] not Fix #NNNN"codev/protocols/bugfix/prompts/fix.md explicitly mandates Fix #{{issue.number}}:. The [Spec NNNN] format is SPIR-only per AGENTS.md.

Each REQUEST_CHANGES triggers 2-3 iter cycles of the builder writing rebuttals defending protocol-mandated behavior. ~10-15 min per PR; ~50 min total architect+builder time burned per evening on this single issue.

Root cause (verified)

$ diff codev/protocols/bugfix/consult-types/pr-review.md \
       codev/protocols/spir/consult-types/pr-review.md
$ # (empty — files are byte-identical)

The bugfix pr-review.md literally asks:

  • "Are all spec requirements implemented?" → BUGFIX has no spec
  • "Is the review document written (codev/reviews/XXXX-name.md)?" → BUGFIX has no review doc
  • "Are all commits properly formatted ([Spec XXXX][Phase])?" → BUGFIX uses Fix #NNNN:

impl-review.md has the same problem: "Spec Adherence", "Plan Alignment", and a whole "Scoping (Multi-Phase Plans)" section that doesn't apply to bugfix.

Files to fix

Both pairs (kept in sync — codev/ is our self-hosted instance, packages/codev/skeleton/ is the template shipped to other projects):

  1. codev/protocols/bugfix/consult-types/pr-review.md
  2. codev/protocols/bugfix/consult-types/impl-review.md
  3. packages/codev/skeleton/protocols/bugfix/consult-types/pr-review.md
  4. packages/codev/skeleton/protocols/bugfix/consult-types/impl-review.md

Fix shape

Rewrite each template to reflect what BUGFIX actually produces:

  • Inputs: GitHub issue + reproduction
  • Outputs: code fix + verification-receipt (test that fails-then-passes)
  • Commit format: Fix #NNNN: <description>
  • No spec/plan/review trinity
  • No phase-scoping (BUGFIX is single-phase)
  • Status check: pass if issue's symptom is verified-resolved, not based on porch state

Keep the verdict format (APPROVE | REQUEST_CHANGES | COMMENT) — only the focus-areas content changes.

Adjacent (out of scope for this issue, worth noting)

Shannon's architect suggested Codex's BUGFIX reviewer prompt should weight "live verification receipt" higher than "spec/plan trinity." Once the templates accurately reflect BUGFIX outputs, this falls out naturally — Codex follows the template.

Acceptance criteria

  • Both bugfix/consult-types/*-review.md files in codev/ rewritten for bugfix concerns
  • Matching files in packages/codev/skeleton/protocols/bugfix/consult-types/ updated identically
  • No mention of specs, plans, reviews, or [Spec NNNN] commit format in bugfix templates
  • Test on a real bugfix PR (Shannon offered to test once landed) and confirm no SPIR-criteria REQUEST_CHANGES

Protocol

Use BUGFIX protocol (afx spawn <id> --protocol bugfix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions