Skip to content

fix(review-cycle): optimize Greptile review cycle + add Approach 3 fallback + interview routing fix#330

Merged
MScottAdams merged 2 commits intomasterfrom
agent1/fix/305-307-328-301-review-cycle-optimization
Apr 13, 2026
Merged

fix(review-cycle): optimize Greptile review cycle + add Approach 3 fallback + interview routing fix#330
MScottAdams merged 2 commits intomasterfrom
agent1/fix/305-307-328-301-review-cycle-optimization

Conversation

@MScottAdams
Copy link
Copy Markdown
Collaborator

Summary

Optimize Greptile review cycle and fix 3 related issues in one PR.

Closes #305, #307, #328, #301

Changes

Task A: Greptile review cycle optimization (#305, t1.30.1) -- 5 changes

  1. Mandate deft-pre-pr before PR creation -- upgraded AGENTS.md rule from ~ to ! + added Phase 1 verification gate in deft-review-cycle
  2. PR scope gate warning -- Phase 1 warns when PRs span 3+ unrelated surfaces
  3. Adaptive poll cadence -- 20-30s first check, 60s second, 90s thereafter (replaces fixed 60s)
  4. Parallel rebase + review monitoring -- guidance in deft-swarm Phase 6 for overlapping work via start_agent sub-agents
  5. .greptile/rules.md starter template -- elevated to SHOULD in tools/greptile.md

Task B: Approach 3 interactive blocking fallback (#307, t1.31.1)

  • Added Approach 3 as last-resort blocking sleep loop for interactive sessions with no start_agent and no timer
  • Gated by ! rule requiring user warning before activation
  • Updated capability detection to 3 tiers: Tier 1 (start_agent), Tier 2 (scheduler/timer), Tier 3 (interactive blocking)

Task C: Select-String fallback for oversized output (#328, t1.32.1)

  • Added ~ fallback command to deft-review-cycle Phase 2 Step 1 for when do_not_summarize_output produces output too large to process
  • Windows/PowerShell context: gh pr view <number> --comments | Select-String "Outside Diff" -Context 50

Task D: Tighten deft-interview routing keyword (#301, t1.26.1)

  • Replaced bare interview in AGENTS.md Skill Routing with interview loop / q&a loop / run interview loop
  • Avoids collision with strategies/interview.md spec-creation intent

Checklist

  • /deft:change <name> -- N/A (bundled swarm task, all changes trace to spec tasks)
  • CHANGELOG.md -- added entries under [Unreleased]
  • ROADMAP.md -- N/A (updated at release time)
  • Tests pass locally (task check: 1053 passed, 2 xfailed)

Post-Merge

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 13, 2026

Greptile Summary

This PR addresses four independent issues in one bundle: (1) mandating deft-pre-pr before PR creation, adding PR scope gate and adaptive poll cadence to the review cycle, and a .greptile/rules.md starter template; (2) adding Approach 3 as a last-resort blocking sleep loop for interactive sessions; (3) a cross-platform oversized-output fallback in Phase 2 Step 1; (4) tightening the interview routing keyword. All four spec tasks (t1.30.1, t1.31.1, t1.32.1, t1.26.1) satisfy their acceptance criteria, and the previous Approach 2 timing-conflict finding has been addressed with the clarifying note at line 157.

Confidence Score: 5/5

Safe to merge — all spec criteria are satisfied, the previous Approach 2 timing concern is resolved, and only two minor documentation gaps remain (P2).

All four spec tasks (t1.30.1, t1.31.1, t1.32.1, t1.26.1) fully satisfy their acceptance criteria. The only findings are a CHANGELOG entry that omits the Unix fallback and a matching gap in the t1.32.1 spec criterion — both P2 documentation issues that don't affect runtime behaviour.

CHANGELOG.md and SPECIFICATION.md (t1.32.1 criterion) — minor documentation gaps around the Unix/macOS grep fallback; no functional files require special attention.

Important Files Changed

Filename Overview
skills/deft-review-cycle/SKILL.md Adds Approach 3 blocking fallback with user-warning gate, 3-tier capability detection, adaptive cadence, PR scope gate, cross-platform oversized-output fallback, and pre-PR verification gate — all acceptance criteria met and internally consistent.
skills/deft-swarm/SKILL.md Adds parallel rebase + review monitoring guidance in Phase 6 via start_agent sub-agents; intentionally omits Approach 3 from the swarm context (correct — blocking loops are not appropriate for swarm monitors).
AGENTS.md Upgrades pre-PR rule from ~ to !, and tightens interview routing to interview loop / q&a loop / run interview loop — both changes match spec criteria exactly.
tools/greptile.md Elevates .greptile/rules.md from optional (?) to SHOULD (~) and adds a starter template — straightforward documentation improvement.
CHANGELOG.md Entries present for all four issues; Task C entry describes only the Windows/PowerShell fallback but the implementation also ships a Unix/macOS grep fallback — minor scope understatement.
SPECIFICATION.md All four spec tasks marked [completed] with appropriate acceptance criteria; t1.32.1 criterion only verifies the PowerShell fallback but the implementation also added a Unix fallback — no functional issue.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Review Monitoring triggered] --> B{start_agent available?}
    B -- Yes --> C[Tier 1: Approach 1\nSpawn sub-agent monitor\n20-30s / 60s / 90s cadence]
    B -- No --> D{scheduler / timer /\nauto-reinvocation available?}
    D -- Yes --> E[Tier 2: Approach 2\nYield-between-polls\nRuntime-controlled ~60s interval]
    D -- No --> F{Interactive session?}
    F -- Yes --> G[Tier 3: Approach 3\nWarn user → get confirmation\nBlocking sleep loop\n25s / 60s / 90s cadence]
    F -- No --> H[No monitoring path available\nDocument and escalate]
    C --> I{Exit condition met?\nconfidence > 3, no P0/P1}
    E --> I
    G --> I
    I -- No --> J[Wait and re-poll]
    J --> I
    I -- Yes --> K[Proceed to Step 5]
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 13

Comment:
**CHANGELOG entry understates Task C scope**

The entry says "(Windows/PowerShell context)" but `SKILL.md` also ships a Unix/macOS `grep` fallback alongside the `Select-String` one. A reader scanning the CHANGELOG for the Unix fallback won't find a reference to it.

```suggestion
- **Select-String fallback for oversized gh pr view output** (#328, t1.32.1): Added ~ fallback commands to deft-review-cycle Phase 2 Step 1 for when do_not_summarize_output produces output too large to process — PowerShell (`Select-String "Outside Diff" -Context 50`) and Unix/macOS (`grep -A 50 "Outside Diff"`)
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: SPECIFICATION.md
Line: 1257-1259

Comment:
**t1.32.1 acceptance criteria only verify the PowerShell fallback**

The implementation added both a PowerShell (`Select-String`) and a Unix/macOS (`grep -A 50`) fallback, but the spec only verifies the PowerShell command and notes "Windows/PowerShell context". The Unix fallback is real behaviour with no spec coverage.

```suggestion
- skills/deft-review-cycle/SKILL.md Phase 2 Step 1 contains ~ fallback guidance for oversized output with two platform variants: PowerShell: `gh pr view <number> --comments | Select-String "Outside Diff" -Context 50`; Unix/macOS: `gh pr view <number> --comments | grep -A 50 "Outside Diff"`
- Fallback is positioned after the `do_not_summarize_output: true` rule
- Guidance labels each variant by platform (PowerShell/Windows vs Unix/macOS)
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (3): Last reviewed commit: "fix: address Greptile review findings (b..." | Re-trigger Greptile

Comment thread skills/deft-review-cycle/SKILL.md Outdated
…llback + interview routing fix

Closes #305, #307, #328, #301

- Mandate deft-pre-pr before PR creation (AGENTS.md ! rule + Phase 1 gate)
- Add PR scope gate warning for 3+ unrelated surfaces
- Adaptive poll cadence (20-30s/60s/90s replacing fixed 60s)
- Parallel rebase + review monitoring guidance in deft-swarm Phase 6
- .greptile/rules.md starter template elevated to SHOULD
- Approach 3 interactive blocking fallback with user warning gate
- Select-String fallback for oversized gh pr view output
- Tighten deft-interview routing keyword (interview loop / q&a loop)
- Scope Approach 2 adaptive cadence note to clarify yield-mode limitation
- Add Unix/macOS grep equivalent for Select-String fallback
- Update stale ~60s cadence reference in deft-swarm to adaptive cadence
@MScottAdams MScottAdams force-pushed the agent1/fix/305-307-328-301-review-cycle-optimization branch from c18a7f0 to d762df3 Compare April 13, 2026 16:23
@MScottAdams
Copy link
Copy Markdown
Collaborator Author

Rebase-only force-push onto updated master (after PR #329 merge). Only CHANGELOG.md conflict resolved -- merged both PRs' [Unreleased] entries. No logic changes.

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.

perf(review-cycle): Greptile reviews are slow — investigation + optimization plan

1 participant