Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

fix(compound-engineering): reduce /ce:review context pressure#228

Open
Neo1228 wants to merge 2 commits intoEveryInc:mainfrom
Neo1228:fix/review-context-budget
Open

fix(compound-engineering): reduce /ce:review context pressure#228
Neo1228 wants to merge 2 commits intoEveryInc:mainfrom
Neo1228:fix/review-context-budget

Conversation

@Neo1228
Copy link

@Neo1228 Neo1228 commented Mar 6, 2026

Fixes #166.

Summary

/ce:review was fanning broad PR context out to every spawned reviewer. On larger or high-effort reviews, that makes compaction/context-limit failures much more likely before the agents get to the risky code.

This PR reduces that pressure while keeping the normal review flow intact:

  • require a compact review packet before agent fan-out
  • pass the packet, project review context, and exact file paths instead of full PR content
  • dedupe configured agents against always-on reviewers
  • add staged follow-up guidance for large PRs or visible context pressure
  • avoid running code-simplicity-reviewer twice
  • keep setup from writing always-on agents back into review_agents

Why this is a safe fix

  • scope is prompt/workflow content plus metadata and tests; there is no runtime library change
  • normal-sized PRs keep the same review surface, but with less duplicated context
  • large-PR handling becomes narrower and more targeted instead of re-broadcasting the full PR to every agent
  • generated compound-engineering.local.md guidance now matches actual /ce:review runtime expectations

Validation

  • bun test
  • Result: 316 passed, 0 failed
  • Added CLI integration coverage that converts the real plugins/compound-engineering plugin into a temp Codex home and verifies the generated ce-review prompt/skill plus setup skill preserve the new guardrails
  • Manual conversion smoke: bun run src/index.ts convert plugins/compound-engineering --to codex --codex-home <tmp>
  • Manual conversion smoke: bun run src/index.ts convert plugins/compound-engineering --to opencode --output <tmp>
  • Planning-stage Codex smoke in a temporary worktree with duplicate review_agents config confirmed the revised prompt reads local config and branch diff metadata before reviewer planning

Files changed

  • plugins/compound-engineering/commands/ce/review.md: compact packet step, deduped base agent set, staged large-PR guidance, tighter conditional-agent inputs
  • plugins/compound-engineering/skills/setup/SKILL.md: updated review-depth copy and removed always-on agent duplication
  • tests/compound-review-command.test.ts: source-content regression checks for packet + dedupe behavior
  • tests/cli.test.ts: Codex conversion integration check for the actual compound-engineering plugin output
  • plugins/compound-engineering/CHANGELOG.md: release note for issue Context limit reached in review agents #166
  • plugin metadata version bumps

Remaining caveat

This change improves the prompt contract and verifies that the contract survives real conversion output, but a fully deterministic end-to-end multi-agent /ce:review run is still not something the automated suite can assert. The new coverage is aimed at the highest-risk regression points for this issue: packet creation guidance, agent dedupe, large-PR staging instructions, and setup/runtime alignment.

@Neo1228 Neo1228 changed the title fix(compound-engineering): reduce review context pressure fix(compound-engineering): reduce /ce:review context pressure Mar 6, 2026
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.

Context limit reached in review agents

1 participant