# AGENTS.md This file provides guidance to AI coding agents working in this repository. ## Core rules - Use `yarn`, not `npm`, for repo commands. This repo uses Yarn workspaces and Yarn 4. - Run commands from the repo root unless a command explicitly says to run from a workspace. - Never run bare `tsc`; use `yarn typecheck` from the repo root. - Prefer targeted checks first. Avoid repo-wide test or e2e runs unless the change needs them. - Keep changes scoped to the request and the affected package. Do not refactor unrelated code. - Respect existing worktree changes. Do not revert user changes unless explicitly asked. - Prefer editing existing files over creating new files. Do not add new documentation files unless requested. - Use sentence case for headings, titles, labels, and documentation text. ## Repo overview This is the tldraw monorepo, an infinite canvas SDK for React applications. It is organized with Yarn workspaces. Core packages: - `packages/editor` - foundational infinite canvas editor with no default shapes, tools, or UI - `packages/tldraw` - complete SDK with default UI, shapes, tools, and interactions - `packages/store` - reactive client-side database, persistence, and migrations - `packages/tlschema` - shape, binding, and record type definitions and validators - `packages/state` - reactive signals library - `packages/sync` and `packages/sync-core` - multiplayer sync packages - `packages/utils` and `packages/validate` - shared utilities and validation helpers - `packages/assets` - icons, fonts, translations, and bundled assets Apps and examples: - `apps/examples` - SDK examples and demos; the main place for example development - `apps/docs` - documentation site at tldraw.dev - `apps/dotcom` - tldraw.com app and workers - `apps/vscode` - VS Code extension - `templates` - starter templates for supported frameworks ## Setup Requires Node `>=22.12.0`. Enable Corepack before installing dependencies: ```bash npm i -g corepack && yarn ``` ## Common commands Development: - `yarn dev` - start the examples app at localhost:5420 - `yarn dev-app` - start the tldraw.com client app - `yarn dev-docs` - start the docs site - `yarn dev-vscode` - start VS Code extension development - `yarn dev-template