← 返回案例库
CUSTOMER STORY · 会议纪要与团队协作

Claude Code 迁移遗留产品:15 个工作日、约 50 个工单、580 个测试通过

Migrate a legacy product stack with Claude Code

Tools · 使用工具Claude Code
Source · 来源原作者 · DEV
Zaowuyun · 可参考能力上下文管理
01

谁在用

Who

一位负责遗留系统迁移的工程师。

02

遇到什么问题

Challenge

遗留产品跨多个仓库和数据库,迁移工作量大、风险高。

03

怎么用 AI 解决

Solution
  1. 写分层的 CLAUDE.md 上下文文件,给 Claude Code 遗留仓库、只读 MySQL 和 PostgreSQL 连接及参考实现。
  2. Claude 起草设计,并行评审智能体做压力测试,再生成 19 个 Jira 工单。
  3. 每个工单配设计文档和计划文档,经他审阅后在独立 git worktree 中执行,并监控 CI。
04

结果如何

Results据原作者自述
  • 约 15 个工作日完成约 50 个工单、580 个测试通过,API 覆盖率 95% 以上,交付 QA 时零缺陷零漏洞
  • AI 评审只发现 30–40% 的问题;Bedrock token 花费接近 5000 美元;Confluence MCP 会静默截断内容

以上内容均由原作者自行报告,未经独立核实,也不代表造物云产品的效果。

05

提示词

Prompt

参考提示词(由 agentusecases.ai 整理为模板,非原帖原文)

中文

我想把【遗留产品】从【当前技术栈】迁移到【目标技术栈】做概念验证。先阅读代码库,写一份分阶段迁移计划并列出风险,经我批准后再分阶段执行。

ENGLISH

I want a proof-of-concept migration of [legacy product] from [current stack, e.g. 4 repos, MySQL, old framework version] to [target stack, e.g. 2 repos, PostgreSQL, current framework]. Start by reading the codebases and writing a phased migration plan with risks, then execute the first phase on a new branch with tests passing. Pause for my review before merging anything or running changes against any real database.