@uniswap/ai-toolkit-nx-claude 0.5.9 → 0.5.10-next.1

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: commit-message-generator
3
3
  description: Generate well-structured git commit messages that clearly communicate the WHAT and WHY of code changes. Your messages should help future developers (including the author) understand the purpose and context of the commit.
4
- model: sonnet-4
4
+ model: sonnet-4.5
5
5
  ---
6
6
 
7
7
  # commit-message-generator Agent
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pr-creator
3
3
  description: Creates or updates Graphite PRs with auto-generated conventional commit messages and comprehensive PR descriptions based on diffs
4
- model: sonnet-4
4
+ model: sonnet-4.5
5
5
  ---
6
6
 
7
7
  You are a Graphite PR management specialist who creates and updates pull requests with well-crafted conventional commit messages and informative PR descriptions.
@@ -1,12 +1,13 @@
1
1
  ---
2
- description: Create clear, actionable implementation plans for any task, feature, refactor, or architectural change
3
- argument-hint: <task/feature description>
4
- allowed-tools: Read(*), Glob(*), Grep(*), LS(*), WebSearch(*), WebFetch(*), Write(*.md), MultiEdit(*.md), Bash(git ls-files:*)
2
+ description: Create clear, actionable implementation plans for any task, feature, refactor, or architectural change through collaborative multi-agent refinement
3
+ argument-hint: <task/feature description or plan file path>
4
+ allowed-tools: Read(*), Glob(*), Grep(*), LS(*), Task(*), WebSearch(*), WebFetch(*), Write(*.md), MultiEdit(*.md), Bash(git ls-files:*), Bash(mkdir:*)
5
+ model: claude-sonnet-4-5-20250929
5
6
  ---
6
7
 
7
8
  # Plan Command
8
9
 
9
- Create clear, actionable implementation plans for any development task - from simple bug fixes to complex architectural changes. Plans focus on strategic direction: what needs to be done, in what order, and what challenges to expect.
10
+ Create clear, actionable implementation plans through collaborative multi-agent discussion. Plans are refined through expert consensus, constructive disagreement, and cross-domain collaboration to ensure comprehensive coverage and high-quality implementation strategy.
10
11
 
11
12
  ## Workflow Integration
12
13
 
@@ -19,19 +20,53 @@ This command is **Step 2** of the implementation workflow:
19
20
  **BEST PRACTICE: Use this command AFTER running `/explore` for optimal results**
20
21
 
21
22
  1. First: `/explore <relevant area>` - Builds comprehensive context
22
- 2. Then: `/plan <task>` - Creates plan using that context automatically
23
+ 2. Then: `/plan <task>` - Creates plan through collaborative refinement
23
24
  3. Next: `/review-plan <plan-file>` - Review and validate the plan
24
25
  4. Finally: `/execute-plan <plan-file>` - Executes the approved implementation
25
26
 
26
27
  This four-step process ensures optimal understanding, planning, validation, and execution.
27
28
 
28
- **Note for Claude Code**: When you have context-loader findings from a previous `/explore` command, automatically pass them to the planner agent. The user doesn't need to specify any flags.
29
+ **Note for Claude Code**: When you have context-loader findings from a previous `/explore` command, automatically pass them to the planning process. The user doesn't need to specify any flags.
30
+
31
+ ## Overview
32
+
33
+ This command takes a task description or existing plan and orchestrates a collaborative refinement process using 3-10 specialized agents selected based on the plan's context and requirements.
34
+
35
+ **Key Features:**
36
+
37
+ - **Intelligent Agent Selection**: Automatically identifies and selects 3-10 specialized agents based on plan context
38
+ - **True Collaboration**: Agents engage in multi-round discussions, building on each other's feedback
39
+ - **Constructive Disagreement**: Agents respectfully challenge ideas and propose alternatives
40
+ - **Consensus Building**: Multiple discussion rounds lead to a refined, consensus-based final plan
41
+ - **Expert Emulation**: Mimics how human experts would collaboratively refine a plan
42
+ - **Context Integration**: Leverages findings from `/explore` command automatically
29
43
 
