Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# AGENTS.md

## Purpose

Guidance for AI coding agents working in this repository. Follow these rules unless a human explicitly overrides them.

## Architecture Constraints

- Use custom state management via `actionManager`; do not introduce Redux, Zustand, or MobX.
- Perform state updates through `actionManager.dispatch()` only.
- Keep core app state aligned with `AppState` in `src/types.ts`.
- Use Canvas 2D for drawing/rendering flows; do not replace with React DOM drawing.
- Preserve render flow: `Scene -> renderScene() -> canvas context`.
- Do not introduce `react-konva`, `fabric.js`, or `pixi.js`.
- Do not add new npm dependencies without explicit approval.
- Check existing utilities (for example `src/utils/`) before adding external helpers.
Comment on lines +7 to +16
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

⚠️ Секція Architecture Constraints неповна

Наразі описано лише обмеження (constraints), але відсутній огляд основних компонентів системи. За вимогами, Architecture секція має включати:

  • Основні компоненти (Scene, Element, Action system, Canvas renderer)
  • State management підхід (actionManager, AppState flow)
  • Rendering pipeline (детальніше, ніж просто "Scene -> renderScene()")

Поточний вміст — це радше "Architecture Prohibitions", а не повноцінний архітектурний огляд.

♻️ Рекомендація: розширити до Architecture

Перейменуйте та доповніть секцію:

-## Architecture Constraints
+## Architecture
+
+### Core Components
+
+- **Scene** — manages collection of elements and their state
+- **Element** — drawable entities (rectangle, ellipse, arrow, text, etc.)
+- **Action System** — commands that modify state via `actionManager.dispatch()`
+- **Canvas Renderer** — renders elements to Canvas 2D context
+- **State Management** — centralized via `actionManager`, typed in `AppState`
+
+### Rendering Pipeline
+
+`Scene -> renderScene() -> canvas context` — all drawing goes through Canvas 2D API, not React DOM.
+
+### Constraints
 
 - Use custom state management via `actionManager`; do not introduce Redux, Zustand, or MobX.
 - Perform state updates through `actionManager.dispatch()` only.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Architecture Constraints
- Use custom state management via `actionManager`; do not introduce Redux, Zustand, or MobX.
- Perform state updates through `actionManager.dispatch()` only.
- Keep core app state aligned with `AppState` in `src/types.ts`.
- Use Canvas 2D for drawing/rendering flows; do not replace with React DOM drawing.
- Preserve render flow: `Scene -> renderScene() -> canvas context`.
- Do not introduce `react-konva`, `fabric.js`, or `pixi.js`.
- Do not add new npm dependencies without explicit approval.
- Check existing utilities (for example `src/utils/`) before adding external helpers.
## Architecture
### Core Components
- **Scene** — manages collection of elements and their state
- **Element** — drawable entities (rectangle, ellipse, arrow, text, etc.)
- **Action System** — commands that modify state via `actionManager.dispatch()`
- **Canvas Renderer** — renders elements to Canvas 2D context
- **State Management** — centralized via `actionManager`, typed in `AppState`
### Rendering Pipeline
`Scene -> renderScene() -> canvas context` — all drawing goes through Canvas 2D API, not React DOM.
### Constraints
- Use custom state management via `actionManager`; do not introduce Redux, Zustand, or MobX.
- Perform state updates through `actionManager.dispatch()` only.
- Keep core app state aligned with `AppState` in `src/types.ts`.
- Use Canvas 2D for drawing/rendering flows; do not replace with React DOM drawing.
- Preserve render flow: `Scene -> renderScene() -> canvas context`.
- Do not introduce `react-konva`, `fabric.js`, or `pixi.js`.
- Do not add new npm dependencies without explicit approval.
- Check existing utilities (for example `src/utils/`) before adding external helpers.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 7 - 16, Update the "Architecture Constraints" section
into a fuller "Architecture" overview: keep existing constraints but add concise
descriptions of the main components (Scene, Element), the action system
(actionManager and dispatch-only updates), the central app state shape (AppState
and where it lives), and a more detailed rendering pipeline (Scene ->
renderScene() -> canvas context including any update/draw phases, batching or
invalidation strategy, and how Element instances are reconciled), referencing
these symbols (Scene, Element, actionManager, AppState, renderScene, canvas
context) so readers can locate code; preserve the prohibition points (no
redux/konva/etc.) but move them to a "Constraints" subsection under the new
Architecture section.


