Execute backend task implementation with TDD. Read task file, execute steps, verify each, update status.
Use this skill when:
- User asks to "implement task/plan", "start implementation", "execute plan", or "start coding"
- Have task file (story-* or standalone-*) ready to execute
- User asks to "use TDD", "write test first", or "test-driven"
- User asks to "write tests", "add tests", "create tests"
- Fixing bugs (write failing test first)
TDD Iron Law: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
TDD Cycle: RED (failing test) → Verify fails → GREEN (minimal code) → Verify passes → REFACTOR
Prerequisites:
- Task file in docs/reference/backend/tasks/ (story-* or standalone-*)
- Read constraints.md and design spec before coding
Flow: Read Task → Read Constraints → Execute Steps → Verify → Test → Update Status
Execute backend task implementation with TDD. Read task file, execute steps, verify each, update status.
Use this skill when:
- User asks to "implement task/plan", "start implementation", "execute plan", or "start coding"
- Have task file (story-* or standalone-*) ready to execute
- User asks to "use TDD", "write test first", or "test-driven"
- User asks to "write tests", "add tests", "create tests"
- Fixing bugs (write failing test first)
TDD Iron Law: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
TDD Cycle: RED (failing test) → Verify fails → GREEN (minimal code) → Verify passes → REFACTOR
Prerequisites:
- Task file in docs/reference/backend/tasks/ (story-* or standalone-*)
- Read constraints.md and design spec before coding
Flow: Read Task → Read Constraints → Execute Steps → Verify → Test → Update Status
Implement
Language Configuration
Before generating any content, check aico.json in project root for language field to determine the output language. If not set, default to English.
Process
Read task file (MANDATORY):
Look for task file in docs/reference/backend/tasks/
Accept either:
Story-based: story-{story-name}.md with task number
Standalone: standalone-{task-name}.md with task number
User must specify task number (e.g., "implement story-user-api Task 1" or "implement standalone-fix-auth Task 1")
Both formats contain multiple tasks, just different naming
If NOT exists or task number not specified → STOP and ask user which task to implement
// ❌ Wrong: Ignore error handling patternconst user = await db.users.findOne({ id });
// ✅ Right: Follow established patterns from constraintsconst user = await userRepository.findById(id);
if (!user) thrownewNotFoundError('User not found');
Rule 2: Verify Before Proceeding
Each step has a Verify section - MUST run it and confirm expected output before moving on.
Rule 3: No Skipping
Execute ALL steps in order
Do NOT combine steps
Do NOT skip verification
Post-Implementation Checklist
Run tests: npm test [component]
Run build: npm run build
Update task file:
Mark AC checkboxes: - [x]
Update Status: completed
Show completion summary to user
Error Handling
Error Type
Action
TypeScript error
Fix type issues, re-verify
Test failure
Debug test, fix implementation or test
Build failure
Check imports, fix errors
Constraint violation
Re-read constraints, align code
Updating Task File
After successful implementation, update the task file. Both story-based and standalone files use the same format, so the update process is identical:
1. Mark Task's Acceptance Criteria as Completed
## Task 1: Define Types> **Status**: completed ← Changed from pending### Acceptance Criteria- [x] Types defined correctly ← Changed from [ ]
- [x] Exported from index ← Changed from [ ]
- [x] No type errors ← Changed from [ ]
2. Update Progress Section
## Progress- Total tasks: 6
- Completed: 1 ← Changed from 0
- In progress: 0
- Pending: 5 ← Changed from 6
**Next task**: Task 2: Database Schema ← Update this
3. Update Story File Checkboxes (story-based only)
If this is a story-based task, update the PM story file at docs/reference/pm/stories/: