Skip to content

One agent, many projects

How Lintsure keeps each project's rules apart when you use the same AI agent for all of them.

You use one agent for everything. So which project’s rules does Lintsure use? The one you are working in. This page says how it tells.

The short answer

Thing Belongs to
Your rules One project, always: the one the file is in
Accepted and confirmed findings One project, always
The connection to your agent One project, or all of them. You choose.
Guards in Claude Code You. Installed once, they work in every project.
Guards in Cursor, Codex and Gemini CLI One project
Skills One project

Rules are per project

Each project keeps its own rules in .lintsure/rules.yml. Lintsure reads the file from the project you are in, and no other.

A rule you write for your billing app doesn’t follow you into your blog. To use the same rule in two projects, put it in both.

Which project a file belongs to

Lintsure doesn’t ask which folder you opened your agent in. It asks which project the file is in.

When your agent edits a file, Lintsure starts at that file and walks up, folder by folder, until it finds one with a .lintsure folder. That is the project. Its rules apply.

work/                          ← agent opened here
├── billing-app/
│   ├── .lintsure/rules.yml    ← used for anything under billing-app
│   └── src/pay.ts
└── blog/
    ├── .lintsure/rules.yml    ← used for anything under blog
    └── posts/hello.md
  • Edit billing-app/src/pay.ts and the billing rules apply.
  • Edit blog/posts/hello.md in the same session and the blog rules apply.
  • Edit a file that sits in no project, such as work/notes.md, and only the built-in checks run.

So you can open your agent over several projects and each keeps its own rules.

Three things to know

  • The nearest project wins. If one project sits inside another, a file uses the rules of the inner one. The outer project’s rules don’t apply as well.
  • Lintsure never looks above the folder you opened. A .lintsure folder higher up belongs to something you didn’t open, so it isn’t used.
  • Each project keeps its own record. What the guards caught is logged in that project’s .lintsure folder, and the check at the end of a task scans each project you edited with its own settings.

Risky shell commands are different. A command has no single file, so those guards work from the folder you opened.

A project with no rules still gets checked

With no .lintsure folder, the built-in checks still run: a key written into a file, an import of a file that doesn’t exist, a risky shell command. You only miss the rules you would have written yourself.

The connection: one project or all of them

npx lintsure setup asks which you want.

Choice Command What it does
Only this project npx lintsure setup --here Adds Lintsure to this project’s agent settings. Your teammates get it too when you commit the file.
Every project on this machine npx lintsure setup --everywhere Adds Lintsure to your own agent settings, so the agent can call it anywhere.

“Every project” makes the tool available everywhere. It doesn’t copy rules between projects. Each project still uses its own.

Guards: once, or per project

It depends on the agent.

  • Claude Code installs guards for you, once. They then run in whichever project you open, and read that project’s rules.
  • Cursor, Codex and Gemini CLI read a file inside the project that tells them to run the guards. npx lintsure plugin writes that file. You do it once per project.

npx lintsure plugin works out which applies and shows what it will write before it writes anything.

Several projects in one folder

Some repos hold many apps, such as apps/web and apps/api. A scan of the top folder checks all of them together.

When you run lintsure in a folder that holds several projects and isn’t one itself, it says so and lists them, so you can pick one.

If only the top folder has a .lintsure folder, its rules apply to everything under it. A rule can be limited to part of the repo:

rules:
  - avoid: "console\\.log"
    say: "Use the shared logger."
    in: "apps/api/**"

Or give an app its own .lintsure folder, and it becomes its own project with its own rules.

Check where you stand

In any project:

npx lintsure status

It says whether the project has a config, rules, a connected agent and current skills.

Next steps

Lintsure is a readiness tool, not an audit or legal advice. Results cover code only; a qualified person should review them. Disclaimer