30
44
  ## Inputs
31
45
 
32
- Accept natural language description and extract:
46
+ Accept natural language description or file path to existing plan:
47
+
48
+ **Description-based:**
49
+
50
+ ```
51
+ /plan add user authentication with JWT tokens
52
+ /plan implement real-time notifications using WebSockets
53
+ /plan migrate monolith to microservices
54
+ /plan implement real-time collaborative editing with CRDT
55
+ /plan optimize database queries for the user dashboard
56
+ ```
57
+
58
+ **File-based (for refining existing plans):**
59
+
60
+ ```
61
+ /plan /tmp/plans/plan-20250821-a4b3c2.md
62
+ /plan plans/user-auth-implementation.md
63
+ ```
64
+
65
+ Extract:
33
66
 
34
- - `task`: The full description of what needs to be implemented/fixed/refactored
67
+ - `plan_input`: Either file path or description
68
+ - `is_file`: Boolean indicating if input is a file path
69
+ - `plan_content`: The actual plan content (read from file or use description directly)
35
70
  - `scope`: Any specific scope or boundaries mentioned
36
71
  - `constraints`: Any explicit constraints or requirements
37
72
  - `context_findings`: Automatically include context-loader findings from `/explore` if available
@@ -66,77 +101,131 @@ Examples:
66
101
 
67
102
  ## Task
68
103
 
69
- Generate a clear, actionable implementation plan:
104
+ Execute a structured collaborative refinement process:
70
105
 
71
- ### Core Planning Capabilities
106
+ ### Phase 1: Context Understanding & Agent Selection
72
107
 
73
- 1. **Context Integration**
108
+ 1. **Analyze Plan Context**
74
109
 
75
- - Leverage any context-loader findings if available
76
- - Analyze the current codebase state and architecture
77
- - Map existing patterns, conventions, and constraints
110
+ - If file provided, read and analyze the plan document
111
+ - If description provided, understand the high-level goals and requirements
112
+ - Leverage any context-loader findings from `/explore` if available
113
+ - Identify key technical domains (e.g., frontend, backend, database, security, performance)
114
+ - Identify complexity factors (e.g., distributed systems, real-time features, data migration)
115
+ - Identify architectural concerns (e.g., scalability, reliability, maintainability)
78
116
 
79
- 2. **Implementation Breakdown**
117
+ 2. **Select Specialized Agents** (3-10 agents)
80
118
 
81
- - Break down the task into clear, sequential steps (typically 5-7 steps for medium complexity)
82
- - Identify which files need to be modified or created
83
- - Define API interfaces and data structures when needed
84
- - Focus on WHAT needs to happen, not HOW to code it
119
+ Query available agents and select based on:
85
120
 
86
- 3. **Challenge Identification**
87
- - Identify critical, blocking, or high-risk challenges
88
- - Provide mitigation strategies for significant issues
89
- - Skip minor edge cases (trust the implementer)
121
+ - **Domain Relevance**: Match agent capabilities to technical domains in the plan
122
+ - **Perspective Diversity**: Include different viewpoints (architecture, security, performance, testing, DevOps, etc.)
123
+ - **Complexity Alignment**: More complex plans warrant more agents
90
124
 
91
- ## Context Integration
125
+ **Selection Guidelines:**
92
126
 
93
- **Claude Code**: When you have findings from a previous `/explore` command, automatically extract and pass:
127
+ - **Simple plans** (bug fixes, minor features): 3-4 agents
128
+ - **Medium plans** (features, refactors): 5-7 agents
129
+ - **Complex plans** (architecture changes, major features): 8-10 agents
94
130
 
95
- - Key components and their responsibilities
96
- - Existing patterns and conventions
97
- - Dependencies and integration points
98
- - Known gotchas and edge cases
131
+ **Example Agent Combinations:**
99
132
 
100
- ## Delegation
133
+ _For "migrate monolith to microservices":_
101
134
 
