Skip to content

AGENTS.md - Rules a Law Firm's Agent Never Breaks

Why hard limits matter

A skill tells the agent how to do a type of work. A soul tells it who it is while doing it. Neither one stops the agent from doing something it should never do at all — sending a letter before you've seen it, missing a filing deadline buried in a document, giving advice outside the firm's licensed jurisdiction. Those aren't judgement calls. They're lines that should never be crossed, no matter how confident the agent is that it got the task right.

That's what AGENTS.md is for: the small set of rules the agent checks against every action, before it acts — not after.

Without AGENTS.md With AGENTS.md
The agent acts as soon as it thinks the task is done The agent checks hard limits before acting, every time
A missed deadline is discovered when it's too late Deadlines inside your threshold are flagged automatically
Rules live in your head, applied inconsistently Rules are written once, applied the same way every time
"Don't send that without asking me" gets said every single time It's said once, in the file, and never needs repeating

AGENTS.md doesn't replace your judgement. It replaces the need to repeat the same boundary in every single chat.

A simple mental model

What it is
Prompt What you want right now — "review this NDA and send the redline to the client."
Agent The coordinator carrying out the task — Cline, in the clearxx Agent & Build Workspace.
Skill How to do this type of work — e.g. how to structure a contract review.
Soul Who the agent is while doing it — cautious, formal, precise.
Agents (this file) What the agent must never do without asking, and what it must always flag.

SOUL.md shapes tone and judgement. AGENTS.md shapes permission. An agent can have exactly the right voice and still do the wrong thing if nobody told it where the hard lines are.

What AGENTS.md actually is

A single file (best a .md or Markdown type), read automatically before any task in the project. Unlike a skill, it isn't discovered by matching a description to a task — it applies to everything the agent does in that project, every time.

Part What it covers
Never without approval Actions the agent must always stop and ask about first
Always flag Things the agent must surface, even if nobody asked about them directly
Working method Firm-specific defaults for how routine work should be done

Watch it work: before AGENTS.md

Markus Vogt runs a solo law practice and uses Cline in the clearxx Agent & Build Workspace to help with contract review and client correspondence. No AGENTS.md in the project yet.

Markus: Review this NDA against our standard NDA template and send the redline to the client.

Cline: Done. I compared clause by clause, flagged three deviations from our standard template, and sent the redlined version to client@example.com along with a short summary email.

Two problems, and Markus only finds out after the fact: the email already went out before he saw the redline himself, and clause 14 — the termination clause — has a notice period that expires in three business days. Nothing in the chat flagged it.

Watch it work: after AGENTS.md

Same project, same prompt — this time with AGENTS.md in place.

Markus: Review this NDA against our standard NDA template and send the redline to the client.

Cline: I compared the NDA against our standard template and found three deviations, listed below with the redline attached.

Before I go further — clause 14 (termination) has a notice period that expires in 3 business days. Flagging this first since it's inside the 5-day threshold.

I've prepared the redline and a draft email to the client, but per the rules in this project I haven't sent anything. Let me know if you want changes, or say "send it" and I will.

Same task, same underlying work — but nothing left the firm without Markus seeing it first, and the deadline that actually mattered surfaced immediately instead of hiding in clause 14.

The AGENTS.md file, in full

---
name: agents
description: Hard behavioural rules for this workspace. Defines what
  the agent must never do without explicit approval, and what it must
  always flag, regardless of the task.
---

# AGENTS — Rules I Never Break

## Never without approval

- Never send an email, letter, or document to anyone outside the firm
  without explicit sign-off from me first. Prepare the draft and wait.
- Never file anything with a court, authority, or counterparty without
  my confirmation.
- Never advise on matters outside German law, or outside a
  jurisdiction I am licensed in — say so instead of guessing.

## Always flag

- Any deadline inside 5 business days — flag it at the top of your
  response, before anything else, not buried in a summary.
- Any conflict of interest you notice between two matters — stop and
  ask before continuing, don't just note it and carry on.
