Skip to content

System Architecture

TIP

Read this if: you need a single map of how pieces connect before customizing skills or wiring MCP.

High-level diagram

mermaid
flowchart TB
  subgraph CLI["cm CLI"]
    IDX[src/index.ts]
    REG[src/cli/command-registry.ts]
    CMD[src/cli/commands/*]
  end
  subgraph Persist["Persistence"]
    KAN[~/.codymaster/kanban.json]
    CM[.cm/*]
    DB[(context.db SQLite)]
  end
  subgraph Net["Network / IPC"]
    DASH[Dashboard Express]
    BRWS[Browse daemon]
    MCP[MCP stdio server]
  end
  IDX --> REG
  REG --> CMD
  CMD --> KAN
  CMD --> CM
  CM --> DB
  CMD --> DASH
  CMD --> BRWS
  MCP --> CM
  MCP --> DB

Text fallback: CLI commands read/write global kanban and per-project .cm data; dashboard and browse are HTTP servers; MCP talks to the same project memory.

Layer responsibilities

LayerRoleKey paths
EntryParse argv, register commandssrc/index.ts
CommandsUser-facing operationssrc/cli/commands/*.ts
DomainData rules, continuity, bus, sprintsrc/continuity.ts, src/context-bus.ts, src/sprint-pipeline.ts
StorageSQLite FTS + legacy-config fallbacksrc/context-db.ts, src/storage-backend.ts
IntegrationDashboard, browse, MCPsrc/dashboard.ts, src/browse-server.ts, src/mcp-context-server.ts

Extension points

  • New CLI command — add module under src/cli/commands/, register in src/cli/command-registry.ts.
  • New skill — add skills/<id>/SKILL.md (validated by npm run validate:skills).
  • Storage engine — implement or configure StorageBackend (src/storage-backend.ts); sqlite is the supported default and legacy viking configs are normalized back to it.

CodyMaster — AI-assisted engineering toolkit