lite-kits 0.1.1__py3-none-any.whl → 0.3.2__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.
- lite_kits/__init__.py +56 -4
- lite_kits/cli.py +782 -189
- lite_kits/core/__init__.py +6 -0
- lite_kits/core/banner.py +1 -1
- lite_kits/core/conflict_checker.py +115 -0
- lite_kits/core/detector.py +177 -0
- lite_kits/core/installer.py +242 -351
- lite_kits/core/manifest.py +146 -146
- lite_kits/core/validator.py +183 -0
- lite_kits/kits/README.md +6 -6
- lite_kits/kits/dev/README.md +241 -241
- lite_kits/kits/dev/{claude/commands → commands/.claude}/audit.md +143 -143
- lite_kits/kits/dev/{claude/commands → commands/.claude}/cleanup.md +2 -2
- lite_kits/kits/{git/claude/commands → dev/commands/.claude}/commit.md +2 -2
- lite_kits/kits/{project/claude/commands → dev/commands/.claude}/orient.md +3 -4
- lite_kits/kits/{git/claude/commands → dev/commands/.claude}/pr.md +1 -1
- lite_kits/kits/{git/claude/commands → dev/commands/.claude}/review.md +202 -202
- lite_kits/kits/{project/claude/commands → dev/commands/.claude}/stats.md +162 -162
- lite_kits/kits/{project/github/prompts → dev/commands/.github}/audit.prompt.md +143 -143
- lite_kits/kits/{git/github/prompts → dev/commands/.github}/cleanup.prompt.md +2 -2
- lite_kits/kits/{git/github/prompts → dev/commands/.github}/commit.prompt.md +2 -2
- lite_kits/kits/dev/{github/prompts → commands/.github}/orient.prompt.md +3 -4
- lite_kits/kits/{git/github/prompts → dev/commands/.github}/pr.prompt.md +1 -1
- lite_kits/kits/{git/github/prompts → dev/commands/.github}/review.prompt.md +202 -202
- lite_kits/kits/dev/{github/prompts → commands/.github}/stats.prompt.md +163 -163
- lite_kits/kits/kits.yaml +497 -180
- lite_kits/kits/multiagent/README.md +6 -6
- lite_kits/kits/multiagent/{claude/commands → commands/.claude}/sync.md +331 -331
- lite_kits/kits/multiagent/{github/prompts → commands/.github}/sync.prompt.md +73 -69
- lite_kits/kits/multiagent/memory/git-worktrees-protocol.md +370 -370
- lite_kits/kits/multiagent/memory/parallel-work-protocol.md +536 -536
- lite_kits/kits/multiagent/memory/pr-workflow-guide.md +275 -275
- lite_kits/kits/multiagent/templates/collaboration-structure/README.md +166 -166
- lite_kits/kits/multiagent/templates/decision.md +79 -79
- lite_kits/kits/multiagent/templates/handoff.md +95 -95
- lite_kits/kits/multiagent/templates/session-log.md +68 -68
- lite_kits-0.3.2.dist-info/METADATA +259 -0
- lite_kits-0.3.2.dist-info/RECORD +41 -0
- {lite_kits-0.1.1.dist-info → lite_kits-0.3.2.dist-info}/licenses/LICENSE +21 -21
- lite_kits/kits/dev/claude/commands/commit.md +0 -612
- lite_kits/kits/dev/claude/commands/orient.md +0 -146
- lite_kits/kits/dev/claude/commands/pr.md +0 -593
- lite_kits/kits/dev/claude/commands/review.md +0 -202
- lite_kits/kits/dev/claude/commands/stats.md +0 -162
- lite_kits/kits/dev/github/prompts/audit.prompt.md +0 -143
- lite_kits/kits/dev/github/prompts/cleanup.prompt.md +0 -382
- lite_kits/kits/dev/github/prompts/commit.prompt.md +0 -591
- lite_kits/kits/dev/github/prompts/pr.prompt.md +0 -603
- lite_kits/kits/dev/github/prompts/review.prompt.md +0 -202
- lite_kits/kits/git/README.md +0 -365
- lite_kits/kits/git/claude/commands/cleanup.md +0 -361
- lite_kits/kits/git/scripts/bash/get-git-context.sh +0 -208
- lite_kits/kits/git/scripts/powershell/Get-GitContext.ps1 +0 -242
- lite_kits/kits/project/README.md +0 -228
- lite_kits/kits/project/claude/commands/audit.md +0 -143
- lite_kits/kits/project/claude/commands/review.md +0 -112
- lite_kits/kits/project/github/prompts/orient.prompt.md +0 -150
- lite_kits/kits/project/github/prompts/review.prompt.md +0 -112
- lite_kits/kits/project/github/prompts/stats.prompt.md +0 -163
- lite_kits-0.1.1.dist-info/METADATA +0 -447
- lite_kits-0.1.1.dist-info/RECORD +0 -58
- {lite_kits-0.1.1.dist-info → lite_kits-0.3.2.dist-info}/WHEEL +0 -0
- {lite_kits-0.1.1.dist-info → lite_kits-0.3.2.dist-info}/entry_points.txt +0 -0
@@ -1,331 +1,331 @@
|
|
1
|
-
---
|
2
|
-
description: Check multi-agent sync status with ASCII visualization
|
3
|
-
---
|
4
|
-
|
5
|
-
# Multi-Agent Sync Status
|
6
|
-
|
7
|
-
**Purpose**: Visualize git sync status and multi-agent coordination state.
|
8
|
-
|
9
|
-
## Execution Steps
|
10
|
-
|
11
|
-
### 1. Check Git Status
|
12
|
-
|
13
|
-
```bash
|
14
|
-
# Current branch
|
15
|
-
CURRENT_BRANCH=$(git branch --show-current)
|
16
|
-
|
17
|
-
# Check if tracking remote
|
18
|
-
REMOTE_BRANCH=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)
|
19
|
-
|
20
|
-
# Commits ahead/behind
|
21
|
-
if [ -n "$REMOTE_BRANCH" ]; then
|
22
|
-
AHEAD=$(git rev-list --count $REMOTE_BRANCH..HEAD)
|
23
|
-
BEHIND=$(git rev-list --count HEAD..$REMOTE_BRANCH)
|
24
|
-
else
|
25
|
-
AHEAD="N/A"
|
26
|
-
BEHIND="N/A"
|
27
|
-
fi
|
28
|
-
|
29
|
-
# Uncommitted changes
|
30
|
-
MODIFIED=$(git status --short | wc -l)
|
31
|
-
UNTRACKED=$(git ls-files --others --exclude-standard | wc -l)
|
32
|
-
```
|
33
|
-
|
34
|
-
### 2. Detect Multi-Agent Activity
|
35
|
-
|
36
|
-
```bash
|
37
|
-
# Check for recent commits by different agents
|
38
|
-
git log --since="7 days ago" --format="%b" | grep "via.*@" | sort -u
|
39
|
-
|
40
|
-
# Count commits by agent
|
41
|
-
echo "Recent activity (last 7 days):"
|
42
|
-
git log --since="7 days ago" --format="%b" | \
|
43
|
-
grep "via.*@" | \
|
44
|
-
sed 's/.*via \(.*\)/\1/' | \
|
45
|
-
sort | uniq -c | sort -rn
|
46
|
-
```
|
47
|
-
|
48
|
-
### 3. Check Collaboration Structure
|
49
|
-
|
50
|
-
```bash
|
51
|
-
# Find active collaboration directories
|
52
|
-
if [ -d "specs" ]; then
|
53
|
-
# List active sessions
|
54
|
-
SESSION_COUNT=$(find specs/*/collaboration/active/sessions -name "*.md" 2>/dev/null | wc -l)
|
55
|
-
|
56
|
-
# List pending handoffs
|
57
|
-
HANDOFF_COUNT=$(find specs/*/collaboration/active/decisions -name "handoff-*.md" 2>/dev/null | wc -l)
|
58
|
-
|
59
|
-
# List active features
|
60
|
-
FEATURES=$(find specs -maxdepth 1 -type d -name "[0-9]*" | wc -l)
|
61
|
-
else
|
62
|
-
SESSION_COUNT=0
|
63
|
-
HANDOFF_COUNT=0
|
64
|
-
FEATURES=0
|
65
|
-
fi
|
66
|
-
```
|
67
|
-
|
68
|
-
### 4. Generate ASCII Visualization
|
69
|
-
|
70
|
-
Create a visual representation of sync status:
|
71
|
-
|
72
|
-
```
|
73
|
-
===========================================================
|
74
|
-
Multi-Agent Sync Status
|
75
|
-
===========================================================
|
76
|
-
|
77
|
-
Branch: dev/001-starter-kits
|
78
|
-
Remote: origin/dev/001-starter-kits
|
79
|
-
|
80
|
-
Local Remote
|
81
|
-
↓ ↓
|
82
|
-
┌─────┐ ┌─────┐
|
83
|
-
│ ●●● │ ←──(2 behind)── │ ●● │
|
84
|
-
│ ●● │ ──(3 ahead)───→ │ │
|
85
|
-
└─────┘ └─────┘
|
86
|
-
|
87
|
-
3 commits to push
|
88
|
-
2 commits to pull
|
89
|
-
5 uncommitted changes
|
90
|
-
|
91
|
-
===========================================================
|
92
|
-
Agent Activity (last 7 days):
|
93
|
-
===========================================================
|
94
|
-
|
95
|
-
claude-code ████████████ 12 commits
|
96
|
-
github-copilot-cli ████████ 8 commits
|
97
|
-
|
98
|
-
===========================================================
|
99
|
-
Collaboration Status:
|
100
|
-
===========================================================
|
101
|
-
|
102
|
-
Active features: 3
|
103
|
-
Active sessions: 2
|
104
|
-
Pending handoffs: 1 ⚠
|
105
|
-
|
106
|
-
===========================================================
|
107
|
-
```
|
108
|
-
|
109
|
-
### 5. Check for Conflicts
|
110
|
-
|
111
|
-
```bash
|
112
|
-
# Check if there are merge conflicts
|
113
|
-
if git ls-files -u | wc -l | grep -q "^0$"; then
|
114
|
-
echo "✓ No merge conflicts"
|
115
|
-
else
|
116
|
-
echo "⚠ Merge conflicts detected"
|
117
|
-
git diff --name-only --diff-filter=U
|
118
|
-
fi
|
119
|
-
```
|
120
|
-
|
121
|
-
### 6. Provide Sync Recommendations
|
122
|
-
|
123
|
-
Based on the status, suggest actions:
|
124
|
-
|
125
|
-
**If commits to pull**:
|
126
|
-
```
|
127
|
-
⚠ You are behind the remote branch
|
128
|
-
|
129
|
-
Recommended action:
|
130
|
-
git pull origin $CURRENT_BRANCH
|
131
|
-
|
132
|
-
Or if you have local commits:
|
133
|
-
git pull --rebase origin $CURRENT_BRANCH
|
134
|
-
```
|
135
|
-
|
136
|
-
**If commits to push**:
|
137
|
-
```
|
138
|
-
✓ You have commits to push
|
139
|
-
|
140
|
-
Recommended action:
|
141
|
-
git push origin $CURRENT_BRANCH
|
142
|
-
```
|
143
|
-
|
144
|
-
**If handoffs pending**:
|
145
|
-
```
|
146
|
-
⚠ Pending handoff detected
|
147
|
-
|
148
|
-
Review handoff:
|
149
|
-
cat specs/*/collaboration/active/decisions/handoff-*.md
|
150
|
-
|
151
|
-
Accept handoff:
|
152
|
-
1. Review the handoff document
|
153
|
-
2. Create session log for your work
|
154
|
-
3. Remove handoff file when complete
|
155
|
-
```
|
156
|
-
|
157
|
-
**If diverged (both ahead and behind)**:
|
158
|
-
```
|
159
|
-
⚠ Branches have diverged
|
160
|
-
|
161
|
-
You have local commits AND remote has new commits.
|
162
|
-
|
163
|
-
Recommended actions:
|
164
|
-
1. Review remote changes: git fetch && git log HEAD..origin/$CURRENT_BRANCH
|
165
|
-
2. Pull with rebase: git pull --rebase origin $CURRENT_BRANCH
|
166
|
-
3. Resolve conflicts if any
|
167
|
-
4. Push: git push origin $CURRENT_BRANCH
|
168
|
-
```
|
169
|
-
|
170
|
-
### 7. Session Log Status
|
171
|
-
|
172
|
-
If multiagent-kit installed, check session logs:
|
173
|
-
|
174
|
-
```bash
|
175
|
-
# Find today's session log
|
176
|
-
TODAY=$(date +%Y-%m-%d)
|
177
|
-
AGENT="claude-code" # or "github-copilot-cli"
|
178
|
-
|
179
|
-
SESSION_LOG=$(find specs/*/collaboration/active/sessions -name "${TODAY}*${AGENT}*.md" 2>/dev/null | head -1)
|
180
|
-
|
181
|
-
if [ -n "$SESSION_LOG" ]; then
|
182
|
-
echo "✓ Session log exists: $SESSION_LOG"
|
183
|
-
else
|
184
|
-
echo "⚠ No session log for today"
|
185
|
-
echo " Create one: specs/<feature>/collaboration/active/sessions/${TODAY}-${AGENT}.md"
|
186
|
-
fi
|
187
|
-
```
|
188
|
-
|
189
|
-
## Output Examples
|
190
|
-
|
191
|
-
### Example 1: Clean Sync
|
192
|
-
|
193
|
-
```
|
194
|
-
===========================================================
|
195
|
-
Multi-Agent Sync Status
|
196
|
-
===========================================================
|
197
|
-
|
198
|
-
Branch: dev/001-starter-kits
|
199
|
-
Remote: origin/dev/001-starter-kits
|
200
|
-
|
201
|
-
Local Remote
|
202
|
-
↓ ↓
|
203
|
-
┌─────┐ ┌─────┐
|
204
|
-
│ ●●● │ ===(in sync)=== │ ●●● │
|
205
|
-
└─────┘ └─────┘
|
206
|
-
|
207
|
-
✓ Up to date with remote
|
208
|
-
✓ No uncommitted changes
|
209
|
-
|
210
|
-
===========================================================
|
211
|
-
Agent Activity (last 7 days):
|
212
|
-
===========================================================
|
213
|
-
|
214
|
-
claude-code ████████████ 12 commits
|
215
|
-
|
216
|
-
===========================================================
|
217
|
-
Collaboration Status:
|
218
|
-
===========================================================
|
219
|
-
|
220
|
-
Active features: 1
|
221
|
-
Active sessions: 1
|
222
|
-
Pending handoffs: 0
|
223
|
-
|
224
|
-
✓ All in sync, ready to work!
|
225
|
-
===========================================================
|
226
|
-
```
|
227
|
-
|
228
|
-
### Example 2: Needs Sync
|
229
|
-
|
230
|
-
```
|
231
|
-
===========================================================
|
232
|
-
Multi-Agent Sync Status
|
233
|
-
===========================================================
|
234
|
-
|
235
|
-
Branch: dev/002-blog-feature
|
236
|
-
Remote: origin/dev/002-blog-feature
|
237
|
-
|
238
|
-
Local Remote
|
239
|
-
↓ ↓
|
240
|
-
┌─────┐ ┌─────┐
|
241
|
-
│ ● │ ←──(1 behind)── │ ●● │
|
242
|
-
│ │ ──(0 ahead)───→ │ ● │
|
243
|
-
└─────┘ └─────┘
|
244
|
-
|
245
|
-
⚠ 1 commit to pull
|
246
|
-
2 uncommitted changes
|
247
|
-
|
248
|
-
===========================================================
|
249
|
-
Agent Activity (last 7 days):
|
250
|
-
===========================================================
|
251
|
-
|
252
|
-
github-copilot-cli ████████ 5 commits (most recent)
|
253
|
-
claude-code ████ 3 commits
|
254
|
-
|
255
|
-
===========================================================
|
256
|
-
Collaboration Status:
|
257
|
-
===========================================================
|
258
|
-
|
259
|
-
Active features: 1
|
260
|
-
Active sessions: 2
|
261
|
-
Pending handoffs: 1 ⚠
|
262
|
-
|
263
|
-
Handoff found:
|
264
|
-
specs/002-blog-feature/collaboration/active/decisions/handoff-to-claude.md
|
265
|
-
|
266
|
-
===========================================================
|
267
|
-
Recommended Actions:
|
268
|
-
===========================================================
|
269
|
-
|
270
|
-
1. Review handoff: cat specs/002-blog-feature/collaboration/active/decisions/handoff-to-claude.md
|
271
|
-
2. Pull latest: git pull origin dev/002-blog-feature
|
272
|
-
3. Review changes: git log -1 origin/dev/002-blog-feature
|
273
|
-
4. Start work on handoff items
|
274
|
-
|
275
|
-
===========================================================
|
276
|
-
```
|
277
|
-
|
278
|
-
## Advanced Features
|
279
|
-
|
280
|
-
### Check Worktree Status
|
281
|
-
|
282
|
-
If working with worktrees:
|
283
|
-
|
284
|
-
```bash
|
285
|
-
# List all worktrees
|
286
|
-
git worktree list
|
287
|
-
|
288
|
-
# Check which worktrees are active
|
289
|
-
for worktree in $(git worktree list --porcelain | grep "worktree" | cut -d' ' -f2); do
|
290
|
-
echo "Worktree: $worktree"
|
291
|
-
cd "$worktree"
|
292
|
-
git status --short
|
293
|
-
cd - > /dev/null
|
294
|
-
done
|
295
|
-
```
|
296
|
-
|
297
|
-
### Compare with Other Branches
|
298
|
-
|
299
|
-
```bash
|
300
|
-
# Compare with main
|
301
|
-
git log main..HEAD --oneline --format="%h %s (via %b)" | grep "via"
|
302
|
-
|
303
|
-
# Show what's new in main since you branched
|
304
|
-
git log HEAD..main --oneline
|
305
|
-
```
|
306
|
-
|
307
|
-
### Check for Stale Branches
|
308
|
-
|
309
|
-
```bash
|
310
|
-
# List branches not updated in 30 days
|
311
|
-
git for-each-ref --format='%(refname:short) %(committerdate:relative)' \
|
312
|
-
refs/heads/ | grep -E '(weeks|months|years) ago'
|
313
|
-
```
|
314
|
-
|
315
|
-
## Important Notes
|
316
|
-
|
317
|
-
- **Read-only**: This command never modifies git state
|
318
|
-
- **Fast**: Only checks status, doesn't fetch from remote
|
319
|
-
- **Visual**: ASCII art helps quickly understand sync state
|
320
|
-
- **Multi-agent aware**: Highlights collaboration indicators
|
321
|
-
- **Actionable**: Provides specific next steps
|
322
|
-
|
323
|
-
## Integration with /orient
|
324
|
-
|
325
|
-
The `/sync` command complements `/orient`:
|
326
|
-
- `/orient` - Initial orientation when starting work
|
327
|
-
- `/sync` - Check status during work session
|
328
|
-
- `/commit` - Save work with attribution
|
329
|
-
- `/pr` - Create pull request when done
|
330
|
-
|
331
|
-
Use `/sync` frequently during multi-agent sessions to stay coordinated!
|
1
|
+
---
|
2
|
+
description: Check multi-agent sync status with ASCII visualization
|
3
|
+
---
|
4
|
+
|
5
|
+
# Multi-Agent Sync Status
|
6
|
+
|
7
|
+
**Purpose**: Visualize git sync status and multi-agent coordination state.
|
8
|
+
|
9
|
+
## Execution Steps
|
10
|
+
|
11
|
+
### 1. Check Git Status
|
12
|
+
|
13
|
+
```bash
|
14
|
+
# Current branch
|
15
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
16
|
+
|
17
|
+
# Check if tracking remote
|
18
|
+
REMOTE_BRANCH=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)
|
19
|
+
|
20
|
+
# Commits ahead/behind
|
21
|
+
if [ -n "$REMOTE_BRANCH" ]; then
|
22
|
+
AHEAD=$(git rev-list --count $REMOTE_BRANCH..HEAD)
|
23
|
+
BEHIND=$(git rev-list --count HEAD..$REMOTE_BRANCH)
|
24
|
+
else
|
25
|
+
AHEAD="N/A"
|
26
|
+
BEHIND="N/A"
|
27
|
+
fi
|
28
|
+
|
29
|
+
# Uncommitted changes
|
30
|
+
MODIFIED=$(git status --short | wc -l)
|
31
|
+
UNTRACKED=$(git ls-files --others --exclude-standard | wc -l)
|
32
|
+
```
|
33
|
+
|
34
|
+
### 2. Detect Multi-Agent Activity
|
35
|
+
|
36
|
+
```bash
|
37
|
+
# Check for recent commits by different agents
|
38
|
+
git log --since="7 days ago" --format="%b" | grep "via.*@" | sort -u
|
39
|
+
|
40
|
+
# Count commits by agent
|
41
|
+
echo "Recent activity (last 7 days):"
|
42
|
+
git log --since="7 days ago" --format="%b" | \
|
43
|
+
grep "via.*@" | \
|
44
|
+
sed 's/.*via \(.*\)/\1/' | \
|
45
|
+
sort | uniq -c | sort -rn
|
46
|
+
```
|
47
|
+
|
48
|
+
### 3. Check Collaboration Structure
|
49
|
+
|
50
|
+
```bash
|
51
|
+
# Find active collaboration directories
|
52
|
+
if [ -d "specs" ]; then
|
53
|
+
# List active sessions
|
54
|
+
SESSION_COUNT=$(find specs/*/collaboration/active/sessions -name "*.md" 2>/dev/null | wc -l)
|
55
|
+
|
56
|
+
# List pending handoffs
|
57
|
+
HANDOFF_COUNT=$(find specs/*/collaboration/active/decisions -name "handoff-*.md" 2>/dev/null | wc -l)
|
58
|
+
|
59
|
+
# List active features
|
60
|
+
FEATURES=$(find specs -maxdepth 1 -type d -name "[0-9]*" | wc -l)
|
61
|
+
else
|
62
|
+
SESSION_COUNT=0
|
63
|
+
HANDOFF_COUNT=0
|
64
|
+
FEATURES=0
|
65
|
+
fi
|
66
|
+
```
|
67
|
+
|
68
|
+
### 4. Generate ASCII Visualization
|
69
|
+
|
70
|
+
Create a visual representation of sync status:
|
71
|
+
|
72
|
+
```
|
73
|
+
===========================================================
|
74
|
+
Multi-Agent Sync Status
|
75
|
+
===========================================================
|
76
|
+
|
77
|
+
Branch: dev/001-starter-kits
|
78
|
+
Remote: origin/dev/001-starter-kits
|
79
|
+
|
80
|
+
Local Remote
|
81
|
+
↓ ↓
|
82
|
+
┌─────┐ ┌─────┐
|
83
|
+
│ ●●● │ ←──(2 behind)── │ ●● │
|
84
|
+
│ ●● │ ──(3 ahead)───→ │ │
|
85
|
+
└─────┘ └─────┘
|
86
|
+
|
87
|
+
3 commits to push
|
88
|
+
2 commits to pull
|
89
|
+
5 uncommitted changes
|
90
|
+
|
91
|
+
===========================================================
|
92
|
+
Agent Activity (last 7 days):
|
93
|
+
===========================================================
|
94
|
+
|
95
|
+
claude-code ████████████ 12 commits
|
96
|
+
github-copilot-cli ████████ 8 commits
|
97
|
+
|
98
|
+
===========================================================
|
99
|
+
Collaboration Status:
|
100
|
+
===========================================================
|
101
|
+
|
102
|
+
Active features: 3
|
103
|
+
Active sessions: 2
|
104
|
+
Pending handoffs: 1 ⚠
|
105
|
+
|
106
|
+
===========================================================
|
107
|
+
```
|
108
|
+
|
109
|
+
### 5. Check for Conflicts
|
110
|
+
|
111
|
+
```bash
|
112
|
+
# Check if there are merge conflicts
|
113
|
+
if git ls-files -u | wc -l | grep -q "^0$"; then
|
114
|
+
echo "✓ No merge conflicts"
|
115
|
+
else
|
116
|
+
echo "⚠ Merge conflicts detected"
|
117
|
+
git diff --name-only --diff-filter=U
|
118
|
+
fi
|
119
|
+
```
|
120
|
+
|
121
|
+
### 6. Provide Sync Recommendations
|
122
|
+
|
123
|
+
Based on the status, suggest actions:
|
124
|
+
|
125
|
+
**If commits to pull**:
|
126
|
+
```
|
127
|
+
⚠ You are behind the remote branch
|
128
|
+
|
129
|
+
Recommended action:
|
130
|
+
git pull origin $CURRENT_BRANCH
|
131
|
+
|
132
|
+
Or if you have local commits:
|
133
|
+
git pull --rebase origin $CURRENT_BRANCH
|
134
|
+
```
|
135
|
+
|
136
|
+
**If commits to push**:
|
137
|
+
```
|
138
|
+
✓ You have commits to push
|
139
|
+
|
140
|
+
Recommended action:
|
141
|
+
git push origin $CURRENT_BRANCH
|
142
|
+
```
|
143
|
+
|
144
|
+
**If handoffs pending**:
|
145
|
+
```
|
146
|
+
⚠ Pending handoff detected
|
147
|
+
|
148
|
+
Review handoff:
|
149
|
+
cat specs/*/collaboration/active/decisions/handoff-*.md
|
150
|
+
|
151
|
+
Accept handoff:
|
152
|
+
1. Review the handoff document
|
153
|
+
2. Create session log for your work
|
154
|
+
3. Remove handoff file when complete
|
155
|
+
```
|
156
|
+
|
157
|
+
**If diverged (both ahead and behind)**:
|
158
|
+
```
|
159
|
+
⚠ Branches have diverged
|
160
|
+
|
161
|
+
You have local commits AND remote has new commits.
|
162
|
+
|
163
|
+
Recommended actions:
|
164
|
+
1. Review remote changes: git fetch && git log HEAD..origin/$CURRENT_BRANCH
|
165
|
+
2. Pull with rebase: git pull --rebase origin $CURRENT_BRANCH
|
166
|
+
3. Resolve conflicts if any
|
167
|
+
4. Push: git push origin $CURRENT_BRANCH
|
168
|
+
```
|
169
|
+
|
170
|
+
### 7. Session Log Status
|
171
|
+
|
172
|
+
If multiagent-kit installed, check session logs:
|
173
|
+
|
174
|
+
```bash
|
175
|
+
# Find today's session log
|
176
|
+
TODAY=$(date +%Y-%m-%d)
|
177
|
+
AGENT="claude-code" # or "github-copilot-cli"
|
178
|
+
|
179
|
+
SESSION_LOG=$(find specs/*/collaboration/active/sessions -name "${TODAY}*${AGENT}*.md" 2>/dev/null | head -1)
|
180
|
+
|
181
|
+
if [ -n "$SESSION_LOG" ]; then
|
182
|
+
echo "✓ Session log exists: $SESSION_LOG"
|
183
|
+
else
|
184
|
+
echo "⚠ No session log for today"
|
185
|
+
echo " Create one: specs/<feature>/collaboration/active/sessions/${TODAY}-${AGENT}.md"
|
186
|
+
fi
|
187
|
+
```
|
188
|
+
|
189
|
+
## Output Examples
|
190
|
+
|
191
|
+
### Example 1: Clean Sync
|
192
|
+
|
193
|
+
```
|
194
|
+
===========================================================
|
195
|
+
Multi-Agent Sync Status
|
196
|
+
===========================================================
|
197
|
+
|
198
|
+
Branch: dev/001-starter-kits
|
199
|
+
Remote: origin/dev/001-starter-kits
|
200
|
+
|
201
|
+
Local Remote
|
202
|
+
↓ ↓
|
203
|
+
┌─────┐ ┌─────┐
|
204
|
+
│ ●●● │ ===(in sync)=== │ ●●● │
|
205
|
+
└─────┘ └─────┘
|
206
|
+
|
207
|
+
✓ Up to date with remote
|
208
|
+
✓ No uncommitted changes
|
209
|
+
|
210
|
+
===========================================================
|
211
|
+
Agent Activity (last 7 days):
|
212
|
+
===========================================================
|
213
|
+
|
214
|
+
claude-code ████████████ 12 commits
|
215
|
+
|
216
|
+
===========================================================
|
217
|
+
Collaboration Status:
|
218
|
+
===========================================================
|
219
|
+
|
220
|
+
Active features: 1
|
221
|
+
Active sessions: 1
|
222
|
+
Pending handoffs: 0
|
223
|
+
|
224
|
+
✓ All in sync, ready to work!
|
225
|
+
===========================================================
|
226
|
+
```
|
227
|
+
|
228
|
+
### Example 2: Needs Sync
|
229
|
+
|
230
|
+
```
|
231
|
+
===========================================================
|
232
|
+
Multi-Agent Sync Status
|
233
|
+
===========================================================
|
234
|
+
|
235
|
+
Branch: dev/002-blog-feature
|
236
|
+
Remote: origin/dev/002-blog-feature
|
237
|
+
|
238
|
+
Local Remote
|
239
|
+
↓ ↓
|
240
|
+
┌─────┐ ┌─────┐
|
241
|
+
│ ● │ ←──(1 behind)── │ ●● │
|
242
|
+
│ │ ──(0 ahead)───→ │ ● │
|
243
|
+
└─────┘ └─────┘
|
244
|
+
|
245
|
+
⚠ 1 commit to pull
|
246
|
+
2 uncommitted changes
|
247
|
+
|
248
|
+
===========================================================
|
249
|
+
Agent Activity (last 7 days):
|
250
|
+
===========================================================
|
251
|
+
|
252
|
+
github-copilot-cli ████████ 5 commits (most recent)
|
253
|
+
claude-code ████ 3 commits
|
254
|
+
|
255
|
+
===========================================================
|
256
|
+
Collaboration Status:
|
257
|
+
===========================================================
|
258
|
+
|
259
|
+
Active features: 1
|
260
|
+
Active sessions: 2
|
261
|
+
Pending handoffs: 1 ⚠
|
262
|
+
|
263
|
+
Handoff found:
|
264
|
+
specs/002-blog-feature/collaboration/active/decisions/handoff-to-claude.md
|
265
|
+
|
266
|
+
===========================================================
|
267
|
+
Recommended Actions:
|
268
|
+
===========================================================
|
269
|
+
|
270
|
+
1. Review handoff: cat specs/002-blog-feature/collaboration/active/decisions/handoff-to-claude.md
|
271
|
+
2. Pull latest: git pull origin dev/002-blog-feature
|
272
|
+
3. Review changes: git log -1 origin/dev/002-blog-feature
|
273
|
+
4. Start work on handoff items
|
274
|
+
|
275
|
+
===========================================================
|
276
|
+
```
|
277
|
+
|
278
|
+
## Advanced Features
|
279
|
+
|
280
|
+
### Check Worktree Status
|
281
|
+
|
282
|
+
If working with worktrees:
|
283
|
+
|
284
|
+
```bash
|
285
|
+
# List all worktrees
|
286
|
+
git worktree list
|
287
|
+
|
288
|
+
# Check which worktrees are active
|
289
|
+
for worktree in $(git worktree list --porcelain | grep "worktree" | cut -d' ' -f2); do
|
290
|
+
echo "Worktree: $worktree"
|
291
|
+
cd "$worktree"
|
292
|
+
git status --short
|
293
|
+
cd - > /dev/null
|
294
|
+
done
|
295
|
+
```
|
296
|
+
|
297
|
+
### Compare with Other Branches
|
298
|
+
|
299
|
+
```bash
|
300
|
+
# Compare with main
|
301
|
+
git log main..HEAD --oneline --format="%h %s (via %b)" | grep "via"
|
302
|
+
|
303
|
+
# Show what's new in main since you branched
|
304
|
+
git log HEAD..main --oneline
|
305
|
+
```
|
306
|
+
|
307
|
+
### Check for Stale Branches
|
308
|
+
|
309
|
+
```bash
|
310
|
+
# List branches not updated in 30 days
|
311
|
+
git for-each-ref --format='%(refname:short) %(committerdate:relative)' \
|
312
|
+
refs/heads/ | grep -E '(weeks|months|years) ago'
|
313
|
+
```
|
314
|
+
|
315
|
+
## Important Notes
|
316
|
+
|
317
|
+
- **Read-only**: This command never modifies git state
|
318
|
+
- **Fast**: Only checks status, doesn't fetch from remote
|
319
|
+
- **Visual**: ASCII art helps quickly understand sync state
|
320
|
+
- **Multi-agent aware**: Highlights collaboration indicators
|
321
|
+
- **Actionable**: Provides specific next steps
|
322
|
+
|
323
|
+
## Integration with /orient
|
324
|
+
|
325
|
+
The `/sync` command complements `/orient`:
|
326
|
+
- `/orient` - Initial orientation when starting work
|
327
|
+
- `/sync` - Check status during work session
|
328
|
+
- `/commit` - Save work with attribution
|
329
|
+
- `/pr` - Create pull request when done
|
330
|
+
|
331
|
+
Use `/sync` frequently during multi-agent sessions to stay coordinated!
|