Skip to content

feat(skill): add PR review skill with per-repo context support#262

Open
vishesh-orkes wants to merge 5 commits into
mainfrom
feat/pr-review-skill
Open

feat(skill): add PR review skill with per-repo context support#262
vishesh-orkes wants to merge 5 commits into
mainfrom
feat/pr-review-skill

Conversation

@vishesh-orkes

Copy link
Copy Markdown

Adds a fully self-contained pr-reviewer skill that runs on every PR via GitHub Actions. Reviews against 8 criteria (Logic, Quality, Security, Scope, Tests, Performance, Error Handling, Observability) using a single token-bounded bundle call instead of multiple round-trips.

Key design decisions:

  • get_pr_review_bundle: scores + selects top 4 highest-risk files, compact diffs capped at 16k chars total (vs 400k+ in naive approach)
  • Hard tool budget of 2 calls (bundle + optional grep for verification)
  • Per-repo context via .agentspan/pr-review-context.md — injected into every bundle so the agent knows repo-specific patterns and gotchas
  • ADDED file detection: inline warning prevents agent from grepping brand-new files that don't exist on disk yet
  • Execution limits (max_turns, max_tokens, timeout_seconds) now flow correctly from Python Agent → serialized config → Java SkillNormalizer

Adds a fully self-contained pr-reviewer skill that runs on every PR via
GitHub Actions. Reviews against 8 criteria (Logic, Quality, Security,
Scope, Tests, Performance, Error Handling, Observability) using a single
token-bounded bundle call instead of multiple round-trips.

Key design decisions:
- get_pr_review_bundle: scores + selects top 4 highest-risk files,
  compact diffs capped at 16k chars total (vs 400k+ in naive approach)
- Hard tool budget of 2 calls (bundle + optional grep for verification)
- Per-repo context via .agentspan/pr-review-context.md — injected into
  every bundle so the agent knows repo-specific patterns and gotchas
- ADDED file detection: inline warning prevents agent from grepping
  brand-new files that don't exist on disk yet
- Execution limits (max_turns, max_tokens, timeout_seconds) now flow
  correctly from Python Agent → serialized config → Java SkillNormalizer

raw_config = agent_obj._framework_config
raw_config = dict(agent_obj._framework_config)
raw_config["maxTurns"] = getattr(agent_obj, "max_turns", 25)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should not be here or part of this PR

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

okay

@v1r3n v1r3n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the example change should not have any changes to the core sdk

@vishesh-orkes

Copy link
Copy Markdown
Author

the example change should not have any changes to the core sdk

okay

@vishesh-orkes vishesh-orkes marked this pull request as ready for review May 21, 2026 12:25
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