dw-kit 1.2.0 → 1.3.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.
Files changed (63) hide show
  1. package/.claude/hooks/post-write.sh +64 -58
  2. package/.claude/hooks/pre-commit-gate.sh +96 -90
  3. package/.claude/hooks/privacy-block.sh +99 -94
  4. package/.claude/hooks/progress-ping.sh +53 -47
  5. package/.claude/hooks/safety-guard.sh +60 -54
  6. package/.claude/hooks/scout-block.sh +88 -82
  7. package/.claude/hooks/session-init.sh +91 -74
  8. package/.claude/hooks/stop-check.sh +88 -36
  9. package/.claude/hooks/telemetry-log.sh +34 -0
  10. package/.claude/rules/code-style.md +37 -37
  11. package/.claude/rules/commit-standards.md +37 -37
  12. package/.claude/rules/dw.md +136 -0
  13. package/.claude/settings.json +120 -99
  14. package/.claude/skills/dw-arch-review/SKILL.md +119 -119
  15. package/.claude/skills/dw-archive/SKILL.md +81 -81
  16. package/.claude/skills/dw-commit/SKILL.md +81 -81
  17. package/.claude/skills/dw-config-init/SKILL.md +91 -91
  18. package/.claude/skills/dw-config-validate/SKILL.md +75 -75
  19. package/.claude/skills/dw-dashboard/SKILL.md +209 -209
  20. package/.claude/skills/dw-debug/SKILL.md +97 -97
  21. package/.claude/skills/dw-decision/SKILL.md +116 -0
  22. package/.claude/skills/dw-docs-update/SKILL.md +125 -125
  23. package/.claude/skills/dw-estimate/SKILL.md +90 -90
  24. package/.claude/skills/dw-execute/SKILL.md +98 -98
  25. package/.claude/skills/dw-flow/SKILL.md +274 -274
  26. package/.claude/skills/dw-handoff/SKILL.md +81 -81
  27. package/.claude/skills/dw-kit-report/SKILL.md +152 -152
  28. package/.claude/skills/dw-log-work/SKILL.md +69 -69
  29. package/.claude/skills/dw-onboard/SKILL.md +201 -201
  30. package/.claude/skills/dw-plan/SKILL.md +125 -125
  31. package/.claude/skills/dw-prompt/SKILL.md +62 -62
  32. package/.claude/skills/dw-requirements/SKILL.md +98 -98
  33. package/.claude/skills/dw-research/SKILL.md +114 -114
  34. package/.claude/skills/dw-retroactive/SKILL.md +311 -311
  35. package/.claude/skills/dw-review/SKILL.md +66 -66
  36. package/.claude/skills/dw-rollback/SKILL.md +90 -90
  37. package/.claude/skills/dw-sprint-review/SKILL.md +99 -99
  38. package/.claude/skills/dw-task-init/SKILL.md +59 -59
  39. package/.claude/skills/dw-test-plan/SKILL.md +113 -113
  40. package/.claude/skills/dw-thinking/SKILL.md +70 -70
  41. package/.claude/skills/dw-upgrade/SKILL.md +72 -72
  42. package/.dw/config/dw.config.yml +82 -82
  43. package/.dw/core/PILLARS.md +122 -0
  44. package/.dw/core/templates/v2/spec.md +68 -0
  45. package/.dw/core/templates/v2/tracking.md +62 -0
  46. package/.dw/core/v14-evaluation-protocol.md +118 -0
  47. package/CLAUDE.md +42 -39
  48. package/MIGRATION-v1.3.md +201 -0
  49. package/README.md +43 -6
  50. package/package.json +86 -84
  51. package/src/cli.mjs +45 -9
  52. package/src/commands/dashboard.mjs +116 -0
  53. package/src/commands/doctor.mjs +165 -149
  54. package/src/commands/init.mjs +339 -332
  55. package/src/commands/metrics.mjs +165 -0
  56. package/src/commands/upgrade.mjs +297 -262
  57. package/src/lib/active-index.mjs +87 -0
  58. package/src/lib/copy.mjs +118 -110
  59. package/src/lib/cut-analysis.mjs +161 -0
  60. package/src/lib/telemetry.mjs +80 -0
  61. package/.claude/rules/dw-core.md +0 -100
  62. package/.claude/rules/dw-skills.md +0 -53
  63. package/.claude/rules/workflow-rules.md +0 -77