102
- Invoke the **planner agent** with:
135
+ - backend-architect (system design)
136
+ - cloud-architect (infrastructure)
137
+ - database-optimizer (data architecture)
138
+ - performance-engineer (scalability)
139
+ - devops-troubleshooter (deployment)
140
+ - security-auditor (service boundaries)
103
141
 
104
- ### Required Parameters
142
+ _For "implement real-time collaborative editing":_
105
143
 
106
- - `task`: The complete task description
144
+ - frontend-developer (UI/state management)
145
+ - backend-architect (API design)
146
+ - performance-engineer (optimization)
147
+ - database-optimizer (conflict resolution)
148
+ - security-auditor (data integrity)
107
149
 
108
- ### Optional Parameters
150
+ 3. **Brief Each Agent**
151
+ - Provide full plan content/description to each selected agent
152
+ - Include context-loader findings from `/explore` if available
153
+ - Request each agent to analyze from their specialized perspective
154
+ - Ask agents to prepare initial feedback focusing on their domain
109
155
 
110
- - `scope`: Extracted scope/boundaries
111
- - `constraints`: Any specific constraints or requirements
112
- - `context_findings`: Structured findings from context-loader if available:
113
- - `key_components`: Core files and responsibilities
114
- - `patterns`: Conventions to follow
115
- - `dependencies`: External integrations
116
- - `gotchas`: Known issues/edge cases
156
+ ### Phase 2: Multi-Round Collaborative Discussion
117
157
 
118
- ## Output
158
+ **Round 1: Initial Perspectives**
159
+
160
+ 1. Invoke each agent in parallel with the plan and ask for:
161
+
162
+ - Initial assessment from their specialized perspective
163
+ - Key concerns or risks they identify
164
+ - Suggestions for improvement in their domain
165
+ - Questions for other specialists
166
+
167
+ 2. Synthesize all initial feedback into a structured summary
168
+
169
+ **Round 2: Cross-Domain Discussion**
170
+
171
+ 1. Share Round 1 feedback with all agents
172
+ 2. Invoke agents again (in parallel or sequentially based on dependencies) asking them to:
173
+
174
+ - Respond to feedback from other agents
175
+ - Identify areas of agreement and disagreement
176
+ - Propose solutions to concerns raised by others
177
+ - Refine their own recommendations based on peer input
178
+ - Respectfully challenge ideas when they see potential issues
179
+
180
+ 3. Look for:
181
+ - **Consensus areas**: Where agents agree
182
+ - **Disagreements**: Where agents have conflicting views
183
+ - **Gaps**: Issues not yet addressed by any agent
184
+ - **Synergies**: How different agents' suggestions complement each other
119
185
 
120
- Return the plan summary from the planner agent:
186
+ **Round 3: Consensus Building** (if needed)
121
187
 
122
- - `plan_file_path`: Absolute path to the generated markdown plan file
123
- - `summary`: Brief summary of the implementation plan (2-3 sentences)
124
- - `task_analyzed`: Original task that was analyzed
125
- - `context_used`: Whether context-loader findings were leveraged
188
+ If significant disagreements remain:
126
189
 
127
- ### Plan File Contents
190
+ 1. Identify the key points of contention
191
+ 2. Invoke specific agents involved in disagreements
192
+ 3. Ask them to:
193
+ - Find middle ground or propose compromises
194
+ - Evaluate trade-offs explicitly
195
+ - Consider the full system perspective beyond their domain
196
+ 4. Work toward resolution of major conflicts
128
197
 
129
- The generated markdown file includes:
198
+ ### Phase 3: Final Plan Synthesis
130
199
 
131
- 1. **Overview** - High-level summary of the proposed changes and approach
132
- 2. **Scope** - What will and won't be implemented
133
- 3. **Current State** - Relevant architecture, files, and patterns
134
- 4. **API Design** (optional) - Function signatures, data structures, and algorithms when creating/modifying interfaces
135
- 5. **Implementation Steps** - Clear, sequential steps (typically 5-7 for medium tasks)
136
- 6. **Files Summary** - Files to be created or modified
137
- 7. **Critical Challenges** (optional) - Blocking or high-risk issues with mitigation strategies
200
+ 1. **Integrate Feedback**
138
201
 
