agentleFS
s977043s977043/river-review/AGENTS.md

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

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
  1. Distinctive:

    If a rule applies to all tools, it belongs in this file.

    line 7
  2. Very specific:

    Do not read or commit .env*, secrets/, *.pem, or *.key.

    line 46
  3. Very specific:

    Do not make direct network calls (curl, wget, fetch) from scripts or code.

    line 47
  4. Very specific:

    Do not hand-edit package-lock.json.

    line 49
  5. Distinctive:

    Do not push directly to main or to already-merged PR branches.

    line 50
  6. Distinctive:

    Do not omit timeout and exception handling in code that calls external APIs.

    line 51
  7. Distinctive:

    Run the applicable checks before handoff.

    line 65
  8. Distinctive:

    Keep each change small and cohesive.

    line 83
  9. Very specific:

    If src/ changes, confirm schema and skill alignment first.

    line 84
  10. Distinctive:

    Run the verification criteria above before handoff.

    line 85
  11. Distinctive:

    Prefer existing patterns over new conventions.

    line 86
  12. Very specific:

    When adding a rule or convention, or writing a workflow / script / automation, apply docs/development/self-review-checklist.md before …

    line 90

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

DirectoryPurpose
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.

TaskCommand
Installnpm install or npm ci
Lintnpm run lint
Testnpm test
Skills validationnpm run skills:validate
Agent skills validationnpm run agent-skills:validate
Agent spec and examplesnpm run agents:validate (agents/spec/, agents/examples/)
Plugin manifestnpm run plugin:validate (incl. agents/*.md registration)
Local link checknpm run check:links:local
Docs dev servernpm run dev
Docs buildnpm run build
TypeScript checknpm 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 gh are 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-lease is not a safe-force exception, and no role is exempt—organizer and worker alike. Take the remote in with git merge / git merge --ff-only and 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 main or 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, the blocked-label-guard.yml, release-please*.yml, and deploy.yml workflows, merge, release, and revert scripts such as scripts/merge-chain.sh and scripts/pr-unstall.sh, deterministicGate.command in skills/, src/lib/gate-decision.mjs, src/lib/deterministic-*.mjs, src/lib/secret-redactor.mjs, and runners/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 under tests/, and a one-line append to docs/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 with npm install --package-lock-only, as a cliff change. Changes to LICENSE* and CITATION.cff are made by a human.

Verification Criteria

Run the applicable checks before handoff. All must pass.

Changed pathRequired validation
skills/**/*.mdnpm 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/**/*.mdnpm run check:links:local
src/ changes that affect skillsConfirm schema and skill alignment
Any filenpm 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.md is the Japanese source of truth; README.en.md is 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.