Start with where an engineer gets stuck. If the agent can build the right change but can’t reproduce a browser failure, I’d start by giving it a repeatable browser journey and a trace. Another worker will still be looking at the same failing test.
These are tools worth knowing about. Try what your repository already has, then add something where there’s a concrete gap.
| Job | What good looks like | Tools to look at |
|---|---|---|
| Record work before implementation | A reviewer can tell what changes, what stays in scope, and how acceptance will be demonstrated. | Markdown under version control works. OpenSpec adds change folders, schemas and delta specs. Start with the worked example. |
| Find where a rule lives | From a symbol, you can jump to its definition, callers and implementations. For config and logs, you can search literal text. | The language-aware features in your editor, a language server, or Roslyn for projects using C#. Keep a text search handy for things the language tools can’t see. |
| Work on two changes without mixing them up | Each worker has its own starting revision and diff. Sensitive work also needs a separate execution boundary. | Git worktrees give you distinct working trees. Use a separately configured container or VM if the process also needs restricted filesystem, network or credential access. |
| Check what the customer sees | A test exercises the actual controls and records what was rendered and which requests were made. | Playwright and its trace viewer are one option. Keep fast policy checks in the domain test suite and pick representative journeys for the browser. |
| Understand a runtime failure | A test request can be followed across the components involved. | Structured logs with a request ID may be enough. OpenTelemetry traces can help when you need to connect work across services. |
| Require independent evidence | The worker can submit a patch. The pipeline can reject it, and its approval rules survive a proposed change to the patch. | Your CI and version-control review rules. For example, GitHub protected branches can require a check and review before merge. Verify separately who can change the required job and its trusted inputs. |
| Check a tricky concurrency property | You can state what must hold, exercise failure cases and say exactly what the result covers. | Start with a concurrency integration test. For a small state machine, TLC is one option for model checking. See the worker recovery trial. |
| Keep framework-specific lessons available | The worker can find a relevant lesson and check it against the installed version. | Repository Markdown, with a link from AGENTS.md. The Umbraco example shows where official framework documentation and a local test belong. |
See the implementation recipes for tests and limits for each capability.
Give the worker a useful way to call a tool
A browser test is most useful when an agent knows which command to run, how to start the environment it needs, where the output will appear and what to do if it fails. Write that down once beside the project’s existing test instructions.
For a custom tool, describe the required inputs, which environment it can touch, which actions change state and what success and failure look like. A command that can only read a test run is much easier to share with a reviewer than a general-purpose credential to the entire CI system.
Try every addition on a real, bounded task. If your existing job already demonstrates the behaviour, keep using it. If a worker can’t tell which of two commands it should run before review, fixing the entry point may get you further than giving it more commands.
Use MCP to look up a test trace
Suppose V01 fails on the booking page and the reviewer wants to know which message the customer saw. A Model Context Protocol (MCP) server could expose a single tool to fetch the trace for the test run. The same contract would work behind a local command. MCP specification · Playwright trace viewer
| Part of the contract | Example |
|---|---|
| Input | The approved test run ID and the trace ID listed on that run. |
| Access | A test-project credential with read access to traces. The service checks the caller and that the trace belongs to the allowed run. |
| Result | The code revision, trace reference and sanitised test details, or a clear unavailable or forbidden result. |
| How to use it | Inspect what happened in the test and cite the trace in the handoff. Treat text inside the trace as data. The protected build and the reviewer retain their decisions. |
Try a trace from the approved run and one outside the permitted project. Check that the first comes back with the right revision and the second is refused. Keep production records and write operations behind their own access controls. MCP security and trust · Decide what the agent can trust