模糊的提示词("帮我实现 X 功能")只会产出模糊的代码。与 LingCode 进行五分钟的头脑风暴——厘清范围、列出需求、勾勒设计——实现质量将提升一个数量级。
面对 AI 编程工具,人的本能是把想法打出来就按回车。"加一个排行榜。""帮我做个设置页面。""做一个聊天面板。"LingCode 确实会为这些需求产出代码。但这些代码往往与你真正想要的相差甚远,原因很简单:你从未说清楚。
跳过头脑风暴会带来三个问题:
短短的头脑风暴——三轮对话,大约五分钟——能在代码出现之前把这一切都摆到台面上。这是你所能拥有的最廉价的纠错窗口。
这不是漫无目的的闲聊。头脑风暴有固定的结构:
第一项由你来驱动,后两项由 LingCode 通过反问来推进。当你们都能用一句话复述设计时,对话就结束了。
先告诉 LingCode 问题所在,再说解决方案。一个有效的提示词示例:
I want to brainstorm before we write any code. Don't propose
implementation yet.
The problem: users on the free tier keep hitting our quota and
churning silently — no email, no upgrade prompt, just gone. I want
to catch them before that happens.
Ask me clarifying questions until you understand the scope. Then
list the requirements you've extracted. Then sketch one design in
a paragraph. Stop after the sketch.
注意缺少了什么:"发一封邮件"、"显示一个横幅"、"搭一个仪表盘"——这些统统没有提及。它们都是解决方案。头脑风暴的目的正是质疑这些方案是否正确。
LingCode 会反过来问你一些问题。好的问题大概是这样的:
回答它们。这里的陷阱是敷衍了事。"随便,怎么合理怎么来"会把决策推回给 LingCode,等于没做头脑风暴。如果你真的不知道,就说"我不确定——各种权衡是什么?"让 LingCode 列出选项,然后你来选。
澄清环节结束后,要求 LingCode 把需求写下来:
Good. Now list what we've agreed on as a bulleted requirements
list. Three sections:
- Must do (the actual feature)
- Must not do (out of scope for v1)
- Must respect (constraints — perf budget, dependencies, existing
patterns to match)
Be specific. "Sends an email" is bad. "Sends one email per user
per 24-hour window when they exceed 80% of monthly quota" is good.
仔细阅读这份清单。如有出入,就说"不对,实际上……"让 LingCode 修订。"不做"那一节是创始人最容易跳过、工程师最喜欢的——它是防止实现阶段范围蔓延的边界。
接下来,要求一个单一的设计草图:
Sketch one design — not three options. Just commit to an approach
and justify it in a paragraph. Cover:
- Where the detection logic lives (cron? request middleware?
background job?).
- What state we track and where it persists.
- How the notification ships (which channel, what triggers it).
- What we change in the existing codebase vs. add new.
One paragraph. No code. If something's genuinely a coin-flip,
name the trade-off and pick anyway.
"pick anyway"是关键约束。给出多个选项看似稳妥,实则把决策抛回给你——头脑风暴的目的是做出决策,而不是推迟决策。如果权衡真的重要,你会在理由中发现并提出异议;如果无关紧要,LingCode 的选择就够用了。
当你们都能用一句话复述设计时,头脑风暴就完成了。问:
In one sentence — what are we building?
如果 LingCode 的回答与你脑海中的一致,就大功告成。如果不一致,还需要再做一轮澄清。这个偏差就是 bug,而你在写任何代码之前就发现了它。
把需求清单和设计草图保存好——放进草稿文件、文档或聊天记录里。下一步(编写实现计划)就从这里开始。
完成的头脑风暴包含三个产出物:
就这些。不是设计文档,不是规格说明书,只是足以支撑编写实现计划的内容。写得比这多,说明头脑风暴过度;写得比这少,说明还不够充分。
下一步自然是把这些内容转化成一份排好顺序、暴露最高风险步骤的计划——请参阅下方的"编写实现计划"教程。
将头脑风暴流程封装成一个技能(skill),让 LingCode 在任何创意工作开始前自动触发——无论是请求实现某个功能、搭建项目脚手架,还是设计某个组件:
---
name: brainstorm
description: Use BEFORE any creative work — building a feature, scaffolding a project, designing a component, adding functionality. Forces scope clarification, requirement gathering, and a tiny design sketch before code is written. Triggers: 'let's build', 'I want to add', 'help me design', 'how should I approach', 'what should we build', 'design X'. Actions: brainstorm, clarify, scope, requirement-gather, sketch, design-doc, plan. Stops vague prompts from producing vague code.
---
Run a short brainstorm pass before proposing implementation.
1. Intent: ask what problem we're solving and for whom. Don't
accept a feature description — push for the outcome.
2. Clarify: ask the questions that the prompt didn't answer.
Trade-offs, scope edges, existing patterns to match,
constraints. Keep going until the picture is concrete.
3. Requirements: write a bulleted list with three sections —
Must do, Must not do, Must respect. Be specific.
4. Design: sketch ONE design in a paragraph. Commit to an
approach. No alternatives. Justify briefly. No code.
5. Restate: summarize in one sentence. Stop and wait for user
confirmation before writing any code.
If the brainstorm exceeds ~10 minutes of exchanges, the feature
is too big — break it into smaller pieces and brainstorm each.
保存至 ~/.lingcode/skills/brainstorm/SKILL.md——请参阅安装技能,了解确切路径以及技能是如何被发现的。