Skip to content

Codebase & Development ​

iKi is organized as a layered TypeScript monorepo.

Package Layout ​

All core logic lives in pure Node/TypeScript packages (packages/core up to packages/harness). packages/cli, packages/desktop, and packages/im (the IM gateway shell) sit on top of @iki/harness as thin shells.

Dependencies only point downward—shells depend on harness, harness depends on lower runtime/storage packages, and nothing loops back up. This is checked automatically on every run with .dependency-cruiser.cjs.

Click any package below to see what it owns and what it can import:

App & Gateway Shells↓
Core Orchestration↓
Runtime & Storage↓
Base Types & Config↓
Selected Package

@iki/harness

Core orchestration: session management, turn preparation, MCP Code Mode manager, git-worktree Swarm coordinator, and tool wiring.

Internal Dependencies
checked by dependency-cruiser & knip

Checking a module before editing

Run pnpm run arch:context <module-id> (for example pnpm run arch:context harness/mcp) to print a short summary of that module's boundaries and exports from scripts/module_registry.json.

Common Dev Commands ​

bash
# Run the full static check (eslint, tsc, vue-tsc, depcruise, knip)
pnpm run ci:quality

# Unit & integration tests
pnpm exec vitest run packages/*/tests

# Deterministic end-to-end tests (no API key required)
pnpm run test:e2e:cli:faux
pnpm run test:e2e:gateway:faux
pnpm run test:e2e

# Build the standalone npm CLI package (@irorange27/iki)
pnpm run cli:pack

# Run or build this documentation site
pnpm run site:dev
pnpm run site:build

Released under AGPL-3.0-only.