Skip to content

[Phase 3] Wire the DOWNSTREAM_IMPACT block into the triage + cascade prompts and surface it in the verdict #731

Closed

Description

@github-actions

Story

As a PR reviewer (human or agent),
I want see the downstream-impact context inlined in the triage and deeper-review prompts, with guidance to flag potential consumer breakage, and have that signal surfaced in the review output,
so that a reviewer gets a proactive 'this change to X is consumed by N downstream repos' annotation during review, before the change reaches ring-0.

Acceptance Criteria

  1. The DOWNSTREAM_IMPACT block is inlined into the triage prompt assembly in review-one-pr.sh (alongside ADVISORY_BOT_FEEDBACK), and prompts/triage.md documents the new field and how to weigh it.
  2. The deeper tiers (prompts/single-review.md and the cascade prompts) receive the block (via the exported file path) and prompts/single-review.md instructs the reviewer to call out potential downstream breakage when a shared surface's interface changes.
  3. Prompt guidance makes the signal ADVISORY by default: an interface-breaking change to a consumed surface is called out (and may raise risk), but a mere reference to a touched surface does not by itself force escalation — consistent with the existing triage escalation criteria.
  4. The review output (verdict/annotation) includes a downstream-impact note when the block is non-empty, naming the impacted surface(s) and the consuming repo(s).
  5. When the block is (none) (default / no shared surface touched), prompts and output are unchanged from today — no spurious downstream notes.

Tasks / Subtasks

Dev Notes

  • Triage assembly site: the { cat prompts/triage.md; ...; } block in review-one-pr.sh (around L523-L545). Add the DOWNSTREAM_IMPACT section using the SAME conditional shape as ADVISORY_BOT_FEEDBACK (if non-empty -> inline; else -> (none)).
  • Triage semantics: see prompts/triage.md decision criteria — escalation is for high-risk/unaddressed-findings. Frame downstream impact so an interface-breaking change to a consumed reusable/lib/prompt is a flaggable concern (may justify escalation), but a benign touch of a consumed file is informational. When in doubt the existing 'escalate' default still applies.
  • Deeper tiers read advisory context via ADVISORY_BOT_FEEDBACK_FILE; follow the same convention for the downstream-impact file exported by Story 3 so single-review.md / cascade prompts can read it.
  • This story is prompt + assembly wiring only — the data is already produced by Story 3. Keep behavior byte-for-byte identical when the block is (none) so existing adopters are unaffected.
  • Risk taxonomy reference: prompts/single-review.md HIGH list already includes 'Org/project standards violations' — downstream interface breakage is a natural sibling; phrase consistently.

Project Structure Notes

Touches scripts/review-one-pr.sh (triage prompt builder) and prompts/triage.md + prompts/single-review.md (and any cascade prompt that consumes the advisory file). No new files.

References

  • scripts/review-one-pr.sh#L523-L545
  • prompts/triage.md#Decision-criteria
  • prompts/single-review.md#Risk-classification

Likely target surface

  • scripts/review-one-pr.sh
  • prompts/triage.md
  • prompts/single-review.md

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    initiativeEpic / initiative tracking issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions