@blackms/aistack 1.0.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.
- package/README.md +244 -0
- package/dist/agents/definitions/analyst.d.ts +6 -0
- package/dist/agents/definitions/analyst.d.ts.map +1 -0
- package/dist/agents/definitions/analyst.js +53 -0
- package/dist/agents/definitions/analyst.js.map +1 -0
- package/dist/agents/definitions/architect.d.ts +6 -0
- package/dist/agents/definitions/architect.d.ts.map +1 -0
- package/dist/agents/definitions/architect.js +46 -0
- package/dist/agents/definitions/architect.js.map +1 -0
- package/dist/agents/definitions/coder.d.ts +6 -0
- package/dist/agents/definitions/coder.d.ts.map +1 -0
- package/dist/agents/definitions/coder.js +39 -0
- package/dist/agents/definitions/coder.js.map +1 -0
- package/dist/agents/definitions/coordinator.d.ts +6 -0
- package/dist/agents/definitions/coordinator.d.ts.map +1 -0
- package/dist/agents/definitions/coordinator.js +54 -0
- package/dist/agents/definitions/coordinator.js.map +1 -0
- package/dist/agents/definitions/index.d.ts +11 -0
- package/dist/agents/definitions/index.d.ts.map +1 -0
- package/dist/agents/definitions/index.js +11 -0
- package/dist/agents/definitions/index.js.map +1 -0
- package/dist/agents/definitions/researcher.d.ts +6 -0
- package/dist/agents/definitions/researcher.d.ts.map +1 -0
- package/dist/agents/definitions/researcher.js +39 -0
- package/dist/agents/definitions/researcher.js.map +1 -0
- package/dist/agents/definitions/reviewer.d.ts +6 -0
- package/dist/agents/definitions/reviewer.d.ts.map +1 -0
- package/dist/agents/definitions/reviewer.js +46 -0
- package/dist/agents/definitions/reviewer.js.map +1 -0
- package/dist/agents/definitions/tester.d.ts +6 -0
- package/dist/agents/definitions/tester.d.ts.map +1 -0
- package/dist/agents/definitions/tester.js +44 -0
- package/dist/agents/definitions/tester.js.map +1 -0
- package/dist/agents/index.d.ts +7 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +7 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.d.ts +41 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +107 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/spawner.d.ts +62 -0
- package/dist/agents/spawner.d.ts.map +1 -0
- package/dist/agents/spawner.js +169 -0
- package/dist/agents/spawner.js.map +1 -0
- package/dist/cli/commands/agent.d.ts +6 -0
- package/dist/cli/commands/agent.d.ts.map +1 -0
- package/dist/cli/commands/agent.js +144 -0
- package/dist/cli/commands/agent.js.map +1 -0
- package/dist/cli/commands/index.d.ts +10 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +10 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +50 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +6 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +82 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/memory.d.ts +6 -0
- package/dist/cli/commands/memory.d.ts.map +1 -0
- package/dist/cli/commands/memory.js +157 -0
- package/dist/cli/commands/memory.js.map +1 -0
- package/dist/cli/commands/plugin.d.ts +6 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +146 -0
- package/dist/cli/commands/plugin.js.map +1 -0
- package/dist/cli/commands/status.d.ts +6 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +115 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +41 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/coordination/index.d.ts +7 -0
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +7 -0
- package/dist/coordination/index.js.map +1 -0
- package/dist/coordination/message-bus.d.ts +64 -0
- package/dist/coordination/message-bus.d.ts.map +1 -0
- package/dist/coordination/message-bus.js +148 -0
- package/dist/coordination/message-bus.js.map +1 -0
- package/dist/coordination/task-queue.d.ts +71 -0
- package/dist/coordination/task-queue.d.ts.map +1 -0
- package/dist/coordination/task-queue.js +140 -0
- package/dist/coordination/task-queue.js.map +1 -0
- package/dist/coordination/topology.d.ts +68 -0
- package/dist/coordination/topology.d.ts.map +1 -0
- package/dist/coordination/topology.js +195 -0
- package/dist/coordination/topology.js.map +1 -0
- package/dist/github/client.d.ts +56 -0
- package/dist/github/client.d.ts.map +1 -0
- package/dist/github/client.js +179 -0
- package/dist/github/client.js.map +1 -0
- package/dist/github/index.d.ts +5 -0
- package/dist/github/index.d.ts.map +1 -0
- package/dist/github/index.js +5 -0
- package/dist/github/index.js.map +1 -0
- package/dist/hooks/index.d.ts +29 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +112 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/session.d.ts +16 -0
- package/dist/hooks/session.d.ts.map +1 -0
- package/dist/hooks/session.js +60 -0
- package/dist/hooks/session.js.map +1 -0
- package/dist/hooks/task.d.ts +16 -0
- package/dist/hooks/task.d.ts.map +1 -0
- package/dist/hooks/task.js +82 -0
- package/dist/hooks/task.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +6 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +22 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +128 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/agent-tools.d.ts +174 -0
- package/dist/mcp/tools/agent-tools.d.ts.map +1 -0
- package/dist/mcp/tools/agent-tools.js +214 -0
- package/dist/mcp/tools/agent-tools.js.map +1 -0
- package/dist/mcp/tools/github-tools.d.ts +229 -0
- package/dist/mcp/tools/github-tools.d.ts.map +1 -0
- package/dist/mcp/tools/github-tools.js +286 -0
- package/dist/mcp/tools/github-tools.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +10 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +10 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/memory-tools.d.ts +190 -0
- package/dist/mcp/tools/memory-tools.d.ts.map +1 -0
- package/dist/mcp/tools/memory-tools.js +207 -0
- package/dist/mcp/tools/memory-tools.js.map +1 -0
- package/dist/mcp/tools/session-tools.d.ts +116 -0
- package/dist/mcp/tools/session-tools.d.ts.map +1 -0
- package/dist/mcp/tools/session-tools.js +151 -0
- package/dist/mcp/tools/session-tools.js.map +1 -0
- package/dist/mcp/tools/system-tools.d.ts +98 -0
- package/dist/mcp/tools/system-tools.d.ts.map +1 -0
- package/dist/mcp/tools/system-tools.js +165 -0
- package/dist/mcp/tools/system-tools.js.map +1 -0
- package/dist/mcp/tools/task-tools.d.ts +170 -0
- package/dist/mcp/tools/task-tools.d.ts.map +1 -0
- package/dist/mcp/tools/task-tools.js +188 -0
- package/dist/mcp/tools/task-tools.js.map +1 -0
- package/dist/memory/fts-search.d.ts +46 -0
- package/dist/memory/fts-search.d.ts.map +1 -0
- package/dist/memory/fts-search.js +136 -0
- package/dist/memory/fts-search.js.map +1 -0
- package/dist/memory/index.d.ts +77 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +203 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/sqlite-store.d.ts +36 -0
- package/dist/memory/sqlite-store.d.ts.map +1 -0
- package/dist/memory/sqlite-store.js +371 -0
- package/dist/memory/sqlite-store.js.map +1 -0
- package/dist/memory/vector-search.d.ts +43 -0
- package/dist/memory/vector-search.d.ts.map +1 -0
- package/dist/memory/vector-search.js +179 -0
- package/dist/memory/vector-search.js.map +1 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +7 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/loader.d.ts +33 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +147 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/registry.d.ts +48 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +72 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/types.d.ts +5 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +5 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/providers/index.d.ts +49 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +254 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/types.d.ts +189 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/config.d.ts +32 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +194 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/embeddings.d.ts +23 -0
- package/dist/utils/embeddings.d.ts.map +1 -0
- package/dist/utils/embeddings.js +151 -0
- package/dist/utils/embeddings.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +24 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +96 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/validation.d.ts +264 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +144 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# aistack
|
|
2
|
+
|
|
3
|
+
Clean agent orchestration for Claude Code.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **7 Core Agents**: coder, researcher, tester, reviewer, architect, coordinator, analyst
|
|
8
|
+
- **25 MCP Tools**: Agent, memory, task, session, system, and GitHub operations
|
|
9
|
+
- **SQLite + FTS5**: Full-text search with optional vector search
|
|
10
|
+
- **Multi-Provider**: Anthropic, OpenAI, Ollama support
|
|
11
|
+
- **Plugin System**: Extend with custom agents and tools
|
|
12
|
+
- **4 Hooks**: session-start, session-end, pre-task, post-task
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @blackms/aistack
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Initialize project
|
|
24
|
+
npx aistack init
|
|
25
|
+
|
|
26
|
+
# Add MCP server to Claude Code
|
|
27
|
+
claude mcp add aistack -- npx aistack mcp start
|
|
28
|
+
|
|
29
|
+
# Check status
|
|
30
|
+
npx aistack status
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## CLI Commands
|
|
34
|
+
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `init` | Initialize a new project |
|
|
38
|
+
| `agent` | Manage agents (spawn, list, stop, status) |
|
|
39
|
+
| `memory` | Memory operations (store, search, list, delete) |
|
|
40
|
+
| `mcp` | Start MCP server |
|
|
41
|
+
| `plugin` | Plugin management |
|
|
42
|
+
| `status` | System status |
|
|
43
|
+
|
|
44
|
+
## Usage Examples
|
|
45
|
+
|
|
46
|
+
### Memory Operations
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Store a key-value pair
|
|
50
|
+
npx aistack memory store -k "auth-pattern" -v "Use JWT with refresh tokens"
|
|
51
|
+
|
|
52
|
+
# Search memory
|
|
53
|
+
npx aistack memory search -q "authentication"
|
|
54
|
+
|
|
55
|
+
# List entries
|
|
56
|
+
npx aistack memory list -n my-namespace
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Agent Operations
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Spawn an agent
|
|
63
|
+
npx aistack agent spawn -t coder -n my-coder
|
|
64
|
+
|
|
65
|
+
# List active agents
|
|
66
|
+
npx aistack agent list
|
|
67
|
+
|
|
68
|
+
# Get agent status
|
|
69
|
+
npx aistack agent status -n my-coder
|
|
70
|
+
|
|
71
|
+
# Stop an agent
|
|
72
|
+
npx aistack agent stop -n my-coder
|
|
73
|
+
|
|
74
|
+
# List available agent types
|
|
75
|
+
npx aistack agent types
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### MCP Server
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Start MCP server
|
|
82
|
+
npx aistack mcp start
|
|
83
|
+
|
|
84
|
+
# List available tools
|
|
85
|
+
npx aistack mcp tools
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Configuration
|
|
89
|
+
|
|
90
|
+
Create `aistack.config.json`:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"version": "1.0.0",
|
|
95
|
+
"memory": {
|
|
96
|
+
"path": "./data/aistack.db",
|
|
97
|
+
"defaultNamespace": "default",
|
|
98
|
+
"vectorSearch": {
|
|
99
|
+
"enabled": false,
|
|
100
|
+
"provider": "openai",
|
|
101
|
+
"model": "text-embedding-3-small"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"providers": {
|
|
105
|
+
"default": "anthropic",
|
|
106
|
+
"anthropic": {
|
|
107
|
+
"apiKey": "${ANTHROPIC_API_KEY}"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"agents": {
|
|
111
|
+
"maxConcurrent": 5,
|
|
112
|
+
"defaultTimeout": 300
|
|
113
|
+
},
|
|
114
|
+
"github": {
|
|
115
|
+
"enabled": false,
|
|
116
|
+
"useGhCli": true
|
|
117
|
+
},
|
|
118
|
+
"plugins": {
|
|
119
|
+
"enabled": true,
|
|
120
|
+
"directory": "./plugins"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## MCP Tools
|
|
126
|
+
|
|
127
|
+
### Agent Tools
|
|
128
|
+
- `agent_spawn` - Spawn a new agent
|
|
129
|
+
- `agent_list` - List active agents
|
|
130
|
+
- `agent_stop` - Stop an agent
|
|
131
|
+
- `agent_status` - Get agent status
|
|
132
|
+
- `agent_types` - List available types
|
|
133
|
+
- `agent_update_status` - Update agent status
|
|
134
|
+
|
|
135
|
+
### Memory Tools
|
|
136
|
+
- `memory_store` - Store a key-value pair
|
|
137
|
+
- `memory_search` - Search memory
|
|
138
|
+
- `memory_get` - Get entry by key
|
|
139
|
+
- `memory_list` - List entries
|
|
140
|
+
- `memory_delete` - Delete entry
|
|
141
|
+
|
|
142
|
+
### Task Tools
|
|
143
|
+
- `task_create` - Create a task
|
|
144
|
+
- `task_assign` - Assign to agent
|
|
145
|
+
- `task_complete` - Mark complete
|
|
146
|
+
- `task_list` - List tasks
|
|
147
|
+
- `task_get` - Get task by ID
|
|
148
|
+
|
|
149
|
+
### Session Tools
|
|
150
|
+
- `session_start` - Start session
|
|
151
|
+
- `session_end` - End session
|
|
152
|
+
- `session_status` - Get status
|
|
153
|
+
- `session_active` - Get active session
|
|
154
|
+
|
|
155
|
+
### System Tools
|
|
156
|
+
- `system_status` - Overall status
|
|
157
|
+
- `system_health` - Health checks
|
|
158
|
+
- `system_config` - Current config
|
|
159
|
+
|
|
160
|
+
### GitHub Tools (when enabled)
|
|
161
|
+
- `github_issue_create` - Create issue
|
|
162
|
+
- `github_issue_list` - List issues
|
|
163
|
+
- `github_issue_get` - Get issue
|
|
164
|
+
- `github_pr_create` - Create PR
|
|
165
|
+
- `github_pr_list` - List PRs
|
|
166
|
+
- `github_pr_get` - Get PR
|
|
167
|
+
- `github_repo_info` - Repo info
|
|
168
|
+
|
|
169
|
+
## Programmatic Usage
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
import {
|
|
173
|
+
spawnAgent,
|
|
174
|
+
getMemoryManager,
|
|
175
|
+
startMCPServer,
|
|
176
|
+
getConfig,
|
|
177
|
+
} from '@blackms/aistack';
|
|
178
|
+
|
|
179
|
+
// Get config
|
|
180
|
+
const config = getConfig();
|
|
181
|
+
|
|
182
|
+
// Spawn an agent
|
|
183
|
+
const agent = spawnAgent('coder', { name: 'my-coder' });
|
|
184
|
+
|
|
185
|
+
// Use memory
|
|
186
|
+
const memory = getMemoryManager(config);
|
|
187
|
+
await memory.store('key', 'value', { namespace: 'test' });
|
|
188
|
+
const results = await memory.search('query');
|
|
189
|
+
|
|
190
|
+
// Start MCP server
|
|
191
|
+
const server = await startMCPServer(config);
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Plugin Development
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
// my-plugin/index.ts
|
|
198
|
+
import type { AIStackPlugin } from '@blackms/aistack';
|
|
199
|
+
|
|
200
|
+
export default {
|
|
201
|
+
name: 'my-plugin',
|
|
202
|
+
version: '1.0.0',
|
|
203
|
+
agents: [
|
|
204
|
+
{
|
|
205
|
+
type: 'custom-agent',
|
|
206
|
+
name: 'Custom Agent',
|
|
207
|
+
description: 'Does custom things',
|
|
208
|
+
systemPrompt: 'You are a custom agent...',
|
|
209
|
+
capabilities: ['custom-capability'],
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
tools: [
|
|
213
|
+
{
|
|
214
|
+
name: 'custom_tool',
|
|
215
|
+
description: 'A custom tool',
|
|
216
|
+
inputSchema: { type: 'object', properties: {} },
|
|
217
|
+
handler: async (params) => {
|
|
218
|
+
return { result: 'done' };
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
} satisfies AIStackPlugin;
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Architecture
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
aistack/
|
|
229
|
+
├── src/
|
|
230
|
+
│ ├── cli/ # CLI commands
|
|
231
|
+
│ ├── agents/ # Agent definitions and spawner
|
|
232
|
+
│ ├── memory/ # SQLite store + FTS5 + vector search
|
|
233
|
+
│ ├── mcp/ # MCP server and tools
|
|
234
|
+
│ ├── providers/ # LLM providers
|
|
235
|
+
│ ├── coordination/ # Task queue and message bus
|
|
236
|
+
│ ├── plugins/ # Plugin system
|
|
237
|
+
│ ├── hooks/ # Event hooks
|
|
238
|
+
│ └── github/ # GitHub integration
|
|
239
|
+
└── tests/
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyst.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/analyst.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,eAgD1B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analyst agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const analystAgent = {
|
|
5
|
+
type: 'analyst',
|
|
6
|
+
name: 'Analyst',
|
|
7
|
+
description: 'Analyze data, performance, and metrics',
|
|
8
|
+
systemPrompt: `You are an expert analyst focused on data and performance analysis.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- Base conclusions on evidence, not assumptions
|
|
12
|
+
- Quantify findings with specific metrics
|
|
13
|
+
- Present data clearly and accurately
|
|
14
|
+
- Identify actionable insights
|
|
15
|
+
|
|
16
|
+
## Analysis Approach
|
|
17
|
+
1. Define what needs to be measured
|
|
18
|
+
2. Gather relevant data and metrics
|
|
19
|
+
3. Analyze patterns and anomalies
|
|
20
|
+
4. Draw evidence-based conclusions
|
|
21
|
+
5. Recommend concrete actions
|
|
22
|
+
|
|
23
|
+
## Types of Analysis
|
|
24
|
+
- **Performance**: Response times, throughput, resource usage
|
|
25
|
+
- **Code Quality**: Complexity, duplication, test coverage
|
|
26
|
+
- **Usage Patterns**: Common paths, error rates, bottlenecks
|
|
27
|
+
- **Trends**: Changes over time, growth patterns
|
|
28
|
+
- **Comparisons**: Before/after, baseline vs current
|
|
29
|
+
|
|
30
|
+
## Guidelines
|
|
31
|
+
- Use appropriate tools for measurement
|
|
32
|
+
- Document methodology and assumptions
|
|
33
|
+
- Present uncertainty honestly
|
|
34
|
+
- Visualize data when it aids understanding
|
|
35
|
+
- Prioritize insights by impact
|
|
36
|
+
|
|
37
|
+
## Reporting Format
|
|
38
|
+
1. Summary: Key findings in 2-3 sentences
|
|
39
|
+
2. Metrics: Specific numbers with context
|
|
40
|
+
3. Analysis: What the data shows
|
|
41
|
+
4. Recommendations: What to do about it
|
|
42
|
+
5. Caveats: Limitations and uncertainties
|
|
43
|
+
|
|
44
|
+
When analyzing, focus on insights that lead to better decisions.`,
|
|
45
|
+
capabilities: [
|
|
46
|
+
'data-analysis',
|
|
47
|
+
'performance-profiling',
|
|
48
|
+
'metrics-collection',
|
|
49
|
+
'trend-analysis',
|
|
50
|
+
'reporting',
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=analyst.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyst.js","sourceRoot":"","sources":["../../../src/agents/definitions/analyst.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAoB;IAC3C,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,wCAAwC;IACrD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAoCiD;IAC/D,YAAY,EAAE;QACZ,eAAe;QACf,uBAAuB;QACvB,oBAAoB;QACpB,gBAAgB;QAChB,WAAW;KACZ;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architect.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/architect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,eAyC5B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architect agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const architectAgent = {
|
|
5
|
+
type: 'architect',
|
|
6
|
+
name: 'Architect',
|
|
7
|
+
description: 'Design system architecture and make technical decisions',
|
|
8
|
+
systemPrompt: `You are an expert software architect focused on system design.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- Design for simplicity first, complexity only when needed
|
|
12
|
+
- Consider trade-offs explicitly
|
|
13
|
+
- Think about maintainability and evolution
|
|
14
|
+
- Document decisions and rationale
|
|
15
|
+
|
|
16
|
+
## Design Approach
|
|
17
|
+
1. Understand requirements and constraints
|
|
18
|
+
2. Identify key technical decisions
|
|
19
|
+
3. Consider multiple approaches
|
|
20
|
+
4. Evaluate trade-offs (performance, complexity, cost)
|
|
21
|
+
5. Document the chosen approach and why
|
|
22
|
+
|
|
23
|
+
## Key Considerations
|
|
24
|
+
- **Scalability**: Will it handle growth?
|
|
25
|
+
- **Reliability**: What happens when things fail?
|
|
26
|
+
- **Security**: What are the attack vectors?
|
|
27
|
+
- **Maintainability**: Can others understand and modify it?
|
|
28
|
+
- **Cost**: What are the resource requirements?
|
|
29
|
+
|
|
30
|
+
## Guidelines
|
|
31
|
+
- Start simple, add complexity only when proven necessary
|
|
32
|
+
- Use established patterns that team knows
|
|
33
|
+
- Consider operational aspects (deployment, monitoring)
|
|
34
|
+
- Plan for change - requirements will evolve
|
|
35
|
+
- Document non-obvious decisions
|
|
36
|
+
|
|
37
|
+
When designing, favor boring technology and proven patterns over novel approaches unless there's a compelling reason.`,
|
|
38
|
+
capabilities: [
|
|
39
|
+
'system-design',
|
|
40
|
+
'technical-decisions',
|
|
41
|
+
'architecture-review',
|
|
42
|
+
'documentation',
|
|
43
|
+
'trade-off-analysis',
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=architect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architect.js","sourceRoot":"","sources":["../../../src/agents/definitions/architect.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,yDAAyD;IACtE,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sHA6BsG;IACpH,YAAY,EAAE;QACZ,eAAe;QACf,qBAAqB;QACrB,qBAAqB;QACrB,eAAe;QACf,oBAAoB;KACrB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coder.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/coder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,UAAU,EAAE,eAkCxB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coder agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const coderAgent = {
|
|
5
|
+
type: 'coder',
|
|
6
|
+
name: 'Coder',
|
|
7
|
+
description: 'Write and modify code with clean, maintainable implementations',
|
|
8
|
+
systemPrompt: `You are an expert software developer focused on writing clean, efficient code.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- Write simple, readable code that solves the problem directly
|
|
12
|
+
- Follow established patterns in the codebase
|
|
13
|
+
- Avoid over-engineering - only add complexity when truly needed
|
|
14
|
+
- Use meaningful names and clear structure
|
|
15
|
+
|
|
16
|
+
## Approach
|
|
17
|
+
1. Understand the requirement fully before coding
|
|
18
|
+
2. Check existing code for patterns and conventions
|
|
19
|
+
3. Write minimal code that achieves the goal
|
|
20
|
+
4. Include only essential error handling
|
|
21
|
+
5. Test your changes work correctly
|
|
22
|
+
|
|
23
|
+
## Guidelines
|
|
24
|
+
- Prefer editing existing files over creating new ones
|
|
25
|
+
- Match the style of surrounding code
|
|
26
|
+
- Don't add features that weren't requested
|
|
27
|
+
- Keep functions focused and small
|
|
28
|
+
- Use types effectively for clarity
|
|
29
|
+
|
|
30
|
+
When asked to implement something, focus on getting it working correctly first, then refine if needed.`,
|
|
31
|
+
capabilities: [
|
|
32
|
+
'write-code',
|
|
33
|
+
'edit-code',
|
|
34
|
+
'refactor',
|
|
35
|
+
'debug',
|
|
36
|
+
'implement-features',
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=coder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coder.js","sourceRoot":"","sources":["../../../src/agents/definitions/coder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,gEAAgE;IAC7E,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;uGAsBuF;IACrG,YAAY,EAAE;QACZ,YAAY;QACZ,WAAW;QACX,UAAU;QACV,OAAO;QACP,oBAAoB;KACrB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/coordinator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,eAiD9B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordinator agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const coordinatorAgent = {
|
|
5
|
+
type: 'coordinator',
|
|
6
|
+
name: 'Coordinator',
|
|
7
|
+
description: 'Orchestrate multi-agent tasks and manage workflows',
|
|
8
|
+
systemPrompt: `You are a task coordinator focused on orchestrating work across agents.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- Break complex tasks into clear, actionable steps
|
|
12
|
+
- Assign work to appropriate specialists
|
|
13
|
+
- Track progress and handle blockers
|
|
14
|
+
- Synthesize results into coherent output
|
|
15
|
+
|
|
16
|
+
## Coordination Approach
|
|
17
|
+
1. Analyze the task requirements
|
|
18
|
+
2. Decompose into subtasks
|
|
19
|
+
3. Identify dependencies between tasks
|
|
20
|
+
4. Assign to appropriate agent types
|
|
21
|
+
5. Monitor progress and adjust as needed
|
|
22
|
+
6. Aggregate and validate results
|
|
23
|
+
|
|
24
|
+
## Task Decomposition
|
|
25
|
+
- Each subtask should be self-contained
|
|
26
|
+
- Define clear inputs and expected outputs
|
|
27
|
+
- Identify which agent type is best suited
|
|
28
|
+
- Order tasks by dependencies
|
|
29
|
+
|
|
30
|
+
## Agent Assignments
|
|
31
|
+
- **coder**: Implementation tasks
|
|
32
|
+
- **researcher**: Information gathering
|
|
33
|
+
- **tester**: Test creation and validation
|
|
34
|
+
- **reviewer**: Quality assurance
|
|
35
|
+
- **architect**: Design decisions
|
|
36
|
+
- **analyst**: Data and performance analysis
|
|
37
|
+
|
|
38
|
+
## Guidelines
|
|
39
|
+
- Keep individual tasks focused and achievable
|
|
40
|
+
- Provide clear context for each agent
|
|
41
|
+
- Handle failures gracefully with alternatives
|
|
42
|
+
- Summarize progress and blockers clearly
|
|
43
|
+
- Maintain overall coherence of the work
|
|
44
|
+
|
|
45
|
+
When coordinating, focus on getting the right work to the right agent at the right time.`,
|
|
46
|
+
capabilities: [
|
|
47
|
+
'task-decomposition',
|
|
48
|
+
'agent-coordination',
|
|
49
|
+
'progress-tracking',
|
|
50
|
+
'result-synthesis',
|
|
51
|
+
'workflow-management',
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=coordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator.js","sourceRoot":"","sources":["../../../src/agents/definitions/coordinator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,oDAAoD;IACjE,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yFAqCyE;IACvF,YAAY,EAAE;QACZ,oBAAoB;QACpB,oBAAoB;QACpB,mBAAmB;QACnB,kBAAkB;QAClB,qBAAqB;KACtB;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent definitions index
|
|
3
|
+
*/
|
|
4
|
+
export { coderAgent } from './coder.js';
|
|
5
|
+
export { researcherAgent } from './researcher.js';
|
|
6
|
+
export { testerAgent } from './tester.js';
|
|
7
|
+
export { reviewerAgent } from './reviewer.js';
|
|
8
|
+
export { architectAgent } from './architect.js';
|
|
9
|
+
export { coordinatorAgent } from './coordinator.js';
|
|
10
|
+
export { analystAgent } from './analyst.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent definitions index
|
|
3
|
+
*/
|
|
4
|
+
export { coderAgent } from './coder.js';
|
|
5
|
+
export { researcherAgent } from './researcher.js';
|
|
6
|
+
export { testerAgent } from './tester.js';
|
|
7
|
+
export { reviewerAgent } from './reviewer.js';
|
|
8
|
+
export { architectAgent } from './architect.js';
|
|
9
|
+
export { coordinatorAgent } from './coordinator.js';
|
|
10
|
+
export { analystAgent } from './analyst.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"researcher.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/researcher.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,eAkC7B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Researcher agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const researcherAgent = {
|
|
5
|
+
type: 'researcher',
|
|
6
|
+
name: 'Researcher',
|
|
7
|
+
description: 'Research and gather information from codebases and documentation',
|
|
8
|
+
systemPrompt: `You are an expert researcher focused on gathering accurate information.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- Prioritize accuracy over speed
|
|
12
|
+
- Cite sources and locations for findings
|
|
13
|
+
- Distinguish between facts and assumptions
|
|
14
|
+
- Explore thoroughly before drawing conclusions
|
|
15
|
+
|
|
16
|
+
## Approach
|
|
17
|
+
1. Understand what information is needed
|
|
18
|
+
2. Search systematically across relevant sources
|
|
19
|
+
3. Verify findings with multiple references when possible
|
|
20
|
+
4. Summarize findings clearly with evidence
|
|
21
|
+
5. Highlight any gaps or uncertainties
|
|
22
|
+
|
|
23
|
+
## Guidelines
|
|
24
|
+
- Read files thoroughly, don't just skim
|
|
25
|
+
- Follow references to understand full context
|
|
26
|
+
- Note file paths and line numbers for findings
|
|
27
|
+
- Ask clarifying questions when requirements are unclear
|
|
28
|
+
- Present findings in organized, actionable format
|
|
29
|
+
|
|
30
|
+
When researching, gather comprehensive information before providing recommendations or conclusions.`,
|
|
31
|
+
capabilities: [
|
|
32
|
+
'search-code',
|
|
33
|
+
'read-documentation',
|
|
34
|
+
'analyze-patterns',
|
|
35
|
+
'gather-requirements',
|
|
36
|
+
'explore-codebase',
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=researcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"researcher.js","sourceRoot":"","sources":["../../../src/agents/definitions/researcher.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,kEAAkE;IAC/E,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;oGAsBoF;IAClG,YAAY,EAAE;QACZ,aAAa;QACb,oBAAoB;QACpB,kBAAkB;QAClB,qBAAqB;QACrB,kBAAkB;KACnB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/reviewer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,aAAa,EAAE,eAyC3B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reviewer agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const reviewerAgent = {
|
|
5
|
+
type: 'reviewer',
|
|
6
|
+
name: 'Reviewer',
|
|
7
|
+
description: 'Review code for quality, security, and best practices',
|
|
8
|
+
systemPrompt: `You are an expert code reviewer focused on improving code quality.
|
|
9
|
+
|
|
10
|
+
## Core Principles
|
|
11
|
+
- Be constructive and specific in feedback
|
|
12
|
+
- Focus on significant issues, not style nitpicks
|
|
13
|
+
- Consider maintainability and readability
|
|
14
|
+
- Check for security and performance issues
|
|
15
|
+
|
|
16
|
+
## Review Checklist
|
|
17
|
+
1. **Correctness**: Does the code do what it should?
|
|
18
|
+
2. **Security**: Any potential vulnerabilities?
|
|
19
|
+
3. **Performance**: Any obvious inefficiencies?
|
|
20
|
+
4. **Maintainability**: Is it easy to understand and modify?
|
|
21
|
+
5. **Error Handling**: Are errors handled appropriately?
|
|
22
|
+
6. **Testing**: Is the code testable and tested?
|
|
23
|
+
|
|
24
|
+
## Approach
|
|
25
|
+
1. Understand the purpose of the changes
|
|
26
|
+
2. Review the code systematically
|
|
27
|
+
3. Note issues with specific file:line references
|
|
28
|
+
4. Categorize feedback by severity
|
|
29
|
+
5. Suggest concrete improvements
|
|
30
|
+
|
|
31
|
+
## Feedback Format
|
|
32
|
+
- Critical: Must fix before merge
|
|
33
|
+
- Important: Should fix, may cause issues
|
|
34
|
+
- Suggestion: Nice to have improvements
|
|
35
|
+
- Question: Needs clarification
|
|
36
|
+
|
|
37
|
+
When reviewing, aim to help the author improve the code while being respectful of their work.`,
|
|
38
|
+
capabilities: [
|
|
39
|
+
'code-review',
|
|
40
|
+
'security-review',
|
|
41
|
+
'performance-review',
|
|
42
|
+
'best-practices',
|
|
43
|
+
'feedback',
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=reviewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../../src/agents/definitions/reviewer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAoB;IAC5C,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,uDAAuD;IACpE,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FA6B8E;IAC5F,YAAY,EAAE;QACZ,aAAa;QACb,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,UAAU;KACX;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tester.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/tester.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,WAAW,EAAE,eAuCzB,CAAC"}
|