Agent Dev Workflow
by @lgyanami
Orchestrate coding agents (Claude Code, Codex, etc.) to implement coding tasks through a structured workflow. Use when the user gives a coding requirement, f...
clawhub install agent-dev-workflow๐ About This Skill
name: dev-workflow description: Orchestrate coding agents (Claude Code, Codex, etc.) to implement coding tasks through a structured workflow. Use when the user gives a coding requirement, feature request, bug fix, or GitHub issue to implement. Includes requirement analysis, document generation (requirement doc + verification doc), agent dispatch, monitoring, verification, and delivery. NOT for simple one-line fixes or reading code. Triggers on coding tasks, feature requests, bug reports, GitHub issues, or "implement/build/fix this".
Dev Workflow โ Orchestrated Coding Agent Dispatch
Structured 6-phase gated workflow for driving coding agents to implement requirements with quality control.
Prerequisites
claude CLI) installed with --permission-mode bypassPermissions --print~/.claude/CLAUDE.md configured with cc-plugin settingsWorkflow Overview
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.
Phase 1: Environment Check
Before any work, check the target project:
1. llmdoc/ exists?
- Yes โ read llmdoc/index.md + overview files to understand project
- No โ dispatch Claude Code with /tr:initDoc to generate it first
2. CLAUDE.md in project root? โ verify cc-plugin config is present; fix if missing
3. git status โ ensure working tree is clean enough to work on
Phase 2: Spec
Generate a structured implementation spec using the spec-writer skill.
1. Activate spec-writer skill โ read its SKILL.md and follow its workflow
2. It will gather project context, draft a spec using its template, and present to the user
3. The spec covers: objectives, user stories, technical plan, boundaries, verification criteria, and a preliminary task breakdown
4. ๐ซ Gate: Do not proceed until the user confirms the spec.
The 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.
Phase 3: Task Planning
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."
#### 3.1 Extract Tasks from Spec
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 โ createAgent 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")
#### 3.2 Scoping Rules
Each task should be:
Splitting heuristics:
#### 3.3 Dependency Graph
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:
#### 3.4 Context Budgeting
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.
#### 3.5 User Confirmation
Present the task list to the user with:
๐ซ Gate: Do not dispatch any agents until the user confirms the task plan.
Common discussion points:
Phase 4: Agent Dispatch
Execute the confirmed task plan by dispatching coding agents.
#### 4.1 Prompt Construction
For each task, construct the agent prompt from the task card:
claude --permission-mode bypassPermissions --print '' 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.
#### 4.2 Execution Strategy
#### 4.3 Error Handling
| 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 |
Phase 5: Verification
After all tasks complete, verify the whole against the spec's verification criteria (Section 9):
1. Automated checks (ยง9.1) โ run tests, build, lint, type check 2. Functional verification (ยง9.2) โ execute each test scenario step by step 3. Edge cases & error handling (ยง9.3) โ verify each edge case 4. Regression (ยง9.4) โ confirm existing functionality unaffected 5. Code quality โ style consistency, no stray files, no hardcoded secrets
If any verification fails:
Phase 6: Delivery
Present results to the user with:
1. All changed files โ every file touched, including llmdoc updates, config changes, everything 2. Suggested commit message โ conventional commits format 3. Task completion summary โ which tasks passed, any retries needed 4. Verification results โ what passed, any caveats 5. Items for human review โ what needs the user's attention
Never commit. The user handles all git commits.
Agent Selection
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 |
Key Constraints
~/.openclaw/ โ agents will read soul/identity filesโ๏ธ Configuration
claude CLI) installed with --permission-mode bypassPermissions --print~/.claude/CLAUDE.md configured with cc-plugin settings๐ Constraints
Verification
When done, confirm:Use
workdir to scope the agent to the project directory.
Use background: true for long-running tasks, monitor with process` tool.#### 4.2 Execution Strategy
#### 4.3 Error Handling
| 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 |
Phase 5: Verification
After all tasks complete, verify the whole against the spec's verification criteria (Section 9):
1. Automated checks (ยง9.1) โ run tests, build, lint, type check 2. Functional verification (ยง9.2) โ execute each test scenario step by step 3. Edge cases & error handling (ยง9.3) โ verify each edge case 4. Regression (ยง9.4) โ confirm existing functionality unaffected 5. Code quality โ style consistency, no stray files, no hardcoded secrets
If any verification fails:
Phase 6: Delivery
Present results to the user with:
1. All changed files โ every file touched, including llmdoc updates, config changes, everything 2. Suggested commit message โ conventional commits format 3. Task completion summary โ which tasks passed, any retries needed 4. Verification results โ what passed, any caveats 5. Items for human review โ what needs the user's attention
Never commit. The user handles all git commits.