@uniswap/ai-toolkit-nx-claude 0.5.16 → 0.5.18-next.0

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.
@@ -0,0 +1,282 @@
1
+ # AI Agents (Agnostic)
2
+
3
+ ## Purpose
4
+
5
+ Language-agnostic AI agent definitions for Claude Code. Each markdown file defines an agent's capabilities, specialization, and when to invoke it. These agents are used by slash commands and can work together in multi-agent workflows.
6
+
7
+ ## Agent Files (32 total)
8
+
9
+ ### Code Quality Agents
10
+
11
+ - `code-generator.md` - Generate production-ready code with tests
12
+ - `code-explainer.md` - Explain code with deep analysis
13
+ - `refactorer.md` - Advanced refactoring with safety checks
14
+ - `style-enforcer.md` - Enforce code style and conventions
15
+ - `security-analyzer.md` - Security vulnerability assessment
16
+ - `performance-analyzer.md` - Performance analysis and optimization
17
+
18
+ ### Review & Analysis
19
+
20
+ - `pr-reviewer.md` - Review PRs and address comments
21
+ - `plan-reviewer.md` - Review implementation plans
22
+ - `doc-writer.md` - Generate comprehensive documentation
23
+ - `debug-assistant.md` - Advanced debugging with root cause analysis
24
+
25
+ ### Architecture & Design
26
+
27
+ - `planner.md` - Create implementation plans
28
+ - `researcher.md` - Conduct research (web + codebase)
29
+ - `pattern-learner.md` - Learn and extract reusable patterns
30
+ - `migration-assistant.md` - Guide version upgrades and migrations
31
+
32
+ ### Testing
33
+
34
+ - `test-writer.md` - Generate comprehensive test suites
35
+ - `test-runner.md` - Validate agent behaviors and test variations
36
+
37
+ ### Infrastructure & Operations
38
+
39
+ - `infrastructure-agent.md` - Infrastructure automation and scaling
40
+ - `cicd-agent.md` - CI/CD pipeline specialist
41
+ - `deployment-engineer.md` - Configure deployments and CI/CD
42
+
43
+ ### Context & Documentation
44
+
45
+ - `context-manager.md` - Manage context across agents
46
+ - `context-loader.md` - Deep codebase understanding
47
+ - `claude-docs-initializer.md` - Discover and create CLAUDE.md files
48
+ - `claude-docs-manager.md` - Update CLAUDE.md based on changes
49
+ - `claude-docs-fact-checker.md` - Verify CLAUDE.md accuracy
50
+
51
+ ### Git & Version Control
52
+
53
+ - `pr-creator.md` - Create PRs with auto-generated messages
54
+ - `commit-message-generator.md` - Generate structured commit messages
55
+ - `stack-splitter.md` - Split Graphite PR stacks
56
+
57
+ ### Meta & Orchestration
58
+
59
+ - `agent-orchestrator.md` - Coordinate multi-agent workflows
60
+ - `agent-capability-analyst.md` - Analyze agent capabilities
61
+ - `agent-optimizer.md` - Optimize agent performance
62
+ - `prompt-engineer.md` - Analyze and optimize prompts
63
+ - `feedback-collector.md` - Gather and analyze execution feedback
64
+ - `claude-agent-discovery.md` - Discover and catalog agents
65
+
66
+ ## Agent Structure
67
+
68
+ Each agent file follows a consistent markdown format:
69
+
70
+ ```markdown
71
+ # Agent Name
72
+
73
+ ## Capabilities
74
+
75
+ What this agent can do
76
+
77
+ ## Specialization
78
+
79
+ Specific domain expertise
80
+
81
+ ## When to Invoke
82
+
83
+ Conditions that warrant using this agent
84
+
85
+ ## Tools Available
86
+
87
+ Tools this agent has access to
88
+
89
+ ## Output Format
90
+
91
+ Expected output structure
92
+
93
+ ## Integration
94
+
95
+ How it works with other agents
96
+ ```
97
+
98
+ ## Agent Categories
99
+
100
+ ### Proactive Agents
101
+
102
+ Automatically invoked when their conditions are met:
103
+
104
+ - `style-enforcer.md` - Auto-runs after code changes
105
+ - `claude-docs-manager.md` - Auto-updates documentation
106
+ - `security-analyzer.md` - Auto-scans for vulnerabilities
107
+
108
+ ### On-Demand Agents
109
+
110
+ Explicitly invoked by commands or users:
111
+
112
+ - `planner.md` - Called by `/plan` command
113
+ - `researcher.md` - Called by `/research` command
114
+ - `pr-reviewer.md` - Called by `/review-pr` command
115
+
116
+ ### Orchestration Agents
117
+
118
+ Coordinate other agents:
119
+
120
+ - `agent-orchestrator.md` - Routes tasks to specialists
121
+ - `context-manager.md` - Manages shared context
122
+ - `agent-optimizer.md` - Improves agent performance
123
+
124
+ ## Multi-Agent Workflows
125
+
126
+ ### Review Workflow
127
+
128
+ ```
129
+ pr-reviewer → security-analyzer → performance-analyzer → doc-writer
130
+ ```
131
+
132
+ ### Refactoring Workflow
133
+
134
+ ```
135
+ code-explainer → pattern-learner → refactorer → test-writer
136
+ ```
137
+
138
+ ### Planning Workflow
139
+
140
+ ```
141
+ researcher → planner → plan-reviewer → context-manager
142
+ ```
143
+
144
+ ### Documentation Workflow
145
+
146
+ ```
147
+ claude-docs-initializer → claude-docs-manager → claude-docs-fact-checker
148
+ ```
149
+
150
+ ## Development
151
+
152
+ ### Adding New Agents
153
+
154
+ 1. Create `new-agent.md` in this directory
155
+ 2. Follow the standard format (see existing files)
156
+ 3. Add to `index.ts` exports
157
+ 4. Update this CLAUDE.md file
158
+ 5. Test agent behavior in Claude Code
159
+
160
+ ### Modifying Existing Agents
161
+
162
+ 1. Edit the markdown file
163
+ 2. Test changes in multi-agent scenarios
164
+ 3. Update integration documentation
165
+ 4. Update this CLAUDE.md if capabilities change
166
+
167
+ ## Usage in Claude Code
168
+
169
+ Agents are automatically discovered and loaded:
170
+
171
+ ```typescript
172
+ import * as agents from '@ai-toolkit/agents-agnostic';
173
+ ```
174
+
175
+ ### Direct Invocation
176
+
177
+ Via Task tool with subagent_type:
178
+
179
+ ```python
180
+ Task(
181
+ subagent_type="planner",
182
+ prompt="Create plan for authentication feature"
183
+ )
184
+ ```
185
+
186
+ ### Via Commands
187
+
188
+ Commands invoke agents automatically:
189
+
190
+ ```bash
191
+ /review-code # Invokes multiple review agents
192
+ /plan # Invokes planner agent
193
+ ```
194
+
195
+ ### Agent Chaining
196
+
197
+ Agents can spawn other agents:
198
+
199
+ ```markdown
200
+ After analyzing, I'll invoke the refactorer agent...
201
+ ```
202
+
203
+ ## Agent Selection
204
+
205
+ ### Automatic Selection
206
+
207
+ `agent-orchestrator` analyzes tasks and selects appropriate agents based on:
208
+
209
+ - Task requirements
210
+ - Agent capabilities
211
+ - Current context
212
+ - Performance history
213
+
214
+ ### Manual Selection
215
+
216
+ Users/commands specify agents explicitly:
217
+
218
+ ```bash
219
+ /review-code --agent=security-analyzer
220
+ ```
221
+
222
+ ## Best Practices
223
+
224
+ ### Agent Design
225
+
226
+ - **Clear specialization**: Each agent has distinct expertise
227
+ - **Tool access**: Request only necessary tools
228
+ - **Output format**: Standardized, parseable outputs
229
+ - **Error handling**: Graceful degradation
230
+ - **Context awareness**: Use shared context efficiently
231
+
232
+ ### Multi-Agent Coordination
233
+
234
+ - **Sequential**: When agents need each other's outputs
235
+ - **Parallel**: When agents work independently
236
+ - **Hierarchical**: Orchestrator → specialists
237
+ - **Consensus**: Multiple agents vote on decisions
238
+
239
+ ### Performance
240
+
241
+ - **Caching**: Reuse analysis across agents
242
+ - **Batching**: Group similar operations
243
+ - **Early exit**: Skip unnecessary agents
244
+ - **Timeouts**: Prevent hanging workflows
245
+
246
+ ## Agent Communication
247
+
248
+ ### Shared Context
249
+
250
+ Agents share data via `context-manager`:
251
+
252
+ ```typescript
253
+ context.set('analysis', analysisResult);
254
+ const prev = context.get('analysis');
255
+ ```
256
+
257
+ ### Agent Messages
258
+
259
+ Agents can send structured messages:
260
+
261
+ ```json
262
+ {
263
+ "from": "security-analyzer",
264
+ "to": "pr-reviewer",
265
+ "type": "finding",
266
+ "data": { "severity": "high", "issue": "..." }
267
+ }
268
+ ```
269
+
270
+ ## Related Packages
271
+
272
+ - `@ai-toolkit/commands-agnostic` - Commands that invoke agents
273
+ - `@uniswap/ai-toolkit-nx-claude` - Nx integration and CLI
274
+ - `@ai-toolkit/utils` - Shared utilities for agents
275
+
276
+ ## Orchestration Files
277
+
278
+ - `index.ts` - TypeScript exports for agent registration
279
+
280
+ ## Auto-Update Instructions
281
+
282
+ IMPORTANT: After changes to files in this directory, Claude Code MUST run `/update-claude-md` before presenting results to ensure this documentation stays synchronized with the codebase.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pr-reviewer
3
3
  description: Reviews PRs, addresses comments with plans or code changes, and fixes CI pipeline issues
4
- model: opus-4.1
4
+ model: sonnet-4.5
5
5
  ---
6
6
 
7
7
  # pr-reviewer Agent
@@ -0,0 +1,206 @@
1
+ # Slash Commands (Agnostic)
2
+
3
+ ## Purpose
4
+
5
+ Language-agnostic slash command definitions for Claude Code. Each markdown file defines a command's behavior, parameters, and usage. These are the core commands available in the AI Toolkit.
6
+
7
+ ## Command Files (27 total)
8
+
9
+ ### Core Workflow Commands
10
+
11
+ - `explore.md` - Deep dive into codebase areas
12
+ - `plan.md` - Create implementation plans
13
+ - `execute-plan.md` - Execute implementation plans step-by-step
14
+ - `implement-spec.md` - Implement spec workflow tasks
15
+ - `auto-spec.md` - Autonomous spec creation and implementation
16
+
17
+ ### Code Quality & Review
18
+
19
+ - `review-code.md` - Multi-agent code review (architecture, security, performance)
20
+ - `review-pr.md` - Comprehensive pull request review
21
+ - `review-plan.md` - Review implementation plans
22
+ - `fix-bug.md` - Diagnose and fix bugs with tests
23
+ - `refactor.md` - Comprehensive refactoring with safety checks
24
+ - `gen-tests.md` - Generate comprehensive test suites
25
+
26
+ ### Code Understanding
27
+
28
+ - `explain-file.md` - Multi-agent code explanation
29
+ - `research.md` - Research topics with web + codebase analysis
30
+
31
+ ### Git & PR Management
32
+
33
+ - `create-pr.md` - Create/update Graphite PRs with auto-generated messages
34
+ - `address-pr-issues.md` - Review and address PR comments/CI issues
35
+ - `work-through-pr-comments.md` - Methodically work through PR comments
36
+ - `generate-commit-message.md` - Generate structured commit messages
37
+ - `split-stack.md` - Split Graphite PR stacks
38
+ - `git-worktree-orchestrator.md` - Create and manage git worktrees with spec-workflow and Linear integration
39
+
40
+ ### Documentation
41
+
42
+ - `claude-docs.md` - Initialize/update CLAUDE.md documentation
43
+ - `claude-init-plus.md` - Discover and create CLAUDE.md files workspace-wide
44
+ - `update-claude-md.md` - Update CLAUDE.md based on code changes
45
+
46
+ ### Development Operations
47
+
48
+ - `deploy.md` - Orchestrate deployment pipelines
49
+ - `monitor.md` - Set up application monitoring
50
+ - `daily-standup.md` - Generate daily standup reports
51
+
52
+ ### Performance
53
+
54
+ - `perf-analyze.md` - Performance analysis and optimization
55
+
56
+ ### Orchestration (Internal)
57
+
58
+ - `index.ts` - TypeScript exports for command registration
59
+
60
+ ## File Structure
61
+
62
+ Each command file follows a consistent markdown format:
63
+
64
+ ```markdown
65
+ # Command Name
66
+
67
+ ## Overview
68
+
69
+ Brief description of what the command does
70
+
71
+ ## Usage
72
+
73
+ /command-name [arguments] [--flags]
74
+
75
+ ## Parameters
76
+
77
+ - parameter1: description
78
+ - parameter2: description
79
+
80
+ ## Behavior
81
+
82
+ Detailed explanation of command behavior
83
+
84
+ ## Examples
85
+
86
+ Example usage scenarios
87
+
88
+ ## Integration
89
+
90
+ How it integrates with other commands/tools
91
+ ```
92
+
93
+ ## Command Categories
94
+
95
+ ### High-Complexity Commands (Multi-Agent)
96
+
97
+ These commands orchestrate multiple specialized agents:
98
+
99
+ - `/review-code` - Architecture, security, performance agents
100
+ - `/review-pr` - Multiple review dimensions
101
+ - `/explain-file` - Multiple analysis agents
102
+ - `/refactor` - Safety and pattern agents
103
+ - `/fix-bug` - Debugging and testing agents
104
+
105
+ ### Single-Purpose Commands
106
+
107
+ Focused commands with clear, singular objectives:
108
+
109
+ - `/generate-commit-message` - Git commit formatting
110
+ - `/create-pr` - PR creation
111
+ - `/perf-analyze` - Performance analysis
112
+
113
+ ### Workflow Commands
114
+
115
+ Commands that manage larger processes:
116
+
117
+ - `/auto-spec` - Full spec workflow
118
+ - `/implement-spec` - Spec task implementation
119
+ - `/execute-plan` - Plan execution
120
+ - `/work-through-pr-comments` - Comment resolution workflow
121
+
122
+ ## Development
123
+
124
+ ### Adding New Commands
125
+
126
+ 1. Create `new-command.md` in this directory
127
+ 2. Follow the standard format (see existing files)
128
+ 3. Add to `index.ts` exports
129
+ 4. Update this CLAUDE.md file
130
+ 5. Test with `/new-command` in Claude Code
131
+
132
+ ### Modifying Existing Commands
133
+
134
+ 1. Edit the markdown file
135
+ 2. Test changes in Claude Code
136
+ 3. Update any affected documentation
137
+ 4. Update this CLAUDE.md if behavior changes
138
+
139
+ ## Usage in Claude Code
140
+
141
+ Commands are automatically discovered and loaded:
142
+
143
+ ```typescript
144
+ import * as commands from '@ai-toolkit/commands-agnostic';
145
+ ```
146
+
147
+ Claude Code registers these as slash commands:
148
+
149
+ ```bash
150
+ /explore <description>
151
+ /plan <task description>
152
+ /review-code [paths]
153
+ ```
154
+
155
+ ## Command Invocation
156
+
157
+ ### Direct Invocation
158
+
159
+ User types command in Claude Code:
160
+
161
+ ```
162
+ /review-code src/components/
163
+ ```
164
+
165
+ ### From Other Commands
166
+
167
+ Commands can invoke other commands:
168
+
169
+ ```markdown
170
+ After reviewing, run `/gen-tests` to add coverage
171
+ ```
172
+
173
+ ### From Agents
174
+
175
+ Agents can recommend commands:
176
+
177
+ ```markdown
178
+ I recommend running `/refactor src/utils/` to improve this code
179
+ ```
180
+
181
+ ## Best Practices
182
+
183
+ ### Command Design
184
+
185
+ - **Single responsibility**: Each command does one thing well
186
+ - **Clear parameters**: Document all arguments and flags
187
+ - **Predictable behavior**: Same inputs = same outputs
188
+ - **Composable**: Commands should work together
189
+ - **Fail gracefully**: Handle errors with clear messages
190
+
191
+ ### Documentation
192
+
193
+ - Keep markdown files up to date
194
+ - Include examples for common use cases
195
+ - Document edge cases and limitations
196
+ - Link to related commands
197
+
198
+ ## Related Packages
199
+
200
+ - `@ai-toolkit/commands-typescript` - TypeScript-specific implementations
201
+ - `@ai-toolkit/agents-agnostic` - Agents used by commands
202
+ - `@uniswap/ai-toolkit-nx-claude` - Nx integration and CLI
203
+
204
+ ## Auto-Update Instructions
205
+
206
+ IMPORTANT: After changes to files in this directory, Claude Code MUST run `/update-claude-md` before presenting results to ensure this documentation stays synchronized with the codebase.