dw-kit 1.2.1 → 1.3.4
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/.claude/hooks/post-write.sh +64 -58
- package/.claude/hooks/pre-commit-gate.sh +96 -90
- package/.claude/hooks/privacy-block.sh +99 -94
- package/.claude/hooks/progress-ping.sh +53 -47
- package/.claude/hooks/safety-guard.sh +60 -54
- package/.claude/hooks/scout-block.sh +88 -82
- package/.claude/hooks/session-init.sh +6 -0
- package/.claude/hooks/stop-check.sh +88 -36
- package/.claude/hooks/telemetry-log.sh +34 -0
- package/.claude/rules/dw.md +138 -0
- package/.claude/settings.json +28 -1
- package/.claude/skills/dw-arch-review/SKILL.md +119 -119
- package/.claude/skills/dw-archive/SKILL.md +81 -81
- package/.claude/skills/dw-commit/SKILL.md +81 -81
- package/.claude/skills/dw-config-init/SKILL.md +91 -91
- package/.claude/skills/dw-config-validate/SKILL.md +75 -75
- package/.claude/skills/dw-dashboard/SKILL.md +209 -209
- package/.claude/skills/dw-debug/SKILL.md +97 -97
- package/.claude/skills/dw-decision/SKILL.md +116 -0
- package/.claude/skills/dw-docs-update/SKILL.md +125 -125
- package/.claude/skills/dw-estimate/SKILL.md +90 -90
- package/.claude/skills/dw-execute/SKILL.md +121 -98
- package/.claude/skills/dw-flow/SKILL.md +274 -274
- package/.claude/skills/dw-handoff/SKILL.md +92 -81
- package/.claude/skills/dw-kit-report/SKILL.md +152 -152
- package/.claude/skills/dw-log-work/SKILL.md +69 -69
- package/.claude/skills/dw-onboard/SKILL.md +201 -201
- package/.claude/skills/dw-plan/SKILL.md +222 -125
- package/.claude/skills/dw-prompt/SKILL.md +62 -62
- package/.claude/skills/dw-requirements/SKILL.md +98 -98
- package/.claude/skills/dw-research/SKILL.md +128 -114
- package/.claude/skills/dw-retroactive/SKILL.md +195 -311
- package/.claude/skills/dw-review/SKILL.md +66 -66
- package/.claude/skills/dw-rollback/SKILL.md +90 -90
- package/.claude/skills/dw-sprint-review/SKILL.md +99 -99
- package/.claude/skills/dw-task-init/SKILL.md +71 -59
- package/.claude/skills/dw-test-plan/SKILL.md +113 -113
- package/.claude/skills/dw-thinking/SKILL.md +70 -70
- package/.claude/skills/dw-upgrade/SKILL.md +72 -72
- package/.dw/core/PILLARS.md +122 -0
- package/.dw/core/ROLES.md +257 -257
- package/.dw/core/templates/v2/spec.md +68 -0
- package/.dw/core/templates/v2/tracking.md +62 -0
- package/.dw/core/v14-evaluation-protocol.md +118 -0
- package/CLAUDE.md +42 -39
- package/MIGRATION-v1.3.md +202 -0
- package/README.md +35 -6
- package/package.json +4 -2
- package/src/cli.mjs +29 -1
- package/src/commands/dashboard.mjs +116 -0
- package/src/commands/doctor.mjs +165 -149
- package/src/commands/init.mjs +339 -332
- package/src/commands/metrics.mjs +185 -0
- package/src/lib/active-index.mjs +87 -0
- package/src/lib/cut-analysis.mjs +240 -0
- package/src/lib/telemetry.mjs +80 -0
- package/.claude/rules/dw-core.md +0 -100
- package/.claude/rules/dw-skills.md +0 -53
- package/.claude/rules/workflow-rules.md +0 -77
|
@@ -1,81 +1,92 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dw
|
|
3
|
-
description: "Tạo tài liệu bàn giao session để người hoặc agent tiếp theo có thể tiếp tục không cần hỏi lại. Dùng cuối session hoặc khi chuyển task."
|
|
4
|
-
argument-hint: "[task-name]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Bàn Giao Session
|
|
8
|
-
|
|
9
|
-
Task: **$ARGUMENTS**
|
|
10
|
-
|
|
11
|
-
## Đọc Config
|
|
12
|
-
|
|
13
|
-
Đọc `.dw/config/dw.config.yml` → `paths.tasks`, `workflow.default_depth`.
|
|
14
|
-
|
|
15
|
-
## Thu Thập Thông Tin
|
|
16
|
-
|
|
17
|
-
### 1. Git state
|
|
18
|
-
```bash
|
|
19
|
-
git log --oneline -5 # commits gần nhất
|
|
20
|
-
git status # unstaged/staged changes
|
|
21
|
-
git stash list # stashed work
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### 2. Task progress
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
---
|
|
2
|
+
name: dw:handoff
|
|
3
|
+
description: "Tạo tài liệu bàn giao session để người hoặc agent tiếp theo có thể tiếp tục không cần hỏi lại. Dùng cuối session hoặc khi chuyển task."
|
|
4
|
+
argument-hint: "[task-name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Bàn Giao Session
|
|
8
|
+
|
|
9
|
+
Task: **$ARGUMENTS**
|
|
10
|
+
|
|
11
|
+
## Đọc Config
|
|
12
|
+
|
|
13
|
+
Đọc `.dw/config/dw.config.yml` → `paths.tasks`, `workflow.default_depth`.
|
|
14
|
+
|
|
15
|
+
## Thu Thập Thông Tin
|
|
16
|
+
|
|
17
|
+
### 1. Git state
|
|
18
|
+
```bash
|
|
19
|
+
git log --oneline -5 # commits gần nhất
|
|
20
|
+
git status # unstaged/staged changes
|
|
21
|
+
git stash list # stashed work
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. Task progress
|
|
25
|
+
|
|
26
|
+
**Detect format**: Nếu có `tracking.md` → v2. Nếu có `-progress.md` → v1.
|
|
27
|
+
|
|
28
|
+
- **v2**: Đọc `{paths.tasks}/$ARGUMENTS/tracking.md` — Subtask Progress table, Changelog, Handoff Notes (nếu đã có).
|
|
29
|
+
- **v1**: Đọc `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-progress.md`.
|
|
30
|
+
|
|
31
|
+
Tìm:
|
|
32
|
+
- Subtask nào đã done?
|
|
33
|
+
- Subtask nào đang làm dở?
|
|
34
|
+
- Blockers nào đang tồn tại?
|
|
35
|
+
|
|
36
|
+
### 3. Code state
|
|
37
|
+
- Có code uncommitted không?
|
|
38
|
+
- Tests đang ở trạng thái pass/fail?
|
|
39
|
+
- Có TODO/FIXME nào mới thêm vào?
|
|
40
|
+
|
|
41
|
+
## Viết Handoff Notes
|
|
42
|
+
|
|
43
|
+
**v2**: Replace (hoặc append nếu muốn giữ lịch sử) section `## Handoff Notes` trong `{paths.tasks}/$ARGUMENTS/tracking.md`. Cũng update frontmatter `last_updated`.
|
|
44
|
+
|
|
45
|
+
**v1**: Ghi vào mục "Handoff Notes" trong `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-progress.md`.
|
|
46
|
+
|
|
47
|
+
Format (chung cho cả 2):
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
## Handoff Notes
|
|
51
|
+
|
|
52
|
+
### Session [ngày giờ] → [người/agent tiếp theo]
|
|
53
|
+
|
|
54
|
+
**Trạng thái nhanh**: [1 câu mô tả]
|
|
55
|
+
|
|
56
|
+
**Đang ở**: ST-[N] — [tên subtask] — [% hoặc mô tả tiến độ]
|
|
57
|
+
|
|
58
|
+
**Đã hoàn thành**:
|
|
59
|
+
- ✅ ST-1: [tên] (commit: abc1234)
|
|
60
|
+
- ✅ ST-2: [tên] (commit: def5678)
|
|
61
|
+
|
|
62
|
+
**Đang làm dở**:
|
|
63
|
+
- 🔄 ST-3: [tên]
|
|
64
|
+
- Done: [phần đã làm]
|
|
65
|
+
- Còn lại: [phần chưa làm]
|
|
66
|
+
- Files đang edit: [danh sách]
|
|
67
|
+
|
|
68
|
+
**Blockers**:
|
|
69
|
+
- ❌ [Blocker nếu có]
|
|
70
|
+
|
|
71
|
+
**Bước tiếp theo** (theo thứ tự):
|
|
72
|
+
1. [Việc cần làm đầu tiên]
|
|
73
|
+
2. [Tiếp theo]
|
|
74
|
+
|
|
75
|
+
**Context quan trọng**:
|
|
76
|
+
- [Quyết định A đã được đưa ra vì lý do X]
|
|
77
|
+
- [Cẩn thận: file Y có logic đặc biệt ở line Z]
|
|
78
|
+
- [Assumption: Z đang được coi là đúng]
|
|
79
|
+
|
|
80
|
+
**Uncommitted changes**: [Có / Không — nếu có, mô tả]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Thông Báo
|
|
84
|
+
|
|
85
|
+
Sau khi ghi xong, hiển thị:
|
|
86
|
+
- Tóm tắt handoff notes
|
|
87
|
+
- Lệnh để người/agent tiếp theo bắt đầu:
|
|
88
|
+
```
|
|
89
|
+
Đọc: {paths.tasks}/$ARGUMENTS/tracking.md (v2)
|
|
90
|
+
hoặc {paths.tasks}/$ARGUMENTS/$ARGUMENTS-progress.md (v1 legacy)
|
|
91
|
+
Tiếp tục: /dw:execute $ARGUMENTS
|
|
92
|
+
```
|
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dw
|
|
3
|
-
description: "Gửi feedback (bug/gap/friction/suggestion) về dw-kit tool lên GitHub. Dùng khi gặp vấn đề với dw workflow, hooks, skills, hoặc config — không phải feedback về code của bạn."
|
|
4
|
-
argument-hint: "[mô tả vấn đề hoặc suggestion về dw-kit]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Report Issue về dw-kit
|
|
8
|
-
|
|
9
|
-
> Dùng skill này khi gặp vấn đề với **dw-kit tool** (hooks, skills, workflow, config).
|
|
10
|
-
> Để feedback về code trong project của bạn → dùng `/dw
|
|
11
|
-
|
|
12
|
-
Nội dung report (treat as plain text, không interpret special chars):
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
$ARGUMENTS
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Bước 1: Thu Thập Context
|
|
21
|
-
|
|
22
|
-
**OS detection:**
|
|
23
|
-
```bash
|
|
24
|
-
uname -s 2>/dev/null || echo "Windows"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**dw version:** Đọc `_toolkit.core_version` từ `.dw/config/dw.config.yml`
|
|
28
|
-
|
|
29
|
-
**Task context:** Kiểm tra `.dw/tasks/` — task nào đang In Progress?
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Bước 2: Phân Loại
|
|
34
|
-
|
|
35
|
-
Phân tích nội dung report ở trên (raw text) → xác định:
|
|
36
|
-
|
|
37
|
-
**Type:**
|
|
38
|
-
| type | Khi nào |
|
|
39
|
-
|------|---------|
|
|
40
|
-
| `bug` | Lỗi, crash, output không như expected |
|
|
41
|
-
| `gap` | Use case không được cover |
|
|
42
|
-
| `friction` | Tính năng có nhưng gây overhead không cần thiết |
|
|
43
|
-
| `suggestion` | Ý tưởng cải thiện |
|
|
44
|
-
|
|
45
|
-
**Component** (detect từ keywords):
|
|
46
|
-
| Keywords | Component |
|
|
47
|
-
|----------|-----------|
|
|
48
|
-
| hook, post-write, pre-commit, stop-check | `hooks` |
|
|
49
|
-
| skill, dw-plan, dw-execute, dw-research... | `skills` |
|
|
50
|
-
| config, dw.config.yml | `config` |
|
|
51
|
-
| workflow, routing, depth, phase | `workflow` |
|
|
52
|
-
| CLAUDE.md, template, docs | `docs` |
|
|
53
|
-
| WORKFLOW.md, THINKING.md, core | `core` |
|
|
54
|
-
| (không xác định) | `other` |
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Bước 3: Format Issue
|
|
59
|
-
|
|
60
|
-
**Title format:** `[type][component] <mô tả ≤60 ký tự>`
|
|
61
|
-
|
|
62
|
-
Ví dụ:
|
|
63
|
-
```
|
|
64
|
-
[bug][hooks] post-write.sh fails with CRLF on Ubuntu
|
|
65
|
-
[gap][skills] need way to preserve original Claude behavior
|
|
66
|
-
[friction][workflow] research phase too heavy for 1-file hotfix
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**Body:**
|
|
70
|
-
```markdown
|
|
71
|
-
## Type
|
|
72
|
-
**[TYPE]** — bug | gap | friction | suggestion
|
|
73
|
-
|
|
74
|
-
## Component
|
|
75
|
-
**[COMPONENT]**
|
|
76
|
-
|
|
77
|
-
## Environment
|
|
78
|
-
- OS: [detected]
|
|
79
|
-
- dw version: [từ config]
|
|
80
|
-
- Shell: [bash/zsh/powershell nếu relevant]
|
|
81
|
-
|
|
82
|
-
## Description
|
|
83
|
-
[Nội dung từ $ARGUMENTS — đầy đủ, rõ ràng]
|
|
84
|
-
|
|
85
|
-
## Context
|
|
86
|
-
- Task khi gặp vấn đề: [task name hoặc "general usage"]
|
|
87
|
-
- Command/skill liên quan: [nếu biết]
|
|
88
|
-
- Bước reproduce (nếu là bug):
|
|
89
|
-
1. ...
|
|
90
|
-
2. ...
|
|
91
|
-
|
|
92
|
-
## Impact
|
|
93
|
-
- [ ] Blocking — không thể làm việc
|
|
94
|
-
- [ ] Degraded — làm được nhưng friction cao
|
|
95
|
-
- [ ] Minor — annoying, có workaround dễ
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
*Reported via `/dw
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Bước 4: Gửi Lên GitHub
|
|
104
|
-
|
|
105
|
-
**Kiểm tra `gh` CLI:**
|
|
106
|
-
```bash
|
|
107
|
-
gh --version 2>/dev/null
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Nếu `gh` available — tạo Issue:**
|
|
111
|
-
```bash
|
|
112
|
-
gh issue create \
|
|
113
|
-
--repo dv-workflow/dv-workflow \
|
|
114
|
-
--title "[type][component] <short description>" \
|
|
115
|
-
--label "type: [type]" \
|
|
116
|
-
--label "component: [component]" \
|
|
117
|
-
--body "<formatted body>"
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Sau khi tạo: in ra Issue URL.
|
|
121
|
-
|
|
122
|
-
**Nếu `gh` KHÔNG available:**
|
|
123
|
-
|
|
124
|
-
In ra:
|
|
125
|
-
```
|
|
126
|
-
─────────────────────────────────────────────
|
|
127
|
-
dw-kit: gh CLI không tìm thấy
|
|
128
|
-
─────────────────────────────────────────────
|
|
129
|
-
Tạo Issue thủ công tại:
|
|
130
|
-
https://github.com/dv-workflow/dv-workflow/issues/new
|
|
131
|
-
|
|
132
|
-
Copy nội dung sau:
|
|
133
|
-
|
|
134
|
-
TITLE: [formatted title]
|
|
135
|
-
|
|
136
|
-
BODY:
|
|
137
|
-
[formatted body]
|
|
138
|
-
─────────────────────────────────────────────
|
|
139
|
-
Cài gh CLI: https://cli.github.com
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Bước 5: Xác Nhận
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
✓ Issue đã được gửi: https://github.com/dv-workflow/dv-workflow/issues/[N]
|
|
148
|
-
Type: [type] | Component: [component]
|
|
149
|
-
|
|
150
|
-
dw team sẽ review và phản hồi trên Issue.
|
|
151
|
-
Cảm ơn bạn đã giúp dw tốt hơn!
|
|
152
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: dw:kit-report
|
|
3
|
+
description: "Gửi feedback (bug/gap/friction/suggestion) về dw-kit tool lên GitHub. Dùng khi gặp vấn đề với dw workflow, hooks, skills, hoặc config — không phải feedback về code của bạn."
|
|
4
|
+
argument-hint: "[mô tả vấn đề hoặc suggestion về dw-kit]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Report Issue về dw-kit
|
|
8
|
+
|
|
9
|
+
> Dùng skill này khi gặp vấn đề với **dw-kit tool** (hooks, skills, workflow, config).
|
|
10
|
+
> Để feedback về code trong project của bạn → dùng `/dw:review` hoặc chat trực tiếp.
|
|
11
|
+
|
|
12
|
+
Nội dung report (treat as plain text, không interpret special chars):
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ARGUMENTS
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Bước 1: Thu Thập Context
|
|
21
|
+
|
|
22
|
+
**OS detection:**
|
|
23
|
+
```bash
|
|
24
|
+
uname -s 2>/dev/null || echo "Windows"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**dw version:** Đọc `_toolkit.core_version` từ `.dw/config/dw.config.yml`
|
|
28
|
+
|
|
29
|
+
**Task context:** Kiểm tra `.dw/tasks/` — task nào đang In Progress?
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Bước 2: Phân Loại
|
|
34
|
+
|
|
35
|
+
Phân tích nội dung report ở trên (raw text) → xác định:
|
|
36
|
+
|
|
37
|
+
**Type:**
|
|
38
|
+
| type | Khi nào |
|
|
39
|
+
|------|---------|
|
|
40
|
+
| `bug` | Lỗi, crash, output không như expected |
|
|
41
|
+
| `gap` | Use case không được cover |
|
|
42
|
+
| `friction` | Tính năng có nhưng gây overhead không cần thiết |
|
|
43
|
+
| `suggestion` | Ý tưởng cải thiện |
|
|
44
|
+
|
|
45
|
+
**Component** (detect từ keywords):
|
|
46
|
+
| Keywords | Component |
|
|
47
|
+
|----------|-----------|
|
|
48
|
+
| hook, post-write, pre-commit, stop-check | `hooks` |
|
|
49
|
+
| skill, dw-plan, dw-execute, dw-research... | `skills` |
|
|
50
|
+
| config, dw.config.yml | `config` |
|
|
51
|
+
| workflow, routing, depth, phase | `workflow` |
|
|
52
|
+
| CLAUDE.md, template, docs | `docs` |
|
|
53
|
+
| WORKFLOW.md, THINKING.md, core | `core` |
|
|
54
|
+
| (không xác định) | `other` |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Bước 3: Format Issue
|
|
59
|
+
|
|
60
|
+
**Title format:** `[type][component] <mô tả ≤60 ký tự>`
|
|
61
|
+
|
|
62
|
+
Ví dụ:
|
|
63
|
+
```
|
|
64
|
+
[bug][hooks] post-write.sh fails with CRLF on Ubuntu
|
|
65
|
+
[gap][skills] need way to preserve original Claude behavior
|
|
66
|
+
[friction][workflow] research phase too heavy for 1-file hotfix
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Body:**
|
|
70
|
+
```markdown
|
|
71
|
+
## Type
|
|
72
|
+
**[TYPE]** — bug | gap | friction | suggestion
|
|
73
|
+
|
|
74
|
+
## Component
|
|
75
|
+
**[COMPONENT]**
|
|
76
|
+
|
|
77
|
+
## Environment
|
|
78
|
+
- OS: [detected]
|
|
79
|
+
- dw version: [từ config]
|
|
80
|
+
- Shell: [bash/zsh/powershell nếu relevant]
|
|
81
|
+
|
|
82
|
+
## Description
|
|
83
|
+
[Nội dung từ $ARGUMENTS — đầy đủ, rõ ràng]
|
|
84
|
+
|
|
85
|
+
## Context
|
|
86
|
+
- Task khi gặp vấn đề: [task name hoặc "general usage"]
|
|
87
|
+
- Command/skill liên quan: [nếu biết]
|
|
88
|
+
- Bước reproduce (nếu là bug):
|
|
89
|
+
1. ...
|
|
90
|
+
2. ...
|
|
91
|
+
|
|
92
|
+
## Impact
|
|
93
|
+
- [ ] Blocking — không thể làm việc
|
|
94
|
+
- [ ] Degraded — làm được nhưng friction cao
|
|
95
|
+
- [ ] Minor — annoying, có workaround dễ
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
*Reported via `/dw:kit-report` | Project: [project.name từ config]*
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Bước 4: Gửi Lên GitHub
|
|
104
|
+
|
|
105
|
+
**Kiểm tra `gh` CLI:**
|
|
106
|
+
```bash
|
|
107
|
+
gh --version 2>/dev/null
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Nếu `gh` available — tạo Issue:**
|
|
111
|
+
```bash
|
|
112
|
+
gh issue create \
|
|
113
|
+
--repo dv-workflow/dv-workflow \
|
|
114
|
+
--title "[type][component] <short description>" \
|
|
115
|
+
--label "type: [type]" \
|
|
116
|
+
--label "component: [component]" \
|
|
117
|
+
--body "<formatted body>"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Sau khi tạo: in ra Issue URL.
|
|
121
|
+
|
|
122
|
+
**Nếu `gh` KHÔNG available:**
|
|
123
|
+
|
|
124
|
+
In ra:
|
|
125
|
+
```
|
|
126
|
+
─────────────────────────────────────────────
|
|
127
|
+
dw-kit: gh CLI không tìm thấy
|
|
128
|
+
─────────────────────────────────────────────
|
|
129
|
+
Tạo Issue thủ công tại:
|
|
130
|
+
https://github.com/dv-workflow/dv-workflow/issues/new
|
|
131
|
+
|
|
132
|
+
Copy nội dung sau:
|
|
133
|
+
|
|
134
|
+
TITLE: [formatted title]
|
|
135
|
+
|
|
136
|
+
BODY:
|
|
137
|
+
[formatted body]
|
|
138
|
+
─────────────────────────────────────────────
|
|
139
|
+
Cài gh CLI: https://cli.github.com
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Bước 5: Xác Nhận
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
✓ Issue đã được gửi: https://github.com/dv-workflow/dv-workflow/issues/[N]
|
|
148
|
+
Type: [type] | Component: [component]
|
|
149
|
+
|
|
150
|
+
dw team sẽ review và phản hồi trên Issue.
|
|
151
|
+
Cảm ơn bạn đã giúp dw tốt hơn!
|
|
152
|
+
```
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dw
|
|
3
|
-
description: "Ghi nhận effort thực tế cho task hoặc subtask. So sánh với estimate. Cập nhật metrics tracking. Dùng sau khi hoàn thành subtask/task."
|
|
4
|
-
argument-hint: "[task-name]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Ghi Nhận Effort
|
|
8
|
-
|
|
9
|
-
Task: **$ARGUMENTS**
|
|
10
|
-
|
|
11
|
-
## Đọc Config
|
|
12
|
-
|
|
13
|
-
Đọc `.dw/config/dw.config.yml`:
|
|
14
|
-
- `tracking.log_work` — nếu `false` → thông báo "Log work chưa bật cho project này" và DỪNG
|
|
15
|
-
- `tracking.estimation_unit` → đơn vị (hours / story-points / t-shirt)
|
|
16
|
-
- `paths.tasks` → location task docs
|
|
17
|
-
|
|
18
|
-
## Hỏi User (Interactive)
|
|
19
|
-
|
|
20
|
-
Hỏi thông tin cần ghi:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
1. Subtask nào? (ST-1 / ST-2 / all)
|
|
24
|
-
2. Thời gian thực tế: [X hours/points]
|
|
25
|
-
3. Loại công việc: coding / testing / review / research / documentation
|
|
26
|
-
4. Ghi chú (optional): [lý do lệch estimate, blockers gặp, etc.]
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Ghi Vào Progress File
|
|
30
|
-
|
|
31
|
-
Cập nhật `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-progress.md` → mục "Effort Log":
|
|
32
|
-
|
|
33
|
-
```markdown
|
|
34
|
-
| [date] | ST-N | [loại] | [estimate] | [actual] | [ghi chú] |
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Cập Nhật Metrics File
|
|
38
|
-
|
|
39
|
-
Ghi vào `.dw/metrics/effort-log.json`:
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"date": "YYYY-MM-DD",
|
|
44
|
-
"task": "task-name",
|
|
45
|
-
"subtask": "ST-N",
|
|
46
|
-
"type": "coding",
|
|
47
|
-
"estimate": X,
|
|
48
|
-
"actual": Y,
|
|
49
|
-
"variance": Y-X,
|
|
50
|
-
"accuracy_pct": (X/Y)*100,
|
|
51
|
-
"notes": "..."
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Tóm Tắt
|
|
56
|
-
|
|
57
|
-
Sau khi log, hiển thị:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
✅ Đã ghi: ST-N — Actual: Xh (Estimate: Yh)
|
|
61
|
-
Variance: +Zh (over) / -Zh (under)
|
|
62
|
-
|
|
63
|
-
Task tổng (đến hiện tại):
|
|
64
|
-
Total estimated: Xh
|
|
65
|
-
Total actual: Yh
|
|
66
|
-
Accuracy: Z%
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Nếu variance > 50%: "⚠️ Lệch estimate đáng kể. Cân nhắc cập nhật estimate cho subtasks còn lại."
|
|
1
|
+
---
|
|
2
|
+
name: dw:log-work
|
|
3
|
+
description: "Ghi nhận effort thực tế cho task hoặc subtask. So sánh với estimate. Cập nhật metrics tracking. Dùng sau khi hoàn thành subtask/task."
|
|
4
|
+
argument-hint: "[task-name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Ghi Nhận Effort
|
|
8
|
+
|
|
9
|
+
Task: **$ARGUMENTS**
|
|
10
|
+
|
|
11
|
+
## Đọc Config
|
|
12
|
+
|
|
13
|
+
Đọc `.dw/config/dw.config.yml`:
|
|
14
|
+
- `tracking.log_work` — nếu `false` → thông báo "Log work chưa bật cho project này" và DỪNG
|
|
15
|
+
- `tracking.estimation_unit` → đơn vị (hours / story-points / t-shirt)
|
|
16
|
+
- `paths.tasks` → location task docs
|
|
17
|
+
|
|
18
|
+
## Hỏi User (Interactive)
|
|
19
|
+
|
|
20
|
+
Hỏi thông tin cần ghi:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
1. Subtask nào? (ST-1 / ST-2 / all)
|
|
24
|
+
2. Thời gian thực tế: [X hours/points]
|
|
25
|
+
3. Loại công việc: coding / testing / review / research / documentation
|
|
26
|
+
4. Ghi chú (optional): [lý do lệch estimate, blockers gặp, etc.]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Ghi Vào Progress File
|
|
30
|
+
|
|
31
|
+
Cập nhật `{paths.tasks}/$ARGUMENTS/$ARGUMENTS-progress.md` → mục "Effort Log":
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
| [date] | ST-N | [loại] | [estimate] | [actual] | [ghi chú] |
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Cập Nhật Metrics File
|
|
38
|
+
|
|
39
|
+
Ghi vào `.dw/metrics/effort-log.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"date": "YYYY-MM-DD",
|
|
44
|
+
"task": "task-name",
|
|
45
|
+
"subtask": "ST-N",
|
|
46
|
+
"type": "coding",
|
|
47
|
+
"estimate": X,
|
|
48
|
+
"actual": Y,
|
|
49
|
+
"variance": Y-X,
|
|
50
|
+
"accuracy_pct": (X/Y)*100,
|
|
51
|
+
"notes": "..."
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Tóm Tắt
|
|
56
|
+
|
|
57
|
+
Sau khi log, hiển thị:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
✅ Đã ghi: ST-N — Actual: Xh (Estimate: Yh)
|
|
61
|
+
Variance: +Zh (over) / -Zh (under)
|
|
62
|
+
|
|
63
|
+
Task tổng (đến hiện tại):
|
|
64
|
+
Total estimated: Xh
|
|
65
|
+
Total actual: Yh
|
|
66
|
+
Accuracy: Z%
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Nếu variance > 50%: "⚠️ Lệch estimate đáng kể. Cân nhắc cập nhật estimate cho subtasks còn lại."
|