| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 6 | 8 | 0% |
| Commands | 0 | 4 | 1 | 0% |
| Section tags | 1 | 2 | 2 | 20% |
What each file covers
Sections
0 shared · 6 only in A · 8 only in B- − CLAUDE.md
- − Project Structure
- − Development Workflow
- − Development Commands
- − Architecture Notes
- − Package System
- + Project coding standards
- + Generic Communication Guidelines
- + TypeScript Guidelines
- + React Guidelines
- + Naming Conventions
- + Error Handling
- + Testing
- + Types
Commands
0 shared · 4 only in A · 1 only in B- − yarn test:typecheck
- − yarn test:update
- − yarn fix
- − vitest.config.mts
- + yarn test:app
Section tags
1 shared · 2 only in A · 2 only in B- − architecture
- − agent-behaviour
- + code-style
- + types
- test
Line diff
excalidraw/excalidraw · CLAUDE.md
@@ −1 @@
1# CLAUDE.md
2
3## Project Structure
4
5Excalidraw is a **monorepo** with a clear separation between the core library and the application:
6
7- **`packages/excalidraw/`** - Main React component library published to npm as `@excalidraw/excalidraw`
8- **`excalidraw-app/`** - Full-featured web application (excalidraw.com) that uses the library
9- **`packages/`** - Core packages: `@excalidraw/common`, `@excalidraw/element`, `@excalidraw/math`, `@excalidraw/utils`
10- **`examples/`** - Integration examples (NextJS, browser script)
11
12## Development Workflow
13
141. **Package Development**: Work in `packages/*` for editor features
152. **App Development**: Work in `excalidraw-app/` for app-specific features
163. **Testing**: Always run `yarn test:update` before committing
174. **Type Safety**: Use `yarn test:typecheck` to verify TypeScript
18
19## Development Commands
20
21```bash
22yarn test:typecheck # TypeScript type checking
23yarn test:update # Run all tests (with snapshot updates)
24yarn fix # Auto-fix formatting and linting issues
25```
26
27## Architecture Notes
28
29### Package System
30
31- Uses Yarn workspaces for monorepo management
32- Internal packages use path aliases (see `vitest.config.mts`)
33- Build system uses esbuild for packages, Vite for the app
34- TypeScript throughout with strict configuration
35
excalidraw/excalidraw · .github/copilot-instructions.md
@@ +1 @@
1# Project coding standards
2
3## Generic Communication Guidelines
4
5- Be succint and be aware that expansive generative AI answers are costly and slow
6- Avoid providing explanations, trying to teach unless asked for, your chat partner is an expert
7- Stop apologising if corrected, just provide the correct information or code
8- Prefer code unless asked for explanation
9- Stop summarizing what you've changed after modifications unless asked for
10
11## TypeScript Guidelines
12
13- Use TypeScript for all new code
14- Where possible, prefer implementations without allocation
15- When there is an option, opt for more performant solutions and trade RAM usage for less CPU cycles
16- Prefer immutable data (const, readonly)
17- Use optional chaining (?.) and nullish coalescing (??) operators
18
19## React Guidelines
20
21- Use functional components with hooks
22- Follow the React hooks rules (no conditional hooks)
23- Keep components small and focused
24- Use CSS modules for component styling
25
26## Naming Conventions
27
28- Use PascalCase for component names, interfaces, and type aliases
29- Use camelCase for variables, functions, and methods
30- Use ALL_CAPS for constants
31
32## Error Handling
33
34- Use try/catch blocks for async operations
35- Implement proper error boundaries in React components
36- Always log errors with contextual information
37
38## Testing
39
40- Always attempt to fix #problems
41- Always offer to run `yarn test:app` in the project root after modifications are complete and attempt fixing the issues reported
42
43## Types
44
45- Always include `packages/math/src/types.ts` in the context when your write math related code and always use the Point type instead of { x, y}
46
@@ −1 +1 @@
1−# CLAUDE.md
1+# Project coding standards
22
3−## Project Structure
3+## Generic Communication Guidelines
44
5−Excalidraw is a **monorepo** with a clear separation between the core library and the application:
5+- Be succint and be aware that expansive generative AI answers are costly and slow
6+- Avoid providing explanations, trying to teach unless asked for, your chat partner is an expert
7+- Stop apologising if corrected, just provide the correct information or code
8+- Prefer code unless asked for explanation
9+- Stop summarizing what you've changed after modifications unless asked for
610
7−- **`packages/excalidraw/`** - Main React component library published to npm as `@excalidraw/excalidraw`
8−- **`excalidraw-app/`** - Full-featured web application (excalidraw.com) that uses the library
9−- **`packages/`** - Core packages: `@excalidraw/common`, `@excalidraw/element`, `@excalidraw/math`, `@excalidraw/utils`
10−- **`examples/`** - Integration examples (NextJS, browser script)
11+## TypeScript Guidelines
1112
12−## Development Workflow
13+- Use TypeScript for all new code
14+- Where possible, prefer implementations without allocation
15+- When there is an option, opt for more performant solutions and trade RAM usage for less CPU cycles
16+- Prefer immutable data (const, readonly)
17+- Use optional chaining (?.) and nullish coalescing (??) operators
1318
14−1. **Package Development**: Work in `packages/*` for editor features
15−2. **App Development**: Work in `excalidraw-app/` for app-specific features
16−3. **Testing**: Always run `yarn test:update` before committing
17−4. **Type Safety**: Use `yarn test:typecheck` to verify TypeScript
19+## React Guidelines
1820
19−## Development Commands
21+- Use functional components with hooks
22+- Follow the React hooks rules (no conditional hooks)
23+- Keep components small and focused
24+- Use CSS modules for component styling
2025
21−```bash
22−yarn test:typecheck # TypeScript type checking
23−yarn test:update # Run all tests (with snapshot updates)
24−yarn fix # Auto-fix formatting and linting issues
25−```
26+## Naming Conventions
2627
27−## Architecture Notes
28+- Use PascalCase for component names, interfaces, and type aliases
29+- Use camelCase for variables, functions, and methods
30+- Use ALL_CAPS for constants
2831
29−### Package System
32+## Error Handling
3033
31−- Uses Yarn workspaces for monorepo management
32−- Internal packages use path aliases (see `vitest.config.mts`)
33−- Build system uses esbuild for packages, Vite for the app
34−- TypeScript throughout with strict configuration
34+- Use try/catch blocks for async operations
35+- Implement proper error boundaries in React components
36+- Always log errors with contextual information
37+
38+## Testing
39+
40+- Always attempt to fix #problems
41+- Always offer to run `yarn test:app` in the project root after modifications are complete and attempt fixing the issues reported
42+
43+## Types
44+
45+- Always include `packages/math/src/types.ts` in the context when your write math related code and always use the Point type instead of { x, y}
3546
