CONTRIBUTING.md is the authority on process; the Internals section explains why the code is shaped the way it is.
The single source of truth for process is
CONTRIBUTING.md at the repo root. This page is a guided tour of it with cross-links into the rest of the docs. If the two ever disagree, CONTRIBUTING.md and the root package.json win.Prerequisites
- Node.js 22+ and pnpm 9+ (the root
package.jsondeclaresengines.node >=22.0.0andengines.pnpm >=9.0.0; the pinned package manager ispnpm@9.15.0). - No external runtime is required to develop or test. Clawboo runs agents natively; paste a provider key and the in-process
clawboo-nativeharness handles execution. Connecting OpenClaw, Claude Code, Codex, or Hermes is only needed when you are working on those adapters.
Steps
1. Clone and install
pnpm install resolves the whole workspace, the three globs packages/*, packages/adapters/*, and apps/* (see Monorepo and build for the layout).
2. Run the dev stack
dev script runs turbo dev. For the dashboard, apps/web’s dev orchestrator picks a free API port first, then starts the Express API and the Vite SPA on the same port so there is no race. It prints a banner like:
- The Vite SPA serves on
:5173. - The Express API binds the resolved port: default
18790, with an auto-fallback that scans up to 20 consecutive ports if18790is busy. Pin it withCLAWBOO_API_PORT(see Environment variables).
~/.clawboo/ (auto-created on first run). To point a dev instance at a throwaway directory, set CLAWBOO_HOME. There are no feature flags; every subsystem ships on, so there is nothing to enable.
3. Make your change on a branch
Clawboo follows GitHub Flow: branch frommain, push, open a PR, and squash-merge once CI is green. Use a descriptive prefix:
| Prefix | For |
|---|---|
feat/ | A new feature or surface |
fix/ | A bug fix |
chore/ | Tooling, deps, housekeeping |
docs/ | Documentation only |
test/ | Tests only |
refactor/ | Non-behavioral restructuring |
4. Run the local gate before pushing
Run the same checks CI runs, in this order. They are all root scripts inpackage.json:
pnpm testruns two Vitest projects: a node project for pure logic (*.test.ts) and a jsdom project for React components (*.test.tsx, RTL + MSW + jest-dom + jest-axe). See Testing.pnpm e2eruns Playwright end-to-end, including the durable-board round-trip and the eval smoke suite.pnpm verify:ingestre-derives the codegen’d marketplace catalog (304 agents, 82 teams) and fails on any drift from the committed files. If you touched ingestion, regenerate withpnpm ingest:marketplacefirst. See Codegen and ingestion.pnpm assemble && pnpm test:clean-install(aliased aspnpm prepublish:check) bundles the CLI and boots it as a clean install to catch first-run regressions. This is the same gate the release workflow runs: see Release process.
5. Add a changeset for user-facing changes
Clawboo uses Changesets for versions and changelogs. Any change that affects a published package needs one:patch / minor / major), and a one-line summary, then writes a file under .changeset/. Commit it alongside your code.
Every
@clawboo/* library is private: true; only the clawboo CLI publishes to npm, with the libraries inlined into its bundle. So in practice a changeset matters when your change reaches the clawboo CLI’s bundled behavior. Documentation-only, CI-only, and apps/web-only changes do not need a changeset; the dashboard package (@clawboo/web) and @clawboo/docs are in the changeset ignore list, and the dashboard is not published.6. Open the pull request
Push your branch and open a PR. The PR template walks the checklist. Keep it to one concern per PR; split unrelated changes. Add a test for anything you add (unit logic in Vitest, components in the jsdom project, new end-to-end behavior in Playwright). CI must be green before review, and PRs are squash-merged intomain.
Code guidelines
These are enforced by review and, where possible, by lint:- TypeScript strict. No
any, no@ts-ignore, no leakingunknown. - No
console.log. Log through@clawboo/logger(pino). - Lucide icons only, never emoji in the UI.
- Theme tokens, never raw hex: use the CSS variables and Tailwind tokens (brand marks are the only exception). See the design system.
- Pure where it claims to be. Policy and projection functions stay side-effect-free and unit-testable.
- No secrets in logs, responses, or storage. A credential’s presence may be shown (the env-var name plus true/false), never its value. See Security.
Architecture invariants to respect
A change must not break the seven architecture invariants. The ones most likely to bite a first contribution:- The registry is the source of truth for who exists; the Gateway is the source of truth for how OpenClaw agents run. Reads go through an
AgentSource, not directly off the Gateway client. - Packages never import apps. Dependency flow is one-way (
apps/web→packages/**,packages/adapters/*→@clawboo/executor). See the package dependency graph. - A teammate is a
RuntimeAdapter. New runtimes implement the trait and emit the normalizedRuntimeEventunion rather than special-casing the orchestrator. - The board is canonical for task/coordination state. Prefer board mutations over prose-scanning heuristics: see Board internals and Delegation and orchestration.
- Schema changes are a hard reset. There is no migration ladder;
createDb’s inlineCREATE TABLE IF NOT EXISTSDDL is the sole source of the schema. Changing it means a fresh~/.clawboo, not an in-place migration. See the database schema reference.
Release process
Releases are automated and maintainer-only: when changesets land onmain, the publish.yml workflow opens a “Version Packages” PR; merging it bumps versions, updates changelogs, and publishes the clawboo CLI. No manual npm publish. The clean-install gate (pnpm test:clean-install) runs in the workflow before publish. See Release process for the full pipeline.
License
By contributing, you agree your contributions are licensed under the MIT License. See License and notices.See also
CONTRIBUTING.md, the canonical process doc this page summarizes- Internals overview, the contributor’s map of the monorepo
- Monorepo and build, workspaces, build order, and commands
- Testing, the unit / e2e / clean-install / evals strategy
- Release process, Changesets and the publish workflow
- Architecture invariants, the rules a change must not break
- Environment variables,
CLAWBOO_HOME,CLAWBOO_API_PORT, and the rest - Design system, tokens, surfaces, motion, theming