Skip to main content
A coding agent with the Momentic MCP server and the momentic-spec skill reads a pull request diff and identifies the affected user journeys. It updates existing tests or adds .test.yaml specifications in the working tree so the expected behavior enters review with the code.

Setup

Both come from the CLI, documented in Building with AI:
The agent needs a MOMENTIC_API_KEY in its environment and a reachable app to test: the PR’s dev server, a preview deploy, or staging.

In your coding agent

Inside Claude Code, Cursor, Codex, or another agent with the Momentic MCP server and skills installed:
The agent reviews repository guidance and existing coverage before editing the tests. At a usable end-to-end checkpoint, it prepares the required state and runs the smallest affected set, with confirmation for long runs. The tests enter review on the same branch and can use the suite’s existing CI job. Point the agent at the diff when the default scope is too broad, for example /momentic-spec cover the checkout changes in src/payments/. A repo-level agent rules file (CLAUDE.md, AGENTS.md, .cursor/rules) that names your app URLs and auth path keeps every run consistent.
For autonomous bug finding rather than diff-scoped tests, use Mo.

What to expect

  • Generated tests cover journeys (sequences a user can take), not unit-level coverage. They complement, not replace, tests you write deliberately.
  • Review for intent: delete steps that assert incidentals, tighten postconditions to the actual contract of the change.
  • Tests are most valuable on the diff that motivated them. If a generated test would have caught this PR’s bug, keep it; if it only re-asserts unchanged behavior, drop it.