Skip to content
snowkit

kits / agent-rules-pack

v1.0.0

Agent Rules Pack

House rules, security and testing rules for coding agents, in the file formats each tool reads, plus a checklist for reviewing what they ship.

agent-rules-packREADME.md

Markdown · 5.9 KB

Agent Rules Pack

Version 1.0.0

A set of rules files that teach a coding agent how your team works: the commands to run, the conventions to follow, what it must never do without asking and how to report its work honestly. The same rules come in the formats that different agents and editors read, so you write them once and every tool on the team follows them. It also includes a checklist for reviewing what the agent produces.

Who it's for

  • Teams that use one or more coding agents on a shared repository
  • Solo developers who want an agent to stop guessing at commands and conventions
  • Tech leads who review agent-made pull requests and want a consistent standard

How to use it in 5 minutes

  1. Copy AGENTS.md to the root of your repository and fill in the Project and Commands sections. Delete lines that do not apply.
  2. Copy rules/ into the repository as well, or move its contents into your own docs folder and update the two links in AGENTS.md.
  3. Check which file names your agents read (see "The formats" below) and copy only the matching files across.
  4. Paste prompts/start-of-task.md into your agent at the start of the next task.
  5. When the change comes back, review it with review-checklist.md.

The formats

Different tools look for rules in different places. The content is the same; only the location and the header change.

  • AGENTS.md is an open, shared format. Many coding agents read it automatically from the repository root, and some also read one in a subfolder for rules that apply only there. This is your source of truth.
  • ASSISTANT-RULES.md holds the same rules laid out for agents that expect a single file under their own name. Check your agent's documentation for the file name it reads, then copy or rename this file to that name. It stands alone, so it works even where AGENTS.md is not read.
  • .cursor/rules/*.mdc are project rules for editors that read that folder. Each file starts with a small frontmatter block: description says what the rule covers, globs lists the file patterns it applies to, and alwaysApply: true loads it for every request. The house rules and security rules always apply; the testing and front-end rules load only for matching files.
  • .github/instructions/.instructions.md are path-scoped instructions for tools that read that folder. The applyTo glob in the frontmatter decides which files each one applies to. "*" means every file.

Keep one source of truth

Edit AGENTS.md and the files in rules/. Treat everything else as a copy. When you change a rule:

  1. Change it in AGENTS.md or in rules/.
  2. Update ASSISTANT-RULES.md and any agent-specific copy of it.
  3. Check the short versions in .cursor/rules/ and .github/instructions/ and adjust the matching lines.
  4. Commit all of them in the same pull request.

If your agent only needs its own file name and you do not want a second document to maintain, copy AGENTS.md itself to that name instead of using ASSISTANT-RULES.md. Replace [AGENT-FILE.md] below with the name your agent reads.

macOS, Linux or Git Bash:

cp AGENTS.md [AGENT-FILE.md]

Windows PowerShell:

Copy-Item AGENTS.md [AGENT-FILE.md]

Run it again whenever AGENTS.md changes, or add it to your project's setup script. Some agents also accept a one-line file that points to AGENTS.md; check your agent's documentation.

Combining the files

  • Use AGENTS.md alone if every agent your team uses reads it.
  • Add ASSISTANT-RULES.md (renamed) for any agent that reads only its own file.
  • Add the .cursor/rules/ or .github/instructions/ files only if your team uses tools that read those folders. Delete the folders you do not need.
  • Keep project-wide rules short. Put rules for one area (tests, front end, security) in the scoped files, so the agent loads them only when it is working on those files.

File map

FileWhat it is
README.mdThis guide
LICENSE.txtMIT licence
CHANGELOG.mdVersion history
AGENTS.mdComplete house rules template: project, commands, conventions, testing, working style, security, approval list, git and the definition of done
ASSISTANT-RULES.mdThe same rules as a single standalone file, ordered by priority, for agents that read their own file name
.cursor/rules/house-rules.mdcAlways-on project rules: commands, working style, approval list, definition of done
.cursor/rules/security.mdcAlways-on rules for secrets, input, access control and dependencies
.cursor/rules/testing.mdcTesting rules that load for test files
.cursor/rules/frontend.mdcComponent, accessibility and UI rules that load for front-end files
.github/instructions/security.instructions.mdSecurity instructions for every file
.github/instructions/tests.instructions.mdTest instructions for test files
rules/security-and-secrets.mdFull security rules: secrets, env files, logging, validation, auth, dependencies, what to refuse and what to do when a secret turns up
rules/testing.mdFull testing rules: test-first for bugs, structure, isolation, flaky tests, coverage and honest reporting
review-checklist.mdA checklist for reviewing a change made by a coding agent, including a claims-versus-evidence table
prompts/start-of-task.mdA reusable prompt to start a task with a plan and a checkable report
prompts/review-my-diff.mdA reusable prompt that asks the agent for a strict review of a diff

A note on limits

Rules files guide an agent. They do not enforce anything. An agent can still ignore or misread an instruction, so keep branch protection, required CI checks and human review in place, and treat the approval list as a backstop to those controls, not a replacement. File names and folders that each tool reads change over time; check your tool's current documentation when you set it up.

Licence

MIT License. See LICENSE.txt.