Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3c83ac3
Initialize SDLC contract for issue #1965
Apr 25, 2026
6143ad3
refine: analysis draft for issue #1965
Apr 25, 2026
6c6a277
Persist statefiles after refine phase
Apr 25, 2026
6230b6a
Persist HITL resolution after refine phase gate
Apr 25, 2026
dda27d4
plan: architect analysis for issue #1965
Apr 25, 2026
0f6992d
plan: task breakdown for issue #1965
Apr 25, 2026
8dc46ab
plan: risk assessment for issue #1965
Apr 25, 2026
d937134
plan: address reviewer_plan NACK on architect analysis
Apr 25, 2026
1709bdf
plan: address reviewer_plan NACK on task breakdown
Apr 25, 2026
d0518c0
Persist statefiles after plan phase
Apr 25, 2026
3e78fe5
docs(reviewer): document subagent fan-out and lens reviewers (#1965)
Apr 25, 2026
d0687a7
implement: register reviewer_security/concurrency roles + ADVISORY ed…
Apr 25, 2026
b47ae3c
implement: add PhaseConfig.reviewer_code.parallel knob (#1965)
Apr 25, 2026
f85dfac
implement: lens criteria loaders + reviewer_code subagent fan-out (#1…
Apr 25, 2026
13b34bf
implement: drop unused type:ignore + tighten exception in models.py (…
Apr 25, 2026
da4507e
implement: address reviewer_code NACK on fan-out prompt block (#1965)
Apr 25, 2026
ee66ae6
test: add coverage for issue #1965 lens reviewers and fan-out prompt
Apr 25, 2026
027da72
Persist statefiles after implement phase
Apr 25, 2026
2e224b8
Remove ephemeral agent-output handoff artifacts (#1731)
Apr 25, 2026
5b1ff46
Persist BRC history files for PR
Apr 25, 2026
9b00844
Fix checks: register reviewer_security/reviewer_concurrency in gatewa…
james-in-a-box[bot] Apr 25, 2026
c03a258
Fix checks: sync registry/integration tests with reviewer_security/re…
james-in-a-box[bot] Apr 25, 2026
6871122
Address PR #2061 review feedback (exception types, worktree roles, co…
egg-reviewer[bot] Apr 25, 2026
a5c983f
Add tests for PR #2061 non-blocking review observations
egg-reviewer[bot] Apr 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,197 changes: 4,197 additions & 0 deletions .egg-state/brc-history/1965-implement.json

Large diffs are not rendered by default.

4,888 changes: 4,888 additions & 0 deletions .egg-state/brc-history/1965-implement.md

Large diffs are not rendered by default.

2,254 changes: 2,254 additions & 0 deletions .egg-state/brc-history/1965-plan.json

Large diffs are not rendered by default.

2,653 changes: 2,653 additions & 0 deletions .egg-state/brc-history/1965-plan.md

Large diffs are not rendered by default.

810 changes: 810 additions & 0 deletions .egg-state/brc-history/1965-refine.json

Large diffs are not rendered by default.

879 changes: 879 additions & 0 deletions .egg-state/brc-history/1965-refine.md

Large diffs are not rendered by default.

517 changes: 517 additions & 0 deletions .egg-state/contracts/issue-1965.json

Large diffs are not rendered by default.

369 changes: 369 additions & 0 deletions .egg-state/drafts/1965-analysis.md

Large diffs are not rendered by default.

907 changes: 907 additions & 0 deletions .egg-state/drafts/1965-plan.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docs/architecture/orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,12 @@ The orchestrator coordinates specialized agent roles across pipeline phases. Eac
| **Coder** | Write code, create commits, push branches |
| **Tester** | Find gaps in implementation, write and run tests, run linters/type checkers, apply auto-fixes |
| **Documenter** | Update docs and READMEs |
| **Reviewer (Code)** | Security, correctness, code quality, testing, documentation |
| **Reviewer (Code)** | Security, correctness, code quality, testing, documentation. On large diffs (~10 changed files OR ~500 LOC) self-gates and partitions the change set across Claude Agent SDK `Task` subagents along the implement-phase task list ([#1965](https://github.com/jwbron/egg/issues/1965)); see [Concurrent Execution: Implement-phase `reviewer_code` Subagent Fan-Out](../guides/concurrent-execution.md#implement-phase-reviewer_code-subagent-fan-out). |
| **Reviewer (Contract)** | Verify acceptance criteria met, task completion status |
| **Reviewer (Security)** _(ADVISORY)_ | Security-lens review focused on cross-file allowlist mismatches, handler-vs-validator path mismatches, uncommitted-artifact / Dockerfile-symlink mismatches, secret leakage, and cross-file OWASP top-10 patterns. Criteria: [`shared/prompts/security-review-criteria.md`](../../shared/prompts/security-review-criteria.md). NACKs are recorded but do not deadlock consensus until [#1997](https://github.com/jwbron/egg/issues/1997)'s severity-tagged NACK signalling lands. |
| **Reviewer (Concurrency)** _(ADVISORY)_ | Concurrency-lens review focused on race conditions, deadlocks, shared-state mutation, retry storms, resource-cleanup ordering, and BRC-protocol invariants. Criteria: [`shared/prompts/concurrency-review-criteria.md`](../../shared/prompts/concurrency-review-criteria.md). Same ADVISORY semantics as Reviewer (Security). |

**Execution model**: All implement phase agents run concurrently via the BRC consensus protocol. Agents communicate via the orchestrator message bus and reach phase completion through peer consensus.
**Execution model**: All implement phase agents run concurrently via the BRC consensus protocol. Agents communicate via the orchestrator message bus and reach phase completion through peer consensus. The two ADVISORY lens reviewers run alongside the critical reviewers on the same change set; promotion from ADVISORY to CRITICAL is gated on [#1997](https://github.com/jwbron/egg/issues/1997).

### Prompt Context Scoping

Expand Down
6 changes: 5 additions & 1 deletion docs/guides/concurrent-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ When concurrent execution starts, the `ConcurrentPhaseExecutor` (in `orchestrato
|-------|--------------|
| `refine` | `refiner`, `reviewer_refine`, `reviewer_agent_design` (egg repo only) |
| `plan` | `architect`, `task_planner`, `risk_analyst`, `reviewer_plan` |
| `implement` | `coder`, `tester`, `documenter`, `reviewer_code`, `reviewer_contract` |
| `implement` | `coder`, `tester`, `documenter`, `reviewer_code`, `reviewer_contract`, `reviewer_security` (ADVISORY), `reviewer_concurrency` (ADVISORY) |

**Shared branch**: All agents operate on the pipeline's shared branch (e.g., `egg/issue-123`). Agents coordinate commits via the message bus to sequence their work and avoid conflicts.

Expand Down Expand Up @@ -353,6 +353,10 @@ A reviewer has three outcomes on a proposal:
- **NACK** — proposal is wrong; producer must iterate before merge.
- **Conditional ACK** — proposal is correct but requires a specific human-only action *at merge time* (e.g. a `git mv`, a cross-repo config flip). Pass `--pre-merge-condition "..."` on `egg-orch consensus ack`; the condition is persisted on the approval-matrix edge, scoped to the current proposal version, surfaced in `egg-orch consensus status`, and rendered in a **Pre-merge Obligations** section on the auto-created PR body so the merger cannot skim past it. Not a soft NACK — if the agents can address the issue themselves, NACK instead. See the [Conditional ACK reference](../reference/conditional-ack.md).

### Implement-phase `reviewer_code` Subagent Fan-Out

On the implement phase, `reviewer_code` self-gates on diff size and partitions large diffs across Claude Agent SDK `Task` subagents so every changed file is read carefully ([#1965](https://github.com/jwbron/egg/issues/1965)). The reviewer first runs `git diff --numstat` against the resolved base ref; when the diff exceeds **~10 changed files OR ~500 lines of change**, it self-fetches `phases.implement.tasks[]` via `mcp__sdlc__show_contract` and spawns one subagent per task partition (capped at 6 subagents per review with a 5-minute / 300-second per-subagent wall-clock timeout). Each subagent re-runs `git diff` filtered by its assigned path globs, reviews only its slice, and is forbidden from spawning subagents of its own. The parent reviewer then performs a **cross-partition consistency pass** (handler ↔ allowlist, route ↔ schema, fixture ↔ Dockerfile/symlink, import-graph cycles) before emitting a single ACK / NACK on behalf of the whole review — closing the cross-file blind spot that let [PR #1964](https://github.com/jwbron/egg/pull/1964)'s `^project$` allowlist bypass slip through. Below the threshold, on empty implement-phase task lists (custom-phase invocations, contractless `babysit_pr`), or when MCP is unreachable from the subagent context, the reviewer falls back to single-pass review with a STATUS heartbeat noting the gate decision (`fan-out: enabled / skipped`). Parallelism is configurable per pipeline via `phase_configs.implement.reviewer_code.parallel` (default `true`); the fan-out block lives in `_build_review_prompt()` in `orchestrator/routes/pipelines.py` and is described in detail in [`shared/prompts/REVIEWER-SYNC.md`](../../shared/prompts/REVIEWER-SYNC.md). The two new ADVISORY lens reviewers `reviewer_security` and `reviewer_concurrency` (criteria in [`security-review-criteria.md`](../../shared/prompts/security-review-criteria.md) and [`concurrency-review-criteria.md`](../../shared/prompts/concurrency-review-criteria.md)) run alongside `reviewer_code` on the same change set; their NACKs are recorded but do not deadlock consensus until severity-tagged NACK signalling lands in [#1997](https://github.com/jwbron/egg/issues/1997).

### Pre-Proposal ACK Protection

When agents work at different speeds, a faster reviewer may ACK a producer before the producer has submitted its proposal. The BRC protocol handles this automatically:
Expand Down
2 changes: 2 additions & 0 deletions gateway/agent_restrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def is_blocked(self, command: str) -> bool:
AgentRole.REVIEWER_AGENT_DESIGN,
AgentRole.REVIEWER_REFINE,
AgentRole.REVIEWER_PLAN,
AgentRole.REVIEWER_SECURITY,
AgentRole.REVIEWER_CONCURRENCY,
AgentRole.AUTOFIXER,
AgentRole.CONFLICT_RESOLVER,
AgentRole.INSPECTOR,
Expand Down
Loading
Loading