lite-kits 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

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 (43) hide show
  1. lite_kits/__init__.py +9 -9
  2. lite_kits/cli.py +170 -155
  3. lite_kits/core/__init__.py +13 -0
  4. lite_kits/core/banner.py +160 -0
  5. lite_kits/{installer.py → core/installer.py} +47 -27
  6. lite_kits/core/manifest.py +146 -0
  7. lite_kits/kits/README.md +9 -10
  8. lite_kits/kits/dev/README.md +241 -0
  9. lite_kits/kits/dev/claude/commands/audit.md +143 -0
  10. lite_kits/kits/dev/claude/commands/cleanup.md +361 -0
  11. lite_kits/kits/dev/claude/commands/commit.md +612 -0
  12. lite_kits/kits/dev/claude/commands/orient.md +146 -0
  13. lite_kits/kits/dev/claude/commands/pr.md +593 -0
  14. lite_kits/kits/dev/claude/commands/review.md +202 -0
  15. lite_kits/kits/dev/claude/commands/stats.md +162 -0
  16. lite_kits/kits/dev/github/prompts/audit.prompt.md +143 -0
  17. lite_kits/kits/dev/github/prompts/cleanup.prompt.md +382 -0
  18. lite_kits/kits/dev/github/prompts/commit.prompt.md +591 -0
  19. lite_kits/kits/dev/github/prompts/orient.prompt.md +150 -0
  20. lite_kits/kits/dev/github/prompts/pr.prompt.md +603 -0
  21. lite_kits/kits/dev/github/prompts/review.prompt.md +202 -0
  22. lite_kits/kits/dev/github/prompts/stats.prompt.md +163 -0
  23. lite_kits/kits/git/README.md +59 -68
  24. lite_kits/kits/git/claude/commands/review.md +202 -0
  25. lite_kits/kits/git/github/prompts/review.prompt.md +202 -0
  26. lite_kits/kits/kits.yaml +180 -0
  27. lite_kits/kits/multiagent/README.md +26 -15
  28. lite_kits/kits/multiagent/memory/pr-workflow-guide.md +1 -7
  29. lite_kits/kits/project/README.md +6 -22
  30. lite_kits/kits/project/claude/commands/audit.md +143 -0
  31. lite_kits/kits/project/claude/commands/orient.md +29 -46
  32. lite_kits/kits/project/claude/commands/review.md +112 -0
  33. lite_kits/kits/project/claude/commands/stats.md +162 -0
  34. lite_kits/kits/project/github/prompts/audit.prompt.md +143 -0
  35. lite_kits/kits/project/github/prompts/orient.prompt.md +33 -46
  36. lite_kits/kits/project/github/prompts/review.prompt.md +112 -0
  37. lite_kits/kits/project/github/prompts/stats.prompt.md +163 -0
  38. {lite_kits-0.1.0.dist-info → lite_kits-0.1.1.dist-info}/METADATA +98 -66
  39. lite_kits-0.1.1.dist-info/RECORD +58 -0
  40. lite_kits-0.1.0.dist-info/RECORD +0 -31
  41. {lite_kits-0.1.0.dist-info → lite_kits-0.1.1.dist-info}/WHEEL +0 -0
  42. {lite_kits-0.1.0.dist-info → lite_kits-0.1.1.dist-info}/entry_points.txt +0 -0
  43. {lite_kits-0.1.0.dist-info → lite_kits-0.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,202 @@
1
+ ---
2
+ description: Review staged changes against best practices
3
+ ---
4
+
5
+ # Code Review of Staged Changes
6
+
7
+ **Purpose**: Review staged git changes for quality, best practices, and potential issues before committing.
8
+
9
+ ## Execution Steps
10
+
11
+ Execute the following steps to review staged changes:
12
+
13
+ ### 1. Check Staged Files
14
+
15
+ ```bash
16
+ # Get list of staged files with status
17
+ git diff --staged --name-status
18
+ ```
19
+
20
+ **If no files are staged**:
21
+ - Inform user that nothing is staged
22
+ - Suggest running `git add` or `@terminal /commit` to stage and commit together
23
+ - Exit gracefully
24
+
25
+ ### 2. Analyze Staged Changes
26
+
27
+ ```bash
28
+ # Get the actual diff with context
29
+ git diff --staged
30
+ ```
31
+
32
+ ### 3. Review Changes
33
+
34
+ Analyze the diff output for:
35
+
36
+ **✅ Good Practices to Acknowledge**:
37
+ - Clear, descriptive function/variable names
38
+ - Appropriate comments where needed
39
+ - Consistent formatting
40
+ - Type hints (Python) or type annotations
41
+ - Test coverage for new code
42
+ - Error handling
43
+ - Input validation
44
+
45
+ **⚠️ Issues to Flag**:
46
+ - **Security**:
47
+ - Hardcoded credentials or API keys
48
+ - SQL injection vulnerabilities
49
+ - XSS vulnerabilities
50
+ - Unsafe deserialization
51
+ - Missing authentication/authorization checks
52
+
53
+ - **Code Quality**:
54
+ - TODOs or FIXMEs (should be tracked in issues)
55
+ - Commented-out code blocks
56
+ - Magic numbers without explanation
57
+ - Overly complex functions (>50 lines)
58
+ - Duplicate code patterns
59
+ - Inconsistent naming conventions
60
+
61
+ - **Best Practices**:
62
+ - Missing error handling
63
+ - No logging for important operations
64
+ - Hardcoded configuration values
65
+ - Missing input validation
66
+ - Unused imports or variables
67
+ - Missing docstrings for public APIs
68
+
69
+ ### 4. Present Review Results
70
+
71
+ Format output as follows:
72
+
73
+ ```
74
+ ## Code Review Results
75
+
76
+ **Staged files**: [count]
77
+ [list files with status: A=added, M=modified, D=deleted]
78
+
79
+ **Summary of changes**:
80
+ [brief description of what's being changed]
81
+
82
+ ===========================================================
83
+ **✅ Good Practices Found:**
84
+ ===========================================================
85
+
86
+ [List positive findings, grouped by file]
87
+ - [file]: [specific good practice observed]
88
+
89
+ ===========================================================
90
+ **⚠️ Suggestions for Improvement:**
91
+ ===========================================================
92
+
93
+ [List issues/suggestions, grouped by file with line numbers if possible]
94
+ - [file]:[line]: [specific issue and suggested fix]
95
+
96
+ ===========================================================
97
+ **🔒 Security Check:**
98
+ ===========================================================
99
+
100
+ [Report any security concerns or confirm none found]
101
+ - ✓ No hardcoded credentials detected
102
+ - ✓ No obvious security vulnerabilities
103
+ - ⚠ [Any security concerns]
104
+
105
+ ===========================================================
106
+ **📊 Overall Assessment:**
107
+ ===========================================================
108
+
109
+ [One of: "Ready to commit", "Ready with minor suggestions", "Needs changes"]
110
+
111
+ [Brief summary of overall code quality]
112
+
113
+ **Recommendation**: [Approve / Address suggestions / Do not commit]
114
+ ```
115
+
116
+ ### 5. Handle User Response
117
+
118
+ After presenting results, wait for user action. They may:
119
+ - Proceed with commit anyway
120
+ - Make changes and re-review
121
+ - Cancel the review
122
+
123
+ ## Example Output
124
+
125
+ ```
126
+ ## Code Review Results
127
+
128
+ **Staged files**: 3
129
+ - A src/auth.py (new file)
130
+ - M src/models.py (modified)
131
+ - A tests/test_auth.py (new file)
132
+
133
+ **Summary of changes**:
134
+ Adding user authentication system with bcrypt password hashing
135
+ and JWT token generation.
136
+
137
+ ===========================================================
138
+ **✅ Good Practices Found:**
139
+ ===========================================================
140
+
141
+ - src/auth.py: Clear function names (hash_password, verify_password)
142
+ - src/auth.py: Type hints used throughout
143
+ - src/auth.py: Comprehensive docstrings for all functions
144
+ - src/models.py: Proper SQLAlchemy relationship definitions
145
+ - tests/test_auth.py: Good test coverage with fixtures
146
+
147
+ ===========================================================
148
+ **⚠️ Suggestions for Improvement:**
149
+ ===========================================================
150
+
151
+ - src/auth.py:45: Consider extracting hash_password to utils module
152
+ Current: Function in auth.py
153
+ Suggest: Move to src/utils/crypto.py for reusability
154
+
155
+ - src/models.py:12: TODO comment present
156
+ Line: "# TODO: Add password reset functionality"
157
+ Suggest: Create GitHub issue and reference it in comment
158
+
159
+ - tests/test_auth.py:67: Missing edge case test
160
+ Suggest: Add test for empty password input
161
+
162
+ - src/auth.py:23: Magic number for token expiration
163
+ Current: expires_delta = timedelta(hours=24)
164
+ Suggest: Move to config file or environment variable
165
+
166
+ ===========================================================
167
+ **🔒 Security Check:**
168
+ ===========================================================
169
+
170
+ ✓ No hardcoded credentials detected
171
+ ✓ Using bcrypt for password hashing (good choice!)
172
+ ✓ JWT tokens generated securely
173
+ ⚠ Consider adding rate limiting to prevent brute force attacks
174
+
175
+ ===========================================================
176
+ **📊 Overall Assessment:**
177
+ ===========================================================
178
+
179
+ **Status**: Ready with minor suggestions
180
+
181
+ The code follows good practices with proper type hints, docstrings,
182
+ and test coverage. The suggestions above are minor improvements that
183
+ can be addressed now or in future iterations.
184
+
185
+ **Recommendation**: Approve and commit - suggestions are non-blocking
186
+ ```
187
+
188
+ ## Important Notes
189
+
190
+ - This command is **read-only** - it never modifies files
191
+ - Focus on **actionable feedback** - be specific about what to change
192
+ - Be **encouraging** - acknowledge good practices
193
+ - **Security first** - always check for security issues
194
+ - Keep review **concise** - don't overwhelm with minor issues
195
+ - **Respect the agent's work** - balance critique with acknowledgment
196
+
197
+ ## Integration with Other Commands
198
+
199
+ - Run `@terminal /review` before `@terminal /commit` to catch issues early
200
+ - Use after making changes and staging them with `git add`
201
+ - Combine with `@terminal /pr` workflow - review before creating PR
202
+ - Works great in multi-agent workflows (one agent reviews another's work)
@@ -0,0 +1,163 @@
1
+ ---
2
+ description: Generate concise project metrics for AI agent orientation
3
+ ---
4
+
5
+ # Project Statistics
6
+
7
+ **Purpose**: Provide quick project overview metrics for AI agents joining a project or assessing scope.
8
+
9
+ ## Execution Steps
10
+
11
+ Execute the following steps to gather project statistics:
12
+
13
+ ### 1. Count Lines of Code
14
+
15
+ **Preferred method** (if tokei installed):
16
+ ```powershell
17
+ # Check if tokei is available
18
+ Get-Command tokei -ErrorAction SilentlyContinue
19
+
20
+ # If available, use tokei for fast, accurate counts
21
+ tokei --output json
22
+ ```
23
+
24
+ **Fallback method** (if tokei not available):
25
+ ```powershell
26
+ # Python
27
+ (Get-ChildItem -Recurse -Filter *.py | Get-Content | Measure-Object -Line).Lines
28
+
29
+ # JavaScript/TypeScript
30
+ (Get-ChildItem -Recurse -Include *.js,*.ts | Get-Content | Measure-Object -Line).Lines
31
+
32
+ # Markdown
33
+ (Get-ChildItem -Recurse -Filter *.md | Get-Content | Measure-Object -Line).Lines
34
+
35
+ # All files combined
36
+ (Get-ChildItem -Recurse -File | Get-Content | Measure-Object -Line).Lines
37
+ ```
38
+
39
+ ### 2. Count Files and Directories
40
+
41
+ ```powershell
42
+ # Count files (excluding hidden)
43
+ (Get-ChildItem -Recurse -File | Where-Object { -not $_.FullName.Contains('\.') }).Count
44
+
45
+ # Count directories (excluding hidden)
46
+ (Get-ChildItem -Recurse -Directory | Where-Object { -not $_.FullName.Contains('\.') }).Count
47
+ ```
48
+
49
+ ### 3. Get Git History Summary
50
+
51
+ ```powershell
52
+ # Total commits
53
+ (git log --oneline | Measure-Object).Count
54
+
55
+ # Contributor count
56
+ (git log --format='%aN' | Sort-Object -Unique).Count
57
+
58
+ # Recent activity
59
+ git log --oneline -5
60
+ ```
61
+
62
+ If not a git repository, skip this section.
63
+
64
+ ### 4. Check for Test Coverage
65
+
66
+ Look for common coverage report files:
67
+ ```powershell
68
+ # Python coverage files
69
+ Get-ChildItem -Path . -Include .coverage,coverage.xml -Recurse -ErrorAction SilentlyContinue
70
+ Get-ChildItem -Path htmlcov -Directory -ErrorAction SilentlyContinue
71
+
72
+ # JavaScript coverage
73
+ Get-ChildItem -Path coverage,.nyc_output -Directory -ErrorAction SilentlyContinue
74
+
75
+ # If coverage files exist, try to extract percentage
76
+ # Python: coverage report | Select-String TOTAL
77
+ # JavaScript: Get-Content coverage/coverage-summary.json | ConvertFrom-Json
78
+ ```
79
+
80
+ ### 5. Generate Concise Table Output
81
+
82
+ Provide stats in this format (~20 lines max):
83
+
84
+ ```markdown
85
+ ## Project Statistics
86
+
87
+ **Code**:
88
+ - Language1: X,XXX LOC (NN%)
89
+ - Language2: XXX LOC (NN%)
90
+ - Language3: XX LOC (NN%)
91
+
92
+ **Structure**:
93
+ - NN files, NN directories
94
+ - NNN commits, N contributors
95
+
96
+ **Testing**:
97
+ - Coverage: NN% (or N/A)
98
+ - Tests: NN files (or N/A)
99
+
100
+ **Next Action**: [Explore src/ / Review tests / Check docs]
101
+ ```
102
+
103
+ ## Important Notes
104
+
105
+ - **Be concise**: Keep output under 20 lines
106
+ - **Use tables**: Well-formatted markdown tables or lists
107
+ - **Handle missing tools**:
108
+ - No tokei → Use Get-ChildItem/Measure-Object fallback, note "Basic LOC count"
109
+ - Not a git repo → Skip git section, note "No git history"
110
+ - No coverage → Show "N/A" gracefully
111
+
112
+ - **Percentages**: Calculate language percentages from total LOC
113
+ - **Large repos**: If >100k LOC, note "Large project" and consider sampling
114
+ - **Speed**: Target <5 second execution time
115
+
116
+ ## Edge Cases
117
+
118
+ - **No git repository**: Skip git section, show file/LOC stats only
119
+ - **No test coverage reports**: Show "Coverage: N/A"
120
+ - **Tokei not installed**: Use PowerShell fallback, note in output
121
+ - **Very large repo (1M+ LOC)**: Sample or provide high-level summary only
122
+ - **No code files**: "Appears to be a documentation-only or data project"
123
+
124
+ ## Example Output
125
+
126
+ ```markdown
127
+ ## Project Statistics
128
+
129
+ **Code**:
130
+ - Python: 2,453 LOC (87%)
131
+ - Markdown: 342 LOC (12%)
132
+ - YAML: 28 LOC (1%)
133
+ - Total: 2,823 LOC
134
+
135
+ **Structure**:
136
+ - 45 files, 12 directories
137
+ - 127 commits, 3 contributors
138
+
139
+ **Testing**:
140
+ - Coverage: 78% (via pytest-cov)
141
+ - Tests: 23 test files
142
+
143
+ **Next Action**: Explore src/ directory to understand core modules
144
+ ```
145
+
146
+ ```markdown
147
+ ## Project Statistics
148
+
149
+ **Code** (tokei not available, using basic count):
150
+ - Python: ~1,200 lines
151
+ - Markdown: ~400 lines
152
+ - Total: ~1,600 lines (approximate)
153
+
154
+ **Structure**:
155
+ - 32 files, 8 directories
156
+ - Not a git repository
157
+
158
+ **Testing**:
159
+ - Coverage: N/A
160
+ - Tests: N/A
161
+
162
+ **Next Action**: Check if this is a standalone library or tool
163
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Status**: ✅ Recommended (Default)
4
4
 
5
- Git workflow automation with smart commits, PR creation, sync visualization, and cleanup operations. Includes ASCII visualization for better readability.
5
+ Git workflow automation with smart commits, PR creation, code review, and cleanup operations. Includes ASCII visualization for better readability.
6
6
 
7
7
  ## What It Adds
8
8
 
@@ -12,7 +12,7 @@ Git workflow automation with smart commits, PR creation, sync visualization, and
12
12
  |---------|-------------|----------------|-------------|
13
13
  | `/commit` | 🚧 | 🚧 | Smart commit with agent attribution |
14
14
  | `/pr` | 🚧 | 🚧 | Create PR with auto-generated description |
15
- | `/sync` | 🚧 | 🚧 | Show sync status with ASCII visualization |
15
+ | `/review` | 🚧 | 🚧 | Review staged changes against best practices |
16
16
  | `/cleanup` | 🚧 | 🚧 | Clean merged branches, stale worktrees |
17
17
 
18
18
  🚧 = Coming Soon
@@ -36,12 +36,12 @@ your-project/
36
36
  ├── .claude/commands/ # If Claude Code detected
37
37
  │ ├── commit.md
38
38
  │ ├── pr.md
39
- │ ├── sync.md
39
+ │ ├── review.md
40
40
  │ └── cleanup.md
41
41
  └── .github/prompts/ # If GitHub Copilot detected
42
42
  ├── commit.prompt.md
43
43
  ├── pr.prompt.md
44
- ├── sync.prompt.md
44
+ ├── review.prompt.md
45
45
  └── cleanup.prompt.md
46
46
  ```
47
47
 
@@ -102,6 +102,55 @@ via claude-sonnet-4.5 @ claude-code
102
102
 
103
103
  ---
104
104
 
105
+ ### `/review` - Code Review (Coming Soon)
106
+
107
+ **Purpose**: Review staged changes against best practices and project standards.
108
+
109
+ **What it will do**:
110
+ 1. Run `git diff --staged` to see changes
111
+ 2. Check changes against common best practices
112
+ 3. Identify potential code smells
113
+ 4. Suggest improvements
114
+ 5. Verify consistent formatting
115
+ 6. Check for common issues (hardcoded secrets, TODO comments, etc.)
116
+
117
+ **Example usage** (planned):
118
+ ```
119
+ /review
120
+
121
+ ## Code Review
122
+
123
+ **Staged files**: 3
124
+ - src/auth.py (new)
125
+ - src/models.py (modified)
126
+ - tests/test_auth.py (new)
127
+
128
+ **Analysis**:
129
+
130
+ ✅ **Good practices**:
131
+ - Clear function names and docstrings
132
+ - Comprehensive test coverage (94%)
133
+ - Type hints used throughout
134
+ - No hardcoded credentials
135
+
136
+ ⚠ **Suggestions**:
137
+ - src/auth.py:45: Consider extracting hash_password to utils
138
+ - src/models.py:12: TODO comment should be tracked in issue
139
+ - tests/test_auth.py: Add edge case for empty passwords
140
+
141
+ **Overall**: Ready to commit with minor suggestions
142
+
143
+ **Approve?** (y/n): y
144
+ ```
145
+
146
+ **Benefits**:
147
+ - Catch issues before committing
148
+ - Consistent code quality
149
+ - Learn best practices
150
+ - Agent-to-agent code review support
151
+
152
+ ---
153
+
105
154
  ### `/pr` - Create Pull Request (Coming Soon)
106
155
 
107
156
  **Purpose**: Create PR with auto-generated description from commits.
@@ -166,64 +215,6 @@ via claude-sonnet-4.5 @ claude-code
166
215
 
167
216
  ---
168
217
 
169
- ### `/sync` - Sync Status with Visualization (Coming Soon)
170
-
171
- **Purpose**: Show git sync status with ASCII visualization.
172
-
173
- **Problem**: `git status` output is text-heavy and hard to parse visually.
174
-
175
- **Solution**: ASCII tree diagrams and colorized status.
176
-
177
- **Example usage** (planned):
178
- ```
179
- /sync
180
-
181
- ## Git Sync Status
182
-
183
- **Branch**: dev/003-auth
184
- **Tracking**: origin/dev/003-auth
185
-
186
- **Local vs Remote**:
187
-
188
- origin/main ─────────────┬──────> main (up to date)
189
-
190
- ├──────> dev/003-auth (5 commits ahead)
191
- │ ↑ PUSH NEEDED
192
-
193
- Your commits: │
194
- ├─ a1b2c3d feat: Add auth│
195
- ├─ b2c3d4e feat: Add user│
196
- ├─ c3d4e5f test: Add auth│
197
- ├─ d4e5f6g docs: Update │
198
- └─ e5f6g7h fix: Resolve │
199
-
200
- **Status**:
201
- ✓ No uncommitted changes
202
- ⚠ 5 commits not pushed
203
- ✓ Up to date with remote (fetched 2m ago)
204
-
205
- **Actions**:
206
- 1. git push origin dev/003-auth
207
- 2. git fetch (refresh remote status)
208
- 3. /pr (create pull request)
209
-
210
- **Worktrees** (if any):
211
- None active
212
-
213
- **Branches** (recent):
214
- - dev/003-auth (current) ← 5 commits ahead
215
- - main (up to date)
216
- - dev/002-blog (merged, can cleanup)
217
- ```
218
-
219
- **Benefits**:
220
- - Visual understanding at a glance
221
- - Clear action items
222
- - Worktree awareness
223
- - Branch cleanup suggestions
224
-
225
- ---
226
-
227
218
  ### `/cleanup` - Git Cleanup (Coming Soon)
228
219
 
229
220
  **Purpose**: Clean up merged branches, stale worktrees, and old features.
@@ -317,17 +308,17 @@ Commits ahead of main:
317
308
  ## Use Cases
318
309
 
319
310
  ### Daily Development
320
- **Use**: `/commit` for every commit, `/sync` multiple times per day
311
+ **Use**: `/review` before committing, `/commit` for every commit
321
312
 
322
313
  ### Before Creating PR
323
- **Use**: `/sync` to ensure up to date, `/pr` to create pull request
314
+ **Use**: `/review` final check, `/pr` to create pull request
324
315
 
325
316
  ### Weekly Maintenance
326
317
  **Use**: `/cleanup` to remove merged branches and free up space
327
318
 
328
319
  ### Multi-Agent Projects
329
- **Combine with**: multiagent-kit for coordination
330
- **Use**: `/sync` shows worktree status for parallel development
320
+ **Combine with**: multiagent-kit for coordination and `/sync` command
321
+ **Use**: `/review` for agent-to-agent code review
331
322
 
332
323
  ---
333
324
 
@@ -357,8 +348,8 @@ lite-kits remove -Kit git
357
348
  ```
358
349
 
359
350
  Removes:
360
- - `.claude/commands/{commit,pr,sync,cleanup}.md`
361
- - `.github/prompts/{commit,pr,sync,cleanup}.prompt.md`
351
+ - `.claude/commands/{commit,pr,review,cleanup}.md`
352
+ - `.github/prompts/{commit,pr,review,cleanup}.prompt.md`
362
353
 
363
354
  ---
364
355