📚 Bổ trợ Tutorial là phần thực hành bổ trợ cho bài học chính.
← Quay lại Tutorial Hub
💻 Dev basic v1.0 Cập nhật: 2026-03-06

Agent bóc tách task từ PRD

Dùng AI Agent để tự động breakdown PRD thành technical tasks, estimate effort, và tạo Jira tickets.

1

Vấn đề

Developer mất 1–2 giờ để đọc PRD và bóc tách thành tasks. Thường miss edge cases, underestimate effort, và quên dependency giữa các tasks.

2

Kết quả mong đợi

Danh sách technical tasks với: title, description, acceptance criteria, effort estimate (hours), dependencies, và suggested order. Ready to import vào Jira/Linear.

3

Yêu cầu trước khi bắt đầu

  • PRD hoàn chỉnh (có user stories + acceptance criteria)
  • Hiểu tech stack hiện tại của dự án
  • AI tool hỗ trợ long context (Claude hoặc GPT-4)
4

Prompt Pack

System Prompt

You are a Senior Software Engineer who excels at breaking down PRDs into actionable technical tasks. You think about: API changes, database migrations, frontend components, tests, and deployment. You always consider edge cases and dependencies.

Task Prompt

Break down this PRD into technical tasks:

[PASTE FULL PRD]

For each task provide:
1. Task title (concise)
2. Description (what to implement)
3. Acceptance criteria (testable)
4. Effort estimate (hours)
5. Dependencies (which tasks must be done first)
6. Layer: API / DB / Frontend / Test / DevOps

Order tasks by dependency (do first → do last).
Group by sprint if total exceeds 40 hours.

Guardrails

- Every user story must map to at least 1 task
- Include test tasks (unit + integration)
- Include DB migration tasks if schema changes
- Flag tasks > 8 hours as 'NEEDS SPLIT'
- Do NOT skip error handling / edge case tasks
✓ Đã copy!
5

Workflow từng bước

1

Input PRD

Paste toàn bộ PRD vào agent. Nếu quá dài, chia theo user story.

2

Review task list

Check: mỗi user story đã có task? Có test task? Có DB migration?

3

Validate estimates

So estimate của agent với gut feel. Adjust nếu cần.

4

Check dependencies

Vẽ dependency graph. Đảm bảo không có circular dependency.

5

Import to tracker

Copy tasks vào Jira/Linear. Set sprint assignments.

6

Demo Input / Output

📥 Input

PRD: Dark Mode Feature (as described in PM tutorial)

📤 Output

## Technical Task Breakdown

### Sprint 1 (32h)

| # | Task | Layer | Est. | Dependencies |
|---|------|-------|------|---------------|
| 1 | Create theme token system (CSS variables) | Frontend | 4h | None |
| 2 | Add dark/light theme provider | Frontend | 3h | Task 1 |
| 3 | Settings page: theme toggle UI | Frontend | 3h | Task 2 |
| 4 | System preference detection | Frontend | 2h | Task 2 |
| 5 | API: save user theme preference | API | 3h | None |
| 6 | DB: add theme_preference column | DB | 1h | None |
| 7 | Migrate all components to theme tokens | Frontend | 8h | Task 1 |
| 8 | Unit tests: theme switching | Test | 4h | Tasks 2-4 |
| 9 | Integration test: persist preference | Test | 4h | Tasks 5-6 |
7

Failure Cases & Cách Fix

⚠️ Tasks quá high-level, không actionable
💡 Thêm instruction: 'Each task should be completable by a single dev in 1 day max.'
⚠️ Underestimate effort
💡 Add: 'Include 20% buffer for unknowns. Flag items you are uncertain about.'
⚠️ Miss test tasks
💡 Thêm guardrail: 'For every feature task, add a corresponding test task.'
8

Production Checklist

  • Mỗi user story có ít nhất 1 technical task
  • Không có task > 8 giờ chưa split
  • Dependencies không circular
  • Test tasks chiếm ≥ 20% total effort
  • DB migration tasks có rollback plan
  • Tất cả tasks có acceptance criteria testable
✓ Đã copy!
9

Metrics theo dõi hiệu quả

Metric Target Cách đo
Task coverage 100% user stories mapped Cross-check PRD stories vs task list
Estimate accuracy ±20% vs actual Compare estimate vs time logged
Missed items rate < 10% Count tasks added after sprint start
10

Supporting Skill: Wireframe

👀 Hỗ trợ
### Wireframe cho Dev (mức hỗ trợ)

Dev đọc wireframe để bóc component và xác định UI states:

1. **Component inventory**: List tất cả UI components từ wireframe
2. **State mapping**: Mỗi component có bao nhiêu state? (empty, loading, error, data)
3. **Reusable check**: Component nào dùng lại được?

> Prompt: 'From this wireframe description, list all React/Vue components needed with their props and states.'