Repository Guidelines
Project Structure & Module Organization
- Monorepo managed by
pnpm. Packages live underpackages/:packages/core(shared services),packages/sdk(client SDK),packages/realtime(LiveKit/RTC),packages/cli(developer CLI).
- Examples in
examples/*(e.g.,examples/voice-bot,examples/basic-bot). - Tests colocated with code as
*.spec.tsunderpackages/*/src. Shared helpers intest-utils/. - Docs in
docs/. Type configs intsconfig*.json.
Build, Test, and Development Commands
- Install:
pnpm install(Node 22 pinned via .node-version). - Build all:
pnpm build(recurses). Per package:pnpm -F @metatell/bot-core build. - Typecheck:
pnpm typecheckorpnpm -F <pkg> typecheck. - Test:
pnpm test(Vitest). Coverage:pnpm test:coverage. UI:pnpm test:ui. - Lint/format:
pnpm check(Biome). Autofix:pnpm check:fix. - Clean:
pnpm clean. Docs:pnpm typedoc.
Coding Style & Naming Conventions
- Language: TypeScript with
strictsettings (tsconfig.base.json). - Formatting: Biome (2 spaces, single quotes, trailing commas, no unnecessary semicolons).
- Naming: PascalCase classes, camelCase functions/vars, kebab-case files and package names. Keep cohesive modules under
src/.
Testing Guidelines
- Framework: Vitest. Place tests next to code as
*.spec.ts. - Coverage via V8; run
pnpm test:coverage(text/html/json-summary). - Reuse utilities in
test-utils/and existing mocks within each package.
Commit & Pull Request Guidelines
- Always run
pnpm run checkandpnpm run testbefore committing. - Conventional Commits (
feat:,fix:,chore:…). Include motivation and scope. - Use Changesets for user-facing changes:
pnpm changeset; version withpnpm bumpup; release viapnpm release. - PRs include: clear description, linked issues, tests, and docs updates (package READMEs or
docs/*). Add screenshots/terminal output for CLI changes.
Security & Configuration Tips
- Never commit secrets. Use
.envfiles in examples (examples/*/.env.example). - Validate external services (e.g., LiveKit, Google APIs) in examples and document required env vars.