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,122 +0,0 @@
1
- # Commands Guide
2
-
3
- > **Purpose**: Each command file contains step-by-step workflow for a specific task type.
4
- > **Location**: `.claude/commands/<command>.md` or `.claude/commands/<category>/<variant>.md`
5
- > **When to load**: After selecting an Agent, to know the exact steps to execute.
6
-
7
- ---
8
-
9
- ## Main Commands
10
-
11
- | Trigger | Command | Load File |
12
- |:---|:---|:---|
13
- | code, write code, implement | `/code` | `.claude/commands/code.md` |
14
- | fix, fix bug, fix error | `/fix` | `.claude/commands/fix.md` |
15
- | test, run tests | `/test` | `.claude/commands/test.md` |
16
- | plan, make plan | `/plan` | `.claude/commands/plan.md` |
17
- | review, review code | `/review-changes` | `.claude/commands/review-changes.md` |
18
- | build, compile, package | `/build` | `.claude/commands/build.md` |
19
- | debug, investigate | `/debug` | `.claude/commands/debug.md` |
20
- | scout, search | `/scout` | `.claude/commands/scout.md` |
21
- | brainstorm | `/brainstorm` | `.claude/commands/brainstorm.md` |
22
-
23
- ---
24
-
25
- ## Sub-commands (Specialized Variants)
26
-
27
- ### Code Variants
28
- | Trigger | Load File |
29
- |:---|:---|
30
- | auto code, automatic | `.claude/commands/code/auto.md` |
31
- | code without tests | `.claude/commands/code/no-test.md` |
32
- | parallel coding | `.claude/commands/code/parallel.md` |
33
-
34
- ### Fix Variants
35
- | Trigger | Load File |
36
- |:---|:---|
37
- | quick fix | `.claude/commands/fix/fast.md` |
38
- | hard fix, complex bug | `.claude/commands/fix/hard.md` |
39
- | fix UI issue | `.claude/commands/fix/ui.md` |
40
- | fix failing tests | `.claude/commands/fix/test.md` |
41
- | fix type errors, typescript | `.claude/commands/fix/types.md` |
42
- | fix CI/CD | `.claude/commands/fix/ci.md` |
43
- | fix from logs | `.claude/commands/fix/logs.md` |
44
- | parallel fixing | `.claude/commands/fix/parallel.md` |
45
-
46
- ### Plan Variants
47
- | Trigger | Load File |
48
- |:---|:---|
49
- | quick plan | `.claude/commands/plan/fast.md` |
50
- | complex plan | `.claude/commands/plan/hard.md` |
51
- | parallel planning | `.claude/commands/plan/parallel.md` |
52
- | two-phase plan | `.claude/commands/plan/two.md` |
53
- | validate plan | `.claude/commands/plan/validate.md` |
54
- | archive plan | `.claude/commands/plan/archive.md` |
55
- | CRO plan | `.claude/commands/plan/cro.md` |
56
-
57
- ### Git Commands
58
- | Trigger | Load File |
59
- |:---|:---|
60
- | commit | `.claude/commands/git/cm.md` |
61
- | cherry-pick | `.claude/commands/git/cp.md` |
62
- | merge | `.claude/commands/git/merge.md` |
63
- | PR, pull request | `.claude/commands/git/pr.md` |
64
-
65
- ### Docs Commands
66
- | Trigger | Load File |
67
- |:---|:---|
68
- | init docs | `.claude/commands/docs/init.md` |
69
- | update docs | `.claude/commands/docs/update.md` |
70
- | summarize docs | `.claude/commands/docs/summarize.md` |
71
-
72
- ### Design Commands
73
- | Trigger | Load File |
74
- |:---|:---|
75
- | quick design | `.claude/commands/design/fast.md` |
76
- | good design | `.claude/commands/design/good.md` |
77
- | design from screenshot | `.claude/commands/design/screenshot.md` |
78
- | design from video | `.claude/commands/design/video.md` |
79
- | 3D design | `.claude/commands/design/3d.md` |
80
- | describe design | `.claude/commands/design/describe.md` |
81
-
82
- ### Review Commands
83
- | Trigger | Load File |
84
- |:---|:---|
85
- | review codebase | `.claude/commands/review/codebase.md` |
86
- | post-task review | `.claude/commands/review/post-task.md` |
87
-
88
- ### Skill Management
89
- | Trigger | Load File |
90
- |:---|:---|
91
- | add skill | `.claude/commands/skill/add.md` |
92
- | create skill | `.claude/commands/skill/create.md` |
93
- | plan skill | `.claude/commands/skill/plan.md` |
94
- | optimize skill | `.claude/commands/skill/optimize.md` |
95
-
96
- ### Other Commands
97
- | Trigger | Load File |
98
- |:---|:---|
99
- | bootstrap project | `.claude/commands/bootstrap.md` |
100
- | create feature | `.claude/commands/create-feature.md` |
101
- | db migrate | `.claude/commands/db-migrate.md` |
102
- | generate DTO | `.claude/commands/generate-dto.md` |
103
- | lint | `.claude/commands/lint.md` |
104
- | kanban | `.claude/commands/kanban.md` |
105
- | preview | `.claude/commands/preview.md` |
106
- | worktree | `.claude/commands/worktree.md` |
107
- | use MCP | `.claude/commands/use-mcp.md` |
108
- | cook (recipe) | `.claude/commands/cook.md` |
109
- | journal | `.claude/commands/journal.md` |
110
- | watzup (status) | `.claude/commands/watzup.md` |
111
- | coding level | `.claude/commands/coding-level.md` |
112
- | ask (Q&A) | `.claude/commands/ask.md` |
113
- | scout external | `.claude/commands/scout/ext.md` |
114
- | test UI | `.claude/commands/test/ui.md` |
115
-
116
- ---
117
-
118
- ## Usage Rules
119
-
120
- 1. **Prefer specific over generic**: Use `/fix/ui` instead of `/fix` when fixing UI bugs.
121
- 2. **Command = Workflow**: The file contains exact steps to follow.
122
- 3. **Combine with Agent**: Agent defines mindset, Command defines process.
@@ -1,92 +0,0 @@
1
- # Decision Flow - How AI Routes Requests
2
-
3
- ## Request Processing Pipeline
4
-
5
- ```
6
- User Request
7
-
8
-
9
- ┌─────────────────────────────────────────────────────────┐
10
- │ STEP 1: Analyze Request │
11
- │ - Identify WORK TYPE (code/fix/test/plan/review...) │
12
- │ - Identify DOMAIN (frontend/backend/database/devops...) │
13
- │ - Identify COMPLEXITY (simple/complex/multi-step) │
14
- └─────────────────────────────────────────────────────────┘
15
-
16
-
17
- ┌─────────────────────────────────────────────────────────┐
18
- │ STEP 2: Select Agent (PRIMARY ROLE) │
19
- │ - Simple task: Pick 1 most suitable Agent │
20
- │ - Complex task: May need multiple Agents coordination │
21
- │ → Load file `.claude/agents/<agent-name>.md` for mindset│
22
- │ → See: .claude/router/agents-guide.md │
23
- └─────────────────────────────────────────────────────────┘
24
-
25
-
26
- ┌─────────────────────────────────────────────────────────┐
27
- │ STEP 3: Select Command (WORKFLOW) │
28
- │ - Identify main command (code/fix/test/plan...) │
29
- │ - If more specific variant exists, use sub-command │
30
- │ → Load file `.claude/commands/<command>.md` for steps │
31
- │ → See: .claude/router/commands-guide.md │
32
- └─────────────────────────────────────────────────────────┘
33
-
34
-
35
- ┌─────────────────────────────────────────────────────────┐
36
- │ STEP 4: Load Skill (EXPERT KNOWLEDGE) - IF NEEDED │
37
- │ - Scan keywords in request │
38
- │ - Only load when deep expertise is required │
39
- │ → Load file `.claude/skills/<skill>/SKILL.md` │
40
- │ → See: .claude/router/skills-guide.md │
41
- └─────────────────────────────────────────────────────────┘
42
-
43
-
44
- ┌─────────────────────────────────────────────────────────┐
45
- │ STEP 5: Apply Workflow (IF large/complex task) │
46
- │ - New feature → primary-workflow.md │
47
- │ - Multi-agent → orchestration-protocol.md │
48
- │ → Load file `.claude/workflows/<workflow>.md` │
49
- │ → See: .claude/router/workflows-guide.md │
50
- └─────────────────────────────────────────────────────────┘
51
-
52
-
53
- EXECUTE
54
- ```
55
-
56
- ---
57
-
58
- ## Quick Decision Matrix
59
-
60
- | Situation | Agent | Command | Skill | Workflow |
61
- |:---|:---|:---|:---|:---|
62
- | Small bug, clear cause | Debugger | `/fix/fast` | ❌ | ❌ |
63
- | Hard bug, needs investigation | Debugger | `/fix/hard` | `debugging/` | ❌ |
64
- | New feature code | Developer | `/code` | By domain | `primary-workflow` |
65
- | Create unit tests | Tester | `/test` | `test-generation/` | ❌ |
66
- | Code review before merge | Reviewer | `/review-changes` | `code-review/` | ❌ |
67
- | Plan large task | Planner | `/plan` | `planning/` | ❌ |
68
- | Find file/function in repo | Scout | `/scout` | ❌ | ❌ |
69
- | Create PR with proper message | Git Manager | `/git/pr` | ❌ | ❌ |
70
- | Design UI from screenshot | UI/UX Designer | `/design/screenshot` | `frontend-design/` | ❌ |
71
- | Complex multi-step task | Planner → Developer → Tester | `/plan` → `/code` → `/test` | Multiple | `primary-workflow` |
72
-
73
- ---
74
-
75
- ## Selection Principles
76
-
77
- 1. **Agent**: Always pick 1 primary agent. Only coordinate multiple agents when truly needed.
78
- 2. **Command**: Prefer specific sub-command over generic command (e.g., `/fix/ui` over `/fix`).
79
- 3. **Skill**: Only load when deep expertise is required. Skip for simple tasks.
80
- 4. **Workflow**: Only use for large, multi-step tasks requiring orchestration.
81
-
82
- ---
83
-
84
- ## Example Routing
85
-
86
- | User Request | → Agent | → Command | → Skill | → Workflow |
87
- |:---|:---|:---|:---|:---|
88
- | "Fix UI bug" | `.claude/agents/debugger.md` | `.claude/commands/fix/ui.md` | ❌ | ❌ |
89
- | "Write tests for feature X" | `.claude/agents/tester.md` | `.claude/commands/test.md` | `.claude/skills/test-generation/` | ❌ |
90
- | "Create PR" | `.claude/agents/git-manager.md` | `.claude/commands/git/pr.md` | ❌ | ❌ |
91
- | "Optimize performance" | `.claude/agents/developer.md` | `.claude/commands/code.md` | `.claude/skills/arch-performance-optimization/` | ❌ |
92
- | "Plan microservice architecture" | `.claude/agents/planner.md` | `.claude/commands/plan.md` | `.claude/skills/arch-cross-service-integration/` | `.claude/workflows/primary-workflow` |
@@ -1,127 +0,0 @@
1
- # Skills Guide
2
-
3
- > **Purpose**: Skills provide deep expert knowledge for specific domains/technologies.
4
- > **Location**: `.claude/skills/<skill-name>/SKILL.md`
5
- > **When to load**: Only when task requires specialized expertise. Skip for simple tasks.
6
-
7
- ---
8
-
9
- ## Loading Rules
10
-
11
- 1. **Scan keywords** in user request
12
- 2. **Only load when needed**: Simple tasks don't need skills
13
- 3. **Minimum set**: If multiple skills match, choose the smallest set that covers the request
14
- 4. **Ask if ambiguous**: If unsure which skill, ask 1 clarifying question
15
-
16
- ---
17
-
18
- ## Available Skills by Domain
19
-
20
- ### Project Navigation
21
- | Trigger Keywords | Skill Folder |
22
- |:---|:---|
23
- | Project structure, index, tree, folder layout | `.claude/skills/project-index/` |
24
-
25
- ### Frontend & UI
26
- | Trigger Keywords | Skill Folder |
27
- |:---|:---|
28
- | CSS, Tailwind, styling | `.claude/skills/ui-styling/` |
29
- | UI/UX advanced | `.claude/skills/ui-ux-pro-max/` |
30
- | Angular component | `.claude/skills/frontend-angular-component/` |
31
- | Angular form | `.claude/skills/frontend-angular-form/` |
32
- | Angular store | `.claude/skills/frontend-angular-store/` |
33
- | Angular API service | `.claude/skills/frontend-angular-api-service/` |
34
- | Frontend design | `.claude/skills/frontend-design/`, `.claude/skills/frontend-design-pro/` |
35
- | Frontend development | `.claude/skills/frontend-development/` |
36
- | Three.js, 3D | `.claude/skills/threejs/` |
37
-
38
- ### Backend & Database
39
- | Trigger Keywords | Skill Folder |
40
- |:---|:---|
41
- | Backend, API | `.claude/skills/backend-development/` |
42
- | Database, SQL, query | `.claude/skills/databases/` |
43
- | EasyPlatform backend | `.claude/skills/easyplatform-backend/` |
44
-
45
- ### Testing & Debugging
46
- | Trigger Keywords | Skill Folder |
47
- |:---|:---|
48
- | Test generation | `.claude/skills/test-generation/` |
49
- | Webapp testing | `.claude/skills/webapp-testing/` |
50
- | Bug diagnosis | `.claude/skills/bug-diagnosis/` |
51
- | Debugging | `.claude/skills/debugging/` |
52
- | Chrome DevTools | `.claude/skills/chrome-devtools/` |
53
-
54
- ### Architecture & Performance
55
- | Trigger Keywords | Skill Folder |
56
- |:---|:---|
57
- | Cross-service, microservice | `.claude/skills/arch-cross-service-integration/` |
58
- | Performance optimization | `.claude/skills/arch-performance-optimization/` |
59
- | Security review | `.claude/skills/arch-security-review/` |
60
-
61
- ### Documentation & Planning
62
- | Trigger Keywords | Skill Folder |
63
- |:---|:---|
64
- | Documentation | `.claude/skills/documentation/` |
65
- | Feature docs | `.claude/skills/feature-docs/` |
66
- | README improvement | `.claude/skills/readme-improvement/` |
67
- | Planning | `.claude/skills/planning/` |
68
- | Plan analysis | `.claude/skills/plan-analysis/` |
69
- | Plans kanban | `.claude/skills/plans-kanban/` |
70
-
71
- ### AI & Media
72
- | Trigger Keywords | Skill Folder |
73
- |:---|:---|
74
- | AI multimodal, image, vision | `.claude/skills/ai-multimodal/` |
75
- | AI artist | `.claude/skills/ai-artist/` |
76
- | Media processing | `.claude/skills/media-processing/` |
77
-
78
- ### DevOps & Tools
79
- | Trigger Keywords | Skill Folder |
80
- |:---|:---|
81
- | DevOps, CI/CD | `.claude/skills/devops/` |
82
- | MCP builder | `.claude/skills/mcp-builder/` |
83
- | MCP management | `.claude/skills/mcp-management/` |
84
- | Repomix | `.claude/skills/repomix/` |
85
- | Package upgrade | `.claude/skills/package-upgrade/` |
86
-
87
- ### Code Quality
88
- | Trigger Keywords | Skill Folder |
89
- |:---|:---|
90
- | Code review | `.claude/skills/code-review/` |
91
- | Dual pass review | `.claude/skills/dual-pass-review/` |
92
- | Tasks code review | `.claude/skills/tasks-code-review/` |
93
-
94
- ### Research & Problem Solving
95
- | Trigger Keywords | Skill Folder |
96
- |:---|:---|
97
- | Research | `.claude/skills/research/` |
98
- | Problem solving | `.claude/skills/problem-solving/` |
99
- | Sequential thinking | `.claude/skills/sequential-thinking/` |
100
- | Feature investigation | `.claude/skills/feature-investigation/` |
101
- | Feature implementation | `.claude/skills/feature-implementation/` |
102
-
103
- ### Specialized
104
- | Trigger Keywords | Skill Folder |
105
- |:---|:---|
106
- | Better Auth | `.claude/skills/better-auth/` |
107
- | Shopify | `.claude/skills/shopify/` |
108
- | Payment integration | `.claude/skills/payment-integration/` |
109
- | Mobile development | `.claude/skills/mobile-development/` |
110
- | Web frameworks | `.claude/skills/web-frameworks/` |
111
- | Google ADK Python | `.claude/skills/google-adk-python/` |
112
- | Claude Code | `.claude/skills/claude-code/` |
113
- | Domain brainstormer | `.claude/skills/domain-name-brainstormer/` |
114
- | Branch comparison | `.claude/skills/branch-comparison/` |
115
- | Developer growth | `.claude/skills/developer-growth-analysis/` |
116
- | Docs seeker | `.claude/skills/docs-seeker/` |
117
- | Markdown novel viewer | `.claude/skills/markdown-novel-viewer/` |
118
- | Skill creator | `.claude/skills/skill-creator/` |
119
-
120
- ---
121
-
122
- ## Usage Rules
123
-
124
- 1. **Skills = Expert knowledge**: Load to get deep domain expertise.
125
- 2. **Not always needed**: Simple code/fix tasks often don't need skills.
126
- 3. **Read SKILL.md first**: It contains the main knowledge and may reference other files.
127
- 4. **Combine with Agent + Command**: Skill enhances capability, doesn't replace workflow.
@@ -1,68 +0,0 @@
1
- # Workflows Guide
2
-
3
- > **Purpose**: Workflows define orchestration patterns for large, multi-step tasks.
4
- > **Location**: `.claude/workflows/<workflow-name>.md`
5
- > **When to load**: Only for complex tasks requiring multiple agents or phases.
6
-
7
- ---
8
-
9
- ## Available Workflows
10
-
11
- | Trigger | Workflow | Load File | Use Case |
12
- |:---|:---|:---|:---|
13
- | New feature, large task | **Primary Workflow** | `.claude/workflows/primary-workflow.md` | Full feature development cycle |
14
- | Multi-agent coordination | **Orchestration Protocol** | `.claude/workflows/orchestration-protocol.md` | Sequential/parallel agent chains |
15
- | Dev rules, conventions | **Development Rules** | `.claude/workflows/development-rules.md` | Coding standards reference |
16
- | Documentation management | **Doc Management** | `.claude/workflows/documentation-management.md` | Docs lifecycle |
17
-
18
- ---
19
-
20
- ## When to Use Workflows
21
-
22
- ### Use Primary Workflow when:
23
- - Building a new feature from scratch
24
- - Task has multiple phases (plan → code → test → review)
25
- - Need to coordinate between planning, implementation, and testing
26
-
27
- ### Use Orchestration Protocol when:
28
- - Multiple agents need to work together
29
- - Tasks can be parallelized
30
- - Need sequential handoff between agents
31
-
32
- ### Skip Workflows when:
33
- - Simple bug fix
34
- - Single-file change
35
- - Quick question/answer
36
- - Small refactor
37
-
38
- ---
39
-
40
- ## Workflow Patterns
41
-
42
- ### Sequential Chaining
43
- ```
44
- Planner → Developer → Tester → Reviewer
45
- ```
46
- - Each agent completes before next begins
47
- - Pass context between agents
48
- - Use for dependent tasks
49
-
50
- ### Parallel Execution
51
- ```
52
- ┌─ Developer (Feature A)
53
-
54
- ├─ Developer (Feature B)
55
-
56
- └─ Tester (Write tests)
57
- ```
58
- - Independent tasks run simultaneously
59
- - No file conflicts allowed
60
- - Plan merge strategy first
61
-
62
- ---
63
-
64
- ## Usage Rules
65
-
66
- 1. **Workflows = Orchestration**: For coordinating complex multi-step work.
67
- 2. **Not for simple tasks**: Skip if task is straightforward.
68
- 3. **Combine all layers**: Workflow coordinates Agents, who follow Commands, enhanced by Skills.
@@ -1,241 +0,0 @@
1
- # 🔄 Workflows - Quy Trình Phối Hợp Nhiều Bước
2
-
3
- ## Workflows là gì?
4
-
5
- **Workflows** là các "kịch bản phối hợp" cho những công việc lớn, phức tạp, cần nhiều bước và nhiều vai trò khác nhau. Giống như đạo diễn một bộ phim - cần kịch bản chi tiết ai làm gì, khi nào, theo thứ tự nào.
6
-
7
- **Khi nào cần Workflow:**
8
- - Tính năng mới lớn (cần plan → code → test → review → docs)
9
- - Nhiều người/vai trò phối hợp
10
- - Công việc kéo dài nhiều ngày/tuần
11
- - Cần checkpoints kiểm tra chất lượng
12
-
13
- ---
14
-
15
- ## Danh Sách Workflows
16
-
17
- | Workflow | Dùng Khi Nào | Mô Tả |
18
- |----------|--------------|-------|
19
- | **primary-workflow.md** | Làm tính năng mới | Quy trình chuẩn từ plan đến hoàn thành |
20
- | **orchestration-protocol.md** | Phối hợp nhiều agents | Cách chuyển giao công việc giữa các vai trò |
21
- | **development-rules.md** | Quy tắc phát triển | Các nguyên tắc bắt buộc khi code |
22
- | **documentation-management.md** | Quản lý tài liệu | Quy trình cập nhật docs |
23
-
24
- ---
25
-
26
- ## Chi Tiết Từng Workflow
27
-
28
- ### 1. primary-workflow.md - Quy Trình Làm Tính Năng
29
-
30
- **Dùng khi:** Xây dựng tính năng mới từ đầu đến cuối
31
-
32
- **Các giai đoạn:**
33
-
34
- ```
35
- GIAI ĐOẠN 1: LẬP KẾ HOẠCH
36
- ├── Phân tích yêu cầu
37
- ├── Thiết kế giải pháp
38
- ├── Ước lượng thời gian
39
- └── Xác định rủi ro
40
-
41
- ↓ Checkpoint: Kế hoạch được duyệt
42
-
43
- GIAI ĐOẠN 2: IMPLEMENT
44
- ├── Viết code theo kế hoạch
45
- ├── Tự review code
46
- ├── Viết unit tests
47
- └── Fix bugs phát sinh
48
-
49
- ↓ Checkpoint: Code pass tests
50
-
51
- GIAI ĐOẠN 3: KIỂM THỬ
52
- ├── Chạy toàn bộ tests
53
- ├── Test integration
54
- ├── Test edge cases
55
- └── Fix issues
56
-
57
- ↓ Checkpoint: Tất cả tests pass
58
-
59
- GIAI ĐOẠN 4: REVIEW
60
- ├── Code review
61
- ├── Security review
62
- ├── Performance check
63
- └── Fix feedback
64
-
65
- ↓ Checkpoint: Review approved
66
-
67
- GIAI ĐOẠN 5: HOÀN THÀNH
68
- ├── Cập nhật docs
69
- ├── Update changelog
70
- ├── Merge code
71
- └── Deploy (nếu cần)
72
- ```
73
-
74
- ---
75
-
76
- ### 2. orchestration-protocol.md - Quy Trình Phối Hợp
77
-
78
- **Dùng khi:** Cần nhiều "chuyên gia" (agents) làm việc cùng nhau
79
-
80
- **Nguyên tắc chuyển giao:**
81
-
82
- ```
83
- Agent A hoàn thành
84
-
85
- ┌──────────────────────────┐
86
- │ CHUYỂN GIAO │
87
- │ • Tóm tắt đã làm gì │
88
- │ • Còn gì cần làm │
89
- │ • Files đã thay đổi │
90
- │ • Vấn đề cần lưu ý │
91
- └──────────────────────────┘
92
-
93
- Agent B tiếp nhận
94
- ```
95
-
96
- **Ví dụ phối hợp:**
97
-
98
- | Thứ tự | Agent | Làm gì | Chuyển cho |
99
- |--------|-------|--------|------------|
100
- | 1 | Planner | Lập kế hoạch | Developer |
101
- | 2 | Developer | Viết code | Tester |
102
- | 3 | Tester | Viết tests | Reviewer |
103
- | 4 | Reviewer | Review code | Docs Manager |
104
- | 5 | Docs Manager | Viết docs | (Hoàn thành) |
105
-
106
- ---
107
-
108
- ### 3. development-rules.md - Quy Tắc Phát Triển
109
-
110
- **Dùng khi:** Luôn áp dụng khi viết code
111
-
112
- **Các quy tắc chính:**
113
-
114
- | Quy tắc | Ý nghĩa |
115
- |---------|---------|
116
- | **Minimal changes** | Chỉ sửa những gì cần thiết, không sửa thừa |
117
- | **Reuse before write** | Dùng code có sẵn trước, không viết lại |
118
- | **Test required** | Code mới phải có test |
119
- | **No magic numbers** | Không dùng số trực tiếp, dùng constants |
120
- | **Clear naming** | Đặt tên rõ ràng, dễ hiểu |
121
- | **File < 300 lines** | File quá dài thì phải tách |
122
-
123
- ---
124
-
125
- ### 4. documentation-management.md - Quản Lý Tài Liệu
126
-
127
- **Dùng khi:** Cần cập nhật tài liệu dự án
128
-
129
- **Quy trình cập nhật:**
130
-
131
- ```
132
- SAU KHI HOÀN THÀNH CÔNG VIỆC
133
-
134
- ┌─────────────────────────────────┐
135
- │ Kiểm tra cần update docs nào? │
136
- │ □ README.md (nếu thay đổi lớn) │
137
- │ □ CHANGELOG.md (mọi thay đổi) │
138
- │ □ docs/structure.md (cấu trúc) │
139
- │ □ API docs (nếu thay đổi API) │
140
- └─────────────────────────────────┘
141
-
142
- Cập nhật các file cần thiết
143
-
144
- Review và commit
145
- ```
146
-
147
- ---
148
-
149
- ## Ví Dụ Thực Tế
150
-
151
- ### Ví dụ: Thêm Tính Năng "Gửi Email Thông Báo"
152
-
153
- **Bước 1: Load workflow**
154
- ```
155
- AI load: primary-workflow.md
156
- ```
157
-
158
- **Bước 2: Giai đoạn Planning**
159
- ```
160
- Planner agent làm việc:
161
- - Phân tích: Cần gửi email khi nào?
162
- - Thiết kế: Dùng service nào? (SendGrid, SES?)
163
- - Ước lượng: ~2 ngày
164
- - Rủi ro: Rate limiting, spam filter
165
-
166
- → Output: Kế hoạch chi tiết
167
- ```
168
-
169
- **Bước 3: Giai đoạn Implement**
170
- ```
171
- Developer agent làm việc:
172
- - Tạo EmailService class
173
- - Implement sendNotification()
174
- - Viết unit tests
175
- - Tích hợp vào notification flow
176
-
177
- → Output: Code hoàn chỉnh + tests
178
- ```
179
-
180
- **Bước 4: Giai đoạn Test**
181
- ```
182
- Tester agent làm việc:
183
- - Chạy unit tests
184
- - Test gửi email thật (sandbox)
185
- - Test edge cases (email invalid, service down)
186
-
187
- → Output: Test report
188
- ```
189
-
190
- **Bước 5: Giai đoạn Review**
191
- ```
192
- Reviewer agent làm việc:
193
- - Review code quality
194
- - Check security (no hardcoded credentials)
195
- - Check performance
196
-
197
- → Output: Approval hoặc feedback
198
- ```
199
-
200
- **Bước 6: Giai đoạn Docs**
201
- ```
202
- Docs Manager agent làm việc:
203
- - Update README (new feature)
204
- - Update CHANGELOG
205
- - Add API documentation
206
-
207
- → Output: Docs updated
208
- ```
209
-
210
- ---
211
-
212
- ## Khi Nào Cần Workflow?
213
-
214
- | Tình huống | Cần workflow? |
215
- |------------|---------------|
216
- | Sửa typo | ❌ Không |
217
- | Thêm button đơn giản | ❌ Không |
218
- | Thêm tính năng lớn | ✅ primary-workflow |
219
- | Refactor hệ thống | ✅ primary-workflow |
220
- | Nhiều người cùng làm | ✅ orchestration-protocol |
221
- | Cần docs chuẩn | ✅ documentation-management |
222
-
223
- ---
224
-
225
- ## Tóm Tắt
226
-
227
- | Khái niệm | Giải thích |
228
- |-----------|------------|
229
- | **Workflow là gì** | Kịch bản phối hợp cho công việc lớn |
230
- | **Có bao nhiêu** | 4 workflows chính |
231
- | **Khi nào dùng** | Công việc lớn, nhiều bước, nhiều vai trò |
232
- | **Ai quyết định** | AI tự động khi nhận diện công việc phức tạp |
233
-
234
- ---
235
-
236
- ## Xem Thêm
237
-
238
- - [Danh sách Agents (Vai trò)](../agents/README.md)
239
- - [Danh sách Commands (Quy trình)](../commands/README.md)
240
- - [Danh sách Skills (Kiến thức)](../skills/README.md)
241
- - [Router (Bộ định tuyến)](../router/README.md)
@@ -1,16 +0,0 @@
1
- # Orchestration Protocol
2
-
3
- #### Sequential Chaining
4
- Chain subagents when tasks have dependencies or require outputs from previous steps:
5
- - **Planning → Implementation → Testing → Review**: Use for feature development
6
- - **Research → Design → Code → Documentation**: Use for new system components
7
- - Each agent completes fully before the next begins
8
- - Pass context and outputs between agents in the chain
9
-
10
- #### Parallel Execution
11
- Spawn multiple subagents simultaneously for independent tasks:
12
- - **Code + Tests + Docs**: When implementing separate, non-conflicting components
13
- - **Multiple Feature Branches**: Different agents working on isolated features
14
- - **Cross-platform Development**: iOS and Android specific implementations
15
- - **Careful Coordination**: Ensure no file conflicts or shared resource contention
16
- - **Merge Strategy**: Plan integration points before parallel execution begins
File without changes