Contributing
OpenMotoko is open source and welcomes contributions. This guide covers the development workflow.
Development setup
Section titled “Development setup”git clone https://github.com/openmotoko/openmotoko.gitcd openmotokocorepack enablepnpm installpnpm buildStart the dev servers:
pnpm devThis runs the API (port 3457) and web UI (port 5173) in parallel with hot reload.
Monorepo structure
Section titled “Monorepo structure”openmotoko/ packages/ core/ Agent runtime, LLM, DB, memory, RAG, security api/ Fastify REST + WebSocket server web/ React PWA (Vite + Tailwind + Radix) desktop/ Tauri 2 native wrapper skill-sdk/ Manifest schema, IPC bridge, test harness skills/ Built-in skills channels/ Channel adapters (14 platforms) cli/ CLI tool landing/ Marketing site registry-server/ Skill registry create-skill/ Skill scaffolder docs/ Documentation (Starlight) docker/ scripts/Code style
Section titled “Code style”OpenMotoko uses Biome for linting and formatting.
Key rules
Section titled “Key rules”| Rule | Value |
|---|---|
| Indent | Tabs |
| Quotes | Single |
| Semicolons | None (ASI) |
| Trailing commas | Always |
| Line width | 100 characters |
Run checks
Section titled “Run checks”pnpm checkAuto-fix
Section titled “Auto-fix”pnpm check:fixTypeScript conventions
Section titled “TypeScript conventions”- Strict mode always on
- Use
typeimports:import type { X } from './y' - Prefer interfaces over type aliases for object shapes
- Use Zod for runtime validation at API boundaries
- IDs: nanoid (not UUID)
- Timestamps: Unix milliseconds as numbers
Testing
Section titled “Testing”Tests use Vitest.
Run tests
Section titled “Run tests”pnpm testWatch mode
Section titled “Watch mode”pnpm test:watchCoverage
Section titled “Coverage”pnpm test:coverageTest organization
Section titled “Test organization”Tests live next to their source files:
src/ memory/ working.ts working.test.ts semantic.ts semantic.test.tsDatabase changes
Section titled “Database changes”- Edit the schema in
packages/core/src/db/schema.ts - Generate a migration:
pnpm db:generate - Apply the migration:
pnpm db:migrate - Update affected API routes and types
Pull request process
Section titled “Pull request process”- Create a feature branch from
main - Make your changes following the code style
- Add or update tests
- Run
pnpm checkandpnpm test - Open a PR with a clear description of the change
- CI runs Biome checks and Vitest
PR checklist
Section titled “PR checklist”- Code passes
pnpm check - Tests pass with
pnpm test - New features include tests
- No
console.logleft in production code - Types are properly exported where needed
- Breaking changes are noted in the PR description
Architecture decisions
Section titled “Architecture decisions”- SQLite with Drizzle ORM: single-file database, no external DB service needed
- Fastify: performance-focused HTTP framework with schema validation
- Zod: runtime type validation at API boundaries
- nanoid: compact, URL-safe IDs
- Biome: fast Rust-based linter/formatter (replaces ESLint + Prettier)
- Vitest: Vite-native test runner with Jest-compatible API