Corvid Upgrade And Migration Tools
corvid upgrade is the supported entrypoint for source, stdlib, schema, trace-format, and connector-manifest migrations. It is designed for CI first: check reports pending changes and exits non-zero when work is required; apply performs safe rewrites and prints the same report.
Source And Stdlib
corvid upgrade check my_app/corvid upgrade check my_app/ --jsoncorvid upgrade apply my_app/The v1 source/stdlib migrator currently performs these safe rewrites:
syntax.pub_extern_agent_single_line: migrates legacy split-linepub extern "c"plusagentinto the stablepub extern "c" agentspelling.stdlib.llm_complete_to_agent_run: migratesstd.llm.complete(calls to policy-awarestd.agent.run(calls.stdlib.cache_get_or_create_to_remember: migratesstd.cache.get_or_create(calls tostd.cache.remember(calls.
Each finding includes a stable rule id, migration kind, file path, occurrence count, and replacement text. Rules that cannot be safely rewritten must be emitted as hand-review findings instead of silently changing source.
CI Contract
For an application repository:
corvid upgrade check . --json > target/corvid-upgrade-report.jsonExit code 0 means no known migration is pending. Exit code 1 means at least one migration is required. A stable release is blocked if a public breaking change exists without a corresponding corvid upgrade rule or explicit non-scope note in the migration guide.
Schema, Trace, And Connector Manifests
Schema, trace-format, and connector-manifest migrations use the same command family and report shape:
schema.migration_state_v1: migrates migration-state JSON fromcorvid.migration_state.v0tocorvid.migration_state.v1.trace.format_v1: migrates trace envelopes fromcorvid.trace.v0tocorvid.trace.v1.connector.manifest_v1: migrates connector manifests frommanifest_version0.1to1.0.
These rewrites are intentionally narrow and exact-match. If a future schema change needs structural conversion, the rule must parse JSON into typed data and emit hand-review findings for ambiguous cases.