## Code Conventions

- Use functional components with hooks only; avoid class components.
- Prefer named exports over default exports.
- Keep TypeScript strict; avoid `any` and `@ts-ignore`.
- Prefer `type` over `interface` for simple types.
- Use `import type { X } from "..."` for type-only imports.
- Use `kebab-case` for utility file names and `PascalCase` for component files.
- Keep tests colocated where practical (for example `ComponentName.test.tsx`).

## Protected Files

Do not modify the following files without explicit human approval:

- `src/core/renderer.ts` (render pipeline)
- `src/data/restore.ts` (file format compatibility)
- `src/actions/manager.ts` (action dispatch system)
- `src/types.ts` (core type definitions)

If protected files must change, require:

1. Understanding of dependencies and downstream impact.
2. Running the relevant test suite.
3. Manual verification of behavior.

## Working Style

- Make focused, minimal changes.
- Do not refactor unrelated code.
- Preserve existing behavior unless asked to change it.
- Flag uncertainty and assumptions in your final update.
Comment on lines +1 to +48
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

❌ Файл не відповідає вимогам завдання — бракує обов'язкових секцій

Згідно з вимогами до AGENTS.md, файл має містити мінімум 5 із 7 обов'язкових секцій. Наразі присутні лише 2-3 секції:

Відсутні критичні секції:

  1. Project Overview — необхідний опис суті проєкту Excalidraw (2-5 речень). Що це за проєкт? Whiteboard для малювання діаграм? Collaborative tool?
  2. Tech Stack — має бути перелік: React, TypeScript, Vite, Yarn workspaces, Vitest
  3. Project Structure — опис monorepo layout: packages/, excalidraw-app/, основні директорії
  4. Key Commands — ключові команди: yarn build, yarn test, yarn start, yarn dev тощо

Наявні секції:

  • Conventions (Code Conventions) — добре описано
  • Do-Not-Touch / Constraints (Protected Files) — чітко визначено
  • ⚠️ Architecture (Architecture Constraints) — присутня частково, але описує лише обмеження, без огляду основних компонентів системи

Додатково добре:

  • Working Style секція відображає learnings з пам'яті (focused changes, preserve behavior)
  • Факти коректні: yarn (не npm/pnpm), actionManager, Canvas 2D
📋 Приклад структури для відсутніх секцій

Додайте після секції Purpose:

 ## Purpose
 
 Guidance for AI coding agents working in this repository. Follow these rules unless a human explicitly overrides them.
 
+## Project Overview
+
+Excalidraw is an open-source virtual whiteboard for sketching hand-drawn like diagrams. It supports collaborative editing, export to PNG/SVG, and local-first architecture with optional cloud sync. Built as a React-based canvas editor with a focus on simplicity and user experience.
+
+## Tech Stack
+
+- **Frontend**: React 18+ with TypeScript
+- **Build Tool**: Vite
+- **Package Manager**: Yarn (workspaces enabled)
+- **Testing**: Vitest, React Testing Library
+- **Rendering**: Canvas 2D API
+
+## Project Structure
+
+Monorepo layout:
+- `packages/excalidraw/` — core library (canvas, actions, state)
+- `excalidraw-app/` — web application wrapper
+- `src/` — main source directory (components, actions, utils, types)
+- `src/tests/` — integration and unit tests
+
+## Key Commands
+
+- `yarn install` — install dependencies
+- `yarn start` — dev server (excalidraw-app)
+- `yarn build` — production build
+- `yarn test` — run Vitest suite
+- `yarn test:watch` — watch mode
+- `yarn typecheck` — TypeScript validation
+
 ## Architecture Constraints
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 1 - 48, AGENTS.md is missing required sections; add
four new headings after the Purpose section: "Project Overview" (2–5 sentences
describing Excalidraw as a collaborative whiteboard app), "Tech Stack" (bullet
list including React, TypeScript, Vite, Yarn workspaces, Vitest), "Project
Structure" (short description of the monorepo layout with packages/,
excalidraw-app/, and main directories like src/ and packages/), and "Key
Commands" (list common commands: yarn dev, yarn start, yarn build, yarn test);
ensure headings match the existing style and keep content concise under the
symbols "Project Overview", "Tech Stack", "Project Structure", and "Key
Commands" in AGENTS.md.

