Skip to content

fix(pr-review): correct spec inconsistencies in orchestrator-split issues#28

Merged
orioltf merged 3 commits into
developfrom
feature/pr-review/orchestrator-split-02
May 12, 2026
Merged

fix(pr-review): correct spec inconsistencies in orchestrator-split issues#28
orioltf merged 3 commits into
developfrom
feature/pr-review/orchestrator-split-02

Conversation

@orioltf
Copy link
Copy Markdown
Member

@orioltf orioltf commented May 11, 2026

Why

A grill-with-docs session over the orchestrator-split feature set (docs/issues/pr-review-orchestrator-split/) found ten spec inconsistencies that would have caused an implementing agent to either fail acceptance criteria or produce incorrect behaviour. This PR fixes all of them before any code is written.

What changed

# Issue Fix
1 Mode detection acceptance criterion said "no az devops invoke" but the implementation used az devops invoke Specified az repos pr thread list for mode detection
2 Issue 06 and PRD user story #18 referenced "Step 8" — a step number from the pre-refactor monolith that won't exist after issue 04 Replaced with "the review-agent launch step" throughout
3 Issues 01 + PRD user story #17 said ADO Fetcher and Doc Context Orchestrator run concurrently Corrected: Fetcher is a prerequisite; Doc Context + review agents run concurrently with each other after Fetcher completes
4 Re-review Coordinator early-exit left ADO Writer behaviour undefined Added earlyExit flag to Coordinator return value; orchestrator skips ADO Writer entirely when set
5 Issue 03 said Coordinator received "prior-threads JSON" — but detect-prior-review runs inside the Coordinator Changed input to "raw full PR threads JSON (unfiltered)"
6 No spec said where the thread list for the Coordinator came from Orchestrator captures it during mode detection and passes it forward — no second ADO call
7 Issue 03 listed "diff hunks file path" as an orchestrator input Coordinator now owns diff-to-hunks parsing internally; raw diff comes from the ADO Fetcher context block
8 .claude/prompts/pr-review-workflow.prompt.md referenced as structural model in four places All references removed — the file is untracked, temporary, and a wrong analogy
9 ADR 0013 had stale "Steps 3.5–10-Path-B" monolith step reference Replaced with responsibility description
10 CLAUDE.md update not in scope of any issue Added to issue 07's what-to-build and acceptance criteria

Files changed

  • docs/issues/pr-review-orchestrator-split/PRD.md
  • docs/issues/pr-review-orchestrator-split/01-create-ado-fetcher-agent.md
  • docs/issues/pr-review-orchestrator-split/03-create-re-review-coordinator-agent.md
  • docs/issues/pr-review-orchestrator-split/04-refactor-orchestrator.md
  • docs/issues/pr-review-orchestrator-split/06-compact-subagent-output.md
  • docs/issues/pr-review-orchestrator-split/07-version-bump-and-release.md
  • apps/claude-code/pr-review/docs/adr/0013-orchestrator-split-for-review-pr.md

All seven issues remain ready-for-agent.

Test plan

  • Review each changed issue file and verify the spec is now internally consistent
  • Confirm no issue's acceptance criteria contradict its "What to build" section
  • Confirm the dependency chain (01+02+03 → 04 → 05+06 → 07) is still intact

🤖 Generated with Claude Code

…sues

Found and fixed ten spec issues during grill-with-docs session:
- Mode detection must use `az repos pr thread list`, not `az devops invoke`
- Step 8 references replaced with purpose-based description (step numbering
  changes after refactor)
- ADO Fetcher is a prerequisite for Doc Context Orchestrator, not concurrent
- Re-review Coordinator returns `earlyExit` flag; orchestrator skips ADO
  Writer entirely on early exit
- Coordinator receives full unfiltered thread list, not pre-filtered
  prior-threads JSON (`detect-prior-review` runs inside the Coordinator)
- Thread list is captured during mode detection and passed forward — no
  second ADO call
