@blackms/aistack 1.2.0 → 1.3.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.
Files changed (161) hide show
  1. package/README.md +152 -11
  2. package/dist/agents/definitions/adversarial.d.ts +6 -0
  3. package/dist/agents/definitions/adversarial.d.ts.map +1 -0
  4. package/dist/agents/definitions/adversarial.js +34 -0
  5. package/dist/agents/definitions/adversarial.js.map +1 -0
  6. package/dist/agents/definitions/devops.d.ts +6 -0
  7. package/dist/agents/definitions/devops.d.ts.map +1 -0
  8. package/dist/agents/definitions/devops.js +65 -0
  9. package/dist/agents/definitions/devops.js.map +1 -0
  10. package/dist/agents/definitions/documentation.d.ts +6 -0
  11. package/dist/agents/definitions/documentation.d.ts.map +1 -0
  12. package/dist/agents/definitions/documentation.js +72 -0
  13. package/dist/agents/definitions/documentation.js.map +1 -0
  14. package/dist/agents/definitions/index.d.ts +4 -0
  15. package/dist/agents/definitions/index.d.ts.map +1 -1
  16. package/dist/agents/definitions/index.js +4 -0
  17. package/dist/agents/definitions/index.js.map +1 -1
  18. package/dist/agents/definitions/security-auditor.d.ts +6 -0
  19. package/dist/agents/definitions/security-auditor.d.ts.map +1 -0
  20. package/dist/agents/definitions/security-auditor.js +100 -0
  21. package/dist/agents/definitions/security-auditor.js.map +1 -0
  22. package/dist/agents/registry.d.ts.map +1 -1
  23. package/dist/agents/registry.js +5 -1
  24. package/dist/agents/registry.js.map +1 -1
  25. package/dist/agents/spawner.d.ts +26 -1
  26. package/dist/agents/spawner.d.ts.map +1 -1
  27. package/dist/agents/spawner.js +94 -1
  28. package/dist/agents/spawner.js.map +1 -1
  29. package/dist/auth/index.d.ts +6 -0
  30. package/dist/auth/index.d.ts.map +1 -0
  31. package/dist/auth/index.js +6 -0
  32. package/dist/auth/index.js.map +1 -0
  33. package/dist/auth/service.d.ts +79 -0
  34. package/dist/auth/service.d.ts.map +1 -0
  35. package/dist/auth/service.js +383 -0
  36. package/dist/auth/service.js.map +1 -0
  37. package/dist/auth/types.d.ts +48 -0
  38. package/dist/auth/types.d.ts.map +1 -0
  39. package/dist/auth/types.js +10 -0
  40. package/dist/auth/types.js.map +1 -0
  41. package/dist/coordination/index.d.ts +1 -0
  42. package/dist/coordination/index.d.ts.map +1 -1
  43. package/dist/coordination/index.js +1 -0
  44. package/dist/coordination/index.js.map +1 -1
  45. package/dist/coordination/review-loop.d.ts +89 -0
  46. package/dist/coordination/review-loop.d.ts.map +1 -0
  47. package/dist/coordination/review-loop.js +341 -0
  48. package/dist/coordination/review-loop.js.map +1 -0
  49. package/dist/integrations/slack-notifier.d.ts +63 -0
  50. package/dist/integrations/slack-notifier.d.ts.map +1 -0
  51. package/dist/integrations/slack-notifier.js +224 -0
  52. package/dist/integrations/slack-notifier.js.map +1 -0
  53. package/dist/integrations/slack.d.ts +50 -0
  54. package/dist/integrations/slack.d.ts.map +1 -0
  55. package/dist/integrations/slack.js +225 -0
  56. package/dist/integrations/slack.js.map +1 -0
  57. package/dist/mcp/tools/index.d.ts +1 -0
  58. package/dist/mcp/tools/index.d.ts.map +1 -1
  59. package/dist/mcp/tools/index.js +1 -0
  60. package/dist/mcp/tools/index.js.map +1 -1
  61. package/dist/mcp/tools/review-loop-tools.d.ts +210 -0
  62. package/dist/mcp/tools/review-loop-tools.d.ts.map +1 -0
  63. package/dist/mcp/tools/review-loop-tools.js +213 -0
  64. package/dist/mcp/tools/review-loop-tools.js.map +1 -0
  65. package/dist/memory/index.d.ts +75 -0
  66. package/dist/memory/index.d.ts.map +1 -1
  67. package/dist/memory/index.js +101 -0
  68. package/dist/memory/index.js.map +1 -1
  69. package/dist/memory/sqlite-store.d.ts +85 -1
  70. package/dist/memory/sqlite-store.d.ts.map +1 -1
  71. package/dist/memory/sqlite-store.js +647 -15
  72. package/dist/memory/sqlite-store.js.map +1 -1
  73. package/dist/monitoring/health.d.ts +68 -0
  74. package/dist/monitoring/health.d.ts.map +1 -0
  75. package/dist/monitoring/health.js +220 -0
  76. package/dist/monitoring/health.js.map +1 -0
  77. package/dist/monitoring/metrics.d.ts +31 -0
  78. package/dist/monitoring/metrics.d.ts.map +1 -0
  79. package/dist/monitoring/metrics.js +230 -0
  80. package/dist/monitoring/metrics.js.map +1 -0
  81. package/dist/providers/index.d.ts.map +1 -1
  82. package/dist/providers/index.js +132 -94
  83. package/dist/providers/index.js.map +1 -1
  84. package/dist/types.d.ts +69 -1
  85. package/dist/types.d.ts.map +1 -1
  86. package/dist/types.js.map +1 -1
  87. package/dist/utils/config.d.ts.map +1 -1
  88. package/dist/utils/config.js +12 -0
  89. package/dist/utils/config.js.map +1 -1
  90. package/dist/utils/index.d.ts +1 -1
  91. package/dist/utils/index.d.ts.map +1 -1
  92. package/dist/utils/index.js +1 -1
  93. package/dist/utils/index.js.map +1 -1
  94. package/dist/utils/logger.d.ts +24 -7
  95. package/dist/utils/logger.d.ts.map +1 -1
  96. package/dist/utils/logger.js +128 -20
  97. package/dist/utils/logger.js.map +1 -1
  98. package/dist/utils/retry.d.ts +49 -0
  99. package/dist/utils/retry.d.ts.map +1 -0
  100. package/dist/utils/retry.js +160 -0
  101. package/dist/utils/retry.js.map +1 -0
  102. package/dist/utils/semaphore.d.ts +75 -0
  103. package/dist/utils/semaphore.d.ts.map +1 -0
  104. package/dist/utils/semaphore.js +185 -0
  105. package/dist/utils/semaphore.js.map +1 -0
  106. package/dist/utils/validation.d.ts +2 -2
  107. package/dist/web/middleware/auth.d.ts +16 -10
  108. package/dist/web/middleware/auth.d.ts.map +1 -1
  109. package/dist/web/middleware/auth.js +152 -12
  110. package/dist/web/middleware/auth.js.map +1 -1
  111. package/dist/web/routes/auth.d.ts +50 -0
  112. package/dist/web/routes/auth.d.ts.map +1 -0
  113. package/dist/web/routes/auth.js +216 -0
  114. package/dist/web/routes/auth.js.map +1 -0
  115. package/dist/web/routes/index.d.ts +2 -0
  116. package/dist/web/routes/index.d.ts.map +1 -1
  117. package/dist/web/routes/index.js +2 -0
  118. package/dist/web/routes/index.js.map +1 -1
  119. package/dist/web/routes/memory.d.ts.map +1 -1
  120. package/dist/web/routes/memory.js +188 -0
  121. package/dist/web/routes/memory.js.map +1 -1
  122. package/dist/web/routes/review-loops.d.ts +12 -0
  123. package/dist/web/routes/review-loops.d.ts.map +1 -0
  124. package/dist/web/routes/review-loops.js +157 -0
  125. package/dist/web/routes/review-loops.js.map +1 -0
  126. package/dist/web/routes/sessions.d.ts.map +1 -1
  127. package/dist/web/routes/sessions.js +14 -0
  128. package/dist/web/routes/sessions.js.map +1 -1
  129. package/dist/web/routes/system.d.ts.map +1 -1
  130. package/dist/web/routes/system.js +34 -23
  131. package/dist/web/routes/system.js.map +1 -1
  132. package/dist/web/routes/workflows.d.ts.map +1 -1
  133. package/dist/web/routes/workflows.js +13 -1
  134. package/dist/web/routes/workflows.js.map +1 -1
  135. package/dist/web/server.d.ts +1 -0
  136. package/dist/web/server.d.ts.map +1 -1
  137. package/dist/web/server.js +30 -2
  138. package/dist/web/server.js.map +1 -1
  139. package/dist/web/utils/request.d.ts +13 -0
  140. package/dist/web/utils/request.d.ts.map +1 -0
  141. package/dist/web/utils/request.js +49 -0
  142. package/dist/web/utils/request.js.map +1 -0
  143. package/dist/web/websocket/handler.d.ts +4 -0
  144. package/dist/web/websocket/handler.d.ts.map +1 -1
  145. package/dist/web/websocket/handler.js +59 -0
  146. package/dist/web/websocket/handler.js.map +1 -1
  147. package/dist/workflows/doc-sync.d.ts.map +1 -1
  148. package/dist/workflows/doc-sync.js +4 -0
  149. package/dist/workflows/doc-sync.js.map +1 -1
  150. package/dist/workflows/full-stack-feature.d.ts +74 -0
  151. package/dist/workflows/full-stack-feature.d.ts.map +1 -0
  152. package/dist/workflows/full-stack-feature.js +273 -0
  153. package/dist/workflows/full-stack-feature.js.map +1 -0
  154. package/dist/workflows/index.d.ts +1 -0
  155. package/dist/workflows/index.d.ts.map +1 -1
  156. package/dist/workflows/index.js +2 -0
  157. package/dist/workflows/index.js.map +1 -1
  158. package/dist/workflows/runner.js.map +1 -1
  159. package/dist/workflows/types.d.ts +6 -5
  160. package/dist/workflows/types.d.ts.map +1 -1
  161. package/package.json +12 -5
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  ### Multi-Agent Orchestration for Claude Code
6
6
 
