Skip to content

AI-Assisted Migration

When rules aren't enough, scoped AI fills the gap — validated, budget-controlled, and never deployed without passing tests.

Deep Dive

Deterministic first, AI when needed

Ovvoc's hybrid approach means AI is never the first option. Deterministic rules handle known patterns with 100% predictability. AI only activates when the rule engine can't solve a transform.

When AI is needed, it's scoped narrowly: specific file, specific change, specific context. There are 8 category-specific prompts \u2014 not a generic "fix this code" instruction.

Every AI-generated transform goes through the same validation gate: build must pass, tests must pass. No exceptions.

Transform Flow

Rule EngineTry deterministic transform
Category ClassifierIdentify change type
AI CoordinatorBudget check + scoped prompt
AI ModelGenerate targeted transform
ValidationBuild + test must pass

How It Works

Rules first, AI second, validation always

1

Rule Engine First

Deterministic transforms are always attempted first. 150+ rules across 29 packages handle the vast majority of changes.

2

Category Classification

The classifier identifies the change type (paradigm shift, API removal, etc.) and selects the matching category-specific prompt.

3

Scoped AI Generation

AI coordinator sends narrowly scoped context to Gemini. Budget-controlled tokens. Circuit breaker prevents runaway costs.

4

Validation Gate

Generated code must compile and pass tests. If validation fails, the transform is rejected and reported — never deployed.

Technical Demo

AI-assisted ORM migration

Watch the hybrid system handle a Sequelize 6 \u2192 7 migration with mixed rule + AI transforms.

Ovvoc pipeline
|

Use Cases

When rules alone aren't enough

Paradigm Shift

React class components migrated to functional components with hooks. State, lifecycle methods, and refs converted automatically.

Novel ORM Migration

Sequelize model definitions, query patterns, and migration files updated when no existing rule covers the specific API change.

Custom Plugin APIs

When a library completely redesigns its plugin interface, AI understands the intent and rewrites plugin code to match the new API.

When AI Activates

AI is the last resort, not the default

AI activates only for categories 14–25 — the complex transforms where deterministic rules don't exist. Three conditions must all be true before the AI coordinator is invoked:

1

No Matching Rule

The 150+ YAML rules in the rule registry have been checked, and none match the specific change. Deterministic transforms always take priority.

2

Breaking Change Detected

The changelog or version comparison indicates a breaking change that requires code modifications. Simple version bumps never trigger AI.

3

Complex Category

The category classifier identifies the change as a paradigm shift, architecture change, hidden behavior change, or another complex category.

Safety Guardrails

Budget-controlled, circuit-protected, validated

Per-Job Token Budget

Every job has a configurable AI token budget (default: $5). Once the budget is exhausted, the AI coordinator stops generating transforms. Remaining files are reported as needing manual review. No runaway spending.

Circuit Breaker

If 3 consecutive AI-generated transforms fail validation, the circuit breaker trips and AI is disabled for that package for the remainder of the job. This prevents burning tokens on transforms that consistently fail.

Output Validation

Every AI-generated code change must pass the same build and test gates as deterministic transforms. If the generated code breaks the build or fails tests, the transform is rejected and reported — never deployed.

PR Marking

PRs that include AI-assisted transforms are clearly marked in the PR description. We recommend human review for these PRs, especially for critical production codebases. Full transparency about what was AI-generated.

Prompt Engineering

Narrow, specific, category-aware prompts

Ovvoc does not use generic “fix all breaking changes” prompts. Each AI request is scoped to a single file and a single change type. The prompt includes the specific old API signature, the new API signature, and the file context where the change needs to happen.

There are 8 category-specific prompt templates, each tailored to a different type of complex change: paradigm shifts, architecture changes, ORM migrations, plugin API rewrites, hidden behavior changes, type system overhauls, configuration format changes, and coordinated multi-package transforms.

The result is focused, predictable output. The AI is not asked to “understand your codebase” — it is given a narrow task with clear input and expected output format. This dramatically improves the quality and consistency of generated transforms.

AI Under Control

AI that's precise, not wasteful

70%

Updates need zero AI

Targeted

AI only for complex migrations

Per-job

Token usage visible in dashboard

Included

AI transforms in every plan

Most updates are handled deterministically with AST transforms and YAML rules — no AI needed. When AI is required for complex breaking changes, token usage is tracked per job in your dashboard. AI-assisted transforms are included in every plan at no extra cost, with configurable budget controls per repository.

Ready to automate your dependency updates?

Start with one repo. See the difference in your first PR.