Skip to content

feat(review-reviewers): outcome-focused analysis with Haiku subagents - #255

Merged
max-sixty merged 2 commits into
mainfrom
review-reviewers-cost
Apr 12, 2026
Merged

max-sixty merged 2 commits into
mainfrom
review-reviewers-cost

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Restructures the review-reviewers skill to reduce cost by checking public outcomes before downloading session logs, and delegating token-heavy exploration to Haiku subagents.

The current skill downloads and parses full session JSONL for every run across 3 repos hourly — $180/day at API list prices. Most of that cost is cache-read tokens accumulating across ~120 turns of mechanical work (artifact download, JSONL parsing, tracking-issue reading, CI polling) that finds nothing actionable in ~90% of sessions.

Outcomes over internals. Instead of tracing internal session decision chains, check the bot's public outputs: was the review accepted? Was the issue reopened? Was the comment corrupted? Only escalate to session-log inspection when outcomes look wrong. This cuts most sessions from ~120 turns to ~15.

Haiku subagents for exploration. The main Opus agent handles judgment (gate evaluation, structural-vs-stochastic classification, PR drafting). Token-heavy exploration — surveying outcomes across all runs, downloading and parsing session logs for concerning runs — is delegated to Haiku subagents via Agent with model: "haiku".

No CI polling. After creating a fix PR, exit immediately. tend-review and tend-ci-fix handle the PR independently — review-reviewers polling CI was redundant work that added ~30 turns to expensive sessions.

Other changes: BOT_LOGIN resolved upfront (previously unresolved placeholders), repo-specific guidance loaded in Step 1 before outcome evaluation, JSONL parsing commands inlined in subagent prompts (no dependency on skill loading), $GITHUB_STEP_SUMMARY output, sanity check for false "all clear" when zero bot activity found.

This was written by Claude Code on behalf of Maximilian Roos

Restructure the review-reviewers skill to reduce cost by checking public outcomes (was the bot's review accepted? was the issue reopened? was the comment corrupted?) before downloading session logs. Delegate token-heavy exploration to Haiku subagents while keeping Opus for judgment and PR drafting.

Key changes:
- Outcomes over internals: check PR/issue state via `gh api` instead of parsing every session JSONL
- Haiku subagents for exploration: survey outcomes (Step 2) and investigate session logs (Step 3) via `Agent` with `model: "haiku"`
- No CI polling: exit after PR creation, let tend-review/tend-ci-fix handle async
- Repo guidance loaded upfront in Step 1 with resolved BOT_LOGIN
- Inline JSONL parsing commands in subagent prompts (no dependency on skill loading)

Co-Authored-By: Claude <[email protected]>

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small finding: the Step 2 early-exit points at the wrong step number. "Step 5" is "Act on findings"; the intended short-circuit target (and the parenthetical "summary") is Step 6.

Step 2 said "skip to Step 5 (summary)" but the summary is Step 6.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 4404ab4 into main Apr 12, 2026
5 checks passed
@max-sixty
max-sixty deleted the review-reviewers-cost branch April 12, 2026 00:42
max-sixty added a commit that referenced this pull request Apr 14, 2026
Bumps generator version to 0.0.12 and syncs lockfile.

50 commits since 0.0.11: notifications cost cut + freshness gate (#251, #254),
token-report per-run table and cost estimate (#249, #250), review-reviewers
outcome-focused Haiku analysis (#255), config workflow_extra/jobs pass-through
(#227), canonical author_association tiers across skills (#261, #263), action
token aggregation fix (#266), plus numerous review/mention/ci-runner fixes.

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty mentioned this pull request Apr 14, 2026
max-sixty added a commit that referenced this pull request Apr 14, 2026
Bumps generator version to 0.0.12 and syncs lockfile.

50 commits since 0.0.11. Highlights:
- feat: notifications cost cut + freshness gate (#251, #254)
- feat: token-report per-run table + cost estimate (#249, #250)
- feat: review-reviewers outcome-focused Haiku analysis (#255)
- feat: config `workflow_extra` / `jobs` pass-through (#227)
- skills: canonical `author_association` tiers (#261, #263)
- fix: action token aggregation (#266), plus numerous
review/mention/ci-runner fixes

> _This was written by Claude Code on behalf of Maximilian_

Co-authored-by: Claude <[email protected]>
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