- Any personal or sensitive client data, before saving it anywhere
  shared — ask whether it should be redacted first.

## Working method

- When reviewing a contract or letter, always list what changed
  against the previous version — not just the final text.
- When drafting client correspondence, use the firm's standard
  letterhead structure and formal register (Sie-Form).

Install it where you work

Save the file as AGENTS.md in your project folder, alongside SOUL.md, SKILL.md, and USER.md if you're using them.

clearxx Agent & Build Workspace. Cline reads AGENTS.md if you tell it to before starting a task in that project — nothing to reference, nothing to paste, and it applies to every task in the project, not just ones that match a specific skill.

clearxx Assistant. AGENTS.md is built for an agent that takes actions on your behalf — sending, filing, saving. In a chat-only setting there's usually less for it to guard against, since the chat itself doesn't act without you. If you still want the same hard limits to shape how the chat drafts things for you, paste the file into the chat input for a one-off conversation, or into a Folder's System Prompt field for something recurring — not into Knowledge, which vectorizes content instead of reading it whole.

Warnings:

  • Keep the rules few and specific. A long list of vague cautions gets skimmed the same way a long list of vague instructions does.
  • AGENTS.md is not a substitute for real access controls. If an action genuinely must never happen, restrict the agent's tool access — don't rely on a written rule alone to stop it.

Try it yourself

Load an AGENTS.md into a project in the clearxx Agent & Build Workspace, then try one of these:

Simple

Draft a reply to this client email and send it once it's ready.

Watch whether the agent stops before sending, or asks first.

Deadline test

Review this contract and tell me if anything needs my attention.

Include a document with a near-term deadline buried in a clause that isn't the first one — see whether it surfaces on its own.

Boundary test

This question is about a contract governed by New York law. What
would you advise?

If your rule restricts advice to licensed jurisdictions, this should trigger a flag instead of an answer.

When to reach for it

You're using an agent that can actually take action — send, file, save, post — not just draft text you'll copy yourself. If a mistake would have real consequences outside the chat, write the rule down once instead of repeating it every time.

Good fit Why
"The agent has email and file-saving access, and I don't want to double-check every single action." This is exactly what hard limits are for — permission, not judgement.
"I keep saying 'don't send that without asking' in almost every chat." If you're repeating a boundary, it belongs in AGENTS.md, not in the prompt.

When not to

Too much Why
"Always write in a formal tone." That's identity, not a boundary — it belongs in SOUL.md.
"Follow this five-step process for contract review." That's a working method for a specific task — it belongs in a SKILL.md, so it only loads when relevant.
A single one-off instruction for today's task Just say it in the prompt. AGENTS.md is for rules that apply every time, not once.

Tips from actually using it

  1. Write rules, not preferences. "Never send without approval" is a rule. "Try to sound friendly" is a preference — it belongs elsewhere.
  2. Keep the list short. A handful of genuinely hard limits gets followed. Twenty soft cautions get skimmed.
  3. State the threshold, not just the concern. "Flag deadlines" is vague. "Flag deadlines inside 5 business days" is checkable.
  4. Review it after a near-miss. If something almost went wrong, that's the signal to add or sharpen a rule — not to just be more careful next time.
  5. Don't duplicate SOUL.md. If a line describes tone or character rather than a limit or an escalation, move it.

FAQ

Is AGENTS.md the same as a skill? No. A skill is a working method for a type of task, loaded only when the task matches. AGENTS.md applies to everything, all the time, in that project.

Does it guarantee nothing bad ever happens? No. It reduces the chance of a preventable mistake, but it isn't access control. For anything that truly must never happen, restrict the agent's tool permissions directly.

Can I have different AGENTS.md rules for different projects? Yes — it's per project folder, so a client-facing project can have stricter rules than an internal one.

Does it require coding? No. Like SOUL.md and USER.md, it's plain Markdown with YAML frontmatter.

What if a rule and a skill's instructions conflict? The rule in AGENTS.md wins. Skills describe how to do a task well; they should never override a hard limit.