river-review
AGENTS.md7 starsChanged 5 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. Node 22 is required (.nvmrc and engines.node pin 22.x). If the default node is another version, run Node 22 explicitly via its absolute path or a version manager. - Do not read or commit .env*, secrets/, *.pem, or *.key. - Do not…
- Reads credentials
- Deletes or force-pushes
- Installs packages
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 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
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
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 46
Do not read or commit .env*, secrets/, *.pem, or *.key.
- Very specific: line 47
Do not make direct network calls (curl, wget, fetch) from scripts or code.
- Very specific: line 49
Do not hand-edit package-lock.json.
- Distinctive: line 50
Do not push directly to main or to already-merged PR branches.
- Distinctive: line 51
Do not omit timeout and exception handling in code that calls external APIs.
- Distinctive: line 65
Run the applicable checks before handoff.
- Distinctive: line 83
Keep each change small and cohesive.
- Very specific: line 84
If src/ changes, confirm schema and skill alignment first.
- Distinctive: line 85
Run the verification criteria above before handoff.
- Distinctive: line 86
Prefer existing patterns over new conventions.
- Very specific: line 90
When adding a rule or convention, or writing a workflow / script / automation, apply docs/development/self-review-checklist.md before …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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; see Edit Scope |
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.
Node 22 is required (.nvmrc and engines.node pin 22.x). If the default node is another version, run Node 22 explicitly via its absolute path or a version manager.
| 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 spec and examples | npm run agents:validate (agents/spec/, agents/examples/) |
| Plugin manifest | npm run plugin:validate (incl. agents/*.md registration) |
| 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
Edit approval follows the risk tiers in ADR-016. Its tier table (階層表) is the SSoT; the summary below does not replace it. The Safety section above takes precedence on every tier.
- Cliff (崖): human approval is required for each PR. Covers this file and other approval rules,
.claude/settings, hooks, commands, rules, and agents,docs/adr/, file deletions,package.json, lint and release config, and the product trust-boundary code listed in the table. Paths that are easy to misread as hill or field:agents/,commands/,.claude-plugin/,.github/actions/,.github/CODEOWNERS,.github/dependabot.yml, theblocked-label-guard.yml,release-please*.yml, anddeploy.ymlworkflows, merge, release, and revert scripts such asscripts/merge-chain.shandscripts/pr-unstall.sh,deterministicGate.commandinskills/,src/lib/gate-decision.mjs,src/lib/deterministic-*.mjs,src/lib/secret-redactor.mjs, andrunners/github-action/action.yml. - Hill (丘): an agent may proceed through PR creation without asking; a human merges. Covers
src/,runners/,skills/,scripts/,schemas/,docs/,assets/,README.md,README.en.md, changes to existing tests, and other workflows, except the cliff items in the table. - Field (原っぱ): allowlist only. Covers
pages/(except the excluded reference pages),AGENT_LEARNINGS.md, newly added files undertests/, and a one-line append todocs/development/worker-discipline-template.md. Longer appends and edits to existing lines of that template are cliff. - A PR takes the highest tier among its files, and anything the table does not list is cliff.
- Never edit by hand:
package-lock.json,LICENSE*,CITATION.cff. All three are cliff in the table. The only lockfile change an agent may make is regenerating it withnpm install --package-lock-only, as a cliff change. Changes toLICENSE*andCITATION.cffare made by a human.
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) |
agents/spec/, agents/examples/ | npm run agents:validate |
agents/*.md (plugin registration) | npm run plugin:validate |
.github/agents/, .claude/agents/ | No dedicated validator; npm run lint && npm test only |
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
When adding a rule or convention, or writing a workflow / script / automation, apply docs/development/self-review-checklist.md before handoff.
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.
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.

