docs: add CLAUDE.md for Claude Code guidance#172
Open
ilyamore88 wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new root-level CLAUDE.md intended to give Claude Code instances quick, high-signal guidance for working effectively in this Yarn 4 workspaces monorepo (commands, architecture/dependency rules, testing workflow, and OpenSpec conventions).
Changes:
- Introduces
CLAUDE.mdwith repo-specific commands and per-package workflows (including OT server Docker notes). - Summarizes the layered package architecture and dependency direction expectations.
- Documents testing conventions (co-located Jest specs, should-notation) and spec-driven development workflow (OpenSpec).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| OT server (Docker): create `.env` at repo root with `WSS_PORT=8080`, then `docker compose up`. | ||
|
|
||
| **ESM caveat:** `core` and `ot-server` run Jest under `node --experimental-vm-modules` (baked into their `test` script). If you invoke Jest manually in those packages, keep that flag. |
|
|
||
| - **`model-types`** — foundation layer: shared low-level types, nominal brands, base event classes (`Index`, event classes, `EventBus`). No runtime deps. **Only `model` and `sdk` may depend on it directly.** | ||
| - **`sdk`** — the contract layer (interfaces, `EventBus`, `BlockTool`/`InlineTool`). Re-exports everything from `model`/`model-types` that a tool author legitimately needs. **All tools, plugins, and non-engine packages depend on `sdk`, never on `model` or `model-types` directly.** | ||
| - **`model`** — in-memory document model (`EditorJSModel`, `BlockNode`, `TextNode`, inline-fragments, caret management). The engine backing `EditorJSModel`; consumed directly only by `core` and `ot-server`. No DOM concerns. Free to change internals since it isn't the tool-facing surface. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
CLAUDE.mdat the repo root to give Claude Code instances quick, high-signal guidance when working in this monorepo.Content focuses on what's not trivially discoverable:
yarn build/test/lint) and per-package workflow, including running a single test and the--experimental-vm-modulesESM caveat forcore/ot-server.@editorjs/sdkonly;coreis the sole orchestrator).*.spec.ts/*.integration.spec.ts, TDD, should-notation.Points to
docs/architecture.mdandCONTRIBUTING.mdrather than duplicating them.🤖 Generated with Claude Code