7
+ [![GitHub stars](https://img.shields.io/github/stars/blackms/aistack?style=flat-square)](https://github.com/blackms/aistack/stargazers)
7
8
  [![CI](https://github.com/blackms/aistack/actions/workflows/ci.yml/badge.svg)](https://github.com/blackms/aistack/actions/workflows/ci.yml)
8
9
  [![codecov](https://codecov.io/gh/blackms/aistack/branch/main/graph/badge.svg)](https://codecov.io/gh/blackms/aistack)
9
10
  [![npm version](https://img.shields.io/npm/v/@blackms/aistack?style=flat-square&color=CB3837&logo=npm)](https://www.npmjs.com/package/@blackms/aistack)
@@ -12,11 +13,11 @@
12
13
 
13
14
  <br/>
14
15
 
15
- **Production-ready agent orchestration with persistent memory and MCP integration.**
16
+ **Production-ready agent orchestration with persistent memory, MCP integration, and real-time web dashboard.**
16
17
 
17
18
  <br/>
18
19
 
19
- [Get Started](#-quick-start) · [Architecture](#-architecture) · [API Reference](#-mcp-tools) · [Documentation](./docs)
20
+ [Get Started](#-quick-start) · [Architecture](#-architecture) · [Web Dashboard](#-web-dashboard) · [API Reference](#-mcp-tools) · [Documentation](./docs)
20
21
 
21
22
  <br/>
22
23
 
@@ -29,7 +30,7 @@
29
30
  Coordinate specialized AI agents through Claude Code with persistent context, hierarchical task management, and seamless extensibility.
30
31
 
31
32
  ```
32
- 7 agents · 30 MCP tools · 3 LLM providers · SQLite + FTS5 · Plugin system
33
+ 7 agents · 30 MCP tools · 6 LLM providers · SQLite + FTS5 · Web dashboard · Plugin system
33
34
  ```
34
35
 
35
36
  ---
@@ -48,9 +49,15 @@ Coordinate specialized AI agents through Claude Code with persistent context, hi
48
49
  </td>
49
50
  <td align="center" width="96">
50
51
  <img src="https://cdn.simpleicons.org/sqlite/003B57" width="48" height="48" alt="SQLite" />
51
- <br/>SQLite
52
+ <br/>SQLite + FTS5
52
53
  </td>
53
54
  <td align="center" width="96">
55
+ <img src="https://cdn.simpleicons.org/react/61DAFB" width="48" height="48" alt="React" />
56
+ <br/>React 18
57
+ </td>
58
+ </tr>
59
+ <tr>
60
+ <td align="center" width="96">
54
61
  <img src="https://cdn.simpleicons.org/anthropic/191919" width="48" height="48" alt="Anthropic" />
55
62
  <br/>Anthropic
56
63
  </td>
@@ -62,6 +69,10 @@ Coordinate specialized AI agents through Claude Code with persistent context, hi
62
69
  <img src="https://cdn.simpleicons.org/ollama/000000" width="48" height="48" alt="Ollama" />
63
70
  <br/>Ollama
64
71
  </td>
72
+ <td align="center" width="96">
73
+ <img src="https://cdn.simpleicons.org/vite/646CFF" width="48" height="48" alt="Vite" />
74
+ <br/>Vite
75
+ </td>
65
76
  </tr>
66
77
  </table>
67
78
 
@@ -74,8 +85,10 @@ Coordinate specialized AI agents through Claude Code with persistent context, hi
74
85
  | **Specialized Agents** | 7 built-in agent types: coder, researcher, tester, reviewer, architect, coordinator, analyst |
75
86
  | **Persistent Memory** | SQLite with FTS5 full-text search and optional vector embeddings |
76
87
  | **MCP Integration** | 30 tools exposed via Model Context Protocol for Claude Code |
88
+ | **Web Dashboard** | Real-time dashboard with 9 pages for visual management and monitoring |
89
+ | **REST API + WebSocket** | 50+ HTTP endpoints with live WebSocket event streaming |
77
90
  | **Hierarchical Coordination** | Task queue, message bus, and coordinator pattern |
78
- | **Multi-Provider Support** | Anthropic, OpenAI, and Ollama with unified interface |
91
+ | **Multi-Provider Support** | 3 API providers (Anthropic, OpenAI, Ollama) + 3 CLI providers (Claude, Gemini, Codex) |
79
92
  | **Plugin System** | Runtime extensibility for agents, tools, hooks, and providers |
80
93
  | **Workflow Engine** | Multi-phase workflows with adversarial validation |
81
94
 
@@ -102,6 +115,15 @@ claude mcp add aistack -- npx @blackms/aistack mcp start
102
115
  npx @blackms/aistack status
103
116
  ```
104
117
 
118
+ ### Start Web Dashboard
119
+
120
+ ```bash
121
+ # Start backend + web dashboard
122
+ npx @blackms/aistack web start
123
+
124
+ # Open http://localhost:3001
125
+ ```
126
+
105
127
  ### Configuration
106
128
 
107
129
  Create `aistack.config.json`:
@@ -126,12 +148,16 @@ Create `aistack.config.json`:
126
148
 
127
149
  ```mermaid
128
150
  graph TB
129
- subgraph "Claude Code"
151
+ subgraph Clients["Client Layer"]
130
152
  CC[Claude Code IDE]
153
+ CLI[CLI]
154
+ WEB[Web Dashboard]
131
155
  end
132
156
 
133
157
  subgraph "aistack"
134
158
  MCP["MCP Server<br/><small>stdio transport</small>"]
159
+ HTTP["HTTP Server<br/><small>REST API</small>"]
160
+ WS["WebSocket<br/><small>Real-time events</small>"]
135
161
 
136
162
  subgraph Core["Core Services"]
137
163
  AM[Agent Manager]
@@ -164,14 +190,51 @@ graph TB
164
190
  end
165
191
  end
166
192
 
167
- CC <-->|"MCP Protocol"| MCP
168
- MCP --> AM & MM
193
+ CC <-->|"MCP/stdio"| MCP
194
+ CLI <-->|"HTTP"| HTTP
195
+ WEB <-->|"HTTP + WS"| HTTP & WS
196
+
197
+ MCP & HTTP --> AM & MM
198
+ WS --> MB
169
199
  AM --> TQ --> MB
170
200
  MB --> A1 & A2 & A3 & A4 & A5 & A6 & A7
171
201
  MM --> SQL --> FTS & VEC
172
202
  AM -.-> ANT & OAI & OLL
173
203
  ```
174
204
 
205
+ ### Deployment Overview
206
+
207
+ ```mermaid
208
+ C4Deployment
209
+ title Deployment Diagram - Local Machine
210
+
211
+ Deployment_Node(local, "Local Machine", "Developer Workstation") {
212
+ Deployment_Node(npm, "npm", "Node.js 20+") {
213
+ Container(aistack, "aistack", "TypeScript", "MCP Server + HTTP Server + WebSocket")
214
+ ContainerDb(sqlite, "SQLite", "better-sqlite3", "Memory + FTS5 + Vector")
215
+ }
216
+ Deployment_Node(browser, "Browser", "Chrome/Firefox/Safari") {
217
+ Container(dashboard, "Web Dashboard", "React 18 + Vite", "Management UI")
218
+ }
219
+ Deployment_Node(ide, "IDE", "VS Code") {
220
+ Container(claude, "Claude Code", "Extension", "AI Assistant")
221
+ }
222
+ }
223
+
224
+ Deployment_Node(cloud, "Cloud Services", "External") {
225
+ Container(anthropic, "Anthropic API", "HTTPS", "Claude models")
226
+ Container(openai, "OpenAI API", "HTTPS", "GPT models")
227
+ Container(ollama_remote, "Ollama", "Local/Remote", "Local LLMs")
228
+ }
229
+
230
+ Rel(claude, aistack, "MCP/stdio")
231
+ Rel(dashboard, aistack, "HTTP + WebSocket")
232
+ Rel(aistack, sqlite, "SQL")
233
+ Rel(aistack, anthropic, "HTTPS")
234
+ Rel(aistack, openai, "HTTPS")
235
+ Rel(aistack, ollama_remote, "HTTP")
236
+ ```
237
+
175
238
  ### Request Flow
176
239
 
177
240
  ```mermaid
@@ -204,6 +267,66 @@ sequenceDiagram
204
267
 
205
268
  ---
206
269
 
270
+ ## Web Dashboard
271
+
272
+ The built-in web dashboard provides visual management and real-time monitoring of your agent orchestration.
273
+
274
+ ### Starting the Dashboard
275
+
276
+ ```bash
277
+ # Start the web server (includes dashboard)
278
+ npx @blackms/aistack web start
279
+
280
+ # Open in browser
281
+ open http://localhost:3001
282
+ ```
283
+
284
+ ### Dashboard Pages
285
+
286
+ | Page | Description |
287
+ |------|-------------|
288
+ | **Dashboard** | System overview with agent status, memory stats, and recent activity |
289
+ | **Agents** | Spawn, monitor, and manage agents in real-time |
290
+ | **Memory** | Browse, search, and manage memory entries with FTS5 |
291
+ | **Tasks** | View task queue, status, and completion history |
292
+ | **Projects** | Project management with task workflows |
293
+ | **Project Detail** | Deep dive into project tasks and specifications |
294
+ | **Task Detail** | Task lifecycle with phase transitions |
295
+ | **Workflows** | Define and run multi-phase workflows |
296
+ | **Chat** | Interactive agent chat interface |
297
+
298
+ ### Web Dashboard Flow
299
+
300
+ ```mermaid
301
+ sequenceDiagram
302
+ participant User as Browser
303
+ participant WS as WebSocket
304
+ participant HTTP as HTTP Server
305
+ participant Core as Core Services
306
+ participant DB as SQLite
307
+
308
+ User->>HTTP: GET /api/system/status
309
+ HTTP->>Core: getSystemStatus()
310
+ Core-->>HTTP: SystemStatus
311
+ HTTP-->>User: { agents, memory, tasks }
312
+
313
+ User->>WS: Connect ws://localhost:3001
314
+ WS-->>User: Connected
315
+
316
+ User->>HTTP: POST /api/agents
317
+ HTTP->>Core: spawnAgent("coder")
318
+ Core->>WS: emit("agent:spawned")
319
+ WS-->>User: { event: "agent:spawned", data }
320
+ HTTP-->>User: { agent }
321
+
322
+ Note over User,WS: Real-time updates via WebSocket
323
+
324
+ Core->>WS: emit("task:completed")
325
+ WS-->>User: { event: "task:completed", data }
326
+ ```
327
+
328
+ ---
329
+
207
330
  ## Agents
208
331
 
209
332
  <table>
@@ -376,6 +499,7 @@ export default {
376
499
  | `memory delete -k <key>` | Delete entry |
377
500
  | `mcp start` | Start MCP server |
378
501
  | `mcp tools` | List MCP tools |
502
+ | `web start` | Start web dashboard server |
379
503
  | `workflow run <name>` | Run workflow |
380
504
  | `workflow list` | List workflows |
381
505
  | `status` | System status |
@@ -406,7 +530,7 @@ CLI providers enable agent execution through external CLI tools, useful for inte
406
530
 
407
531
  ```
408
532
  src/
409
- ├── agents/ # Agent registry, spawner, definitions
533
+ ├── agents/ # Agent registry, spawner, definitions (7 types)
410
534
  ├── cli/ # CLI commands
411
535
  ├── coordination/ # Task queue, message bus, topology
412
536
  ├── github/ # GitHub integration
@@ -414,9 +538,18 @@ src/
414
538
  ├── mcp/ # MCP server and 30 tools
415
539
  ├── memory/ # SQLite, FTS5, vector search
416
540
  ├── plugins/ # Plugin loader and registry
417
- ├── providers/ # LLM provider implementations
541
+ ├── providers/ # LLM provider implementations (6 providers)
542
+ ├── web/ # REST API routes + WebSocket
418
543
  ├── workflows/ # Workflow engine
419
544
  └── utils/ # Config, logger, validation
545
+
546
+ web/
547
+ ├── src/
548
+ │ ├── pages/ # 9 dashboard pages
549
+ │ ├── components/ # React components
550
+ │ ├── hooks/ # Custom React hooks
551
+ │ └── stores/ # Zustand state management
552
+ └── public/ # Static assets
420
553
  ```
421
554
 
422
555
  ---
@@ -430,6 +563,10 @@ npm test # Run tests
430
563
  npm run test:coverage # With coverage
431
564
  npm run typecheck # Type check
432
565
  npm run lint # Lint
566
+
567
+ # Web dashboard development
568
+ npm run dev:web # Start Vite dev server for web UI
569
+ npm run build:web # Build web UI for production
433
570
  ```
434
571
 
435
572
  ---
@@ -442,7 +579,7 @@ npm run lint # Lint
442
579
  | **P1** | Streaming responses |
443
580
  | **P2** | Agent state persistence |
444
581
  | **P2** | Built-in workflow templates |
445
- | **P3** | Web dashboard |
582
+ | **P3** | Enhanced dashboard analytics |
446
583
  | **P3** | Metrics and observability |
447
584
 
448
585
  <sub>Roadmap items are planned features, not current capabilities.</sub>
@@ -473,4 +610,8 @@ All PRs must pass CI (tests, lint, typecheck, build).
473
610
 
474
611
  <sub>Built with TypeScript · Made for Claude Code</sub>
475
612
 
613
+ ---
614
+
615
+ <sub>README verified against codebase v1.2.0. All features documented are backed by implemented code.</sub>
616
+
476
617
  </div>
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adversarial agent definition - aggressive critical code reviewer
3
+ */
4
+ import type { AgentDefinition } from '../../types.js';
5
+ export declare const adversarialAgent: AgentDefinition;
6
+ //# sourceMappingURL=adversarial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adversarial.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/adversarial.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,eA6B9B,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Adversarial agent definition - aggressive critical code reviewer
3
+ */
4
+ export const adversarialAgent = {
5
+ type: 'adversarial',
6
+ name: 'Adversarial Reviewer',
7
+ description: 'Aggressive critical code reviewer that actively tries to break code',
8
+ systemPrompt: `You are an ADVERSARIAL code reviewer. Your mission is to BREAK the code.
9
+
10
+ ## Core Mindset
11
+ - ASSUME the code has bugs until proven otherwise
12
+ - ACTIVELY try to break the code with edge cases
13
+ - BE SKEPTICAL of all claims and assumptions
14
+ - NEVER accept "it probably works" - demand proof
15
+
16
+ ## Attack Vectors (Check ALL)
17
+ 1. Input Validation: NULL, empty, negative, overflow, injection
18
+ 2. State & Race Conditions: concurrent access, async timing, memory leaks
19
+ 3. Error Handling: missing try/catch, silent failures, resource leaks
20
+ 4. Security: auth bypass, IDOR, secrets exposure, insecure defaults
21
+ 5. Logic Errors: off-by-one, boundaries, floating point, division by zero
22
+ 6. Performance: O(n^2), unbounded recursion, N+1 queries
23
+
24
+ ## Output Format
25
+ **[SEVERITY: CRITICAL/HIGH/MEDIUM/LOW]** - Issue Title
26
+ - **Location**: file:line
27
+ - **Attack Vector**: How to exploit
28
+ - **Impact**: What happens when exploited
29
+ - **Required Fix**: Specific remediation
30
+
31
+ **VERDICT: APPROVE** or **VERDICT: REJECT**`,
32
+ capabilities: ['adversarial-review', 'security-audit', 'edge-case-analysis', 'break-code'],
33
+ };
34
+ //# sourceMappingURL=adversarial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adversarial.js","sourceRoot":"","sources":["../../../src/agents/definitions/adversarial.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;4CAuB4B;IAC1C,YAAY,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,YAAY,CAAC;CAC3F,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * DevOps agent definition
3
+ */
4
+ import type { AgentDefinition } from '../../types.js';
5
+ export declare const devopsAgent: AgentDefinition;
6
+ //# sourceMappingURL=devops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devops.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/devops.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,WAAW,EAAE,eA4DzB,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * DevOps agent definition
3
+ */
4
+ export const devopsAgent = {
5
+ type: 'devops',
6
+ name: 'DevOps Engineer',
7
+ description: 'Manage deployment, CI/CD, containers, and infrastructure automation',
8
+ systemPrompt: `You are an expert DevOps engineer focused on automation, deployment, and infrastructure.
9
+
10
+ ## Core Responsibilities
11
+ - Design and implement CI/CD pipelines
12
+ - Containerize applications with Docker
13
+ - Manage Kubernetes deployments and configurations
14
+ - Automate infrastructure provisioning
15
+ - Monitor system health and performance
16
+ - Implement security best practices
17
+
18
+ ## Expertise Areas
19
+ - **CI/CD**: GitHub Actions, GitLab CI, Jenkins, CircleCI
20
+ - **Containers**: Docker, Docker Compose, container optimization
21
+ - **Orchestration**: Kubernetes, Helm charts, service meshes
22
+ - **Cloud Platforms**: AWS, GCP, Azure services and tools
23
+ - **Infrastructure as Code**: Terraform, Ansible, CloudFormation
24
+ - **Monitoring**: Prometheus, Grafana, CloudWatch, logging stacks
25
+
26
+ ## Approach
27
+ 1. Understand the deployment requirements and constraints
28
+ 2. Choose appropriate tools for the specific use case
29
+ 3. Implement automation over manual processes
30
+ 4. Prioritize security, reliability, and observability
31
+ 5. Document deployment procedures and runbooks
32
+ 6. Design for scalability and fault tolerance
33
+
34
+ ## Best Practices
35
+ - Use infrastructure as code for reproducibility
36
+ - Implement proper secrets management (never hardcode)
37
+ - Set up comprehensive monitoring and alerting
38
+ - Use multi-stage builds for smaller container images
39
+ - Implement health checks and graceful shutdowns
40
+ - Follow the principle of least privilege
41
+ - Use semantic versioning for releases
42
+ - Implement rollback strategies
43
+
44
+ ## Security Focus
45
+ - Scan container images for vulnerabilities
46
+ - Use non-root users in containers
47
+ - Implement network policies and firewalls
48
+ - Encrypt data in transit and at rest
49
+ - Regularly update dependencies and base images
50
+ - Use signed container images
51
+ - Implement audit logging
52
+
53
+ When implementing DevOps solutions, prioritize automation, security, and operational excellence.`,
54
+ capabilities: [
55
+ 'ci-cd-setup',
56
+ 'containerization',
57
+ 'kubernetes-deployment',
58
+ 'infrastructure-automation',
59
+ 'monitoring-setup',
60
+ 'security-hardening',
61
+ 'cloud-deployment',
62
+ 'performance-optimization',
63
+ ],
64
+ };
65
+ //# sourceMappingURL=devops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devops.js","sourceRoot":"","sources":["../../../src/agents/definitions/devops.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAoB;IAC1C,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iGA6CiF;IAC/F,YAAY,EAAE;QACZ,aAAa;QACb,kBAAkB;QAClB,uBAAuB;QACvB,2BAA2B;QAC3B,kBAAkB;QAClB,oBAAoB;QACpB,kBAAkB;QAClB,0BAA0B;KAC3B;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Documentation agent definition
3
+ */
4
+ import type { AgentDefinition } from '../../types.js';
5
+ export declare const documentationAgent: AgentDefinition;
6
+ //# sourceMappingURL=documentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/documentation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,EAAE,eAmEhC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Documentation agent definition
3
+ */
4
+ export const documentationAgent = {
5
+ type: 'documentation',
6
+ name: 'Documentation Specialist',
7
+ description: 'Create comprehensive documentation, API docs, guides, and tutorials',
8
+ systemPrompt: `You are an expert technical writer focused on creating clear, comprehensive documentation.
9
+
10
+ ## Core Responsibilities
11
+ - Write API documentation with examples
12
+ - Create user guides and tutorials
13
+ - Document architecture and design decisions
14
+ - Maintain README files and project documentation
15
+ - Generate inline code documentation
16
+ - Create runbooks and operational guides
17
+
18
+ ## Documentation Types
19
+ - **API Documentation**: OpenAPI/Swagger specs, endpoint descriptions, request/response examples
20
+ - **User Guides**: Getting started, feature guides, best practices
21
+ - **Developer Documentation**: Architecture docs, contributing guides, development setup
22
+ - **Code Documentation**: JSDoc/TSDoc comments, docstrings, inline explanations
23
+ - **Runbooks**: Deployment procedures, troubleshooting guides, incident response
24
+ - **Tutorials**: Step-by-step walkthroughs with working examples
25
+
26
+ ## Writing Principles
27
+ 1. **Clarity**: Use simple language, avoid jargon when possible
28
+ 2. **Completeness**: Cover all necessary information without overwhelming
29
+ 3. **Consistency**: Use consistent terminology and formatting
30
+ 4. **Currency**: Keep documentation synchronized with code
31
+ 5. **Examples**: Include working code examples and use cases
32
+ 6. **Structure**: Organize logically with clear headings and navigation
33
+
34
+ ## Best Practices
35
+ - Start with a clear overview and table of contents
36
+ - Use code blocks with syntax highlighting
37
+ - Include diagrams for complex concepts (Mermaid, ASCII art)
38
+ - Provide both reference and narrative documentation
39
+ - Add troubleshooting sections for common issues
40
+ - Link related documentation sections
41
+ - Use consistent formatting (Markdown, reStructuredText, etc.)
42
+ - Include version/date information
43
+
44
+ ## Code Documentation
45
+ - Document public APIs and exported functions
46
+ - Explain the "why" not just the "what"
47
+ - Include parameter descriptions and return types
48
+ - Provide usage examples in doc comments
49
+ - Document edge cases and error conditions
50
+ - Keep comments up-to-date with code changes
51
+
52
+ ## Quality Standards
53
+ - Accurate and technically correct
54
+ - Accessible to the target audience (beginner, intermediate, expert)
55
+ - Well-organized with logical flow
56
+ - Searchable and easy to navigate
57
+ - Includes practical examples
58
+ - Regularly updated and maintained
59
+
60
+ When creating documentation, focus on helping users understand and effectively use the software.`,
61
+ capabilities: [
62
+ 'api-documentation',
63
+ 'user-guides',
64
+ 'tutorials',
65
+ 'code-documentation',
66
+ 'architecture-docs',
67
+ 'runbooks',
68
+ 'readme-creation',
69
+ 'documentation-review',
70
+ ],
71
+ };
72
+ //# sourceMappingURL=documentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentation.js","sourceRoot":"","sources":["../../../src/agents/definitions/documentation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iGAoDiF;IAC/F,YAAY,EAAE;QACZ,mBAAmB;QACnB,aAAa;QACb,WAAW;QACX,oBAAoB;QACpB,mBAAmB;QACnB,UAAU;QACV,iBAAiB;QACjB,sBAAsB;KACvB;CACF,CAAC"}
@@ -5,7 +5,11 @@ export { coderAgent } from './coder.js';
5
5
  export { researcherAgent } from './researcher.js';
6
6
  export { testerAgent } from './tester.js';
7
7
  export { reviewerAgent } from './reviewer.js';
8
+ export { adversarialAgent } from './adversarial.js';
8
9
  export { architectAgent } from './architect.js';
9
10
  export { coordinatorAgent } from './coordinator.js';
10
11
  export { analystAgent } from './analyst.js';
12
+ export { devopsAgent } from './devops.js';
13
+ export { documentationAgent } from './documentation.js';
14
+ export { securityAuditorAgent } from './security-auditor.js';
11
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -5,7 +5,11 @@ export { coderAgent } from './coder.js';
5
5
  export { researcherAgent } from './researcher.js';
6
6
  export { testerAgent } from './tester.js';
7
7
  export { reviewerAgent } from './reviewer.js';
8
+ export { adversarialAgent } from './adversarial.js';
8
9
  export { architectAgent } from './architect.js';
9
10
  export { coordinatorAgent } from './coordinator.js';
10
11
  export { analystAgent } from './analyst.js';
12
+ export { devopsAgent } from './devops.js';
13
+ export { documentationAgent } from './documentation.js';
14
+ export { securityAuditorAgent } from './security-auditor.js';
11
15
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
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,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Security Auditor agent definition
3
+ */
4
+ import type { AgentDefinition } from '../../types.js';
5
+ export declare const securityAuditorAgent: AgentDefinition;
6
+ //# sourceMappingURL=security-auditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-auditor.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/security-auditor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,EAAE,eA+FlC,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Security Auditor agent definition
3
+ */
4
+ export const securityAuditorAgent = {
5
+ type: 'security-auditor',
6
+ name: 'Security Auditor',
7
+ description: 'Comprehensive security analysis, vulnerability scanning, and compliance checking',
8
+ systemPrompt: `You are an expert security auditor specializing in application and infrastructure security.
9
+
10
+ ## Core Responsibilities
11
+ - Perform comprehensive security audits
12
+ - Identify vulnerabilities in code and infrastructure
13
+ - Check for OWASP Top 10 vulnerabilities
14
+ - Review authentication and authorization mechanisms
15
+ - Assess data protection and encryption practices
16
+ - Verify secure coding practices
17
+ - Audit third-party dependencies
18
+ - Check compliance with security standards
19
+
20
+ ## Security Domains
21
+
22
+ ### Application Security
23
+ - **Injection Flaws**: SQL injection, command injection, XSS, LDAP injection
24
+ - **Broken Authentication**: Weak passwords, session management, credential storage
25
+ - **Sensitive Data Exposure**: Encryption at rest/transit, PII handling, logging sensitive data
26
+ - **XML External Entities (XXE)**: XML parser configurations, entity expansion
27
+ - **Broken Access Control**: IDOR, privilege escalation, missing authorization
28
+ - **Security Misconfiguration**: Default credentials, unnecessary features, error messages
29
+ - **Cross-Site Scripting (XSS)**: Reflected, stored, DOM-based XSS
30
+ - **Insecure Deserialization**: Object injection, remote code execution
31
+ - **Using Components with Known Vulnerabilities**: Outdated dependencies
32
+ - **Insufficient Logging & Monitoring**: Audit trails, intrusion detection
33
+
34
+ ### Infrastructure Security
35
+ - Container security (image vulnerabilities, runtime security)
36
+ - Network security (firewall rules, network segmentation)
37
+ - Secrets management (hardcoded credentials, key rotation)
38
+ - Cloud security (IAM policies, bucket permissions, network exposure)
39
+ - TLS/SSL configuration and certificate management
40
+ - API security (rate limiting, authentication, input validation)
41
+
42
+ ### Secure Coding Practices
43
+ - Input validation and sanitization
44
+ - Output encoding
45
+ - Parameterized queries
46
+ - Secure session management
47
+ - Proper error handling (no stack traces to users)
48
+ - CSRF protection
49
+ - Content Security Policy
50
+ - Secure headers (HSTS, X-Frame-Options, etc.)
51
+
52
+ ## Audit Methodology
53
+ 1. **Reconnaissance**: Understand the system architecture and data flows
54
+ 2. **Threat Modeling**: Identify potential attack vectors
55
+ 3. **Static Analysis**: Review code for security issues
56
+ 4. **Dynamic Analysis**: Test running application for vulnerabilities
57
+ 5. **Dependency Audit**: Check for known vulnerabilities in dependencies
58
+ 6. **Configuration Review**: Verify secure configurations
59
+ 7. **Documentation**: Create detailed findings with severity ratings
60
+ 8. **Remediation Guidance**: Provide specific, actionable fixes
61
+
62
+ ## Severity Ratings
63
+ - **CRITICAL**: Immediate exploitation risk, data breach potential
64
+ - **HIGH**: Significant risk, should be fixed urgently
65
+ - **MEDIUM**: Moderate risk, fix in next release
66
+ - **LOW**: Minor issue, fix when convenient
67
+ - **INFORMATIONAL**: Best practice recommendation
68
+
69
+ ## Reporting Format
70
+ For each finding:
71
+ - **Severity**: Critical/High/Medium/Low
72
+ - **Category**: OWASP category or vulnerability type
73
+ - **Location**: File, line number, or component
74
+ - **Description**: Clear explanation of the vulnerability
75
+ - **Attack Vector**: How it could be exploited
76
+ - **Impact**: Potential damage if exploited
77
+ - **Remediation**: Specific code changes or configuration fixes
78
+ - **References**: CWE, CVE, or OWASP links
79
+
80
+ ## Compliance Standards
81
+ - OWASP Top 10
82
+ - CWE/SANS Top 25
83
+ - PCI DSS (payment card data)
84
+ - HIPAA (healthcare data)
85
+ - GDPR (personal data protection)
86
+ - SOC 2 (security controls)
87
+
88
+ When performing security audits, be thorough, precise, and provide actionable remediation guidance.`,
89
+ capabilities: [
90
+ 'vulnerability-scanning',
91
+ 'code-security-review',
92
+ 'penetration-testing',
93
+ 'compliance-checking',
94
+ 'dependency-audit',
95
+ 'threat-modeling',
96
+ 'security-documentation',
97
+ 'remediation-planning',
98
+ ],
99
+ };
100
+ //# sourceMappingURL=security-auditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-auditor.js","sourceRoot":"","sources":["../../../src/agents/definitions/security-auditor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAoB;IACnD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kFAAkF;IAC/F,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oGAgFoF;IAClG,YAAY,EAAE;QACZ,wBAAwB;QACxB,sBAAsB;QACtB,qBAAqB;QACrB,qBAAqB;QACrB,kBAAkB;QAClB,iBAAiB;QACjB,wBAAwB;QACxB,sBAAsB;KACvB;CACF,CAAC"}