lite-kits 0.1.0__py3-none-any.whl → 0.3.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 (48) hide show
  1. lite_kits/__init__.py +61 -9
  2. lite_kits/cli.py +788 -262
  3. lite_kits/core/__init__.py +19 -0
  4. lite_kits/core/banner.py +160 -0
  5. lite_kits/core/conflict_checker.py +115 -0
  6. lite_kits/core/detector.py +140 -0
  7. lite_kits/core/installer.py +322 -0
  8. lite_kits/core/manifest.py +146 -0
  9. lite_kits/core/validator.py +146 -0
  10. lite_kits/kits/README.md +14 -15
  11. lite_kits/kits/dev/README.md +241 -0
  12. lite_kits/kits/dev/commands/.claude/audit.md +143 -0
  13. lite_kits/kits/{git/claude/commands → dev/commands/.claude}/cleanup.md +2 -2
  14. lite_kits/kits/{git/claude/commands → dev/commands/.claude}/commit.md +2 -2
  15. lite_kits/kits/{project/claude/commands → dev/commands/.claude}/orient.md +30 -48
  16. lite_kits/kits/{git/claude/commands → dev/commands/.claude}/pr.md +1 -1
  17. lite_kits/kits/dev/commands/.claude/review.md +202 -0
  18. lite_kits/kits/dev/commands/.claude/stats.md +162 -0
  19. lite_kits/kits/dev/commands/.github/audit.prompt.md +143 -0
  20. lite_kits/kits/{git/github/prompts → dev/commands/.github}/cleanup.prompt.md +2 -2
  21. lite_kits/kits/{git/github/prompts → dev/commands/.github}/commit.prompt.md +2 -2
  22. lite_kits/kits/{project/github/prompts → dev/commands/.github}/orient.prompt.md +34 -48
  23. lite_kits/kits/{git/github/prompts → dev/commands/.github}/pr.prompt.md +1 -1
  24. lite_kits/kits/dev/commands/.github/review.prompt.md +202 -0
  25. lite_kits/kits/dev/commands/.github/stats.prompt.md +163 -0
  26. lite_kits/kits/kits.yaml +497 -0
  27. lite_kits/kits/multiagent/README.md +28 -17
  28. lite_kits/kits/multiagent/{claude/commands → commands/.claude}/sync.md +331 -331
  29. lite_kits/kits/multiagent/{github/prompts → commands/.github}/sync.prompt.md +73 -69
  30. lite_kits/kits/multiagent/memory/git-worktrees-protocol.md +370 -370
  31. lite_kits/kits/multiagent/memory/parallel-work-protocol.md +536 -536
  32. lite_kits/kits/multiagent/memory/pr-workflow-guide.md +275 -281
  33. lite_kits/kits/multiagent/templates/collaboration-structure/README.md +166 -166
  34. lite_kits/kits/multiagent/templates/decision.md +79 -79
  35. lite_kits/kits/multiagent/templates/handoff.md +95 -95
  36. lite_kits/kits/multiagent/templates/session-log.md +68 -68
  37. lite_kits-0.3.1.dist-info/METADATA +259 -0
  38. lite_kits-0.3.1.dist-info/RECORD +41 -0
  39. {lite_kits-0.1.0.dist-info → lite_kits-0.3.1.dist-info}/licenses/LICENSE +21 -21
  40. lite_kits/installer.py +0 -417
  41. lite_kits/kits/git/README.md +0 -374
  42. lite_kits/kits/git/scripts/bash/get-git-context.sh +0 -208
  43. lite_kits/kits/git/scripts/powershell/Get-GitContext.ps1 +0 -242
  44. lite_kits/kits/project/README.md +0 -244
  45. lite_kits-0.1.0.dist-info/METADATA +0 -415
  46. lite_kits-0.1.0.dist-info/RECORD +0 -31
  47. {lite_kits-0.1.0.dist-info → lite_kits-0.3.1.dist-info}/WHEEL +0 -0
  48. {lite_kits-0.1.0.dist-info → lite_kits-0.3.1.dist-info}/entry_points.txt +0 -0
