Skip to content

docs: add CLAUDE.md for Claude Code guidance#172

Open
ilyamore88 wants to merge 1 commit into
mainfrom
feature/claude-init
Open

docs: add CLAUDE.md for Claude Code guidance#172
ilyamore88 wants to merge 1 commit into
mainfrom
feature/claude-init

Conversation

@ilyamore88

Copy link
Copy Markdown
Member

Summary

Adds a CLAUDE.md at 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:

  • Commands — root fan-out (yarn build/test/lint) and per-package workflow, including running a single test and the --experimental-vm-modules ESM caveat for core/ot-server.
  • Architecture — the layered package graph and its dependency rules (tools depend on @editorjs/sdk only; core is the sole orchestrator).
  • Testing — co-located *.spec.ts/*.integration.spec.ts, TDD, should-notation.
  • OpenSpec — the spec-driven workflow and when a change proposal is required.
  • Conventions — Conventional Commits, doc/diagram sync.

Points to docs/architecture.md and CONTRIBUTING.md rather than duplicating them.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md with 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.

Comment thread CLAUDE.md

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.
Comment thread CLAUDE.md

- **`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants