Skip to content

[Phase 3] Reclassify boundary-crossing refactors out of the auto-approvable MEDIUM tier in prompts/shared.md #1632

Closed

Description

@github-actions

Story

As a PR-review cascade,
I want move "Refactors crossing module boundaries" out of the auto-approvable MEDIUM list so structural changes escalate to a human + the advisory architect instead of being rubber-stamped,
so that the single highest-leverage one-line edit in the whole proposal stops the cascade auto-approving the exact change class that alters system shape.

Acceptance Criteria

  1. In prompts/shared.md, the bullet "Refactors crossing module boundaries." (currently under the MEDIUM 'auto-approve allowed if all gates pass' section, ~line 102) no longer sits on the auto-approvable path — it is reclassified so a boundary-crossing refactor ESCALATES rather than auto-approves.
  2. The change is consistent across the shared risk taxonomy: any place that mirrors this classification (e.g. the same taxonomy echoed in evals/judge.md) is updated so the cascade and its grader agree.
  3. Eval/regression coverage is added or updated so a boundary-crossing-refactor case expects escalate (not approve), locking the new behavior against silent reversion.
  4. The edit is scoped to this reclassification only — no other risk bullets are moved and no unrelated cascade behavior changes.

Tasks / Subtasks

Dev Notes

  • Sequenced AFTER S2 deliberately (blocked_by S2): escalating a structural change is only useful once there is a reviewer to escalate it to — the solution-architect advisory persona. The body calls this reclassification 'the single highest-leverage edit in this whole proposal.'
  • Exact location: prompts/shared.md line ~102, bullet 'Refactors crossing module boundaries.', under the '### MEDIUM (auto-approve allowed if all gates pass)' heading (~line 98). The Discussion cites 'line 77' but the file has since shifted — grep for the bullet text, don't trust the line number.
  • The mirrored taxonomy in evals/judge.md currently reads 'MEDIUM: non-trivial logic changes, new deps, cross-module refactors.' If the cascade now escalates cross-module refactors, the grader's ground-truth taxonomy must move in lockstep or the eval will penalize the corrected behavior. Update both together.
  • This is a one-line intent change with outsized effect; keep the diff surgical. Do NOT also try to add an architecture lens to the cascade registry (scripts/lib/review-registry.tsv) — that is the separate-agent Phase D work already delivered as the advisory persona, and expanding the four deep specialists is explicitly out of scope for this cut.
  • Regression coverage: add a held-out/dev triage case (following evals/case.schema.json) whose input is a boundary-crossing refactor and whose expected is escalate=true, so the reclassification cannot silently revert.

Project Structure Notes

Single-bullet edit in prompts/shared.md plus a matching taxonomy line in evals/judge.md and one eval case. Independent of S1/S3/S4 (only needs S2's reviewer to exist).

References

Story prepared by the BMAD Scrum Master (Bob) for epic #1627. Status: ready-for-dev.

Activity

  1. don-petry commented on Sep 1, 2026

    @don-petry
    Collaborator

    Dev-Lead Implementation Plan

    Issue: #1632 — [Phase 3] Reclassify boundary-crossing refactors out of the auto-approvable MEDIUM tier in prompts/shared.md

    Scope

    Move "Refactors crossing module boundaries" off the auto-approvable MEDIUM path in prompts/shared.md so a boundary-crossing/structural refactor escalates, reconcile the mirrored taxonomy in evals/judge.md, and add one held-out regression case that expects escalate for a boundary-crossing refactor.

    Implementation Checklist

    • prompts/shared.md — remove the "Refactors crossing module boundaries." bullet from the MEDIUM (auto-approve) list and add a decision gate so a boundary-crossing/structural refactor escalates even when all other gates pass.
    • evals/judge.md — update the mirrored MEDIUM taxonomy line ("cross-module refactors") so the grader's ground truth matches the cascade (boundary-crossing refactor escalates, not auto-approvable).
    • Keep the diff surgical: no other risk bullets moved; do NOT expand scripts/lib/review-registry.tsv or add an architecture lens (out of scope per the issue).

    Tests to Write

    • Add one held-out regression case to evals/pr-review/holdout/cases.jsonl (the PR-review cascade suite, following evals/case.schema.json): input is a clean boundary-crossing refactor with all other gates green; expected = {escalate: true, risk: MEDIUM}. Locks the reclassification against silent reversion.

    Test Command

    python3 evals/validate-cases.py && python3 evals/validate-cases.py evals/pr-review/holdout/cases.jsonl evals/case.schema.json && bash .dev-lead/scripts/dev-lead-lint.sh

  2. don-petry commented on Sep 1, 2026

    @don-petry
    Collaborator

    Dev-Lead: Progress (in progress — not yet durable)

    Provisional. Nothing is pushed yet; the automation posts the authoritative
    completion record (with PR number + head SHA) after the push. Treat the notes
    below as intent, not delivered results.

    Plan Execution (intended)

    • Moved "Refactors crossing module boundaries" off the auto-approvable MEDIUM path in prompts/shared.md and added decision gate 7 so a boundary-crossing/structural refactor escalates for human + architectural review even when every other gate passes.
    • Reconciled the mirrored taxonomy in evals/judge.md: MEDIUM line no longer lists cross-module refactors, and the approve rule now states a boundary-crossing refactor escalates (not auto-approvable), so grader and cascade agree.
    • Added one held-out regression case (triage-boundary-refactor-escalate) to evals/pr-review/holdout/cases.jsonl — a clean cross-module refactor with all other gates green, expected = {escalate: true, risk: MEDIUM} — locking the reclassification against silent reversion.

    Local check output (provisional — not the pushed run)

    evals/validate-cases.py            -> OK: 13 skill(s), 107 case(s), no cross-split id overlap
    new case vs case.schema.json       -> cases OK: 1 case(s), unique ids, schema-valid
    .dev-lead/scripts/dev-lead-lint.sh -> all checks passed
    

    Files touched (this workspace, not yet pushed)

    • prompts/shared.md: reclassify boundary-crossing refactor out of MEDIUM auto-approve; add decision gate 7.
    • evals/judge.md: update mirrored MEDIUM taxonomy + approve rule to escalate cross-module refactors.
    • evals/pr-review/holdout/cases.jsonl: add boundary-crossing-refactor → escalate regression case.

    Notes

    • Scope kept surgical per the issue: scripts/lib/review-registry.tsv and the four deep specialists were not touched, and no other risk bullets were moved.
    • Other prompt files still carry their own independent "cross-module refactors" MEDIUM copies (e.g. deep-review*.md, single-review.md, rubber-duck.md); the issue's Project Structure Notes scope this cut to shared.md + judge.md + one eval case, so those broader echoes are left as out-of-scope follow-ups.
    • The regression case is placed in the PR-review cascade suite (pr-review/holdout) using the triage-shaped case.schema.json format, alongside the existing triage-clean-logic-fix/triage-unresolved-thread cases, rather than evals/triage — triage.md does not consume shared.md, so a triage-suite case would not exercise the reclassified taxonomy.
  3. don-petry commented on Sep 1, 2026

    @don-petry
    Collaborator

    Dev-Lead: Implementation Complete — PR #1641

    The implementation for issue #1632 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

  4. added a commit that references this issue on Sep 2, 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

    dev-leadFor dev-lead agent pickupinitiativeEpic / initiative tracking issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions