Skip to content

Latest commit

 

History

History
120 lines (104 loc) · 4.95 KB

File metadata and controls

120 lines (104 loc) · 4.95 KB

Source tree analysis — AITEAM-X

Annotated map of the project structure and purpose of each directory and critical file.


Overview

  • Type: Monolith (Next.js 15 App Router)
  • Total source files: on the order of ~150+ (excluding node_modules, aiteam-x-agents/ rules content)
  • Total LOC: ~20,000+
  • UI: 2D only (pixel art and decorative canvas); no Three.js assets in the current repo
  • Images: avatars, logos, screenshots under public/images/

Annotated tree

AITeam/
├── app/                           # Next.js App Router — pages and API
│   ├── [locale]/                  # Locale-prefixed routes (next-intl)
│   │   ├── layout.tsx             # Per-locale layout
│   │   ├── page.tsx               # ★ Entry: health → /setup or dashboard
│   │   └── setup/                 # First-run setup wizard
│   ├── globals.css                # ★ Monolithic styles (~7,300 LOC, custom properties)
│   ├── error.tsx
│   └── api/                       # ★ 32 route.ts modules (BFF)
│       ├── agents/ (+ command, menus)
│       ├── acp/models/, bridge/
│       ├── config/, aiteam-config/
│       ├── memory/ (+ checkpoint, compact, migrate, search, vault)
│       ├── session/ (+ stream/)
│       ├── sprint/
│       ├── rooms/
│       ├── files/revert/
│       ├── terminal/execute/
│       ├── version/ (check, update, restart)
│       └── workflows/
│
├── components/                    # ★ ~47 .tsx — dashboard UI
│   ├── office/
│   │   └── PixelAgentsOffice.tsx # Optional pixel-agents view (grid + pathfinding)
│   ├── rooms/                    # ConferenceRoom, JarvisOffice, Kitchen
│   ├── MainContent.tsx            # Main orchestrator
│   ├── OfficeSkinProvider.tsx    # classic | pixel-agents context
│   ├── OfficeSkinToggle.tsx
│   ├── ChatDrawer.tsx, Sidebar.tsx, ...
│   └── ...
│
├── hooks/
│   └── useVersionCheck.ts
│
├── lib/
│   ├── aiteam-config.ts
│   ├── acp-client.ts, acp-manager.ts
│   ├── bmad/                      # discoverAgentsPack, agent-mapping, parsers
│   ├── memory/                    # vault, search, inject, compact, …
│   ├── pixel-office/              # layout, render, motion, pathfinding
│   └── ...
│
├── messages/                      # Translation JSON (en, pt)
├── public/
│   ├── images/agents/             # chibi, hybrid, …
│   ├── pixel-agents/              # Optional layouts (see vendor README)
│   └── ...
│
├── scripts/
│   ├── cli.mjs, setup.mjs, safe-build.mjs, clean-start.mjs, clean-next.mjs
│   └── vendor-pixel-assets.mjs
│
├── aiteam-x-agents/               # Agent pack and workflows (manifest + .md copies)
├── .cursor/rules/aiteam-x/        # Personas and workflows (.mdc) for Cursor
│
├── docs/                          # Documentation + runtime state (YAML/JSON)
├── .memory/                       # Vault and conversations (gitignored)
├── package.json
├── next.config.ts                 # distDir .next-dev vs .next
└── ...

Critical directories

Directory Purpose Key files
app/api/agents/command/ Agent command (CLI/ACP, SSE) route.ts
app/api/observability/ Observability snapshot + ingest (localhost POST) route.ts
lib/observability-*.ts Event store, server logger, rate limit, webhook, OTEL hook observability-store.ts, observability-server.ts, …
components/ React dashboard tree MainContent.tsx, Layout.tsx, ObservabilityDashboard.tsx
lib/bmad/ Pack discovery and mapping discovery.ts, agent-mapping.ts
lib/memory/ Structured persistence and BM25 vault.ts, search.ts, inject.ts
lib/pixel-office/ 2D pixel-agents scene render-scene.ts, motion.ts
app/globals.css Pixel / multi-theme styling custom properties
docs/ Documentation + sprint-status.yaml, session-state.json, … shared state
.memory/ Per-agent vault data gitignored

Entry points

Type File Description
Web app/[locale]/page.tsx Health, setup redirect, dashboard
Setup app/[locale]/setup/page.tsx Wizard
CLI scripts/cli.mjs npx aiteam-x
API app/api/**/route.ts 32 modules (incl. observability, arena, memory audit)

Integration points

From To Mechanism
Frontend API routes fetch(), EventSource (SSE)
API Cursor Agent CLI child_process.spawn, JSON stream
API Cursor ACP JSON-RPC over stdio
API Disk read/write YAML/JSON/MD
Client localStorage theme, model, pixel layout, etc.