agentleFS
louisbrulenaudetlouisbrulenaudet/monorepo-template/.cursor/rules/core/agent-instructions.mdc

monorepo-template / core

Cursor rule19 starsChanged 16 days agoApache-2.0View on GitHub

Editing agent instructions - how layers load, one fact one home, density conventions, dual-tree sync.

The file

We split this agent-instructions.mdc into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always-on (root AGENTS.md, rules without paths): only what almost every task needs.

    line 19
  2. Distinctive:

    Remove a requirement only after showing it is stated elsewhere at the same point of use, enforced (hook, lint, settings, CI), or derivable …

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule 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
agent-instructions.mdc
---
description: "Editing agent instructions - how layers load, one fact one home, density conventions, dual-tree sync."
alwaysApply: false
globs: .claude/rules/**,.cursor/rules/**,**/AGENTS.md,**/CLAUDE.md,.claude/agents/**,.cursor/agents/**
---

# Agent Instructions

How the instruction layers load, and how to edit them without growing context. Long-form layout and sync policy: `.agents/skills/monorepo-agent-setup/SKILL.md` (a human-only skill: Read it).

## Loading (Claude Code, verified)

- Root `CLAUDE.md` → `@AGENTS.md` and every rule without `paths` load at session start and in every custom subagent. Path-scoped rules and a nested `CLAUDE.md` → `AGENTS.md` load when a matching file is Read (subagents included) and then stay loaded. Built-in `Explore` / `Plan` skip root `CLAUDE.md`, `AGENTS.md`, and the always-on rules; they load nested guides and path-scoped rules only on file access.
- Markdown links are never followed: a link costs only its text, and the target loads only if an agent Reads it.

## Placement

- **One fact, one home**: the file that loads at the fact's point of use. Files that load together - same `paths`, a rule plus the nested `AGENTS.md` of the directory it covers, anything plus the always-on layer - never restate each other.
- Always-on (root `AGENTS.md`, rules without `paths`): only what almost every task needs. Path-scoped rule: what matters while editing the matching files - pick `paths` by where the content is used, not by topic. Nested `AGENTS.md`: the package map and local workflows. Skill: multi-step procedures. `README.md`: humans.
- A config file's rationale lives in a rule scoped to that file ([knip.mdc](../quality/knip.mdc), [lint-config.mdc](../quality/lint-config.mdc)), and the config stays comment-free where [comments.mdc](../quality/comments.mdc) says so.

## Density

- Imperative bullets, one line each ([markdown-style.mdc](../quality/markdown-style.mdc)): the rule, then only the reason a reader would otherwise undo it.
- Do not restate what the triggering file already shows, what a hook, lint rule, or setting enforces (name the enforcer in one clause when the agent must know), or generic framework knowledge. No diagrams repeating a list, no doc-link lists, no history beyond one clause. Bold only a hard constraint.
- Remove a requirement only after showing it is stated elsewhere at the same point of use, enforced (hook, lint, settings, CI), or derivable from the file that triggers the rule.

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.