Skip to content

feat: add GitHub review posting to /review-council - #323

Merged
yvonnedevlinrh merged 2 commits into
unbound-force:mainfrom
yvonnedevlinrh:opsx/review-council-github-posting
Jul 6, 2026
Merged

yvonnedevlinrh merged 2 commits into
unbound-force:mainfrom
yvonnedevlinrh:opsx/review-council-github-posting

Conversation

@yvonnedevlinrh

@yvonnedevlinrh yvonnedevlinrh commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add optional GitHub review posting to /review-council Code Review Mode (Phase 3 of #177). The council's consolidated
multi-persona findings can now be posted as a GitHub PR review, bridging the gap between the local terminal experience and PR collaboration.

Key capabilities:

  • PR detection via gh pr view or explicit PR number argument
  • Multi-persona finding aggregation with per-persona sections
  • Severity-first round-robin inline comment allocation (capped at 15)
  • Verdict mapping: APPROVE → APPROVE, REQUEST CHANGES → REQUEST_CHANGES, APPROVE WITH ADVISORIES → COMMENT
  • Pre-posting checks: duplicate detection, stale review warnings, CODEOWNER warnings
  • Human confirmation required before posting
  • Protocol 2 (Issue Linking) conditionally enabled with explicit PR number
  • Graceful degradation when gh unavailable or API errors occur

Fixes #314

How to Test

  1. Run /review-council on a branch with code changes but no open PR — verify Step 7 skips with informational note
  2. Run /review-council code 42 — verify PR number is accepted
  3. Run /review-council code abc — verify invalid input is rejected
  4. Run /review-council on a branch with an open PR — verify posting is offered after final report
  5. Verify scaffold sync: diff .opencode/commands/review-council.md internal/scaffold/assets/opencode/commands/review-council.md returns no output

How to Demo

Run /review-council on any feature branch with an open PR. After the council completes its review and presents the final report (Step 6), the new Step 7 detects the PR and offers to post the findings as a GitHub review with per-persona sections.

Key Files Changed

  • .opencode/commands/review-council.md — Added Step 7 (GitHub Review Posting) with sub-steps 7a-7g, PR number argument parsing, and Protocol 2 conditional execution in Phase 1c
  • internal/scaffold/assets/opencode/commands/review-council.md — Byte-identical scaffold sync
  • .opencode/skills/review-context/SKILL.md — Updated consumer table for Protocol 2 conditional behavior
  • AGENTS.md — Updated PR Review Commands table for /review-council [N] syntax
  • CHANGELOG.md — Added Unreleased entry for feat: add GitHub review posting to /review-council #314
  • openspec/changes/review-council-github-posting/ — Full OpenSpec artifacts (proposal, design, specs, tasks)

Known Issues

Known Issues

This PR was generated by /finale (AI-assisted).

@yvonnedevlinrh
yvonnedevlinrh force-pushed the opsx/review-council-github-posting branch from 517bf33 to 532c39c Compare July 2, 2026 15:01
@yvonnedevlinrh yvonnedevlinrh self-assigned this Jul 2, 2026
@yvonnedevlinrh yvonnedevlinrh moved this to In Review 👀 in Unbound Force Planning Jul 2, 2026
@yvonnedevlinrh
yvonnedevlinrh force-pushed the opsx/review-council-github-posting branch 2 times, most recently from d27ba9d to 1322d96 Compare July 2, 2026 16:02
Add optional Step 7 to /review-council Code Review Mode for
posting consolidated multi-persona findings as a GitHub PR
review. Includes PR detection, review state awareness,
multi-persona finding aggregation with per-persona sections,
severity-first round-robin inline comment allocation (capped
at 15), verdict mapping (APPROVE/REQUEST_CHANGES/COMMENT),
pre-posting checks (duplicate detection, stale review
warnings, CODEOWNER warnings), and human confirmation gate.

Protocol 2 (Issue Linking) conditionally enabled when an
explicit PR number is provided via argument. Graceful
degradation when gh CLI unavailable or API errors occur.

Fixes: unbound-force#314

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>

@sonupreetam sonupreetam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yvonnedevlinrh PR looks good. Just some stale in-repo documentation (3 files):
The following files describe /review-council as "Pre-PR (local)" without the new [N] argument or GitHub
posting capability. After merge, these become inaccurate:

  • docs/architecture.md:543 — Review Commands table
  • docs/usage.md:49,242 — Usage example and Quick Reference table
  • internal/scaffold/assets/opencode/commands/agent-brief.md:194 — Scaffold template

Update stale documentation that described /review-council as
"Pre-PR (local)" without the new [N] argument or GitHub posting
capability added by this PR.

Files updated:
- docs/architecture.md — Review Commands table
- docs/usage.md — Usage example and Quick Reference table
- agent-brief.md — Scaffold template and live copy (sync)

Addresses PR unbound-force#323 review feedback from @sonupreetam.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>
@yvonnedevlinrh

Copy link
Copy Markdown
Contributor Author

@sonupreetam Thanks for reviewing the PR. Added your suggested changes in d252e69: Updated all three stale documentation locations with [N] argument syntax and PR posting capability.

  • docs/architecture.md:543 — Review Commands table updated
  • docs/usage.md:49,242 — Usage example and Quick Reference table updated
  • internal/scaffold/assets/opencode/commands/agent-brief.md:194 — Scaffold template updated (+ live copy sync maintained)

@yvonnedevlinrh
yvonnedevlinrh merged commit 9477a4e into unbound-force:main Jul 6, 2026
14 checks passed
@yvonnedevlinrh
yvonnedevlinrh deleted the opsx/review-council-github-posting branch July 6, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

feat: add GitHub review posting to /review-council

2 participants