Agent rule pattern

Hard prohibitions

Actions the agent must never take, stated without hedging.

49 of 100 projects

The shape of the rule

  1. Name the action
  2. Explain the risk
  3. Give an alternative
How to use it

These rules say "never", name the exact action, and often explain what to do when a user asks for it anyway.

Name the forbidden action, its consequence, and the permitted alternative. State any exceptions so the rule stays narrow.

Examples from real projects

3 examples · Pinned source

Keep dependency updates precise

The lockfile rule bans updating every dependency and names cargo update --precise as the required mechanism. It gives a concrete boundary for dependency-related diffs.

AGENTS.mdL16–17
Source excerpt starting at line 16.
- NEVER update all dependencies in the lockfile and ALWAYS use `cargo update --precise` to make  lockfile changes

Protect identifiers stored in user data

Class names are part of saved-flow compatibility. A rename that looks local in Python can break existing documents, so the instruction calls it out as a persistent contract.

AGENTS.mdL147
Source excerpt starting at line 147.
**IMPORTANT:** Changing a component's class name is a breaking change and should never be done. The class name serves as an identifier used to match components in saved flows and to flag them for updates in the UI. Renaming it will break existing flows that use that component.

Protect other sessions through explicit Git boundaries

The Git section explains why broad staging, resets, cleaning, and stashing can interfere with other sessions. It requires explicit file paths and checking staged ownership before committing.

AGENTS.mdL55–65
Source excerpt starting at line 55.
Committing: - Only commit files YOU changed in THIS session.- Stage explicit paths (`git add <path1> <path2>`); never `git add -A` / `git add .`.- Before committing, run `git status` and verify you are only staging your files.
Show remaining 6 lines
Source excerpt starting at line 60.
- `packages/ai/src/models.generated.ts` may always be included alongside your files.- Message format: `{feat,fix,docs}[(ai,tui,agent,coding-agent)]: <commit message> (optionally multiple lines)`. Message is informative and concise. Never run (destroys other agents' work or bypasses checks): - `git reset --hard`, `git checkout .`, `git clean -fd`, `git stash`, `git add -A`, `git add .`, `git commit --no-verify`.

Projects using this pattern (49)

Browse in directory →
Show 41 more projects
← All agent rule patterns