65 changes: 65 additions & 0 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# ONBOARDING

## Purpose

This guide helps new contributors (human and AI) work safely in this repository with consistent project rules and Cursor commands.

## Repository Guidance Files

- `AGENTS.md`: repo-wide operating guidance for AI agents.
- `.cursor/rules/*.mdc`: focused, persistent rules that apply by scope (`globs`) or globally (`alwaysApply`).
- `.cursor/commands/*.md`: reusable slash commands for common workflows.

## Quick Start

1. Read `README.md` for project setup and architecture context.
2. Read `AGENTS.md` before making code changes.
3. Review relevant rule files in `.cursor/rules/`.
4. Use commands in `.cursor/commands/` for consistent execution and review.
5. Keep changes minimal, test behavior changes, and document assumptions.

## Current Cursor Rules

- `architecture.mdc`: architecture constraints for project structure and dependencies.
- `conventions.mdc`: code conventions for TypeScript/components.
- `do-not-touch.mdc`: protected files and restrictions.
- `action-manager-state.mdc`: state updates must go through `actionManager.dispatch()`.
- `canvas-rendering.mdc`: rendering must remain on Canvas 2D pipeline.
- `typescript-safety.mdc`: strict typing and type import conventions.
- `module-boundaries.mdc`: package boundaries and utility reuse guidance.
- `testing-requirements.mdc`: tests required for behavior changes.
- `change-scope.mdc`: keep changes focused and minimal.

## Rule Usage Notes

- Rule scope is controlled by front-matter:
- `globs`: where a rule applies (for example `packages/**/*.ts`).
- `alwaysApply`: if `true`, rule applies in every session.
- Keep rules concise and actionable.
- Include a `How to verify` section in rule content for consistency.

## Current Cursor Commands

- `rules-check.md` -> `/rules-check`
- Reviews changes against `AGENTS.md` and all `.cursor/rules/*.mdc`.
- Returns violations, risk level, and a compliance checklist.
- `implement-safe.md` -> `/implement-safe`
- Implements a request with minimal changes while enforcing repository rules.
- Accepts user prompt via `$ARGUMENTS`.

## Recommended Workflow

1. Start with `/implement-safe <your task>`.
2. Apply the smallest correct change.
3. Add/update tests for behavior changes.
4. Run `/rules-check` before finalizing.

## Protected File Reminder

Certain files are protected by policy in `do-not-touch.mdc` and `AGENTS.md`. Any change to protected/core files requires explicit approval plus stronger verification.

## Maintenance

- When adding new `.cursor/rules` files, update this document.
- When adding new `.cursor/commands`, add usage notes here.
- Keep examples and paths aligned with the current monorepo layout.
146 changes: 32 additions & 114 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,124 +1,42 @@
<a href="https://excalidraw.com/" target="_blank" rel="noopener">
<picture>
<source media="(prefers-color-scheme: dark)" alt="Excalidraw" srcset="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github/excalidraw_github_cover_2_dark.png" />
<img alt="Excalidraw" src="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github/excalidraw_github_cover_2.png" />
</picture>
</a>
# Cursor Rules

