Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

All three read plain markdown instruction files, and all three now honour AGENTS.md. One file can teach every one of them to prove its work before it claims to be done.

Bhawana
Author

Shahzeb Hoda
Reviewer
Published on: August 27, 2026
The agent finishes the feature and writes, confidently, that it has been tested. Nothing opened a browser. Nothing ran.
The gap is not that these tools cannot test. It is that nobody told them, in a place they read, what testing means in this repository.
That place is different for each tool, and one of them is now shared by all three.
TL;DR
Cursor, GitHub Copilot, and Codex all read plain markdown instruction files, and all three now honour AGENTS.md. One file can therefore teach every one of them to verify a change in a real browser before reporting success, instead of three separate integrations that drift apart.
Because testing was never defined for it. Left undefined, an agent settles on the cheapest thing that resembles verification, which is usually reading its own diff and declaring it correct.
There is also a capability gap underneath the instruction gap. None of these three drives a browser on its own.
Each tool has its own preferred file, and each has a second path that behaves differently. Getting the path wrong is the most common reason an instruction appears to be ignored.
| Tool | Native instruction file | Scoping mechanism | Also reads AGENTS.md |
|---|---|---|---|
| Cursor | .mdc rule files under .cursor/rules | Frontmatter: alwaysApply, globs, or description for intelligent selection | Yes, in the project root and subdirectories |
| GitHub Copilot | .github/copilot-instructions.md | .github/instructions/NAME.instructions.md with an applyTo glob | Yes, nearest file in the directory tree takes precedence |
| Codex | AGENTS.md | Project root file, or a global one under the Codex config directory | Yes, this is its native file |
One caveat on the Copilot row is worth reading twice. GitHub's documentation states that path-specific custom instructions on GitHub.com are currently supported only for the Copilot cloud agent and Copilot code review, so a glob-scoped file will not necessarily reach every surface you use.
Full field references live in the Cursor rules documentation and in GitHub's guide to repository custom instructions.
AGENTS.md is the convergence point. Write the testing contract there once and Cursor, Copilot, and Codex all pick it up, which turns three integrations into one file in the repository root.
What goes in it matters more than where it goes. Name the trigger, the exact command, and what each outcome means.
## Verification contract
After changing anything under src/ that affects a rendered page, run:
kane-cli run --agent --headless "<objective describing the user-visible result>"
Rules for reading the result:
- Exit 0 means verified. Only then may you report the task complete.
- Exit 1 means an assertion failed. Fix the feature. Do not weaken the objective.
- Exit 2 means Chrome or auth failed. Say so. This is not a code failure.
- Exit 3 means the run timed out. Re-run once, then escalate.
Never report success on a non-zero exit code.The last line does the most work. Without it, agents routinely summarise a failed run as a minor issue and carry on.
Note also that this contract names no selectors and no framework. That is deliberate, because it has to survive all three tools and whichever one you adopt next.
AGENTS.md alone is enough for Cursor. Add a rule file only when you want the instruction to fire on specific paths rather than on every session.
---
description: Browser verification required for UI changes
globs: ["src/pages/**", "src/components/**"]
alwaysApply: false
---
Any change matching these globs must be verified in a real browser
before the task is reported complete. Follow the verification contract
in AGENTS.md. A non-zero exit code is a failure, not a warning.Save that as a .mdc file under .cursor/rules. With alwaysApply set to false and globs set, the rule attaches only when a matching file is in play, which keeps it out of the way during unrelated work.
We covered the rest of the rule system, including how the four application types differ, in Cursor rules.
Copilot has the widest spread between surfaces, so decide which surface you are targeting before choosing a file.
GitHub also documents CLAUDE.md and GEMINI.md in the repository root as alternatives Copilot will honour. If your repository already has one of those for another agent, Copilot can read it rather than needing a duplicate.
Codex is the simplest of the three, because AGENTS.md is its native format rather than a compatibility layer.
It reads AGENTS.md at the project root, and a global file under the Codex configuration directory applies across every repository on the machine. TestMu AI publishes a ready-made section you can append rather than writing the contract yourself.
# project-level: append the Kane CLI section to this repo's AGENTS.md
curl -o /tmp/kane-cli-agents.md \
https://raw.githubusercontent.com/LambdaTest/kane-cli/main/skills/codex/AGENTS.md
cat /tmp/kane-cli-agents.md >> AGENTS.md
# global: the same section, applied to every repository on this machine
cat /tmp/kane-cli-agents.md >> ~/.codex/AGENTS.mdBecause Cursor reads AGENTS.md too, that same appended section covers Cursor without a second step. Codex-specific usage limits and how to stretch them are covered separately in Codex usage.
The instruction is only as good as the command it names. That command has to work headless, return a status the agent can branch on, and not require a test file that does not exist yet.
Kane CLI from TestMu AI fits those three constraints. It takes the objective in plain English, drives real Chrome, and exits with a POSIX status.
Here is a real run of the shape an agent would issue, on Kane CLI 0.8.4, checking that a form refuses to submit when it should.
$ kane-cli run --agent --headless \
"open the Input Form Submit page, submit the form with all fields empty,
and assert the browser blocks submission with a validation message
on the Name field" \
--url https://www.testmuai.com/selenium-playground/ | tail -1
{"type":"run_end","status":"passed",
"summary":"Tried to submit the form without entering any information. The browser
stopped the submission and showed a validation message on the Name field,
so the form was not submitted.",
"final_state":{"name_field_validation_message":"true"},
"reason":"Objective completed","duration":47,"bifurcated":false,"total_runs":1}
$ echo $?
0That objective asserts a negative, which is the case agent-written unit tests miss most reliably. Nothing in the source says the browser refused to submit.
Command flags and configuration are documented in the Kane CLI introduction documentation.
Note: TestMu AI's Kane CLI turns an advisory instruction into a required CI check, which is the part agents actually obey. Try TestMu AI free!
Do not assume a file is being read because it exists. Give the instruction a cheap observable side effect, run one small task, and check whether the side effect happened.
Step four is where most teams land on the honest answer. An instruction file gets you most of the way, and a lifecycle event gets you the rest.
If your agent supports that kind of enforcement, Claude Code hooks walks through binding a command to a lifecycle event so the check fires whether or not the model remembers it. For a wider view of which assistants help with testing at all, see our roundup of AI code assistants for testing.
Author
Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.
Reviewer
Shahzeb Hoda is the Associate Director of Marketing and a Community Contributor at TestMu AI, leading strategic initiatives in developer marketing, content, and community growth. With 10+ years of experience in quality engineering, software testing, automation testing, and e-learning, he has authored and reviewed 70+ technical articles on software testing and automation. Shahzeb holds an M.Tech in Computer Science from BIT, Mesra, and is certified in Selenium, Cypress, Playwright, Appium, and KaneAI. He brings deep expertise in CI/CD pipeline automation, cross-browser testing, AI-driven testing practices, and framework documentation. On LinkedIn, he is followed by 3,700+ engineers, developers, DevOps professionals, tech leaders, and enthusiasts.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance