协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
project-scaffolding【开发与工程】Sets up a new project, service, or module from nothing — structure, tooling, config, and the first working slice — without dragging in machinery it does not need yet. Use this whenever the user starts something new — a new repo, service, CLI, library, package, or a fresh module inside an existing project, including when they just say "let's build X" …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
The first hour of a project sets defaults that survive for years. Nobody revisits the test runner choice or the directory layout once there is code in it — they route around it.
Two opposite failures. Under-scaffolding: no tests, no formatter, no CI, and by the time anyone wants them there are ten thousand lines to retrofit. Over-scaffolding: a folder tree for an architecture the project has not earned, with eleven empty directories and a plugin system before the first user.
The target: everything needed to work well from day one, nothing that anticipates a problem you do not have.
Before choosing anything, settle:
Done when: you can state the project type and its expected lifetime in a sentence.
Use the standard toolchain for the language unless there is a specific reason not to. A conventional project is one any newcomer can navigate; a bespoke one costs every future contributor an afternoon.
Prefer the official initializer where one exists — it stays current with conventions you would otherwise get subtly wrong. Then read what it produced and delete what does not apply.
Decide, and record in the README:
code-linting)Done when: a newcomer could clone and run it from README instructions alone.
Create directories when a file needs one, not before. Three files in one folder is easier to navigate than three folders with one file each.
Let structure emerge from real pressure: split when a file gets genuinely hard to navigate, when two things change at different rates, or when a boundary needs enforcing. Layering imposed on day one encodes a guess about a system that does not exist yet.
The exception: separate the entry point from the logic immediately. That one boundary always pays — it makes the code testable and importable from the start.
Done when: every directory that exists has a file in it that needed to be there.
Before the fifth dependency, get one real thing working end to end, one endpoint that returns a real response, one command that does its job, one function the library exports.
This validates the whole toolchain — build, run, test, import, while it is trivial to fix. A toolchain problem found after twenty files is a bad afternoon; found now it is a config line.
Done when: the slice runs, and a test for it passes.
Ordered by how much worse they get with delay:
.gitignore from the start. Committed secrets or build
artifacts are permanent in history..env.example. Never a real
secret in the repo, not even briefly, not even in a test.Done when: CI passes on the first commit.
These are frequently added on day one and almost never needed there: containerization, a database when a file would do, a message queue, an auth system before a second user, a plugin architecture, a monorepo tool for one package, an abstraction layer over one implementation.
Each is defensible eventually. None is defensible before the thing works. When you skip one, note it in the README so the omission reads as a decision rather than an oversight.
Done when: the deferred list is written down.
Say what you created, what you chose and why for each tool, the one command to run it, the one command to test it, and what you deliberately left out. That last part is what stops someone adding it back next week without knowing it was considered.