OpenClaw AI Agent Skill
name: dev-workflow description: Professional development workflow combining Writing Plans, Test-Driven Development (TDD), and Subagent-Driven Development. Use when implementing any feature, building multi-step projects, or executing complex development tasks. Enforces plan-first, test-first, review-always methodology.
Three integrated patterns for professional software development.
Before writing ANY implementation code for non-trivial tasks:
- Define the goal — one sentence, what does "done" look like?
- List tasks — break into bite-sized pieces (each < 30 min)
- Specify files — exact file paths that will be created/modified
- Order tasks — dependencies first, independent tasks can parallelize
- Add verification — how to test each task is done correctly
# Plan: [Feature Name]
**Goal:** [One sentence]
**Estimated effort:** [X tasks, ~Y hours]
## Tasks
### 1. [Task name]
- **Files:** `path/to/file.js`
- **What:** [Specific description]
- **Verify:** [How to test it works]
### 2. [Task name]
...Key rules:
- No task should be vague — "implement the thing" is not a task
- Include code examples for complex changes
- Flag risks and unknowns upfront
See references/writing-plans.md for detailed examples.
For every feature or bugfix, follow RED → GREEN → REFACTOR:
# Write the test that describes desired behavior
# Run it — it MUST fail (if it passes, your test is wrong)# Write the SIMPLEST implementation that makes the test pass
# No extra features, no premature optimization
# Run tests — they MUST pass# Now improve the code quality
# Extract functions, rename variables, remove duplication
# Run tests after EVERY refactor step — still green?Key rules:
- Never write implementation before a test
- One test at a time — don't batch
- Tests should be fast (< 1 second each)
- Test behavior, not implementation details
See references/tdd.md for framework-specific patterns.
For multi-task plans with independent work items:
- Parse the plan into independent tasks
- For each task, spawn a fresh subagent (via
sessions_spawn) - Each subagent gets: task description + relevant file context + acceptance criteria
- On completion, run two-stage review:
- Stage 1: Spec compliance — does it match the plan?
- Stage 2: Code quality — clean, tested, no regressions?
- If review fails → send feedback to subagent for revision
- If review passes → merge and move to next task
| Scenario | Approach |
|---|---|
| Tasks are independent (different files) | Parallel subagents |
| Tasks depend on each other | Sequential, one at a time |
| Task is simple (< 5 min) | Do it yourself, skip subagent overhead |
| Task is complex + isolated | Perfect for subagent |
- Matches the task spec exactly
- No unrelated changes
- Tests added and passing
- No new warnings or errors
- Code is readable and follows project conventions
See references/subagent-dev.md for orchestration patterns.
Is this a quick fix (< 10 min)?
YES → Just do it with TDD (RED→GREEN→REFACTOR)
NO ↓
Is this a multi-step feature?
YES → Write a plan first, then:
Are tasks independent? → Subagent-driven
Are tasks sequential? → TDD each task in order
NO ↓
Is this a bugfix?
YES → Use systematic-debugging skill first, then TDD the fix
cp -r dev-workflow/ ~/.openclaw/workspace/skills/dev-workflow/MIT © Sentra Technology