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.
Files changed (63) hide show
  1. lite_kits/__init__.py +56 -4
  2. lite_kits/cli.py +782 -189
  3. lite_kits/core/__init__.py +6 -0
  4. lite_kits/core/banner.py +1 -1
  5. lite_kits/core/conflict_checker.py +115 -0
  6. lite_kits/core/detector.py +177 -0
  7. lite_kits/core/installer.py +242 -351
  8. lite_kits/core/manifest.py +146 -146
  9. lite_kits/core/validator.py +183 -0
  10. lite_kits/kits/README.md +6 -6
  11. lite_kits/kits/dev/README.md +241 -241
  12. lite_kits/kits/dev/{claude/commands → commands/.claude}/audit.md +143 -143
  13. lite_kits/kits/dev/{claude/commands → 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 +3 -4
  16. lite_kits/kits/{git/claude/commands → dev/commands/.claude}/pr.md +1 -1
  17. lite_kits/kits/{git/claude/commands → dev/commands/.claude}/review.md +202 -202
  18. lite_kits/kits/{project/claude/commands → dev/commands/.claude}/stats.md +162 -162
  19. lite_kits/kits/{project/github/prompts → dev/commands/.github}/audit.prompt.md +143 -143
  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/dev/{github/prompts → commands/.github}/orient.prompt.md +3 -4
  23. lite_kits/kits/{git/github/prompts → dev/commands/.github}/pr.prompt.md +1 -1
  24. lite_kits/kits/{git/github/prompts → dev/commands/.github}/review.prompt.md +202 -202
  25. lite_kits/kits/dev/{github/prompts → commands/.github}/stats.prompt.md +163 -163
  26. lite_kits/kits/kits.yaml +497 -180
  27. lite_kits/kits/multiagent/README.md +6 -6
  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 -275
  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.2.dist-info/METADATA +259 -0
  38. lite_kits-0.3.2.dist-info/RECORD +41 -0
  39. {lite_kits-0.1.1.dist-info → lite_kits-0.3.2.dist-info}/licenses/LICENSE +21 -21
  40. lite_kits/kits/dev/claude/commands/commit.md +0 -612
  41. lite_kits/kits/dev/claude/commands/orient.md +0 -146
  42. lite_kits/kits/dev/claude/commands/pr.md +0 -593
  43. lite_kits/kits/dev/claude/commands/review.md +0 -202
  44. lite_kits/kits/dev/claude/commands/stats.md +0 -162
  45. lite_kits/kits/dev/github/prompts/audit.prompt.md +0 -143
  46. lite_kits/kits/dev/github/prompts/cleanup.prompt.md +0 -382
  47. lite_kits/kits/dev/github/prompts/commit.prompt.md +0 -591
  48. lite_kits/kits/dev/github/prompts/pr.prompt.md +0 -603
  49. lite_kits/kits/dev/github/prompts/review.prompt.md +0 -202
  50. lite_kits/kits/git/README.md +0 -365
  51. lite_kits/kits/git/claude/commands/cleanup.md +0 -361
  52. lite_kits/kits/git/scripts/bash/get-git-context.sh +0 -208
  53. lite_kits/kits/git/scripts/powershell/Get-GitContext.ps1 +0 -242
  54. lite_kits/kits/project/README.md +0 -228
  55. lite_kits/kits/project/claude/commands/audit.md +0 -143
  56. lite_kits/kits/project/claude/commands/review.md +0 -112
  57. lite_kits/kits/project/github/prompts/orient.prompt.md +0 -150
  58. lite_kits/kits/project/github/prompts/review.prompt.md +0 -112
  59. lite_kits/kits/project/github/prompts/stats.prompt.md +0 -163
  60. lite_kits-0.1.1.dist-info/METADATA +0 -447
  61. lite_kits-0.1.1.dist-info/RECORD +0 -58
  62. {lite_kits-0.1.1.dist-info → lite_kits-0.3.2.dist-info}/WHEEL +0 -0
  63. {lite_kits-0.1.1.dist-info → lite_kits-0.3.2.dist-info}/entry_points.txt +0 -0
@@ -1,536 +1,536 @@
1
- # Parallel Work Protocol
2
-
3
- **Purpose**: Guide for coordinating multiple AI agents working simultaneously on the same feature.
4
-
5
- ---
6
-
7
- ## When to Use Parallel Work
8
-
9
- **Good candidates**:
10
- - Backend + Frontend split
11
- - Different modules/components
12
- - Tests + Implementation
13
- - Documentation + Code
14
-
15
- **Avoid parallel work for**:
16
- - Single small files
17
- - Tightly coupled code
18
- - Experimental/exploratory work
19
- - Initial architecture decisions
20
-
21
- ---
22
-
23
- ## Setup: Define Territories
24
-
25
- Before starting parallel work, create a territory document:
26
-
27
- **File**: `specs/<feature>/collaboration/active/decisions/worktree-coordination.md`
28
-
29
- ```markdown
30
- # Worktree Territory Coordination
31
-
32
- **Feature**: <feature-name>
33
- **Date**: YYYY-MM-DD
34
- **Agents**: claude-code, github-copilot-cli
35
-
36
- ## Territory Assignments
37
-
38
- ### Agent 1: Claude Code
39
- **Focus**: Backend API implementation
40
-
41
- **Owned files/directories**:
42
- - `src/api/`
43
- - `src/models/`
44
- - `src/middleware/`
45
- - `tests/api/`
46
-
47
- **Responsible for**:
48
- - API endpoints
49
- - Database models
50
- - Authentication middleware
51
- - API tests
52
-
53
- ### Agent 2: GitHub Copilot CLI
54
- **Focus**: Frontend UI implementation
55
-
56
- **Owned files/directories**:
57
- - `src/components/`
58
- - `src/hooks/`
59
- - `src/pages/`
60
- - `tests/components/`
61
-
62
- **Responsible for**:
63
- - React components
64
- - Custom hooks
65
- - Page layouts
66
- - Component tests
67
-
68
- ## Shared Files (Coordinate before editing)
69
-
70
- **High conflict risk**:
71
- - `README.md` - Coordinate updates
72
- - `package.json` - Discuss before adding dependencies
73
- - `tsconfig.json` - Agree on config changes
74
- - `src/types/` - Shared type definitions
75
-
76
- **Protocol**: Post in decisions/ before modifying shared files
77
-
78
- ## Integration Points
79
-
80
- **Where territories meet**:
81
- - API contracts: Both agents should agree on endpoints
82
- - Type definitions: Shared types go in `src/types/shared.ts`
83
- - Error handling: Use consistent error format
84
-
85
- **Sync schedule**:
86
- - Pull from remote: Every 2 hours minimum
87
- - Push commits: After each logical unit of work
88
- - Integration check: End of each work session
89
- ```
90
-
91
- ---
92
-
93
- ## Worktree Workflow
94
-
95
- ### 1. Create Worktrees
96
-
97
- Each agent creates their own worktree:
98
-
99
- **Agent 1** (Claude Code):
100
- ```bash
101
- # From main repo
102
- git worktree add ../feature-backend <feature-branch>
103
-
104
- cd ../feature-backend
105
- # Work here on backend
106
- ```
107
-
108
- **Agent 2** (GitHub Copilot):
109
- ```bash
110
- # From main repo
111
- git worktree add ../feature-frontend <feature-branch>
112
-
113
- cd ../feature-frontend
114
- # Work here on frontend
115
- ```
116
-
117
- Both worktrees point to the **same branch** but in different directories.
118
-
119
- ### 2. Initial Sync
120
-
121
- Before starting work:
122
-
123
- ```bash
124
- # Pull latest
125
- git pull origin <feature-branch>
126
-
127
- # Verify you're on the right branch
128
- git branch --show-current
129
-
130
- # Check status
131
- git status
132
- ```
133
-
134
- ### 3. Work in Your Territory
135
-
136
- Stay in your assigned files/directories:
137
-
138
- ```bash
139
- # Your session log
140
- touch specs/<feature>/collaboration/active/sessions/$(date +%Y-%m-%d)-<agent-name>.md
141
-
142
- # Work on your files
143
- code src/api/auth.ts # or whatever you're working on
144
-
145
- # Commit frequently
146
- git add src/api/
147
- git commit -m "feat(api): Add authentication endpoint
148
-
149
- via claude-sonnet-4.5 @ claude-code"
150
-
151
- # Push regularly
152
- git push origin <feature-branch>
153
- ```
154
-
155
- ### 4. Periodic Sync
156
-
157
- **Every 2 hours** or **before making major changes**:
158
-
159
- ```bash
160
- # Save your work
161
- git add .
162
- git commit -m "WIP: Checkpoint before sync
163
-
164
- via <model> @ <agent>"
165
-
166
- # Pull changes from other agent
167
- git pull origin <feature-branch>
168
-
169
- # Resolve conflicts if any (should be rare with good territories)
170
- # ... fix conflicts ...
171
- git add .
172
- git commit -m "merge: Sync with remote
173
-
174
- via <model> @ <agent>"
175
-
176
- # Continue working
177
- ```
178
-
179
- ### 5. Resolve Conflicts
180
-
181
- If conflicts occur:
182
-
183
- **1. Identify the conflict**:
184
- ```bash
185
- git status
186
- # Shows conflicted files
187
- ```
188
-
189
- **2. Check who modified what**:
190
- ```bash
191
- git log --oneline -5 -- path/to/conflicted/file.ts
192
- # See recent changes
193
- ```
194
-
195
- **3. Communicate**:
196
- Create a decision document:
197
- ```bash
198
- cat > specs/<feature>/collaboration/active/decisions/conflict-resolution-<file>.md << EOF
199
- # Conflict: <file-name>
200
-
201
- **Date**: $(date +%Y-%m-%d)
202
- **File**: path/to/file.ts
203
- **Agents involved**: claude-code, github-copilot-cli
204
-
205
- ## Conflict Description
206
- [What conflicted and why]
207
-
208
- ## Resolution
209
- [How we're resolving it]
210
-
211
- ## Action Items
212
- - [ ] Agent 1: [what they need to do]
213
- - [ ] Agent 2: [what they need to do]
214
- EOF
215
- ```
216
-
217
- **4. Resolve**:
218
- ```bash
219
- # Edit the file to resolve conflict
220
- code path/to/file.ts
221
-
222
- # Mark as resolved
223
- git add path/to/file.ts
224
-
225
- # Commit resolution
226
- git commit -m "fix: Resolve merge conflict in <file>
227
-
228
- Conflict between <agent1> and <agent2> changes.
229
- Resolution: [brief description]
230
-
231
- via <model> @ <agent>"
232
- ```
233
-
234
- ---
235
-
236
- ## Communication Patterns
237
-
238
- ### Async Updates
239
-
240
- **Post session summaries**:
241
- After each work session, update your session log:
242
-
243
- ```bash
244
- # Update your session log
245
- echo "
246
- ## Latest Update ($(date +%H:%M))
247
-
248
- Completed:
249
- - [x] Task 1
250
- - [x] Task 2
251
-
252
- In progress:
253
- - [ ] Task 3
254
-
255
- Pushed commits:
256
- - abc1234 - Add auth endpoint
257
- - def5678 - Add validation
258
-
259
- Next: Working on Task 3
260
- " >> specs/<feature>/collaboration/active/sessions/$(date +%Y-%m-%d)-<agent>.md
261
- ```
262
-
263
- **Check for updates**:
264
- Before starting work:
265
-
266
- ```bash
267
- # See what other agent did
268
- git log --since="1 day ago" --format="%h %s %b" | grep "via"
269
-
270
- # Read their session log
271
- cat specs/<feature>/collaboration/active/sessions/$(date +%Y-%m-%d)-<other-agent>.md
272
- ```
273
-
274
- ### Sync Decisions
275
-
276
- **Before modifying shared files**:
277
-
278
- ```bash
279
- cat > specs/<feature>/collaboration/active/decisions/shared-file-mod-<name>.md << EOF
280
- # Proposed: Modify <shared-file>
281
-
282
- **By**: <agent-name>
283
- **Date**: $(date +%Y-%m-%d)
284
-
285
- ## What
286
- [What you want to change]
287
-
288
- ## Why
289
- [Reason for the change]
290
-
291
- ## Impact on other agent
292
- [How this affects their work]
293
-
294
- ## Request
295
- Please review and acknowledge before I proceed.
296
-
297
- **Status**: pending-review
298
- EOF
299
-
300
- # Then wait or proceed with caution
301
- ```
302
-
303
- ---
304
-
305
- ## Integration Testing
306
-
307
- ### End-of-Session Integration Check
308
-
309
- Before ending your work session:
310
-
311
- **1. Pull latest**:
312
- ```bash
313
- git pull origin <feature-branch>
314
- ```
315
-
316
- **2. Run full test suite**:
317
- ```bash
318
- # Both agents' tests
319
- npm test
320
-
321
- # Or your project's test command
322
- ```
323
-
324
- **3. Quick manual test**:
325
- ```bash
326
- # Start the app
327
- npm start
328
-
329
- # Test the integration between backend and frontend
330
- # Verify your changes work with other agent's changes
331
- ```
332
-
333
- **4. Report integration status**:
334
- ```bash
335
- cat > specs/<feature>/collaboration/results/validation/integration-$(date +%Y-%m-%d-%H%M).md << EOF
336
- # Integration Test Results
337
-
338
- **Date**: $(date +%Y-%m-%d %H:%M)
339
- **Tester**: <agent-name>
340
-
341
- ## Test Scenarios
342
-
343
- - [x] Scenario 1: [description] - ✓ PASS
344
- - [x] Scenario 2: [description] - ✓ PASS
345
- - [ ] Scenario 3: [description] - ⚠ ISSUES
346
-
347
- ## Issues Found
348
-
349
- 1. [Issue description]
350
- - Impact: [high/medium/low]
351
- - Assigned to: [agent-name]
352
-
353
- ## Status
354
-
355
- Overall: [PASS / FAIL / NEEDS_WORK]
356
- EOF
357
- ```
358
-
359
- ---
360
-
361
- ## Cleanup
362
-
363
- ### When Feature is Complete
364
-
365
- **1. Merge worktrees**:
366
- Both agents have been pushing to the same branch, so it's already merged.
367
-
368
- **2. Remove worktrees**:
369
- ```bash
370
- # From main repo
371
- git worktree remove ../feature-backend
372
- git worktree remove ../feature-frontend
373
-
374
- # Or from the worktree
375
- cd ../feature-backend
376
- git worktree remove .
377
- ```
378
-
379
- **3. Archive collaboration docs**:
380
- ```bash
381
- # Move session logs
382
- mv specs/<feature>/collaboration/active/sessions/*.md \
383
- specs/<feature>/collaboration/archive/sessions/
384
-
385
- # Move decisions
386
- mv specs/<feature>/collaboration/active/decisions/*.md \
387
- specs/<feature>/collaboration/archive/decisions/
388
- ```
389
-
390
- **4. Create final summary**:
391
- ```bash
392
- cat > specs/<feature>/collaboration/results/final-summary.md << EOF
393
- # Final Summary: <feature-name>
394
-
395
- **Completed**: $(date +%Y-%m-%d)
396
- **Agents**: claude-code, github-copilot-cli
397
-
398
- ## Collaboration Stats
399
-
400
- Commits by claude-code: $(git log --format="%b" | grep "claude-code" | wc -l)
401
- Commits by github-copilot-cli: $(git log --format="%b" | grep "copilot" | wc -l)
402
-
403
- Total collaboration sessions: $(ls specs/<feature>/collaboration/archive/sessions/*.md | wc -l)
404
-
405
- ## What Went Well
406
-
407
- - [Success 1]
408
- - [Success 2]
409
-
410
- ## What Could Improve
411
-
412
- - [Learning 1]
413
- - [Learning 2]
414
-
415
- ## Final Status
416
-
417
- Feature complete and ready for PR.
418
- EOF
419
- ```
420
-
421
- ---
422
-
423
- ## Best Practices
424
-
425
- ### ✓ Do
426
-
427
- - **Define territories clearly** before starting
428
- - **Commit and push frequently** (every logical unit)
429
- - **Pull before making major changes**
430
- - **Update session logs** after each work period
431
- - **Test integration** regularly
432
- - **Communicate in decision docs** for shared files
433
- - **Use consistent commit attribution**
434
-
435
- ### ✗ Don't
436
-
437
- - **Don't edit other agent's territory** without coordination
438
- - **Don't go silent** - update your session log
439
- - **Don't batch commits** - push small, frequent updates
440
- - **Don't skip conflict resolution** - address immediately
441
- - **Don't modify shared files** without posting a decision
442
- - **Don't forget to sync** - pull at least every 2 hours
443
-
444
- ---
445
-
446
- ## Troubleshooting
447
-
448
- ### "Git won't let me push"
449
-
450
- ```bash
451
- # Someone pushed before you
452
- git pull --rebase origin <feature-branch>
453
-
454
- # Fix any conflicts
455
- # Then push
456
- git push origin <feature-branch>
457
- ```
458
-
459
- ### "I accidentally edited their territory"
460
-
461
- ```bash
462
- # Create a decision doc explaining
463
- cat > specs/<feature>/collaboration/active/decisions/territory-overlap.md << EOF
464
- # Accidental Territory Overlap
465
-
466
- I accidentally modified <file> which is in <other-agent>'s territory.
467
-
468
- Changes made:
469
- - [list changes]
470
-
471
- Suggest:
472
- - [ ] Other agent review and accept
473
- - [ ] I revert and let them handle it
474
- EOF
475
-
476
- # Then coordinate with other agent
477
- ```
478
-
479
- ### "Tests are failing after merge"
480
-
481
- ```bash
482
- # Run tests to see what broke
483
- npm test
484
-
485
- # Check what changed
486
- git log -1 --stat
487
-
488
- # Create issue in decisions/
489
- cat > specs/<feature>/collaboration/active/decisions/test-failure-<date>.md << EOF
490
- # Test Failures After Merge
491
-
492
- **Date**: $(date +%Y-%m-%d)
493
-
494
- Failing tests:
495
- - test/foo.test.ts: "should handle auth"
496
-
497
- Likely cause:
498
- [Your analysis]
499
-
500
- Action:
501
- - [ ] Agent who changed related code to fix
502
- EOF
503
- ```
504
-
505
- ---
506
-
507
- ## Quick Reference
508
-
509
- ```bash
510
- # Setup
511
- git worktree add ../my-worktree <feature-branch>
512
-
513
- # Daily workflow
514
- git pull origin <feature-branch> # Start of session
515
- # ... work ...
516
- git add . && git commit -m "..." # Frequently
517
- git push origin <feature-branch> # After each commit
518
-
519
- # Sync
520
- git pull origin <feature-branch> # Every 2 hours
521
-
522
- # Check other agent's work
523
- git log --since="1 day ago" --format="%h %s %b" | grep "via"
524
-
525
- # End session
526
- git push origin <feature-branch>
527
- # Update session log
528
- # Run integration tests
529
-
530
- # Cleanup
531
- git worktree remove ../my-worktree
532
- ```
533
-
534
- ---
535
-
536
- **Remember**: Good territories + frequent syncs + clear communication = smooth parallel work!
1
+ # Parallel Work Protocol
2
+
3
+ **Purpose**: Guide for coordinating multiple AI agents working simultaneously on the same feature.
4
+
5
+ ---
6
+
7
+ ## When to Use Parallel Work
8
+
9
+ **Good candidates**:
10
+ - Backend + Frontend split
11
+ - Different modules/components
12
+ - Tests + Implementation
13
+ - Documentation + Code
14
+
15
+ **Avoid parallel work for**:
16
+ - Single small files
17
+ - Tightly coupled code
18
+ - Experimental/exploratory work
19
+ - Initial architecture decisions
20
+
21
+ ---
22
+
23
+ ## Setup: Define Territories
24
+
25
+ Before starting parallel work, create a territory document:
26
+
27
+ **File**: `specs/<feature>/collaboration/active/decisions/worktree-coordination.md`
28
+
29
+ ```markdown
30
+ # Worktree Territory Coordination
31
+
32
+ **Feature**: <feature-name>
33
+ **Date**: YYYY-MM-DD
34
+ **Agents**: claude-code, github-copilot-cli
35
+
36
+ ## Territory Assignments
37
+
38
+ ### Agent 1: Claude Code
39
+ **Focus**: Backend API implementation
40
+
41
+ **Owned files/directories**:
42
+ - `src/api/`
43
+ - `src/models/`
44
+ - `src/middleware/`
45
+ - `tests/api/`
46
+
47
+ **Responsible for**:
48
+ - API endpoints
49
+ - Database models
50
+ - Authentication middleware
51
+ - API tests
52
+
53
+ ### Agent 2: GitHub Copilot CLI
54
+ **Focus**: Frontend UI implementation
55
+
56
+ **Owned files/directories**:
57
+ - `src/components/`
58
+ - `src/hooks/`
59
+ - `src/pages/`
60
+ - `tests/components/`
61
+
62
+ **Responsible for**:
63
+ - React components
64
+ - Custom hooks
65
+ - Page layouts
66
+ - Component tests
67
+
68
+ ## Shared Files (Coordinate before editing)
69
+
70
+ **High conflict risk**:
71
+ - `README.md` - Coordinate updates
72
+ - `package.json` - Discuss before adding dependencies
73
+ - `tsconfig.json` - Agree on config changes
74
+ - `src/types/` - Shared type definitions
75
+
76
+ **Protocol**: Post in decisions/ before modifying shared files
77
+
78
+ ## Integration Points
79
+
80
+ **Where territories meet**:
81
+ - API contracts: Both agents should agree on endpoints
82
+ - Type definitions: Shared types go in `src/types/shared.ts`
83
+ - Error handling: Use consistent error format
84
+
85
+ **Sync schedule**:
86
+ - Pull from remote: Every 2 hours minimum
87
+ - Push commits: After each logical unit of work
88
+ - Integration check: End of each work session
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Worktree Workflow
94
+
95
+ ### 1. Create Worktrees
96
+
97
+ Each agent creates their own worktree:
98
+
99
+ **Agent 1** (Claude Code):
100
+ ```bash
101
+ # From main repo
102
+ git worktree add ../feature-backend <feature-branch>
103
+
104
+ cd ../feature-backend
105
+ # Work here on backend
106
+ ```
107
+
108
+ **Agent 2** (GitHub Copilot):
109
+ ```bash
110
+ # From main repo
111
+ git worktree add ../feature-frontend <feature-branch>
112
+
113
+ cd ../feature-frontend
114
+ # Work here on frontend
115
+ ```
116
+
117
+ Both worktrees point to the **same branch** but in different directories.
118
+
119
+ ### 2. Initial Sync
120
+
121
+ Before starting work:
122
+
123
+ ```bash
124
+ # Pull latest
125
+ git pull origin <feature-branch>
126
+
127
+ # Verify you're on the right branch
128
+ git branch --show-current
129
+
130
+ # Check status
131
+ git status
132
+ ```
133
+
134
+ ### 3. Work in Your Territory
135
+
136
+ Stay in your assigned files/directories:
137
+
138
+ ```bash
139
+ # Your session log
140
+ touch specs/<feature>/collaboration/active/sessions/$(date +%Y-%m-%d)-<agent-name>.md
141
+
142
+ # Work on your files
143
+ code src/api/auth.ts # or whatever you're working on
144
+
145
+ # Commit frequently
146
+ git add src/api/
147
+ git commit -m "feat(api): Add authentication endpoint
148
+
149
+ via claude-sonnet-4.5 @ claude-code"
150
+
151
+ # Push regularly
152
+ git push origin <feature-branch>
153
+ ```
154
+
155
+ ### 4. Periodic Sync
156
+
157
+ **Every 2 hours** or **before making major changes**:
158
+
159
+ ```bash
160
+ # Save your work
161
+ git add .
162
+ git commit -m "WIP: Checkpoint before sync
163
+
164
+ via <model> @ <agent>"
165
+
166
+ # Pull changes from other agent
167
+ git pull origin <feature-branch>
168
+
169
+ # Resolve conflicts if any (should be rare with good territories)
170
+ # ... fix conflicts ...
171
+ git add .
172
+ git commit -m "merge: Sync with remote
173
+
174
+ via <model> @ <agent>"
175
+
176
+ # Continue working
177
+ ```
178
+
179
+ ### 5. Resolve Conflicts
180
+
181
+ If conflicts occur:
182
+
183
+ **1. Identify the conflict**:
184
+ ```bash
185
+ git status
186
+ # Shows conflicted files
187
+ ```
188
+
189
+ **2. Check who modified what**:
190
+ ```bash
191
+ git log --oneline -5 -- path/to/conflicted/file.ts
192
+ # See recent changes
193
+ ```
194
+
195
+ **3. Communicate**:
196
+ Create a decision document:
197
+ ```bash
198
+ cat > specs/<feature>/collaboration/active/decisions/conflict-resolution-<file>.md << EOF
199
+ # Conflict: <file-name>
200
+
201
+ **Date**: $(date +%Y-%m-%d)
202
+ **File**: path/to/file.ts
203
+ **Agents involved**: claude-code, github-copilot-cli
204
+
205
+ ## Conflict Description
206
+ [What conflicted and why]
207
+
208
+ ## Resolution
209
+ [How we're resolving it]
210
+
211
+ ## Action Items
212
+ - [ ] Agent 1: [what they need to do]
213
+ - [ ] Agent 2: [what they need to do]
214
+ EOF
215
+ ```
216
+
217
+ **4. Resolve**:
218
+ ```bash
219
+ # Edit the file to resolve conflict
220
+ code path/to/file.ts
221
+
222
+ # Mark as resolved
223
+ git add path/to/file.ts
224
+
225
+ # Commit resolution
226
+ git commit -m "fix: Resolve merge conflict in <file>
227
+
228
+ Conflict between <agent1> and <agent2> changes.
229
+ Resolution: [brief description]
230
+
231
+ via <model> @ <agent>"
232
+ ```
233
+
234
+ ---
235
+
236
+ ## Communication Patterns
237
+
238
+ ### Async Updates
239
+
240
+ **Post session summaries**:
241
+ After each work session, update your session log:
242
+
243
+ ```bash
244
+ # Update your session log
245
+ echo "
246
+ ## Latest Update ($(date +%H:%M))
247
+
248
+ Completed:
249
+ - [x] Task 1
250
+ - [x] Task 2
251
+
252
+ In progress:
253
+ - [ ] Task 3
254
+
255
+ Pushed commits:
256
+ - abc1234 - Add auth endpoint
257
+ - def5678 - Add validation
258
+
259
+ Next: Working on Task 3
260
+ " >> specs/<feature>/collaboration/active/sessions/$(date +%Y-%m-%d)-<agent>.md
261
+ ```
262
+
263
+ **Check for updates**:
264
+ Before starting work:
265
+
266
+ ```bash
267
+ # See what other agent did
268
+ git log --since="1 day ago" --format="%h %s %b" | grep "via"
269
+
270
+ # Read their session log
271
+ cat specs/<feature>/collaboration/active/sessions/$(date +%Y-%m-%d)-<other-agent>.md
272
+ ```
273
+
274
+ ### Sync Decisions
275
+
276
+ **Before modifying shared files**:
277
+
278
+ ```bash
279
+ cat > specs/<feature>/collaboration/active/decisions/shared-file-mod-<name>.md << EOF
280
+ # Proposed: Modify <shared-file>
281
+
282
+ **By**: <agent-name>
283
+ **Date**: $(date +%Y-%m-%d)
284
+
285
+ ## What
286
+ [What you want to change]
287
+
288
+ ## Why
289
+ [Reason for the change]
290
+
291
+ ## Impact on other agent
292
+ [How this affects their work]
293
+
294
+ ## Request
295
+ Please review and acknowledge before I proceed.
296
+
297
+ **Status**: pending-review
298
+ EOF
299
+
300
+ # Then wait or proceed with caution
301
+ ```
302
+
303
+ ---
304
+
305
+ ## Integration Testing
306
+
307
+ ### End-of-Session Integration Check
308
+
309
+ Before ending your work session:
310
+
311
+ **1. Pull latest**:
312
+ ```bash
313
+ git pull origin <feature-branch>
314
+ ```
315
+
316
+ **2. Run full test suite**:
317
+ ```bash
318
+ # Both agents' tests
319
+ npm test
320
+
321
+ # Or your project's test command
322
+ ```
323
+
324
+ **3. Quick manual test**:
325
+ ```bash
326
+ # Start the app
327
+ npm start
328
+
329
+ # Test the integration between backend and frontend
330
+ # Verify your changes work with other agent's changes
331
+ ```
332
+
333
+ **4. Report integration status**:
334
+ ```bash
335
+ cat > specs/<feature>/collaboration/results/validation/integration-$(date +%Y-%m-%d-%H%M).md << EOF
336
+ # Integration Test Results
337
+
338
+ **Date**: $(date +%Y-%m-%d %H:%M)
339
+ **Tester**: <agent-name>
340
+
341
+ ## Test Scenarios
342
+
343
+ - [x] Scenario 1: [description] - ✓ PASS
344
+ - [x] Scenario 2: [description] - ✓ PASS
345
+ - [ ] Scenario 3: [description] - ⚠ ISSUES
346
+
347
+ ## Issues Found
348
+
349
+ 1. [Issue description]
350
+ - Impact: [high/medium/low]
351
+ - Assigned to: [agent-name]
352
+
353
+ ## Status
354
+
355
+ Overall: [PASS / FAIL / NEEDS_WORK]
356
+ EOF
357
+ ```
358
+
359
+ ---
360
+
361
+ ## Cleanup
362
+
363
+ ### When Feature is Complete
364
+
365
+ **1. Merge worktrees**:
366
+ Both agents have been pushing to the same branch, so it's already merged.
367
+
368
+ **2. Remove worktrees**:
369
+ ```bash
370
+ # From main repo
371
+ git worktree remove ../feature-backend
372
+ git worktree remove ../feature-frontend
373
+
374
+ # Or from the worktree
375
+ cd ../feature-backend
376
+ git worktree remove .
377
+ ```
378
+
379
+ **3. Archive collaboration docs**:
380
+ ```bash
381
+ # Move session logs
382
+ mv specs/<feature>/collaboration/active/sessions/*.md \
383
+ specs/<feature>/collaboration/archive/sessions/
384
+
385
+ # Move decisions
386
+ mv specs/<feature>/collaboration/active/decisions/*.md \
387
+ specs/<feature>/collaboration/archive/decisions/
388
+ ```
389
+
390
+ **4. Create final summary**:
391
+ ```bash
392
+ cat > specs/<feature>/collaboration/results/final-summary.md << EOF
393
+ # Final Summary: <feature-name>
394
+
395
+ **Completed**: $(date +%Y-%m-%d)
396
+ **Agents**: claude-code, github-copilot-cli
397
+
398
+ ## Collaboration Stats
399
+
400
+ Commits by claude-code: $(git log --format="%b" | grep "claude-code" | wc -l)
401
+ Commits by github-copilot-cli: $(git log --format="%b" | grep "copilot" | wc -l)
402
+
403
+ Total collaboration sessions: $(ls specs/<feature>/collaboration/archive/sessions/*.md | wc -l)
404
+
405
+ ## What Went Well
406
+
407
+ - [Success 1]
408
+ - [Success 2]
409
+
410
+ ## What Could Improve
411
+
412
+ - [Learning 1]
413
+ - [Learning 2]
414
+
415
+ ## Final Status
416
+
417
+ Feature complete and ready for PR.
418
+ EOF
419
+ ```
420
+
421
+ ---
422
+
423
+ ## Best Practices
424
+
425
+ ### ✓ Do
426
+
427
+ - **Define territories clearly** before starting
428
+ - **Commit and push frequently** (every logical unit)
429
+ - **Pull before making major changes**
430
+ - **Update session logs** after each work period
431
+ - **Test integration** regularly
432
+ - **Communicate in decision docs** for shared files
433
+ - **Use consistent commit attribution**
434
+
435
+ ### ✗ Don't
436
+
437
+ - **Don't edit other agent's territory** without coordination
438
+ - **Don't go silent** - update your session log
439
+ - **Don't batch commits** - push small, frequent updates
440
+ - **Don't skip conflict resolution** - address immediately
441
+ - **Don't modify shared files** without posting a decision
442
+ - **Don't forget to sync** - pull at least every 2 hours
443
+
444
+ ---
445
+
446
+ ## Troubleshooting
447
+
448
+ ### "Git won't let me push"
449
+
450
+ ```bash
451
+ # Someone pushed before you
452
+ git pull --rebase origin <feature-branch>
453
+
454
+ # Fix any conflicts
455
+ # Then push
456
+ git push origin <feature-branch>
457
+ ```
458
+
459
+ ### "I accidentally edited their territory"
460
+
461
+ ```bash
462
+ # Create a decision doc explaining
463
+ cat > specs/<feature>/collaboration/active/decisions/territory-overlap.md << EOF
464
+ # Accidental Territory Overlap
465
+
466
+ I accidentally modified <file> which is in <other-agent>'s territory.
467
+
468
+ Changes made:
469
+ - [list changes]
470
+
471
+ Suggest:
472
+ - [ ] Other agent review and accept
473
+ - [ ] I revert and let them handle it
474
+ EOF
475
+
476
+ # Then coordinate with other agent
477
+ ```
478
+
479
+ ### "Tests are failing after merge"
480
+
481
+ ```bash
482
+ # Run tests to see what broke
483
+ npm test
484
+
485
+ # Check what changed
486
+ git log -1 --stat
487
+
488
+ # Create issue in decisions/
489
+ cat > specs/<feature>/collaboration/active/decisions/test-failure-<date>.md << EOF
490
+ # Test Failures After Merge
491
+
492
+ **Date**: $(date +%Y-%m-%d)
493
+
494
+ Failing tests:
495
+ - test/foo.test.ts: "should handle auth"
496
+
497
+ Likely cause:
498
+ [Your analysis]
499
+
500
+ Action:
501
+ - [ ] Agent who changed related code to fix
502
+ EOF
503
+ ```
504
+
505
+ ---
506
+
507
+ ## Quick Reference
508
+
509
+ ```bash
510
+ # Setup
511
+ git worktree add ../my-worktree <feature-branch>
512
+
513
+ # Daily workflow
514
+ git pull origin <feature-branch> # Start of session
515
+ # ... work ...
516
+ git add . && git commit -m "..." # Frequently
517
+ git push origin <feature-branch> # After each commit
518
+
519
+ # Sync
520
+ git pull origin <feature-branch> # Every 2 hours
521
+
522
+ # Check other agent's work
523
+ git log --since="1 day ago" --format="%h %s %b" | grep "via"
524
+
525
+ # End session
526
+ git push origin <feature-branch>
527
+ # Update session log
528
+ # Run integration tests
529
+
530
+ # Cleanup
531
+ git worktree remove ../my-worktree
532
+ ```
533
+
534
+ ---
535
+
536
+ **Remember**: Good territories + frequent syncs + clear communication = smooth parallel work!