@haposoft/cafekit 0.3.6 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haposoft/cafekit",
3
- "version": "0.3.6",
3
+ "version": "0.3.11",
4
4
  "description": "Spec-Driven Development workflow for AI coding assistants. Supports Claude Code and Antigravity with spec-first and code-test-review workflows.",
5
5
  "author": "Haposoft <nghialt@haposoft.com>",
6
6
  "license": "MIT",
@@ -37,4 +37,4 @@
37
37
  "engines": {
38
38
  "node": ">=18.0.0"
39
39
  }
40
- }
40
+ }
@@ -1,12 +1,12 @@
1
1
  ---
2
- description: Phân tích tác động của code changes lên tính năng hành động người dùng
2
+ description: Analyze code change impacts on features and user actions
3
3
  allowed-tools: Read, Glob, Grep, Bash, WebSearch
4
4
  argument-hint: <feature-name> [--from <branch>]
5
5
  ---
6
6
 
7
- # /impact-analysis - Phân Tích Tác Động Tính Năng
7
+ # /impact-analysis - Feature Impact Analysis
8
8
 
9
- Sử dụng workflow này sau khi hoàn thành feature (sau `/code`) hoặc trước khi commit.
9
+ Use this workflow after completing a feature (after `/code`) or before committing.
10
10
 
11
11
  <background_information>
12
12
  - **Mission**: Comprehensive impact analysis for completed features to prevent regression bugs
@@ -16,8 +16,8 @@ Sử dụng workflow này sau khi hoàn thành feature (sau `/code`) hoặc trư
16
16
  - Test scenarios generated for all critical paths
17
17
  - Regression risks assessed with mitigation recommendations
18
18
  - Cross-referenced with spec artifacts when available
19
- - **Timing**: After implementing all tasks for a feature, before running `/test`
20
- - **Helper Scripts**: Optionally use advanced analysis scripts from `.claude/skills/impact-analysis/scripts/` for automated dependency analysis, AST-based semantic analysis, and risk scoring
19
+ - **Timing**: After implementing all tasks for a feature, before running tests
20
+ - **Helper Scripts**: Optionally use advanced analysis scripts from `.agent/skills/impact-analysis/scripts/` for automated dependency analysis, AST-based semantic analysis, and risk scoring
21
21
  </background_information>
22
22
 
23
23
  <instructions>
@@ -26,11 +26,11 @@ Analyze the impact of code changes for feature **$ARGUMENTS** to identify affect
26
26
 
27
27
  ## Helper Scripts (Optional Enhancement)
28
28
 
29
- If available in `.claude/skills/impact-analysis/scripts/`, these scripts provide advanced automated analysis:
29
+ If available in `.agent/skills/impact-analysis/scripts/`, these scripts provide advanced automated analysis:
30
30
 
31
31
  **1. Dependency Analysis**:
32
32
  ```bash
33
- .claude/skills/impact-analysis/scripts/find-dependencies.sh <file>
33
+ .agent/skills/impact-analysis/scripts/find-dependencies.sh <file>
34
34
  ```
35
35
  - Finds all files importing/using the changed file
36
36
  - Identifies API consumers and component usage
@@ -38,7 +38,7 @@ If available in `.claude/skills/impact-analysis/scripts/`, these scripts provide
38
38
 
39
39
  **2. AST-Based Analysis** (for TypeScript/JavaScript):
40
40
  ```bash
41
- node .claude/skills/impact-analysis/scripts/ast-analyze.js <file>
41
+ node .agent/skills/impact-analysis/scripts/ast-analyze.js <file>
42
42
  ```
43
43
  - Detects function signature changes
44
44
  - Identifies breaking changes
@@ -46,7 +46,7 @@ node .claude/skills/impact-analysis/scripts/ast-analyze.js <file>
46
46
 
47
47
  **3. Risk Calculation**:
48
48
  ```bash
49
- node .claude/skills/impact-analysis/scripts/calculate-risk.js
49
+ node .agent/skills/impact-analysis/scripts/calculate-risk.js
50
50
  ```
51
51
  - Calculates risk score (0-25)
