tdd-migration-pipeline by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill tdd-migration-pipeline仅用于编排的迁移或重写代码库工作流。你不自行读取文件、编写代码或验证任何内容。你仅负责指导智能体并传递上下文(路径,而非内容)。
qlty 和 tldr 技能指导规范智能体(使用 scout 或 architect):
- 使用 tldr-skill 分析 {source_path}
- 输出:包含行为契约、类型、边界情况的 spec.md
智能体提示模板:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
使用 tldr 命令(tldr structure, tldr extract, tldr calls)分析位于 {source_path} 的代码库。
创建 spec.md,包含:
- 所有行为契约(每个函数/类的承诺)
- 输入/输出类型
- 边界情况和不变式
- 组件间的依赖关系
写入:{target_dir}/spec.md
指导测试智能体(使用 arbiter):
- 读取 spec.md
- 在 {target_dir}/tests/ 中编写失败测试
- 测试应在实现前定义预期行为
指导审查智能体(使用 critic):
- 验证测试是否完全覆盖规范
- 确保行为覆盖无遗漏
指导事前分析智能体(使用 premortem 技能):
- 审查规范 + 测试
- 识别故障模式、竞态条件、边界情况
- **不要询问** - 直接将缓解措施添加到规范中
- 运行 3 轮,每次使用全新视角
关键: 每轮都应发现新问题,而非重复之前的问题。
指导计划智能体(使用 architect 或 plan-agent):
- 输入:spec.md + 测试 + 缓解措施
- 输出:phased-plan.yaml
- 要求:
- 依赖关系排序的阶段
- 每个阶段 = 一个可测试单元
- 每个阶段有清晰的输入/输出
对于 phased-plan.yaml 中的每个阶段:
指导构建智能体(使用 kraken 或 spark):
- 编写代码以通过此阶段的测试
- 使用 qlty 进行质量检查
- 每次更改后运行测试
指导审查智能体(使用 critic 或 judge):
- 验证实现是否符合规范
- 检查先前阶段是否存在回归
- 确认没有破坏性更改
指导集成智能体(使用 atlas 或 validator):
- 使用 tldr 与 {reference_repo} 进行差异比较
- 检查:
- 无竞态条件
- 无挂起或死锁
- 相对于原始版本无破坏性更改
- 所有行为契约均保留
- 输出:validation-report.md
调用此工作流时,请指定:
SOURCE: {源代码路径}
TARGET_DIR: {用于迁移代码的新文件夹}
TARGET_LANG: {typescript|python|go|rust|等}
REFERENCE_REPO: {用于最终差异比较的 URL 或路径}
SKILLS: [tldr-code, qlty-check, {领域特定技能}]
| 阶段 | 智能体类型 | 子智能体 |
|---|---|---|
| 规范 | research | scout 或 architect |
| 测试 | validate | arbiter |
| 审查 | review | critic 或 judge |
| 事前分析 | review | premortem 技能 |
| 计划 | plan | architect 或 plan-agent |
| 构建 | implement | kraken(大型)或 spark(小型) |
| 集成 | validate | atlas 或 validator |
# 阶段 1
Task(scout): "使用 tldr structure 和 tldr extract 分析 /src/old-system。
在 /migration/spec.md 创建包含所有行为契约的 spec.md。"
# 阶段 2
Task(arbiter): "读取 /migration/spec.md。将定义预期行为的失败测试写入 /migration/tests/。"
Task(critic): "审查 /migration/spec.md 与 /migration/tests/。
报告任何行为覆盖缺口。"
# 阶段 3 (x3)
Task(premortem): "审查 /migration/spec.md 和 /migration/tests/。
识别故障模式。直接将缓解措施添加到规范中。第 1/3 轮。"
[使用"第 2/3 轮"、"第 3/3 轮"重复]
# 阶段 4
Task(architect): "根据 /migration/spec.md 和 /migration/tests/,
创建具有依赖关系排序阶段的 /migration/phased-plan.yaml。"
# 阶段 5 (循环)
Task(kraken): "实现 /migration/phased-plan.yaml 中的阶段 1。
代码放在 /migration/src/。之后运行测试。"
Task(critic): "根据 /migration/spec.md 审查 /migration/src/。
检查是否符合规范以及是否存在回归。"
[为每个阶段重复]
# 阶段 6
Task(atlas): "在 /migration/src/ 上运行完整集成测试。
使用 tldr 与 /src/old-system 进行差异比较。
输出 /migration/validation-report.md。"
每周安装量
194
代码仓库
GitHub 星标数
3.6K
首次出现
2026年1月22日
安全审计
安装于
opencode188
codex187
gemini-cli186
cursor184
github-copilot183
amp179
Orchestrator-only workflow for migrating or rewriting codebases. You do NOT read files, write code, or validate anything yourself. You only instruct agents and pipe context (paths, not contents).
qlty and tldr skillsInstruct spec-agent (use scout or architect):
- Analyze {source_path} using tldr-skill
- Output: spec.md with behavioral contracts, types, edge cases
Agent prompt template:
Analyze the codebase at {source_path} using tldr commands (tldr structure, tldr extract, tldr calls).
Create spec.md with:
- All behavioral contracts (what each function/class promises)
- Input/output types
- Edge cases and invariants
- Dependencies between components
Write to: {target_dir}/spec.md
Instruct test-agent (use arbiter):
- Read spec.md
- Write failing tests in {target_dir}/tests/
- Tests should define expected behavior before implementation
Instruct review-agent (use critic):
- Validate tests cover spec completely
- No gaps in behavioral coverage
Instruct premortem-agent (use premortem skill):
- Review spec + tests
- Identify failure modes, race conditions, edge cases
- DO NOT ASK - just add mitigations directly to spec
- Run 3 passes with fresh perspective each time
Key: Each pass should find NEW issues, not repeat previous ones.
Instruct planner-agent (use architect or plan-agent):
- Input: spec.md + tests + mitigations
- Output: phased-plan.yaml
- Requirements:
- Dependency-ordered phases
- Each phase = one testable unit
- Clear inputs/outputs per phase
For each phase in phased-plan.yaml:
Instruct builder-agent (use kraken or spark):
- Write code to pass tests for this phase
- Use qlty for quality checks
- Run tests after each change
Instruct review-agent (use critic or judge):
- Validate implementation matches spec
- Check for regressions in previous phases
- Verify no breaking changes
Instruct integration-agent (use atlas or validator):
- Use tldr to diff against {reference_repo}
- Check for:
- No race conditions
- No hangs or deadlocks
- No breaking changes vs original
- All behavioral contracts preserved
- Output: validation-report.md
When invoking this workflow, specify:
SOURCE: {path to source code}
TARGET_DIR: {new folder for migrated code}
TARGET_LANG: {typescript|python|go|rust|etc}
REFERENCE_REPO: {url or path for final diff comparison}
SKILLS: [tldr-code, qlty-check, {domain-specific}]
| Phase | Agent Type | Subagent |
|---|---|---|
| Spec | research | scout or architect |
| Tests | validate | arbiter |
| Review | review | critic or judge |
| Premortem | review | premortem skill |
| Plan |
# Phase 1
Task(scout): "Analyze /src/old-system using tldr structure and tldr extract.
Create spec.md at /migration/spec.md with all behavioral contracts."
# Phase 2
Task(arbiter): "Read /migration/spec.md. Write failing tests to /migration/tests/
that define expected behavior."
Task(critic): "Review /migration/spec.md vs /migration/tests/.
Report any behavioral gaps."
# Phase 3 (x3)
Task(premortem): "Review /migration/spec.md and /migration/tests/.
Identify failure modes. Add mitigations directly to spec. Pass 1/3."
[repeat with "Pass 2/3", "Pass 3/3"]
# Phase 4
Task(architect): "From /migration/spec.md and /migration/tests/,
create /migration/phased-plan.yaml with dependency-ordered phases."
# Phase 5 (loop)
Task(kraken): "Implement phase 1 from /migration/phased-plan.yaml.
Code goes in /migration/src/. Run tests after."
Task(critic): "Review /migration/src/ against /migration/spec.md.
Check for spec compliance and regressions."
[repeat for each phase]
# Phase 6
Task(atlas): "Run full integration tests on /migration/src/.
Use tldr to diff against /src/old-system.
Output /migration/validation-report.md."
Weekly Installs
194
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode188
codex187
gemini-cli186
cursor184
github-copilot183
amp179
开源项目教练指南 - 诊断问题、制定行动计划、优化开源项目运营
31,600 周安装
| plan |
architect or plan-agent |
| Build | implement | kraken (large) or spark (small) |
| Integration | validate | atlas or validator |