thanh-kit 2.5.1 → 2.5.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.
Files changed (123) hide show
  1. package/dist/index.js +20 -61
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/{commands → command-archive}/ask.md +5 -5
  5. package/templates/{commands → command-archive}/ck-help.md +18 -2
  6. package/templates/command-archive/docs/init.md +38 -0
  7. package/templates/command-archive/docs/summarize.md +22 -0
  8. package/templates/command-archive/docs/update.md +76 -0
  9. package/templates/command-archive/journal.md +18 -0
  10. package/templates/{commands → command-archive}/kanban.md +5 -7
  11. package/templates/{commands → command-archive}/plan/archive.md +2 -2
  12. package/templates/command-archive/plan/red-team.md +200 -0
  13. package/templates/command-archive/plan/validate.md +188 -0
  14. package/templates/command-archive/preview.md +283 -0
  15. package/templates/command-archive/review/codebase/parallel.md +122 -0
  16. package/templates/{commands → command-archive}/test/ui.md +3 -3
  17. package/templates/{commands → command-archive}/use-mcp.md +6 -2
  18. package/templates/command-archive/worktree.md +109 -0
  19. package/templates/{workflows → rules}/development-rules.md +12 -53
  20. package/templates/rules/orchestration-protocol.md +43 -0
  21. package/templates/{workflows → rules}/primary-workflow.md +16 -4
  22. package/templates/rules/team-coordination-rules.md +90 -0
  23. package/templates/schemas/ck-config.schema.json +381 -0
  24. package/templates/commands/README.md +0 -251
  25. package/templates/commands/bootstrap/auto/fast.md +0 -111
  26. package/templates/commands/bootstrap/auto/parallel.md +0 -66
  27. package/templates/commands/bootstrap/auto.md +0 -115
  28. package/templates/commands/bootstrap.md +0 -137
  29. package/templates/commands/brainstorm.md +0 -74
  30. package/templates/commands/build.md +0 -39
  31. package/templates/commands/checkpoint.md +0 -156
  32. package/templates/commands/code/auto.md +0 -170
  33. package/templates/commands/code/no-test.md +0 -158
  34. package/templates/commands/code/parallel.md +0 -55
  35. package/templates/commands/code-simplifier.md +0 -71
  36. package/templates/commands/code.md +0 -176
  37. package/templates/commands/compact.md +0 -57
  38. package/templates/commands/content/cro.md +0 -43
  39. package/templates/commands/content/enhance.md +0 -14
  40. package/templates/commands/content/fast.md +0 -13
  41. package/templates/commands/content/good.md +0 -16
  42. package/templates/commands/context.md +0 -48
  43. package/templates/commands/cook/auto/fast.md +0 -26
  44. package/templates/commands/cook/auto/parallel.md +0 -49
  45. package/templates/commands/cook/auto.md +0 -15
  46. package/templates/commands/cook/fast.md +0 -47
  47. package/templates/commands/cook/hard.md +0 -80
  48. package/templates/commands/cook/parallel.md +0 -90
  49. package/templates/commands/cook.md +0 -105
  50. package/templates/commands/create-feature.md +0 -48
  51. package/templates/commands/db-migrate.md +0 -52
  52. package/templates/commands/debug.md +0 -13
  53. package/templates/commands/design/3d.md +0 -83
  54. package/templates/commands/design/describe.md +0 -23
  55. package/templates/commands/design/fast.md +0 -31
  56. package/templates/commands/design/good.md +0 -35
  57. package/templates/commands/design/screenshot.md +0 -34
  58. package/templates/commands/design/video.md +0 -34
  59. package/templates/commands/docs/init.md +0 -39
  60. package/templates/commands/docs/summarize.md +0 -31
  61. package/templates/commands/docs/update.md +0 -57
  62. package/templates/commands/feature.md +0 -62
  63. package/templates/commands/fix/ci.md +0 -17
  64. package/templates/commands/fix/fast.md +0 -19
  65. package/templates/commands/fix/hard.md +0 -39
  66. package/templates/commands/fix/logs.md +0 -26
  67. package/templates/commands/fix/parallel.md +0 -54
  68. package/templates/commands/fix/test.md +0 -20
  69. package/templates/commands/fix/types.md +0 -9
  70. package/templates/commands/fix/ui.md +0 -48
  71. package/templates/commands/fix-issue.md +0 -177
  72. package/templates/commands/fix.md +0 -43
  73. package/templates/commands/generate-dto.md +0 -67
  74. package/templates/commands/git/cm.md +0 -5
  75. package/templates/commands/git/cp.md +0 -4
  76. package/templates/commands/git/merge.md +0 -40
  77. package/templates/commands/git/pr.md +0 -48
  78. package/templates/commands/integrate/polar.md +0 -28
  79. package/templates/commands/integrate/sepay.md +0 -28
  80. package/templates/commands/investigate.md +0 -324
  81. package/templates/commands/journal.md +0 -7
  82. package/templates/commands/lint.md +0 -47
  83. package/templates/commands/migration.md +0 -111
  84. package/templates/commands/performance.md +0 -110
  85. package/templates/commands/plan/ci.md +0 -33
  86. package/templates/commands/plan/cro.md +0 -69
  87. package/templates/commands/plan/fast.md +0 -86
  88. package/templates/commands/plan/hard.md +0 -103
  89. package/templates/commands/plan/parallel.md +0 -152
  90. package/templates/commands/plan/preview.md +0 -40
  91. package/templates/commands/plan/two.md +0 -52
  92. package/templates/commands/plan/validate.md +0 -132
  93. package/templates/commands/plan.md +0 -36
  94. package/templates/commands/pr.md +0 -49
  95. package/templates/commands/preview.md +0 -87
  96. package/templates/commands/release-notes.md +0 -144
  97. package/templates/commands/review/post-task.md +0 -157
  98. package/templates/commands/review-changes.md +0 -46
  99. package/templates/commands/review.md +0 -56
  100. package/templates/commands/scout/ext.md +0 -35
  101. package/templates/commands/scout.md +0 -283
  102. package/templates/commands/security.md +0 -119
  103. package/templates/commands/skill/add.md +0 -36
  104. package/templates/commands/skill/create.md +0 -29
  105. package/templates/commands/skill/fix-logs.md +0 -22
  106. package/templates/commands/skill/optimize/auto.md +0 -25
  107. package/templates/commands/skill/optimize.md +0 -34
  108. package/templates/commands/skill/plan.md +0 -45
  109. package/templates/commands/worktree.md +0 -126
  110. package/templates/memory/session-log.md +0 -186
  111. package/templates/router/README.md +0 -294
  112. package/templates/router/agents-guide.md +0 -38
  113. package/templates/router/commands-guide.md +0 -122
  114. package/templates/router/decision-flow.md +0 -92
  115. package/templates/router/skills-guide.md +0 -127
  116. package/templates/router/workflows-guide.md +0 -68
  117. package/templates/workflows/README.md +0 -241
  118. package/templates/workflows/orchestration-protocol.md +0 -16
  119. /package/templates/{commands → command-archive}/coding-level.md +0 -0
  120. /package/templates/{commands → command-archive}/review/codebase.md +0 -0
  121. /package/templates/{commands → command-archive}/test.md +0 -0
  122. /package/templates/{commands → command-archive}/watzup.md +0 -0
  123. /package/templates/{workflows → rules}/documentation-management.md +0 -0
