river-review
AGENTS.md4 starsChanged 6 months agoMITView on GitHub
Canonical instructions for all AI coding agents in this repository. Tool-specific files (CLAUDE.md, GEMINI.md, .codex/, copilot-instructions.md) contain only tool-specific policy and point here for repo-wide rules. If a rule applies to all tools, it belongs in this file.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository140 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- static/llms.txtllms.txt
- ask-codexSkill
- river-review-disciplineSkill
- skill-creatorSkill
- skill-ops-plannerSkill
- skill-optimizerSkill
- commandsSkill
- adversarial-reviewSkill
- review-teamSkill
- river-review-architectureSkill
- river-review-codeSkill
- river-review-docsSkill
- river-review-frontendSkill
- river-review-performanceSkill
- river-review-security-auditSkill
- river-review-securitySkill
- river-reviewSkill
- river-review-testingSkill
- unknown-coverage-reviewSkill
- Coverage and Failure Path GapsSkill
- Flaky Test Risk CheckSkill
- GitHub Actions Workflow Security ReviewSkill
- Standard Review Policy for DownstreamSkill
- Test Assertion Effectiveness 常に PASS するテストの検出Skill
- Test Presence for Changed CodeSkill
- Test Naming and StructureSkill
- テスト観点レビュー(差分ドリブン)Skill
- a11y Accessible Name BasicsSkill
- Agent Skill Bridge ReviewSkill
- Altitude Generalization GuardSkill
- API Compatibility and Test Gap ReviewSkill
- Assumption Resolution Trace Plan の前提解消トレーサビリティSkill
- Async Correctness 非同期処理の正しさ検証Skill
- Behavior-Structure Separation 振る舞い変更と構造変更の分離・外部挙動維持Skill
- Closure Scope Retention GuardSkill
- Component Variants / States Documentation コンポーネント状態の文書化Skill
- Configuration File ReviewSkill
- Cross-File Leakage リファクタ後の caller 側残骸検出Skill
- Design Source-of-Truth Conformance デザイン定義準拠Skill
- Design System Component Reuse GuardSkill
- Design Token EnforcementSkill
- Detector Detection Power 検査器の検出力の検証Skill
- Documentation Hygiene ドキュメント衛生Skill
- End-to-End Wiring 末端到達・貫通の検証Skill
- Existing-Pattern Conformance 既存パターン準拠の確認Skill
- Firebase Security Rules ReviewSkill
- Fix Scope Integrity 指摘対応ループのスコープ逸脱・前提破壊検出Skill
- GitHubレビューコメント対応(修正案つき)Skill
- Hallucinated Reference 幻覚的参照の実在確認Skill
- Hello Skill (Always-On Sample)Skill
- i18n Unused Key ReviewSkill
- Impact Evidence Coverage 影響・失敗系・外部依存の証拠充足Skill
- Independent Review SynthesisSkill
- Invisible Unicode Injection Scan 不可視 Unicode コード注入検出Skill
- Knowledge-to-Code Alignment 新知識のコード反映・設計知識の保全Skill
- Laravel Eloquent N+1 and Query Efficiency ReviewSkill
- Laravel Mass Assignment and Authorization ReviewSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 12 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 7
If a rule applies to all tools, it belongs in this file.
- Very specific: line 43
Do not read or commit .env*, secrets/, *.pem, or *.key.
- Very specific: line 44
Do not make direct network calls (curl, wget, fetch) from scripts or code.
- Very specific: line 46
Do not hand-edit package-lock.json.
- Distinctive: line 47
Do not push directly to main or to already-merged PR branches.
- Distinctive: line 48
Do not omit timeout and exception handling in code that calls external APIs.
- Distinctive: line 59
Run the applicable checks before handoff.
- Distinctive: line 75
Keep each change small and cohesive.
- Very specific: line 76
If src/ changes, confirm schema and skill alignment first.
- Distinctive: line 77
Run the verification criteria above before handoff.
- Distinctive: line 78
Prefer existing patterns over new conventions.
- Distinctive: line 86
Before merging a new rule (Stop conditions, severity policy, naming convention, etc.), answer:
- Distinctive: line 92
If any answer is "I don't know," defer the rule until the gap is filled.
- Distinctive: line 96
Before merging GitHub Actions workflows, shell scripts, or any CI automation, verify:
- Distinctive: line 99
Default coupling: do hard-coded defaults (branch names, package names, paths) silently break when an upstream config changes?
- Distinctive: line 113
Use English or Japanese skill searches when locating repo conventions.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md—River Review
Scope
Canonical instructions for all AI coding agents in this repository.
Tool-specific files (CLAUDE.md, GEMINI.md, .codex/, copilot-instructions.md) contain only tool-specific policy and point here for repo-wide rules.
If a rule applies to all tools, it belongs in this file.
Repository Map
| Directory | Purpose |
skills/ | Core review skills and registry content |
skills/agent-skills/ | Packaged agent skills (SKILL.md + references/) |
src/ | Runtime, CLI, and runner logic |
tests/ | Node.js test suites |
pages/ | Public docs; Japanese content is the source of truth |
docs/ | Internal notes and runbooks; ask before editing |
runners/github-action/ | GitHub Action runner implementation |
runners/node-api/ | Separate TypeScript package (built with tsc) |
schemas/ | JSON schemas for skills, output, and riverbed |
scripts/ | Validation, evaluation, and build scripts |
Package Manager
Use npm.
| Task | Command |
| Install | npm install or npm ci |
| Lint | npm run lint |
| Test | npm test |
| Skills validation | npm run skills:validate |
| Agent skills validation | npm run agent-skills:validate |
| Agent definitions | npm run agents:validate |
| Local link check | npm run check:links:local |
| Docs dev server | npm run dev |
| Docs build | npm run build |
| TypeScript check | npm run build in runners/node-api/ (no root typecheck script) |
Safety
- Do not read or commit
.env*,secrets/,*.pem, or*.key. - Do not make direct network calls (curl, wget, fetch) from scripts or code. Allowed CLI tools like
ghare exempt. - Do not use destructive commands. The ban covers any command you run that rewrites already-pushed branch history (
git push --force/-f,git push --force-with-lease) or discards work (rm -rf,git reset --hard,git stash drop, etc.).--force-with-leaseis not a safe-force exception, and no role is exempt—organizer and worker alike. Take the remote in withgit merge/git merge --ff-onlyand push a fast-forward instead; if history still looks like it must be rewritten, stop and escalate. Out of scope: the release automation's force-update of the moving major tag (git push --force origin "refs/tags/${MAJOR_TAG}"in.github/workflows/release-please.yml), which retargets a tag and rewrites no branch history. That exemption belongs to the workflow and is never a licence for an agent to force-push. - Do not hand-edit
package-lock.json. - Do not push directly to
mainor to already-merged PR branches. If fixes are needed after merge, create a new branch and new PR. - Do not omit timeout and exception handling in code that calls external APIs.
Edit Scope
- Editable:
pages/,skills/,schemas/,scripts/,tests/,.github/,.claude/,AGENT_LEARNINGS.md - Ask before editing:
docs/,assets/,src/,runners/,README.md,README.en.md,AGENTS.md- 例外:
docs/development/worker-discipline-template.mdへの規律 1 行の追記は事前確認を要しない。/orchestrateの Step 4 が「観測した失敗をその場で定型側へ移す」ことを求めており、確認を挟むと還流が次セッションへ持ち越されて失敗が繰り返される。追記のみが対象で、既存行の書き換え・削除・節の再構成は従来どおり事前確認が要る。
- 例外:
- Never edit:
package-lock.json,LICENSE*,CITATION.cff
Verification Criteria
Run the applicable checks before handoff. All must pass.
| Changed path | Required validation |
skills/**/*.md | npm run skills:validate |
skills/agent-skills/** | npm run agent-skills:validate |
skills/**/*.md (manifest freshness) | npm run skills:manifest:check (regenerate with npm run skills:manifest if stale) |
.github/agents/ or .claude/agents/ | npm run agents:validate |
pages/**/*.md | npm run check:links:local |
src/ changes that affect skills | Confirm schema and skill alignment |
| Any file | npm run lint && npm test |
Completion gate: all applicable validations pass. If any fail, fix before handoff.
Workflow
- Keep each change small and cohesive.
- If
src/changes, confirm schema and skill alignment first. - Run the verification criteria above before handoff.
- Prefer existing patterns over new conventions.
Self-Review Checklist
Apply before handoff. Derived from retrospectives where defects shipped and were caught only by multi-perspective review (see docs/development/retrospectives/2026-05-21-25.md).
Codify-then-validate (when adding a rule or convention)
Before merging a new rule (Stop conditions, severity policy, naming convention, etc.), answer:
- What 3 concrete scenarios would make this rule fail or be misapplied?
- What is the reopen / exception condition? (e.g. for a Stop rule: how does it lift?)
- What is the soft-violation gray zone? (e.g. "status report during Stop"—is it allowed?)
If any answer is "I don't know," defer the rule until the gap is filled. Codify-without-validate produced a same-session defect in #898 → #902.
Code-gen review (when writing a workflow / script / automation)
Before merging GitHub Actions workflows, shell scripts, or any CI automation, verify:
- Concurrency: can two simultaneous invocations race on shared state (refs, locks, deploys)? Add a
concurrency:group if yes. - Default coupling: do hard-coded defaults (branch names, package names, paths) silently break when an upstream config changes? Prefer auto-detection or fail-loud over silent fallback.
- Failure mode: what happens on partial failure (network error mid-PATCH, exit code 0 but nothing changed)? Is the error surfaced or swallowed?
These were the convergent gaps in .github/workflows/release-please-kick.yml and scripts/release-please-kick.sh at first delivery, fixed in #902.
Commit Attribution
AI-authored commits MUST include a Co-Authored-By: trailer with the acting model identity.
Project Conventions
README.mdis the Japanese source of truth;README.en.mdis best effort.skills/content is the product surface; validate it after edits.- Record only durable, reusable repo learnings in
AGENT_LEARNINGS.md. - Use English or Japanese skill searches when locating repo conventions.
Local References
- Core repository architecture:
docs/architecture.md - 4-layer agent architecture:
docs/agent-layers.md - Development runbook:
docs/runbook/dev.md - Skill structure:
skills/README.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

