8 views
This guide focuses on AI migration assistant for production systems, with practical trade-offs for reliability, security, and cost.
AI migration assistant: production guidance
Project day. Ship a two-agent strangler assistant: a Cut Planner that proposes a service boundary, and an Implementer that emits intents + contract tests — so a monolith endpoint moves behind a façade without a big-bang rewrite.
⚡ TL;DR: Planner outputs StranglerPlan (old route, new service, façade mapping, test list). Implementer applies intents only. Contract tests must pass before merge. Human approves the cut. Emphasize evidence bundles.
Architecture
Ticket → CutPlanner → strangler-plan.json
→ Implementer → intents + contract tests
→ Critic/CI → human merge gate
python
# project/strangler_plan.py
from pydantic import BaseModel
class StranglerPlan(BaseModel):
monolith_route: str
new_service: str
facade_path: str
data_owner: str
contract_tests: list[str]
rollback: str
Step 1 — Planner
bash
Require the plan to cite call-graph edges (who imports the handler) — no vibes-only cuts.
python agents/cut_planner.py \
--ticket MIG-220 \
--repo . \
--out artifacts/strangler-plan.json
Step 2 — Implementer intents
json
[
{"kind": "add_facade", "path": "apps/api/facades/invoices.ts", "params": {"target": "http://invoices:8080"}},
{"kind": "codemod", "path": "apps/api", "params": {"name": "redirect-invoice-reads"}},
{"kind": "add_contract_test", "path": "tests/contract/test_invoice_cut.py", "params": {}}
]
Step 3 — Contract tests (non-negotiable)
python
# tests/contract/test_invoice_cut.py
def test_facade_matches_monolith_golden(client, golden):
new = client.get("/facade/invoices/1").json()
assert new == golden["invoices/1"] # ✅ behavior lock
Step 4 — Evidence bundle
On exit, writeartifacts/evidence.json: plan hash, intents, test JUnit, critic verdict, git SHAs. Reviewers open one folder.
Acceptance criteria
- [ ] Plan schema validates
- [ ] No direct prod IAM tools available to agents
- [ ] Contract tests pass in CI
- [ ] Human approved merge
- [ ] Rollback steps documented in plan
Closing checklist
- [ ] Two agents + contract tests
- [ ] Façade before deleting monolith code
- [ ] Evidence bundle per run
- [ ] Human gate on cut
- [ ] Keep rollback boring and tested
Series navigation
Day 59: Multi-Agent Eval: Task Suites, Not Vibes · Day 61: Prompt Injection in Jira, Email, and RAG Last updated September 11, 2026 Related: AI Migration Assistants: Strangler Fig Cuts With Contract Tests; Day 80: Project: Platform AI Gateway; Day 90: Project: Incident Timeline Summarizer.Watch: 100 Days of AI on YouTube
Short videos from CheatCoders, one AI engineering topic per day.
Most viewed
- Python Decorators Explained: From Simple Wrappers to Production Patterns
- Claude Code vs Cursor vs GitHub Copilot: Choose by Workflow, and Set Up One Repo That Works With All Three
- AI Agent Frameworks in 2025: LangGraph vs CrewAI vs AutoGen vs Raw API
- Python String Methods: Every str Method With Real Production Examples
- Css Animation Performance: Performance-Optimized Motion for Modern UIs
Newly added
- AWS Systems Manager Parameter Store: Hierarchical Runtime Config for Coding Agents
- Amazon Cognito Identity Pools: Federate Coding-Agent Tool Callers Without Long-Lived Keys
- Amazon Athena for Coding Agents: Query Tool Audit Logs and Eval Traces on S3 Without a Warehouse
- AWS Batch for Coding Agents: Parallel Overnight PR Reviews and Long-Running Jobs Without Lambda Timeouts
- Amazon Bedrock Prompt Management: Version and A/B Test Coding-Agent System Prompts
Deep-dive PDF
Get the expanded guide for this post — extra diagrams-style checklists, failure modes, and a production walkthrough. Free when you subscribe to CheatCoders.
Already subscribed? or open the subscribe page.
Discover more from CheatCoders
Subscribe to get the latest posts sent to your email.
