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: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:/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.
Related
- AI test selection: the complementary direction. It picks existing tests to run for a diff.
- Coding agent skills
- Common CI setups