@@ -1,126 +0,0 @@
1
- ---
2
- description: Create isolated git worktree for parallel development
3
- argument-hint: [feature-description] OR [project] [feature] (monorepo)
4
- ---
5
-
6
- Create an isolated git worktree for parallel feature development.
7
-
8
- ## Workflow
9
-
10
- ### Step 1: Get Repository Info
11
-
12
- ```bash
13
- node .claude/scripts/worktree.cjs info --json
14
- ```
15
-
16
- **Response fields:**
17
- - `repoType`: "monorepo" or "standalone"
18
- - `baseBranch`: detected base branch
19
- - `projects`: array of {name, path} for monorepo
20
- - `envFiles`: array of .env* files found
21
- - `dirtyState`: boolean
22
-
23
- ### Step 2: Gather Info via AskUserQuestion
24
-
25
- **Detect branch prefix from user's description:**
26
- - Keywords "fix", "bug", "error", "issue" → prefix = `fix`
27
- - Keywords "refactor", "restructure", "rewrite" → prefix = `refactor`
28
- - Keywords "docs", "documentation", "readme" → prefix = `docs`
29
- - Keywords "test", "spec", "coverage" → prefix = `test`
30
- - Keywords "chore", "cleanup", "deps" → prefix = `chore`
31
- - Keywords "perf", "performance", "optimize" → prefix = `perf`
32
- - Everything else → prefix = `feat`
33
-
34
- **For MONOREPO:** Use AskUserQuestion if project not specified:
35
- ```javascript
36
- // If user said "/worktree add auth" but multiple projects exist
37
- AskUserQuestion({
38
- questions: [{
39
- header: "Project",
40
- question: "Which project should the worktree be created for?",
41
- options: projects.map(p => ({ label: p.name, description: p.path })),
42
- multiSelect: false
43
- }]
44
- })
45
- ```
46
-
47
- **For env files:** Always ask which to copy:
48
- ```javascript
49
- AskUserQuestion({
50
- questions: [{
51
- header: "Env files",
52
- question: "Which environment files should be copied to the worktree?",
53
- options: envFiles.map(f => ({ label: f, description: "Copy to worktree" })),
54
- multiSelect: true
55
- }]
56
- })
57
- ```
58
-
59
- ### Step 3: Convert Description to Slug
60
-
61
- - "add authentication system" → `add-auth`
62
- - "fix login bug" → `login-bug`
63
- - Remove filler words, kebab-case, max 50 chars
64
-
65
- ### Step 4: Execute Command
66
-
67
- **Monorepo:**
68
- ```bash
69
- node .claude/scripts/worktree.cjs create "<PROJECT>" "<SLUG>" --prefix <TYPE> --env "<FILES>"
70
- ```
71
-
72
- **Standalone:**
73
- ```bash
74
- node .claude/scripts/worktree.cjs create "<SLUG>" --prefix <TYPE> --env "<FILES>"
75
- ```
76
-
77
- **Options:**
78
- - `--prefix` - Branch type: feat|fix|refactor|docs|test|chore|perf
79
- - `--env` - Comma-separated .env files to copy
80
- - `--json` - Output JSON for parsing
81
- - `--dry-run` - Preview without executing
82
-
83
- ## Commands
84
-
85
- | Command | Usage | Description |
86
- |---------|-------|-------------|
87
- | `create` | `create [project] <feature>` | Create new worktree |
88
- | `remove` | `remove <name-or-path>` | Remove worktree and branch |
89
- | `info` | `info` | Get repo info |
90
- | `list` | `list` | List existing worktrees |
91
-
92
- ## Error Codes
93
-
94
- | Code | Meaning | Action |
95
- |------|---------|--------|
96
- | `MISSING_ARGS` | Missing project/feature for monorepo | Ask for both |
97
- | `MISSING_FEATURE` | No feature name (standalone) | Ask for feature |
98
- | `PROJECT_NOT_FOUND` | Project not in .gitmodules | Show available projects |
99
- | `MULTIPLE_PROJECTS_MATCH` | Ambiguous project name | Use AskUserQuestion |
100
- | `MULTIPLE_WORKTREES_MATCH` | Ambiguous worktree for remove | Use AskUserQuestion |
101
- | `BRANCH_CHECKED_OUT` | Branch in use elsewhere | Suggest different name |
102
- | `WORKTREE_EXISTS` | Path already exists | Suggest use or remove |
103
- | `WORKTREE_CREATE_FAILED` | Git command failed | Show git error |
104
- | `WORKTREE_REMOVE_FAILED` | Cannot remove worktree | Check uncommitted changes |
105
-
106
- ## Example Session
107
-
108
- ```
109
- User: /worktree fix the login validation bug
110
-
111
- Claude: [Runs: node .claude/scripts/worktree.cjs info --json]
112
- [Detects: standalone repo, envFiles: [".env.example"]]
113
- [Detects prefix from "fix" keyword: fix]
114
- [Converts slug: "login-validation-bug"]
115
-
116
- Claude: [Uses AskUserQuestion for env files]
117
- "Which environment files should be copied?"
118
- Options: .env.example
119
-
120
- User: .env.example
121
-
122
- Claude: [Runs: node .claude/scripts/worktree.cjs create "login-validation-bug" --prefix fix --env ".env.example"]
123
-
124
- Output: Worktree created at ../worktrees/myrepo-login-validation-bug
125
- Branch: fix/login-validation-bug
126
- ```
@@ -1,186 +0,0 @@
1
-
2
- ## Session Ended - 2025-12-20T12:20:50.962Z
3
- - Branch: main
4
- - Directory: C:\GitSources\EasyPlatform
5
-
6
- ---
7
-
8
- ## Session Ended - 2025-12-20T12:29:41.467Z
9
- - Branch: main
10
- - Directory: C:\GitSources\EasyPlatform
11
-
12
- ---
13
-
14
- ## Session Ended - 2025-12-20T16:19:14.363Z
15
- - Branch: main
16
- - Directory: C:\GitSources\EasyPlatform
17
-
18
- ---
19
-
20
- ## Session Ended - 2025-12-20T16:25:25.086Z
21
- - Branch: main
22
- - Directory: C:\GitSources\EasyPlatform
23
-
24
- ---
25
-
26
- ## Session Ended - 2025-12-20T16:36:47.738Z
27
- - Branch: main
28
- - Directory: C:\GitSources\EasyPlatform
29
-
30
- ---
31
-
32
- ## Session Ended - 2025-12-23T13:05:47.890Z
33
- - Branch: main
34
- - Directory: C:\GitSources\EasyPlatform
35
-
36
- ---
37
-
38
- ## Session Ended - 2025-12-24T08:13:36.265Z
39
- - Branch: main
40
- - Directory: C:\GitSources\EasyPlatform
41
-
42
- ---
43
-
44
- ## Session Ended - 2025-12-24T08:19:15.569Z
45
- - Branch: main
46
- - Directory: C:\GitSources\EasyPlatform
47
-
48
- ---
49
-
50
- ## Session Ended - 2025-12-24T08:30:36.642Z
51
- - Branch: main
52
- - Directory: C:\GitSources\EasyPlatform
53
-
54
- ---
55
-
56
- ## Session Ended - 2025-12-24T08:54:32.981Z
57
- - Branch: main
58
- - Directory: C:\GitSources\EasyPlatform
59
-
60
- ---
61
-
62
- ## Session Ended - 2025-12-24T11:34:08.922Z
63
- - Branch: main
64
- - Directory: C:\GitSources\EasyPlatform
65
-
66
- ---
67
-
68
- ## Session Ended - 2025-12-24T11:38:41.978Z
69
- - Branch: main
70
- - Directory: C:\GitSources\EasyPlatform
71
-
72
- ---
73
-
74
- ## Session Ended - 2025-12-24T11:53:15.159Z
75
- - Branch: main
76
- - Directory: C:\GitSources\EasyPlatform
77
-
78
- ---
79
-
80
- ## Session Ended - 2025-12-24T11:59:04.430Z
81
- - Branch: main
82
- - Directory: C:\GitSources\EasyPlatform
83
-
84
- ---
85
-
86
- ## Session Ended - 2025-12-24T12:06:44.071Z
87
- - Branch: main
88
- - Directory: C:\GitSources\EasyPlatform
89
-
90
- ---
91
-
92
- ## Session Ended - 2025-12-24T12:24:11.940Z
93
- - Branch: main
94
- - Directory: C:\GitSources\EasyPlatform
95
-
96
- ---
97
-
98
- ## Session Ended - 2025-12-24T12:33:52.403Z
99
- - Branch: main
100
- - Directory: C:\GitSources\EasyPlatform
101
-
102
- ---
103
-
104
- ## Session Ended - 2025-12-24T12:55:29.114Z
105
- - Branch: main
106
- - Directory: C:\GitSources\EasyPlatform
107
-
108
- ---
109
-
110
- ## Session Ended - 2025-12-24T12:57:58.800Z
111
- - Branch: main
112
- - Directory: C:\GitSources\EasyPlatform
113
-
114
- ---
115
-
116
- ## Session Ended - 2025-12-24T22:07:26.337Z
117
- - Branch: main
118
- - Directory: C:\GitSources\EasyPlatform
119
-
120
- ---
121
-
122
- ## Session Ended - 2025-12-24T22:14:21.188Z
123
- - Branch: main
124
- - Directory: C:\GitSources\EasyPlatform
125
-
126
- ---
127
-
128
- ## Session Ended - 2025-12-24T22:23:50.461Z
129
- - Branch: main
130
- - Directory: C:\GitSources\EasyPlatform
131
-
132
- ---
133
-
134
- ## Session Ended - 2025-12-24T22:35:31.708Z
135
- - Branch: main
136
- - Directory: C:\GitSources\EasyPlatform
137
-
138
- ---
139
-
140
- ## Session Ended - 2025-12-24T22:45:59.379Z
141
- - Branch: main
142
- - Directory: C:\GitSources\EasyPlatform
143
-
144
- ---
145
-
146
- ## Session Ended - 2025-12-24T22:47:15.154Z
147
- - Branch: main
148
- - Directory: C:\GitSources\EasyPlatform
149
-
150
- ---
151
-
152
- ## Session Ended - 2025-12-24T22:58:17.355Z
153
- - Branch: main
154
- - Directory: C:\GitSources\EasyPlatform
155
-
156
- ---
157
-
158
- ## Session Ended - 2025-12-28T02:19:43.058Z
159
- - Branch: main
160
- - Directory: C:\GitSources\EasyPlatform
161
-
162
- ---
163
-
164
- ## Session Ended - 2025-12-28T03:47:18.977Z
165
- - Branch: main
166
- - Directory: C:\GitSources\EasyPlatform
167
-
168
- ---
169
-
170
- ## Session Ended - 2025-12-28T06:43:05.591Z
171
- - Branch: main
172
- - Directory: C:\GitSources\EasyPlatform
173
-
174
- ---
175
-
176
- ## Session Ended - 2025-12-28T06:53:44.627Z
177
- - Branch: main
178
- - Directory: C:\GitSources\EasyPlatform
179
-
180
- ---
181
-
182
- ## Session Ended - 2025-12-28T08:25:50.147Z
183
- - Branch: main
184
- - Directory: C:\GitSources\EasyPlatform
185
-
186
- ---
@@ -1,294 +0,0 @@
1
- # 🧭 Router - Bộ Não Quyết Định
2
-
3
- ## Router là gì?
4
-
5
- **Router** là "bộ não" giúp AI quyết định **nên dùng cái gì** để xử lý yêu cầu của bạn. Giống như một tổng đài viên thông minh, router phân tích yêu cầu rồi chuyển đến đúng bộ phận.
6
-
7
- **Ví dụ đơn giản:**
8
- ```
9
- Bạn: "Sửa lỗi login không được"
10
-
11
- Router phân tích:
12
- - Từ khóa "sửa lỗi" → Cần agent Debugger
13
- - Loại việc "bug" → Cần command /fix
14
- - Cần kiến thức gì? → Có thể cần skill authentication
15
-
16
- → Router kết nối: Debugger + /fix + better-auth skill
17
- ```
18
-
19
- ---
20
-
21
- ## Các File Trong Router
22
-
23
- | File | Chức Năng | Khi Nào AI Đọc |
24
- |------|-----------|----------------|
25
- | **decision-flow.md** | Hướng dẫn quy trình phân tích từng bước | Khi gặp yêu cầu phức tạp, không rõ ràng |
26
- | **agents-guide.md** | Danh sách đầy đủ 17 agents | Khi cần chọn vai trò phù hợp |
27
- | **commands-guide.md** | Danh sách đầy đủ 50+ commands | Khi cần chọn quy trình làm việc |
28
- | **skills-guide.md** | Danh sách đầy đủ 59 skills | Khi cần kiến thức chuyên môn |
29
- | **workflows-guide.md** | Quy trình phối hợp nhiều agents | Khi công việc lớn, phức tạp |
30
-
31
- ---
32
-
33
- ## Quy Trình Router Hoạt Động
34
-
35
- ```
36
- Bạn đưa ra yêu cầu
37
-
38
- ┌─────────────────────────────────┐
39
- │ BƯỚC 1: Phân tích yêu cầu │
40
- │ - Loại việc gì? (code/fix/test)│
41
- │ - Lĩnh vực nào? (frontend/DB) │
42
- │ - Phức tạp không? │
43
- └─────────────────────────────────┘
44
-
45
- ┌─────────────────────────────────┐
46
- │ BƯỚC 2: Chọn Agent (Ai làm?) │
47
- │ → Đọc agents-guide.md │
48
- │ Ví dụ: debugger, developer... │
49
- └─────────────────────────────────┘
50
-
51
- ┌─────────────────────────────────┐
52
- │ BƯỚC 3: Chọn Command (Làm sao?)│
53
- │ → Đọc commands-guide.md │
54
- │ Ví dụ: /fix, /code, /plan... │
55
- └─────────────────────────────────┘
56
-
57
- ┌─────────────────────────────────┐
58
- │ BƯỚC 4: Chọn Skill (Cần gì?) │
59
- │ → Đọc skills-guide.md │
60
- │ Chỉ khi cần kiến thức chuyên │
61
- └─────────────────────────────────┘
62
-
63
- ┌─────────────────────────────────┐
64
- │ BƯỚC 5: Áp dụng Workflow │
65
- │ → Đọc workflows-guide.md │
66
- │ Chỉ khi việc lớn, nhiều bước │
67
- └─────────────────────────────────┘
68
-
69
- Bắt đầu làm việc
70
- ```
71
-
72
- ---
73
-
74
- ## Chi Tiết Từng File
75
-
76
- ### 1. decision-flow.md - Quy Trình Quyết Định
77
-
78
- **Mục đích:** Hướng dẫn AI cách phân tích yêu cầu từ đầu đến cuối
79
-
80
- **Nội dung chính:**
81
- - 5 bước phân tích (như sơ đồ ở trên)
82
- - Cách nhận diện loại công việc
83
- - Cách đánh giá độ phức tạp
84
-
85
- **AI đọc file này khi:**
86
- - Yêu cầu không rõ ràng
87
- - Không biết chọn gì
88
- - Cần hướng dẫn từng bước
89
-
90
- ---
91
-
92
- ### 2. agents-guide.md - Danh Bạ Chuyên Gia
93
-
94
- **Mục đích:** Giúp AI biết có những "chuyên gia" nào và khi nào gọi ai
95
-
96
- **Nội dung chính:**
97
- ```
98
- Từ khóa → Agent phù hợp
99
-
100
- "bug, lỗi, crash" → debugger (thợ săn lỗi)
101
- "code, viết, tạo" → developer (lập trình viên)
102
- "kế hoạch, thiết kế" → planner (kiến trúc sư)
103
- "tìm, ở đâu" → scout (thám tử)
104
- ...
105
- ```
106
-
107
- **AI đọc file này khi:** Cần biết nên nhập vai ai
108
-
109
- ---
110
-
111
- ### 3. commands-guide.md - Sổ Tay Quy Trình
112
-
113
- **Mục đích:** Giúp AI biết có những quy trình nào và khi nào dùng
114
-
115
- **Nội dung chính:**
116
- ```
117
- Từ khóa → Command phù hợp
118
-
119
- "sửa lỗi đơn giản" → /fix/fast
120
- "sửa lỗi phức tạp" → /fix/hard
121
- "sửa lỗi UI" → /fix/ui
122
- "viết code có test" → /code
123
- "viết code nhanh" → /code/no-test
124
- ...
125
- ```
126
-
127
- **AI đọc file này khi:** Cần biết quy trình làm việc
128
-
129
- ---
130
-
131
- ### 4. skills-guide.md - Thư Viện Kiến Thức
132
-
133
- **Mục đích:** Giúp AI biết có những kiến thức chuyên môn nào
134
-
135
- **Nội dung chính:**
136
- ```
137
- Từ khóa → Skill cần load
138
-
139
- "React, component" → frontend-development
140
- "đẹp, UI, thiết kế" → ui-ux-pro-max
141
- "database, SQL" → databases
142
- "OAuth, đăng nhập" → better-auth
143
- "deploy, Docker" → devops
144
- ...
145
- ```
146
-
147
- **AI đọc file này khi:** Công việc cần kiến thức chuyên sâu
148
-
149
- ---
150
-
151
- ### 5. workflows-guide.md - Kịch Bản Phối Hợp
152
-
153
- **Mục đích:** Hướng dẫn cách phối hợp nhiều agents cho việc lớn
154
-
155
- **Nội dung chính:**
156
- - Quy trình làm tính năng mới (plan → code → test → review)
157
- - Cách chuyển giao giữa các agents
158
- - Checkpoints kiểm tra chất lượng
159
-
160
- **AI đọc file này khi:** Công việc lớn, cần nhiều bước và nhiều vai trò
161
-
162
- ---
163
-
164
- ## Ví Dụ Router Làm Việc
165
-
166
- ### Ví dụ 1: Yêu cầu đơn giản
167
-
168
- ```
169
- Bạn: "Tìm file xử lý payment"
170
-
171
- Router quyết định nhanh:
172
- - Từ khóa "tìm" → Agent: scout
173
- - Không cần command đặc biệt → /scout
174
- - Không cần skill (việc đơn giản)
175
-
176
- → Kết quả: AI dùng scout để tìm kiếm
177
- ```
178
-
179
- ### Ví dụ 2: Yêu cầu phức tạp
180
-
181
- ```
182
- Bạn: "Xây dựng hệ thống chat real-time"
183
-
184
- Router phân tích kỹ:
185
- 1. Đọc decision-flow.md
186
- - Loại việc: Tạo tính năng mới
187
- - Lĩnh vực: Backend + Frontend
188
- - Độ phức tạp: Cao
189
-
190
- 2. Chọn agents (agents-guide.md):
191
- - planner → developer → tester → docs-manager
192
-
193
- 3. Chọn commands (commands-guide.md):
194
- - /plan/hard → /code → /test → /docs/update
195
-
196
- 4. Chọn skills (skills-guide.md):
197
- - backend-development (WebSocket)
198
- - frontend-development (React)
199
- - databases (lưu messages)
200
-
201
- 5. Áp dụng workflow (workflows-guide.md):
202
- - Dùng primary-workflow.md (nhiều giai đoạn)
203
-
204
- → Kết quả: AI có kế hoạch đầy đủ để thực hiện
205
- ```
206
-
207
- ### Ví dụ 3: Yêu cầu mơ hồ
208
-
209
- ```
210
- Bạn: "Làm cho app tốt hơn"
211
-
212
- Router nhận ra không đủ thông tin:
213
- - Đọc decision-flow.md
214
- - Không rõ: Tốt hơn về cái gì?
215
-
216
- → AI hỏi lại: "Bạn muốn cải thiện về mặt nào?
217
- - Tốc độ (performance)?
218
- - Giao diện (UI)?
219
- - Tính năng mới?
220
- - Sửa lỗi?"
221
-
222
- Bạn: "Tốc độ"
223
-
224
- → Router chọn:
225
- - Agent: debugger + planner
226
- - Skill: arch-performance-optimization
227
- - Command: /debug → /plan
228
- ```
229
-
230
- ---
231
-
232
- ## Hệ Thống Từ Khóa
233
-
234
- Router dùng từ khóa để nhận diện nhanh:
235
-
236
- ### Từ khóa → Agent
237
- | Bạn nói | AI chọn Agent |
238
- |---------|---------------|
239
- | bug, lỗi, crash, không chạy | debugger |
240
- | code, viết, tạo, implement | fullstack-developer |
241
- | kế hoạch, architecture, thiết kế hệ thống | planner |
242
- | tìm, ở đâu, file nào | scout |
243
- | test, kiểm tra, coverage | tester |
244
- | đẹp, UI, giao diện | ui-ux-designer |
245
-
246
- ### Từ khóa → Command
247
- | Bạn nói | AI chọn Command |
248
- |---------|-----------------|
249
- | sửa lỗi | /fix |
250
- | sửa nhanh | /fix/fast |
251
- | lỗi phức tạp | /fix/hard |
252
- | lỗi giao diện | /fix/ui |
253
- | lập kế hoạch | /plan |
254
- | kế hoạch chi tiết | /plan/hard |
255
-
256
- ### Từ khóa → Skill
257
- | Bạn nói | AI load Skill |
258
- |---------|---------------|
259
- | React, component | frontend-development |
260
- | đẹp, stunning | ui-ux-pro-max |
261
- | database, SQL | databases |
262
- | login, OAuth | better-auth |
263
- | deploy, CI/CD | devops |
264
-
265
- ---
266
-
267
- ## Tại Sao Cần Router?
268
-
269
- | ❌ Không có Router | ✅ Có Router |
270
- |-------------------|--------------|
271
- | AI làm bừa, không có hệ thống | AI làm theo quy trình chuẩn |
272
- | Dễ chọn sai công cụ | Luôn chọn đúng công cụ |
273
- | Thiếu hoặc thừa kiến thức | Load đúng kiến thức cần thiết |
274
- | Không nhất quán | Kết quả nhất quán, chất lượng |
275
-
276
- ---
277
-
278
- ## Tóm Tắt
279
-
280
- | Khái niệm | Giải thích |
281
- |-----------|------------|
282
- | **Router là gì** | Bộ não giúp AI quyết định dùng gì |
283
- | **Có mấy file** | 5 files hướng dẫn |
284
- | **Hoạt động thế nào** | Phân tích từ khóa → Chọn agent/command/skill |
285
- | **Khi nào dùng** | Tự động, mỗi khi bạn đưa ra yêu cầu |
286
-
287
- ---
288
-
289
- ## Xem Thêm
290
-
291
- - [Danh sách Agents (Vai trò)](../agents/README.md)
292
- - [Danh sách Commands (Quy trình)](../commands/README.md)
293
- - [Danh sách Skills (Kiến thức)](../skills/README.md)
294
- - [Danh sách Workflows (Phối hợp)](../workflows/README.md)
@@ -1,38 +0,0 @@
1
- # Agents Guide
2
-
3
- > **Purpose**: Each agent file contains mindset, approach, and behavioral patterns for a specific role.
4
- > **Location**: `.claude/agents/<agent-name>.md`
5
- > **When to load**: After identifying the primary role needed for the task.
6
-
7
- ---
8
-
9
- ## Available Agents
10
-
11
- | Trigger Keywords | Agent | Load File |
12
- |:---|:---|:---|
13
- | plan, architecture, system design, phase, roadmap | **Planner** | `.claude/agents/planner.md` |
14
- | code, implement, feature, logic, component | **Developer** | `.claude/agents/fullstack-developer.md` |
15
- | review, code quality, refactor, optimize code | **Reviewer** | `.claude/agents/code-reviewer.md` |
16
- | test, unit test, coverage, e2e, integration test | **Tester** | `.claude/agents/tester.md` |
17
- | bug, error, debug, log, trace, crash, exception | **Debugger** | `.claude/agents/debugger.md` |
18
- | find, search, scan, locate, where, which file | **Scout** | `.claude/agents/scout.md` |
19
- | external search, web, API docs, library docs | **Scout External** | `.claude/agents/scout-external.md` |
20
- | git, branch, commit, merge, conflict, PR | **Git Manager** | `.claude/agents/git-manager.md` |
21
- | database, SQL, schema, migration, query | **DB Admin** | `.claude/agents/database-admin.md` |
22
- | docs, documentation, README, changelog, notes | **Docs Manager** | `.claude/agents/docs-manager.md` |
23
- | UI, UX, interface, layout, wireframe | **UI/UX Designer** | `.claude/agents/ui-ux-designer.md` |
24
- | brainstorm, ideas, creative, suggestions | **Brainstormer** | `.claude/agents/brainstormer.md` |
25
- | content, copy, writing, marketing | **Copywriter** | `.claude/agents/copywriter.md` |
26
- | research, investigate, analyze, study | **Researcher** | `.claude/agents/researcher.md` |
27
- | MCP, tool, server, integration | **MCP Manager** | `.claude/agents/mcp-manager.md` |
28
- | project, task, deadline, management | **Project Manager** | `.claude/agents/project-manager.md` |
29
- | journal, diary, session log | **Journal Writer** | `.claude/agents/journal-writer.md` |
30
-
31
- ---
32
-
33
- ## Usage Rules
34
-
35
- 1. **Single agent for simple tasks**: Pick the most suitable one.
36
- 2. **Multiple agents for complex tasks**: Chain them sequentially (e.g., Planner → Developer → Tester).
37
- 3. **Load file to get mindset**: The agent file defines HOW to think and approach problems.
38
- 4. **Combine with Command**: Agent = WHO, Command = WHAT workflow to follow.