Agent rule pattern

Router files

The entry file points each kind of work to a focused guide.

34 of 100 projects

The shape of the rule

  1. Recognize the task
  2. Point to its guide
  3. Load it when needed
How to use it

A short index says which guide to read for each task. The detailed document is loaded only when the work needs it.

Map common tasks to specific guides and say when to read them. Keep the entry file as an index; leave the detailed steps in the focused guides.

Examples from real projects

3 examples · Pinned source

Route common tasks to the relevant guide

A table maps bugs, parsers, adapters, performance, documentation, and pull requests to focused documents. It gives an entry path into the material without loading every guide for every change.

AGENTS.mdL62–69
Source excerpt starting at line 62.
| Task                    | Guide                                                                             || ----------------------- | --------------------------------------------------------------------------------- || Fix a bug               | See [Testing Patterns](.agents/docs/testing.md) → Regression                      || Add a new parser        | See [Parser Implementation](.agents/docs/parser-implementation.md)                || Add a framework adapter | See [Adapter Development](.agents/docs/adapter-development.md)                    || Improve performance     | See [API Design](.agents/docs/api-design.md) → Performance & Reliability          || Update documentation    | See [Release & Git Workflow](.agents/docs/git-workflow.md) → Documentation        || Prepare a pull request  | See [Release & Git Workflow](.agents/docs/git-workflow.md) → PR Quality Checklist |

Select skills before loading their full context

The skill workflow asks the agent to inspect descriptions first and read complete instructions only for relevant tasks. An explicit exclusion keeps unrelated domain guidance out of the working context.

AGENTS.mdL60–67
Source excerpt starting at line 60.
Domain-specific context and conventions live in `.agents/skills/`. Beforestarting any task: 1. List `.agents/skills/*/SKILL.md`2. Read only each skill's frontmatter description to identify relevant skills3. Read only the full `SKILL.md` files relevant to your task Do not load skills that are not relevant to the task.

Skills mapped to when they apply

Nine skills each have a clear trigger, including user-facing text, docs work, SQL built against user databases, and form code. Those skills, not the root file, own the detailed conventions.

AGENTS.mdL63
Source excerpt starting at line 63.
The skills in `.agents/skills/` are the source of truth for conventions — load the relevant ones before working, don't guess:

Projects using this pattern (34)

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