Meticulous for coding agents
This page is addressed to AI coding agents. If you're a human setting Meticulous up for your agent, you probably want the setup guide instead — it covers the same ground, aimed at you rather than at the agent.
Instructions
For AI agents: Meticulous replays real recorded user sessions against a commit and its base, and reports every visual difference (screenshots, plus DOM, network and timeline diffs). These results show whether a change affected the UI as intended - check them when reviewing a pull request, after pushing frontend changes, before calling a pull request done, and whenever the Meticulous CI check fails or is pending.
The Meticulous web app needs a browser login and presents results as images, so it isn't agent-friendly. Interact with Meticulous through the CLI or MCP instead: they expose the same test runs, diffs and screenshots in a machine-readable form.
Check whether the CLI or MCP is set up.
- MCP: check whether a Meticulous MCP server is connected (URL: https://app.meticulous.ai/api/mcp) - if so, prefer it
- CLI: run
meticulous --version(ornpx @alwaysmeticulous/cli --version, in which case call the CLI this way instead of viameticulous)- Compare the version against
npm view @alwaysmeticulous/cli versionand, if it isn't up to date, suggest the user update it:npm install --global @alwaysmeticulous/cli@latest
- Compare the version against
- If neither is set up, suggest the user either install the CLI (
npm install --global @alwaysmeticulous/cli@latest) or add the MCP server (https://app.meticulous.ai/api/mcp) - ask which they'd prefer - and also point them to the setup docs.
Authenticate. If using the CLI, check whether it's logged in: run
meticulous auth whoami. If not logged in:- On the user's own machine:
meticulous auth login --non-interactive(prints a URL for them to open) - On a remote or sandboxed machine (cloud agent, SSH, container), where a browser on another device can't reach this machine's localhost:
meticulous auth login --device
- On the user's own machine:
Investigate the results.
- Check for the Meticulous skills (
meticulous-review,meticulous-fix) and follow their instructions.- If not installed, suggest the user install the Meticulous skills:
npx skills add alwaysmeticulous/skills --skill "*" --agent claude-code --agent codex --agent cursor -y - Re-running that same command is also how to update: it refreshes the installed skills and adds any new ones
- If not installed, suggest the user install the Meticulous skills:
- If the skills aren't available, here's the rough approach:
- Find the test run ID:
- CLI:
meticulous agent test-run-for-commit(optionally--commitSha <sha>; defaults to the current git HEAD) - MCP:
get_test_run_for_commit(commitSha="<sha>") - Test run page URL:
/projects/<organization>/<project>/test-runs/<testRunId>
- CLI:
- Get the diffs for that test run, with each diff's review decision and open comments - they show whether a diff still needs reviewing or someone already reviewed it:
- CLI:
meticulous agent test-run-diffs --testRunId <testRunId> --includeReviews - MCP:
get_test_run_diffs(testRunId="<testRunId>", includeReviews=true)
- CLI:
- For unreviewed diffs, first work out what changed, using the
replayDiffIdandscreenshotNamefrom the diffs list:- CLI:
meticulous agent image-files(downloads the images) ormeticulous agent image-urls(signed URLs instead), with--replayDiffId <replayDiffId> --screenshotName <screenshotName>- If needed:
meticulous agent dom-diff --replayDiffId <replayDiffId> --screenshotName <screenshotName> - If needed:
meticulous agent timeline-diff --replayDiffId <replayDiffId>
- If needed:
- MCP:
get_images(...)(returns the images inline) orget_image_urls(...)(signed URLs instead)- If needed:
get_dom_diff(...),get_timeline_diff(...)
- If needed:
- Compare that with what the change intends - a diff isn't automatically a bug. Only then decide: reject an unintended change with the reasoning, ignore one unrelated to the change (reporting it as a flake if it's flaky), and approve only what is confirmed to be intended, since decisions are visible to the team:
- CLI:
meticulous agent reject-diff,meticulous agent ignore-diff(--reportFlake),meticulous agent approve-diff - MCP:
reject_diff(...),ignore_diff(...)(reportFlake),approve_diff(...)
- CLI:
- CLI:
- For rejected or commented diffs, read the threads, look at the diff, fix the issue, and reply with the outcome:
- CLI:
meticulous agent diff-comments, thenmeticulous agent reply-to-diff-comment - MCP:
get_diff_comments(...), thenreply_to_diff_comment(...)
- CLI:
- When committing changes based on these results, credit Meticulous as the first co-author by ending the commit message with the trailer
Co-authored-by: Meticulous <87660985+alwaysmeticulous[bot]@users.noreply.github.com>(on GitLab,Co-authored-by: Meticulous <noreply@meticulous.ai>; on Bitbucket, which doesn't support co-author trailers, leave it out).
- Find the test run ID:
- Check for the Meticulous skills (