Skip to content
Flintworks

Project18 November 2026

Agentests

View on GitHub

Agentests is linting for the rules a linter cannot read, such as tone, meaning, and intent. You write a rule once in plain language, your coding agent turns it into narrow yes-or-no questions, and a check on every commit names each file that breaks the rule.

The gap

My premise is that a decision made in a meeting travels slowly while a coding agent writes fast, so work can ship before the decision reaches it. Say marketing decides on Monday that customer copy promises no result. On Tuesday an agent drafts a launch email with the line "Guaranteed to double your conversions in 30 days." Monday's decision was never in the agent's context, and no step between the draft and the release can read it.

A linter matches patterns, and a pattern cannot settle this case. "30-day money-back guarantee. See the terms." uses the same word and promises no result. Telling the two sentences apart takes a reader who understands them. That reader has been a person in code review, and my guess is that review falls behind as agents write more of the work.

Where it sits in an agent workflow

An agent already gets rules before it writes, through files such as AGENTS.md. Those files ask, and nothing confirms that the agent complied. Agentests adds the check after the writing, at the commit, and the agent does most of the work around it.

  • The agent compiles the rule. npx agentests compile calls no model. It prints a prompt, and the coding agent you already use splits the rule into assertions, each with a local text check and one small question for a model. Any coding agent that runs shell commands can do this.
  • The agent proves the rule. It also writes evals, which are tiny repositories that each state the outcome they must get. The two guarantee sentences above are a pair of them, where one must fail and one must pass. npx agentests eval reports whether every eval matches, before the rule blocks a commit and again when you change models.
  • The agent gets the result. A failed check stops the commit and prints one line that names the file, the assertion, and the fix.
emails/launch.md  brand-voice/no-guarantees  Describe the typical result, or link the terms.

That line has the shape of a linter error, so an agent that commits its own work can read it, fix the file, and try again without a person relaying Monday's decision.

The file filter and the text check run locally, so a model sees only the files they could not clear, and each call asks one small question. The rules and evals are plain files in the repository. The team reviews a rule like code, and the check applies to every commit, whoever or whatever wrote it.

What to use it for

Agentests fits a rule that takes reading to judge and that keeps coming up. The case I run is copy. This site has two Tests in .agents/tests/, one with seven assertions for plain copy, including one that rejects em dashes, and one with five assertions for the shape of an essay. A coding agent is rewriting these posts with me, and my rule for that work is that the Tests come first and must fail against the old copy before the agent changes it.

The repository's use case notes list more, and they are marked there as proposals:

  • A lesson from an incident, such as "Payment retries must preserve the original idempotency key."
  • Copy that has to carry a meaning, such as a payment error that says whether money was taken and what the customer should do next.
  • An architecture decision, such as "New checkout flows must reuse the existing pricing policy."

A model's answer to one of these questions can be wrong, which is why every Test ships with evals that show where it holds.

Where it stands

Version 1.0.1 is on npm under the MIT license, and the README calls the MVP feature-complete. It installs in a Git repository with Node 22 or later:

npm install --save-dev agentests
npx agentests init

A finding names the file and the assertion today. Line numbers, quotes, JSON reports, and a GitHub Action are on the roadmap.

Read the code on GitHub, or bring questions to Discord.