Problem: verity init --register-mcp and python -m verity.mcp_server.manage install are two divergent install paths; both destroy JSONC comments/formatting, write a broken bare "command": "verity" that GUI MCP hosts cannot resolve, and verity fix mutates disk by default.
Decision (P0.5): unify both into verity mcp install + verity mcp rollback, patch JSONC losslessly, resolve a durable absolute command, wire OnboardingController + AtomicBackupManager, and make verity fix non-destructive by default with client-aware strategies.
Deterministic truth invariant: applying the same patch twice to the same file yields byte-identical output (idempotent); verity mcp rollback restores the exact pre-install bytes recorded in .verity/backups/<ts>/manifest.json SHA-256 digests.
Free/Pro boundary: Free owns install/rollback, the JSONC patcher, AtomicBackupManager, resolve_durable_mcp_command(), and the three client-aware Free verity fix strategies. Pro owns the AST/GitOps strategies (ast-sql, ast-guard, remediate-pr) and PR generation.
Delegate install/remove to the unified commands; remove duplicate config writer.
src/verity/remediation/__init__.py
Non-destructive default; deterministic-only pin-versions; host-native externalize-secrets (${env:VAR} for VS Code, .env auto-source warning, .gitignore verification before write).
src/verity/cli.py
verity mcp install [--client ...] [--scope project|user], verity mcp rollback, and verity fix--dry-run default with --write alias for --apply.
tests/unit/test_mcp_install_and_rollback.py
New ATDD suite (below).
Scope default: --scope project writes only .mcp.json, .cursor/mcp.json, .vscode/mcp.json; --scope user is the explicit opt-in for installed desktop/CLI hosts. Default transport is stdio.
verity fix defaults to non-mutating --dry-run; --apply requires deterministic version resolution for pin-versions and checks .gitignore + host-native ${env:VAR} for externalize-secrets.
Dry-run leaves the config file byte-identical on disk.