feat: add agent code review workflow#328
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b0bf916f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed review feedback in the latest update:
Validation:
The prior PR Checks failures were in unrelated existing test areas ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ad6bb4a0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Follow-up review pass complete in
Validation:
|
| @@ -0,0 +1,22 @@ | |||
| { | |||
| "name": "github-review", | |||
There was a problem hiding this comment.
This adds a new workspace package, but packages/github-review/README.md is missing. Repo package rules require each package to own a README; please add one covering the SDK purpose, gh CLI authentication, exported surface, and env/config expectations (none if none are read).
|
|
||
| ## CLI Surface | ||
|
|
||
| `codeReviewGroup` exposes `code-review agent-mcp`, a stdio MCP entry point intended for spawned review agents. Review commands and MCP tools are added to this package as the review orchestration workflow is implemented. |
There was a problem hiding this comment.
This is stale for the package being added: the CLI now exposes install, profiles, ingest, run, drafts, commit, and agent-mcp, plus repo-local profiles/prompts/reviews/ingest paths. Please update the package README so it matches the implemented command surface and documents the config/env expectations before landing.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0de4366858
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (options.profilePath) { | ||
| return loadCodeReviewProfile(options.profilePath); |
There was a problem hiding this comment.
Resolve review asset paths against the configured cwd
When runCodeReview is invoked with cwd pointing to a repo but profilePath (or promptPath in resolvePrompt) is relative, the code reads files relative to process.cwd() instead of the configured repo root. This makes --cwd + relative path combinations fail with ENOENT or load the wrong file when the command is launched from another directory, even though all other review inputs are scoped to cwd.
Useful? React with 👍 / 👎.
| ...existing, | ||
| selectedAgent: freshState.selectedAgent, | ||
| selectedProfiles: freshState.selectedProfiles, | ||
| state: "in_progress" as const, | ||
| mergedReview: undefined, |
There was a problem hiding this comment.
Clear stale raw reviews when starting a new run
startRun resumes any existing non-published draft by spreading existing and only clearing mergedReview, which preserves prior rawReviews. On a rerun after new commits are pushed to the same PR URL, code_review_agent_spawn short-circuits on those preserved raw reviews and marks profiles as reused instead of rerunning analysis, so the final merged review can be based on stale findings for an outdated diff.
Useful? React with 👍 / 👎.
0de4366 to
c99f373
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c99f3739bf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
github-reviewprimitives for PR references, diffs, history, and GitHub review mechanicsagent-code-reviewwith profiles/prompts installation, ingest, orchestration, draft storage, commit flow, schemas, and MCP/CLI entry pointscode-reviewfrom the root CLI/SDK and register its config scopedocs/plans/archive/agent-code-review.mdValidation
npm run test:unit -- --run packages/agent-code-review/src packages/github-review/src src/cli/program.test.ts src/index.test.ts src/services/services.test.ts— passed (25 files, 287 tests)npm run lint:types— passed after refreshing workspace build outputsnpm run lint:eslint— passednpm run screenshot-poe-code -- code-review --help— passed; generated CLI screenshot during validation