Prerequisites
- A local checkout of this repository.
- The Node version in
.node-versionand the pnpm version inpackage.json. - The root
AGENTS.mdand the instructions for any package you change.
Local setup
1. Install dependencies and build
From the repository root:2. Make your change
Follow the workflow and conventions below.Before submitting a PR
3. Run the checks
From the repository root:pnpm check runs pnpm lint and pnpm format:check. A documentation change
also runs pnpm docs:check:drift, which regenerates module pages and
constants before comparing them. Run it from the repository root after
committing your authored docs edits, because its comparison includes all
tracked changes under docs/:
Monorepo conventions
- Package manager: pnpm 10+ with workspaces
- TypeScript: strict mode, ES modules
- Runtime model: Effect services and typed error channels
- Formatting: oxfmt
- Testing: vitest
- Task graph: Nx derives package order from declared dependencies
Workflow
Understand the task, decide if needed, implement and test, obtain independent review, then ship. A routine fix stays in its issue/PR. A coordinated feature gets one plan; a durable design choice gets one complete ADR with source evidence, independent review, and explicit owner approval. The original request or issue authorizes bounded implementation without another approval ritual. Public specifications indocs/vision.md and docs/spec/, together with the
checks in this repository, are the authority for every contribution. A new
boundary choice updates its public specification before implementation.
Architecture checks
pnpm lint runs the architecture gates: the package graph and boundary check,
arch:check for every package, and arch:config:check. Run a gate on its own
from the repository root while you work. Successful analysis and drift checks
exit with status 0; generation writes the package configuration files:
Package budgets come from
scripts/architecture/gen-configs.ts; the JSON files
are its output, so change a budget in the generator and regenerate. Exceptions
are safer-arch-ignore directives in the source, most at the top of the file
they cover. List them from the repository root:
Documentation
The docs site atdocs/ is built with
Mintlify. Source JSDoc generates per-folder module
pages, and source-owned constants generate shared snippets. Run
pnpm docs:generate before landing changes to either surface.
- Guides and development pages: edit the MDX files directly in
docs/. - Module pages and constants: edit their source or generator, then run
pnpm docs:generate. - Reusable content: shared snippets live in
docs/snippets/.
Code style
- Decode network, disk, environment, and dynamic-import inputs with Effect
Schema. - Declare branded domain values in their owning package.
- Keep typed errors in the Effect error channel.
- Prefer integration tests at real process and storage boundaries.
Maintainer releases and records
Branches and releases
mainis the only long-lived branch; every change lands there by pull request.- Releases are manual runs of
.github/workflows/publish.yml. The dispatched run computes one calendar version, commits it for the public packages that changed since their last published version, along with any changelog section it writes from the fragments inchangelog.d/, pushes that release commit and its tag, and dispatches a second run. The second run publishes from the release commit, so npm’s provenance names it. Building and packing run in a job that holds no token; the push and the publish run in separate jobs in thereleaseGitHub environment, whose required reviewers gate every release. The push uses a GitHub App token:RELEASE_APP_IDis an Actions variable andRELEASE_APP_PRIVATE_KEYan Actions secret for an App installed on this repository with contents write access and allowed to pushmain. npm publishes without a token, so each published package listspublish.ymlon this repository as a trusted publisher. - A release commit on
mainwhose version some package still lacks on npm is resumed by every later run. When that release can never complete, dispatch with Start a new version checked: the run leaves the release commit alone, takes the next free version from the tip, and the maintainer deprecates whatever the abandoned version did publish. - The OpenClaw and NanoClaw agent images are built and published outside this repository, not by a release here.
- Public design contracts live in
docs/vision.mdanddocs/spec/; seeAGENTS.mdfor package-specific instructions.
Next steps
- Obtain independent review and submit your pull request using the workflow
in
AGENTS.md. - Read the architecture and applicable specifications before changing a package boundary.
- Follow the upgrade guide when deploying a reset release.