aiteam-x 0.9.8 → 0.11.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 (5) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +425 -0
  3. package/README.md +425 -397
  4. package/package.json +69 -55
  5. package/scripts/cli.mjs +186 -171
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 INOSX
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,425 @@
1
+ <p align="right">
2
+ <a href="README.md">Portugues</a> | <strong>English</strong>
3
+ </p>
4
+
5
+ # AITeam Team Overview
6
+
7
+ **Pixel-art visual dashboard for orchestrating and monitoring BMAD agents in real time.**
8
+
9
+ [![npm version](https://img.shields.io/npm/v/aiteam-x?color=cb3837&logo=npm)](https://www.npmjs.com/package/aiteam-x)
10
+ [![Next.js](https://img.shields.io/badge/Next.js-15-black?logo=next.js)](https://nextjs.org/)
11
+ [![React](https://img.shields.io/badge/React-19-61dafb?logo=react)](https://react.dev/)
12
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6?logo=typescript)](https://www.typescriptlang.org/)
13
+ [![BMAD Method](https://img.shields.io/badge/BMAD-Method-ff6b6b)](https://github.com/bmad-method)
14
+ [![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)
15
+
16
+ ```bash
17
+ npx aiteam-x@latest
18
+ ```
19
+
20
+ ---
21
+
22
+ ## Overview
23
+
24
+ **AITeam Team Overview** is an interactive dashboard that turns AI agent management into a visual, intuitive experience. Inspired by *sim manager*-style simulation games, the panel displays BMAD agents as pixel-art characters in a virtual office, allowing you to:
25
+
26
+ - **Visualize** each agent's status and location in real time
27
+ - **Interact** directly with agents through integrated chat windows
28
+ - **Orchestrate** workflows such as Party Mode and brainstorming sessions
29
+ - **Monitor** usage metrics (messages, tokens in/out) per agent
30
+ - **Persist** context and memories between work sessions with LLM extraction
31
+
32
+ The project uses the **BMAD Method** as the agent framework, natively integrating with the **Cursor Agent CLI** and **Cursor ACP** (Agent Client Protocol) for bidirectional LLM communication.
33
+
34
+ ---
35
+
36
+ ## Screenshots
37
+
38
+ ### Main Dashboard
39
+
40
+ ![Main Dashboard](docs/screenshots/05-dashboard-clean.png)
41
+
42
+ *Virtual office with Jarvis Office, Kitchen, and individual workspaces. Bottom bar with avatars and sprint progress (14/14 — 100%).*
43
+
44
+ ---
45
+
46
+ ### Agent Chat Window
47
+
48
+ ![Agent Chat](docs/screenshots/03-chat-window.png)
49
+
50
+ *Real-time conversation window with BMad Master. Each agent responds with text streaming and Markdown support.*
51
+
52
+ ---
53
+
54
+ ### Memory Vault
55
+
56
+ ![Memory Vault](docs/screenshots/02-memory-vault.png)
57
+
58
+ *Per-agent memory management panel. Categories: decisions, lessons, tasks, projects, handoffs. Real-time BM25 search.*
59
+
60
+ ---
61
+
62
+ ### Agent Filters
63
+
64
+ ![Filters](docs/screenshots/04-filters.png)
65
+
66
+ *Status filters (All / Working) and Module filters (BMGD / BMM / CORE) for segmented agent views.*
67
+
68
+ ---
69
+
70
+ ## Key Features
71
+
72
+ ### Pixel Art Dashboard
73
+ - Shared rooms: **Jarvis Office**, **Kitchen** — with agent activity context
74
+ - Individual workspace grid per agent with module indicators (BMGD / BMM / CORE)
75
+ - Pixel-art avatars with real-time visual status
76
+ - Bottom bar with compact avatars and sprint timeline with granular per-story progress
77
+ - Day/night cycle and ambient effects
78
+
79
+ ### Agent Interaction
80
+ - Agent selection (click) or multi-selection (Ctrl+click) for batch commands
81
+ - Resizable chat windows with real-time SSE streaming
82
+ - Animated "thinking" bubble during processing
83
+ - Full Markdown rendering in responses
84
+ - **Copy button**: appears on hover over agent responses for one-click copy
85
+ - **Context menu**: right-click on any agent to see agent-specific MDC commands
86
+ - Stop button to cancel ongoing processing
87
+ - Conversation history persisted across reloads
88
+ - Dynamic z-index system (bring-to-front on click)
89
+
90
+ ### Model Selector & Filters
91
+ - **Model Bar**: LLM model selection applied to all agents
92
+ - **Cursor ACP**: dynamic submenu listing all models available in the user's Cursor account (Claude, GPT, Gemini, Grok, etc.)
93
+ - **Direct models**: Composer 2, Claude Opus/Sonnet, GPT-5.x, Gemini, Grok, Kimi
94
+ - **Status Filter**: All / Working — displays real-time counter (e.g. 14/14)
95
+ - **Module Filter**: BMGD / BMM / CORE — segments agents by area
96
+
97
+ ### Cursor ACP (Agent Client Protocol)
98
+ - Direct communication with Cursor via JSON-RPC 2.0 over stdio (`agent acp`)
99
+ - Automatic discovery of available models via ACP session `configOptions`
100
+ - Per-session model switching via `session/set_config_option`
101
+ - Persistent ACP process with 30-min session TTL and automatic reconnection
102
+ - Error fallback with actionable messages for the user
103
+
104
+ ### BMAD Orchestration
105
+ - Automatic detection of Party Mode and active workflows
106
+ - Agents dynamically move to rooms according to the workflow
107
+ - Session state persisted on disk and synchronized via SSE
108
+ - Per-agent message and token metrics
109
+
110
+ ### Persistent Memory System (v2.1)
111
+ - **Memory Vault**: full visual panel with 5 categories (decisions, lessons, tasks, projects, handoffs)
112
+ - **Auto-extract via LLM**: when closing a session, the system analyzes the conversation and automatically extracts structured memories
113
+ - **Badge 🤖 llm**: automatically extracted entries are flagged for 10 minutes with veto option
114
+ - **BM25 Search**: relevance-based semantic search within each agent's vault
115
+ - **Context Injection**: relevant memories automatically injected when starting new sessions (2,000-token budget)
116
+ - **Auto-save**: conversations saved every 30s + save on unload via `sendBeacon`
117
+ - **Session Checkpoint**: history preserved even across unexpected restarts
118
+ - **Shared Memory**: `_project.md` injected into all agents as global context
119
+
120
+ ### Portability & Installation (v1.0)
121
+ - **Dynamic Discovery**: automatically detects BMAD agents via CSV/YAML — no hardcoding
122
+ - **Cross-platform**: works on Windows, macOS, and Linux
123
+ - **Web Setup Wizard**: `/setup` in the browser — 3 animated phases: machine scan, review, step-by-step configuration
124
+ - **CLI Setup Wizard**: `npm run setup` — interactive terminal alternative (6 steps)
125
+ - **Health Gate**: if not configured, automatically redirects to `/setup`
126
+ - **Flexible Config**: local `aiteam.config.json` + `AITEAM_BMAD_ROOT` for external/CI instances
127
+
128
+ ---
129
+
130
+ ## Tech Stack
131
+
132
+ | Layer | Technology | Version |
133
+ |-------|-----------|---------|
134
+ | Framework | Next.js (App Router) | 15.x |
135
+ | UI | React | 19.x |
136
+ | Language | TypeScript | 5.x |
137
+ | Styling | CSS custom (pixel art design system) | — |
138
+ | Font | VT323 (Google Fonts) | — |
139
+ | Backend | Next.js API Routes + SSE | — |
140
+ | Search | MiniSearch (BM25) | — |
141
+ | Agents | Cursor Agent CLI + ACP | latest |
142
+ | Protocol | ACP (JSON-RPC 2.0 / stdio) | v1 |
143
+ | Parsing | yaml (npm) | 2.8.x |
144
+ | Agent Framework | BMAD Method | — |
145
+
146
+ ---
147
+
148
+ ## Quick Start
149
+
150
+ ### Prerequisites
151
+
152
+ | Requirement | Required | Notes |
153
+ |-------------|----------|-------|
154
+ | Node.js >= 18 | Yes | `node --version` |
155
+ | BMAD Framework | Yes | See [Installation Guide](docs/installation-guide.md) |
156
+ | Cursor IDE | Yes | Generates the Cursor Agent CLI on first launch |
157
+ | Git | Yes | — |
158
+
159
+ > **Supported platforms:** Windows 10/11, macOS, Linux
160
+
161
+ ### Installation
162
+
163
+ **Option 1 — One command (recommended):**
164
+
165
+ ```bash
166
+ npx aiteam-x@latest
167
+ ```
168
+
169
+ Creates the project in the current directory (must be empty). Or specify a folder name:
170
+
171
+ ```bash
172
+ npx aiteam-x@latest my-project
173
+ ```
174
+
175
+ The command downloads the template, installs dependencies, runs the setup wizard, and starts the server automatically.
176
+
177
+ **Option 2 — Manual installation:**
178
+
179
+ ```bash
180
+ # 1. Clone the repository
181
+ git clone https://github.com/INOSX/AITeam.git
182
+ cd AITeam
183
+
184
+ # 2. Install dependencies
185
+ npm install
186
+
187
+ # 3. Run the setup wizard
188
+ npm run setup
189
+
190
+ # 4. Start the development server
191
+ npm run dev
192
+ ```
193
+
194
+ The dashboard will be available at **http://localhost:3000**.
195
+
196
+ > If setup hasn't been completed, the system automatically redirects to `http://localhost:3000/setup` — an animated wizard that detects the environment, shows what's ready, and lets you configure everything through the browser.
197
+
198
+ > **CLI alternative:** `npm run setup` runs the interactive wizard in the terminal.
199
+
200
+ ### Available Scripts
201
+
202
+ | Command | Description |
203
+ |---------|-------------|
204
+ | `npm run setup` | **Interactive setup wizard** (first install) |
205
+ | `npm run dev` | Start the development server (port 3000) |
206
+ | `npm run build` | Generate the production build |
207
+ | `npm run start` | Start the production server |
208
+ | `npm run lint` | Run the linter (ESLint) |
209
+
210
+ ### Utility Scripts
211
+
212
+ | Script | Description |
213
+ |--------|-------------|
214
+ | `node scripts/extract-memories.mjs --all` | Extract memories from historical conversations via LLM |
215
+ | `node scripts/extract-memories.mjs --agent bmad-master` | Extract memories for a specific agent |
216
+ | `node scripts/extract-memories.mjs --all --dry-run` | Simulate extraction without saving |
217
+ | `node scripts/import-conversations.mjs` | Import conversation history into the vault |
218
+
219
+ > All scripts require the server running at `localhost:3000`.
220
+
221
+ ---
222
+
223
+ ## Project Structure
224
+
225
+ ```
226
+ AITeam/
227
+ ├── app/ # Next.js App Router
228
+ │ ├── api/ # API Routes (backend)
229
+ │ │ ├── acp/
230
+ │ │ │ └── models/route.ts # GET: available models via ACP
231
+ │ │ ├── agents/
232
+ │ │ │ ├── route.ts # GET: list agents with status
233
+ │ │ │ ├── command/route.ts # POST: send command via SSE (CLI or ACP)
234
+ │ │ │ └── menus/route.ts # GET: agent context menus
235
+ │ │ ├── bridge/route.ts # GET: ACP health check
236
+ │ │ ├── config/route.ts # GET: BMAD configuration
237
+ │ │ ├── memory/
238
+ │ │ │ ├── route.ts # GET/POST: memory and conversations (legacy)
239
+ │ │ │ ├── vault/route.ts # GET/POST/PUT/DELETE: structured vault
240
+ │ │ │ ├── search/route.ts # GET: BM25 search
241
+ │ │ │ ├── checkpoint/route.ts # POST: session checkpoint
242
+ │ │ │ ├── sleep/route.ts # POST: end session + queue LLM extraction
243
+ │ │ │ └── extract/route.ts # POST: manual LLM extraction trigger
244
+ │ │ ├── session/
245
+ │ │ │ ├── route.ts # GET/POST: active session
246
+ │ │ │ └── stream/route.ts # GET: SSE for session changes
247
+ │ │ ├── sprint/route.ts # GET/POST: sprint status
248
+ │ │ └── workflows/route.ts # GET: available workflows
249
+ │ ├── actions/
250
+ │ │ └── setup-save.ts # Server Action: saves aiteam.config.json
251
+ │ ├── setup/
252
+ │ │ ├── page.tsx # Setup page (health gate + Server Component)
253
+ │ │ └── SetupWizard.tsx # Animated 3-phase wizard (Client Component)
254
+ │ ├── globals.css # Pixel art design system (800+ lines)
255
+ │ ├── layout.tsx # Root layout (VT323, pt-BR)
256
+ │ ├── error.tsx # Error boundary
257
+ │ └── page.tsx # Main page (health gate)
258
+
259
+ ├── components/ # React Components
260
+ │ ├── rooms/ # Virtual office rooms
261
+ │ │ ├── ConferenceRoom.tsx
262
+ │ │ ├── JarvisOffice.tsx
263
+ │ │ └── Kitchen.tsx
264
+ │ ├── AgentContextMenu.tsx # Per-agent context menu
265
+ │ ├── AgentsProvider.tsx # Global Context Provider
266
+ │ ├── CommandPopup.tsx # Multi-agent popup
267
+ │ ├── CopyButton.tsx # Copy button for responses
268
+ │ ├── FilterContext.tsx # Filter context (status + module)
269
+ │ ├── Layout.tsx # Shell (TopBar + ModelBar + BottomBar)
270
+ │ ├── MainContent.tsx # Main orchestrator (~500 lines)
271
+ │ ├── MarkdownRenderer.tsx # Custom Markdown renderer
272
+ │ ├── MemoryVault.tsx # Memory Vault dashboard (modal)
273
+ │ ├── ModelBar.tsx # Model selection bar and filters
274
+ │ ├── PixelAvatar.tsx # Pixel art SVG avatar
275
+ │ ├── SpeechBubbleOverlay.tsx # Chat overlay system
276
+ │ ├── ThinkingBubble.tsx # Animated thinking indicator
277
+ │ ├── WorkspaceCell.tsx # Individual workspace cell
278
+ │ └── WorkspaceGrid.tsx # Workspace grid
279
+
280
+ ├── lib/ # Business logic and utilities
281
+ │ ├── acp-client.ts # ACP client (JSON-RPC 2.0 over stdio)
282
+ │ ├── acp-manager.ts # ACP session manager
283
+ │ ├── aiteam-config.ts # Config loader (env var > file > defaults)
284
+ │ ├── health.ts # Health check: BMAD, Cursor CLI, config
285
+ │ ├── setup-discovery.ts # Extended discovery for the web wizard
286
+ │ ├── bmad/ # BMAD Integration
287
+ │ │ ├── discovery.ts # Dynamic BMAD scanner + Cursor CLI detection
288
+ │ │ ├── agent-mapping.ts # BmadAgent -> Agent mapping
289
+ │ │ ├── chat-sessions.ts # Chat session persistence
290
+ │ │ ├── parse-agents.ts # agent-manifest.csv parser
291
+ │ │ ├── parse-config.ts # config.yaml parser
292
+ │ │ ├── parse-persona.ts # Persona (.mdc) parser
293
+ │ │ ├── parse-session.ts # Session state + SSE
294
+ │ │ ├── parse-sprint.ts # sprint-status.yaml parser
295
+ │ │ └── parse-workflows.ts # Workflows parser
296
+ │ ├── memory/ # Memory system v2
297
+ │ │ ├── extract.ts # LLM extraction engine
298
+ │ │ ├── inject.ts # Context injection (BM25 + budget)
299
+ │ │ ├── session.ts # Session lifecycle (sleep/recover)
300
+ │ │ ├── types.ts # Memory system types
301
+ │ │ └── vault.ts # Structured vault CRUD
302
+ │ ├── model-config.ts # Available LLM model options
303
+ │ └── types.ts # Global TypeScript types
304
+
305
+ ├── .memory/ # Memory Bank (persistent, gitignored)
306
+ │ ├── _project.md # Global context — injected into all agents
307
+ │ ├── {agent-id}.md # Individual memory bank per agent
308
+ │ ├── conversations/ # Conversation history (JSON)
309
+ │ └── .vault/ # Structured vault and extraction queue
310
+
311
+ ├── docs/ # Project documentation
312
+ │ ├── screenshots/ # UI screenshots
313
+ │ ├── installation-guide.md # Full installation guide
314
+ │ ├── architecture.md # System architecture
315
+ │ ├── api-reference.md # Complete API reference
316
+ │ ├── developer-guide.md # Developer guide
317
+ │ ├── user-guide.md # End-user guide
318
+ │ ├── memory-system.md # Memory system technical architecture
319
+ │ ├── memory-system-guide.md # Memory system functional guide
320
+ │ ├── agent-catalog.md # Complete BMAD agent catalog
321
+ │ └── sprint-status.yaml # Current sprint status
322
+
323
+ ├── scripts/ # Utility scripts
324
+ │ ├── setup.mjs # Interactive setup wizard (6 steps)
325
+ │ ├── extract-memories.mjs # Batch LLM extraction
326
+ │ └── import-conversations.mjs # History import into vault
327
+
328
+ ├── aiteam.config.example.json # Configuration example (reference)
329
+ ├── .cursor/ # Cursor IDE rules and skills
330
+ │ └── rules/bmad/ # BMAD rules (.mdc): agents and workflows
331
+
332
+ ├── package.json
333
+ ├── tsconfig.json
334
+ ├── next.config.ts
335
+ └── .gitignore
336
+ ```
337
+
338
+ ---
339
+
340
+ ## Documentation
341
+
342
+ | Document | Level | Description |
343
+ |----------|-------|-------------|
344
+ | [Installation Guide](docs/installation-guide.md) | Beginner | Step-by-step installation, setup wizard, troubleshooting |
345
+ | [Architecture](docs/architecture.md) | Technical/Architectural | Diagrams, data flows, design decisions |
346
+ | [API Reference](docs/api-reference.md) | Technical | Endpoints, parameters, request/response examples |
347
+ | [Developer Guide](docs/developer-guide.md) | Developer | Setup, conventions, how to contribute |
348
+ | [User Guide](docs/user-guide.md) | End User | How to use the dashboard, interact with agents, Memory Vault |
349
+ | [Memory System (technical)](docs/memory-system.md) | Technical/Conceptual | Layered architecture of the memory system |
350
+ | [Memory Guide (functional)](docs/memory-system-guide.md) | End User | How to use the Memory Vault, case studies, best practices |
351
+ | [Agent Catalog](docs/agent-catalog.md) | Reference | All agents, specialties, and how to work with each one |
352
+
353
+ ---
354
+
355
+ ## BMAD Agents
356
+
357
+ The system automatically discovers agents from `bmad/_cfg/agent-manifest.csv`. The default installation includes 14 agents:
358
+
359
+ | Persona | Role | Module |
360
+ |---------|------|--------|
361
+ | **BMad Master** | Main orchestrator, knowledge custodian | core |
362
+ | **BMad Builder** | BMAD module, agent, and workflow creation | core |
363
+ | **Mary** | Business Analyst — research and business requirements | bmm |
364
+ | **John** | Product Manager — PRD, epics, product management | bmm |
365
+ | **Winston** | Architect — system architecture and tech spec | bmm |
366
+ | **Sally** | UX Designer — experience and interface design | bmm |
367
+ | **Bob** | Scrum Master — sprint planning and code review | bmm |
368
+ | **Amelia** | Developer — story and feature implementation | bmm |
369
+ | **Murat** | Test Architect — testing strategy and design | bmm |
370
+ | **Paige** | Tech Writer — technical documentation and knowledge | bmm |
371
+ | **Cloud Dragonborn** | Game Architect — game architecture and systems | bmgd |
372
+ | **Samus Shepard** | Game Designer — GDD, narrative, and game design | bmgd |
373
+ | **Link Freeman** | Game Developer — game implementation | bmgd |
374
+ | **Max** | Game Scrum Master — agile management for game dev | bmgd |
375
+
376
+ > See the [Agent Catalog](docs/agent-catalog.md) for details on each agent's specialties and commands.
377
+
378
+ ---
379
+
380
+ ## Configuration
381
+
382
+ AITEAM-X uses a local `aiteam.config.json` file (gitignored) generated by `npm run setup`. For advanced configuration, create a `.env.local`:
383
+
384
+ ```env
385
+ # Alternate path to the BMAD installation
386
+ # Useful for: BMAD in another directory, CI/CD, multiple projects
387
+ AITEAM_BMAD_ROOT=/path/to/your/bmad-project
388
+
389
+ # Overrides the memory directory (useful for testing)
390
+ MEMORY_DIR_OVERRIDE=/custom/path/.memory
391
+ ```
392
+
393
+ **Configuration priority for `bmadRoot`:**
394
+ ```
395
+ AITEAM_BMAD_ROOT (env var) > aiteam.config.json > "./" (default)
396
+ ```
397
+
398
+ See the [Installation Guide](docs/installation-guide.md) for all configuration scenarios.
399
+
400
+ ---
401
+
402
+ ## Contributing
403
+
404
+ 1. Create a branch from `develop`
405
+ 2. Make your changes following project conventions
406
+ 3. Ensure `npm run lint` and `npm run build` pass
407
+ 4. Open a Pull Request to `develop`
408
+
409
+ See the [Developer Guide](docs/developer-guide.md) for details.
410
+
411
+ ---
412
+
413
+ ## License
414
+
415
+ This project is distributed under the MIT License. See [LICENSE](LICENSE) for details.
416
+
417
+ ---
418
+
419
+ ## Author
420
+
421
+ **Mario Mayerle (MaMFLux)** — [INOSX](https://inosx.com)
422
+
423
+ ---
424
+
425
+ *Built with the BMAD Method — where AI agents work as a team.*