panopticon-cli 0.4.6 → 0.4.7

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 (102) hide show
  1. package/package.json +2 -1
  2. package/skills/beads/README.md +120 -0
  3. package/skills/beads/SKILL.md +214 -0
  4. package/skills/beads/adr/0001-bd-prime-as-source-of-truth.md +59 -0
  5. package/skills/beads/resources/AGENTS.md +62 -0
  6. package/skills/beads/resources/ASYNC_GATES.md +168 -0
  7. package/skills/beads/resources/BOUNDARIES.md +469 -0
  8. package/skills/beads/resources/CHEMISTRY_PATTERNS.md +197 -0
  9. package/skills/beads/resources/CLI_REFERENCE.md +558 -0
  10. package/skills/beads/resources/DEPENDENCIES.md +747 -0
  11. package/skills/beads/resources/INTEGRATION_PATTERNS.md +407 -0
  12. package/skills/beads/resources/ISSUE_CREATION.md +139 -0
  13. package/skills/beads/resources/MOLECULES.md +354 -0
  14. package/skills/beads/resources/PATTERNS.md +341 -0
  15. package/skills/beads/resources/RESUMABILITY.md +207 -0
  16. package/skills/beads/resources/STATIC_DATA.md +54 -0
  17. package/skills/beads/resources/TROUBLESHOOTING.md +489 -0
  18. package/skills/beads/resources/WORKFLOWS.md +623 -0
  19. package/skills/beads/resources/WORKTREES.md +94 -0
  20. package/skills/beads-completion-check/SKILL.md +90 -0
  21. package/skills/beads-panopticon-guide/SKILL.md +171 -0
  22. package/skills/bug-fix/SKILL.md +32 -0
  23. package/skills/clear-writing/SKILL.md +105 -0
  24. package/skills/clear-writing/references/elements-of-style/01-introductory.md +3 -0
  25. package/skills/clear-writing/references/elements-of-style/02-elementary-rules-of-usage.md +214 -0
  26. package/skills/clear-writing/references/elements-of-style/03-elementary-principles-of-composition.md +398 -0
  27. package/skills/clear-writing/references/elements-of-style/04-a-few-matters-of-form.md +89 -0
  28. package/skills/clear-writing/references/elements-of-style/05-words-and-expressions-commonly-misused.md +342 -0
  29. package/skills/clear-writing/references/signs-of-ai-writing.md +901 -0
  30. package/skills/code-review/SKILL.md +37 -0
  31. package/skills/code-review-performance/SKILL.md +53 -0
  32. package/skills/code-review-security/SKILL.md +35 -0
  33. package/skills/dependency-update/SKILL.md +30 -0
  34. package/skills/feature-work/SKILL.md +39 -0
  35. package/skills/incident-response/SKILL.md +32 -0
  36. package/skills/knowledge-capture/SKILL.md +463 -0
  37. package/skills/onboard-codebase/SKILL.md +34 -0
  38. package/skills/opus-plan/SKILL.md +400 -0
  39. package/skills/pan-approve/SKILL.md +136 -0
  40. package/skills/pan-code-review/SKILL.md +249 -0
  41. package/skills/pan-config/SKILL.md +164 -0
  42. package/skills/pan-convoy-synthesis/SKILL.md +249 -0
  43. package/skills/pan-diagnose/SKILL.md +360 -0
  44. package/skills/pan-docker/SKILL.md +279 -0
  45. package/skills/pan-docs/SKILL.md +113 -0
  46. package/skills/pan-down/SKILL.md +434 -0
  47. package/skills/pan-health/SKILL.md +240 -0
  48. package/skills/pan-help/SKILL.md +237 -0
  49. package/skills/pan-install/SKILL.md +339 -0
  50. package/skills/pan-issue/SKILL.md +596 -0
  51. package/skills/pan-kill/SKILL.md +172 -0
  52. package/skills/pan-logs/SKILL.md +255 -0
  53. package/skills/pan-network/SKILL.md +320 -0
  54. package/skills/pan-oversee/SKILL.md +290 -0
  55. package/skills/pan-plan/SKILL.md +521 -0
  56. package/skills/pan-projects/SKILL.md +239 -0
  57. package/skills/pan-quickstart/SKILL.md +440 -0
  58. package/skills/pan-reload/SKILL.md +44 -0
  59. package/skills/pan-rescue/SKILL.md +271 -0
  60. package/skills/pan-restart/SKILL.md +53 -0
  61. package/skills/pan-setup/SKILL.md +478 -0
  62. package/skills/pan-skill-creator/SKILL.md +168 -0
  63. package/skills/pan-skill-creator/references/output-patterns.md +141 -0
  64. package/skills/pan-skill-creator/references/workflows.md +90 -0
  65. package/skills/pan-skill-creator/scripts/init_skill.py +176 -0
  66. package/skills/pan-status/SKILL.md +493 -0
  67. package/skills/pan-subagent-creator/SKILL.md +295 -0
  68. package/skills/pan-subagent-creator/assets/validate-readonly-query.sh +35 -0
  69. package/skills/pan-subagent-creator/references/example-agents.md +308 -0
  70. package/skills/pan-subagent-creator/scripts/init_agent.py +126 -0
  71. package/skills/pan-sync/SKILL.md +272 -0
  72. package/skills/pan-tell/SKILL.md +157 -0
  73. package/skills/pan-test-config/SKILL.md +208 -0
  74. package/skills/pan-tracker/SKILL.md +288 -0
  75. package/skills/pan-up/SKILL.md +458 -0
  76. package/skills/pan-workspace-config/SKILL.md +303 -0
  77. package/skills/refactor/SKILL.md +30 -0
  78. package/skills/refactor-radar/SKILL.md +475 -0
  79. package/skills/release/SKILL.md +25 -0
  80. package/skills/send-feedback-to-agent/SKILL.md +98 -0
  81. package/skills/session-health/SKILL.md +76 -0
  82. package/skills/session-health/scripts/check_sessions.py +166 -0
  83. package/skills/skill-creator/SKILL.md +92 -0
  84. package/skills/skill-creator/scripts/init_skill.py +152 -0
  85. package/skills/skill-creator/scripts/package_skill.py +123 -0
  86. package/skills/stitch-design-md/README.md +34 -0
  87. package/skills/stitch-design-md/SKILL.md +172 -0
  88. package/skills/stitch-design-md/examples/DESIGN.md +154 -0
  89. package/skills/stitch-react-components/README.md +36 -0
  90. package/skills/stitch-react-components/SKILL.md +47 -0
  91. package/skills/stitch-react-components/examples/gold-standard-card.tsx +80 -0
  92. package/skills/stitch-react-components/package-lock.json +231 -0
  93. package/skills/stitch-react-components/package.json +16 -0
  94. package/skills/stitch-react-components/resources/architecture-checklist.md +15 -0
  95. package/skills/stitch-react-components/resources/component-template.tsx +37 -0
  96. package/skills/stitch-react-components/resources/stitch-api-reference.md +14 -0
  97. package/skills/stitch-react-components/resources/style-guide.json +27 -0
  98. package/skills/stitch-react-components/scripts/fetch-stitch.sh +30 -0
  99. package/skills/stitch-react-components/scripts/validate.js +68 -0
  100. package/skills/stitch-setup/SKILL.md +94 -0
  101. package/skills/web-design-guidelines/SKILL.md +39 -0
  102. package/skills/work-complete/SKILL.md +79 -0
