AICO后端任务分解

David-Li04062026-10-25查看 1443复制 484

按照分层架构顺序将 PM 故事分解为后端任务:数据模型 → 数据库 → 仓库 → 服务 → API → 验证 → 测试。 独特价值:确保正确的依赖顺序和关注点分离。任务按架构层排序,而非随机顺序。 在以下情况使用此技能: - 运行 /backend.tasks 命令 - 用户要求“为后端分解故事”、“创建后端任务”、“拆分为后端任务” - 故事位于 docs/reference/pm/stories/ 且需要组织……

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md3666 chars
---
name: aico-backend-task-breakdown
description: |
  Break down PM story into backend tasks following LAYERED ARCHITECTURE order: Data Models → Database → Repository → Service → API → Validation → Tests.

  UNIQUE VALUE: Ensures proper dependency order and separation of concerns. Tasks are ordered by architectural layers, not random order.

  Use this skill when:
  - Running /backend.tasks command
  - User asks to "break down story for backend", "create backend tasks", "split into backend tasks"
  - Have story at docs/reference/pm/stories/ and need organized task list
  - Need tasks ordered by architectural layers (not random order)
  - Starting backend work and want organized, layered task list

  Layer order is CRITICAL: Types/Entities → Migrations → Repository → Service → API → Validation → Tests
  Output: ALWAYS write to docs/reference/backend/tasks/{story-name}.md
---

# 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

1. **Read story/PRD**: Load from `docs/reference/pm/stories/` or `docs/reference/pm/versions/`
2. **Identify data entities**: What domain objects are needed
3. **Identify API endpoints**: What routes are needed
4. **Identify business logic**: What services are needed
5. **Break into tasks**: Follow layered architecture order
6. **Save output**: ALWAYS write to `docs/reference/backend/tasks/{story-name}.md`

## Layered Architecture Order

```
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
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