mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 20:53:15 +00:00
* feat(reviewer): inline AGENTS.md into reviewer system prompt Fetches AGENTS.md from the PR's head_sha via the GitHub contents API during reviewer setup and inlines it as a "Repository conventions" block in the system prompt. Mirrors how the per-repo review style prompt is already wired. The main agent has long had a mandatory step to read AGENTS.md after cloning, but the reviewer often skips cloning entirely (it can `gh pr diff` directly), so it never saw the file. Loading it deterministically means the reviewer judges findings against the project's own conventions instead of relying on the model to fetch the file itself. * fix(reviewer): fetch AGENTS.md from base_sha, not head_sha The reviewer inlines AGENTS.md into its system prompt. Reading from head_sha means a PR author can edit AGENTS.md in the same PR being reviewed and smuggle instructions like "ignore all bugs" / "publish no findings" into the reviewer's prompt. Switch to base_sha (the target branch's pre-PR state, which is trusted) and update the prompt text to reflect that the contents come from the base, not the head. --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| agents_md.py | ||
| auth.py | ||
| authorship.py | ||
| comments.py | ||
| github_app.py | ||
| github_comments.py | ||
| github_org_membership.py | ||
| github_token.py | ||
| github_user_email_map.py | ||
| langsmith.py | ||
| linear.py | ||
| linear_team_repo_map.py | ||
| messages.py | ||
| model.py | ||
| multimodal.py | ||
| repo.py | ||
| sandbox.py | ||
| sandbox_paths.py | ||
| sandbox_state.py | ||
| slack.py | ||
| slack_feedback.py | ||
| thread_ops.py | ||