momentic-spec skill closes
the “we changed code but did not add tests” gap: it reads the diff, maps the
user journeys it changed, and authors .test.yaml files into the PR’s working
tree so they enter 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.
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