Stop your AI agent from writing code before the spec is clear.
A spec-driven development workflow skill for AI coding agents โ Claude Code, Codex, Baidu Comate, Cursor, Gemini CLI and friends. It turns "build me X" into a gated pipeline โ clarify โ design โ split โ plan โ implement โ summarize โ and lands a reviewable spec pack (doc.md / tasks.md / summary.md) on every feature.
No IDE plugin. No intranet tooling. Pure markdown that any agent platform can run.
Hand a multi-step feature to a coding agent and you'll hit one of these classics:
- ๐ซฅ Code before clarity โ the agent guesses the requirements and starts typing
- ๐ Tasks split off a half-formed design โ the plan lives in the agent's head, nowhere else
- โ "Done" without evidence โ no acceptance criteria, nothing to verify against
spec-flow makes all three illegal.
Four hard rules the agent may not break:
- Think is non-skippable โ every code-touching task starts with clarification, not code.
- Design & plan are optional โ but only you may skip them. The agent never decides for you.
- Gates stop the agent. At every gate it must ask out loud and wait for your answer.
- Uncertain โ stop. Ambiguity gets resolved by questions, never by guessing.
| File | Stage | What it is |
|---|---|---|
doc.md |
design | Requirements + technical design โ the single source of truth for the solution |
tasks.md |
plan | Execution contract per work item: goal, scope, files, acceptance criteria, verify commands |
summary.md |
wrap-up | Issues, root causes, changed files, real verification results, follow-ups |
Everything lands in <specs_root>/<feature_name>/, where specs_root is auto-detected (existing .comate/specs โ existing specs / docs/specs โ creates specs).
One-off prompts leak. spec-flow is a repeatable harness:
- Judgment encoded, not vibes โ 6 reference files pin down exactly when the agent must stop and ask, the doc/task/summary templates, work-item split rules, and per-agent portability notes
- Work items are commit-bound units โ
W2: fix offline fallback pathstyle, reviewable and revertible one by one - Independent review sub-agents โ each task runs builder โ spec-compliance review โ code-quality review; self-review can't stand in for review
- Fresh evidence before "done" โ the agent must run the verify command and read the full output; "should work" is rejected by policy
Copy the folder into any agent's skills directory:
git clone https://github.com/IQQcode/spec-flow.git
cp -R spec-flow <your-agent-skills-dir>/To make it available to every agent platform on your machine in one step, use skill-unify:
git clone https://github.com/IQQcode/skill-unify.git ~/.agents/skills/skill-unify
python3 ~/.agents/skills/skill-unify/scripts/skill-unify install https://github.com/IQQcode/spec-flow --yesSay any of: "spec ๆจกๅผ", "ๆ spec ๆต็จๅ", "ๅ ๅ่ฎพ่ฎกๆๆกฃ", "ๅ ๆไปปๅกๅๅฎ็ฐ" โ or simply hand the agent a multi-step feature request and let the skill description trigger it.
Runs on any platform that supports the Skills convention (SKILL.md + references/): Claude Code, Codex, Baidu Comate, Cursor, Gemini CLI, Trae, Windsurf, and more. Per-agent differences are documented in references/portability.md.
