Context: we've integrated ocr into "devloop"
devloop is an agent plugin (Claude Code today) for an aggregate-workspace dev loop — a state bus + hard guards that drive enter → develop → commit/MR → human merge. We've wired ocr in as a lifecycle hook: when an MR is created, a background
ocr review --from origin/<target> --to HEAD --format json --repo <repo>
runs (fire-and-forget, doesn't block commit), and we post the result as an MR comment (so each MR accumulates a review history) plus surface it back to the agent session. ocr keeps its own LLM config; this has worked really well — thank you for the tool. 🙏
We're now focused on review accuracy, and the main lever is giving ocr more context. We already auto-pass --background (commit messages + MR title/description). Two further context sources would help a lot but need ocr-side support:
1. Auto-include the repo's AGENTS.md as review context
Many repos keep their conventions / architecture in an AGENTS.md (commonly at the repo root, or server/AGENTS.md / backend/AGENTS.md). These are exactly the "house rules" a reviewer must know: layering boundaries, mandatory timeouts/connection-pool config, SQL-dialect portability, naming, etc.
Request: if ocr detects an AGENTS.md in the repo (or the resolved code dir), automatically include its content as review context (alongside --background / rules), ideally with a sensible cap or summary.
Today we can stuff it into --background, but that's per-file and token-heavy, and not first-class. Native support — e.g. auto-detect AGENTS.md, or a config like context_files — would be cleaner and benefit everyone, not just our integration.
2. Spec-aware review via a spec ↔ file mapping
ocr's pipeline today is diff → changed files → per-file review. A big accuracy win would be: for each changed file, also feed the spec(s) that file implements, so the review can ask "does this change still satisfy the spec / requirement?" — not only "is this code locally OK?".
This needs two things:
- A spec format/ruleset (requirements + scenarios, or a pointer to spec files).
- A declared spec ↔ file mapping — which spec governs which files/paths — analogous to how
.opencodereview/rule.json maps path globs → rules. For example a path-glob → spec-file(s) mapping, and ocr includes the matched specs as context for those files.
This would make ocr requirement-aware, a step beyond purely code-local review — and pairs naturally with spec-driven workflows.
Happy to discuss design and contribute a PR for either if you're open to it. Thanks again for ocr!
Context: we've integrated
ocrinto "devloop"devloop is an agent plugin (Claude Code today) for an aggregate-workspace dev loop — a state bus + hard guards that drive
enter → develop → commit/MR → human merge. We've wiredocrin as a lifecycle hook: when an MR is created, a backgroundruns (fire-and-forget, doesn't block commit), and we post the result as an MR comment (so each MR accumulates a review history) plus surface it back to the agent session.
ocrkeeps its own LLM config; this has worked really well — thank you for the tool. 🙏We're now focused on review accuracy, and the main lever is giving
ocrmore context. We already auto-pass--background(commit messages + MR title/description). Two further context sources would help a lot but needocr-side support:1. Auto-include the repo's
AGENTS.mdas review contextMany repos keep their conventions / architecture in an
AGENTS.md(commonly at the repo root, orserver/AGENTS.md/backend/AGENTS.md). These are exactly the "house rules" a reviewer must know: layering boundaries, mandatory timeouts/connection-pool config, SQL-dialect portability, naming, etc.Request: if
ocrdetects anAGENTS.mdin the repo (or the resolved code dir), automatically include its content as review context (alongside--background/ rules), ideally with a sensible cap or summary.Today we can stuff it into
--background, but that's per-file and token-heavy, and not first-class. Native support — e.g. auto-detectAGENTS.md, or a config likecontext_files— would be cleaner and benefit everyone, not just our integration.2. Spec-aware review via a spec ↔ file mapping
ocr's pipeline today isdiff → changed files → per-file review. A big accuracy win would be: for each changed file, also feed the spec(s) that file implements, so the review can ask "does this change still satisfy the spec / requirement?" — not only "is this code locally OK?".This needs two things:
.opencodereview/rule.jsonmaps path globs → rules. For example a path-glob → spec-file(s) mapping, andocrincludes the matched specs as context for those files.This would make
ocrrequirement-aware, a step beyond purely code-local review — and pairs naturally with spec-driven workflows.Happy to discuss design and contribute a PR for either if you're open to it. Thanks again for
ocr!