@@ -1,242 +0,0 @@
1
- #Requires -Version 5.1
2
-
3
- <#
4
- .SYNOPSIS
5
- Gathers comprehensive git repository context for AI agents.
6
-
7
- .DESCRIPTION
8
- Collects git status, branch information, recent commits, and change statistics
9
- in a structured format suitable for AI agent orientation and commit workflows.
10
-
11
- .PARAMETER IncludeCommits
12
- Number of recent commits to include (default: 5)
13
-
14
- .PARAMETER IncludeDiff
15
- Include file diff statistics (default: true)
16
-
17
- .PARAMETER Format
18
- Output format: Object, Json, or Text (default: Object)
19
-
20
- .EXAMPLE
21
- Get-GitContext
22
- Returns git context as PowerShell object
23
-
24
- .EXAMPLE
25
- Get-GitContext -Format Text | Write-Host
26
- Displays formatted text output
27
-
28
- .EXAMPLE
29
- Get-GitContext -IncludeCommits 10 -Format Json
30
- Returns last 10 commits as JSON
31
- #>
32
-
33
- [CmdletBinding()]
34
- param(
35
- [Parameter()]
36
- [int]$IncludeCommits = 5,
37
-
38
- [Parameter()]
39
- [switch]$IncludeDiff,
40
-
41
- [Parameter()]
42
- [ValidateSet('Object', 'Json', 'Text')]
43
- [string]$Format = 'Object'
44
- )
45
-
46
- # Check if we're in a git repository
47
- if (-not (git rev-parse --git-dir 2>$null)) {
48
- Write-Error "Not a git repository"
49
- return
50
- }
51
-
52
- # Gather git context
53
- $context = [PSCustomObject]@{
54
- Branch = $null
55
- CommitHash = $null
56
- Status = @{
57
- Staged = @()
58
- Unstaged = @()
59
- Untracked = @()
60
- Counts = @{
61
- Staged = 0
62
- Unstaged = 0
63
- Untracked = 0
64
- }
65
- }
66
- RecentCommits = @()
67
- Remote = @{
68
- Url = $null
69
- Ahead = 0
70
- Behind = 0
71
- Tracking = $null
72
- }
73
- Stats = @{
74
- TotalFiles = 0
75
- Insertions = 0
76
- Deletions = 0
77
- }
78
- }
79
-
80
- # Get current branch
81
- $context.Branch = git branch --show-current
82
-
83
- # Get current commit hash
84
- $context.CommitHash = git rev-parse --short HEAD 2>$null
85
-
86
- # Get git status
87
- $statusLines = git status --porcelain
88
-
89
- foreach ($line in $statusLines) {
90
- if ($line) {
91
- $statusCode = $line.Substring(0, 2)
92
- $filePath = $line.Substring(3)
93
-
94
- # Staged files (first character)
95
- if ($statusCode[0] -match '[MADRC]') {
96
- $context.Status.Staged += [PSCustomObject]@{
97
- Status = $statusCode[0]
98
- Path = $filePath
99
- }
100
- $context.Status.Counts.Staged++
101
- }
102
-
103
- # Unstaged files (second character)
104
- if ($statusCode[1] -match '[MD]') {
105
- $context.Status.Unstaged += [PSCustomObject]@{
106
- Status = $statusCode[1]
107
- Path = $filePath
108
- }
109
- $context.Status.Counts.Unstaged++
110
- }
111
-
112
- # Untracked files
113
- if ($statusCode -eq '??') {
114
- $context.Status.Untracked += [PSCustomObject]@{
115
- Path = $filePath
116
- }
117
- $context.Status.Counts.Untracked++
118
- }
119
- }
120
- }
121
-
122
- # Get remote tracking info
123
- $tracking = git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>$null
124
- if ($tracking) {
125
- $context.Remote.Tracking = $tracking
126
-
127
- # Get ahead/behind counts
128
- $aheadBehind = git rev-list --left-right --count HEAD...$tracking 2>$null
129
- if ($aheadBehind) {
130
- $parts = $aheadBehind -split '\s+'
131
- $context.Remote.Ahead = [int]$parts[0]
132
- $context.Remote.Behind = [int]$parts[1]
133
- }
134
- }
135
-
136
- # Get remote URL
137
- $remoteUrl = git remote get-url origin 2>$null
138
- if ($remoteUrl) {
139
- $context.Remote.Url = $remoteUrl
140
- }
141
-
142
- # Get recent commits
143
- if ($IncludeCommits -gt 0) {
144
- $commitFormat = '%H%x00%h%x00%an%x00%ae%x00%ad%x00%s'
145
- $commitLines = git log -n $IncludeCommits --pretty=format:$commitFormat --date=relative
146
-
147
- foreach ($line in $commitLines) {
148
- if ($line) {
149
- $parts = $line -split "`0", 6
150
- $context.RecentCommits += [PSCustomObject]@{
151
- Hash = $parts[0]
152
- ShortHash = $parts[1]
153
- Author = $parts[2]
154
- Email = $parts[3]
155
- Date = $parts[4]
156
- Subject = $parts[5]
157
- }
158
- }
159
- }
160
- }
161
-
162
- # Get diff statistics
163
- if ($IncludeDiff -and $context.Status.Counts.Staged -gt 0) {
164
- $diffStat = git diff --cached --numstat
165
-
166
- foreach ($line in $diffStat) {
167
- if ($line) {
168
- $parts = $line -split '\s+', 3
169
- $insertions = if ($parts[0] -eq '-') { 0 } else { [int]$parts[0] }
170
- $deletions = if ($parts[1] -eq '-') { 0 } else { [int]$parts[1] }
171
-
172
- $context.Stats.Insertions += $insertions
173
- $context.Stats.Deletions += $deletions
174
- $context.Stats.TotalFiles++
175
- }
176
- }
177
- }
178
-
179
- # Output based on format
180
- switch ($Format) {
181
- 'Json' {
182
- $context | ConvertTo-Json -Depth 10
183
- }
184
- 'Text' {
185
- # Formatted text output
186
- Write-Output "==============================================================="
187
- Write-Output "📊 Git Status (on: $($context.Branch)):"
188
- Write-Output "==============================================================="
189
- Write-Output "Staged: $($context.Status.Counts.Staged) files"
190
- Write-Output "Unstaged: $($context.Status.Counts.Unstaged) files"
191
- Write-Output "Untracked: $($context.Status.Counts.Untracked) files"
192
-
193
- if ($context.Remote.Tracking) {
194
- Write-Output ""
195
- Write-Output "Remote: $($context.Remote.Tracking)"
196
- if ($context.Remote.Ahead -gt 0) {
197
- Write-Output " Ahead by $($context.Remote.Ahead) commit(s)"
198
- }
199
- if ($context.Remote.Behind -gt 0) {
200
- Write-Output " Behind by $($context.Remote.Behind) commit(s)"
201
- }
202
- }
203
-
204
- if ($context.Status.Staged.Count -gt 0) {
205
- Write-Output ""
206
- Write-Output "Staged files:"
207
- foreach ($file in $context.Status.Staged) {
208
- Write-Output " $($file.Status) $($file.Path)"
209
- }
210
- }
211
-
212
- if ($context.Status.Unstaged.Count -gt 0) {
213
- Write-Output ""
214
- Write-Output "Unstaged files:"
215
- foreach ($file in $context.Status.Unstaged) {
216
- Write-Output " $($file.Status) $($file.Path)"
217
- }
218
- }
219
-
220
- if ($context.Status.Untracked.Count -gt 0) {
221
- Write-Output ""
222
- Write-Output "Untracked files:"
223
- foreach ($file in $context.Status.Untracked) {
224
- Write-Output " ?? $($file.Path)"
225
- }
226
- }
227
-
228
- if ($context.RecentCommits.Count -gt 0) {
229
- Write-Output ""
230
- Write-Output "Recent commits:"
231
- foreach ($commit in $context.RecentCommits) {
232
- Write-Output " $($commit.ShortHash) $($commit.Subject) ($($commit.Date))"
233
- }
234
- }
235
-
236
- Write-Output "==============================================================="
237
- }
238
- default {
239
- # Return PowerShell object
240
- $context
241
- }
242
- }
@@ -1,244 +0,0 @@
1
- # Project Kit
2
-
3
- **Status**: ✅ Recommended (Default)
4
-
5
- Essential project-level utilities and enhancements for vanilla spec-kit. Includes agent orientation, code review, quality checks, and enhanced feature creation scripts.
6
-
7
- ## What It Adds
8
-
9
- ### Commands (AI Agents)
10
-
11
- | Command | Claude Code | GitHub Copilot | Description |
12
- |---------|-------------|----------------|-------------|
13
- | `/orient` | ✅ | ✅ | Agent orientation protocol (most essential!) |
14
- | `/review` | 🚧 | 🚧 | Code review helper |
15
- | `/audit` | 🚧 | 🚧 | Security & quality audit |
16
- | `/stats` | 🚧 | 🚧 | Project statistics |
17
-
18
- ### Scripts (Enhanced Vanilla)
19
-
20
- | Script | Bash | PowerShell | Description |
21
- |--------|------|------------|-------------|
22
- | Feature creation | 🚧 | 🚧 | Custom feature numbering/naming |
23
-
24
- ✅ = Implemented | 🚧 = Coming Soon
25
-
26
- ## Installation
27
-
28
- ### As part of recommended kits:
29
- ```bash
30
- lite-kits install -Recommended # project + git
31
- ```
32
-
33
- ### Individually:
34
- ```bash
35
- lite-kits install -Kit project
36
- ```
37
-
38
- ## What Gets Installed
39
-
40
- ```
41
- your-project/
42
- ├── .claude/commands/ # If Claude Code detected
43
- │ ├── orient.md # ✅ Essential!
44
- │ ├── review.md # 🚧 Coming Soon
45
- │ ├── audit.md # 🚧 Coming Soon
46
- │ └── stats.md # 🚧 Coming Soon
47
- ├── .github/prompts/ # If GitHub Copilot detected
48
- │ ├── orient.prompt.md # ✅ Essential!
49
- │ ├── review.prompt.md # 🚧 Coming Soon
50
- │ ├── audit.prompt.md # 🚧 Coming Soon
51
- │ └── stats.prompt.md # 🚧 Coming Soon
52
- └── .specify/scripts/ # Enhanced vanilla scripts
53
- ├── bash/
54
- │ └── create-feature-enhanced.sh # 🚧 Coming Soon
55
- └── powershell/
56
- └── Create-Feature-Enhanced.ps1 # 🚧 Coming Soon
57
- ```
58
-
59
- **Note**: Vanilla spec-kit files are **never modified** - only new files are added.
60
-
61
- ## Commands
62
-
63
- ### `/orient` - Agent Orientation ⭐ ESSENTIAL
64
-
65
- **Purpose**: Help AI agents quickly understand project context before starting work.
66
-
67
- **What it does**:
68
- 1. Reads `.github/copilot-instructions.md` (primary source)
69
- 2. Reads `.specify/memory/constitution.md` (project philosophy)
70
- 3. Checks current git state (branch, recent commits)
71
- 4. Reviews collaboration directories (if multiagent-kit installed)
72
- 5. Determines agent role (Claude = leader, Copilot = specialist)
73
- 6. Outputs concise summary (~150-200 words)
74
-
75
- **Example usage**:
76
- ```
77
- /orient
78
-
79
- ## Orientation Complete - Primary Agent
80
-
81
- **I am**: claude-sonnet-4.5 @ Claude Code (Primary)
82
-
83
- **Project**: Pip-installable add-on for spec-kit
84
-
85
- **Stack**: Python 3.11+, typer, rich
86
-
87
- **Principles**:
88
- - Add-on pattern (no vanilla modifications)
89
- - Cross-platform (Bash + PowerShell)
90
- - Cross-agent (Claude + Copilot)
91
-
92
- **State**: Branch dev/001-starter-kits, 3 files changed
93
-
94
- **Coordination**: Solo work
95
-
96
- **Next**: Implement project-kit structure
97
-
98
- **Confirm?**: Ready to proceed?
99
- ```
100
-
101
- **Why this is essential**: Every AI agent should run `/orient` at the start of each session to get up to speed quickly without wasting tokens.
102
-
103
- ---
104
-
105
- ### `/review` - Code Review (Coming Soon)
106
-
107
- **Purpose**: Review code changes against project constitution and best practices.
108
-
109
- **What it will do**:
110
- - Check staged changes against constitution principles
111
- - Identify common code smells
112
- - Suggest improvements
113
- - Verify test coverage
114
- - Check documentation completeness
115
-
116
- ---
117
-
118
- ### `/audit` - Security & Quality Audit (Coming Soon)
119
-
120
- **Purpose**: Scan for security issues and quality problems.
121
-
122
- **What it will do**:
123
- - Scan for hardcoded secrets/credentials
124
- - Check for common vulnerabilities (SQL injection, XSS, CSRF)
125
- - Analyze dependencies for known CVEs
126
- - Verify input validation
127
- - Check file permissions
128
-
129
- ---
130
-
131
- ### `/stats` - Project Statistics (Coming Soon)
132
-
133
- **Purpose**: Show project health metrics.
134
-
135
- **What it will do**:
136
- - Lines of code by language
137
- - Test coverage percentage
138
- - Git activity with agent attribution
139
- - Complexity metrics
140
- - Dependency count
141
- - Health score
142
-
143
- ---
144
-
145
- ## Enhanced Scripts
146
-
147
- ### Feature Creation Enhancement (Coming Soon)
148
-
149
- **Problem**: Vanilla `create-new-feature` script auto-generates feature numbers and uses first 3 words of description for naming.
150
-
151
- **Enhancement**: Full control over feature numbering and naming.
152
-
153
- **Usage** (planned):
154
- ```bash
155
- # Vanilla (auto number, auto name from "Add user authentication system")
156
- .specify/scripts/bash/create-new-feature.sh "Add user authentication system"
157
- # Creates: 003-add-user-authentication
158
-
159
- # Enhanced (custom number and name)
160
- .specify/scripts/bash/create-feature-enhanced.sh --num 010 --name user-auth-v2 "Add user authentication system"
161
- # Creates: 010-user-auth-v2
162
-
163
- # Enhanced (custom number, auto name)
164
- .specify/scripts/bash/create-feature-enhanced.sh --num 007 "Add user authentication system"
165
- # Creates: 007-add-user-authentication
166
- ```
167
-
168
- **Benefits**:
169
- - Match feature numbers to issue/ticket numbers
170
- - Use shorter, clearer names
171
- - Support feature name conventions (e.g., `api-`, `ui-`, `db-` prefixes)
172
-
173
- ---
174
-
175
- ## Use Cases
176
-
177
- ### Solo Developer with AI Agent
178
- **Install**: `--recommended` (includes project-kit)
179
- **Use**: `/orient` at start of every session (essential!)
180
-
181
- ### Team with Multiple Agents
182
- **Install**: `--recommended` + `--kit=multiagent`
183
- **Use**: `/orient` + `/review` before committing
184
-
185
- ### Security-Focused Project
186
- **Install**: `--recommended`
187
- **Use**: `/audit` regularly, `/review` on every change
188
-
189
- ### Custom Workflow Needs
190
- **Install**: `--kit=project`
191
- **Use**: Enhanced scripts for precise feature naming
192
-
193
- ---
194
-
195
- ## Configuration
196
-
197
- No configuration needed - works out of the box.
198
-
199
- **Optional customization**:
200
- - Edit `.github/copilot-instructions.md` - Affects `/orient` output
201
- - Edit `.specify/memory/constitution.md` - Project principles for `/review`
202
-
203
- ---
204
-
205
- ## Dependencies
206
-
207
- **None** - project-kit is standalone.
208
-
209
- **Note**: multiagent-kit recommends project-kit for `/review` and best practices.
210
-
211
- ---
212
-
213
- ## Compatibility
214
-
215
- - ✅ **Agents**: Claude Code, GitHub Copilot
216
- - ✅ **Platforms**: Linux, macOS, Windows
217
- - ✅ **Shells**: Bash, PowerShell
218
- - ✅ **Vanilla safe**: Only adds new files, never modifies existing
219
-
220
- ---
221
-
222
- ## Uninstall
223
-
224
- ```bash
225
- lite-kits remove -Kit project
226
- ```
227
-
228
- Removes:
229
- - `.claude/commands/{orient,review,audit,stats}.md`
230
- - `.github/prompts/{orient,review,audit,stats}.prompt.md`
231
- - `.specify/scripts/{bash,powershell}/create-feature-enhanced.{sh,ps1}`
232
-
233
- ---
234
-
235
- ## Future Enhancements
236
-
237
- Considering for project-kit:
238
- - `/docs` - Generate/update documentation
239
- - `/history` - Show project timeline
240
- - `/dependencies` - Dependency analysis
241
- - `/performance` - Performance profiling
242
- - Template library (api, cli, library, frontend feature templates)
243
-
244
- Suggest more in [GitHub Discussions](https://github.com/tmorgan181/spec-kit-multiagent-lite/discussions).