139
- The plan is written to a markdown file for use with `/review-plan` and `/execute-plan`.
202
+ - Compile all agent feedback across rounds
203
+ - Identify consensus recommendations
204
+ - Document remaining trade-offs and decisions needed
205
+ - Organize feedback by category (architecture, implementation, testing, deployment, etc.)
206
+
207
+ 2. **Generate Final Plan**
208
+
209
+ Create a comprehensive implementation plan that includes:
210
+
211
+ 1. **Overview** - High-level summary of the proposed changes and approach
212
+ 2. **Scope** - What will and won't be implemented
213
+ 3. **Current State** - Relevant architecture, files, and patterns
214
+ 4. **API Design** (optional) - Function signatures, data structures, and algorithms when creating/modifying interfaces
215
+ 5. **Implementation Steps** - Clear, sequential steps (typically 5-7 for medium tasks)
216
+ 6. **Files Summary** - Files to be created or modified
217
+ 7. **Critical Challenges** (optional) - Blocking or high-risk issues with mitigation strategies
218
+ 8. **Agent Collaboration Summary**:
219
+ - List of agents involved and their focus areas
220
+ - Key consensus recommendations by category
221
+ - Design decisions and trade-offs
222
+ - Open questions requiring human decision
223
+ - Dissenting opinions (important disagreements with rationale)
224
+
225
+ 3. **Output Format**
226
+ - Write plan to markdown file: `./.claude-output/plan-[timestamp]-[hash].md`
227
+ - Include conversation transcript (summarized) showing agent discussions
228
+ - Highlight areas of strong consensus vs. areas needing human judgment
140
229
 
141
230
  **What Plans Omit:**
142
231
 
@@ -153,6 +242,8 @@ The planner automatically adapts its output based on task complexity:
153
242
  ### Simple Tasks (Bug fixes, minor features)
154
243
 
155
244
  - **Length**: ~100-200 lines
245
+ - **Agents**: 3-4 specialized agents
246
+ - **Rounds**: 1-2 discussion rounds
156
247
  - Focused scope and 3-5 implementation steps
157
248
  - Minimal challenges section
158
249
  - Optional API design section (often skipped)
@@ -160,6 +251,8 @@ The planner automatically adapts its output based on task complexity:
160
251
  ### Medium Tasks (Features, refactors)
161
252
 
162
253
  - **Length**: ~200-400 lines
254
+ - **Agents**: 5-7 specialized agents
255
+ - **Rounds**: 2-3 discussion rounds
163
256
  - Clear scope with included/excluded items
164
257
  - 5-7 implementation steps
165
258
  - API design when creating new interfaces
@@ -168,11 +261,105 @@ The planner automatically adapts its output based on task complexity:
168
261
  ### Complex Tasks (Major features, architectural changes)
169
262
 
170
263
  - **Length**: ~400-600 lines
264
+ - **Agents**: 8-10 specialized agents
265
+ - **Rounds**: 2-3 discussion rounds
171
266
  - Detailed scope and architectural context
172
267
  - 7-10 implementation steps
173
268
  - Comprehensive API design section
174
269
  - Multiple critical challenges with mitigations
175
270
 
