The simplified format makes Momentic YAML easier to review and maintain: no volatile step IDs on disk, shorter command aliases, relative module references, and JSON Schema support in modern editors.Documentation Index
Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Web (
momentic) and mobile (momentic-mobile) are separate CLIs with
separate migrations. Each command only rewrites files belonging to its own CLI
and only flips fileFormat: v2 on its own project’s momentic.config.yaml.
If your repo has both web and mobile Momentic projects, run both
migrations — one will not touch the other’s files.Before you start
Pick a migration window when teammates are not actively changing Momentic tests. Everyone should move to the simplified format at roughly the same time. If one branch keeps editing legacy YAML while another branch lands the rewrite, later merges can be noisy. Before running the migration:1. Update Momentic
Always invoke the migration throughmomentic@latest / momentic-mobile@latest
so the project config and YAML rewrites are produced by the new CLI’s
serializers, not the version currently pinned in your package.json. Running
the bare npx momentic upgrade on an older pinned version installs the new CLI
but completes the rest of the upgrade with the old one, which means you would
need a second invocation to see the new behavior take effect.
Check your currently-pinned versions before continuing:
2. Run the migration
You have two entry points, depending on how much you want to touch:momentic@latest upgrade/momentic-mobile@latest upgrade— overarching. Installs the latest CLI into your project, applies the latest recommended project-config defaults (ai.agentConfigagent versions,ai.useMemory,ai.failureRecovery), setsfileFormat: v2, and rewrites every legacy*.test.yaml/*.module.yamlthrough the simplified format serializer. Use this when you want one command to bring the whole project current.momentic migrate simplified-format/momentic-mobile migrate simplified-format— file migration only. Rewrites legacy test and module files to the simplified format and flipsfileFormat: v2on the project config, but leaves your CLI version andai.*defaults alone. Use this when you want a tight, isolated diff with no config-default changes mixed in. Runs against the CLI version already installed in your project; if it is older than the publishedmomentic@latestthe command will warn you and point atnpx momentic@latest upgradeso you can install the newest serializers.
Preview with --dry-run
Both upgrade commands accept --dry-run to preview what would change without
writing anything to disk or pushing any snapshots:
ai.agentConfig entries would be updated.
Web
From the web project root, run one of:fileType: momentic/test/v2; a module should start with
fileType: momentic/module/v2.
Mobile
From the mobile project root, run one of:fileType: momentic/mobile-test/v2; a mobile module should start with
fileType: momentic/mobile-module/v2.
If you maintain both a web and a mobile project, run the command in each project
root. Neither CLI touches the other’s files, so a single-platform run will
silently leave the other platform’s tests in legacy YAML.
What to expect
Each migration takes about 1 minute per 50 tests. Existing step caches are preserved across the conversion. Review the diff like application code, then commit all rewritten Momentic YAML files together with themomentic.config.yaml change. Do not split the config
change into a separate commit because the project should switch formats as one
unit.
If your repo already uses the simplified format and the agent config is current,
the upgrade command is a clean no-op. It will not rewrite any files.
3. Enable editor validation
Momentic publishes static JSON Schemas for simplified format tests and modules. Add them to your editor so YAML mistakes show up while you write. Mobile tests and modules use separate schemas. If your repo has both platforms, point each glob at the correct schema (typically by directory).VS Code
Add this to.vscode/settings.json for a web-only repo:
web/ and mobile tests under mobile/:
Cursor
Cursor uses VS Code workspace settings. Commit the same.vscode/settings.json
snippet from the VS Code section so everyone opening the repo in Cursor gets the
simplified format schemas automatically.
Windsurf
Windsurf also reads VS Code-style workspace settings. Commit the same.vscode/settings.json snippet from the VS Code section for shared team
validation.
Zed
Add this to your Zed settings for a web-only repo:momentic-mobile-test-v2.schema.json /
momentic-mobile-module-v2.schema.json). Mixed repos can list both with
directory-scoped globs (web/**/*.test.yaml, mobile/**/*.test.yaml, etc.) the
same way as VS Code.
4. Use lint for agent edits
Editor schemas catch shape errors early. Momentic also runs simplified format lint automatically before starting the local app and before executing tests, so normal app and test workflows already block invalid YAML. Use thelint command when a coding agent or direct YAML edit changes Momentic
test files and you want a quick validation without starting the app or running
tests. It checks schema validity, local file references, and entity conflicts.
Web:
AGENTS.md so they use
the same guardrail:
5. Author simplified format files
After migration, restart your editor so it launches the updated MCP command when you do need browser-backed authoring. MCP is still the most reliable way to create, preview, and execute steps against a live browser. For lightweight changes, simplified format files are also safe to edit directly. The readable YAML format, static schemas, and editor completions make small updates easier:- Prompt coding agents to directly edit
*.test.yamland*.module.yamlfor simple changes that do not need a browser. - Hand-author tests with YAML tab completions and schema suggestions in your editor.
- Reference local files from steps. JavaScript steps can point at local JS files, and those JS files can reference other local files with relative paths.