嘿啊,大家!我之前在另一篇文章的评论中提到过这个话题,但我想在这次分享我的Claude代码开发工作流程。
前提条件:
- 加载obra/superpowers技能集
- 加载dbinky/dbinky-skill-set技能
- 安装dbinky/ralph-o-matic
1 - 功能性规格生产
我首先使用以下提示来开始:
&&Use the superpowers:brainstorm skill to produce a product specification document (at docs/specs/some-feature-spec.md). We're going to concentrate on the product features and outcomes and will not bring any implementation details into the document. Here's what I'd like to discuss with you: {thorough description of the product feature}
插件会扫描代码和最近的代码变化,然后进入Q&A循环与您讨论产品规格的细节。
2 - 功能设计生产
使用刚刚写好的规格文件,我然后提示它:
&&Use the superpowers:brainstorm skill again to produce an implementation design for the spec we just wrote (at docs/specs/some-feature-spec.md). The implementation design may be multiple phases of work and we want to create a separate design document for each logical phase. Those documents will be stored as docs/superpowers/specs/some-feature-design-phase-*.md. Read through the spec thoroughly for context and then let's figure out the high level implementation details for these design docs.
插件会执行代码扫描并读取规格,然后进入Q&A循环与您讨论高级实现细节。
3 - 设计文档对齐
接下来,我告诉它:
&&We have just produced a series of design documents that represent the high-level implementation details of the product spec at docs/specs/some-feature-spec.md. From that, you just produced a series of implementation design docs at docs/superpowers/specs/some-feature-design-phase-*.md. I want you to review the feature spec and the holistically review the design phase docs together for alignment both to the spirit of the feature spec and to each other. Check for end-to-end coherence between documents (aligned models, terminology, use cases, etc) and update them so they are correct as a body of work.
这个做了对设计文档的审查,以确保他们与规格文件和其他文档保持一致。
4 - 实现计划生产
>We need to write detailed implementation plans (using the superpowers:writing-plans skill) for all of the high-level design documents at docs/superpowers/specs/some-feature-design-phase-*.md. Each design phase may have multiple implementation tasks and I want you to store each of those tasks as a separate, detailed implementation file as docs/superpowers/plans/some-feature-implementation-phase-*-task-*.md. Write all of these plans in one end-to-end effort.
现在将设计文档打破成多个详细计划
5 - 实现计划对齐
>We have just produced a series of implementation plans that represent the product spec at docs/specs/some-feature-spec.md which has been expressed as high-level design documents here: docs/superpowers/specs/some-feature-design-phase-*.md. From those, you just produced a series of detailed plans at docs/superpowers/plans/some-feature-implementation-phase-*-task-*.md. I want you to review the feature spec, the designs, and the plans and then holistically review the implementation plans together for alignment both to the spirit of the feature spec and to each other. Check for end-to-end coherence between documents (aligned models, terminology, use cases, etc) and update them so they are correct as a body of work.
6 - “草稿”实现
此时,我告诉它进行一次完整的实现:
&&We are going to implement the feature (spec located at docs/specs/some-feature-spec.md) using a series of detailed implementation plans here: docs/superpowers/specs/some-feature-design-phase-*.md. The user is unavailable for input. Use subagent-driven implementation and spawn a fresh subagent for each task of each phase. Review the plans, themselves, for dependencies and parallelize execution as much as is feasible. Do all phase and task implementations in one concerted effort - do not stop for review or permissions.
7 - 为细化循环做准备
接下来,我使用技能 `/plan-to-ralph` (属于dbinky-skill-set) 来帮助创建 Ralph Wiggum 循环基础设施。它会问很多问题,最后会创建 RALPH.md 和 2 个跟踪文件,它们用来管理工作。
8 - 速成工作
最后,我将所有这些内容喂入 Ralph-o-matic 使用_skill_“/direct-to-ralph”。我指定循环次数(通常会选择一个较高的数字,如 200+),并告诉它在我的本地仓库和分支上工作,使用 existed RALPH.md 文件(来自七步)。这将工作流递交到ROM 服务器,它会使用Claude代码作为“石头的砂轮”来处理代码。你不能在这时工作在这个仓库/分支上,所以我通常在睡觉前执行此操作。
9 - PR 审查
最后,我创建一个PR,并跑起 dbinky-skill-set 中的 /pr-review,它是一个反向审查过程,可以产生一个建议修复清单。通常我告诉它“fix all but defer”(它以 Must、Should、Could 和 Defer 为排序,建议修复清单)。然后它就可以自己去修复了。
10 - 完成
每次我使用这个过程,我都会有 *excellent* 结果。它生成了少量bug,用户体验也非常好。
我自己编写了一个技能来自动化这个过程,但这些步骤是我几个月前开始使用的用于生产很多硬梳梳的项目代码。
我很希望听到大家的想法!
评论 (0)