design-decision-gate: reduce max-turns 20→12, add explicit turn budget and stopping criteria#29168
Conversation
|
Hey A few things to address before this is ready for review:
If you'd like a hand completing this, you can assign this prompt to your coding agent:
|
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7f2d4b57-ac21-4a97-bcee-306586d369f0 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
@copilot keep turn at 12 |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b393421d-1e34-44b7-95c5-0b5af1e7f3e4 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in f484b1f — Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Reduces the Design Decision Gate agent’s maximum investigation depth and adds explicit guidance for how to spend turns and when to stop, to prevent over-investigation on complex PRs.
Changes:
- Lowered
max-turnsfrom 20 to 12 in the gate’s engine configuration and the generated lock workflow. - Added a per-step “Turn Budget Allocation” table to guide investigation sequencing.
- Added explicit “Mandatory Stopping Criteria” to enforce early exits and a hard stop near the turn limit.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/design-decision-gate.md | Updates engine turn limit and adds turn budgeting + mandatory stopping criteria guidance for the agent. |
| .github/workflows/design-decision-gate.lock.yml | Regenerates the compiled workflow to reflect the new --max-turns 12 and related metadata. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 3
| | Read pre-fetched summary + gate check | 1 | `cat adr-prefetch-summary.json`; decide noop or proceed | | ||
| | Fetch PR details (only if needed) | 1 | `cat pr.json pr-files.json pr.diff` | | ||
| | ADR search (branch + PR body) | 1 | `find docs/adr`; inspect PR body links | |
| - **Noop exit**: `has_implementation_label` is `false` AND `requires_adr_by_default_volume` is `false` → call `noop` and **stop**. | ||
| - **ADR found, no divergence**: ADR contains all four required sections and the diff does not contradict the decision → call `add-comment` (approved) and **stop**. | ||
| - **ADR found, divergence**: Divergences identified → call `add-comment` (divergence list) and **stop**. | ||
| - **No ADR, decision inferable**: Draft ADR generated → call `push-to-pull-request-branch` + `add-comment` and **stop**. | ||
| - **No ADR, decision not inferable**: Decision cannot be inferred from PR evidence → call `add-comment` explaining what context is missing and **stop**. | ||
| - **Turn 11 reached**: If you are on turn 11 and have not yet called a safe output, emit the best available output immediately on turn 12 — do not start a new investigation step. Turn 12 is the hard limit enforced by the engine. |
| - **ADR found, divergence**: Divergences identified → call `add-comment` (divergence list) and **stop**. | ||
| - **No ADR, decision inferable**: Draft ADR generated → call `push-to-pull-request-branch` + `add-comment` and **stop**. | ||
| - **No ADR, decision not inferable**: Decision cannot be inferred from PR evidence → call `add-comment` explaining what context is missing and **stop**. | ||
| - **Turn 11 reached**: If you are on turn 11 and have not yet called a safe output, emit the best available output immediately on turn 12 — do not start a new investigation step. Turn 12 is the hard limit enforced by the engine. |
The Design Decision Gate was configured with
max-turns: 20but averaged only 7.1 turns — a 5× variance (4–20) that signals over-investigation on complex PRs with no hard stopping signal.Changes
max-turns: 20→max-turns: 12— tightens the engine-enforced ceiling while preserving headroom for complex ADR generation scenariosTurn Budget Allocation table — maps each step to a per-step turn cap (≤7 total), with turns 8–12 reserved for fallback, unexpected data gaps, or complex ADR generation:
Mandatory Stopping Criteria — six named exit conditions, each with a specific safe output to emit immediately: