tdd-migrate by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill tdd-migrate通过代理完成所有工作来编排 TDD 迁移。主上下文保持清洁。
/tdd-migrate <source_path> <target_path> --pattern <reference> --items "item1,item2,item3"
source_path: 要分析的路径(现有代码)target_path: 创建新代码的位置pattern: 要遵循的参考文件/模式items: 要创建的项目列表,以逗号分隔Phase 0: YAML 待办事项列表
│
▼
Phase 1: TLDR 分析 ─────────────────┐
│ │
▼ │ 并行侦察员
Phase 2: 编写失败测试 ───────────────┤ 每个项目
│ │
▼ │
Phase 3: 实现(最小化) ─────────────┤
│ │
▼ │
Phase 4: 构建 + 通过测试 ────────────┘
│
▼
Phase 5: QLTY 检查 ──────────────────┐
│ │ 并行
Phase 6: 审查代理验证 ────────────────┘
│
▼
Phase 7: TLDR 差异对比(新文件与参考文件)
│
▼
Phase 8: 修复问题(如果有)
│
▼
完成
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
主上下文 = 仅用于编排
代理完成所有工作
| 任务 | 代理 |
|---|---|
| 探索/分析 | scout |
| 编写测试 + 实现 | kraken |
| 快速修复 | spark |
| 运行测试/验证 | validator |
| 代码审查 | critic |
在独立处并行
每个主要步骤后进行审查
将 YAML 计划文件写入 thoughts/shared/plans/<name>-tdd.yaml:
---
title: <迁移名称>
date: <今天>
type: 实施计划
approach: TDD(测试 → 构建 → 通过 → 审查)
items:
- name: item1
file: <target_path>/item1.ts
test: <target_path>/__tests__/item1.test.ts
deps: []
- name: item2
# ...
reference: <pattern_file>
workflow:
per_item:
1: 编写失败测试
2: 最小化实现
3: 构建
4: 通过测试
5: QLTY 检查
6: 审查
final:
7: 集成测试
8: TLDR 差异对比
Task (scout): 使用 TLDR 分析 <source_path>
Task (scout): 分析 <pattern> 以理解结构
Task (scout): 读取迁移交接文件(如果存在)
对于每个项目,启动一个执行完整 TDD 的 kraken:
Task (kraken): 使用 TDD 工作流程实现 <item>
1. 读取模式文件
2. 编写失败测试
3. 实现
4. 运行:bun test <test_file>
5. 运行:qlty check <impl_file>
Task (critic): 对照模式审查所有新文件
Task (validator): 运行完整测试套件
Task (validator): 对所有文件进行 QLTY 检查
如果 critic/validator 发现问题:
Task (spark): 修复 <具体问题>
Task (validator): 重新验证
Task (validator): 对新文件与参考文件进行 TLDR 差异对比
- tldr structure <new_file> --lang <lang>
- tldr structure <reference> --lang <lang>
- 比较模式
在分类账中更新已完成的工作。
/tdd-migrate /Users/cosimo/Documents/rigg/src/sdk/providers \
/Users/cosimo/Documents/rigg/src/sdk/providers \
--pattern lmstudio.ts \
--items "xai,cerebras,togetherai,deepinfra,perplexity"
结果:
| 不良做法 | 良好做法 |
|---|---|
| 在主上下文中读取文件 | 启动侦察员代理 |
| 在主上下文中编写代码 | 启动 kraken/spark 代理 |
| 在主上下文中运行测试 | 启动验证器代理 |
| 跳过审查 | 始终启动 critic 代理 |
| 顺序处理项目 | 并行 kraken 代理 |
| 在主上下文中修复 | 启动 spark 代理 |
探索 <path> 以理解:
1. 结构/模式
2. 接口/类型
3. 依赖关系
返回用于实施的可操作摘要。
使用 TDD 实现 <item>:
1. 读取 <pattern> 了解结构
2. 在 <test_path> 编写失败测试
3. 在 <impl_path> 实现最小化功能
4. 运行:<test_command>
5. 运行:qlty check <impl_path>
报告:状态、问题、创建的文件。
对照 <pattern> 审查 <files>:
1. 模式合规性
2. 类型安全
3. 缺少的注册项
4. 安全问题
请勿编辑。仅报告问题。
修复 <specific issue>:
1. 读取 <file>
2. 进行最小化编辑
3. 验证修复
验证 <files>:
1. 运行 <test_command>
2. 运行 qlty 检查
3. 报告通过/失败/问题
每周安装量
191
代码仓库
GitHub 星标数
3.6K
首次出现
2026年1月22日
安全审计
安装于
opencode185
codex184
gemini-cli183
cursor181
github-copilot180
amp176
Orchestrate TDD migrations with agents doing all work. Main context stays clean.
/tdd-migrate <source_path> <target_path> --pattern <reference> --items "item1,item2,item3"
source_path: Path to analyze (existing code)target_path: Where to create new codepattern: Reference file/pattern to followitems: Comma-separated list of things to createPhase 0: YAML TODO List
│
▼
Phase 1: TLDR Analysis ─────────────────┐
│ │
▼ │ Parallel scouts
Phase 2: Write Failing Tests ───────────┤ per item
│ │
▼ │
Phase 3: Implement (minimal) ───────────┤
│ │
▼ │
Phase 4: Build + Pass Tests ────────────┘
│
▼
Phase 5: QLTY Check ────────────────────┐
│ │ Parallel
Phase 6: Review Agent Validates ────────┘
│
▼
Phase 7: TLDR Diff (new vs reference)
│
▼
Phase 8: Fix Issues (if any)
│
▼
Complete
Main context = orchestration only
Agents do ALL work
| Task | Agent |
|---|---|
| Explore/analyze | scout |
| Write tests + implement | kraken |
| Quick fixes | spark |
| Run tests/validate | validator |
| Code review | critic |
Parallel where independent
Review after each major step
Write a YAML plan file to thoughts/shared/plans/<name>-tdd.yaml:
---
title: <Migration Name>
date: <today>
type: implementation-plan
approach: TDD (test → build → pass → review)
items:
- name: item1
file: <target_path>/item1.ts
test: <target_path>/__tests__/item1.test.ts
deps: []
- name: item2
# ...
reference: <pattern_file>
workflow:
per_item:
1: Write failing test
2: Implement minimal
3: Build
4: Pass test
5: QLTY check
6: Review
final:
7: Integration test
8: TLDR diff
Task (scout): Analyze <source_path> with TLDR
Task (scout): Analyze <pattern> to understand structure
Task (scout): Read migration handoff if exists
For each item, launch ONE kraken that does full TDD:
Task (kraken): Implement <item> using TDD workflow
1. Read pattern file
2. Write failing test
3. Implement
4. Run: bun test <test_file>
5. Run: qlty check <impl_file>
Task (critic): Review all new files against pattern
Task (validator): Run full test suite
Task (validator): QLTY check all files
If critic/validator found issues:
Task (spark): Fix <specific issue>
Task (validator): Re-validate
Task (validator): TLDR diff new files vs reference
- tldr structure <new_file> --lang <lang>
- tldr structure <reference> --lang <lang>
- Compare patterns
Update ledger with completed work.
/tdd-migrate /Users/cosimo/Documents/rigg/src/sdk/providers \
/Users/cosimo/Documents/rigg/src/sdk/providers \
--pattern lmstudio.ts \
--items "xai,cerebras,togetherai,deepinfra,perplexity"
Resulted in:
| Bad | Good |
|---|---|
| Read files in main context | Launch scout agent |
| Write code in main context | Launch kraken/spark agent |
| Run tests in main context | Launch validator agent |
| Skip review | Always launch critic |
| Sequential items | Parallel krakens |
| Fix in main context | Launch spark |
Explore <path> to understand:
1. Structure/patterns
2. Interfaces/types
3. Dependencies
Return actionable summary for implementation.
Implement <item> using TDD:
1. Read <pattern> for structure
2. Write failing test to <test_path>
3. Implement minimal to <impl_path>
4. Run: <test_command>
5. Run: qlty check <impl_path>
Report: status, issues, files created.
Review <files> against <pattern>:
1. Pattern compliance
2. Type safety
3. Missing registrations
4. Security issues
DO NOT edit. Report issues only.
Fix <specific issue>:
1. Read <file>
2. Make minimal edit
3. Verify fix
Validate <files>:
1. Run <test_command>
2. Run qlty check
3. Report pass/fail/issues
Weekly Installs
191
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode185
codex184
gemini-cli183
cursor181
github-copilot180
amp176
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
150,000 周安装