52
52
  - Determines risk level (CRITICAL/HIGH/MEDIUM/LOW)
@@ -54,7 +54,7 @@ node .claude/skills/impact-analysis/scripts/calculate-risk.js
54
54
 
55
55
  **4. Complete Analysis**:
56
56
  ```bash
57
- .claude/skills/impact-analysis/scripts/run-analysis.sh
57
+ .agent/skills/impact-analysis/scripts/run-analysis.sh
58
58
  ```
59
59
  - Runs all techniques
60
60
  - Generates comprehensive markdown report
@@ -160,8 +160,7 @@ Scan file contents for keywords to detect additional features:
160
160
 
161
161
  If helper script available, run comprehensive analysis:
162
162
  ```bash
163
- # Run dependency analysis script for each changed file
164
- .claude/skills/impact-analysis/scripts/find-dependencies.sh <file>
163
+ .agent/skills/impact-analysis/scripts/find-dependencies.sh <file>
165
164
  ```
166
165
 
167
166
  **Manual Dependency Analysis** (fallback):
@@ -200,11 +199,8 @@ For each changed file, find:
200
199
 
201
200
  **Option 1: Use Helper Scripts** (if available):
202
201
  ```bash
203
- # Run AST analysis for TypeScript/JavaScript files
204
- node .claude/skills/impact-analysis/scripts/ast-analyze.js <file>
205
-
206
- # Run risk calculation
207
- node .claude/skills/impact-analysis/scripts/calculate-risk.js
202
+ node .agent/skills/impact-analysis/scripts/ast-analyze.js <file>
203
+ node .agent/skills/impact-analysis/scripts/calculate-risk.js
208
204
  ```
209
205
 
210
206
  **Option 2: Manual Detection** (fallback):
@@ -328,8 +324,7 @@ For each affected feature and user action, generate:
328
324
  **Automated Risk Assessment** (if helper script available):
329
325
 
330
326
  ```bash
331
- # Run comprehensive risk calculation
332
- node .claude/skills/impact-analysis/scripts/calculate-risk.js
327
+ node .agent/skills/impact-analysis/scripts/calculate-risk.js
333
328
 
334
329
  # Output includes:
335
330
  # - Risk score (0-25)
@@ -1,44 +1,44 @@
1
1
  ---
2
2
  name: impact-analysis
3
- description: "Phân tích tác động code changes và tạo test scenarios. Sử dụng sau khi sửa code, trước commit, hoặc khi cần kiểm tra regression. Tự động phát hiện affected files, dependencies, edge cases."
3
+ description: "Analyze code change impacts and generate test scenarios. Use after code changes, before commit, or when checking for regressions. Automatically detects affected files, dependencies, and edge cases."
4
4
  argument-hint: "[files] OR auto"
5
5
  version: 1.0.0
6
6
  ---
7
7
 
8
- # Impact Analysis - Phân Tích Tác Động & Test Guidance
8
+ # Impact Analysis - Impact Analysis & Test Guidance
9
9
 
10
- Phân tích tác động của code changes đưa ra hướng dẫn test chi tiết để tránh regression bugs.
10
+ Analyze the impact of code changes and provide detailed test guidance to prevent regression bugs.
11
11
 
12
12
  ## Arguments
13
13
 
14
- - **Default (no args)**: Phân tích git diff gần nhất
15
- - **`auto`**: Tự động phát hiện changes phân tích
16
- - **`{files}`**: Phân tích files cụ thể (comma-separated)
14
+ - **Default (no args)**: Analyze most recent git diff
15
+ - **`auto`**: Automatically detect changes and analyze
16
+ - **`{files}`**: Analyze specific files (comma-separated)
17
17
 
18
- ## Khi Nào Sử Dụng
18
+ ## When to Use
19
19
 
20
- ✅ **Nên dùng:**
21
- - Sau khi sửa code, trước khi commit
22
- - Trước khi tạo Pull Request
23
- - Sau khi fix bug (đảm bảo không tạo bug mới)
24
- - Khi refactor code (verify không phá functionality)
25
- - Khi thêm feature mới (tìm integration points)
20
+ ✅ **Should use:**
21
+ - After code changes, before commit
22
+ - Before creating Pull Request
23
+ - After fixing bugs (ensure no new bugs introduced)
24
+ - When refactoring code (verify functionality not broken)
25
+ - When adding new features (find integration points)
26
26
 
27
- ❌ **Không cần:**
28
- - Chỉ sửa documentation
29
- - Chỉ sửa comments
30
- - Thay đổi config không ảnh hưởng logic
27
+ ❌ **Not needed:**
28
+ - Only documentation changes
29
+ - Only comment changes
30
+ - Config changes that don't affect logic
31
31
 
32
32
  ## Quick Start
33
33
 
34
34
  ```bash
