dw-kit 1.9.1 → 1.9.3

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 (56) hide show
  1. package/.claude/agents/planner.md +100 -100
  2. package/.claude/agents/quality-checker.md +86 -86
  3. package/.claude/agents/researcher.md +93 -93
  4. package/.claude/agents/reviewer.md +126 -126
  5. package/.claude/hooks/supply-chain-scan.sh +0 -0
  6. package/.claude/rules/code-style.md +37 -37
  7. package/.claude/settings.json +2 -28
  8. package/.claude/skills/dw-plan/template-plan.md +47 -47
  9. package/.claude/skills/dw-research/template-research.md +51 -51
  10. package/.claude/skills/dw-review/checklist.md +88 -88
  11. package/.claude/skills/dw-thinking/THINKING.md +91 -91
  12. package/.claude/templates/agent-report.md +35 -35
  13. package/.claude/templates/en/task-context.md +77 -73
  14. package/.claude/templates/en/task-plan.md +83 -79
  15. package/.claude/templates/en/task-progress.md +69 -65
  16. package/.claude/templates/pr-template.md +56 -56
  17. package/.claude/templates/task-context.md +77 -73
  18. package/.claude/templates/task-plan.md +83 -79
  19. package/.claude/templates/task-progress.md +69 -65
  20. package/.dw/adapters/claude-cli/extensions/README.md +36 -36
  21. package/.dw/adapters/claude-cli/generated/README.md +23 -23
  22. package/.dw/adapters/claude-cli/overrides/README.md +37 -37
  23. package/.dw/adapters/generic/README.md +21 -21
  24. package/.dw/config/presets/enterprise.yml +52 -52
  25. package/.dw/config/presets/small-team.yml +39 -39
  26. package/.dw/config/presets/solo-quick.yml +37 -37
  27. package/.dw/core/AGENTS.md +53 -53
  28. package/.dw/core/QUALITY.md +220 -220
  29. package/.dw/core/THINKING.md +126 -126
  30. package/.dw/core/WORKFLOW.md +17 -12
  31. package/.dw/core/templates/v2/spec.md +2 -0
  32. package/.dw/core/templates/v2/tracking.md +2 -0
  33. package/.dw/core/templates/vi/task-context.md +96 -92
  34. package/.dw/core/templates/vi/task-plan.md +97 -93
  35. package/.dw/core/templates/vi/task-progress.md +60 -56
  36. package/LICENSE +201 -201
  37. package/NOTICE +26 -26
  38. package/README.md +150 -121
  39. package/README.vi.md +230 -0
  40. package/bin/dw.mjs +28 -28
  41. package/package.json +4 -1
  42. package/src/commands/claude-vn-fix.mjs +267 -267
  43. package/src/commands/prompt.mjs +112 -112
  44. package/src/commands/validate.mjs +102 -102
  45. package/src/commands/voice.mjs +431 -2
  46. package/src/lib/board-data.mjs +23 -57
  47. package/src/lib/clipboard.mjs +24 -24
  48. package/src/lib/goal-driver.mjs +312 -0
  49. package/src/lib/goal-progress.mjs +193 -0
  50. package/src/lib/platform.mjs +39 -39
  51. package/src/lib/process-kill.mjs +77 -0
  52. package/src/lib/prompt-suggest.mjs +84 -84
  53. package/src/lib/task-md-utils.mjs +78 -0
  54. package/src/lib/ui.mjs +66 -66
  55. package/src/lib/update-checker.mjs +73 -73
  56. 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/`.
@@ -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(node src/smoke-test.mjs)",
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": {
@@ -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]