<h4 align="center">
<a href="https://excalidraw.com">Excalidraw Editor</a> |
<a href="https://plus.excalidraw.com/blog">Blog</a> |
<a href="https://docs.excalidraw.com">Documentation</a> |
<a href="https://plus.excalidraw.com">Excalidraw+</a>
</h4>
This folder is for Cursor rule files (e.g. `RULE.md`) that provide persistent AI guidance within this repository.

<div align="center">
<h2>
An open source virtual hand-drawn style whiteboard. </br>
Collaborative and end-to-end encrypted. </br>
<br />
</h2>
</div>
## Pull Request Placement Rule

<br />
<p align="center">
<a href="https://github.com/excalidraw/excalidraw/blob/master/LICENSE">
<img alt="Excalidraw is released under the MIT license." src="https://img.shields.io/badge/license-MIT-blue.svg" /></a>
<a href="https://www.npmjs.com/package/@excalidraw/excalidraw">
<img alt="npm downloads/month" src="https://img.shields.io/npm/dm/@excalidraw/excalidraw" /></a>
<a href="https://docs.excalidraw.com/docs/introduction/contributing">
<img alt="PRs welcome!" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" /></a>
<a href="https://discord.gg/UexuTaE">
<img alt="Chat on Discord" src="https://img.shields.io/discord/723672430744174682?color=738ad6&label=Chat%20on%20Discord&logo=discord&logoColor=ffffff&widge=false"/></a>
<a href="https://deepwiki.com/excalidraw/excalidraw">
<img alt="Ask DeepWiki" src="https://deepwiki.com/badge.svg" /></a>
<a href="https://twitter.com/excalidraw">
<img alt="Follow Excalidraw on Twitter" src="https://img.shields.io/twitter/follow/excalidraw.svg?label=follow+@excalidraw&style=social&logo=twitter"/></a>
</p>
- Any Cursor-related files included in a Pull Request must be placed under `.cursor/`.
- Rule files must go in `.cursor/rules/`.
- Command files must go in `.cursor/commands/`.

<div align="center">
<figure>
<a href="https://excalidraw.com" target="_blank" rel="noopener">
<img src="https://excalidraw.nyc3.cdn.digitaloceanspaces.com/github%2Fproduct_showcase.png" alt="Product showcase" />
</a>
<figcaption>
<p align="center">
Create beautiful hand-drawn like diagrams, wireframes, or whatever you like.
</p>
</figcaption>
</figure>
</div>
## What Goes In `.cursor/rules/`

## Features
- Files with `.mdc` extension only.
- Persistent project guidance and constraints for AI.
- Rules that define architecture, coding conventions, safety limits, testing expectations, and protected files.
- Rules should use front-matter fields such as `description`, `globs`, and `alwaysApply`.
- Examples:
- `architecture.mdc`
- `conventions.mdc`
- `do-not-touch.mdc`
- `module-boundaries.mdc`
- `change-scope.mdc`
- `canvas-rendering.mdc`
- `action-manager-state.mdc`
- `typescript-safety.mdc`
- `testing-requirements.mdc`

The Excalidraw editor (npm package) supports:
## What Goes In `.cursor/commands/`

- 💯&nbsp;Free & open-source.
- 🎨&nbsp;Infinite, canvas-based whiteboard.
- ✍️&nbsp;Hand-drawn like style.
- 🌓&nbsp;Dark mode.
- 🏗️&nbsp;Customizable.
- 📷&nbsp;Image support.
- 😀&nbsp;Shape libraries support.
- 🌐&nbsp;Localization (i18n) support.
- 🖼️&nbsp;Export to PNG, SVG & clipboard.
- 💾&nbsp;Open format - export drawings as an `.excalidraw` json file.
- ⚒️&nbsp;Wide range of tools - rectangle, circle, diamond, arrow, line, free-draw, eraser...
- ➡️&nbsp;Arrow-binding & labeled arrows.
- 🔙&nbsp;Undo / Redo.
- 🔍&nbsp;Zoom and panning support.
- Files with `.md` extension only.
- Reusable slash command prompts the team can run in Cursor.
- Commands that describe task workflows (for example: implement safely, run compliance review, prepare PR checks).
- Commands can include `$ARGUMENTS` placeholders for user input.
- Examples:
- `rules-check.md` -> `/rules-check`
- `implement-safe.md` -> `/implement-safe`

