Structured 6-phase gated workflow for driving coding agents to implement requirements with quality control.
claude CLI) installed with --permission-mode bypassPermissions --print~/.claude/CLAUDE.md configured with cc-plugin settings发现更多技能插件,请访问7w4.net。
Phase 1: Environment Check
↓
Phase 2: Spec ← spec-writer skill
↓ [user confirms]
Phase 3: Task Planning
↓ [user confirms]
Phase 4: Agent Dispatch
↓
Phase 5: Verification
↓
Phase 6: Delivery
Each phase must complete before moving to the next. Phase 2 and Phase 3 have explicit user confirmation gates.
Before any work, check the target project:
llmdoc/ exists?
llmdoc/index.md + overview files to understand project/tr:initDoc to generate it firstCLAUDE.md in project root? — verify cc-plugin config is present; fix if missinggit status — ensure working tree is clean enough to work onGenerate a structured implementation spec using the spec-writer skill.
spec-writer skill — read its SKILL.md and follow its workflowThe confirmed spec replaces the old requirement-doc + verification-doc pair — everything is in one document now.
Fallback: If spec-writer skill is not installed, use the templates in
references/(requirement-template.md + verification-template.md) as before.
Refine the spec's preliminary task breakdown into a precise, executable task list. This is the bridge between "what to build" and "how to tell the agent."
Start from Section 10 (Task Breakdown) of the confirmed spec. For each task, expand it into a Task Card:
### Task [#]: [Title]
**Objective:** What this task accomplishes (one sentence)
**Input:** What must exist before this task starts (files, tables, APIs from prior tasks)
**Output:** What this task produces (new/modified files, passing tests, working endpoint)
**Affected files:**
- `src/xxx.py` — create / modify
- `tests/test_xxx.py` — create
**Agent instructions:**
- [Specific, actionable instruction 1]
- [Specific, actionable instruction 2]
- Reference: [relevant spec section, e.g., "See Spec §4.2 for design decision"]
**Verification:**
- [ ] [How to confirm this task is done — a command, a test, an observable result]
**Depends on:** Task #X, #Y (or "none")
**Complexity:** Low / Medium / High
**Parallel:** Can run in parallel with Task #Z (or "no")
Each task should be:
Splitting heuristics:
After expanding all tasks, produce a dependency summary:
Task 1 (Low) ─┐
Task 3 (Low) ─┤─→ Task 5 (Medium) ─→ Task 7 (Medium)
Task 2 (Medium) ─→ Task 4 (Medium) ─┤
Task 6 (High) ────────────────────────┘─→ Task 8 (Medium)
Identify:
For each task, determine what context the agent needs:
Principle: feed the agent only what it needs for the current task. A well-fed agent is like a well-fed function — give it only the inputs for the job at hand.
Present the task list to the user with:
🚫 Gate: Do not dispatch any agents until the user confirms the task plan.
Common discussion points:
Execute the confirmed task plan by dispatching coding agents.
For each task, construct the agent prompt from the task card:
claude --permission-mode bypassPermissions --print '<task prompt>' 2>&1
Task prompt structure:
## Task: [Title]
### Objective
[From task card]
### Context
[Relevant spec sections — copy only what's needed]
[Relevant existing code snippets or file references]
### Instructions
[Agent instructions from task card]
### Constraints
- 不要 git commit
- 完成后执行 /update-doc 更新 llmdoc
- [Relevant boundaries from spec §7]
### Verification
When done, confirm:
- [Verification criteria from task card]
Use workdir to scope the agent to the project directory.
Use background: true for long-running tasks, monitor with process tool.
| Situation | Action |
|---|---|
| Small error (syntax, typo, missing import) | Re-prompt agent to fix, no user interruption |
| Test failure on the current task | Re-prompt with test output, up to 2 retries |
| Design-level issue or ambiguity | Stop and ask the user |
| Agent produces output that contradicts spec | Stop, quote the spec conflict, ask user |
| Downstream task blocked by upstream failure | Pause dependent tasks, attempt to fix upstream first |
After all tasks complete, verify the whole against the spec's verification criteria (Section 9):
If any verification fails:
Present results to the user with:
Never commit. The user handles all git commits.
Default: Claude Code (claude --permission-mode bypassPermissions --print)
| Agent | Use when |
|---|---|
| Claude Code | Default for all tasks; complex reasoning, architecture |
| Codex | User explicitly requests; batch/parallel tasks (pty:true, --full-auto) |
| OpenCode/Pi | User explicitly requests |
~/.openclaw/ — agents will read soul/identity files这是一个设计完整但上手门槛较高的专业工具类 Skill。优点是流程规范、验证机制健全、配套模板完善,适合管理复杂的多模块项目开发。缺点是需要安装额外工具才能使用,完整流程对简单任务来说有点麻烦,新用户不容易判断什么时候该用它。简单修复类任务不建议使用此工具。