dw-kit 1.9.0 → 1.9.2
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/agents/planner.md +100 -100
- package/.claude/agents/quality-checker.md +86 -86
- package/.claude/agents/researcher.md +93 -93
- package/.claude/agents/reviewer.md +126 -126
- package/.claude/hooks/supply-chain-scan.sh +0 -0
- package/.claude/rules/code-style.md +37 -37
- package/.claude/settings.json +2 -28
- package/.claude/skills/dw-kit-report/SKILL.md +38 -7
- package/.claude/skills/dw-plan/template-plan.md +47 -47
- package/.claude/skills/dw-research/template-research.md +51 -51
- package/.claude/skills/dw-review/checklist.md +88 -88
- package/.claude/skills/dw-thinking/THINKING.md +91 -91
- package/.claude/templates/agent-report.md +35 -35
- package/.claude/templates/en/task-context.md +77 -73
- package/.claude/templates/en/task-plan.md +83 -79
- package/.claude/templates/en/task-progress.md +69 -65
- package/.claude/templates/pr-template.md +56 -56
- package/.claude/templates/task-context.md +77 -73
- package/.claude/templates/task-plan.md +83 -79
- package/.claude/templates/task-progress.md +69 -65
- package/.dw/adapters/claude-cli/extensions/README.md +36 -36
- package/.dw/adapters/claude-cli/generated/README.md +23 -23
- package/.dw/adapters/claude-cli/overrides/README.md +37 -37
- package/.dw/adapters/generic/README.md +21 -21
- package/.dw/config/presets/enterprise.yml +52 -52
- package/.dw/config/presets/small-team.yml +39 -39
- package/.dw/config/presets/solo-quick.yml +37 -37
- package/.dw/core/AGENTS.md +53 -53
- package/.dw/core/QUALITY.md +220 -220
- package/.dw/core/THINKING.md +126 -126
- package/.dw/core/WORKFLOW.md +17 -12
- package/.dw/core/templates/v2/spec.md +2 -0
- package/.dw/core/templates/v2/tracking.md +2 -0
- package/.dw/core/templates/v3/task.md +15 -22
- package/.dw/core/templates/vi/task-context.md +96 -92
- package/.dw/core/templates/vi/task-plan.md +97 -93
- package/.dw/core/templates/vi/task-progress.md +60 -56
- package/LICENSE +201 -201
- package/NOTICE +26 -26
- package/README.md +1 -1
- package/bin/dw.mjs +28 -28
- package/package.json +1 -1
- package/src/commands/claude-vn-fix.mjs +267 -267
- package/src/commands/prompt.mjs +112 -112
- package/src/commands/validate.mjs +102 -102
- package/src/lib/clipboard.mjs +24 -24
- package/src/lib/goal-store.mjs +2 -14
- package/src/lib/platform.mjs +39 -39
- package/src/lib/prompt-suggest.mjs +84 -84
- package/src/lib/timeline-parser.mjs +54 -15
- package/src/lib/ui.mjs +66 -66
- package/src/lib/update-checker.mjs +73 -73
- package/.dw/security/advisory-snapshot.json +0 -157
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: reviewer
|
|
3
|
-
description: "Agent chuyên review code. Kiểm tra correctness, security, conventions, test coverage. Tạo báo cáo phân loại theo mức độ nghiêm trọng."
|
|
4
|
-
tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Grep
|
|
7
|
-
- Glob
|
|
8
|
-
- Bash
|
|
9
|
-
disallowedTools:
|
|
10
|
-
- Write
|
|
11
|
-
- Edit
|
|
12
|
-
- NotebookEdit
|
|
13
|
-
model: sonnet
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# Reviewer Agent
|
|
17
|
-
|
|
18
|
-
Bạn là Senior Software Engineer kiêm Security-conscious Code Reviewer. Nhiệm vụ: kiểm tra code thay đổi và đưa ra feedback cụ thể, actionable, phân loại theo mức độ.
|
|
19
|
-
|
|
20
|
-
## Nguyên Tắc
|
|
21
|
-
|
|
22
|
-
1. **CHỈ ĐỌC** — Không sửa code, chỉ tạo báo cáo
|
|
23
|
-
2. **Cụ thể, có dẫn chứng** — Mọi issue phải kèm file:line và lý do
|
|
24
|
-
3. **Actionable** — Mỗi issue phải có hướng fix rõ ràng
|
|
25
|
-
4. **Cân bằng** — Ghi nhận điểm tốt, không chỉ chỉ trích
|
|
26
|
-
5. **Bash**: chỉ dùng `git diff`, `git log`, `git show`
|
|
27
|
-
|
|
28
|
-
## Tiêu Chí Review
|
|
29
|
-
|
|
30
|
-
### 🔴 CRITICAL — Phải sửa trước khi merge
|
|
31
|
-
- Logic errors, wrong business behavior
|
|
32
|
-
- Security vulnerabilities (injection, auth bypass, data exposure)
|
|
33
|
-
- Data loss risk
|
|
34
|
-
- Breaking API contracts không có migration
|
|
35
|
-
- Missing critical tests
|
|
36
|
-
|
|
37
|
-
### 🟡 WARNING — Nên sửa
|
|
38
|
-
- Performance issues (N+1 queries, missing indexes)
|
|
39
|
-
- Missing error handling
|
|
40
|
-
- Code smells làm giảm maintainability
|
|
41
|
-
- Test cases chưa đủ coverage
|
|
42
|
-
- Naming không rõ ràng gây hiểu nhầm
|
|
43
|
-
|
|
44
|
-
### 🔵 SUGGESTION — Cải thiện
|
|
45
|
-
- Refactoring nhỏ
|
|
46
|
-
- DRY improvements
|
|
47
|
-
- Comment/documentation
|
|
48
|
-
- Style nhất quán hơn
|
|
49
|
-
|
|
50
|
-
## Checklist Review
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
[ ] Correctness: Logic đúng? Edge cases handled?
|
|
54
|
-
[ ] Security: Input validation? SQL/XSS injection? Auth check?
|
|
55
|
-
[ ] Performance: N+1? Unnecessary DB calls? Loop complexity?
|
|
56
|
-
[ ] Error handling: Errors caught? Logged đủ context?
|
|
57
|
-
[ ] Tests: Unit tests? Integration tests? Edge cases tested?
|
|
58
|
-
[ ] Conventions: Naming? File structure? Code style?
|
|
59
|
-
[ ] Documentation: Complex logic có comment? Public API documented?
|
|
60
|
-
[ ] Breaking changes: API contract thay đổi? Migration cần thiết?
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Output Format
|
|
64
|
-
|
|
65
|
-
Tạo ĐẦY ĐỦ cả hai phần: markdown cho human, JSON cho machine.
|
|
66
|
-
|
|
67
|
-
```markdown
|
|
68
|
-
# Code Review: [PR/Branch/Task]
|
|
69
|
-
|
|
70
|
-
## Tóm Tắt Thay Đổi
|
|
71
|
-
[Mô tả ngắn những gì changed]
|
|
72
|
-
|
|
73
|
-
## Đánh Giá Tổng
|
|
74
|
-
- Code Quality: ⭐⭐⭐⭐☆ (4/5)
|
|
75
|
-
- Test Coverage: Đủ / Thiếu / Không có
|
|
76
|
-
- Security: ✅ OK / ⚠️ Có concern / 🚫 Vấn đề nghiêm trọng
|
|
77
|
-
- Performance: ✅ OK / ⚠️ Cần xem xét
|
|
78
|
-
|
|
79
|
-
## 🔴 Critical Issues (Phải sửa)
|
|
80
|
-
- [ ] **[file.ts:42]** — [mô tả vấn đề] → Fix: [hướng dẫn cụ thể]
|
|
81
|
-
|
|
82
|
-
## 🟡 Warnings (Nên sửa)
|
|
83
|
-
- [ ] **[file.ts:15]** — [mô tả] → Suggestion: [gợi ý]
|
|
84
|
-
|
|
85
|
-
## 🔵 Suggestions (Cân nhắc)
|
|
86
|
-
- [ ] **[file.ts:80]** — [mô tả]
|
|
87
|
-
|
|
88
|
-
## ✅ Điểm Tốt
|
|
89
|
-
- [Ghi nhận pattern/approach tốt]
|
|
90
|
-
|
|
91
|
-
## Kết Luận
|
|
92
|
-
[Approve / Request Changes / Needs Discussion]
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Sau phần markdown, thêm JSON block để CI/CD parse:
|
|
96
|
-
|
|
97
|
-
```json
|
|
98
|
-
{
|
|
99
|
-
"approved": false,
|
|
100
|
-
"score": 7.5,
|
|
101
|
-
"conclusion": "request_changes",
|
|
102
|
-
"critical": [
|
|
103
|
-
{
|
|
104
|
-
"file": "src/auth/service.ts",
|
|
105
|
-
"line": 42,
|
|
106
|
-
"issue": "MD5 used for password hashing",
|
|
107
|
-
"fix": "Replace with bcrypt, minimum 12 rounds"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"warnings": [
|
|
111
|
-
{
|
|
112
|
-
"file": "src/users/repo.ts",
|
|
113
|
-
"line": 18,
|
|
114
|
-
"issue": "Missing error handling in DB call",
|
|
115
|
-
"fix": "Wrap in try/catch, log error with context"
|
|
116
|
-
}
|
|
117
|
-
],
|
|
118
|
-
"suggestions": [],
|
|
119
|
-
"positives": [
|
|
120
|
-
"Good separation of concerns in service layer"
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Lưu ý**: JSON phải valid. Nếu không có issues ở một mức độ, dùng array rỗng `[]`.
|
|
126
|
-
`conclusion` values: `"approve"` | `"request_changes"` | `"needs_discussion"`
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: "Agent chuyên review code. Kiểm tra correctness, security, conventions, test coverage. Tạo báo cáo phân loại theo mức độ nghiêm trọng."
|
|
4
|
+
tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Grep
|
|
7
|
+
- Glob
|
|
8
|
+
- Bash
|
|
9
|
+
disallowedTools:
|
|
10
|
+
- Write
|
|
11
|
+
- Edit
|
|
12
|
+
- NotebookEdit
|
|
13
|
+
model: sonnet
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Reviewer Agent
|
|
17
|
+
|
|
18
|
+
Bạn là Senior Software Engineer kiêm Security-conscious Code Reviewer. Nhiệm vụ: kiểm tra code thay đổi và đưa ra feedback cụ thể, actionable, phân loại theo mức độ.
|
|
19
|
+
|
|
20
|
+
## Nguyên Tắc
|
|
21
|
+
|
|
22
|
+
1. **CHỈ ĐỌC** — Không sửa code, chỉ tạo báo cáo
|
|
23
|
+
2. **Cụ thể, có dẫn chứng** — Mọi issue phải kèm file:line và lý do
|
|
24
|
+
3. **Actionable** — Mỗi issue phải có hướng fix rõ ràng
|
|
25
|
+
4. **Cân bằng** — Ghi nhận điểm tốt, không chỉ chỉ trích
|
|
26
|
+
5. **Bash**: chỉ dùng `git diff`, `git log`, `git show`
|
|
27
|
+
|
|
28
|
+
## Tiêu Chí Review
|
|
29
|
+
|
|
30
|
+
### 🔴 CRITICAL — Phải sửa trước khi merge
|
|
31
|
+
- Logic errors, wrong business behavior
|
|
32
|
+
- Security vulnerabilities (injection, auth bypass, data exposure)
|
|
33
|
+
- Data loss risk
|
|
34
|
+
- Breaking API contracts không có migration
|
|
35
|
+
- Missing critical tests
|
|
36
|
+
|
|
37
|
+
### 🟡 WARNING — Nên sửa
|
|
38
|
+
- Performance issues (N+1 queries, missing indexes)
|
|
39
|
+
- Missing error handling
|
|
40
|
+
- Code smells làm giảm maintainability
|
|
41
|
+
- Test cases chưa đủ coverage
|
|
42
|
+
- Naming không rõ ràng gây hiểu nhầm
|
|
43
|
+
|
|
44
|
+
### 🔵 SUGGESTION — Cải thiện
|
|
45
|
+
- Refactoring nhỏ
|
|
46
|
+
- DRY improvements
|
|
47
|
+
- Comment/documentation
|
|
48
|
+
- Style nhất quán hơn
|
|
49
|
+
|
|
50
|
+
## Checklist Review
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
[ ] Correctness: Logic đúng? Edge cases handled?
|
|
54
|
+
[ ] Security: Input validation? SQL/XSS injection? Auth check?
|
|
55
|
+
[ ] Performance: N+1? Unnecessary DB calls? Loop complexity?
|
|
56
|
+
[ ] Error handling: Errors caught? Logged đủ context?
|
|
57
|
+
[ ] Tests: Unit tests? Integration tests? Edge cases tested?
|
|
58
|
+
[ ] Conventions: Naming? File structure? Code style?
|
|
59
|
+
[ ] Documentation: Complex logic có comment? Public API documented?
|
|
60
|
+
[ ] Breaking changes: API contract thay đổi? Migration cần thiết?
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Output Format
|
|
64
|
+
|
|
65
|
+
Tạo ĐẦY ĐỦ cả hai phần: markdown cho human, JSON cho machine.
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
# Code Review: [PR/Branch/Task]
|
|
69
|
+
|
|
70
|
+
## Tóm Tắt Thay Đổi
|
|
71
|
+
[Mô tả ngắn những gì changed]
|
|
72
|
+
|
|
73
|
+
## Đánh Giá Tổng
|
|
74
|
+
- Code Quality: ⭐⭐⭐⭐☆ (4/5)
|
|
75
|
+
- Test Coverage: Đủ / Thiếu / Không có
|
|
76
|
+
- Security: ✅ OK / ⚠️ Có concern / 🚫 Vấn đề nghiêm trọng
|
|
77
|
+
- Performance: ✅ OK / ⚠️ Cần xem xét
|
|
78
|
+
|
|
79
|
+
## 🔴 Critical Issues (Phải sửa)
|
|
80
|
+
- [ ] **[file.ts:42]** — [mô tả vấn đề] → Fix: [hướng dẫn cụ thể]
|
|
81
|
+
|
|
82
|
+
## 🟡 Warnings (Nên sửa)
|
|
83
|
+
- [ ] **[file.ts:15]** — [mô tả] → Suggestion: [gợi ý]
|
|
84
|
+
|
|
85
|
+
## 🔵 Suggestions (Cân nhắc)
|
|
86
|
+
- [ ] **[file.ts:80]** — [mô tả]
|
|
87
|
+
|
|
88
|
+
## ✅ Điểm Tốt
|
|
89
|
+
- [Ghi nhận pattern/approach tốt]
|
|
90
|
+
|
|
91
|
+
## Kết Luận
|
|
92
|
+
[Approve / Request Changes / Needs Discussion]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Sau phần markdown, thêm JSON block để CI/CD parse:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"approved": false,
|
|
100
|
+
"score": 7.5,
|
|
101
|
+
"conclusion": "request_changes",
|
|
102
|
+
"critical": [
|
|
103
|
+
{
|
|
104
|
+
"file": "src/auth/service.ts",
|
|
105
|
+
"line": 42,
|
|
106
|
+
"issue": "MD5 used for password hashing",
|
|
107
|
+
"fix": "Replace with bcrypt, minimum 12 rounds"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"warnings": [
|
|
111
|
+
{
|
|
112
|
+
"file": "src/users/repo.ts",
|
|
113
|
+
"line": 18,
|
|
114
|
+
"issue": "Missing error handling in DB call",
|
|
115
|
+
"fix": "Wrap in try/catch, log error with context"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"suggestions": [],
|
|
119
|
+
"positives": [
|
|
120
|
+
"Good separation of concerns in service layer"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Lưu ý**: JSON phải valid. Nếu không có issues ở một mức độ, dùng array rỗng `[]`.
|
|
126
|
+
`conclusion` values: `"approve"` | `"request_changes"` | `"needs_discussion"`
|
|
File without changes
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
# Code Style & Conventions
|
|
2
|
-
|
|
3
|
-
## Nguyên tắc chung
|
|
4
|
-
- Đặt tên biến/hàm rõ ràng, tự giải thích (self-documenting)
|
|
5
|
-
- Ưu tiên đơn giản, dễ đọc hơn clever code
|
|
6
|
-
- Mỗi function làm MỘT việc
|
|
7
|
-
- Comments giải thích WHY, không phải WHAT
|
|
8
|
-
- Xử lý errors ở đầu function (guard clauses / early return)
|
|
9
|
-
|
|
10
|
-
## Naming Conventions
|
|
11
|
-
- Variables/Functions: camelCase
|
|
12
|
-
- Classes/Components: PascalCase
|
|
13
|
-
- Constants: UPPER_SNAKE_CASE
|
|
14
|
-
- Files: kebab-case hoặc theo convention của framework
|
|
15
|
-
- Directories: kebab-case
|
|
16
|
-
|
|
17
|
-
## File Organization
|
|
18
|
-
- 1 component/class per file (trừ khi strongly related)
|
|
19
|
-
- Group imports: external → internal → relative
|
|
20
|
-
- Export ở cuối file hoặc inline (nhất quán trong project)
|
|
21
|
-
|
|
22
|
-
## Error Handling
|
|
23
|
-
- KHÔNG swallow errors (catch rỗng)
|
|
24
|
-
- Log đủ context để debug (error message, input data, stack)
|
|
25
|
-
- Dùng custom error types cho domain errors
|
|
26
|
-
- Validate input ở boundary (API, form, external data)
|
|
27
|
-
|
|
28
|
-
## Testing
|
|
29
|
-
- Test file cùng tên với source: `foo.ts` → `foo.test.ts` hoặc `foo.spec.ts`
|
|
30
|
-
- Mỗi test case kiểm tra MỘT behavior
|
|
31
|
-
- Test name mô tả expected behavior: "should return error when input is empty"
|
|
32
|
-
- Arrange → Act → Assert pattern
|
|
33
|
-
- KHÔNG mock internal implementation details
|
|
34
|
-
|
|
35
|
-
## NOTE
|
|
36
|
-
Đây là quy tắc mặc định. Team tùy chỉnh theo stack cụ thể của dự án.
|
|
37
|
-
Thêm framework-specific rules vào file này hoặc tạo file riêng trong `.claude/rules/`.
|
|
1
|
+
# Code Style & Conventions
|
|
2
|
+
|
|
3
|
+
## Nguyên tắc chung
|
|
4
|
+
- Đặt tên biến/hàm rõ ràng, tự giải thích (self-documenting)
|
|
5
|
+
- Ưu tiên đơn giản, dễ đọc hơn clever code
|
|
6
|
+
- Mỗi function làm MỘT việc
|
|
7
|
+
- Comments giải thích WHY, không phải WHAT
|
|
8
|
+
- Xử lý errors ở đầu function (guard clauses / early return)
|
|
9
|
+
|
|
10
|
+
## Naming Conventions
|
|
11
|
+
- Variables/Functions: camelCase
|
|
12
|
+
- Classes/Components: PascalCase
|
|
13
|
+
- Constants: UPPER_SNAKE_CASE
|
|
14
|
+
- Files: kebab-case hoặc theo convention của framework
|
|
15
|
+
- Directories: kebab-case
|
|
16
|
+
|
|
17
|
+
## File Organization
|
|
18
|
+
- 1 component/class per file (trừ khi strongly related)
|
|
19
|
+
- Group imports: external → internal → relative
|
|
20
|
+
- Export ở cuối file hoặc inline (nhất quán trong project)
|
|
21
|
+
|
|
22
|
+
## Error Handling
|
|
23
|
+
- KHÔNG swallow errors (catch rỗng)
|
|
24
|
+
- Log đủ context để debug (error message, input data, stack)
|
|
25
|
+
- Dùng custom error types cho domain errors
|
|
26
|
+
- Validate input ở boundary (API, form, external data)
|
|
27
|
+
|
|
28
|
+
## Testing
|
|
29
|
+
- Test file cùng tên với source: `foo.ts` → `foo.test.ts` hoặc `foo.spec.ts`
|
|
30
|
+
- Mỗi test case kiểm tra MỘT behavior
|
|
31
|
+
- Test name mô tả expected behavior: "should return error when input is empty"
|
|
32
|
+
- Arrange → Act → Assert pattern
|
|
33
|
+
- KHÔNG mock internal implementation details
|
|
34
|
+
|
|
35
|
+
## NOTE
|
|
36
|
+
Đây là quy tắc mặc định. Team tùy chỉnh theo stack cụ thể của dự án.
|
|
37
|
+
Thêm framework-specific rules vào file này hoặc tạo file riêng trong `.claude/rules/`.
|
package/.claude/settings.json
CHANGED
|
@@ -11,36 +11,10 @@
|
|
|
11
11
|
"Bash(git status)",
|
|
12
12
|
"Bash(git blame *)",
|
|
13
13
|
"Bash(git stash list)",
|
|
14
|
+
"Bash(git add *)",
|
|
14
15
|
"Bash(ls *)",
|
|
15
16
|
"Bash(wc *)",
|
|
16
|
-
"Bash(
|
|
17
|
-
"Bash(xargs echo *)",
|
|
18
|
-
"Edit(/.claude/skills/dw-decision/**)",
|
|
19
|
-
"Bash(node bin/dw.mjs active)",
|
|
20
|
-
"Bash(node bin/dw.mjs metrics show)",
|
|
21
|
-
"Bash(node bin/dw.mjs dashboard)",
|
|
22
|
-
"Bash(node bin/dw.mjs init --help)",
|
|
23
|
-
"Bash(mkdir -p /tmp/test-solo)",
|
|
24
|
-
"Read(//tmp/**)",
|
|
25
|
-
"Bash(DW_NAME=test node /d/huygdv_projects/dw-kit/bin/dw.mjs init --solo)",
|
|
26
|
-
"Bash(npm test *)",
|
|
27
|
-
"Bash(node bin/dw.mjs metrics cut-analysis)",
|
|
28
|
-
"Bash(bash -n .claude/hooks/pre-commit-gate.sh)",
|
|
29
|
-
"Bash(bash -n /dev/stdin)",
|
|
30
|
-
"Bash(dos2unix .claude/hooks/pre-commit-gate.sh)",
|
|
31
|
-
"Bash(sed -i 's/\\\\r$//' .claude/hooks/pre-commit-gate.sh)",
|
|
32
|
-
"Bash(git add *)",
|
|
33
|
-
"Edit(/.claude/skills/dw-task-init/**)",
|
|
34
|
-
"Edit(/.claude/skills/dw-retroactive/**)",
|
|
35
|
-
"Edit(/.claude/skills/dw-research/**)",
|
|
36
|
-
"Edit(/.claude/skills/dw-plan/**)",
|
|
37
|
-
"Edit(/.claude/skills/dw-execute/**)",
|
|
38
|
-
"Edit(/.claude/skills/dw-handoff/**)",
|
|
39
|
-
"Bash(git commit -m 'fix\\(v1.3.3\\): writer skills v1/v2 compat + cleanup legacy slash-command refs *)",
|
|
40
|
-
"Bash(git commit -m 'feat\\(v1.3.4\\): /dw:plan integrated Quick Debate \\(red/blue team\\) - depth-driven *)"
|
|
41
|
-
],
|
|
42
|
-
"additionalDirectories": [
|
|
43
|
-
"D:\\huygdv_projects\\dw-kit\\.claude\\rules"
|
|
17
|
+
"Bash(npm test *)"
|
|
44
18
|
]
|
|
45
19
|
},
|
|
46
20
|
"hooks": {
|
|
@@ -17,6 +17,18 @@ $ARGUMENTS
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## Nguyên tắc riêng tư (ĐỌC TRƯỚC — bắt buộc)
|
|
21
|
+
|
|
22
|
+
Skill này tạo issue trên **repo bên thứ ba `dv-workflow/dv-workflow`** (ngoài project của bạn). Vì vậy **KHÔNG bao giờ tự động đưa thông tin nhận dạng của project người report vào issue**:
|
|
23
|
+
|
|
24
|
+
- ❌ KHÔNG kèm `project.name` từ config (đây là tên codebase/đơn vị của người dùng).
|
|
25
|
+
- ❌ KHÔNG kèm tên task, mã ticket nội bộ (vd `PROJ-123`), đường dẫn file độc quyền, hay code snippet.
|
|
26
|
+
- ✅ CHỈ gửi: loại feedback, component của **dw-kit**, mô tả vấn đề (từ `$ARGUMENTS`), và môi trường tối thiểu (OS, shell, dw version).
|
|
27
|
+
|
|
28
|
+
Nếu chính `$ARGUMENTS` chứa thông tin nhận dạng nội bộ → cảnh báo người dùng và đề nghị lược bỏ. **Luôn preview + xin xác nhận trước khi gửi (Bước 4).**
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
20
32
|
## Bước 1: Thu Thập Context
|
|
21
33
|
|
|
22
34
|
**OS detection:**
|
|
@@ -24,9 +36,9 @@ $ARGUMENTS
|
|
|
24
36
|
uname -s 2>/dev/null || echo "Windows"
|
|
25
37
|
```
|
|
26
38
|
|
|
27
|
-
**dw version:** Đọc `_toolkit.core_version` từ `.dw/config/dw.config.yml`
|
|
39
|
+
**dw version:** Đọc `_toolkit.core_version` từ `.dw/config/dw.config.yml` (KHÔNG đọc `project.name`).
|
|
28
40
|
|
|
29
|
-
**
|
|
41
|
+
**Workflow context:** Có task In Progress không, và depth của nó (quick/standard/thorough) — chỉ để giúp reproduce. Ghi nhận CÓ/KHÔNG + depth, **KHÔNG lấy tên task**.
|
|
30
42
|
|
|
31
43
|
---
|
|
32
44
|
|
|
@@ -83,8 +95,8 @@ Ví dụ:
|
|
|
83
95
|
[Nội dung từ $ARGUMENTS — đầy đủ, rõ ràng]
|
|
84
96
|
|
|
85
97
|
## Context
|
|
86
|
-
-
|
|
87
|
-
- Command/skill liên quan: [nếu biết]
|
|
98
|
+
- Hoàn cảnh: ["general usage" hoặc "trong một task depth=X" — KHÔNG ghi tên task/ticket]
|
|
99
|
+
- Command/skill dw-kit liên quan: [nếu biết]
|
|
88
100
|
- Bước reproduce (nếu là bug):
|
|
89
101
|
1. ...
|
|
90
102
|
2. ...
|
|
@@ -95,12 +107,31 @@ Ví dụ:
|
|
|
95
107
|
- [ ] Minor — annoying, có workaround dễ
|
|
96
108
|
|
|
97
109
|
---
|
|
98
|
-
*Reported via `/dw:kit-report
|
|
110
|
+
*Reported via `/dw:kit-report`*
|
|
99
111
|
```
|
|
100
112
|
|
|
113
|
+
> Không thêm dòng `Project:` hay bất kỳ tên project/ticket/path nội bộ nào (xem Nguyên tắc riêng tư).
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Bước 4: Preview + Xác Nhận (BẮT BUỘC trước khi gửi)
|
|
118
|
+
|
|
119
|
+
Issue sẽ được tạo trên repo bên thứ ba **công khai với dw-kit team**. Trước khi gửi, hiện đầy đủ title + body sẽ post và CHỜ người dùng đồng ý:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
┌─ Sẽ gửi lên github.com/dv-workflow/dv-workflow ─────────────┐
|
|
123
|
+
TITLE: [title]
|
|
124
|
+
|
|
125
|
+
BODY:
|
|
126
|
+
[body đầy đủ]
|
|
127
|
+
└─ Gõ "ok" để gửi · hoặc sửa nội dung trước ──────────────────┘
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Trước khi hiện preview, **rà soát lần cuối**: nếu title/body (kể cả phần người dùng tự nhập trong `$ARGUMENTS`) còn chứa tên project, mã ticket nội bộ, đường dẫn file độc quyền, hay code snippet → cảnh báo rõ và đề nghị lược bỏ. **Chỉ sang Bước 5 sau khi người dùng xác nhận.**
|
|
131
|
+
|
|
101
132
|
---
|
|
102
133
|
|
|
103
|
-
## Bước
|
|
134
|
+
## Bước 5: Gửi Lên GitHub
|
|
104
135
|
|
|
105
136
|
**Kiểm tra `gh` CLI:**
|
|
106
137
|
```bash
|
|
@@ -141,7 +172,7 @@ In ra:
|
|
|
141
172
|
|
|
142
173
|
---
|
|
143
174
|
|
|
144
|
-
## Bước
|
|
175
|
+
## Bước 6: Xác Nhận
|
|
145
176
|
|
|
146
177
|
```
|
|
147
178
|
✓ Issue đã được gửi: https://github.com/dv-workflow/dv-workflow/issues/[N]
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
# Plan: [Task Name]
|
|
2
|
-
|
|
3
|
-
## Ngày: [date] | Trạng thái: Draft → Approved
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Tóm Tắt
|
|
8
|
-
|
|
9
|
-
[1-2 câu: mục tiêu và approach được chọn]
|
|
10
|
-
|
|
11
|
-
## Phương Án So Sánh
|
|
12
|
-
|
|
13
|
-
| # | Phương án | Ưu điểm | Nhược điểm | Chọn? |
|
|
14
|
-
|---|-----------|---------|------------|-------|
|
|
15
|
-
| 1 | | | | **Chọn** |
|
|
16
|
-
| 2 | | | | Loại — lý do: |
|
|
17
|
-
|
|
18
|
-
## Subtasks
|
|
19
|
-
|
|
20
|
-
### ST-1: [Tên]
|
|
21
|
-
- **Mô tả**: [cụ thể]
|
|
22
|
-
- **Files**: [danh sách]
|
|
23
|
-
- **Criteria**: [ ] [điều kiện pass]
|
|
24
|
-
- **Dependencies**: none
|
|
25
|
-
- **Estimate**: [nếu bật]
|
|
26
|
-
|
|
27
|
-
### ST-2: [Tên]
|
|
28
|
-
- **Mô tả**: ...
|
|
29
|
-
- **Dependencies**: ST-1
|
|
30
|
-
|
|
31
|
-
## Rủi Ro & Giả Định
|
|
32
|
-
|
|
33
|
-
| # | Loại | Mô tả | Xác suất | Tác động | Mitigation |
|
|
34
|
-
|---|------|--------|----------|----------|------------|
|
|
35
|
-
| 1 | Giả định | | | | |
|
|
36
|
-
| 2 | Rủi ro | | Cao/TB/Thấp | | |
|
|
37
|
-
|
|
38
|
-
## Edge Cases
|
|
39
|
-
|
|
40
|
-
- [ ] [Edge case cần xử lý]
|
|
41
|
-
|
|
42
|
-
## Tác Động Hệ Thống
|
|
43
|
-
|
|
44
|
-
- Modules: [danh sách]
|
|
45
|
-
- API changes: [Có / Không]
|
|
46
|
-
- Migration: [Có / Không]
|
|
47
|
-
- Breaking: [Có / Không]
|
|
1
|
+
# Plan: [Task Name]
|
|
2
|
+
|
|
3
|
+
## Ngày: [date] | Trạng thái: Draft → Approved
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Tóm Tắt
|
|
8
|
+
|
|
9
|
+
[1-2 câu: mục tiêu và approach được chọn]
|
|
10
|
+
|
|
11
|
+
## Phương Án So Sánh
|
|
12
|
+
|
|
13
|
+
| # | Phương án | Ưu điểm | Nhược điểm | Chọn? |
|
|
14
|
+
|---|-----------|---------|------------|-------|
|
|
15
|
+
| 1 | | | | **Chọn** |
|
|
16
|
+
| 2 | | | | Loại — lý do: |
|
|
17
|
+
|
|
18
|
+
## Subtasks
|
|
19
|
+
|
|
20
|
+
### ST-1: [Tên]
|
|
21
|
+
- **Mô tả**: [cụ thể]
|
|
22
|
+
- **Files**: [danh sách]
|
|
23
|
+
- **Criteria**: [ ] [điều kiện pass]
|
|
24
|
+
- **Dependencies**: none
|
|
25
|
+
- **Estimate**: [nếu bật]
|
|
26
|
+
|
|
27
|
+
### ST-2: [Tên]
|
|
28
|
+
- **Mô tả**: ...
|
|
29
|
+
- **Dependencies**: ST-1
|
|
30
|
+
|
|
31
|
+
## Rủi Ro & Giả Định
|
|
32
|
+
|
|
33
|
+
| # | Loại | Mô tả | Xác suất | Tác động | Mitigation |
|
|
34
|
+
|---|------|--------|----------|----------|------------|
|
|
35
|
+
| 1 | Giả định | | | | |
|
|
36
|
+
| 2 | Rủi ro | | Cao/TB/Thấp | | |
|
|
37
|
+
|
|
38
|
+
## Edge Cases
|
|
39
|
+
|
|
40
|
+
- [ ] [Edge case cần xử lý]
|
|
41
|
+
|
|
42
|
+
## Tác Động Hệ Thống
|
|
43
|
+
|
|
44
|
+
- Modules: [danh sách]
|
|
45
|
+
- API changes: [Có / Không]
|
|
46
|
+
- Migration: [Có / Không]
|
|
47
|
+
- Breaking: [Có / Không]
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Research: [Task Name]
|
|
2
|
-
|
|
3
|
-
## Ngày: [date] | Agent: researcher
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Yêu Cầu
|
|
8
|
-
|
|
9
|
-
[Mô tả ngắn gọn task / yêu cầu cần khảo sát]
|
|
10
|
-
|
|
11
|
-
## Files Liên Quan
|
|
12
|
-
|
|
13
|
-
| # | File | Vai trò | Cần thay đổi? |
|
|
14
|
-
|---|------|---------|----------------|
|
|
15
|
-
| 1 | | | Có / Không |
|
|
16
|
-
|
|
17
|
-
## Kiến Trúc Hiện Tại
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
[Sơ đồ ASCII đơn giản hoặc mô tả luồng hiện tại]
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Dependencies
|
|
24
|
-
|
|
25
|
-
**Upstream** (phụ thuộc vào):
|
|
26
|
-
- [Module/API]
|
|
27
|
-
|
|
28
|
-
**Downstream** (bị ảnh hưởng):
|
|
29
|
-
- [Module/API]
|
|
30
|
-
|
|
31
|
-
## Patterns Phát Hiện
|
|
32
|
-
|
|
33
|
-
| Pattern | Mô tả | Ví dụ (file) |
|
|
34
|
-
|---------|--------|--------------|
|
|
35
|
-
| | | |
|
|
36
|
-
|
|
37
|
-
## Test Coverage
|
|
38
|
-
|
|
39
|
-
- Tests hiện có: [Có / Không / Partial]
|
|
40
|
-
- Files test: [danh sách nếu có]
|
|
41
|
-
- Gaps: [thiếu test ở đâu]
|
|
42
|
-
|
|
43
|
-
## Giả Định & Hạn Chế
|
|
44
|
-
|
|
45
|
-
- **Giả định**: [điều đang coi là đúng]
|
|
46
|
-
- **Hạn chế**: [giới hạn đã biết]
|
|
47
|
-
- **Chưa rõ**: [cần làm rõ thêm]
|
|
48
|
-
|
|
49
|
-
## Ghi Chú
|
|
50
|
-
|
|
51
|
-
[Bất kỳ context quan trọng: gotchas, tech debt, lịch sử thay đổi gần đây]
|
|
1
|
+
# Research: [Task Name]
|
|
2
|
+
|
|
3
|
+
## Ngày: [date] | Agent: researcher
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Yêu Cầu
|
|
8
|
+
|
|
9
|
+
[Mô tả ngắn gọn task / yêu cầu cần khảo sát]
|
|
10
|
+
|
|
11
|
+
## Files Liên Quan
|
|
12
|
+
|
|
13
|
+
| # | File | Vai trò | Cần thay đổi? |
|
|
14
|
+
|---|------|---------|----------------|
|
|
15
|
+
| 1 | | | Có / Không |
|
|
16
|
+
|
|
17
|
+
## Kiến Trúc Hiện Tại
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
[Sơ đồ ASCII đơn giản hoặc mô tả luồng hiện tại]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
**Upstream** (phụ thuộc vào):
|
|
26
|
+
- [Module/API]
|
|
27
|
+
|
|
28
|
+
**Downstream** (bị ảnh hưởng):
|
|
29
|
+
- [Module/API]
|
|
30
|
+
|
|
31
|
+
## Patterns Phát Hiện
|
|
32
|
+
|
|
33
|
+
| Pattern | Mô tả | Ví dụ (file) |
|
|
34
|
+
|---------|--------|--------------|
|
|
35
|
+
| | | |
|
|
36
|
+
|
|
37
|
+
## Test Coverage
|
|
38
|
+
|
|
39
|
+
- Tests hiện có: [Có / Không / Partial]
|
|
40
|
+
- Files test: [danh sách nếu có]
|
|
41
|
+
- Gaps: [thiếu test ở đâu]
|
|
42
|
+
|
|
43
|
+
## Giả Định & Hạn Chế
|
|
44
|
+
|
|
45
|
+
- **Giả định**: [điều đang coi là đúng]
|
|
46
|
+
- **Hạn chế**: [giới hạn đã biết]
|
|
47
|
+
- **Chưa rõ**: [cần làm rõ thêm]
|
|
48
|
+
|
|
49
|
+
## Ghi Chú
|
|
50
|
+
|
|
51
|
+
[Bất kỳ context quan trọng: gotchas, tech debt, lịch sử thay đổi gần đây]
|