open-code-review AGENTS.md

A set of contributor instructions for the open-code-review project, an AI-assisted code review command-line tool written in Go. It covers commits, file headers, line endings, language, formatting, and project checks.

In plain words
What is it for?
Use it when changing the project's Go, shell, JavaScript, TypeScript, or related source files, preparing commits, adding license headers, or running the required checks.
Why use it?
It gives contributors the repository's required practices before they commit code. Following it helps avoid failed checks caused by formatting, licensing, language, or line-ending problems.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/alibaba/open-code-review/agents-md
Clone the repo
git clone --depth 1 https://github.com/alibaba/open-code-review

Made for: Codex, OpenCode.

Per session 774 This file is loaded in full into every session.
When invoked 774 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00774 $0.00774
Opus 5 $0.00387 $0.00387
Sonnet 5 $0.00155 $0.00155
Haiku 4.5 $0.00077 $0.00077

Measured 2d ago against content hash a2b211cc987a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

open-code-review AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 43 lines

How it starts

The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Guidelines for open-code-review

This file provides instructions for AI coding assistants working on this project.

Project Overview

open-code-review (ocr) is an AI-powered code review CLI tool written in Go (module: github.com/alibaba/open-code-review).

Git Commit Notes

  • Before committing, conduct a code review by running:
    ocr review --audience agent --background "briefly summarize the background requirements"
    
  • Commit messages must be written in English.
  • Verify line endings. Line endings must be LF, not CRLF. Run git add --renormalize . to correct line endings and commit them. New binary files must have their extensions added to .gitattributes.

License Headers

  • Every source file (.go, .sh, .js, .mjs, .ts, .tsx) must have an SPDX license header.
  • After creating new files, run make license-add to add the header automatically.

Code Style

  • After writing code, run make check. It formats and tidies in place, so there is no need to run gofmt or go vet separately.
  • Source files are written in English — comments, identifiers and strings alike. make english-check enforces this in CI. It flags any letter outside ASCII, whichever the writing system (Han, kana, Hangul, Cyrillic, and equally the diacritics that spell German or Vietnamese), plus combining accents and fullwidth punctuation (, ), which is easy to leave behind in an otherwise English sentence. Symbols and emoji (─ → ≥ ✅) pass, since they are not letters. Prose spelled entirely in ASCII (Loeschen der Datei, or a romanised transcription) takes a dictionary to spot and stays a matter for review.
  • Translated prose has its own homes, none of them scanned. README.<locale>.md and CONTRIBUTING.<locale>.md (zh-CN, ja-JP, ko-KR, ru-RU); the doc pages under pages/src/content/docs/<locale>/ (en, zh, ja, ru, Markdown throughout); and the UI copy tables in pages/src/i18n/<locale>.ts. Markdown is out of scope by extension, so translations go there freely. The i18n tables are .ts and would be scanned, so they are exempt by prefix instead — translated UI strings belong in those tables rather than inline in a component.
  • Two escape hatches for the exceptional case, narrower one preferred. Append an allow-non-english: <reason> marker comment to the offending line — the right choice for a handful of lines, such as an encoding fixture or a language-switcher label, and it leaves the rest of the file protected. Only for a whole tree that is inherently non-English, add a prefix to allowedPrefixes in scripts/verify-english-only.go; it currently holds just pages/src/i18n/ and extensions/vscode/, the latter temporary until the extension's Chinese comments are translated.

Read the full file on GitHub · 43 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 43 lines · 774 tokens per session scan A a2b211cc987a

Subscribe to this mod's changes

open-code-review AGENTS.md is an instructions file published in the GitHub repository alibaba/open-code-review (21,659 stars, last pushed 4d ago), licensed Apache-2.0. It adds 774 tokens to every session, about $0.0039 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.