Skip to content

feat: add PR reviewability analysis and scope monitoring#289

Open
kieranklaassen wants to merge 2 commits intomainfrom
feat/pr-reviewability-scope-monitoring
Open

feat: add PR reviewability analysis and scope monitoring#289
kieranklaassen wants to merge 2 commits intomainfrom
feat/pr-reviewability-scope-monitoring

Conversation

@kieranklaassen
Copy link
Copy Markdown
Collaborator

@kieranklaassen kieranklaassen commented Mar 17, 2026

Summary

  • New agent: pr-reviewability-analyst — scores PRs on reviewability (0-100) using weighted line counts, file counts, and concern analysis. Proposes concrete stacked PR splits when score < 60.
  • ce:review integration: Added Step 1.5 "Pre-Flight Reviewability Check" that runs before all other review agents. Non-blocking (P2 finding). Updated summary report template.
  • ce:work integration: Added "Scope Check" to the task execution loop. Measures total branch divergence after each task. Soft warning at 300 lines/5 files, hard warning at 500 lines/10 files with checkpoint + stacked branch flow.
  • ce:work-beta parity: Mirrored the same task-completion and scope-check behavior into ce:work-beta so this guidance does not get lost if ce:work-beta is later promoted to stable.

Motivated by EveryInc/proof#536 — a 172-file, ~50K-line PR that was closed because it mixed too many concerns and introduced 3 independent regressions across unrelated areas.

Key Design Decisions

  • Non-blocking: Reviewability check is P2 (informational), not P1. Teams adopt gradually.
  • No automated splitting in v1: Agent outputs a structured split proposal. Automated cherry-picking is a v2 enhancement.
  • Hardcoded pre-flight: Always runs during /ce:review, not part of user-configured agent list.
  • Branch divergence measurement in ce:work/ce:work-beta: Total diff from default branch, so incremental commits don't reset the counter.
  • Stable/beta workflow parity: ce:work-beta keeps the same reviewability guardrails as ce:work, while preserving its beta-only delegation guidance.
  • Warning fatigue prevention: After user declines a hard warning, suppresses until 100+ additional lines.

Testing

  • Verified all JSON files valid (jq .)
  • Verified ce:work-beta mirrors the new ce:work scope-check/task-completion guidance while preserving beta-only delegation sections

Post-Deploy Monitoring & Validation

  • No additional operational monitoring required: plugin content change only — no runtime code, no deployed services

Follow-up

  • Update setup skill to include reviewability defaults in new settings files
  • Run /release-docs to rebuild documentation site

🤖 Generated with Claude Opus 4.6 (1M context) via Claude Code

Add pr-reviewability-analyst agent that scores PRs on size, concern
count, and file spread, proposing stacked PR splits when thresholds
are exceeded. Integrate as a pre-flight check in /ce:review (Step 1.5)
and add scope monitoring to /ce:work's task execution loop with soft/hard
warnings and checkpoint flow.

Motivated by EveryInc/proof#536 — a 172-file PR closed because it mixed
too many concerns and introduced 3 independent regressions.

🤖 Generated with Claude Opus 4.6 via [Claude Code](https://claude.com/claude-code) + Compound Engineering v2.41.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tmchow tmchow force-pushed the feat/pr-reviewability-scope-monitoring branch from 26e8f48 to f1c2cf2 Compare March 23, 2026 04:33
@tmchow
Copy link
Copy Markdown
Collaborator

tmchow commented Mar 23, 2026

@kieranklaassen rebased this branch onto origin/main to resolve the merge conflicts with main given a bunch of merges I've done. Didn't want to saddle you with rebasing and such.

I also mirrored the new ce:work task-completion and scope-check changes into ce:work-beta so that if ce:work-beta is later promoted to stable, this reviewability work does not get lost.

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