This is the canonical policy for every coding agent working in this repository. Tool-specific instruction files must import or point here instead of copying these rules. If guidance conflicts, the user's current request wins, followed by this file, then the subsystem documentation.
- Agents must not create or submit pull requests, or reply to reviewer questions. Prepare local changes and validation results for the human author instead.
- The human author must fully understand every submitted code change, including its behavior, evidence, compatibility constraints and validation. The human creates the pull request, answers review questions and takes responsibility for the submission; agent assistance does not transfer that responsibility.
Before editing:
- Read this file completely.
- Run
git status --short. This is a shared, usually dirty worktree; assume every existing change belongs to the user or another agent. - Read
docs/building.md,docs/codestyle.mdand the relevant parts ofdocs/architecture.md. - Check whether another agent is modifying the same files. Partition work or coordinate before editing overlapping code.
- At the start of each new task in a long-running session, and always right before committing,
check whether this file or the docs you rely on changed since you read them
(
git status --short -- AGENTS.md docs/,git log -1 --format=%h -- AGENTS.md docs/). Re-read any that changed and follow the current version; other agents may update the rules in parallel sessions.
- Commit only when the user asks. Write commit messages following
docs/commit_messages.md. - Before running
git commit, prepare the commit following "Review before committing" indocs/commit_messages.md(check the index, stage only the task files or usegit commit --onlywhen others have staged files), show the user the file list and the full commit message, and commit only after the user confirms.
- TODO
- run appropriate tests if test projects are available for covered source parts.
- Before working with an engine system, find its overview in the "Related documents" table of
docs/architecture.mdand read it to learn which systems, classes and entry points to use (for exampledocs/physics_overview.mdforshared/physics). Check the code when the document and the code disagree.