35
- # Phân tích changes gần nhất
35
+ # Analyze most recent changes
36
36
  /impact-analysis
37
37
 
38
- # Tự động detect phân tích
38
+ # Auto-detect and analyze
39
39
  /impact-analysis auto
40
40
 
41
- # Phân tích files cụ thể
41
+ # Analyze specific files
42
42
  /impact-analysis src/api/auth.ts,src/components/Login.tsx
43
43
  ```
44
44
 
@@ -46,59 +46,59 @@ Phân tích tác động của code changes và đưa ra hướng dẫn test chi
46
46
 
47
47
  ### 0. Auto-Detect Project Type (NEW)
48
48
 
49
- Load `references/project-detection.md` để:
50
- - Tự động detect project type (React Native, Next.js, Node.js API, etc.)
51
- - Load appropriate profile với patterns edge cases
49
+ Load `references/project-detection.md` to:
50
+ - Automatically detect project type (React Native, Next.js, Node.js API, etc.)
51
+ - Load appropriate profile with patterns and edge cases
52
52
  - Check for custom config file (`impact-analysis.config.js`)
53
- - Merge custom config với default profile
53
+ - Merge custom config with default profile
54
54
 
55
55
  ### 1. Detect Changes
56
56
 
57
- Load `references/change-detection.md` để:
58
- - Phát hiện files đã thay đổi (git diff)
59
- - Phân loại thay đổi (backend/frontend/database)
60
- - Đánh giá mức độ risk
57
+ Load `references/change-detection.md` to:
58
+ - Detect changed files (git diff)
59
+ - Classify changes (backend/frontend/database)
60
+ - Assess risk level
61
61
 
62
62
  ### 2. Scout Dependencies
63
63
 
64
- Load `references/dependency-scouting.md` để:
65
- - Tìm files import/sử dụng code đã sửa
66
- - Phát hiện reverse dependencies
67
- - Xác định integration points
64
+ Load `references/dependency-scouting.md` to:
65
+ - Find files that import/use modified code
66
+ - Detect reverse dependencies
67
+ - Identify integration points
68
68
 
69
- **Advanced**: Load `references/industry-techniques.md` để:
70
- - Sử dụng Call Graph Analysis (Technique #2)
71
- - Sử dụng Dependency Graph tools
72
- - Áp dụng AST-based analysis (Technique #3) cho semantic changes
69
+ **Advanced**: Load `references/industry-techniques.md` to:
70
+ - Use Call Graph Analysis (Technique #2)
71
+ - Use Dependency Graph tools
72
+ - Apply AST-based analysis (Technique #3) for semantic changes
73
73
 
74
74
  ### 3. Identify Edge Cases
75
75
 
76
- Load `references/edge-case-identification.md` để:
77
- - Phân tích data flow
78
- - Tìm boundary conditions
79
- - Xác định error scenarios
80
- - Phát hiện race conditions
76
+ Load `references/edge-case-identification.md` to:
77
+ - Analyze data flow
78
+ - Find boundary conditions
79
+ - Identify error scenarios
80
+ - Detect race conditions
81
81
 
82
- **Advanced**: Load `references/industry-techniques.md` để:
83
- - Sử dụng Static Analysis (Technique #4) cho data/control flow
84
- - Sử dụng Type Analysis cho type compatibility
85
- - Áp dụng Test-Based Analysis (Technique #6) cho coverage mapping
82
+ **Advanced**: Load `references/industry-techniques.md` to:
83
+ - Use Static Analysis (Technique #4) for data/control flow
84
+ - Use Type Analysis for type compatibility
85
+ - Apply Test-Based Analysis (Technique #6) for coverage mapping
86
86
 
87
87
  ### 4. Generate Test Scenarios
88
88
 
89
- Load `references/test-scenario-generation.md` để:
90
- - Tạo happy path scenarios
91
- - Tạo error handling scenarios
92
- - Tạo integration test scenarios
93
- - Tạo regression test checklist
89
+ Load `references/test-scenario-generation.md` to:
90
+ - Create happy path scenarios
91
+ - Create error handling scenarios
92
+ - Create integration test scenarios
93
+ - Create regression test checklist
94
94
 
95
95
  ### 5. Create Report
96
96
 
97
- Load `references/report-template.md` để:
98
- - Tổng hợp findings
99
- - Đánh giá risk
100
- - Đưa ra recommendations
101
- - Tạo actionable checklist
97
+ Load `references/report-template.md` to:
98
+ - Consolidate findings
99
+ - Assess risk
100
+ - Provide recommendations
101
+ - Create actionable checklist
102
102
 
103
103
  ## Output
104
104
 
@@ -158,7 +158,7 @@ Load `references/report-template.md` để:
158
158
  - `references/report-template.md` - Output format
159
159
 
160
160
  ### Advanced References
161
- - `references/industry-techniques.md` - 9 techniques từ industry & research
161
+ - `references/industry-techniques.md` - 9 techniques from industry & research
162
162
  - `references/practical-techniques-guide.md` - Detailed implementation guide
163
163
  - `references/react-native-customization.md` - React Native specific guide
164
164
 
@@ -171,7 +171,7 @@ Load `references/report-template.md` để:
171
171
 
172
172
  ## Advanced Techniques
173
173
 
174
- Skill này hỗ trợ advanced analysis techniques từ industry:
174
+ This skill supports advanced analysis techniques from industry:
175
175
 
176
176
  ### Available Scripts
177
177
 
@@ -214,12 +214,12 @@ See `scripts/README.md` for detailed documentation.
214
214
 
215
215
  ## Best Practices
216
216
 
217
- 1. **Run early** - Phân tích ngay sau khi code, không đợi đến commit
218
- 2. **Focus on risk** - Ưu tiên high-risk changes
219
- 3. **Automate** - Integrate vào workflow tự động (pre-commit, CI/CD)
220
- 4. **Document** - Lưu findings để reference sau
221
- 5. **Verify** - Luôn chạy tests sau khi scenarios
222
- 6. **Use scripts** - Leverage advanced techniques cho deep analysis
217
+ 1. **Run early** - Analyze immediately after coding, don't wait until commit
218
+ 2. **Focus on risk** - Prioritize high-risk changes
219
+ 3. **Automate** - Integrate into automated workflow (pre-commit, CI/CD)
220
+ 4. **Document** - Save findings for future reference
221
+ 5. **Verify** - Always run tests after generating scenarios
222
+ 6. **Use scripts** - Leverage advanced techniques for deep analysis
223
223
 
224
224
  ## Examples
225
225
 
@@ -261,11 +261,11 @@ See `scripts/README.md` for detailed documentation.
261
261
 
262
262
  ## Troubleshooting
263
263
 
264
- **Q: Không detect được changes?**
265
- A: Check git status, đảm bảo staged/committed changes
264
+ **Q: Cannot detect changes?**
265
+ A: Check git status, ensure there are staged/committed changes
266
266
 
267
- **Q: Quá nhiều affected files?**
268
- A: Sử dụng `--scope` để giới hạn phạm vi
267
+ **Q: Too many affected files?**
268
+ A: Use `--scope` to limit scope
269
269
 
270
- **Q: Test scenarios không đủ?**
271
- A: Load `edge-case-identification.md` review manual
270
+ **Q: Test scenarios not sufficient?**
271
+ A: Load `edge-case-identification.md` and review manually