Skip to content

Add PR reviewer TaskSpawner for automated code review#413

Closed
axon-agent[bot] wants to merge 1 commit intomainfrom
axon-fake-strategist-20260222-1200
Closed

Add PR reviewer TaskSpawner for automated code review#413
axon-agent[bot] wants to merge 1 commit intomainfrom
axon-fake-strategist-20260222-1200

Conversation

@axon-agent
Copy link

@axon-agent axon-agent bot commented Feb 22, 2026

Summary

  • Add self-development/axon-pr-reviewer.yaml — a new TaskSpawner that automatically reviews pull requests, directly addressing Replace cubic-dev-ai app #408 (replacing cubic-dev-ai)
  • Update self-development/README.md to document the new spawner and its review cycle
  • First self-development spawner to use types: ["pulls"], demonstrating PR-driven automation

Motivation

Issue #408 identifies the need to replace the third-party cubic-dev-ai PR review bot with Axon's own capabilities. The existing TaskSpawner infrastructure already supports types: ["pulls"] for discovering PRs, but no self-development config existed to leverage this. This PR fills that gap with a production-ready PR reviewer.

Design decisions

Decision Rationale
Sonnet model Reviews are read-heavy analysis, not code generation — Sonnet provides good quality at lower cost
ok-to-test label filter Scopes reviews to PRs the team has opted into, prevents reviewing draft or WIP PRs
30-minute TTL Allows the spawner to re-discover and re-review PRs when new commits are pushed
3-minute poll interval Faster feedback loop than the default 5m, since PR review latency matters
Idempotency via commit SHA The prompt instructs the agent to check for existing reviews and skip if no new commits — prevents duplicate reviews
Read-only The reviewer never pushes code or modifies the PR branch — it only posts reviews

How it works

  1. A PR is opened and labeled ok-to-test
  2. The spawner discovers the PR and creates a review Task (axon-pr-reviewer-<PR#>)
  3. The agent checks out the PR branch, reads the full diff, runs make verify and make test
  4. The agent posts a structured review (APPROVE/REQUEST_CHANGES/COMMENT) via the GitHub API
  5. The Task completes and is cleaned up after 30 minutes
  6. If the PR is updated with new commits, the spawner creates a new review Task on the next poll

Test plan

  • Deploy the TaskSpawner to a test cluster
  • Open a PR with the ok-to-test label and verify a review Task is created
  • Verify the agent posts a review comment on the PR
  • Push a new commit to the PR and verify a re-review occurs after TTL cleanup
  • Verify PRs without ok-to-test are not reviewed

Closes #408

🤖 Generated with Claude Code


Summary by cubic

Adds a TaskSpawner that automatically reviews PRs labeled ok-to-test, replacing the cubic-dev-ai bot and moving reviews in-house. Speeds up feedback with a 3-minute poll and PR-driven automation.

  • New Features
    • New self-development/axon-pr-reviewer.yaml using types: ["pulls"] with ok-to-test label filter.
    • Checks out the PR, reads the full diff, runs make verify and make test.
    • Posts structured GitHub reviews (APPROVE, REQUEST_CHANGES, COMMENT).
    • Idempotent via commit SHA; 30-minute TTL enables re-review on new commits.
    • Read-only reviewer; never pushes code. Docs updated with deploy and review cycle.

Written for commit eb9c023. Summary will update on new commits.

Add axon-pr-reviewer.yaml to self-development/, providing automated
PR code review using the existing types: ["pulls"] capability. This
addresses the need to replace third-party PR review bots (cubic-dev-ai)
with Axon's own infrastructure.

The reviewer polls for open PRs labeled ok-to-test, checks out the PR
branch, reads the full diff, runs make verify and make test, and posts
a structured review via the GitHub API. It uses Sonnet for cost
efficiency and includes idempotency guards to skip re-reviewing
unchanged PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@gjkim42
Copy link
Collaborator

gjkim42 commented Feb 23, 2026

closed in favor of #409

@gjkim42 gjkim42 closed this Feb 23, 2026
@gjkim42 gjkim42 deleted the axon-fake-strategist-20260222-1200 branch February 23, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace cubic-dev-ai app

1 participant