superpowers 完整工程流水线——从脑暴到合入,一个需求的全自动旅程
系列:AI 编程工具生态挖掘 | 字数:约 3200 字 | 预计阅读:8 分钟上一个系列写了很多"怎么让 AI 做一个具体任务"。但你有没有想过——如果让 AI 从理解需求开始,规划方案、写代码、跑测试、自己审查自己、验证通过了再提交,一整套流程全自动跑下来会是什么样?obra/superpowers 就是为这件事设计的。177K stars,是目前社区里最完整的端到端工程流水线。这篇文章完整跑
系列:AI 编程工具生态挖掘 | 字数:约 3200 字 | 预计阅读:8 分钟
上一个系列写了很多"怎么让 AI 做一个具体任务"。但你有没有想过——如果让 AI 从理解需求开始,规划方案、写代码、跑测试、自己审查自己、验证通过了再提交,一整套流程全自动跑下来会是什么样?
obra/superpowers 就是为这件事设计的。177K stars,是目前社区里最完整的端到端工程流水线。
这篇文章完整跑通一次——一个需求从脑暴到合入,全程不手动写一行代码。
superpowers 是什么
九个技能,串成一条流水线:
brainstorming → 理解需求,头脑风暴,输出多种方案
write-plan → 选定方案,拆解成可执行的任务列表
execute-plan → 逐个任务执行,跑测试
test-driven-dev → 写测试→最小实现→重构→循环
subagent-driven-dev → 并行 Agent 分别处理不同模块
systematic-debugging → 系统化调试(不是瞎试)
request-review → 请求另一个 Agent 做代码审查
verification-before-completion → 完工前逐条核验
git-worktrees → 隔离的并行开发环境
不是九个独立工具,是九个互相关联的关卡。上一个关卡的输出是下一个关卡的输入。走完九关,一个需求从一句话变成提交的代码。
安装
/plugin install superpowers-skills@anthropics-claude-code
装完之后 Shift+Tab 切到需要的权限模式,开始。
实战:给一个博客系统加 RSS 订阅功能
有一个 Flask 博客应用,文章、标签、归档都有了。老板说"加个 RSS"。
第一关:brainstorming
用户: /brainstorming 给这个博客系统加 RSS 订阅功能
Claude Code (brainstorming):
• Reading app structure...
• Current: Flask blog with posts, tags, archive
• Options:
A. Flask-FeedGenerator library — 30 min, external dependency
B. Manual XML generation with Jinja2 template — 15 min, no deps
C. atom 格式而非 RSS — 更新,但部分阅读器不兼容
Recommendation: B (manual XML + Jinja2)
Reasoning: No new dependency, the blog already uses Jinja2,
only need 2 templates + 1 route
Want me to write a plan?
脑暴阶段给了三个方案,选了最简的——不引入新依赖,复用已有的 Jinja2 模板系统。这个决策被写入了下一关的输入。
第二关:write-plan
用户: /write-plan 按方案 B 写出实现计划
Claude Code (write-plan):
Task 1: Create RSS XML Jinja2 template (rss.xml.j2)
Task 2: Add /feed route to app.py
Task 3: Add RSS discovery link to base template <head>
Task 4: Write test_rss.py
Success criteria:
✓ GET /feed returns XML with correct Content-Type
✓ Feed contains 20 most recent posts
✓ Each entry has title, link, description, pubDate
✓ Browser auto-discovers feed via <link> tag
计划里每个任务有明确的验收标准。这就是 Goal-Driven Execution——没做之前就知道"怎么验证对不对"。
第三关:execute-plan(穿插 TDD)
执行过程中调用了 TDD 技能——先写测试,再写实现:
→ Task 1: Create rss.xml.j2
[Writing test first] test_rss.py: test_feed_content_type (FAIL expected)
[+] templates/rss.xml.j2 (12 lines)
→ pytest test_rss.py: PASSED
→ Task 2: Add /feed route
[Writing test first] test_rss.py: test_feed_has_20_posts (FAIL)
[+] app.py: @app.route('/feed') (8 lines)
→ pytest test_rss.py: PASSED
→ Task 3: Add RSS discovery link
[~] templates/base.html: <link rel="alternate" type="application/rss+xml">
→ curl -I http://localhost:5000/: link header confirmed
→ Task 4: Final verification
→ pytest tests/: 12 passed (8 existing + 4 new)
→ curl -s http://localhost:5000/feed | xmllint --format -
✓ Valid XML
✓ 20 entries
✓ Correct Content-Type
第四关:request-review
用户: /request-review
Claude Code (reviewer agent):
Reviewing changes in this session:
app.py (+8 lines):
✓ Route naming consistent with existing patterns (/feed follows /tag/<name>)
✓ Error handling: 404 if no posts (matches existing behavior)
⚠ Suggest: Add ETag header for caching (not blocking)
templates/rss.xml.j2 (new file):
✓ Uses existing post.to_dict() method from models/post.py
⚠ Date format: uses strftime('%a, %d %b %Y') — timezone not included.
RFC 822 requires timezone. Consider adding +0000.
test_rss.py (new file):
✓ Covers content type, post count, XML validity
✓ Uses existing fixtures from conftest.py
审查 Agent 发现了日期格式化缺时区的问题——RFC 822 要求时区,没有的话部分 RSS 阅读器会拒绝解析。人对日期的敏感度不如 Agent,这种问题人工 review 大概率漏掉。
第五关:verification-before-completion
修完时区后跑最后一关:
用户: /verification-before-completion
Claude Code:
✓ GET /feed returns Content-Type: application/rss+xml
✓ Response body is valid XML (xmllint verified)
✓ Feed contains 20 most recent posts
✓ Each entry has all required RSS 2.0 fields
✓ <link> tag in base.html matches route URL
✓ All existing tests still pass (12/12)
✓ Review issue (RFC 822 timezone) has been fixed
All criteria met. Ready to commit.
流完了,感觉怎么样
全程下来,写了大概 5 条指令——全是决策,不是代码。代码、测试、审查、验证都是 Agent 自己跑的。
这个流水线的核心价值不是"自动写代码"——是让每道关卡都有人(Agent)把守。头脑风暴防止方向走错、TDD 防止实现出错、审查防止疏漏、验证防止残次品。每一关都是上一关的质检员。
跟直接让 Claude Code "加 RSS 功能"的差距在哪?直接做的话,AI 也做得出来——但不会分方案评估、不会先写测试再写代码、不会自己审查自己、不会列验收标准逐条核验。少了四个关卡,最终代码功能一样,但质量差距明显。
不适合什么场景
快速原型。 如果你在验证一个想法,不需要全套流水线。九关之后原型该推翻的还是要推翻。先用 Karpathy 规则 + 直接指令快速验证。
需求已经非常明确的小改动。 加一个查询参数、修一个 typo——流水线比任务本身还重。
单文件脚本。 一个 data_cleaner.py 不需要 TDD + 审查 + 验证。过度流程化是另一种浪费。
superpowers 最合适的场景——需要跨文件改动的中等复杂度功能、团队协作项目需要一致性质量、或者你不确定"AI 的实现对不对"的时候。
下一篇
superpowers 是端到端的重型方案。下一篇换个风格——Matt Pocock 的四个轻量级技能:/grill-me(盘问你到底要什么)、/tdd(纯测试驱动)、/diagnose(系统化排错)、/caveman(极限节省 token)。80K stars 的 TypeScript 大佬技能包。
更多推荐


所有评论(0)