- Diff-to-hunks parsing moved inside the Coordinator (was incorrectly an
  orchestrator input)
- All references to `.claude/prompts/pr-review-workflow.prompt.md` removed
  (untracked temp file, wrong analogy)
- Stale monolith step reference removed from ADR 0013
- CLAUDE.md update added to issue 07 scope

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the spec set for the pr-review “orchestrator split” work (docs/issues/pr-review-orchestrator-split/) to remove inconsistencies discovered during review, so implementing agents have unambiguous acceptance criteria and interface contracts before any code changes land.

Changes:

  • Clarifies orchestration sequencing (ADO Fetcher prerequisite; Doc Context + review aspect agents run concurrently after Fetcher completes).
  • Refines re-review orchestration contracts (raw threads JSON input; earlyExit flag semantics; orchestrator skips writer on early exit).
  • Removes references to an untracked “GitHub prompt” model and updates naming from “Step 8” to “review-agent launch step” in several places.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/issues/pr-review-orchestrator-split/PRD.md Updates user stories + acceptance criteria and removes the untracked prompt-model reference.
docs/issues/pr-review-orchestrator-split/01-create-ado-fetcher-agent.md Clarifies that Fetcher must complete before Doc Context runs; concurrency occurs after Fetcher.
docs/issues/pr-review-orchestrator-split/03-create-re-review-coordinator-agent.md Updates Coordinator inputs/outputs (raw threads JSON, internal hunks parsing, earlyExit).
docs/issues/pr-review-orchestrator-split/04-refactor-orchestrator.md Updates mode detection method and specifies early-exit behavior for re-review orchestration.
docs/issues/pr-review-orchestrator-split/06-compact-subagent-output.md Renames “Step 8” to purpose-based “review-agent launch step” and clarifies schema guidance placement.
docs/issues/pr-review-orchestrator-split/07-version-bump-and-release.md Brings CLAUDE.md update into scope and adds it to acceptance criteria.
apps/claude-code/pr-review/docs/adr/0013-orchestrator-split-for-review-pr.md Removes the untracked prompt-model analogy; reframes the “thin coordinator” rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/issues/pr-review-orchestrator-split/04-refactor-orchestrator.md Outdated
Comment thread docs/issues/pr-review-orchestrator-split/04-refactor-orchestrator.md Outdated
Comment thread docs/issues/pr-review-orchestrator-split/03-create-re-review-coordinator-agent.md Outdated
Comment thread docs/issues/pr-review-orchestrator-split/PRD.md
orioltf and others added 2 commits May 11, 2026 18:37
- Issue 04: add explicit ADO Fetcher invocation to steps 5 and 6
- Issue 04: clarify inline ADO prohibition (no az devops invoke; mode-detection az repos pr thread list is allowed)
- Issue 03: drop "new" from Coordinator return contract count list
- PRD: replace remaining "Step 8" reference with "review-agent launch step"
- ADR 0013: align "no inline ADO shell commands" with allowed mode-detection exception

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… docs

- Replace "prior commit SHA" with "prior iteration ID" throughout: the
  parse-signature module extracts an iteration ID, not a commit SHA; the
  no-new-revisions check compares iteration IDs
- Add `obsolete` to Re-review Coordinator return schema; all four
  classification states are now surfaced (addressed, disputed, pending, obsolete)
- Clarify issue 03 step 7: "fresh findings list" replaces "updated findings
  list" ambiguity; early-exit return now shows all fields always present
- Issue 04: Coordinator is explicitly called after all review agents complete;
  ADO Writer mode flag defined with its two values and semantics
- Issue 01: prior iteration ID is an input, not an output of the context block
- PRD: User Story 7 names all six finding fields; Re-review Coordinator Key
  interface now includes return schema and earlyExit skip-writer contract;
  ADO Fetcher interface clarified as input/output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@orioltf orioltf merged commit 77d95fe into develop May 12, 2026
4 checks passed
@orioltf orioltf deleted the feature/pr-review/orchestrator-split-02 branch May 12, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants