Task
Purpose
Structured implementation methodology for non-bugfix work (features, chores, refactors, docs). Ensures work is properly scoped, planned, implemented with proper patterns, and verified before completion.
When to Use
- Implementing new features
- Refactoring existing code
- Adding documentation
- Chore/maintenance tasks
Quick Reference
- Setup:
/task configure(run once during framework setup) - Usage: Invoked by workflow skill for non-bugfix work
- Update:
/task learn <path>(analyze specific patterns)
Config Location
Config path depends on how the plugin was installed:
| Plugin Scope | Config File | Git |
|---|---|---|
| project | .claude/skills/task.yaml | Committed (shared) |
| local | .claude/skills/task.local.yaml | Ignored (personal) |
| user | .claude/skills/task.local.yaml | Ignored (personal) |
Precedence when reading (first found wins):
.claude/skills/task.local.yaml.claude/skills/task.yaml- Skill defaults
Modes
| Mode | Trigger | Purpose |
|---|---|---|
| configure | /task configure | Auto-detect project structure, test patterns, architecture |
| learn | /task learn <path> | Learn patterns from specific directory |
| execute | Via workflow | Execute task phases (default) |
Discovery Process
During /task configure:
- Scan project structure for architecture patterns
- Identify test framework and testing conventions
- Detect code style and file organization
- Find common patterns for each layer
- Save to
.claude/skills/task.yaml
Phases Overview
- Phases: Scope → Plan → Implement → Verify
- Key Rule: Understand before building
- Output: Working implementation with tests passing
Task Phases
┌─────────────────────────────────────────────────────────────────────────────┐
│ TASK WORKFLOW │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. SCOPE → 2. PLAN → 3. IMPLEMENT → 4. VERIFY │
└─────────────────────────────────────────────────────────────────────────────┘
Phase T1: Scope
Goal: Understand what needs to be done and define boundaries.
Procedure:
- Read the ticket/request description carefully
- Identify the core requirement (what must be delivered)
- Identify out-of-scope items (what NOT to do)
- Clarify any ambiguities with user
- Document the scope
Output: Clear understanding of deliverables
## Scope
- **Goal:** Add user notification system
- **Deliverables:**
- New notification endpoint
- Email/Slack integration
- **Out of scope:**
- Notification history UI
- User preferences dashboard
Key Rule: Don't start planning until scope is clear. Ask questions early.
Phase T2: Plan
Goal: Design the approach before writing code.
Procedure:
- Consult
/domain-expertfor domain understanding - Use
/archto map changes to architecture layers - Identify files to create/modify
- Determine test strategy
- Document the plan
Output: Implementation plan with files and approach
## Plan
- **Domain:** Notifications (domain/notification/)
- **Layer:** Application service + Domain logic
- **Files to modify:**
- src/domain/notification/service.ts (new)
- src/application/handlers/notify.ts (add handler)
- src/tests/notification.test.ts (new)
- **Approach:** Add event-driven notifications with pluggable channels
Key Rule: Get user approval on plan before implementing.
Phase T3: Implement
Goal: Write code following project patterns.
Procedure:
- Use
/developerfor code patterns and style - Follow TDD: write test first, then implementation
- Work in small increments
- Run tests frequently
- Keep changes minimal and focused
Guidelines:
- Follow layer boundaries (see
/arch) - Use established patterns (see
/code) - Write tests alongside code (see
/tdd) - Don't over-engineer
Output: Working code with tests
Key Rule: Minimal changes only. Don't refactor unrelated code.
Phase T4: Verify
Goal: Ensure implementation is complete and correct.
Procedure:
- Run full test suite
- Run pre-commit checks
- Check IDE diagnostics for errors
- Review changes against original scope
- Verify no unintended side effects
Output: All tests pass, ready for commit
task -t .claude/Taskfile.yaml test # All tests pass
task -t .claude/Taskfile.yaml precommit # Lint + tests pass
Key Rule: Don't commit with failing tests or lint errors.
Flow Diagram
┌─────────────────┐
│ /workflow start │
│ (type: feat) │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ T1: SCOPE │────►│ Unclear? │
│ Understand req │ │ Ask user │
└────────┬────────┘ └─────────────────┘
│ ✓ Clear
▼
┌─────────────────┐ ┌─────────────────┐
│ T2: PLAN │────►│ Need approval │
│ Design approach │ │ Show plan │
└────────┬────────┘ └─────────────────┘
│ ✓ Approved
▼
┌─────────────────┐ ┌─────────────────┐
│ T3: IMPLEMENT │────►│ Issues? │
│ Write code │ │ Iterate │
│ (uses /developer)│◄────│ │
└────────┬────────┘ └─────────────────┘
│ ✓ Complete
▼
┌─────────────────┐ ┌─────────────────┐
│ T4: VERIFY │────►│ Tests fail? │
│ Run tests │ │ Fix and re-run │
│ │◄────│ │
└────────┬────────┘ └─────────────────┘
│ ✓ All pass
▼
┌─────────────────┐
│ Ready for │
│ /commit │
└─────────────────┘
Task Context
Track progress in workflow context:
{
"type": "feat",
"task": {
"phase": "implement",
"scopeConfirmed": true,
"planApproved": true,
"filesModified": ["src/domain/notification/service.ts"]
}
}
Anti-Patterns
| Don't | Do Instead |
|---|---|
| Start coding immediately | Scope and plan first |
| Plan in isolation | Get user approval on plan |
| Change unrelated code | Minimal changes only |
| Skip tests | Write tests with implementation |
| Ignore lint errors | Fix all errors before commit |
Integration with Workflow
When /workflow start detects a non-fix ticket, it triggers this task flow:
/workflow start(feature ticket)- Workflow detects
type: feat(or chore, refactor, docs) - Invokes task skill for phases T1-T4
- After T4 passes:
/commit→/pr-create
Automation
See skill.yaml for patterns and procedures.
See sharp-edges.yaml for common implementation pitfalls.
