Task Breakdown
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 story/PRD: Load from
docs/reference/pm/stories/ordocs/reference/pm/versions/ - •Identify data entities: What domain objects are needed
- •Identify API endpoints: What routes are needed
- •Identify business logic: What services are needed
- •Break into tasks: Follow layered architecture order
- •Save output: ALWAYS write to
docs/reference/backend/tasks/{story-name}.md
Layered Architecture Order
code
1. Data Models (types, entities, DTOs)
↓
2. Database (migrations, schema)
↓
3. Repository Layer (data access)
↓
4. Service Layer (business logic)
↓
5. API Layer (controllers, routes)
↓
6. Validation & Error Handling
↓
7. Tests (unit, integration, API)
Task File Template
markdown
# [Story Name] - Backend Tasks
> Project: [project-name]
> Created: YYYY-MM-DD
> Last Updated: YYYY-MM-DD
> Source: docs/reference/pm/stories/[story].md
> Status: in_progress
## Progress
| # | Task | Status | Notes |
| --- | -------------------------- | ---------- | ----- |
| 1 | Define data models | ⏳ pending | |
| 2 | Create database migrations | ⏳ pending | |
| 3 | Implement repository layer | ⏳ pending | |
## Tasks
### Task 1: Define data models
**Status**: ⏳ pending
**Goal**: Create types for domain entities
**Scope**: Entity types, DTOs, validation schemas
**Acceptance Criteria**:
- [ ] Types match business requirements
- [ ] No type errors
**Dependencies**: None
Task Types
| Type | Examples |
|---|---|
| Data Model | Define entities, DTOs, schemas |
| Database | Migrations, indexes, seeds |
| Repository | Data access layer |
| Service | Business logic |
| API | Controllers, routes |
| Validation | Input validation |
| Testing | Unit, integration, API tests |
Granularity Rules
- •Each task = independently testable
- •Each task = single responsibility
- •Each task = clear scope (not too big, not too small)
Key Rules
- •ALWAYS follow layered architecture order
- •MUST include test tasks for each layer
- •ALWAYS note dependencies between tasks
- •MUST save to
docs/reference/backend/tasks/directory
Common Mistakes
- •❌ Tasks too large (entire API) → ✅ Break into layers
- •❌ Skip data model first → ✅ Types before implementation
- •❌ Skip repository layer → ✅ Separate data access
- •❌ Forget validation → ✅ Always include validation task