From developer-workflow
Guides safe migration of technologies in existing Android/Kotlin projects: RxJava→coroutines, XML→Compose, library swaps (Glide→Coil, Retrofit→Ktor), Java→Kotlin, Gradle DSL upgrades.
npx claudepluginhub kirich1409/krozov-ai-tools --plugin developer-workflowThis skill uses the workspace's default tool permissions.
**Core principle:** Discover what exists → confirm FROM/TO with user → snapshot current behavior → migrate with the right strategy → verify nothing changed → clean up the old.
Generates migration plans, automated scripts, and strategies for transitioning codebases between frameworks, languages, versions, and platforms.
Generates migration plans, automated scripts, risk assessments, testing strategies, and rollback procedures for transitioning codebases between frameworks, languages, versions, or platforms.
Plans and executes phased migrations for framework upgrades, API bumps, dependency major versions, and deprecations with compatibility verification.
Share bugs, ideas, or general feedback.
Core principle: Discover what exists → confirm FROM/TO with user → snapshot current behavior → migrate with the right strategy → verify nothing changed → clean up the old.
Never start migrating before snapshot is green. Never claim done without a green verify and user approval of visual diffs.
digraph code_migration {
rankdir=TB;
node [shape=box];
discover [label="DISCOVER\nRead target · infer FROM/TO\ncategorize · select strategy\nlarge-scope gate"];
confirm [label="CONFIRM\nFrom/To · strategy · scope\nwait for user approval"];
snapshot [label="SNAPSHOT\nCapture current behavior\n(tests / screenshots / checklist)"];
snapshot_green [label="Snapshot green?", shape=diamond];
migrate [label="MIGRATE\nIn-place or parallel"];
verify [label="VERIFY + CLEANUP\nTests · visual diff · API check\ncleanup list · final build"];
done [label="Done", shape=doublecircle];
stop_discuss [label="Stop: discuss with user"];
discover -> confirm;
confirm -> snapshot;
snapshot -> snapshot_green;
snapshot_green -> migrate [label="yes"];
snapshot_green -> stop_discuss [label="no"];
migrate -> verify;
verify -> done;
}
Never do a large migration in a single MR. One huge PR is hard to review, hard to roll back, and hides regressions until it's too late. Break migrations into small, independently mergeable PRs — each one green on its own.
| PR | Contents | Why separate |
|---|---|---|
| Preparation | Module isolation, migration-checklist.md, behavior-spec.md | Sets up the plan; no behavior change; easy to review |
| Snapshot | Characterization tests only — no production code changes | Reviewers can verify tests are green and match existing behavior before anything moves |
| Migration batch(es) | Actual code changes — split by module, layer, or file group | Each batch is independently rollbackable; CI catches regressions at each step |
| Bridge cleanup | Remove *Compat.kt / *Bridge.kt, old implementation, old Gradle deps | Clearly separated from migration logic; easy to verify nothing is still referencing the old code |
For each migration PR: all Snapshot tests must be green before it merges. When proposing a migration plan, include the PR breakdown explicitly.
Read the target thoroughly before doing anything else
Infer FROM technology by reading the code (imports, APIs used, build files)
Infer TO technology from user input — ask if ambiguous (e.g., "modernize" without specifying)
Categorize each file/class — one file can belong to multiple categories:
logic — pure data/business logic, no UI (DateUtils, repositories, use cases, data classes)ui — views, layouts, screens, composables, fragmentsapi — public interfaces, shared module boundaries, Gradle configs, entry pointsAnalyze codebase impact — gather the facts that drive the proposal:
build.gradle.kts for adapters/extensions specific to the old technology. For each: categorize as replace, update, remove, or compatible. Use maven-mcp tools to check latest artifact names and versions. Present the matrix to the user before Phase 2.Propose 1–3 strategy options — be opinionated: one clearly recommended, unfit strategies explicitly dismissed with reasons. See references/strategies.md for the strategy table, option format, and module isolation guidance.
After user chooses — if >5 files or module restructuring, generate a migration-checklist.md:
| Unit | Category | Strategy | Snapshot method | Depends on |
|------|----------|----------|-----------------|------------|
| UserRepository | logic | Parallel | characterization tests | — |
| UserViewModel | logic | In-place | characterization tests | UserRepository |
| FeedFragment | ui | Feature-flagged | screenshot baseline | — |
Present plan to user — wait for approval before Phase 2
Found a bug while reading or migrating code?
Capture current behavior before touching any code. Apply all strategies matching target categories.
Order when multiple categories apply: logic → ui → api
behavior-spec.md for the target — see references/snapshot-and-verify.md for the template and confirmation promptlogic targets, capture screenshots for ui targets, list public surface for api targets — see references/snapshot-and-verify.md for detailed proceduresHard rule: Phase 3 does NOT start until Snapshot is complete. If Snapshot cannot be made green (existing tests broken): stop, discuss with user, fix snapshot first — never proceed with a broken baseline.
Apply the strategy chosen in Phase 1. See references/strategies.md for detailed step-by-step instructions and code examples for each strategy:
*Compat.kt/*Bridge.kt layer for API shape changesApply Bug Discovery Rule throughout.
See references/snapshot-and-verify.md for detailed verify procedures (regression diagnosis, visual diff, spec review, API check, cleanup).
ui targets) — present before/after to user, wait for approvalbehavior-spec.md line by lineapi targets) — compile + caller tests./gradlew build — must be greenui targets)api targets)./gradlew build green| Red Flag | What It Means |
|---|---|
| "I'll add tests after the migration" | Snapshot must be green before Phase 3 — no exceptions, even under deadline |
| "User told me to skip tests" | User instructions do not override this hard rule |
| "The tests are broken, I'll fix them during migration" | Stop, discuss with user, fix snapshot first |
| "It's a small file, in-place is fine" | Check callers first — many callers → parallel |
| "The screenshots look fine, no need to show the user" | Visual diff MUST be presented and approved by user |
| "User said to just mark it done" | User approval of diff ≠ skipping the diff step; show it first |
| "The before/after look identical, no need to bother the user" | Present the diff regardless — the user's eyes decide, not yours |
| "These old files are clearly unused, I'll just delete them" | Present removal list to user first, always |
| "I noticed a bug, I'll fix it quickly" | Stop, describe to user, get explicit direction |
| "Build has a minor issue, I'll declare done anyway" | Final build must be green |
| "I'm confident I inferred FROM/TO correctly, no need to confirm" | Confirm anyway — inference from vague instructions is cheap to verify and expensive to redo |
| "Tests failed but it's probably a flaky test" | Treat all post-migration test failures as regressions until proven otherwise |
Verify fails (tests don't pass after migration):
Use superpowers:systematic-debugging if available. Otherwise: read the failing test, compare old vs new code, revert a single file to confirm it was green before, then narrow down what broke it. Fix in the migrated code — never weaken the test.
Before claiming done:
Use superpowers:verification-before-completion if available. Otherwise: run through the done checklist above line by line. Run the actual commands, don't assume they'll pass.
Scope unexpectedly larger than expected: Stop. Describe the new scope to the user with a revised file count and risk assessment. Agree on a new strategy before continuing — do not silently expand the migration.
Large migration needing a structured plan:
Use superpowers:writing-plans if available. Otherwise: write a migration-checklist.md (see Phase 1, step 7 for the format) and share it with the user for approval before starting Phase 2.