Run opa check --v1-compatible on existing policy files to surface syntax errors and deprecated constructs that are invalid under Rego v1.
Replace head-only partial rules (deny[msg] { ... }) with the explicit contains keyword form (deny contains msg if { ... }) as required by Rego v1.
Add the if keyword before rule bodies that previously relied on implicit if semantics; every rule body must now be introduced with if.
Update the package declaration or OPA configuration to enable v1 compatibility mode; in recent OPA versions this is done via --v1-compatible flag or a config setting (verify the flag name in current docs).
Re-run the full opa test suite after migration and compare outputs to the pre-migration baseline to confirm no behavioral changes.
Known gotchas
The contains and if keywords are reserved in Rego v1 and cannot be used as variable or rule names; audit your policies for any such identifiers before migrating.
Rego v1 enforces strict variable declaration; variables used only in the head of a rule (not in the body) that were previously implicitly declared may now require explicit binding.
OPA versions before a certain release do not support v1 syntax; confirm that all OPA deployments in your environment are on a version that accepts the --v1-compatible flag before rolling out migrated policies.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp