@longph2102/v-flow 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +265 -0
- package/CHANGELOG.md +318 -0
- package/LICENSE +21 -0
- package/README.md +326 -0
- package/agents/ba-agent.md +437 -0
- package/agents/ba-critic-agent.md +156 -0
- package/agents/ba-to-ptyc-agent.md +112 -0
- package/agents/bugfix-analyst-agent.md +221 -0
- package/agents/constitute-agent.md +155 -0
- package/agents/help-agent.md +168 -0
- package/agents/implement-agent.md +220 -0
- package/agents/import-ba-docs-agent.md +164 -0
- package/agents/master-check-agent.md +228 -0
- package/agents/metrics-agent.md +180 -0
- package/agents/operations-agent.md +123 -0
- package/agents/plan-agent.md +218 -0
- package/agents/prototype-agent.md +191 -0
- package/agents/retrospective-agent.md +196 -0
- package/agents/review-agent.md +210 -0
- package/agents/sprint-agent.md +191 -0
- package/agents/status-agent.md +186 -0
- package/agents/sync-agent.md +201 -0
- package/agents/test-agent.md +166 -0
- package/agents/understand-agent.md +339 -0
- package/cli/commands/check.js +96 -0
- package/cli/commands/dev-quiz.js +107 -0
- package/cli/commands/doctor.js +348 -0
- package/cli/commands/feature.js +259 -0
- package/cli/commands/hooks.js +163 -0
- package/cli/commands/init.js +189 -0
- package/cli/commands/log.js +199 -0
- package/cli/commands/plugin.js +230 -0
- package/cli/commands/score-card.js +203 -0
- package/cli/commands/status.js +269 -0
- package/cli/commands/sync.js +59 -0
- package/cli/commands/upgrade.js +150 -0
- package/cli/commands/validate.js +1259 -0
- package/cli/commands/watch.js +151 -0
- package/cli/index.js +46 -0
- package/cli/lib/ac-test-gate.js +89 -0
- package/cli/lib/activity-log.js +209 -0
- package/cli/lib/cli-error.js +183 -0
- package/cli/lib/constitution-lint.js +561 -0
- package/cli/lib/dev-quiz-grade.js +127 -0
- package/cli/lib/governance.js +78 -0
- package/cli/lib/hook-targets.js +167 -0
- package/cli/lib/i18n.js +375 -0
- package/cli/lib/knowledge-oracle.js +379 -0
- package/cli/lib/logger.js +203 -0
- package/cli/lib/module-card-lint.js +304 -0
- package/cli/lib/module-card-score.js +223 -0
- package/cli/lib/plugins.js +481 -0
- package/cli/lib/scanner.js +692 -0
- package/cli/lib/sync-core.js +232 -0
- package/cli/lib/sync-targets.js +84 -0
- package/cli/lib/templates.js +268 -0
- package/cli/lib/yaml-parser.js +203 -0
- package/commands/v.ba-critic.md +101 -0
- package/commands/v.ba-to-ptyc.md +71 -0
- package/commands/v.bugfix.md +86 -0
- package/commands/v.check.md +131 -0
- package/commands/v.constitute.md +87 -0
- package/commands/v.constitution.md +84 -0
- package/commands/v.fork.md +127 -0
- package/commands/v.help.md +73 -0
- package/commands/v.hotfix.md +200 -0
- package/commands/v.implement.md +92 -0
- package/commands/v.import-ba-docs.md +222 -0
- package/commands/v.metrics.md +74 -0
- package/commands/v.operations.md +70 -0
- package/commands/v.plan.md +78 -0
- package/commands/v.prototype.md +121 -0
- package/commands/v.quickfix.md +169 -0
- package/commands/v.retrospective.md +80 -0
- package/commands/v.review.md +78 -0
- package/commands/v.rewind.md +127 -0
- package/commands/v.specify.md +118 -0
- package/commands/v.sprint.md +75 -0
- package/commands/v.status.md +62 -0
- package/commands/v.sync.md +81 -0
- package/commands/v.test.md +67 -0
- package/commands/v.understand.md +112 -0
- package/package.json +65 -0
- package/skills/_shared/constitution-reader/SKILL.md +109 -0
- package/skills/_shared/constitution-reader/config.json +52 -0
- package/skills/_shared/constitution-reader/examples/good/b1-phase-output.md +48 -0
- package/skills/_shared/constitution-reader/gotchas.md +46 -0
- package/skills/_shared/context-reader/SKILL.md +111 -0
- package/skills/_shared/context-reader/config.json +54 -0
- package/skills/_shared/context-reader/examples/good/legacy-nodejs-output.md +35 -0
- package/skills/_shared/context-reader/gotchas.md +49 -0
- package/skills/_shared/ears-notation/SKILL.md +63 -0
- package/skills/_shared/ears-notation/config.json +55 -0
- package/skills/_shared/ears-notation/examples/good/plan-test-interpretation.md +29 -0
- package/skills/_shared/ears-notation/gotchas.md +43 -0
- package/skills/check/cross-validator/SKILL.md +206 -0
- package/skills/check/cross-validator/config.json +33 -0
- package/skills/check/cross-validator/examples/good/validation-report-pass-with-concerns.md +105 -0
- package/skills/check/cross-validator/gotchas.md +43 -0
- package/skills/implement/constitution-enforcer/SKILL.md +134 -0
- package/skills/implement/constitution-enforcer/config.json +16 -0
- package/skills/implement/constitution-enforcer/examples/bad/vague-report.md +42 -0
- package/skills/implement/constitution-enforcer/examples/good/compliance-report.md +57 -0
- package/skills/implement/constitution-enforcer/gotchas.md +26 -0
- package/skills/implement/constitution-enforcer/scripts/check-constitution.sh +88 -0
- package/skills/implement/no-go-zone-guard/SKILL.md +173 -0
- package/skills/implement/no-go-zone-guard/config.json +28 -0
- package/skills/implement/no-go-zone-guard/examples/good/adapter-workaround.md +46 -0
- package/skills/implement/no-go-zone-guard/gotchas.md +27 -0
- package/skills/implement/no-go-zone-guard/scripts/check-nogo-zones.sh +148 -0
- package/skills/implement/no-go-zone-guard/scripts/nogo-precommit.sh +96 -0
- package/skills/implement/tdd-driver/SKILL.md +159 -0
- package/skills/implement/tdd-driver/config.json +33 -0
- package/skills/implement/tdd-driver/examples/good/tdd-cycle-product-repo.md +81 -0
- package/skills/implement/tdd-driver/gotchas.md +34 -0
- package/skills/metrics/metrics-collector/SKILL.md +133 -0
- package/skills/metrics/metrics-collector/config.json +16 -0
- package/skills/metrics/metrics-collector/examples/bad/incomplete-report.md +48 -0
- package/skills/metrics/metrics-collector/examples/good/full-metrics-report.md +101 -0
- package/skills/metrics/metrics-collector/gotchas.md +26 -0
- package/skills/operations/incident-runbook/SKILL.md +167 -0
- package/skills/operations/incident-runbook/config.json +21 -0
- package/skills/operations/incident-runbook/examples/bad/vague-incident-report.md +48 -0
- package/skills/operations/incident-runbook/examples/good/p1-hotfix-response.md +119 -0
- package/skills/operations/incident-runbook/gotchas.md +26 -0
- package/skills/plan/architecture-designer/SKILL.md +228 -0
- package/skills/plan/architecture-designer/config.json +32 -0
- package/skills/plan/architecture-designer/examples/bad/vague-plan.md +62 -0
- package/skills/plan/architecture-designer/examples/good/expand-contract-migration.md +56 -0
- package/skills/plan/architecture-designer/examples/good/plan-structure.md +58 -0
- package/skills/plan/architecture-designer/gotchas.md +45 -0
- package/skills/plan/task-breakdown/SKILL.md +208 -0
- package/skills/plan/task-breakdown/config.json +26 -0
- package/skills/plan/task-breakdown/examples/bad/vague-tasks.md +77 -0
- package/skills/plan/task-breakdown/examples/good/spike-clarify-tasks.md +66 -0
- package/skills/plan/task-breakdown/examples/good/tasks-login-feature.md +111 -0
- package/skills/plan/task-breakdown/gotchas.md +39 -0
- package/skills/prototype/LOGIC.md +240 -0
- package/skills/prototype/SKILL.md +185 -0
- package/skills/prototype/UI.md +407 -0
- package/skills/prototype/config.json +104 -0
- package/skills/prototype/examples/bad/prototype-notes.md +68 -0
- package/skills/prototype/examples/good/prototype-notes-ui.md +109 -0
- package/skills/prototype/examples/good/prototype-notes.md +67 -0
- package/skills/prototype/gotchas.md +128 -0
- package/skills/prototype/scripts/check-flow-state.ps1 +112 -0
- package/skills/prototype/scripts/check-flow-state.sh +104 -0
- package/skills/prototype/scripts/check-prototype-cleanup.ps1 +124 -0
- package/skills/prototype/scripts/check-prototype-cleanup.sh +109 -0
- package/skills/prototype/scripts/check-prototype-notes.ps1 +107 -0
- package/skills/prototype/scripts/check-prototype-notes.sh +102 -0
- package/skills/review/adversarial-reviewer/SKILL.md +137 -0
- package/skills/review/adversarial-reviewer/config.json +32 -0
- package/skills/review/adversarial-reviewer/examples/good/review-report-template.md +56 -0
- package/skills/review/adversarial-reviewer/gotchas.md +46 -0
- package/skills/review/adversarial-reviewer/scripts/quick-security-scan.sh +52 -0
- package/skills/specify/ba-bpmn-doc-gen/SKILL.md +108 -0
- package/skills/specify/ba-bpmn-doc-gen/reference/reference-bpmn-generation.md +528 -0
- package/skills/specify/ba-bpmn-doc-gen/reference/reference-drawio-flowchart.md +466 -0
- package/skills/specify/ba-critic/SKILL.md +172 -0
- package/skills/specify/ba-critic/config.json +32 -0
- package/skills/specify/ba-critic/examples/good/critic-report-round1.md +51 -0
- package/skills/specify/ba-critic/gotchas.md +40 -0
- package/skills/specify/ba-critic/scripts/check-spec-quality.sh +72 -0
- package/skills/specify/ba-doc-generator/SKILL.md +102 -0
- package/skills/specify/ba-doc-generator/references/template-clevel.md +84 -0
- package/skills/specify/ba-doc-generator/references/template-compliance.md +83 -0
- package/skills/specify/ba-doc-generator/references/template-dev.md +138 -0
- package/skills/specify/ba-doc-generator/references/template-partner.md +167 -0
- package/skills/specify/ba-doc-generator/references/template-pm.md +92 -0
- package/skills/specify/ba-doc-generator/references/template-review.md +114 -0
- package/skills/specify/ba-doc-generator/references/template-tester.md +108 -0
- package/skills/specify/ba-doc-generator/references/template-user.md +98 -0
- package/skills/specify/bugfix-analyst/SKILL.md +296 -0
- package/skills/specify/bugfix-analyst/config.json +41 -0
- package/skills/specify/bugfix-analyst/examples/bad/common-mistakes.md +71 -0
- package/skills/specify/bugfix-analyst/examples/good/email-validation-bugfix.md +53 -0
- package/skills/specify/bugfix-analyst/gotchas.md +51 -0
- package/skills/specify/ears-writer/SKILL.md +129 -0
- package/skills/specify/ears-writer/config.json +20 -0
- package/skills/specify/ears-writer/examples/bad/common-mistakes.md +17 -0
- package/skills/specify/ears-writer/examples/good/login-requirements.md +41 -0
- package/skills/specify/ears-writer/gotchas.md +43 -0
- package/skills/specify/ears-writer/scripts/check-ears-compliance.sh +51 -0
- package/skills/test/test-case-generator/SKILL.md +161 -0
- package/skills/test/test-case-generator/config.json +33 -0
- package/skills/test/test-case-generator/examples/good/test-cases-login.md +104 -0
- package/skills/test/test-case-generator/gotchas.md +43 -0
- package/skills/understand/ba-docs-scanner/SKILL.md +239 -0
- package/skills/understand/ba-docs-scanner/config.json +47 -0
- package/skills/understand/ba-docs-scanner/examples/good/work-order-br-extract.md +28 -0
- package/skills/understand/ba-docs-scanner/gotchas.md +44 -0
- package/skills/understand/ba-docs-scanner/merge-rules.md +47 -0
- package/skills/understand/codebase-scanner/SKILL.md +260 -0
- package/skills/understand/codebase-scanner/config.json +56 -0
- package/skills/understand/codebase-scanner/examples/good/menu-module-output.md +44 -0
- package/skills/understand/codebase-scanner/gotchas.md +42 -0
- package/skills/understand/codebase-scanner/scripts/scan-project-structure.sh +64 -0
- package/templates/DESIGN.md +456 -0
- package/templates/agent-command-template.yaml +240 -0
- package/templates/agent-config-template.md +170 -0
- package/templates/agent-definition-template.md +145 -0
- package/templates/agent-metrics-template.md +150 -0
- package/templates/api-contract-template.md +72 -0
- package/templates/bugfix-report-template.md +195 -0
- package/templates/bugfix-spec-template.md +134 -0
- package/templates/code-review-report-template.md +119 -0
- package/templates/constitution-template.md +234 -0
- package/templates/context-template.md +94 -0
- package/templates/data-model-template.md +95 -0
- package/templates/decision-log-template.md +92 -0
- package/templates/flow-state-template.yaml +208 -0
- package/templates/github/workflows/v-flow-validate.yml +30 -0
- package/templates/knowledge/adr-template.md +70 -0
- package/templates/knowledge/api-contract-template.md +140 -0
- package/templates/knowledge/domain-glossary.md +29 -0
- package/templates/knowledge/golden-tests-readme.md +115 -0
- package/templates/knowledge/lessons-learned.md +41 -0
- package/templates/knowledge/patterns.md +103 -0
- package/templates/module-card/SKILL.md +85 -0
- package/templates/module-card/api-specs.md +96 -0
- package/templates/module-card/business-quiz.md +119 -0
- package/templates/module-card/cross-service.md +125 -0
- package/templates/module-card/db.md +85 -0
- package/templates/module-card/dev-quiz.md +62 -0
- package/templates/module-card/permissions.md +83 -0
- package/templates/module-card/state-diagram.md +64 -0
- package/templates/module-card/tech-context.md +90 -0
- package/templates/module-card/ui-flows.md +91 -0
- package/templates/module-card/use-cases.md +142 -0
- package/templates/module-template.yaml +161 -0
- package/templates/operations-report-template.md +108 -0
- package/templates/plan-template.md +308 -0
- package/templates/prototype-notes-template.md +116 -0
- package/templates/ptyc/PTYC.template.docx +0 -0
- package/templates/ptyc/ptyc.meta.example.yaml +44 -0
- package/templates/retrospective-report-template.md +136 -0
- package/templates/security-review-template.md +84 -0
- package/templates/session-template.md +167 -0
- package/templates/spec-review-log-template.md +75 -0
- package/templates/spec-template.md +229 -0
- package/templates/sprint-status-template.md +101 -0
- package/templates/tasks-template.md +275 -0
- package/templates/test-cases-template.md +124 -0
- package/templates/ux-checklist-template.md +79 -0
- package/templates/validation-report-template.md +125 -0
- package/templates/vflow-config-template.yaml +22 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Template: Task Breakdown
|
|
2
|
+
|
|
3
|
+
> Được tạo bởi **Plan Agent** từ Technical Plan
|
|
4
|
+
> Feature: [TÊN FEATURE]
|
|
5
|
+
|
|
6
|
+
> **Profile** — **Full** (mặc định). **Lite** (`quickfix`/`hotfix`): mỗi task VẪN cần Type + `Done khi` (AC) + block TDD; được phép bỏ Dependency Graph / Execution Schedule / Task Overview nếu chỉ 1–2 task.
|
|
7
|
+
|
|
8
|
+
## Quy ước
|
|
9
|
+
|
|
10
|
+
### Status marks
|
|
11
|
+
- `[ ]` = Chưa thực hiện
|
|
12
|
+
- `[/]` = Đang thực hiện
|
|
13
|
+
- `[x]` = Hoàn thành
|
|
14
|
+
|
|
15
|
+
### Task ID
|
|
16
|
+
- Dùng **một** quy ước duy nhất: `T-001`, `T-002`, … (`T-NNN`, 3 chữ số).
|
|
17
|
+
- Tham chiếu trong dependency: `[DEPENDS: T-003]`.
|
|
18
|
+
|
|
19
|
+
### Task Annotations (Functional API)
|
|
20
|
+
|
|
21
|
+
> Lấy cảm hứng từ LangGraph @entrypoint/@task decorators.
|
|
22
|
+
> Giúp Implement Agent biết cách schedule tasks tối ưu.
|
|
23
|
+
|
|
24
|
+
| Annotation | Ý nghĩa | Ví dụ |
|
|
25
|
+
|------------|---------|-------|
|
|
26
|
+
| `[ENTRYPOINT]` | Task khởi đầu — phải làm đầu tiên | Setup database, init project |
|
|
27
|
+
| `[PARALLEL]` | **Độc lập** — không phụ thuộc task khác cùng phase (an toàn để đổi thứ tự/gộp). KHÔNG ngụ ý chạy đồng thời trừ khi có orchestrator spawn subagent | Feature A và B không đụng nhau |
|
|
28
|
+
| `[DEPENDS: T-xxx]` | Phụ thuộc task cụ thể — chỉ bắt đầu khi T-xxx xong | Integration test phụ thuộc vào code |
|
|
29
|
+
| `[GATE]` | Checkpoint — dừng lại chờ human review trước khi tiếp | Sau core logic, trước integration |
|
|
30
|
+
| `[CRITICAL]` | Task trên critical path — ưu tiên cao nhất | Auth logic cho toàn bộ feature |
|
|
31
|
+
| `[RISKY]` | Task có rủi ro cao — cần test kỹ hơn | 3rd-party API integration |
|
|
32
|
+
| `[SPIKE]` | Task điều tra / POC — chưa biết cách làm; output là **quyết định/kết luận** (không phải code production), time-boxed | Thử 2 thư viện + benchmark trước khi chọn |
|
|
33
|
+
| `[CLARIFY]` | Còn điểm mơ hồ — Implement Agent PHẢI hỏi human trước khi code, không tự đoán | Spec chưa rõ business rule, thiếu input/edge case |
|
|
34
|
+
|
|
35
|
+
> **Mặc định tuần tự**: task KHÔNG gắn `[PARALLEL]` sẽ chạy lần lượt theo dependency order. Không cần nhãn riêng cho "tuần tự" — `[DEPENDS]` đã diễn đạt thứ tự.
|
|
36
|
+
> **`[CLARIFY]` = chặn đoán mò**: thà gắn `[CLARIFY]` + ghi "Câu hỏi mở" còn hơn để Implement Agent giả định sai. Plan có `[CLARIFY]` chưa nên coi là "ready" hoàn toàn.
|
|
37
|
+
|
|
38
|
+
### Dependency notation
|
|
39
|
+
- `depends: T-xxx` = phải hoàn thành T-xxx trước
|
|
40
|
+
- `depends: T-xxx, T-yyy` = phải hoàn thành cả hai
|
|
41
|
+
|
|
42
|
+
### Task Type — Loại thay đổi (BẮT BUỘC mỗi task)
|
|
43
|
+
|
|
44
|
+
> Cho Implement Agent biết task đụng **bề mặt nào** → biết cần chi tiết gì để không phải hỏi lại.
|
|
45
|
+
|
|
46
|
+
| Type | Khi nào dùng | Phải ghi rõ thêm |
|
|
47
|
+
|------|--------------|------------------|
|
|
48
|
+
| `[UI]` | Thêm/sửa màn hình, component | Màn hình, widget/component, trạng thái, token `DESIGN.md` |
|
|
49
|
+
| `[API]` | Thêm/sửa endpoint | Method + path, field request/response thêm/đổi |
|
|
50
|
+
| `[DB]` | Thêm/ALTER bảng, migration | Bảng, cột (tên/kiểu/null/default), **DDL up+down (câu lệnh thật)**, file migration, rollback |
|
|
51
|
+
| `[LOGIC]` | Business logic, use case, service | Hàm/class, hiện trạng → mong muốn |
|
|
52
|
+
| `[REFACTOR]` | Đổi cấu trúc, KHÔNG đổi behavior | Phạm vi, đảm bảo test cũ vẫn pass |
|
|
53
|
+
| `[TEST]` | Viết test, integration/E2E | Loại test, kịch bản |
|
|
54
|
+
|
|
55
|
+
### Complexity — Độ phức tạp (thay cho ước tính giờ)
|
|
56
|
+
|
|
57
|
+
> Executor là AI agent → "mất bao nhiêu giờ" không còn ý nghĩa. Dùng tier độ phức tạp để biết task nào cần tách / cần soi kỹ.
|
|
58
|
+
|
|
59
|
+
| Tier | Nghĩa | Dấu hiệu | Điểm (sizing) |
|
|
60
|
+
|:----:|-------|----------|:-------------:|
|
|
61
|
+
| **S** | Nhỏ, đường đi rõ | 1 component/file · ~1 TDD cycle · không nhánh phức tạp | 1 |
|
|
62
|
+
| **M** | Vừa | 1 component nhưng nhiều nhánh/trạng thái · 2–3 TDD cycle · vài quyết định | 2 |
|
|
63
|
+
| **L** | Lớn | Chạm nhiều file liên quan · logic/edge case phức tạp · tích hợp ngoài | 4 |
|
|
64
|
+
|
|
65
|
+
- Task ở mức **L** → cân nhắc tách nhỏ. Nếu không tách được → gắn `[RISKY]` và nêu lý do.
|
|
66
|
+
- **Sizing tổng** = Σ điểm (S=1, M=2, L=4). Dùng để quyết định chia milestone: tổng > **~24 điểm** (hoặc > 20 task) → cân nhắc tách thành nhiều phase/milestone.
|
|
67
|
+
|
|
68
|
+
### Cấu trúc mỗi task (bắt buộc)
|
|
69
|
+
|
|
70
|
+
> Task **SỬA** code có sẵn PHẢI có `Vị trí` + `Hiện trạng → Mong muốn`. Task tạo **MỚI** thì bỏ "Hiện trạng".
|
|
71
|
+
>
|
|
72
|
+
> **Phân biệt 3 trường test/done** (bổ sung nhau, không thay thế nhau):
|
|
73
|
+
> - `Done khi` = bám **Acceptance Criteria (`AC-NN`)** spec §4 — ghi rõ mã AC; định nghĩa "xong" nghiệp vụ (không chỉ "test pass"). Mọi AC-NN phải được ≥1 task phủ.
|
|
74
|
+
> - `Test liên quan: TC-xx` = trỏ tới **test chính thức** ở `test-cases.md` (Test Agent tạo ở B.0b, song song — provisional lúc plan, R.0 backfill).
|
|
75
|
+
> - `TDD` = checklist **Red→Green** ngay trong task để Implement Agent code theo: viết test fail trước, rồi code tối thiểu cho pass.
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
#### T-NNN: [Tên cụ thể] `[TYPE]` `[ANNOTATIONS]`
|
|
79
|
+
- **Mô tả**: [Mục tiêu task — 1 câu]
|
|
80
|
+
- **Files**: `path/to/file.ext`
|
|
81
|
+
- **Vị trí (symbol)**: `ClassName.method()` / `WidgetName` / `METHOD /path` ← cho task SỬA
|
|
82
|
+
- **Thay đổi cụ thể**:
|
|
83
|
+
- Hiện trạng: [behavior/code hiện tại — bỏ trống nếu tạo mới]
|
|
84
|
+
- Mong muốn: [kết quả sau khi xong]
|
|
85
|
+
- Các bước: 1) … 2) … 3) …
|
|
86
|
+
- **[UI]** (nếu Type=UI): Màn hình `X` · component `Y` · trạng thái `loading/error` · token `button-primary`
|
|
87
|
+
- **[API]** (nếu Type=API): `POST /api/x` · thêm field `status` vào response
|
|
88
|
+
- **[DB]** (nếu Type=DB): `users` ALTER `last_login_at timestamp null` · **DDL**: `ALTER TABLE users ADD COLUMN last_login_at timestamp NULL;` (up) / `ALTER TABLE users DROP COLUMN last_login_at;` (down) · migration `..._add_last_login.sql`
|
|
89
|
+
- **Truy vấn** (nếu query không hiển nhiên): trỏ plan §3.5 — vd `products WHERE deleted_at IS NULL` + index `idx_products_deleted_at`
|
|
90
|
+
- **Dependency**: T-xxx (hoặc Không)
|
|
91
|
+
- **REQ / UC mapping**: REQ-xxx (UC-xx)
|
|
92
|
+
- **Done khi**: đáp ứng **AC-NN** tương ứng trong spec §4 (ghi rõ mã, không chỉ "test pass")
|
|
93
|
+
- **Test liên quan**: TC-xx
|
|
94
|
+
- **TDD** (Red→Green) — viết test TRƯỚC, rồi code cho pass:
|
|
95
|
+
- [ ] Test: [kịch bản 1 — chạy fail trước khi có code]
|
|
96
|
+
- [ ] Test: [kịch bản 2]
|
|
97
|
+
- [ ] Impl: [code tối thiểu để các test trên pass]
|
|
98
|
+
- **Complexity**: S / M / L
|
|
99
|
+
- **Câu hỏi mở** (chỉ khi `[CLARIFY]`): [điều cần human làm rõ trước khi implement]
|
|
100
|
+
- **Trạng thái**: [ ]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
> 1 task có thể có nhiều type nếu cùng 1 component (vd `[API]` + `[DB]`); nếu tách được nên tách để dễ review.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Task Overview
|
|
108
|
+
|
|
109
|
+
> Bảng tổng quan ở đầu file — đọc lướt là nắm được quy mô + critical path.
|
|
110
|
+
|
|
111
|
+
| Tổng tasks | `[PARALLEL]` | `[CRITICAL]` | `[RISKY]` | `[GATE]` | Critical path | Phân bố Complexity | Sizing (Σ điểm) |
|
|
112
|
+
|:----------:|:------------:|:------------:|:---------:|:--------:|:-------------:|:------------------:|:---------------:|
|
|
113
|
+
| [N] | [N] | [N] | [N] | [N] | T-001→T-003→… | S:[N] · M:[N] · L:[N] | [Σ] |
|
|
114
|
+
|
|
115
|
+
| Phân bố Type | `[UI]` | `[API]` | `[DB]` | `[LOGIC]` | `[REFACTOR]` | `[TEST]` |
|
|
116
|
+
|--------------|:------:|:-------:|:------:|:---------:|:------------:|:--------:|
|
|
117
|
+
| Số task | [N] | [N] | [N] | [N] | [N] | [N] |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Tasks
|
|
122
|
+
|
|
123
|
+
> **Phase grouping là tùy chọn** — gom theo phase khi feature lớn; feature nhỏ có thể liệt kê phẳng.
|
|
124
|
+
|
|
125
|
+
### Phase A: Setup & Foundation
|
|
126
|
+
|
|
127
|
+
#### T-001: [vd: Migration thêm cột last_login] `[DB]` `[ENTRYPOINT]`
|
|
128
|
+
- **Mô tả**: [Mục tiêu — 1 câu]
|
|
129
|
+
- **Files**: `migrations/[YYYYMMDD]_[tên].sql`
|
|
130
|
+
- **Thay đổi cụ thể**:
|
|
131
|
+
- Mong muốn: [trạng thái schema sau migration]
|
|
132
|
+
- Các bước: 1) … 2) …
|
|
133
|
+
- **[DB]**: `[bảng]` `NEW/ALTER` · cột `[tên] [kiểu] [null?] [default]` · index `[…]` · **DDL**: `ALTER TABLE …;` (up) / `… DROP …;` (down) · rollback `[…]`
|
|
134
|
+
- **Dependency**: Không
|
|
135
|
+
- **REQ / UC mapping**: REQ-S01 (UC-01)
|
|
136
|
+
- **Done khi**: AC tương ứng spec §4 (schema đúng + rollback chạy được)
|
|
137
|
+
- **Test liên quan**: TC-xx
|
|
138
|
+
- **TDD** (Red→Green):
|
|
139
|
+
- [ ] Test: cột tồn tại sau migration, default đúng
|
|
140
|
+
- [ ] Impl: ALTER TABLE + index
|
|
141
|
+
- **Complexity**: S
|
|
142
|
+
- **Trạng thái**: [ ]
|
|
143
|
+
|
|
144
|
+
#### T-002: [vd: Endpoint POST /api/x] `[API]` `[PARALLEL]`
|
|
145
|
+
- **Mô tả**: [Mục tiêu]
|
|
146
|
+
- **Files**: `path/to/route.ext`
|
|
147
|
+
- **Vị trí (symbol)**: `METHOD /api/x` ← nếu sửa endpoint cũ
|
|
148
|
+
- **Thay đổi cụ thể**:
|
|
149
|
+
- Hiện trạng: [bỏ trống nếu endpoint mới]
|
|
150
|
+
- Mong muốn: [request/response cuối cùng]
|
|
151
|
+
- Các bước: 1) … 2) …
|
|
152
|
+
- **[API]**: `POST /api/x` · request `{…}` · response thêm field `[…]`
|
|
153
|
+
- **Dependency**: T-001
|
|
154
|
+
- **REQ / UC mapping**: REQ-E01 (UC-01)
|
|
155
|
+
- **Done khi**: AC tương ứng spec §4
|
|
156
|
+
- **Test liên quan**: TC-xx
|
|
157
|
+
- **TDD** (Red→Green):
|
|
158
|
+
- [ ] Test: request hợp lệ → 200 + body đúng schema
|
|
159
|
+
- [ ] Test: input sai → 400 + error envelope
|
|
160
|
+
- [ ] Impl: handler + validation
|
|
161
|
+
- **Complexity**: M
|
|
162
|
+
- **Trạng thái**: [ ]
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Phase B: Core Implementation
|
|
167
|
+
|
|
168
|
+
#### T-003: [vd: Sửa AuthService validate role] `[LOGIC]` `[CRITICAL]`
|
|
169
|
+
- **Mô tả**: [Mục tiêu]
|
|
170
|
+
- **Files**: `src/auth/service.ext`
|
|
171
|
+
- **Vị trí (symbol)**: `AuthService.login()`
|
|
172
|
+
- **Thay đổi cụ thể**:
|
|
173
|
+
- Hiện trạng: [code hiện tại làm gì]
|
|
174
|
+
- Mong muốn: [sau khi sửa]
|
|
175
|
+
- Các bước: 1) … 2) … 3) …
|
|
176
|
+
- **Dependency**: T-001, T-002
|
|
177
|
+
- **REQ / UC mapping**: REQ-E01 (UC-01)
|
|
178
|
+
- **Done khi**: AC tương ứng spec §4
|
|
179
|
+
- **Test liên quan**: TC-xx
|
|
180
|
+
- **TDD** (Red→Green):
|
|
181
|
+
- [ ] Test: role hợp lệ → cấp token
|
|
182
|
+
- [ ] Test: role không hợp lệ → ném ForbiddenError, không cấp token
|
|
183
|
+
- [ ] Impl: chèn bước check role trước khi cấp token
|
|
184
|
+
- **Complexity**: M
|
|
185
|
+
- **Trạng thái**: [ ]
|
|
186
|
+
|
|
187
|
+
#### T-004: [vd: Tích hợp payment gateway] `[LOGIC]` `[RISKY]` `[DEPENDS: T-003]`
|
|
188
|
+
- **Mô tả**: [Mục tiêu — rủi ro: 3rd-party API]
|
|
189
|
+
- **Files**: `path/to/file.ext`
|
|
190
|
+
- **Vị trí (symbol)**: `[class/hàm]`
|
|
191
|
+
- **Thay đổi cụ thể**:
|
|
192
|
+
- Mong muốn: […]
|
|
193
|
+
- Các bước: 1) … 2) …
|
|
194
|
+
- **Dependency**: T-003
|
|
195
|
+
- **REQ / UC mapping**: REQ-E02 (UC-02)
|
|
196
|
+
- **Done khi**: AC tương ứng spec §4
|
|
197
|
+
- **Test liên quan**: TC-xx
|
|
198
|
+
- **TDD** (Red→Green):
|
|
199
|
+
- [ ] Test: gọi gateway thành công → trạng thái paid
|
|
200
|
+
- [ ] Test: gateway timeout/fail → chạy fallback, không mất tiền
|
|
201
|
+
- [ ] Impl: client + retry + fallback
|
|
202
|
+
- **Risk**: R-0x (plan §7) — [rủi ro cụ thể]
|
|
203
|
+
- **Fallback plan**: [làm gì nếu fail]
|
|
204
|
+
- **Complexity**: L
|
|
205
|
+
- **Trạng thái**: [ ]
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### Phase C: Integration & Polish
|
|
210
|
+
|
|
211
|
+
#### T-005: [vd: Thêm filter vào ProductList] `[UI]` `[GATE]`
|
|
212
|
+
- **Mô tả**: [Mục tiêu — DỪNG sau bước này để human review]
|
|
213
|
+
- **Files**: `lib/ui/product_page.ext`
|
|
214
|
+
- **Vị trí (symbol)**: `ProductPage.build()`
|
|
215
|
+
- **Thay đổi cụ thể**:
|
|
216
|
+
- Hiện trạng: [màn hiện chưa có filter]
|
|
217
|
+
- Mong muốn: [thêm FilterBar + cột trạng thái]
|
|
218
|
+
- Các bước: 1) … 2) …
|
|
219
|
+
- **[UI]**: Màn hình `ProductList` (UC-xx) · component `FilterBar`, `DataTable` · trạng thái `empty/loading` · token `badge-success`, `input-default`
|
|
220
|
+
- **Dependency**: T-003, T-004
|
|
221
|
+
- **REQ / UC mapping**: REQ-S02 (UC-03)
|
|
222
|
+
- **Done khi**: AC tương ứng spec §4
|
|
223
|
+
- **Test liên quan**: TC-xx
|
|
224
|
+
- **TDD** (Red→Green):
|
|
225
|
+
- [ ] Test: render FilterBar + cột trạng thái
|
|
226
|
+
- [ ] Test: chọn filter → list lọc đúng; danh sách rỗng → empty state
|
|
227
|
+
- [ ] Impl: widget + bind state
|
|
228
|
+
- **Gate condition**: [điều kiện cần đáp ứng trước khi tiếp]
|
|
229
|
+
- **Complexity**: M
|
|
230
|
+
- **Trạng thái**: [ ]
|
|
231
|
+
|
|
232
|
+
#### T-006: [vd: Integration test luồng X] `[TEST]` `[PARALLEL]` `[DEPENDS: T-005]`
|
|
233
|
+
- **Mô tả**: [Mục tiêu]
|
|
234
|
+
- **Files**: `test/...`
|
|
235
|
+
- **Thay đổi cụ thể**:
|
|
236
|
+
- Mong muốn: [kịch bản test pass]
|
|
237
|
+
- Các bước: 1) … 2) …
|
|
238
|
+
- **Dependency**: T-005
|
|
239
|
+
- **REQ / UC mapping**: REQ-S02 (UC-03)
|
|
240
|
+
- **Done khi**: E2E luồng X pass + AC liên quan
|
|
241
|
+
- **Test liên quan**: TC-xx
|
|
242
|
+
- **TDD** (Red→Green):
|
|
243
|
+
- [ ] Test: luồng happy path end-to-end
|
|
244
|
+
- [ ] Test: luồng lỗi (401/timeout) hiển thị đúng
|
|
245
|
+
- **Complexity**: S
|
|
246
|
+
- **Trạng thái**: [ ]
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Dependency Graph
|
|
251
|
+
|
|
252
|
+
```mermaid
|
|
253
|
+
graph LR
|
|
254
|
+
T1[T-001 ENTRYPOINT] --> T2[T-002 PARALLEL]
|
|
255
|
+
T1 --> T3[T-003 CRITICAL]
|
|
256
|
+
T2 --> T3
|
|
257
|
+
T3 --> T4[T-004 RISKY]
|
|
258
|
+
T3 --> T5[T-005 GATE]
|
|
259
|
+
T4 --> T5
|
|
260
|
+
T5 -.-> |human review| T6[T-006 PARALLEL]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Execution Schedule (cho Implement Agent)
|
|
266
|
+
|
|
267
|
+
> **"Parallel?"** ở đây = các task trong round **độc lập** (không phụ thuộc lẫn nhau) nên có thể làm theo bất kỳ thứ tự / gộp review. Một Implement Agent đơn vẫn chạy **tuần tự**; chỉ thực sự đồng thời nếu orchestrator spawn nhiều subagent. Cột này KHÔNG bắt buộc chạy song song.
|
|
268
|
+
|
|
269
|
+
| Round | Tasks | Độc lập? | Ghi chú |
|
|
270
|
+
|:-----:|-------|:---------:|---------|
|
|
271
|
+
| 1 | T-001 `[ENTRYPOINT]` | ❌ | bắt đầu |
|
|
272
|
+
| 2 | T-002 `[PARALLEL]`, T-003 `[CRITICAL]` | ✅ | T-003 ưu tiên |
|
|
273
|
+
| 3 | T-004 `[RISKY]` | ❌ | nếu fail → chạy fallback plan |
|
|
274
|
+
| 4 | T-005 `[GATE]` | ❌ | DỪNG, chờ human review |
|
|
275
|
+
| 5 | T-006 `[PARALLEL]` | ✅ | sau gate approved |
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Template: Test Cases
|
|
2
|
+
|
|
3
|
+
> Được tạo bởi **Test Agent** từ Specification
|
|
4
|
+
> Feature: [TÊN FEATURE]
|
|
5
|
+
> Spec Version: [vX.Y]
|
|
6
|
+
|
|
7
|
+
## 1. Test Matrix (Ma trận truy vết)
|
|
8
|
+
|
|
9
|
+
| Requirement | AC | Test Case(s) | Loại | Priority | Trạng thái |
|
|
10
|
+
|------------|----|-------------|------|:--------:|:---------:|
|
|
11
|
+
| REQ-U01 | AC-01 | TC-01, TC-02 | Unit | P1 | ⬜ Chưa chạy |
|
|
12
|
+
| REQ-E01 | AC-02 | TC-03, EC-01 | Integration | P2 | ⬜ Chưa chạy |
|
|
13
|
+
| REQ-S01 | AC-03 | TC-04, TC-05 | E2E | P2 | ⬜ Chưa chạy |
|
|
14
|
+
| REQ-O01 | AC-04 | TC-06 | Unit | P3 | ⬜ Chưa chạy |
|
|
15
|
+
|
|
16
|
+
> Cột **AC** = mã `AC-NN` tại spec §4 mà (các) test case verify. Mọi `AC-NN` phải có ≥1 TC (Master Check cross-check).
|
|
17
|
+
|
|
18
|
+
**Coverage**: [X/Y] REQ + [A/B] AC-NN có test → [XX]%
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 2. Test Cases
|
|
23
|
+
|
|
24
|
+
### TC-01: [Tên test case]
|
|
25
|
+
|
|
26
|
+
| Mục | Chi tiết |
|
|
27
|
+
|-----|---------|
|
|
28
|
+
| **Requirement** | REQ-xxx |
|
|
29
|
+
| **AC** | AC-NN (tiêu chí spec §4 mà TC này verify) |
|
|
30
|
+
| **Loại** | Unit / Integration / E2E |
|
|
31
|
+
| **Priority** | P1 / P2 / P3 |
|
|
32
|
+
| **Tiền điều kiện** | [Setup cần thiết] |
|
|
33
|
+
| **Bước thực hiện** | 1. [Bước 1] → 2. [Bước 2] → ... |
|
|
34
|
+
| **Input** | [Dữ liệu đầu vào cụ thể] |
|
|
35
|
+
| **Expected Output** | [Kết quả mong đợi cụ thể] |
|
|
36
|
+
| **Actual Output** | [Điền sau khi chạy] |
|
|
37
|
+
| **Kết quả** | ⬜ Pass / ⬜ Fail / ⬜ Chưa chạy |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### TC-02: [Tên test case]
|
|
42
|
+
|
|
43
|
+
| Mục | Chi tiết |
|
|
44
|
+
|-----|---------|
|
|
45
|
+
| **Requirement** | REQ-xxx |
|
|
46
|
+
| **AC** | AC-NN (tiêu chí spec §4 mà TC này verify) |
|
|
47
|
+
| **Loại** | Unit / Integration / E2E |
|
|
48
|
+
| **Priority** | P1 / P2 / P3 |
|
|
49
|
+
| **Tiền điều kiện** | |
|
|
50
|
+
| **Bước thực hiện** | |
|
|
51
|
+
| **Input** | |
|
|
52
|
+
| **Expected Output** | |
|
|
53
|
+
| **Actual Output** | |
|
|
54
|
+
| **Kết quả** | ⬜ Pass / ⬜ Fail / ⬜ Chưa chạy |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 3. Edge Cases & Error Cases
|
|
59
|
+
|
|
60
|
+
### EC-01: [Mô tả edge case]
|
|
61
|
+
| Mục | Chi tiết |
|
|
62
|
+
|-----|---------|
|
|
63
|
+
| **Requirement** | REQ-xxx |
|
|
64
|
+
| **Điều kiện** | [Khi nào xảy ra — boundary value / null / overflow] |
|
|
65
|
+
| **Input** | [Dữ liệu edge case cụ thể] |
|
|
66
|
+
| **Expected behavior** | [Hệ thống phải xử lý thế nào] |
|
|
67
|
+
| **Priority** | P1 / P2 / P3 |
|
|
68
|
+
|
|
69
|
+
### EC-02: [Mô tả error case]
|
|
70
|
+
| Mục | Chi tiết |
|
|
71
|
+
|-----|---------|
|
|
72
|
+
| **Requirement** | REQ-xxx |
|
|
73
|
+
| **Điều kiện** | [Network error / invalid input / timeout] |
|
|
74
|
+
| **Input** | [Dữ liệu gây lỗi] |
|
|
75
|
+
| **Expected behavior** | [Error message / fallback / retry] |
|
|
76
|
+
| **Priority** | P1 / P2 / P3 |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 4. Negative Tests
|
|
81
|
+
|
|
82
|
+
> Kiểm tra hệ thống KHÔNG làm những gì không nên làm
|
|
83
|
+
|
|
84
|
+
| ID | Mô tả | Input | Expected: Hệ thống KHÔNG | REQ |
|
|
85
|
+
|----|-------|-------|--------------------------|-----|
|
|
86
|
+
| NT-01 | [truy cập trái phép] | [input] | [cho phép truy cập] | REQ-xxx |
|
|
87
|
+
| NT-02 | [SQL injection] | `'; DROP TABLE--` | [thực thi query] | REQ-xxx |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 5. Test Data
|
|
92
|
+
|
|
93
|
+
### 5.1 Dữ liệu mẫu cần chuẩn bị
|
|
94
|
+
|
|
95
|
+
| Loại | Mô tả | Giá trị mẫu | Dùng cho TC |
|
|
96
|
+
|------|-------|-------------|:-----------:|
|
|
97
|
+
| | | | TC-xx |
|
|
98
|
+
|
|
99
|
+
### 5.2 Mock/Stub cần thiết
|
|
100
|
+
|
|
101
|
+
| Service/API | Mock method | Response mẫu | Dùng cho TC |
|
|
102
|
+
|------------|------------|--------------|:-----------:|
|
|
103
|
+
| | | | TC-xx |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 6. Tổng kết
|
|
108
|
+
|
|
109
|
+
| Metric | Giá trị |
|
|
110
|
+
|--------|--------|
|
|
111
|
+
| Tổng test cases | [Số] |
|
|
112
|
+
| Edge/Error cases | [Số] |
|
|
113
|
+
| Negative tests | [Số] |
|
|
114
|
+
| P1 (Critical) | [Số] |
|
|
115
|
+
| P2 (Important) | [Số] |
|
|
116
|
+
| P3 (Nice-to-have) | [Số] |
|
|
117
|
+
| Coverage Requirements | [X/Y] requirements có test |
|
|
118
|
+
| Estimated run time | [X phút] |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
> **Trạng thái**: Draft / Reviewed / Approved
|
|
123
|
+
> **Người review**: [QA Lead]
|
|
124
|
+
> **Ngày review**: [YYYY-MM-DD]
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Template: UX Checklist
|
|
2
|
+
|
|
3
|
+
> Được tạo bởi **UX Agent** — Phase B.0 (optional, `--with-ux`)
|
|
4
|
+
> Feature: [TÊN FEATURE]
|
|
5
|
+
> Spec Version: [vX.Y]
|
|
6
|
+
> Ngày review: [YYYY-MM-DD]
|
|
7
|
+
|
|
8
|
+
> 📌 Tham chiếu màn hình từ plan §5 (UI/Screen Changes) và token từ `DESIGN.md`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Usability (Khả dụng)
|
|
13
|
+
|
|
14
|
+
| Kiểm tra | Kết quả | Ghi chú |
|
|
15
|
+
|----------|---------|---------|
|
|
16
|
+
| Luồng chính ≤ 3 bước tới mục tiêu? | ✅ / ❌ / N/A | |
|
|
17
|
+
| Nhãn nút/label rõ nghĩa (không mơ hồ)? | ✅ / ❌ / N/A | |
|
|
18
|
+
| Hành động phá huỷ có xác nhận? | ✅ / ❌ / N/A | |
|
|
19
|
+
| Có lối thoát/back/cancel ở mọi bước? | ✅ / ❌ / N/A | |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Accessibility (A11y)
|
|
24
|
+
|
|
25
|
+
| Kiểm tra | Kết quả | Ghi chú |
|
|
26
|
+
|----------|---------|---------|
|
|
27
|
+
| Điều hướng bàn phím đầy đủ (focus order)? | ✅ / ❌ / N/A | |
|
|
28
|
+
| Label/semantics cho screen reader? | ✅ / ❌ / N/A | |
|
|
29
|
+
| Tương phản màu đạt WCAG AA? | ✅ / ❌ / N/A | dùng token `DESIGN.md` |
|
|
30
|
+
| Target chạm ≥ 44px? | ✅ / ❌ / N/A | |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 3. States & Feedback
|
|
35
|
+
|
|
36
|
+
| Màn hình (UC) | empty | loading | error | success | Token DESIGN.md |
|
|
37
|
+
|---------------|:-----:|:-------:|:-----:|:-------:|-----------------|
|
|
38
|
+
| [Màn hình] (UC-xx) | ✅/❌ | ✅/❌ | ✅/❌ | ✅/❌ | `button-primary`, `input-error`… |
|
|
39
|
+
|
|
40
|
+
> Mọi trạng thái trong plan §5 phải có thiết kế tương ứng — không bỏ trống loading/error.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 4. Visual Consistency
|
|
45
|
+
|
|
46
|
+
| Kiểm tra | Kết quả | Ghi chú |
|
|
47
|
+
|----------|---------|---------|
|
|
48
|
+
| Dùng token `DESIGN.md`, KHÔNG hardcode hex/size? | ✅ / ❌ / N/A | |
|
|
49
|
+
| Spacing/typography theo scale design? | ✅ / ❌ / N/A | |
|
|
50
|
+
| Component tái sử dụng (không tạo trùng)? | ✅ / ❌ / N/A | |
|
|
51
|
+
| Responsive (mobile/tablet/desktop)? | ✅ / ❌ / N/A | |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 5. Phân loại Issues
|
|
56
|
+
|
|
57
|
+
### 🟠 Major UX Issues
|
|
58
|
+
*(Không có)* / Liệt kê nếu có:
|
|
59
|
+
- **[UX-M001]** [Mô tả] → Fix: [Đề xuất]
|
|
60
|
+
|
|
61
|
+
### 🟡 UX Concerns
|
|
62
|
+
*(Không có)* / Liệt kê nếu có:
|
|
63
|
+
- **[UX-W001]** [Mô tả] → Implement Agent cần chú ý
|
|
64
|
+
|
|
65
|
+
### 🔵 Recommendations
|
|
66
|
+
- **[UX-R001]** [Gợi ý cải thiện]
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 6. Verdict
|
|
71
|
+
|
|
72
|
+
**UX Review**: ✅ PASS / ⚠️ PASS WITH CONCERNS / ❌ FAIL
|
|
73
|
+
|
|
74
|
+
> **FAIL** nếu thiếu trạng thái thiết yếu (error/loading) hoặc vi phạm a11y nghiêm trọng.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
> **Reviewer**: UX Agent
|
|
79
|
+
> **Mandatory khi**: Feature có UI/UX components (form, danh sách, luồng nhiều bước)
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Template: Validation Report (Báo cáo Master Check)
|
|
2
|
+
|
|
3
|
+
> Được tạo bởi **Master Check Agent** — Phase R.0
|
|
4
|
+
> Feature: [TÊN FEATURE]
|
|
5
|
+
> Spec Version: [vX.Y]
|
|
6
|
+
> Ngày kiểm tra: [YYYY-MM-DD]
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Kết quả tổng hợp
|
|
11
|
+
|
|
12
|
+
| | Kết quả |
|
|
13
|
+
|---|---|
|
|
14
|
+
| **PHÁN QUYẾT** | ✅ **PASS** / ⚠️ **PASS WITH CONCERNS** / ❌ **FAIL** |
|
|
15
|
+
| **Spec Version** | vX.Y |
|
|
16
|
+
| **Artifacts synced** | ✅ Tất cả / ❌ Có artifacts chưa sync |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Coverage Check (Độ bao phủ)
|
|
21
|
+
|
|
22
|
+
> Mọi requirement trong spec đều có task trong plan VÀ test case tương ứng?
|
|
23
|
+
|
|
24
|
+
| Requirement | Có trong Plan? | Có Test Case? | Kết quả |
|
|
25
|
+
|------------|---------------|--------------|---------|
|
|
26
|
+
| REQ-U01 | ✅ T-001 | ✅ TC-01 | ✅ |
|
|
27
|
+
| REQ-E01 | ✅ T-003 | ❌ Thiếu | ❌ |
|
|
28
|
+
|
|
29
|
+
**Coverage**: [X/Y] requirements → [XX]%
|
|
30
|
+
|
|
31
|
+
> **AC coverage** — mọi `AC-NN` (spec §4) có ≥1 task (qua `Done khi`) phủ?
|
|
32
|
+
|
|
33
|
+
| AC | Task phủ | Kết quả |
|
|
34
|
+
|----|----------|---------|
|
|
35
|
+
| AC-01 | T-003 | ✅ |
|
|
36
|
+
| AC-02 | ❌ Thiếu | ❌ |
|
|
37
|
+
|
|
38
|
+
**AC coverage**: [X/Y] → [XX]%
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. Consistency Check (Tính nhất quán)
|
|
43
|
+
|
|
44
|
+
| Kiểm tra | Kết quả | Ghi chú |
|
|
45
|
+
|---------|---------|---------|
|
|
46
|
+
| Spec ↔ Plan nhất quán | ✅ / ❌ | [Chi tiết nếu có vấn đề] |
|
|
47
|
+
| Spec ↔ Test Cases nhất quán | ✅ / ❌ | |
|
|
48
|
+
| Plan ↔ Test Cases nhất quán | ✅ / ❌ | |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 3. Completeness Check (Tính đầy đủ)
|
|
53
|
+
|
|
54
|
+
| Kiểm tra | Kết quả | Ghi chú |
|
|
55
|
+
|---------|---------|---------|
|
|
56
|
+
| Edge cases đã xử lý | ✅ / ❌ | |
|
|
57
|
+
| Error handling đã định nghĩa | ✅ / ❌ | |
|
|
58
|
+
| Security concerns đã xem xét | ✅ / ❌ | |
|
|
59
|
+
| Performance considerations | ✅ / ❌ | |
|
|
60
|
+
| No-Go Zones không bị vi phạm | ✅ / ❌ / N/A | |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 4. Constitution Compliance (Tuân thủ Constitution)
|
|
65
|
+
|
|
66
|
+
| Nguyên tắc | Tuân thủ? | Ghi chú |
|
|
67
|
+
|-----------|----------|---------|
|
|
68
|
+
| Architecture pattern | ✅ / ❌ | |
|
|
69
|
+
| Code standards | ✅ / ❌ | |
|
|
70
|
+
| UI/UX guidelines | ✅ / ❌ | |
|
|
71
|
+
| API standards | ✅ / ❌ | |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 5. Phân loại Issues
|
|
76
|
+
|
|
77
|
+
### 🔴 Critical — Block implementation
|
|
78
|
+
*(Không có)* / Liệt kê nếu có:
|
|
79
|
+
- **[C-001]** [Mô tả] → Fix: [Đề xuất]
|
|
80
|
+
|
|
81
|
+
### 🟠 Major — Block implementation
|
|
82
|
+
*(Không có)* / Liệt kê nếu có:
|
|
83
|
+
- **[M-001]** [Mô tả] → Fix: [Đề xuất]
|
|
84
|
+
|
|
85
|
+
### 🟡 Concerns — Không block; Implement Agent phải đọc và chú ý
|
|
86
|
+
*(Không có)* / Liệt kê nếu có:
|
|
87
|
+
- **[W-001]** [Mô tả risk/concern] → Implement Agent lưu ý
|
|
88
|
+
|
|
89
|
+
### 🔵 Minor/Suggestions
|
|
90
|
+
- **[S-001]** [Gợi ý cải thiện]
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 6. Routing Decision
|
|
95
|
+
|
|
96
|
+
> **Bắt buộc điền** — để agent tiếp theo biết rõ bước kế tiếp.
|
|
97
|
+
|
|
98
|
+
**PHÁN QUYẾT**: ✅ PASS / ⚠️ PASS WITH CONCERNS / ❌ FAIL
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
# Dùng để cập nhật .flow-state.yaml
|
|
102
|
+
verdict: "PASS" # PASS | PASS_WITH_CONCERNS | FAIL
|
|
103
|
+
fail_reason: null # null | spec_gap | plan_gap | test_gap | nogo_violation | constitution_violation
|
|
104
|
+
route_decision: "implement" # implement | re_specify | re_plan | re_test | fix_artifact
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Route cụ thể**:
|
|
108
|
+
|
|
109
|
+
| Verdict | fail_reason | → Làm gì tiếp |
|
|
110
|
+
|---------|------------|----------------|
|
|
111
|
+
| PASS | — | `/v.implement` |
|
|
112
|
+
| PASS_WITH_CONCERNS | — | `/v.implement` + đọc kỹ concerns |
|
|
113
|
+
| FAIL | `spec_gap` | `/v.specify` → sync → check |
|
|
114
|
+
| FAIL | `plan_gap` | `/v.plan` → sync → check |
|
|
115
|
+
| FAIL | `test_gap` | `/v.test` → check |
|
|
116
|
+
| FAIL | `nogo_violation` | `/v.plan` (redesign tránh No-Go) |
|
|
117
|
+
| FAIL | `constitution_violation` | Fix artifact vi phạm → check |
|
|
118
|
+
|
|
119
|
+
> **⚠️ Concerns carry-forward** *(chỉ khi PASS_WITH_CONCERNS)*:
|
|
120
|
+
> Implement Agent và Review Agent phải đối chiếu danh sách concerns [W-xxx] bên trên.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
> **Người kiểm tra**: Master Check Agent
|
|
125
|
+
> **Cần approve bởi**: [PM / Tech Lead]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# V-Flow Project Config
|
|
2
|
+
# File: .v-flow/config.yaml (project-global — khác .flow-state.yaml vốn per-feature)
|
|
3
|
+
# Nơi PERSIST đáp án cho các `setup_questions` của skills. Tạo 1 lần khi onboard dự án.
|
|
4
|
+
# Các skill/agent ĐỌC file này; nếu thiếu → dùng default trong từng skill config.json.
|
|
5
|
+
|
|
6
|
+
# ── Testing (tdd-driver) ─────────────────────────────────────────────────
|
|
7
|
+
test_framework: "jest" # jest | mocha | vitest | flutter_test | pytest | other
|
|
8
|
+
coverage_target: 80 # %
|
|
9
|
+
test_location: "test/" # colocated | test/ | __tests__/ | spec/
|
|
10
|
+
test_command: "npm test" # lệnh chạy full test suite của dự án
|
|
11
|
+
|
|
12
|
+
# ── Lint / Constitution (constitution-enforcer) ──────────────────────────
|
|
13
|
+
lint_command: "npm run -s lint" # check-constitution.sh đọc field này; rỗng → autodetect
|
|
14
|
+
|
|
15
|
+
# ── No-Go Zones (no-go-zone-guard) ───────────────────────────────────────
|
|
16
|
+
nogo_strict_mode: "strict" # strict (BLOCK) | warning (cần approval) | log
|
|
17
|
+
nogo_source: "both" # context.md | constitution.md | both
|
|
18
|
+
|
|
19
|
+
# ── Git workflow (implement-agent — Branch & Failure Recovery) ───────────
|
|
20
|
+
branch_prefix: "feat/" # vd feat/001-user-login
|
|
21
|
+
commit_per_task: true # commit incremental mỗi task xong
|
|
22
|
+
stuck_retry_limit: 3 # fail Red→Green ≥ N lần → DỪNG thrash, escalate
|