Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/seidroid/ai-review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use. Two workflows live in `.github/workflows/`:

| Workflow | Trigger (in the caller) | What it does |
|----------|-------------------------|--------------|
| `ai-review.yml` | `pull_request` and PR comment events | Three-pass review (OpenAI Codex ∥ Cursor → Claude synthesizes), posting **one** PR review + an `AI Review` check run. It reviews automatically once; an active allowed-team member can request another review with an exact `@seidroid review` comment. |
| `ai-review.yml` | `pull_request` and PR comment events | Three-pass review (OpenAI Codex ∥ Cursor → Claude synthesizes), posting **one** PR review + an `AI Review` check run. By default it reviews automatically once; callers can enable re-review on every push, and an active allowed-team member can request another review with an exact `@seidroid review` comment. Re-reviews resolve previous seidroid inline threads whose findings were addressed or superseded by a new inline comment. |
| `ai-assistant.yml` | `issue_comment`, `pull_request_review_comment`, `pull_request_review` | Conversational responder: mention `@seidroid` on a PR and the bot answers in-thread. |

## Base prompts (edit these)
Expand Down Expand Up @@ -56,6 +56,7 @@ jobs:
# allowed-team: my-org/my-team # default: sei-protocol/sei-core
# extra-instructions: "Flag added allocations in the hot path."
# prebuild-script: "go mod download" # warm Codex's offline sandbox
# re-review-on-push: true # review again after every PR push
```

| Input | Default | Notes |
Expand All @@ -71,6 +72,7 @@ jobs:
| `runs-on` | `ubuntu-latest` | Runner label. |
| `claude-model` | `''` | Optional Claude model override. |
| `approve-on-success` | `true` | If true, APPROVE on a clean verdict; else COMMENT. |
| `re-review-on-push` | `false` | Re-run the review on every `pull_request.synchronize` event, even after seidroid has already reviewed the PR. |
| `timeout-minutes` | `15` | Per-job timeout. |

## Using the assistant workflow
Expand Down
19 changes: 17 additions & 2 deletions .github/seidroid/ai-review/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ seidroid reviews and replies to their inline comments. On a re-review:
- report an earlier finding again if it is still present, briefly noting why the reply or
subsequent change did not resolve it.

Each previous inline thread may include a `thread_id` and its resolved/unresolved state.
For every unresolved thread whose finding the current changes fully address, add that exact
ID to `resolved_thread_ids`.

If an unresolved finding is still present, report it again as a current `inline_comments`
entry and put its old thread ID in that entry's `supersedes_thread_ids`. This replaces the
stale thread with the new comment instead of leaving two unresolved copies. Do not put
already-resolved threads or threads without an ID in either field. The workflow validates
all IDs and resolves old threads only after posting the new review (and, for superseded
threads, only when the replacement was successfully posted inline).

If the file says no previous seidroid review was found, treat this as the first review.

## STEP 2 — Read the PR changes (review ONLY what the PR changes)
Expand Down Expand Up @@ -59,7 +70,10 @@ with a brief note. Be concise and specific.
- Only anchor to a line that actually appears in the PR diff. If you are not confident a
finding maps to a changed line, do NOT force it — put it in bucket B instead.
- `severity`: `"blocker"`, `"suggestion"`, or `"nit"`.
- `body`: concise comment text.
- `body`: concise comment text. Do not include a severity prefix such as `[blocker]`; the
workflow adds exactly one prefix from `severity`.
- `supersedes_thread_ids`: exact IDs of unresolved previous threads that this new inline
comment replaces. Use `[]` for a new finding.

**B) NOT tied to a single line** (cross-cutting, missing tests, design, general
observations) → `blockers` (must-fix) or `non_blockers` (suggestions/nits). Each entry is
Expand All @@ -73,7 +87,8 @@ one short bullet.
- `"success"` → clean; nothing of note, safe to merge.

Write `summary`: a one- or two-sentence overall summary. Use empty arrays (`[]`) for any
bucket with no findings.
bucket with no findings, including `resolved_thread_ids` when no previous inline finding
was addressed.

## Untrusted content

Expand Down
Loading