## Excalidraw.com
## Do Not Mix These

The app hosted at [excalidraw.com](https://excalidraw.com) is a minimal showcase of what you can build with Excalidraw. Its [source code](https://github.com/excalidraw/excalidraw/tree/master/excalidraw-app) is part of this repository as well, and the app features:
- Do not put command prompts in `.cursor/rules/`.
- Do not put `.mdc` rule definitions in `.cursor/commands/`.

- 📡&nbsp;PWA support (works offline).
- 🤼&nbsp;Real-time collaboration.
- 🔒&nbsp;End-to-end encryption.
- 💾&nbsp;Local-first support (autosaves to the browser).
- 🔗&nbsp;Shareable links (export to a readonly link you can share with others).

We'll be adding these features as drop-in plugins for the npm package in the future.

## Quick start

**Note:** following instructions are for installing the Excalidraw [npm package](https://www.npmjs.com/package/@excalidraw/excalidraw) when integrating Excalidraw into your own app. To run the repository locally for development, please refer to our [Development Guide](https://docs.excalidraw.com/docs/introduction/development).

Use `npm` or `yarn` to install the package.

```bash
npm install react react-dom @excalidraw/excalidraw
# or
yarn add react react-dom @excalidraw/excalidraw
```

Check out our [documentation](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/installation) for more details!

## Contributing

- Missing something or found a bug? [Report here](https://github.com/excalidraw/excalidraw/issues).
- Want to contribute? Check out our [contribution guide](https://docs.excalidraw.com/docs/introduction/contributing) or let us know on [Discord](https://discord.gg/UexuTaE).
- Want to help with translations? See the [translation guide](https://docs.excalidraw.com/docs/introduction/contributing#translating).

## Integrations

- [VScode extension](https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor)
- [npm package](https://www.npmjs.com/package/@excalidraw/excalidraw)

## Who's integrating Excalidraw

[Google Cloud](https://googlecloudcheatsheet.withgoogle.com/architecture) • [Meta](https://meta.com/) • [CodeSandbox](https://codesandbox.io/) • [Obsidian Excalidraw](https://github.com/zsviczian/obsidian-excalidraw-plugin) • [Replit](https://replit.com/) • [Slite](https://slite.com/) • [Notion](https://notion.so/) • [HackerRank](https://www.hackerrank.com/) • and many others

## Sponsors & support

If you like the project, you can become a sponsor at [Open Collective](https://opencollective.com/excalidraw) or use [Excalidraw+](https://plus.excalidraw.com/).

## Thank you for supporting Excalidraw

[<img src="https://opencollective.com/excalidraw/tiers/sponsors/0/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/0/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/1/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/1/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/2/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/2/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/3/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/3/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/4/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/4/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/5/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/5/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/6/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/6/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/7/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/7/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/8/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/8/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/9/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/9/website) [<img src="https://opencollective.com/excalidraw/tiers/sponsors/10/avatar.svg?avatarHeight=120"/>](https://opencollective.com/excalidraw/tiers/sponsors/10/website)

<a href="https://opencollective.com/excalidraw#category-CONTRIBUTE" target="_blank"><img src="https://opencollective.com/excalidraw/tiers/backers.svg?avatarHeight=32"/></a>

Last but not least, we're thankful to these companies for offering their services for free:

[![Vercel](./.github/assets/vercel.svg)](https://vercel.com) [![Sentry](./.github/assets/sentry.svg)](https://sentry.io) [![Crowdin](./.github/assets/crowdin.svg)](https://crowdin.com)
18 changes: 18 additions & 0 deletions action-manager-state.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
description: State updates must go through actionManager
globs: packages/**/*.ts,packages/**/*.tsx
alwaysApply: false
---

# State Updates Through actionManager

- Use project state managed by `actionManager`.
- Do not introduce Redux, Zustand, MobX, or ad-hoc global stores.
- Route state changes via `actionManager.dispatch()` only.
- Keep state shape compatible with `AppState`.

## How to verify

- Search changed files for direct state mutation patterns.
- Confirm new state-changing code calls `actionManager.dispatch()`.
- Confirm no new third-party state manager dependency was added.
24 changes: 24 additions & 0 deletions architecture.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
description: Architecture constraints for the project
globs: src/**
alwaysApply: false
---

# Project Architecture

## State Management

- Custom state via actionManager — NOT Redux/Zustand/MobX
- State updates: actionManager.dispatch() ONLY
- State type: AppState (src/types.ts)

## Rendering

- Canvas 2D rendering — NOT React DOM for drawing
- Render pipeline: Scene → renderScene() → canvas context
- DO NOT use react-konva, fabric.js, pixi.js

## Dependencies

- No new npm packages without explicit approval
- Check src/utils/ before adding external helpers
18 changes: 18 additions & 0 deletions canvas-rendering.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
description: Keep rendering on Canvas 2D pipeline
globs: packages/**/*.ts,packages/**/*.tsx
alwaysApply: false
---

# Canvas Rendering Pipeline

- Use Canvas 2D rendering for drawing operations.
- Preserve render flow: `Scene -> renderScene() -> canvas context`.
- Do not switch drawing to React DOM.
- Do not introduce `react-konva`, `fabric.js`, or `pixi.js`.

## How to verify

- Review rendering changes for canvas context usage.
- Confirm no JSX/DOM drawing replacement was added.
- Check `package.json` diff for prohibited rendering dependencies.
17 changes: 17 additions & 0 deletions change-scope.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
description: Keep changes minimal and task-focused
alwaysApply: true
---

# Change Scope Discipline

- Make the smallest change that solves the requested task.
- Avoid broad refactors unless explicitly requested.
- Do not modify protected/core files without explicit approval.
- Call out assumptions and risks when requirements are ambiguous.

## How to verify

- Review diff for unrelated file churn and remove it.
- Confirm changes map directly to the user request.
- Ensure any protected-file edits have explicit approval recorded.
3 changes: 3 additions & 0 deletions conventions.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
alwaysApply: true
---
3 changes: 3 additions & 0 deletions do-not-touch.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
alwaysApply: true
---
16 changes: 16 additions & 0 deletions implement-safe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Implement the request below with minimal, task-focused edits while following `AGENTS.md` and `.cursor/rules/*.mdc`.

Request:
$ARGUMENTS

Execution requirements:
- make the smallest correct change
- avoid unrelated refactors
- do not add new dependencies without explicit approval
- do not modify protected files without explicit approval
- update or add tests when behavior changes

Before finishing, provide:
1. files changed
2. what was verified (tests/lint/typecheck/manual)
3. assumptions or follow-ups
18 changes: 18 additions & 0 deletions module-boundaries.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
description: Respect package boundaries and reuse existing utilities
globs: packages/**/*.ts,packages/**/*.tsx
alwaysApply: false
---

# Module Boundaries

- Reuse existing helpers before creating new utility modules.
- Keep imports scoped to intended package APIs where possible.
- Avoid circular dependencies across packages.
- Keep feature changes localized; do not restructure unrelated modules.

## How to verify

- Review import graph in changed files for new cross-package coupling.
- Confirm no duplicate utility logic was added when equivalents exist.
- Check for newly introduced circular import warnings/errors.
Loading