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,177 +0,0 @@
1
- # Fix GitHub Issue: $ARGUMENTS
2
-
3
- Fix a GitHub issue following the systematic debugging workflow based on the `bug-diagnosis` skill.
4
-
5
- **IMPORTANT**: Always use external memory at `ai_task_analysis_notes/issue-[number].ai_task_analysis_notes_temp.md` for structured analysis.
6
-
7
- ## IMPORTANT: Anti-Hallucination Protocols
8
-
9
- Before any operation:
10
-
11
- 1. "What assumptions am I making about this issue?"
12
- 2. "Have I verified this with actual code evidence?"
13
- 3. "Could I be wrong about the root cause?"
14
-
15
- ---
16
-
17
- ## Phase 1: Fetch Issue Details
18
-
19
- 1. **Get issue information:**
20
-
21
- ```bash
22
- gh issue view $ARGUMENTS
23
- ```
24
-
25
- 2. **Extract key information:**
26
- - Issue title and description
27
- - Labels (bug, feature, enhancement)
28
- - Related PRs or issues
29
- - Assignees and reviewers
30
- - Stack traces or error messages
31
-
32
- 3. **Create analysis notes** at `ai_task_analysis_notes/issue-[number].ai_task_analysis_notes_temp.md`
33
-
34
- ---
35
-
36
- ## Phase 2: Understand the Issue
37
-
38
- 1. **Analyze the issue:**
39
- - What is the expected behavior?
40
- - What is the actual behavior?
41
- - Are there reproduction steps?
42
- - Is there a stack trace or error message?
43
-
44
- 2. **Search codebase for relevant code:**
45
- - Use grep for error messages and keywords
46
- - Search patterns: `.*EventHandler.*{Entity}`, `.*Consumer.*{Entity}`, etc.
47
- - Find related entities/components
48
- - Map the affected code paths
49
-
50
- ---
51
-
52
- ## Phase 3: Evidence Gathering
53
-
54
- 1. **Multi-pattern search:**
55
- - Static imports and usages
56
- - String literals (runtime/config references)
57
- - Dynamic invocations (reflection, attributes)
58
-
59
- 2. **Trace dependency chains:**
60
- - Who calls this code?
61
- - Who depends on this code?
62
- - Cross-service message flows
63
-
64
- 3. **Read actual implementations** (not just interfaces)
65
-
66
- 4. **Document evidence** with file:line references
67
-
68
- ---
69
-
70
- ## Phase 4: Root Cause Analysis
71
-
72
- Analyze across dimensions:
73
-
74
- 1. **Technical**: Code defects, architectural issues
75
- 2. **Business Logic**: Rule violations, validation failures
76
- 3. **Data**: Corruption, integrity violations, race conditions
77
- 4. **Integration**: API contract violations, cross-service failures
78
- 5. **Environmental**: Configuration issues, deployment problems
79
-
80
- Document:
81
-
82
- - Potential root causes ranked by probability
83
- - Evidence with file:line references
84
- - Confidence level (High 90%+, Medium 70-89%, Low <70%)
85
-
86
- ---
87
-
88
- ## Phase 5: Propose Fix
89
-
90
- 1. **Design the fix:**
91
- - Minimal changes principle
92
- - Follow platform patterns from documentation
93
- - Consider edge cases
94
-
95
- 2. **Risk assessment:**
96
- - Impact level (Low/Medium/High)
97
- - Regression risk
98
- - Affected components
99
-
100
- 3. **Test plan:**
101
- - Unit tests to add
102
- - Manual testing steps
103
- - Regression considerations
104
-
105
- 4. **Rollback plan:**
106
- - How to revert if fix causes issues
107
-
108
- ---
109
-
110
- ## Phase 6: Wait for Approval
111
-
112
- **CRITICAL:** Present your analysis and proposed fix in this format:
113
-
114
- ```markdown
115
- ## Issue Analysis Complete - Approval Required
116
-
117
- ### Issue
118
-
119
- #[number] - [title]
120
-
121
- ### Root Cause Summary
122
-
123
- [Primary root cause with evidence at file:line]
124
-
125
- ### Proposed Fix
126
-
127
- [Fix description with specific files and changes]
128
-
129
- ### Risk Assessment
130
-
131
- - **Risk Level**: [Low/Medium/High]
132
- - **Regression Risk**: [assessment]
133
-
134
- ### Confidence Level: [X%]
135
-
136
- ### Files to Modify:
137
-
138
- 1. `path/to/file.cs:line` - [change description]
139
-
140
- **Awaiting approval to proceed with implementation.**
141
- ```
142
-
143
- **DO NOT** make any code changes without explicit user approval.
144
-
145
- ---
146
-
147
- ## Phase 7: Implement Fix
148
-
149
- After approval:
150
-
151
- 1. Make the code changes following platform patterns
152
- 2. Add/update tests
153
- 3. Verify fix works
154
- 4. Create PR with issue reference using `gh pr create`
155
-
156
- ---
157
-
158
- ## Quick Verification Checklist
159
-
160
- Before proposing any change:
161
-
162
- - [ ] Searched static imports?
163
- - [ ] Searched string literals?
164
- - [ ] Checked dynamic invocations?
165
- - [ ] Read actual implementations?
166
- - [ ] Traced dependencies?
167
- - [ ] Assessed what breaks?
168
- - [ ] Documented evidence?
169
- - [ ] Declared confidence?
170
-
171
- **If ANY unchecked → DO MORE INVESTIGATION**
172
- **If confidence < 90% → REQUEST USER CONFIRMATION**
173
-
174
- ---
175
-
176
- Use the `bug-diagnosis` skill for the complete debugging protocol.
177
- See `.github/AI-DEBUGGING-PROTOCOL.md` for comprehensive guidelines.
@@ -1,43 +0,0 @@
1
- ---
2
- description: ⚡⚡ Analyze and fix issues [INTELLIGENT ROUTING]
3
- argument-hint: [issues]
4
- ---
5
-
6
- **Analyze issues and route to specialized fix command:**
7
- <issues>$ARGUMENTS</issues>
8
-
9
- ## Decision Tree
10
-
11
- **1. Check for existing plan:**
12
- - If markdown plan exists → `/code <path-to-plan>`
13
-
14
- **2. Route by issue type:**
15
-
16
- **A) Type Errors** (keywords: type, typescript, tsc, type error)
17
- → `/fix:types`
18
-
19
- **B) UI/UX Issues** (keywords: ui, ux, design, layout, style, visual, button, component, css, responsive)
20
- → `/fix:ui <detailed-description>`
21
-
22
- **C) CI/CD Issues** (keywords: github actions, pipeline, ci/cd, workflow, deployment, build failed)
23
- → `/fix:ci <github-actions-url-or-description>`
24
-
25
- **D) Test Failures** (keywords: test, spec, jest, vitest, failing test, test suite)
26
- → `/fix:test <detailed-description>`
27
-
28
- **E) Log Analysis** (keywords: logs, error logs, log file, stack trace)
29
- → `/fix:logs <detailed-description>`
30
-
31
- **F) Multiple Independent Issues** (2+ unrelated issues in different areas)
32
- → `/fix:parallel <detailed-description>`
33
-
34
- **G) Complex Issues** (keywords: complex, architecture, refactor, major, system-wide, multiple components)
35
- → `/fix:hard <detailed-description>`
36
-
37
- **H) Simple/Quick Fixes** (default: small bug, single file, straightforward)
38
- → `/fix:fast <detailed-description>`
39
-
40
- ## Notes
41
- - `detailed-description` = enhanced prompt describing issue in detail
42
- - If unclear, ask user for clarification before routing
43
- - Can combine routes: e.g., multiple type errors + UI issue → `/fix:parallel`
@@ -1,67 +0,0 @@
1
- ---
2
- description: Generate entity DTO from an existing entity
3
- allowed-tools: Read, Write, Glob, Grep, TodoWrite
4
- ---
5
-
6
- Generate DTO for entity: $ARGUMENTS
7
-
8
- ## Instructions
9
-
10
- 1. **Parse arguments**:
11
- - Entity name (required): e.g., `Employee`, `TextSnippetText`
12
- - Options: `--with-mapping` (include MapToEntity), `--minimal` (core props only)
13
-
14
- 2. **Find the entity**:
15
- - Search in `*.Domain/Entities/` folders
16
- - Read the entity class to understand its properties
17
-
18
- 3. **Generate DTO following platform patterns**:
19
-
20
- Location: `*.Application/EntityDtos/<EntityName>Dto.cs`
21
-
22
- Template:
23
-
24
- ```csharp
25
- public class {Entity}Dto : PlatformEntityDto<{Entity}, string>
26
- {
27
- // Empty constructor required
28
- public {Entity}Dto() { }
29
-
30
- // Constructor maps from entity
31
- public {Entity}Dto({Entity} entity) : base(entity)
32
- {
33
- // Map core properties
34
- }
35
-
36
- // CORE PROPERTIES
37
- public string? Id { get; set; }
38
- // ... other properties from entity
39
-
40
- // OPTIONAL LOAD PROPERTIES (for With* methods)
41
- public RelatedDto? Related { get; set; }
42
-
43
- // WITH* FLUENT METHODS
44
- public {Entity}Dto WithRelated(RelatedEntity related)
45
- {
46
- Related = new RelatedDto(related);
47
- return this;
48
- }
49
-
50
- // PLATFORM OVERRIDES
51
- protected override object? GetSubmittedId() => Id;
52
- protected override string GenerateNewId() => Ulid.NewUlid().ToString();
53
- protected override {Entity} MapToEntity({Entity} entity, MapToEntityModes mode)
54
- {
55
- // Map DTO properties back to entity
56
- return entity;
57
- }
58
- }
59
- ```
60
-
61
- 4. **Read the template file** for complete pattern:
62
- - `.github/prompts/create-entity-dto.prompt.md`
63
-
64
- 5. **After generation**:
65
- - Show the generated DTO
66
- - Ask if any properties should be excluded or modified
67
- - Offer to create the file
@@ -1,5 +0,0 @@
1
- ---
2
- description: Stage all files and create a commit.
3
- ---
4
- Use `git-manager` agent to stage all files and create a commit.
5
- **IMPORTANT: DO NOT push the changes to remote repository**
@@ -1,4 +0,0 @@
1
- ---
2
- description: Stage, commit and push all code in the current branch
3
- ---
4
- Use `git-manager` agent to stage all files, create a meaningful commit based on the changes and push to remote repository.
@@ -1,40 +0,0 @@
1
- ---
2
- description: ⚠️ Merge code from one branch to another
3
- argument-hint: [branch] [from-branch]
4
- ---
5
-
6
- ## Variables
7
-
8
- TO_BRANCH: $1 (defaults to `main`)
9
- FROM_BRANCH: $2 (defaults to current branch)
10
-
11
- ## Workflow
12
-
13
- ### Step 1: Sync with remote (CRITICAL)
14
- ```bash
15
- git fetch origin
16
- git checkout {TO_BRANCH}
17
- git pull origin {TO_BRANCH}
18
- ```
19
-
20
- ### Step 2: Merge from REMOTE tracking branch
21
- ```bash
22
- # Use origin/{FROM_BRANCH} to merge remote state, not local WIP
23
- git merge origin/{FROM_BRANCH} --no-ff -m "merge: {FROM_BRANCH} into {TO_BRANCH}"
24
- ```
25
-
26
- **Why `origin/{FROM_BRANCH}`:** Ensures merging only committed+pushed changes, not local uncommitted work.
27
-
28
- ### Step 3: Resolve conflicts if any
29
- - If conflicts exist, resolve them manually
30
- - After resolution: `git add . && git commit`
31
-
32
- ### Step 4: Push merged result
33
- ```bash
34
- git push origin {TO_BRANCH}
35
- ```
36
-
37
- ## Notes
38
- - If `gh` command is not available, instruct the user to install and authorize GitHub CLI first.
39
- - If you need more clarifications, use `AskUserQuestion` tool to ask the user for more details.
40
- - Always fetch and pull latest remote state before merging to avoid stale conflicts.
@@ -1,48 +0,0 @@
1
- ---
2
- description: Create a pull request
3
- argument-hint: [branch] [from-branch]
4
- ---
5
-
6
- ## Variables
7
-
8
- TO_BRANCH: $1 (defaults to `main`)
9
- FROM_BRANCH: $2 (defaults to current branch)
10
-
11
- ## Workflow
12
-
13
- ### Step 1: Ensure remote is synced
14
- ```bash
15
- git fetch origin
16
- git push -u origin HEAD # Push current branch if not pushed
17
- ```
18
-
19
- ### Step 2: Analyze REMOTE diff (CRITICAL)
20
- **IMPORTANT:** Always compare REMOTE branches, not local:
21
- ```bash
22
- # Get commits between remote branches (what PR will actually contain)
23
- git log origin/{TO_BRANCH}...origin/{FROM_BRANCH} --oneline
24
-
25
- # Get file diff between remote branches
26
- git diff origin/{TO_BRANCH}...origin/{FROM_BRANCH} --stat
27
- git diff origin/{TO_BRANCH}...origin/{FROM_BRANCH}
28
- ```
29
-
30
- **DO NOT use:**
31
- - `git diff {TO_BRANCH}...HEAD` (includes unpushed local changes)
32
- - `git diff --cached` (staged local changes)
33
- - `git status` (local working tree state)
34
-
35
- ### Step 3: Generate PR content from remote diff
36
- Based on the REMOTE diff analysis:
37
- - **Title:** Conventional commit format from the primary change (no version/release numbers)
38
- - **Body:** Summary of changes that exist ON REMOTE, not local WIP
39
-
40
- ### Step 4: Create PR
41
- ```bash
42
- gh pr create --base {TO_BRANCH} --head {FROM_BRANCH} --title "..." --body "..."
43
- ```
44
-
45
- ## Notes
46
- - If `gh` command is not available, instruct the user to install and authorize GitHub CLI first.
47
- - If local has unpushed commits, push first before analyzing diff.
48
- - PR content must reflect REMOTE state since PRs are based on remote branches.
@@ -1,28 +0,0 @@
1
- ---
2
- description: ⚡⚡ Implement payment integration with Polar.sh
3
- argument-hint: [tasks]
4
- ---
5
-
6
- Think harder.
7
- Activate `payment-integration` skill.
8
- Plan & start implementing payment integration with [Polar.sh](https://polar.sh/docs/llms-full.txt) follow the Orchestration Protocol, Core Responsibilities, Subagents Team and Development Rules:
9
- <tasks>$ARGUMENTS</tasks>
10
-
11
- ---
12
-
13
- ## Role Responsibilities
14
- - You are an elite software engineering expert who specializes in system architecture design and technical decision-making.
15
- - You operate by the holy trinity of software engineering: **YAGNI** (You Aren't Gonna Need It), **KISS** (Keep It Simple, Stupid), and **DRY** (Don't Repeat Yourself). Every solution you propose must honor these principles.
16
- - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
17
- - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
18
-
19
- ---
20
-
21
- **IMPORTANT**: Analyze the list of skills at `.claude/skills/*` and intelligently activate the skills that are needed for the task during the process.
22
- **Ensure token efficiency while maintaining high quality.**
23
-
24
- ## Workflow:
25
-
26
- - **Scout**: Use `scout` subagent to find related resources, documents, and code snippets in the current codebase.
27
- - **Plan**: Trigger slash command `/plan:fast <detailed-instruction-prompt>` to create an implementation plan based on the reports from `scout` subagent.
28
- - **Implementation**: Trigger slash command `/code <plan>` to implement the plan.
@@ -1,28 +0,0 @@
1
- ---
2
- description: ⚡⚡ Implement payment integration with SePay.vn
3
- argument-hint: [tasks]
4
- ---
5
-
6
- Think harder.
7
- Activate `payment-integration` skill.
8
- Plan & start implementing payment integration with [https://developer.sepay.vn/vi](https://developer.sepay.vn/vi) follow the Orchestration Protocol, Core Responsibilities, Subagents Team and Development Rules:
9
- <tasks>$ARGUMENTS</tasks>
10
-
11
- ---
12
-
13
- ## Role Responsibilities
14
- - You are an elite software engineering expert who specializes in system architecture design and technical decision-making.
15
- - You operate by the holy trinity of software engineering: **YAGNI** (You Aren't Gonna Need It), **KISS** (Keep It Simple, Stupid), and **DRY** (Don't Repeat Yourself). Every solution you propose must honor these principles.
16
- - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
17
- - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
18
-
19
- ---
20
-
21
- **IMPORTANT**: Analyze the list of skills at `.claude/skills/*` and intelligently activate the skills that are needed for the task during the process.
22
- **Ensure token efficiency while maintaining high quality.**
23
-
24
- ## Workflow:
25
-
26
- - **Scout**: Use `scout` subagent to find related resources, documents, and code snippets in the current codebase.
27
- - **Plan**: Trigger slash command `/plan:fast <detailed-instruction-prompt>` to create an implementation plan based on the reports from `scout` subagent.
28
- - **Implementation**: Trigger slash command `/code <plan>` to implement the plan.