@@ -1,66 +1,66 @@
1
- ---
2
- name: dw-review
3
- description: "Review code thay đổi gần đây hoặc cả task. Kiểm tra correctness, security, conventions, test coverage. Tạo báo cáo phân loại Critical/Warning/Suggestion."
4
- argument-hint: "[task-name | branch | file]"
5
- context: fork
6
- agent: reviewer
7
- allowed-tools:
8
- - Read
9
- - Grep
10
- - Glob
11
- - "Bash(git diff *)"
12
- - "Bash(git log *)"
13
- - "Bash(git show *)"
14
- ---
15
-
16
- # Code Review
17
-
18
- Target: **$ARGUMENTS**
19
-
20
- ## Đọc Config
21
-
22
- Đọc `.dw/config/dw.config.yml` → `paths.tasks`, `workflow.default_depth`.
23
-
24
- ## Xác Định Scope
25
-
26
- - Nếu có argument = task-name: review tất cả commits liên quan đến task
27
- - Nếu có argument = branch: `git diff main...$ARGUMENTS`
28
- - Nếu không có argument: `git diff HEAD~1` (commit gần nhất)
29
-
30
- ## Quy Trình
31
-
32
- ### 1. Lấy diff
33
- ```bash
34
- git diff [scope] --name-only # danh sách files changed
35
- git diff [scope] # nội dung thay đổi
36
- ```
37
-
38
- ### 2. Đọc files liên quan
39
- Đọc toàn bộ files đã changed để hiểu full context (không chỉ diff).
40
-
41
- ### 3. Review theo reviewer agent
42
-
43
- Agent `reviewer` sẽ kiểm tra:
44
- - **Correctness**: Logic, edge cases, error handling
45
- - **Security**: Input validation, auth, data exposure
46
- - **Performance**: N+1, unnecessary calls, complexity
47
- - **Tests**: Coverage, test quality
48
- - **Conventions**: Naming, structure, code style (`.claude/rules/code-style.md`)
49
-
50
- ### 4. Kiểm tra checklist cụ thể
51
-
52
- Nếu có plan file (`{paths.tasks}/$ARGUMENTS/$ARGUMENTS-plan.md`):
53
- - Đối chiếu acceptance criteria từng subtask
54
- - Kiểm tra scope có vượt plan không
55
-
56
- ### 5. Output
57
-
58
- Tạo báo cáo đầy đủ theo format của reviewer agent.
59
-
60
- ## Sau Review
61
-
62
- - Nếu có Critical issues: "Cần fix trước khi merge"
63
- - Nếu chỉ có Warnings: "Khuyến khích fix, nhưng có thể proceed"
64
- - Nếu pass: "Approved — có thể chạy `/dw-commit`"
65
-
66
- Nếu team có TL: "Gợi ý gửi báo cáo này cho TL để final approve."
1
+ ---
2
+ name: dw:review
3
+ description: "Review code thay đổi gần đây hoặc cả task. Kiểm tra correctness, security, conventions, test coverage. Tạo báo cáo phân loại Critical/Warning/Suggestion."
4
+ argument-hint: "[task-name | branch | file]"
5
+ context: fork
6
+ agent: reviewer
7
+ allowed-tools:
8
+ - Read
9
+ - Grep
10
+ - Glob
11
+ - "Bash(git diff *)"
12
+ - "Bash(git log *)"
13
+ - "Bash(git show *)"
14
+ ---
15
+
16
+ # Code Review
17
+
18
+ Target: **$ARGUMENTS**
19
+
20
+ ## Đọc Config
21
+
22
+ Đọc `.dw/config/dw.config.yml` → `paths.tasks`, `workflow.default_depth`.
23
+
24
+ ## Xác Định Scope
25
+
26
+ - Nếu có argument = task-name: review tất cả commits liên quan đến task
27
+ - Nếu có argument = branch: `git diff main...$ARGUMENTS`
28
+ - Nếu không có argument: `git diff HEAD~1` (commit gần nhất)
29
+
30
+ ## Quy Trình
31
+
32
+ ### 1. Lấy diff
33
+ ```bash
34
+ git diff [scope] --name-only # danh sách files changed
35
+ git diff [scope] # nội dung thay đổi
36
+ ```
37
+
38
+ ### 2. Đọc files liên quan
39
+ Đọc toàn bộ files đã changed để hiểu full context (không chỉ diff).
40
+
41
+ ### 3. Review theo reviewer agent
42
+
43
+ Agent `reviewer` sẽ kiểm tra:
44
+ - **Correctness**: Logic, edge cases, error handling
45
+ - **Security**: Input validation, auth, data exposure
46
+ - **Performance**: N+1, unnecessary calls, complexity
47
+ - **Tests**: Coverage, test quality
48
+ - **Conventions**: Naming, structure, code style (`.claude/rules/code-style.md`)
49
+
50
+ ### 4. Kiểm tra checklist cụ thể
51
+
52
+ Nếu có plan file (`{paths.tasks}/$ARGUMENTS/$ARGUMENTS-plan.md`):
53
+ - Đối chiếu acceptance criteria từng subtask
54
+ - Kiểm tra scope có vượt plan không
55
+
56
+ ### 5. Output
57
+
58
+ Tạo báo cáo đầy đủ theo format của reviewer agent.
59
+
60
+ ## Sau Review
61
+
62
+ - Nếu có Critical issues: "Cần fix trước khi merge"
63
+ - Nếu chỉ có Warnings: "Khuyến khích fix, nhưng có thể proceed"
64
+ - Nếu pass: "Approved — có thể chạy `/dw:commit`"
65
+
66
+ Nếu team có TL: "Gợi ý gửi báo cáo này cho TL để final approve."
@@ -1,90 +1,90 @@
1
- ---
2
- name: dw-rollback
3
- description: "Revert task docs về trạng thái trước. Dùng khi plan sai, execute sai hướng, hoặc cần bắt đầu lại từ sau research."
4
- argument-hint: "[task-name] [checkpoint: after-research | after-plan | clean]"
5
- ---
6
-
7
- # Rollback Task Docs: $ARGUMENTS
8
-
9
- ## Parse Arguments
10
-
11
- Từ `$ARGUMENTS`:
12
- - `task-name`: tên task cần rollback
13
- - `checkpoint` (optional): điểm muốn revert về
14
- - `after-research` — giữ context.md, xóa plan.md và reset progress.md
15
- - `after-plan` — giữ context.md + plan.md, reset progress.md về trạng thái ban đầu
16
- - `clean` — xóa toàn bộ nội dung, giữ files trống (restart từ đầu)
17
- - (không có) → hỏi user chọn
18
-
19
- ## Bước 1: Đọc config
20
-
21
- `paths.tasks` → xác định thư mục task.
22
-
23
- ## Bước 2: Kiểm tra task tồn tại
24
-
25
- ```
26
- {paths.tasks}/[task-name]/
27
- ├── [task-name]-context.md
28
- ├── [task-name]-plan.md
29
- └── [task-name]-progress.md
30
- ```
31
-
32
- Nếu không tìm thấy → thông báo và DỪNG.
33
-
34
- ## Bước 3: Git checkpoint (an toàn)
35
-
36
- Kiểm tra uncommitted changes trong task docs:
37
- ```bash
38
- git status {paths.tasks}/[task-name]/
39
- ```
40
-
41
- Nếu có uncommitted changes → hỏi: "Có uncommitted changes trong task docs. Commit trước khi rollback? (y/n/skip)"
42
-
43
- ## Bước 4: Hiển thị preview và confirm
44
-
45
- Hiển thị rõ sẽ làm gì:
46
- ```
47
- Rollback [task-name] về checkpoint: [checkpoint]
48
-
49
- Sẽ GIỮ:
50
- ✓ [task-name]-context.md (research findings)
51
-
52
- Sẽ RESET:
53
- ✗ [task-name]-plan.md → xóa nội dung, giữ file trống
54
- ✗ [task-name]-progress.md → reset về "Not Started"
55
-
56
- Tiếp tục? (y/n)
57
- ```
58
-
59
- Chờ user confirm trước khi thực hiện.
60
-
61
- ## Bước 5: Thực hiện rollback
62
-
63
- ### checkpoint = "after-research"
64
- - Giữ `context.md` nguyên vẹn
65
- - Reset `plan.md` → file trống (chỉ giữ header)
66
- - Reset `progress.md` → status = "Not Started", xóa subtask rows
67
-
68
- ### checkpoint = "after-plan"
69
- - Giữ `context.md` nguyên vẹn
70
- - Giữ `plan.md` nguyên vẹn
71
- - Reset `progress.md` → status = "Not Started", tất cả subtasks = Pending
72
-
73
- ### checkpoint = "clean"
74
- - Reset tất cả 3 files về template trống
75
- - Điền lại [Task Name] và [date]
76
-
77
- ## Bước 6: Thông báo
78
-
79
- ```
80
- Rollback hoàn tất.
81
-
82
- Task: [task-name]
83
- Checkpoint: [checkpoint]
84
- Thời gian: [timestamp]
85
-
86
- Bước tiếp theo:
87
- - after-research → Chạy /dw-plan [task-name] để lập kế hoạch lại
88
- - after-plan → Chạy /dw-execute [task-name] để implement lại
89
- - clean → Chạy /dw-research [task-name] để bắt đầu từ đầu
90
- ```
1
+ ---
2
+ name: dw:rollback
3
+ description: "Revert task docs về trạng thái trước. Dùng khi plan sai, execute sai hướng, hoặc cần bắt đầu lại từ sau research."
4
+ argument-hint: "[task-name] [checkpoint: after-research | after-plan | clean]"
5
+ ---
6
+
7
+ # Rollback Task Docs: $ARGUMENTS
8
+
9
+ ## Parse Arguments
10
+
11
+ Từ `$ARGUMENTS`:
12
+ - `task-name`: tên task cần rollback
13
+ - `checkpoint` (optional): điểm muốn revert về
14
+ - `after-research` — giữ context.md, xóa plan.md và reset progress.md
15
+ - `after-plan` — giữ context.md + plan.md, reset progress.md về trạng thái ban đầu
16
+ - `clean` — xóa toàn bộ nội dung, giữ files trống (restart từ đầu)
17
+ - (không có) → hỏi user chọn
18
+
19
+ ## Bước 1: Đọc config
20
+
21
+ `paths.tasks` → xác định thư mục task.
22
+
23
+ ## Bước 2: Kiểm tra task tồn tại
24
+
25
+ ```
26
+ {paths.tasks}/[task-name]/
27
+ ├── [task-name]-context.md
28
+ ├── [task-name]-plan.md
29
+ └── [task-name]-progress.md
30
+ ```
31
+
32
+ Nếu không tìm thấy → thông báo và DỪNG.
33
+
34
+ ## Bước 3: Git checkpoint (an toàn)
35
+
36
+ Kiểm tra uncommitted changes trong task docs:
37
+ ```bash
38
+ git status {paths.tasks}/[task-name]/
39
+ ```
40
+
41
+ Nếu có uncommitted changes → hỏi: "Có uncommitted changes trong task docs. Commit trước khi rollback? (y/n/skip)"
42
+
43
+ ## Bước 4: Hiển thị preview và confirm
44
+
45
+ Hiển thị rõ sẽ làm gì:
46
+ ```
47
+ Rollback [task-name] về checkpoint: [checkpoint]
48
+
49
+ Sẽ GIỮ:
50
+ ✓ [task-name]-context.md (research findings)
51
+
52
+ Sẽ RESET:
53
+ ✗ [task-name]-plan.md → xóa nội dung, giữ file trống
54
+ ✗ [task-name]-progress.md → reset về "Not Started"
55
+
56
+ Tiếp tục? (y/n)
57
+ ```
58
+
59
+ Chờ user confirm trước khi thực hiện.
60
+
61
+ ## Bước 5: Thực hiện rollback
62
+
63
+ ### checkpoint = "after-research"
64
+ - Giữ `context.md` nguyên vẹn
65
+ - Reset `plan.md` → file trống (chỉ giữ header)
66
+ - Reset `progress.md` → status = "Not Started", xóa subtask rows
67
+
68
+ ### checkpoint = "after-plan"
69
+ - Giữ `context.md` nguyên vẹn
70
+ - Giữ `plan.md` nguyên vẹn
71
+ - Reset `progress.md` → status = "Not Started", tất cả subtasks = Pending
72
+
73
+ ### checkpoint = "clean"
74
+ - Reset tất cả 3 files về template trống
75
+ - Điền lại [Task Name] và [date]
76
+
77
+ ## Bước 6: Thông báo
78
+
79
+ ```
80
+ Rollback hoàn tất.
81
+
82
+ Task: [task-name]
83
+ Checkpoint: [checkpoint]
84
+ Thời gian: [timestamp]
85
+
86
+ Bước tiếp theo:
87
+ - after-research → Chạy /dw:plan [task-name] để lập kế hoạch lại
88
+ - after-plan → Chạy /dw:execute [task-name] để implement lại
89
+ - clean → Chạy /dw:research [task-name] để bắt đầu từ đầu
90
+ ```
@@ -1,99 +1,99 @@
1
- ---
2
- name: dw-sprint-review
3
- description: "Tổng kết sprint: tasks hoàn thành, metrics, lessons learned, items cho sprint tiếp theo. Dành cho team retrospective cuối sprint."
4
- argument-hint: "[sprint-name hoặc period: e.g. sprint-3, 2026-03]"
5
- ---
6
-
7
- # Sprint Review: $ARGUMENTS
8
-
9
- ## Đọc Config
10
-
11
- Đọc `.dw/config/dw.config.yml`:
12
- - `paths.tasks` → tìm task docs
13
- - `.dw/metrics` → tìm effort data
14
- - `tracking.estimation`, `tracking.log_work` → biết có data nào
15
-
16
- ## Bước 1: Thu thập dữ liệu
17
-
18
- ### Tasks trong sprint
19
- Scan `{paths.tasks}/` tìm tasks có status Done hoặc In Progress trong kỳ sprint.
20
- Đọc `*-progress.md` của mỗi task để lấy:
21
- - Trạng thái cuối
22
- - Effort estimate vs actual
23
- - Blockers gặp phải
24
- - Commits liên quan
25
-
26
- ### Git history
27
- ```bash
28
- git log --oneline --since="[sprint-start]" --until="[sprint-end]"
29
- ```
30
-
31
- ## Bước 2: Tạo báo cáo sprint
32
-
33
- Ghi vào `{paths.reports}/sprint-review-$ARGUMENTS.md`:
34
-
35
- ```markdown
36
- # Sprint Review: [Sprint Name]
37
-
38
- **Kỳ**: [start] → [end]
39
- **Team**: [roles từ config]
40
- **Ngày tạo**: [date]
41
-
42
- ---
43
-
44
- ## Tóm Tắt
45
-
46
- | Metric | Giá trị |
47
- |--------|---------|
48
- | Tasks hoàn thành | X/Y |
49
- | Estimate tổng | Xh |
50
- | Actual tổng | Xh |
51
- | Accuracy | X% |
52
- | Commits | X |
53
-
54
- ## Tasks Hoàn Thành
55
-
56
- | Task | Estimate | Actual | Variance | Ghi chú |
57
- |------|----------|--------|----------|---------|
58
- | [task-name] | | | | |
59
-
60
- ## Tasks Chưa Hoàn Thành / Carry-over
61
-
62
- | Task | Lý do | Hành động |
63
- |------|-------|-----------|
64
- | | | |
65
-
66
- ## Blockers Gặp Phải
67
-
68
- [Danh sách blockers, đã giải quyết hay chưa]
69
-
70
- ## Lessons Learned
71
-
72
- ### Làm tốt (Keep)
73
- - [Điều gì hiệu quả trong sprint này]
74
-
75
- ### Cần cải thiện (Improve)
76
- - [Điều gì cần làm khác đi]
77
-
78
- ### Thử nghiệm (Try)
79
- - [Điều gì muốn thử trong sprint sau]
80
-
81
- ## Items Cho Sprint Tiếp Theo
82
-
83
- - [ ] [Action item 1] — owner: [role]
84
- - [ ] [Action item 2]
85
-
86
- ## DORA Metrics (nếu có data)
87
-
88
- | Metric | Giá trị | Target |
89
- |--------|---------|--------|
90
- | Deployment frequency | | |
91
- | Lead time for changes | | |
92
- | Change failure rate | | |
93
- | MTTR | | |
94
- ```
95
-
96
- ## Bước 3: Thông báo
97
-
98
- Hiển thị summary và path đến file báo cáo.
99
- Gợi ý: "PM có thể chạy `/dw-dashboard` để xem báo cáo đầy đủ hơn."
1
+ ---
2
+ name: dw:sprint-review
3
+ description: "Tổng kết sprint: tasks hoàn thành, metrics, lessons learned, items cho sprint tiếp theo. Dành cho team retrospective cuối sprint."
4
+ argument-hint: "[sprint-name hoặc period: e.g. sprint-3, 2026-03]"
5
+ ---
6
+
7
+ # Sprint Review: $ARGUMENTS
8
+
9
+ ## Đọc Config
10
+
11
+ Đọc `.dw/config/dw.config.yml`:
12
+ - `paths.tasks` → tìm task docs
13
+ - `.dw/metrics` → tìm effort data
14
+ - `tracking.estimation`, `tracking.log_work` → biết có data nào
15
+
16
+ ## Bước 1: Thu thập dữ liệu
17
+
18
+ ### Tasks trong sprint
19
+ Scan `{paths.tasks}/` tìm tasks có status Done hoặc In Progress trong kỳ sprint.
20
+ Đọc `*-progress.md` của mỗi task để lấy:
21
+ - Trạng thái cuối
22
+ - Effort estimate vs actual
23
+ - Blockers gặp phải
24
+ - Commits liên quan
25
+
26
+ ### Git history
27
+ ```bash
28
+ git log --oneline --since="[sprint-start]" --until="[sprint-end]"
29
+ ```
30
+
31
+ ## Bước 2: Tạo báo cáo sprint
32
+
33
+ Ghi vào `{paths.reports}/sprint-review-$ARGUMENTS.md`:
34
+
35
+ ```markdown
36
+ # Sprint Review: [Sprint Name]
37
+
38
+ **Kỳ**: [start] → [end]
39
+ **Team**: [roles từ config]
40
+ **Ngày tạo**: [date]
41
+
42
+ ---
43
+
44
+ ## Tóm Tắt
45
+
46
+ | Metric | Giá trị |
47
+ |--------|---------|
48
+ | Tasks hoàn thành | X/Y |
49
+ | Estimate tổng | Xh |
50
+ | Actual tổng | Xh |
51
+ | Accuracy | X% |
52
+ | Commits | X |
53
+
54
+ ## Tasks Hoàn Thành
55
+
56
+ | Task | Estimate | Actual | Variance | Ghi chú |
57
+ |------|----------|--------|----------|---------|
58
+ | [task-name] | | | | |
59
+
60
+ ## Tasks Chưa Hoàn Thành / Carry-over
61
+
62
+ | Task | Lý do | Hành động |
63
+ |------|-------|-----------|
64
+ | | | |
65
+
66
+ ## Blockers Gặp Phải
67
+
68
+ [Danh sách blockers, đã giải quyết hay chưa]
69
+
70
+ ## Lessons Learned
71
+
72
+ ### Làm tốt (Keep)
73
+ - [Điều gì hiệu quả trong sprint này]
74
+
75
+ ### Cần cải thiện (Improve)
76
+ - [Điều gì cần làm khác đi]
77
+
78
+ ### Thử nghiệm (Try)
79
+ - [Điều gì muốn thử trong sprint sau]
80
+
81
+ ## Items Cho Sprint Tiếp Theo
82
+
83
+ - [ ] [Action item 1] — owner: [role]
84
+ - [ ] [Action item 2]
85
+
86
+ ## DORA Metrics (nếu có data)
87
+
88
+ | Metric | Giá trị | Target |
89
+ |--------|---------|--------|
90
+ | Deployment frequency | | |
91
+ | Lead time for changes | | |
92
+ | Change failure rate | | |
93
+ | MTTR | | |
94
+ ```
95
+
96
+ ## Bước 3: Thông báo
97
+
98
+ Hiển thị summary và path đến file báo cáo.
99
+ Gợi ý: "PM có thể chạy `/dw:dashboard` để xem báo cáo đầy đủ hơn."
@@ -1,59 +1,59 @@
1
- ---
2
- name: dw-task-init
3
- description: "Khởi tạo bộ documentation cho task mới. Tạo thư mục và 3 template files (context, plan, progress)."
4
- argument-hint: "[task-name]"
5
- ---
6
-
7
- # Khởi Tạo Task: $ARGUMENTS
8
-
9
- ## Đọc Config
10
-
11
- Đọc `.dw/config/dw.config.yml` để lấy:
12
- - `paths.tasks` → thư mục chứa task docs (mặc định: `.dw/tasks`)
13
- - `workflow.default_depth` → `quick | standard | thorough`
14
- - `tracking.estimation` → có tạo section estimation không
15
- - `tracking.log_work` → có tạo section effort log không
16
- - `team.roles` → hiển thị workflow phù hợp
17
- - `project.language` → chọn template ngôn ngữ
18
-
19
- ## Tạo Thư Mục & Files
20
-
21
- ```
22
- {paths.tasks}/$ARGUMENTS/
23
- ├── $ARGUMENTS-context.md # Research findings & codebase analysis
24
- ├── $ARGUMENTS-plan.md # Implementation plan & design
25
- └── $ARGUMENTS-progress.md # Progress tracking, effort log, changelog
26
- ```
27
-
28
- ### File context.md
29
- Đọc `project.language` từ config để chọn template:
30
- - `language: "vi"` → dùng `.claude/templates/task-context.md`
31
- - `language: "en"` → dùng `.claude/templates/en/task-context.md`
32
-
33
- Điền vào template:
34
- - `[Task Name]` = `$ARGUMENTS`
35
- - `[date]` = ngày hiện tại
36
-
37
- ### File plan.md
38
- Chọn template theo `project.language` (`.claude/templates/[lang]/task-plan.md`).
39
- - Nếu `tracking.estimation = true`: giữ nguyên section Estimation
40
- - Nếu `tracking.estimation = false`: xóa section Estimation
41
-
42
- ### File progress.md
43
- Chọn template theo `project.language` (`.claude/templates/[lang]/task-progress.md`).
44
- - Điền `[Task Name]` = `$ARGUMENTS`
45
- - Điền `[date]` = ngày hiện tại
46
- - Nếu `tracking.log_work = true`: giữ section Effort Log
47
- - Nếu `tracking.log_work = false`: xóa section Effort Log
48
-
49
- ## Sau Khi Tạo
50
-
51
- Hiển thị cho user:
52
- 1. Danh sách files đã tạo
53
- 2. Workflow tiếp theo dựa trên `workflow.default_depth`:
54
-
55
- **quick**: "Tiếp theo: Code ngay hoặc `/dw-research $ARGUMENTS` nếu cần khảo sát"
56
- **standard**: "Tiếp theo: `/dw-research $ARGUMENTS` → `/dw-plan $ARGUMENTS` → approve → `/dw-execute $ARGUMENTS`"
57
- **thorough**: "Tiếp theo: `/dw-requirements $ARGUMENTS` → `/dw-research $ARGUMENTS` → `/dw-estimate $ARGUMENTS` → `/dw-plan $ARGUMENTS`"
58
-
59
- Nếu team có BA: "Gợi ý: BA có thể chạy `/dw-requirements $ARGUMENTS` trước để chuẩn bị yêu cầu"
1
+ ---
2
+ name: dw:task-init
3
+ description: "Khởi tạo bộ documentation cho task mới. Tạo thư mục và 3 template files (context, plan, progress)."
4
+ argument-hint: "[task-name]"
5
+ ---
6
+
7
+ # Khởi Tạo Task: $ARGUMENTS
8
+
9
+ ## Đọc Config
10
+
11
+ Đọc `.dw/config/dw.config.yml` để lấy:
12
+ - `paths.tasks` → thư mục chứa task docs (mặc định: `.dw/tasks`)
13
+ - `workflow.default_depth` → `quick | standard | thorough`
14
+ - `tracking.estimation` → có tạo section estimation không
15
+ - `tracking.log_work` → có tạo section effort log không
16
+ - `team.roles` → hiển thị workflow phù hợp
17
+ - `project.language` → chọn template ngôn ngữ
18
+
19
+ ## Tạo Thư Mục & Files
20
+
21
+ ```
22
+ {paths.tasks}/$ARGUMENTS/
23
+ ├── $ARGUMENTS-context.md # Research findings & codebase analysis
24
+ ├── $ARGUMENTS-plan.md # Implementation plan & design
25
+ └── $ARGUMENTS-progress.md # Progress tracking, effort log, changelog
26
+ ```
27
+
28
+ ### File context.md
29
+ Đọc `project.language` từ config để chọn template:
30
+ - `language: "vi"` → dùng `.claude/templates/task-context.md`
31
+ - `language: "en"` → dùng `.claude/templates/en/task-context.md`
32
+
33
+ Điền vào template:
34
+ - `[Task Name]` = `$ARGUMENTS`
35
+ - `[date]` = ngày hiện tại
36
+
37
+ ### File plan.md
38
+ Chọn template theo `project.language` (`.claude/templates/[lang]/task-plan.md`).
39
+ - Nếu `tracking.estimation = true`: giữ nguyên section Estimation
40
+ - Nếu `tracking.estimation = false`: xóa section Estimation
41
+
42
+ ### File progress.md
43
+ Chọn template theo `project.language` (`.claude/templates/[lang]/task-progress.md`).
44
+ - Điền `[Task Name]` = `$ARGUMENTS`
45
+ - Điền `[date]` = ngày hiện tại
46
+ - Nếu `tracking.log_work = true`: giữ section Effort Log
47
+ - Nếu `tracking.log_work = false`: xóa section Effort Log
48
+
49
+ ## Sau Khi Tạo
50
+
51
+ Hiển thị cho user:
52
+ 1. Danh sách files đã tạo
53
+ 2. Workflow tiếp theo dựa trên `workflow.default_depth`:
54
+
55
+ **quick**: "Tiếp theo: Code ngay hoặc `/dw:research $ARGUMENTS` nếu cần khảo sát"
56
+ **standard**: "Tiếp theo: `/dw:research $ARGUMENTS` → `/dw:plan $ARGUMENTS` → approve → `/dw:execute $ARGUMENTS`"
57
+ **thorough**: "Tiếp theo: `/dw:requirements $ARGUMENTS` → `/dw:research $ARGUMENTS` → `/dw:estimate $ARGUMENTS` → `/dw:plan $ARGUMENTS`"
58
+
59
+ Nếu team có BA: "Gợi ý: BA có thể chạy `/dw:requirements $ARGUMENTS` trước để chuẩn bị yêu cầu"