ADR-255: Update reviewer/developer skill files to use thread schema - #9
Conversation
- reviewer-review.md: replace $PR_URL with $BASE_BRANCH; remove Step 3 (PR gate) and Step 6 (gh api post); replace gh pr diff with git diff origin/$BASE_BRANCH; output uses threads[] with filePath/lineNumber/ resolved/comments schema (no id field) - reviewer-sign-off.md: replace $PR_URL with $BASE_BRANCH and $REVIEW_THREADS; remove GraphQL fetch (Step 3), GitHub MCP resolve calls, gh api post (Step 6), and Step 6a; Reviewer evaluates threads from $REVIEW_THREADS and returns every thread evaluated (comments: [] if no new comment); output has no status field; id preserved on carried-over threads - developer-fix.md: remove Step 3 (GitHub MCP fetch) and Step 4 (triage with direct GitHub reply); add Build/Test Issues and Review Threads input sections; add mode-detection; in review-fix mode Developer returns full updated threads[] JSON block; disagree flow appends Developer comment to thread instead of posting to GitHub
jodavis-claude
left a comment
There was a problem hiding this comment.
Review: ADR-255 — Update reviewer/developer skill files to use thread schema
All three exit criteria are met for reviewer-review.md, reviewer-sign-off.md, and developer-fix.md. Two correctness issues require fixes before approval.
P1-A — developer-fix.md:122: "may leave comments empty" erases Reviewer comment history
FixPrStep uses wholesale comment replacement: matched.comments = [ReviewComment(...) for c in thread_dict.get("comments", [])]. When the Developer returns "comments": [] for a thread it fixed silently (following the current instruction), this assignment erases the original Reviewer comment from the in-memory thread. At sign-off, the Reviewer receives the thread with "comments": [] and only knows the file/line location — no description of the original issue — making it harder to verify the fix.
The spec (task brief) is clear: "Each returned thread object must include all prior comments plus the new Developer reply (if any)."
Fix: Change line 122 from:
"you may leave
commentsempty (the Reviewer will evaluate during sign-off)"
To:
"include all prior comments from the thread's
commentsarray as-is, and append your own{"author": "Developer", "comment": "..."}entry only if you are disagreeing or want to explain the fix. Do not clear prior comments — the sign-off Reviewer needs the original issue description."
Also update the example JSON block at lines 128–146 so the first thread (where the Developer agreed and fixed silently) shows the prior Reviewer comment preserved, not "comments": [].
P1-B — dev_team.py:885: ctx.save() called before ctx.review_fix_iteration += 1
ctx.save(self._context_path) # line 885 — saves stale iteration count
ctx.review_fix_iteration += 1 # line 886If the pipeline crashes between the save and the state transition, the next run re-enters FixPrStep with the same iteration count. MAX_REVIEW_FIX_ITERATIONS prevents an infinite loop, but the counter being under-counted allows one extra fix iteration than intended.
Fix: Swap the two lines so ctx.review_fix_iteration += 1 runs before ctx.save(self._context_path).
…utput Returning comments: [] erased the original Reviewer comment, leaving the sign-off Reviewer with no issue description. Instruction now says to include all prior comments as-is and append a Developer reply only when disagreeing or explaining. Example JSON block updated to match.
ctx.save() was called before ctx.review_fix_iteration += 1, so a crash between the two lines would replay the step with the same iteration count, allowing one extra retry beyond the configured limit.
jodavis-claude
left a comment
There was a problem hiding this comment.
Sign-off review for ADR-255: all exit criteria verified.
All three skill files updated correctly:
- reviewer-review.md: uses threads[] (no id field), lineNumber is source-file line, no GitHub posting step, $BASE_BRANCH input present
- reviewer-sign-off.md: inputs use $BASE_BRANCH and $REVIEW_THREADS, output has no status field, returns every thread with comments:[] for unchanged threads, no GitHub posting steps
- developer-fix.md: old Steps 3-4 (GitHub fetch/reply) removed, $ISSUES and $REVIEW_THREADS input sections present, mode detection correct, threads[] output in review-fix mode only, prior comments preserved
dev_team.py: FixPrStep.review_fix_iteration incremented before ctx.save(); developer-fix thread merge correct.
No prior review threads to evaluate. No new Priority 1-4 issues found in modified files. Approved.
* ADR-255: Update reviewer/developer skill files to use thread schema - reviewer-review.md: replace $PR_URL with $BASE_BRANCH; remove Step 3 (PR gate) and Step 6 (gh api post); replace gh pr diff with git diff origin/$BASE_BRANCH; output uses threads[] with filePath/lineNumber/ resolved/comments schema (no id field) - reviewer-sign-off.md: replace $PR_URL with $BASE_BRANCH and $REVIEW_THREADS; remove GraphQL fetch (Step 3), GitHub MCP resolve calls, gh api post (Step 6), and Step 6a; Reviewer evaluates threads from $REVIEW_THREADS and returns every thread evaluated (comments: [] if no new comment); output has no status field; id preserved on carried-over threads - developer-fix.md: remove Step 3 (GitHub MCP fetch) and Step 4 (triage with direct GitHub reply); add Build/Test Issues and Review Threads input sections; add mode-detection; in review-fix mode Developer returns full updated threads[] JSON block; disagree flow appends Developer comment to thread instead of posting to GitHub * ADR-255: Fix developer-fix.md to preserve prior comments in threads output Returning comments: [] erased the original Reviewer comment, leaving the sign-off Reviewer with no issue description. Instruction now says to include all prior comments as-is and append a Developer reply only when disagreeing or explaining. Example JSON block updated to match. * ADR-255: Fix FixPrStep to increment iteration before save ctx.save() was called before ctx.review_fix_iteration += 1, so a crash between the two lines would replay the step with the same iteration count, allowing one extra retry beyond the configured limit. --------- Co-authored-by: Joe Davis <ElwoodMoves@hotmail.com>
…milestone scrum master table (#12) * ADR-256: Remove Jira tools from developer, update reviewer output schema, add dev-team.md milestone table All authenticated connector tools removed from developer.md per the scrum-master-owns-all-operations design. Reviewer output schema updated to thread-based JSON. Full 8-milestone table added to dev-team.md with sidecar persistence, thread-matching, and Jira idempotency guard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ADR-255: Update reviewer/developer skill files to use thread schema (#9) * ADR-255: Update reviewer/developer skill files to use thread schema - reviewer-review.md: replace $PR_URL with $BASE_BRANCH; remove Step 3 (PR gate) and Step 6 (gh api post); replace gh pr diff with git diff origin/$BASE_BRANCH; output uses threads[] with filePath/lineNumber/ resolved/comments schema (no id field) - reviewer-sign-off.md: replace $PR_URL with $BASE_BRANCH and $REVIEW_THREADS; remove GraphQL fetch (Step 3), GitHub MCP resolve calls, gh api post (Step 6), and Step 6a; Reviewer evaluates threads from $REVIEW_THREADS and returns every thread evaluated (comments: [] if no new comment); output has no status field; id preserved on carried-over threads - developer-fix.md: remove Step 3 (GitHub MCP fetch) and Step 4 (triage with direct GitHub reply); add Build/Test Issues and Review Threads input sections; add mode-detection; in review-fix mode Developer returns full updated threads[] JSON block; disagree flow appends Developer comment to thread instead of posting to GitHub * ADR-255: Fix developer-fix.md to preserve prior comments in threads output Returning comments: [] erased the original Reviewer comment, leaving the sign-off Reviewer with no issue description. Instruction now says to include all prior comments as-is and append a Developer reply only when disagreeing or explaining. Example JSON block updated to match. * ADR-255: Fix FixPrStep to increment iteration before save ctx.save() was called before ctx.review_fix_iteration += 1, so a crash between the two lines would replay the step with the same iteration count, allowing one extra retry beyond the configured limit. --------- Co-authored-by: Joe Davis <ElwoodMoves@hotmail.com> * ADR-256: Fix ctx.save() ordering and review_notes preservation in dev_team.py P2a: Move ctx.save() to after review_fix_iteration and work_summaries updates in FixPrStep so a pipeline resume after interruption sees the correct iteration count and the latest work summary. P2b: Preserve signoff body in SignoffStep when failures is empty but threads are unresolved. ctx.review_notes now falls back to ctx.signoff_notes so the developer-fix agent receives textual context explaining why sign-off failed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ADR-256: Document gh api strategy in dev-team.md; update reviewer.md frontmatter P1: Add implementation note to the thread-posting section of dev-team.md explaining that mcp__github__help was called but plugin:github:github was unavailable, and that gh api REST/GraphQL calls are the direct equivalent. Preserves all functional behaviour; satisfies the exit criterion by documenting the discovery outcome. P4: Update reviewer.md description frontmatter to remove "Creates GitHub PRs" — the scrum master owns PR creation after ADR-256; the reviewer only outputs a structured JSON result. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ADR-256: Fix reply-to-thread URL in dev-team.md The reply endpoint requires the pull number in the path: /pulls/<pull-num>/comments/<id>/replies not the shorter form without it. Verified empirically while posting PR thread replies — the shorter form returns 404. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ADR-256: Use mcp__plugin_github_github__add_reply_to_pull_request_comment for reply-to-thread Satisfies exit criterion #4: MCP method name discovered from plugin:github:github server and now referenced in Thread-posting logic. resolve-thread continues to use gh api graphql resolveReviewThread (no MCP equivalent exists). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Remove gh CLI instructions from dev-team.md --------- Co-authored-by: Joe Davis <ElwoodMoves@hotmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Joe Davis <jodasoft@outlook.com>
Work item
ADR-255: Update the three agent skill markdown files (
reviewer-review.md,reviewer-sign-off.md,developer-fix.md) to use the new thread schema so that all GitHub interactions are centralized in the scrum master rather than in sub-agents.Changes
plugins/dev-team/commands/reviewer-review.md— Removed$PR_URLinput and Step 3 (PR gate); replacedgh pr diffwithgit diff origin/$BASE_BRANCH; removed Step 6 (gh api post); updated output schema to{"body", "status", "threads[]}with noidfield,filePathcamelCase, 1-basedlineNumber, andcommentsarray; added explicit instruction thatlineNumberis source-file line not diff positionplugins/dev-team/commands/reviewer-sign-off.md— Replaced$PR_URLheader with$BASE_BRANCHand$REVIEW_THREADS; removed Step 3 (GraphQL fetch), Step 4 (GitHub MCP resolve calls and mutation), Step 6 (gh api post), and Step 6a (pr ready/Jira assign); restructured step to evaluate threads from$REVIEW_THREADSwith "return every thread" instruction andcomments: []rule; output is{"body", "threads[]}with nostatusfield; carried-over threads preserveid, new threads omit itplugins/dev-team/commands/developer-fix.md— Removed Step 3 (GitHub MCP fetch) and Step 4 (triage with direct GitHub reply); added### Build/Test Issuesand### Review Threadsinput sections; added mode-detection block; in review-fix mode Developer iterates threads and returns fullthreads[]fenced JSON block; in build/test-fix mode no JSON output is produced; steps renumbered 1–5Design decisions
idhandling: Carried-over threads inreviewer-sign-off.mdoutput include the originalidsoSignoffStepcan match them; new threads introduced during sign-off omitid(pipeline assigns). This is required for matching without an additional lookup step.$BASE_BRANCHinreviewer-review.md— if$BASE_BRANCHis empty, thegit diffcommand fails naturally with a clear error.git diff origin/$BASE_BRANCHover all changed files rather than filtering to last-commit files, to avoid missing issues introduced across multiple fix commits.