@@ -0,0 +1,249 @@
1
+ ---
2
+ name: pan-code-review
3
+ description: Orchestrated parallel code review with automatic synthesis
4
+ triggers:
5
+ - code review
6
+ - review code
7
+ - pan code review
8
+ - parallel review
9
+ allowed-tools:
10
+ - Task
11
+ - Bash
12
+ - Read
13
+ - Write
14
+ - Glob
15
+ - Grep
16
+ ---
17
+
18
+ # Pan Code Review
19
+
20
+ Orchestrates a comprehensive parallel code review using specialized review agents with automatic synthesis of findings.
21
+
22
+ ## Overview
23
+
24
+ This skill coordinates three specialized review agents working in parallel:
25
+ - **Correctness Reviewer** - Logic errors, edge cases, type safety
26
+ - **Security Reviewer** - OWASP Top 10, vulnerabilities
27
+ - **Performance Reviewer** - Algorithms, N+1 queries, memory issues
28
+
29
+ After all three complete, a **Synthesis Agent** combines their findings into a unified, prioritized report.
30
+
31
+ ## When to Use
32
+
33
+ Use this skill when you need a thorough code review:
34
+ - Before merging a pull request
35
+ - After implementing a new feature
36
+ - When refactoring critical code
37
+ - For security-sensitive changes
38
+ - When performance matters
39
+
40
+ ## How It Works
41
+
42
+ ```
43
+ User invokes /pan-code-review
44
+
45
+ Determine scope (git diff, files, or pattern)
46
+
47
+ Create .claude/reviews/ directory
48
+
49
+ Spawn 3 parallel reviewers via Task tool:
50
+ ├─→ correctness → writes .claude/reviews/<timestamp>-correctness.md
51
+ ├─→ security → writes .claude/reviews/<timestamp>-security.md
52
+ └─→ performance → writes .claude/reviews/<timestamp>-performance.md
53
+
54
+ Wait for all 3 to complete
55
+
56
+ Spawn synthesis agent
57
+
58
+ Synthesis reads all 3 reviews
59
+
60
+ Synthesis writes .claude/reviews/<timestamp>-synthesis.md
61
+
62
+ Present unified report to user
63
+ ```
64
+
65
+ ## Usage
66
+
67
+ ### Review Uncommitted Changes
68
+
69
+ ```bash
70
+ # Review all uncommitted changes (git diff)
71
+ /pan-code-review
72
+
73
+ # Same as above
74
+ /pan-code-review --scope diff
75
+ ```
76
+
77
+ ### Review Specific Files
78
+
79
+ ```bash
80
+ # Review specific files
81
+ /pan-code-review --files "src/auth/*.ts"
82
+
83
+ # Review a single file
84
+ /pan-code-review --files "src/auth/auth-service.ts"
85
+
86
+ # Review multiple patterns
87
+ /pan-code-review --files "src/auth/*.ts,src/models/User.ts"
88
+ ```
89
+
90
+ ### Review a Branch
91
+
92
+ ```bash
93
+ # Review all changes in current branch vs main
94
+ /pan-code-review --branch main
95
+
96
+ # Review vs specific branch
97
+ /pan-code-review --branch develop
98
+ ```
99
+
100
+ ### Review Options
101
+
102
+ ```bash
103
+ # Focus on security only
104
+ /pan-code-review --focus security
105
+
106
+ # Focus on performance only
107
+ /pan-code-review --focus performance
108
+
109
+ # Focus on correctness only
110
+ /pan-code-review --focus correctness
111
+
112
+ # Skip synthesis (get raw reviews)
113
+ /pan-code-review --no-synthesis
114
+ ```
115
+
116
+ ## Implementation Guide
117
+
118
+ When this skill is invoked, you should:
119
+
120
+ ### Step 1: Determine Scope
121
+
122
+ Parse user options or use defaults:
123
+
124
+ ```typescript
125
+ // Default: review uncommitted changes
126
+ const scope = options.scope || 'diff';
127
+
128
+ if (scope === 'diff') {
129
+ // Get uncommitted changes
130
+ Bash: git diff --name-only
131
+ }
132
+
133
+ if (options.files) {
134
+ // Use provided file pattern
135
+ Glob: pattern=options.files
136
+ }
137
+
138
+ if (options.branch) {
139
+ // Get changes vs branch
140
+ Bash: git diff ${options.branch}...HEAD --name-only
141
+ }
142
+ ```
143
+
144
+ ### Step 2: Prepare Review Environment
145
+
146
+ ```typescript
147
+ // Create reviews directory
148
+ Bash: mkdir -p .claude/reviews
149
+
150
+ // Generate timestamp for this review session
151
+ const timestamp = new Date().toISOString().replace(/:/g, '-').split('.')[0];
152
+ // Example: 2026-01-20T15-30-00
153
+ ```
154
+
155
+ ### Step 3: Launch Parallel Reviewers
156
+
157
+ **IMPORTANT:** Spawn all three reviewers in a SINGLE message with multiple Task calls:
158
+
159
+ ```typescript
160
+ // Spawn all 3 reviewers in parallel
161
+ Task({
162
+ subagent_type: 'code-review-correctness',
163
+ description: 'Review code correctness',
164
+ prompt: `Review the following files for logic errors, edge cases, and type safety:
165
+
166
+ Files to review:
167
+ ${fileList}
168
+
169
+ Write your findings to: .claude/reviews/${timestamp}-correctness.md
170
+
171
+ Follow the output format specified in your agent instructions.`
172
+ });
173
+
174
+ Task({
175
+ subagent_type: 'code-review-security',
176
+ description: 'Review code security',
177
+ prompt: `Review the following files for security vulnerabilities (OWASP Top 10):
178
+
179
+ Files to review:
180
+ ${fileList}
181
+
182
+ Write your findings to: .claude/reviews/${timestamp}-security.md
183
+
184
+ Follow the output format specified in your agent instructions.`
185
+ });
186
+
187
+ Task({
188
+ subagent_type: 'code-review-performance',
189
+ description: 'Review code performance',
190
+ prompt: `Review the following files for performance issues:
191
+
192
+ Files to review:
193
+ ${fileList}
194
+
195
+ Write your findings to: .claude/reviews/${timestamp}-performance.md
196
+
197
+ Follow the output format specified in your agent instructions.`
198
+ });
199
+ ```
200
+
201
+ ### Step 4: Wait for Completion
202
+
203
+ The Task tool is blocking - it waits for each agent to complete. Since you made 3 Task calls, all three will run in parallel and you'll get results when all complete.
204
+
205
+ ### Step 5: Spawn Synthesis Agent
206
+
207
+ ```typescript
208
+ Task({
209
+ subagent_type: 'code-review-synthesis',
210
+ description: 'Synthesize review findings',
211
+ prompt: `Combine the findings from the three parallel code reviews.
212
+
213
+ Review files to read:
214
+ - .claude/reviews/${timestamp}-correctness.md
215
+ - .claude/reviews/${timestamp}-security.md
216
+ - .claude/reviews/${timestamp}-performance.md
217
+
218
+ Write your synthesis to: .claude/reviews/${timestamp}-synthesis.md
219
+
220
+ Provide a complete, prioritized report combining all findings.`
221
+ });
222
+ ```
223
+
224
+ ### Step 6: Present Results
225
+
226
+ ```typescript
227
+ // Read the synthesis report
228
+ Read: file_path=`.claude/reviews/${timestamp}-synthesis.md`
229
+
230
+ // Display to user
231
+ console.log("Code Review Complete!");
232
+ console.log("");
233
+ console.log("Individual Reviews:");
234
+ console.log(` - Correctness: .claude/reviews/${timestamp}-correctness.md`);
235
+ console.log(` - Security: .claude/reviews/${timestamp}-security.md`);
236
+ console.log(` - Performance: .claude/reviews/${timestamp}-performance.md`);
237
+ console.log("");
238
+ console.log("Unified Report:");
239
+ console.log(` - Synthesis: .claude/reviews/${timestamp}-synthesis.md`);
240
+ console.log("");
241
+
242
+ // Display synthesis executive summary
243
+ [Display key findings from synthesis]
244
+ ```
245
+
246
+ ## Example Session
247
+
248
+ ```
249
+ User: /pan-code-review --files "src/auth/*.ts"
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: pan-config
3
+ description: View and edit Panopticon configuration
4
+ triggers:
5
+ - pan config
6
+ - panopticon config
7
+ - configure panopticon
8
+ - panopticon settings
9
+ - edit panopticon config
10
+ allowed-tools:
11
+ - Bash
12
+ - Read
13
+ - Edit
14
+ ---
15
+
16
+ # Panopticon Configuration
17
+
18
+ ## Overview
19
+
20
+ This skill guides you through viewing and editing Panopticon configuration. Configuration is stored in `~/.panopticon/config.toml` and `~/.panopticon.env`.
21
+
22
+ ## When to Use
23
+
24
+ - User wants to view current configuration
25
+ - User needs to change settings (sync targets, backup options, etc.)
26
+ - User wants to configure API keys or tokens
27
+ - User needs to set up tracker integration
28
+
29
+ ## Configuration Files
30
+
31
+ | File | Purpose | Format |
32
+ |------|---------|--------|
33
+ | `~/.panopticon/config.toml` | Main configuration | TOML |
34
+ | `~/.panopticon.env` | API keys and secrets | ENV |
35
+ | `~/.panopticon/projects.json` | Registered projects | JSON |
36
+ | `~/.panopticon/project-mappings.json` | Tracker → project mappings | JSON |
37
+
38
+ ## View Current Configuration
39
+
40
+ ```bash
41
+ # View main config
42
+ cat ~/.panopticon/config.toml
43
+
44
+ # View environment/secrets (careful - contains API keys)
45
+ cat ~/.panopticon.env
46
+
47
+ # View registered projects
48
+ cat ~/.panopticon/projects.json
49
+
50
+ # View project mappings
51
+ cat ~/.panopticon/project-mappings.json
52
+ ```
53
+
54
+ ## Configuration Options
55
+
56
+ ### Main Config (~/.panopticon/config.toml)
57
+
58
+ ```toml
59
+ [sync]
60
+ # Which AI tools to sync skills to
61
+ targets = ["claude", "codex", "cursor", "gemini"]
62
+
63
+ # Create backup before syncing
64
+ backup_before_sync = true
65
+
66
+ [dashboard]
67
+ # Dashboard port (default: 3010)
68
+ port = 3010
69
+
70
+ # API port (default: 3011)
71
+ api_port = 3011
72
+
73
+ [agent]
74
+ # Default model for agents
75
+ default_model = "sonnet"
76
+
77
+ # Default runtime
78
+ default_runtime = "claude"
79
+
80
+ # Health check interval (seconds)
81
+ health_check_interval = 30
82
+ ```
83
+
84
+ ### Environment Variables (~/.panopticon.env)
85
+
86
+ ```bash
87
+ # Linear API key (for issue tracking)
88
+ LINEAR_API_KEY=lin_api_xxxxx
89
+
90
+ # GitHub configuration
91
+ GITHUB_TOKEN=ghp_xxxxx
92
+ GITHUB_REPOS=owner/repo:PREFIX,owner/repo2:PREFIX2
93
+ GITHUB_LOCAL_PATHS=owner/repo=/path/to/local,owner/repo2=/path2
94
+
95
+ # Optional: GitLab configuration
96
+ GITLAB_TOKEN=glpat-xxxxx
97
+ GITLAB_URL=https://gitlab.com
98
+ ```
99
+
100
+ ## Common Configuration Tasks
101
+
102
+ ### Add a New Sync Target
103
+
104
+ ```bash
105
+ # Edit config.toml and add to targets array
106
+ # Valid targets: claude, codex, cursor, gemini
107
+ ```
108
+
109
+ ### Configure Linear Integration
110
+
111
+ ```bash
112
+ # Get your Linear API key from:
113
+ # Settings → API → Personal API keys → Create key
114
+
115
+ # Add to ~/.panopticon.env:
116
+ echo "LINEAR_API_KEY=lin_api_your_key_here" >> ~/.panopticon.env
117
+ ```
118
+
119
+ ### Configure GitHub Integration
120
+
121
+ ```bash
122
+ # Get token: gh auth token
123
+ # Or create at: Settings → Developer settings → Personal access tokens
124
+
125
+ # Add to ~/.panopticon.env:
126
+ cat >> ~/.panopticon.env << 'EOF'
127
+ GITHUB_TOKEN=your_token_here
128
+ GITHUB_REPOS=owner/repo:PREFIX
129
+ GITHUB_LOCAL_PATHS=owner/repo=/path/to/local
130
+ EOF
131
+ ```
132
+
133
+ ### Change Dashboard Ports
134
+
135
+ ```bash
136
+ # Edit ~/.panopticon/config.toml
137
+ # Change port and api_port values
138
+ # Restart dashboard: pan down && pan up
139
+ ```
140
+
141
+ ## Workflow
142
+
143
+ 1. **View current config**: `cat ~/.panopticon/config.toml`
144
+ 2. **Identify what to change**: Determine which setting needs modification
145
+ 3. **Edit the appropriate file**: Use your editor to modify
146
+ 4. **Restart services if needed**: `pan down && pan up`
147
+ 5. **Verify changes**: `pan doctor` or `pan status`
148
+
149
+ ## Troubleshooting
150
+
151
+ **Problem:** Changes not taking effect
152
+ **Solution:** Restart the dashboard with `pan down && pan up`
153
+
154
+ **Problem:** API key not working
155
+ **Solution:** Verify the key is correct and has proper permissions. Check `~/.panopticon.env` for typos.
156
+
157
+ **Problem:** Sync targets not working
158
+ **Solution:** Run `pan doctor` to check if target directories exist. Run `pan sync --dry-run` to preview.
159
+
160
+ ## Related Skills
161
+
162
+ - `/pan:tracker` - Configure issue tracker integration
163
+ - `/pan:projects` - Manage registered projects
164
+ - `/pan:sync` - Sync skills to AI tools
@@ -0,0 +1,249 @@
1
+ ---
2
+ name: pan-convoy-synthesis
3
+ description: Synthesize results from parallel agent work in a convoy
4
+ triggers:
5
+ - convoy synthesis
6
+ - synthesize convoy
7
+ - merge convoy results
8
+ - convoy complete
9
+ allowed-tools:
10
+ - Bash
11
+ - Read
12
+ - Write
13
+ - Glob
14
+ - Grep
15
+ - Task
16
+ ---
17
+
18
+ # Convoy Synthesis
19
+
20
+ Synthesize and integrate work from multiple agents that ran in parallel as a convoy.
21
+
22
+ ## When to Use
23
+
24
+ Use this skill when:
25
+ - A convoy has completed and you need to merge all agent work
26
+ - Multiple agents worked on related issues and their changes need integration
27
+ - You need to create a comprehensive PR from parallel work
28
+ - Resolving conflicts between parallel agent changes
29
+
30
+ ## Synthesis Process
31
+
32
+ ### Step 1: Gather Convoy Results
33
+
34
+ ```bash
35
+ # Get convoy status and results
36
+ pan convoy status <convoy-id>
37
+
38
+ # List all agents in the convoy
39
+ pan convoy status <convoy-id> | grep -A 50 "Agents"
40
+ ```
41
+
42
+ ### Step 2: Collect Workspace Changes
43
+
44
+ For each completed agent in the convoy:
45
+
46
+ ```bash
47
+ # Check each workspace for changes
48
+ cd ~/.panopticon/workspaces/<issue-id>
49
+ git status
50
+ git log --oneline -10
51
+ git diff main...HEAD
52
+ ```
53
+
54
+ ### Step 3: Identify Integration Points
55
+
56
+ Look for:
57
+ - **Conflicting changes** - Same files modified by multiple agents
58
+ - **Dependent changes** - Changes that build on each other
59
+ - **Complementary changes** - Independent changes that combine well
60
+
61
+ ### Step 4: Merge Strategy
62
+
63
+ #### Option A: Sequential Merge (Recommended for conflicts)
64
+
65
+ ```bash
66
+ # Start from main
67
+ git checkout main
68
+ git pull origin main
69
+
70
+ # Create integration branch
71
+ git checkout -b convoy/<convoy-id>
72
+
73
+ # Merge each agent's work in order
74
+ git merge --no-ff feature/<issue-1>
75
+ git merge --no-ff feature/<issue-2>
76
+ # Resolve conflicts as needed
77
+ git merge --no-ff feature/<issue-3>
78
+ ```
79
+
80
+ #### Option B: Squash Merge (Clean history)
81
+
82
+ ```bash
83
+ # Create integration branch
84
+ git checkout -b convoy/<convoy-id>
85
+
86
+ # Cherry-pick or squash from each workspace
87
+ git merge --squash feature/<issue-1>
88
+ git commit -m "feat: integrate <issue-1> changes"
89
+
90
+ git merge --squash feature/<issue-2>
91
+ git commit -m "feat: integrate <issue-2> changes"
92
+ ```
93
+
94
+ #### Option C: Octopus Merge (No conflicts)
95
+
96
+ ```bash
97
+ # If there are no conflicts, merge all at once
98
+ git checkout main
99
+ git merge feature/<issue-1> feature/<issue-2> feature/<issue-3>
100
+ ```
101
+
102
+ ### Step 5: Verify Integration
103
+
104
+ ```bash
105
+ # Run tests
106
+ npm test
107
+
108
+ # Run build
109
+ npm run build
110
+
111
+ # Check for type errors
112
+ npm run typecheck
113
+
114
+ # Run linter
115
+ npm run lint
116
+ ```
117
+
118
+ ### Step 6: Create Synthesis Summary
119
+
120
+ Generate a summary of all integrated work:
121
+
122
+ ```markdown
123
+ # Convoy Synthesis: <convoy-name>
124
+
125
+ ## Integrated Issues
126
+ - <issue-1>: <title>
127
+ - <issue-2>: <title>
128
+ - <issue-3>: <title>
129
+
130
+ ## Changes Summary
131
+ ### <issue-1>
132
+ - Brief summary of changes
133
+ - Files modified: X
134
+
135
+ ### <issue-2>
136
+ - Brief summary of changes
137
+ - Files modified: Y
138
+
139
+ ### <issue-3>
140
+ - Brief summary of changes
141
+ - Files modified: Z
142
+
143
+ ## Conflicts Resolved
144
+ - `src/file.ts`: Chose <issue-1>'s approach because...
145
+
146
+ ## Integration Notes
147
+ - Any special considerations
148
+ - Dependencies between changes
149
+ - Known issues or follow-ups needed
150
+
151
+ ## Testing
152
+ - [ ] All unit tests pass
153
+ - [ ] Integration tests pass
154
+ - [ ] Manual testing completed
155
+ - [ ] No regressions identified
156
+ ```
157
+
158
+ ### Step 7: Create Pull Request
159
+
160
+ ```bash
161
+ # Push integration branch
162
+ git push origin convoy/<convoy-id>
163
+
164
+ # Create PR with synthesis summary
165
+ gh pr create \
166
+ --title "Convoy: <convoy-name>" \
167
+ --body "$(cat synthesis-summary.md)" \
168
+ --base main \
169
+ --head convoy/<convoy-id>
170
+ ```
171
+
172
+ ## Conflict Resolution Guidelines
173
+
174
+ ### Code Conflicts
175
+
176
+ When two agents modified the same code:
177
+
178
+ 1. **Understand both changes** - Read both versions carefully
179
+ 2. **Check dependencies** - Does one change depend on the other?
180
+ 3. **Prefer composition** - Can both changes coexist?
181
+ 4. **Test thoroughly** - Run tests after each resolution
182
+
183
+ ### Import Conflicts
184
+
185
+ ```typescript
186
+ // Agent 1 added:
187
+ import { FeatureA } from './features';
188
+
189
+ // Agent 2 added:
190
+ import { FeatureB } from './features';
191
+
192
+ // Resolution: Combine imports
193
+ import { FeatureA, FeatureB } from './features';
194
+ ```
195
+
196
+ ### Schema/Type Conflicts
197
+
198
+ ```typescript
199
+ // Agent 1 added field:
200
+ interface User {
201
+ id: string;
202
+ newField1: string;
203
+ }
204
+
205
+ // Agent 2 added field:
206
+ interface User {
207
+ id: string;
208
+ newField2: number;
209
+ }
210
+
211
+ // Resolution: Merge all fields
212
+ interface User {
213
+ id: string;
214
+ newField1: string;
215
+ newField2: number;
216
+ }
217
+ ```
218
+
219
+ ## Automated Synthesis
220
+
221
+ Use the convoy synthesis prompt generator:
222
+
223
+ ```bash
224
+ # Generate synthesis prompt
225
+ pan convoy synthesize <convoy-id>
226
+ ```
227
+
228
+ This outputs a detailed prompt you can use to guide the synthesis process.
229
+
230
+ ## Best Practices
231
+
232
+ 1. **Review before merging** - Don't blindly merge; understand each change
233
+ 2. **Test incrementally** - Run tests after merging each agent's work
234
+ 3. **Document decisions** - Record why you chose specific conflict resolutions
235
+ 4. **Keep the PR focused** - If convoy scope is too large, consider splitting
236
+ 5. **Tag individual PRs** - Reference original issues in commit messages
237
+
238
+ ## Related Commands
239
+
240
+ ```bash
241
+ # Convoy management
242
+ pan convoy list
243
+ pan convoy status <id>
244
+ pan convoy synthesize <id>
245
+
246
+ # Workspace management
247
+ pan workspace list
248
+ pan workspace remove <issue-id>
249
+ ```