271
+ ## Agent Discussion Guidelines
272
+
273
+ To emulate realistic expert collaboration:
274
+
275
+ ### Encourage Agents To
276
+
277
+ - **Be Direct**: State opinions clearly without over-hedging
278
+ - **Challenge Constructively**: Disagree when they see issues, but propose alternatives
279
+ - **Build On Ideas**: Reference and expand on other agents' suggestions
280
+ - **Ask Questions**: Seek clarification from other agents
281
+ - **Change Positions**: Update views when presented with good arguments
282
+ - **Acknowledge Limits**: Recognize when an issue is outside their expertise
283
+
284
+ ### Discussion Prompts
285
+
286
+ - "Agent X raised concerns about [Y]. What's your perspective on this?"
287
+ - "How would your domain be affected by Agent X's suggestion to [Y]?"
288
+ - "Agent X and Agent Y disagree about [Z]. Can you provide a third perspective?"
289
+ - "Are there any trade-offs in Agent X's proposal that we haven't considered?"
290
+
291
+ ### Realistic Disagreement Examples
292
+
293
+ - Security agent wants encryption everywhere; Performance agent warns of latency impact
294
+ - Backend architect prefers microservices; DevOps engineer concerned about operational complexity
295
+ - Frontend developer wants rich interactivity; Performance engineer pushes for progressive enhancement
296
+
297
+ ## Output
298
+
299
+ Return a structured summary and file path:
300
+
301
+ ```markdown
302
+ ## Implementation Plan Complete
303
+
304
+ **Plan File**: [./.claude-output/plan-20250821-a4b3c2.md](link)
305
+
306
+ **Participants**: [N agents]
307
+
308
+ - [agent-1]: [focus area]
309
+ - [agent-2]: [focus area]
310
+ ...
311
+
312
+ **Discussion Rounds**: [2-3]
313
+
314
+ **Key Outcomes**:
315
+
316
+ - [Consensus item 1]
317
+ - [Consensus item 2]
318
+ - [Trade-off decision 1]
319
+
320
+ **Open Questions**: [N]
321
+
322
+ - [Question requiring human decision]
323
+
324
+ **Summary**:
325
+ [2-3 sentences summarizing the collaborative planning process and key implementation strategy]
326
+
327
+ **Next Steps**:
328
+
329
+ - Review the plan document using `/review-plan <plan-file>`
330
+ - Address any open questions before proceeding
331
+ - Execute with `/execute-plan <plan-file>` when ready
332
+ ```
333
+
334
+ ## Implementation Notes
335
+
336
+ ### Agent Orchestration
337
+
338
+ - Use Task tool to invoke agents
339
+ - Run agents in parallel when gathering independent perspectives
340
+ - Run sequentially when one agent needs to respond to another's specific feedback
341
+ - Limit to 3 discussion rounds maximum to avoid diminishing returns
342
+
343
+ ### Context Management
344
+
345
+ - Keep agent prompts focused on their domain while providing full plan context
346
+ - In later rounds, provide relevant excerpts from other agents' feedback
347
+ - Summarize previous rounds to keep context manageable
348
+ - Automatically include context-loader findings from `/explore` when available
349
+
350
+ ### Handling Edge Cases
351
+
352
+ - **No consensus reached**: Document the disagreement and provide trade-off analysis
353
+ - **Too many agents selected**: Prioritize and cap at 10 most relevant agents
354
+ - **Agent unavailable**: Select next best alternative or proceed with available agents
355
+ - **Circular disagreements**: Invoke a meta-level agent (e.g., architect-reviewer) to arbitrate
356
+
357
+ ### File Management
358
+
359
+ - Create a `./.claude-output` directory if it doesn't exist
360
+ - Use descriptive filenames with timestamps and content hash
361
+ - Include conversation metadata (agents used, rounds completed, timestamp)
362
+
176
363
  ## Integration with Other Commands
177
364
 
178
365
  ### Recommended Workflow
@@ -181,15 +368,19 @@ The planner automatically adapts its output based on task complexity:
181
368
 
182
369
  - Best for medium to complex tasks
183
370
  - Exploration context automatically flows to planner
371
+ - Collaborative refinement ensures comprehensive coverage
372
+ - Review validates the plan before execution
184
373
 
185
374
  2. **Quick Planning**: `/plan` → `/execute-plan`
186
375
 
187
376
  - Suitable for simple, well-understood tasks
188
377
  - Skip review step when plan is straightforward
378
+ - Still benefits from multi-agent collaboration
189
379
 
190
380
  3. **With Review**: `/plan` → `/review-plan` → `/execute-plan`
191
381
  - Skip exploration for simple tasks in familiar code
192
382
  - Add review for validation and improvement suggestions
383
+ - Multi-agent discussion ensures quality
193
384
 
194
385
  ### How Execution Works
195
386
 
