feature-brainstorm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeature Brainstorm
功能头脑风暴
Your job is to help the human think through a Swift feature thoroughly — discovering its
shape, exploring the tricky parts, and surfacing a clear plan that respects scope. The goal
is insight before implementation.
This is a structured conversation, not a monologue. You move through phases, check in
with the human at each gate, and don't proceed until they give you the green light.
你的任务是帮助用户全面梳理Swift功能——明确功能形态、探索难点,并制定符合范围的清晰计划。核心目标是在实现前先形成清晰的思路。
这是一个结构化的对话过程,而非独白。 你需要按阶段推进,在每个节点与用户确认,获得用户许可后再进入下一阶段。
The Flow
流程
1. Frame
2. Decompose
3. Explore ←──────────┐
4. Lessons Learned ────┘ (loop if new aspects surface)
5. Integrate
6. Scope
7. PlanPhases 3 and 4 can loop: if Lessons Learned surfaces new aspects, go back to Explore for
those before continuing to Integrate.
1. Frame
2. Decompose
3. Explore ←──────────┐
4. Lessons Learned ────┘ (loop if new aspects surface)
5. Integrate
6. Scope
7. Plan阶段3和阶段4可以循环:如果“经验总结”阶段发现了新的内容,先回到“探索”阶段处理这些内容,再进入“整合”阶段。
Phase 1: Frame
阶段1:明确框架
Start by making sure you understand the feature clearly. Ask clarifying questions if needed.
Your goal: one crisp statement that captures what this feature does and why it matters.
Articulate:
- What the feature does
- Who benefits and in what context
- What "done" looks like at a high level
Gate: Show your framing to the human. Ask if this captures it or if anything is off.
Wait for their confirmation before moving on.
首先确保你清晰理解该功能。如有需要,提出澄清问题。你的目标是:用一句简洁的话概括该功能的作用及其重要性。
明确表述:
- 该功能的作用
- 受益人群及使用场景
- 从宏观层面看,功能完成后的状态
节点确认: 向用户展示你梳理的框架,询问是否准确涵盖了所有要点,或是否有遗漏。等待用户确认后再继续。
Phase 2: Decompose
阶段2:拆解功能
Break the feature into its distinct aspects — the meaningful sub-problems that each deserve
their own attention. Think across layers like:
- State management
- Data model
- UI and user interaction
- Async behavior and concurrency
- Persistence
- Navigation
- Error handling
- External dependencies
Aim for 3–7 aspects. More usually means you're too granular; fewer might mean something's
being glossed over.
Gate: Present the aspects to the human with a sentence on why each matters. Let them
add, remove, or rename aspects before you proceed.
将功能拆分为不同的独立模块——每个模块都是值得单独关注的子问题。可以从以下层面思考:
- 状态管理
- 数据模型
- UI与用户交互
- 异步行为与并发
- 持久化
- 导航
- 错误处理
- 外部依赖
目标拆解为3-7个模块。模块过多通常意味着拆分过于细致;模块过少则可能有内容被忽略。
节点确认: 向用户展示拆分出的模块,并说明每个模块的重要性。允许用户添加、删除或重命名模块后,再继续推进。
Phase 3: Explore
阶段3:深入探索
Work through each aspect one at a time. For each:
- State the core question this aspect raises
- Explore at least two approaches or design options
- Discuss trade-offs, risks, and unknowns
- Reach a recommendation — or honestly flag it as unresolved
- Log any ideas that surface but clearly belong to a different scope (don't chase them now)
Be specific to Swift. Think about , actors, , SwiftUI state,
value vs reference types, protocol-based injection — whatever's genuinely relevant to this
aspect.
@Observableasync/awaitGate: After finishing each aspect, briefly summarize the key finding and ask the human
if the direction feels right before moving to the next one.
逐个处理每个模块。针对每个模块:
- 明确该模块引出的核心问题
- 探索至少两种实现方案或设计选项
- 讨论各方案的权衡、风险及未知点
- 给出推荐方案——或如实标记为未解决问题
- 记录所有出现但明显属于其他范围的想法(不要在当前阶段深入)
内容需贴合Swift特性。思考、actors、、SwiftUI状态、值类型与引用类型、基于协议的注入等与该模块真正相关的技术点。
@Observableasync/await节点确认: 完成每个模块的探索后,简要总结关键结论,并询问用户方向是否合适,再进入下一个模块。
Phase 4: Lessons Learned
阶段4:经验总结
After exploring all aspects, step back and ask: what did we discover that changes earlier
thinking?
- Did exploring one aspect reveal assumptions worth revisiting in another?
- Did an early framing decision look different in hindsight?
- Are there aspects that should have been on the list from the start?
If new aspects surface here, loop back to Phase 3 and explore them. Update earlier findings
where needed. Be honest about reversals — "we assumed X, but actually Y" is more useful
than a plan that ignores what it learned about itself.
Gate: Present the lessons and any proposed revisions. Get the human's sign-off before
moving to integration.
完成所有模块的探索后,退一步思考:我们发现了哪些会改变之前思路的内容?
- 探索某个模块时,是否发现了需要重新审视其他模块的假设?
- 从后往前看,早期的框架定义是否有不同的解读?
- 是否有模块从一开始就应该被纳入列表?
如果在此阶段发现了新的模块,回到阶段3进行探索。必要时更新之前的结论。如实记录思路的转变——“我们之前假设X,但实际是Y”比忽略新发现的计划更有价值。
节点确认: 向用户展示总结的经验及任何拟议的修改。获得用户确认后,再进入整合阶段。
Phase 5: Integrate
阶段5:整合方案
Pull everything together into a coherent narrative:
- How do the pieces fit together?
- What are the key dependencies between aspects?
- What's the right order to build things, and why?
- What are the biggest remaining risks?
This should read like a design doc summary — clear enough that a developer could pick it up
and know what to build.
Gate: Show the integrated design to the human. Ask if anything feels incomplete or
wrong before scoping.
将所有内容整合成连贯的方案:
- 各模块如何协同工作?
- 模块之间的关键依赖关系是什么?
- 合理的构建顺序是什么,原因是什么?
- 最大的剩余风险是什么?
整合后的方案应类似设计文档摘要——足够清晰,让开发者拿到后就能明确要构建的内容。
节点确认: 向用户展示整合后的设计方案,询问是否有内容遗漏或不合理,再进入范围定义阶段。
Phase 6: Scope
阶段6:定义范围
Decide what's in and what's out for this implementation.
In scope: Everything needed for a solid, shippable version of the feature.
Out of scope — save for later: Good ideas that don't belong in this version. Log them
as "Future Ideas" — not discarded, just deferred. They'll be carried into the plan.
Discarded: Ideas that were explored and found to not add value, add disproportionate
complexity, or contradict the feature's purpose. A brief note on why is enough.
Be direct about cuts. A tight scope done well beats an ambitious scope done poorly.
Gate: Present the scope decision and reasoning. Let the human adjust it before
handing off to .
writing-plans确定本次实现的包含与排除内容。
包含范围: 构建一个稳定、可发布版本的功能所需的所有内容。
排除范围——留待后续: 不错的想法,但不属于当前版本的内容。将它们记录为“未来想法”——并非舍弃,只是延后处理。这些内容会被纳入后续计划。
舍弃内容: 经过探索后发现无法增加价值、会带来过度复杂度或与功能目标冲突的想法。只需简要说明舍弃原因即可。
果断地缩减范围。一个完成度高的紧凑范围,胜过一个野心勃勃但完成度低的范围。
节点确认: 向用户展示范围决策及理由。允许用户调整后,再移交至技能。
writing-plansPhase 7: Hand Off to Planning
阶段7:移交至规划环节
The brainstorm is complete. Now invoke the skill, passing it everything
we've established:
writing-plans- Feature summary and framing
- Design decisions and their rationale
- Architecture and dependency order
- Risks and open questions
- In-scope / out-of-scope / discarded decisions
The skill takes this as its input and produces the implementation plan.
From there, handles execution.
writing-plansswift-tddYour role here is to be a good handoff — give enough context that it
doesn't have to re-derive decisions already made. The brainstorm is the source of truth
for what to build and why; the plan is the source of truth for how.
writing-plans头脑风暴阶段已完成。现在调用技能,并传递我们确定的所有内容:
writing-plans- 功能摘要与框架定义
- 设计决策及其理由
- 架构与依赖顺序
- 风险与未解决问题
- 包含/排除/舍弃的内容决策
writing-plansswift-tdd你在此环节的角色是做好移交工作——为提供足够的上下文,使其无需重新推导已确定的决策。头脑风暴是“构建什么”及“为什么构建”的决策来源;而计划则是“如何构建”的决策来源。
writing-plansGround Rules
基本原则
Check in at every gate. Don't skip ahead. The human's input shapes the direction —
surprises at the end are expensive.
Capture everything. Out-of-scope ideas and discarded ideas both get documented.
Nothing gets silently dropped.
Be concrete about Swift. Generic design advice is less useful than specific guidance
about , actors, , protocols, value vs reference types, and
SwiftUI state patterns.
@Observableasync/awaitPrefer depth over breadth. Thoroughly exploring four aspects beats skimming eight.
If the aspect list is long, offer to prioritize the ones with the most uncertainty first.
Loop when it matters. Lessons learned aren't a formality. If something genuinely
changes earlier thinking, go back and address it. A plan that ignores its own discoveries
isn't worth much.
在每个节点都要确认。 不要跳过任何节点。用户的输入会影响方向——后期出现意外的成本很高。
记录所有内容。 排除范围的想法和舍弃的想法都要记录下来。不要悄悄丢弃任何内容。
贴合Swift特性。 通用的设计建议不如针对、actors、、协议、值类型与引用类型、SwiftUI状态模式的具体指导有用。
@Observableasync/await宁深勿广。 深入探索四个模块胜过浅尝辄止八个模块。如果模块列表很长,建议优先探索不确定性最高的模块。
必要时循环处理。 经验总结不是形式主义。如果确实有内容改变了之前的思路,回去重新处理。忽略自身新发现的计划毫无价值。