@@ -197,3 +388,66 @@ The planner automatically adapts its output based on task complexity:
197
388
  - Agent orchestrator automatically assigns specialized agents to tasks
198
389
  - Testing is handled during execution (not part of planning)
199
390
  - Dependencies and parallel execution are managed by the orchestrator
391
+
392
+ ## Example Session
393
+
394
+ **Input:**
395
+
396
+ ```
397
+ /plan implement real-time collaborative editing with CRDTs
398
+ ```
399
+
400
+ **Process:**
401
+
402
+ 1. Analyzes the task and identifies it as a complex feature
403
+ 2. Selects 6 agents: frontend-developer, backend-architect, database-optimizer, performance-engineer, security-auditor, test-automator
404
+ 3. Round 1: Each agent provides initial assessment
405
+ - Frontend: Concerns about conflict UI/UX
406
+ - Backend: Suggests operational transform vs CRDT comparison
407
+ - Database: Warns about storage overhead for history
408
+ - Performance: Highlights network bandwidth considerations
409
+ - Security: Questions access control in real-time sync
410
+ - Testing: Notes complexity of testing concurrent edits
411
+ 4. Round 2: Cross-pollination
412
+ - Backend responds to performance's bandwidth concerns with compression strategy
413
+ - Security and Frontend discuss access control UX
414
+ - Database and Performance agree on hybrid approach for history retention
415
+ 5. Round 3: Final consensus
416
+ - Agree on CRDT with compression
417
+ - Consensus on 30-day history retention
418
+ - Security and Frontend align on access control approach
419
+ - Testing strategy defined for concurrent scenarios
420
+
421
+ **Output:**
422
+ Comprehensive implementation plan with consensus recommendations, remaining trade-offs, and implementation roadmap informed by multi-domain expert discussion.
423
+
424
+ ## Best Practices
425
+
426
+ ### For Simple Plans
427
+
428
+ - Limit to 3-4 agents
429
+ - 1-2 discussion rounds sufficient
430
+ - Focus on quick validation and obvious improvements
431
+
432
+ ### For Complex Plans
433
+
434
+ - Use 7-10 agents for comprehensive coverage
435
+ - Allow 2-3 discussion rounds for thorough exploration
436
+ - Document dissenting views even if consensus reached
437
+ - Highlight areas needing human architectural decisions
438
+
439
+ ### Quality Indicators
440
+
441
+ - **Good collaboration**: Multiple agents reference each other's feedback
442
+ - **Productive disagreement**: Conflicting views backed by clear rationale
443
+ - **Convergence**: Later rounds show narrowing of options and growing consensus
444
+ - **Actionable output**: Recommendations are specific and implementable
445
+
446
+ ### Avoiding Common Pitfalls
447
+
448
+ - **Don't** force consensus on genuinely ambiguous trade-offs
449
+ - **Don't** let one agent dominate the discussion
450
+ - **Don't** run endless rounds hoping for perfect agreement
451
+ - **Do** document when human judgment is needed
452
+ - **Do** preserve valuable dissenting opinions
453
+ - **Do** prioritize practical over theoretical perfection
@@ -48,7 +48,7 @@
48
48
  "model": {
49
49
  "type": "string",
50
50
  "description": "The AI model to use for this agent",
51
- "enum": ["sonnet-4", "opus-4.1"],
51
+ "enum": ["sonnet-4.5", "opus-4.1"],
52
52
  "x-prompt": {
53
53
  "message": "🧠 Which AI model should this agent use?",
54
54
  "type": "list"
@@ -726,7 +726,7 @@ var commands = {
726
726
  filePath: "./monitor.md"
727
727
  },
728
728
  plan: {
729
- description: "Create clear, actionable implementation plans for any task, feature, refactor, or architectural change",
729
+ description: "Create clear, actionable implementation plans for any task, feature, refactor, or architectural change through collaborative multi-agent refinement",
730
730
  filePath: "./plan.md"
731
731
  },
732
732
  refactor: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/ai-toolkit-nx-claude",
3
- "version": "0.5.9",
3
+ "version": "0.5.10-next.1",
4
4
  "private": false,
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.cjs",