Skip to content

Added rules and commands, A/B rule tesing results#7

Open
andriiyanchak wants to merge 4 commits intokoldovsky:masterfrom
andriiyanchak:master
Open

Added rules and commands, A/B rule tesing results#7
andriiyanchak wants to merge 4 commits intokoldovsky:masterfrom
andriiyanchak:master

Conversation

@andriiyanchak
Copy link
Copy Markdown

@andriiyanchak andriiyanchak commented Apr 8, 2026

Day 2: Workshop Assignment

Учасник:

Чеклист

  • Мінімум 6 правил у .cursor/rules/ (кожне з секцією "How to verify")
  • Мінімум 2 custom commands у .cursor/commands/
  • A/B валідація — задокументовано тестовий сценарій, обидва результати та висновок
  • AGENTS.md — заповнений повністю (контекст проєкту, команди, архітектура, конвенції)
  • yarn build проходить успішно

Бонус (необов'язково)

  • Налаштовано MCP-сервер (GitHub, Context7 або Browser) — скріншот або опис використання
  • Згенеровано reference-skill через npx repomix --skill-generate
  • .cursorrules — legacy-формат правил для Cursor

Нотатки

Було цікаво бачити як агент створюючи рули постійно намагався їх покращити після створення чи едіту, бо це було задано в промпті.
Ще цікавим моментом була валідація, я додав задокументований результат як докс мд файл, однак в самій IDE з рулом та без він дійсно генерував код та думав по різному, що було видно з відповідей. Цікава штука, що навіть не знаючи проекту можна почати створювати до нього рули, і вже вивчати його починаючи з цього.

Summary by CodeRabbit

Примітки до випуску

  • Документація
    • Додано внутрішні посібники для розробників, що описують найкращі практики для реалізації функцій, тестування, управління станом та інтеграції з монорепозиторієм.
    • Додано правила конфігурації для забезпечення узгодженості при роботі з компонентами, рендерингом, моделями елементів та імпортами.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

🚥 Pre-merge checks | ✅ 5 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Назва PR не відповідає вимогам формату. Очікується: «Day 2: <ім'я-учасника> — Workshop Assignment», а надана: «Added rules and commands, A/B rule tesing results». Змініть назву PR на: «Day 2: andriiyanchak — Workshop Assignment» або подібну за форматом, що явно вказує на день, учасника та завдання воркшопу.
Agents.Md Complete ⚠️ Warning ❌ Файл названий AGENT.md замість AGENTS.md. Вміст відповідає, але назва файлу не збігається з вимогами чеклісту. Перейменуй файл: git mv AGENT.md AGENTS.md → оновлення коміту → push. Перевір внутрішні посилання на AGENTS.md у PR.
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Minimum 6 Rules ✅ Passed PR містить 11 файлів правил у .cursor/rules/ з clear описами, розділами "## How to verify" та Excalidraw-контентом; security-правило та module-scoping присутні.
Minimum 2 Custom Commands ✅ Passed PR успішно містить 11 custom command файлів у .cursor/commands/ з релевантним контентом для Excalidraw-розробки.
A/B Validation Document ✅ Passed PR містить A/B validation документ з усіма 5 обов'язковими елементами: правилом, сценарієм, Result A, Result B та висновком про ефективність.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Відповідь (українською)

Прогулянка

Додано 16 нових документаційних файлів у директорії .cursor/ — інструкції для розробників щодо поширених робочих процесів (додавання локалізації, налаштування тестів, отримання рецензій) та правила для AI-асистента щодо кодових конвенцій (дії, колаб, рендеринг, типи). Жодних змін у коді або експортованих сутностях.

Зміни

Когорта / Файл(и) Резюме
Команди розробника (Cursor commands)
.cursor/commands/add-locale-string.md, .cursor/commands/app-only-feature.md, .cursor/commands/debug-collab.md, .cursor/commands/element-schema-change.md, .cursor/commands/new-action.md, .cursor/commands/new-vitest-excalidraw.md, .cursor/commands/pre-pr-check.md, .cursor/commands/rendering-change.md, .cursor/commands/restore-migration.md, .cursor/commands/size-budget.md, .cursor/commands/update-state-flow.md
11 нових інструкцій щодо поширених робочих процесів: локалізація, тестування, рецензування PR, отладження колаб, зміни рендеринга, елементи, дії, міграції. Кожна містить чеклист, посилання на код та команди перевірки.
Правила Cursor (Cursor rules)
.cursor/rules/excalidraw-actions-state.mdc, .cursor/rules/excalidraw-app-integration.mdc, .cursor/rules/excalidraw-canvas-components.mdc, .cursor/rules/excalidraw-data-collab.mdc, .cursor/rules/excalidraw-element-model.mdc, .cursor/rules/excalidraw-monorepo.mdc, .cursor/rules/excalidraw-rendering.mdc, .cursor/rules/excalidraw-testing.mdc, .cursor/rules/excalidraw-typescript-imports.mdc, .cursor/rules/excalidraw-ui-app.mdc, .cursor/rules/excalidraw-ui.mdc
11 нових правил для асистента з метаданими про область дії, мету та директиви верифікації. Охоплюють дії, елементи, рендеринг, колаб, конвенції імпортів, тестування та опис архітектури UI.

Оцінка зусиль на рецензування

🎯 1 (Тривіальна) | ⏱️ ~3 хвилини


Зауваження ✅

✅ Охоплення — Документація досить повна й охоплює критичні робочі процеси.

⚠️ Внутрішня узгодженість — Деякі посилання на поведінку (наприклад, у update-state-flow.md та окремих правилах) варто було б звірити з реальною базою. Немає очевидних суперечностей, але глибока перевірка чи всі чеклисти відповідають поточному стану коду — не входила в обсяг аналізу.

✅ Структура — Логічне розділення на команди (як) та правила (що слід дотримуватися). Ясна мета кожного файлу.

⚠️ Актуальність посилань — Кілька посилань на конкретні файли (наприклад, packages/excalidraw/data/restore.ts, reconcile.ts) слід звірити з поточною структурою репозиторію за потреби.

Загалом — це якісна документаційна база для командної розроблення. Проте рекомендую переглянути узгодженість між дописаними інструкціями та реальним кодом у наступному цикліі PR.

🚥 Pre-merge checks | ✅ 5 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Назва PR не відповідає вимогам формату. Очікується: «Day 2: <ім'я-учасника> — Workshop Assignment», а надана: «Added rules and commands, A/B rule tesing results». Змініть назву PR на: «Day 2: andriiyanchak — Workshop Assignment» або подібну за форматом, що явно вказує на день, учасника та завдання воркшопу.
Agents.Md Complete ⚠️ Warning ❌ Файл названий AGENT.md замість AGENTS.md. Вміст відповідає, але назва файлу не збігається з вимогами чеклісту. Перейменуй файл: git mv AGENT.md AGENTS.md → оновлення коміту → push. Перевір внутрішні посилання на AGENTS.md у PR.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Minimum 6 Rules ✅ Passed PR містить 11 файлів правил у .cursor/rules/ з clear описами, розділами "## How to verify" та Excalidraw-контентом; security-правило та module-scoping присутні.
Minimum 2 Custom Commands ✅ Passed PR успішно містить 11 custom command файлів у .cursor/commands/ з релевантним контентом для Excalidraw-розробки.
A/B Validation Document ✅ Passed PR містить A/B validation документ з усіма 5 обов'язковими елементами: правилом, сценарієм, Result A, Result B та висновком про ефективність.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.cursor/commands/add-locale-string.md:
- Around line 1-34: Add a short concrete example block to
.cursor/commands/add-locale-string.md showing a minimal end-to-end usage: show
an "Input" (e.g. the new translation key and English string), "Changes in files"
listing the JSON file under packages/excalidraw/locales/ (e.g. en.json) and the
component file where useI18n and t("your.key") are used, and an "Expected
result" or small example diff illustrating the inserted JSON key and the
component call; reference the existing guidance symbols useI18n, t("your.key"),
and packages/excalidraw/locales/en.json so reviewers can locate where to add the
example.

In @.cursor/commands/rendering-change.md:
- Line 39: У файлі, де є розділ "See also", замінити відносний короткий лінк
`excalidraw-canvas-components.mdc` на уніфікований повний шлях
`.cursor/rules/excalidraw-canvas-components.mdc` так само як в інших записах
(перевірити та оновити файл `excalidraw-canvas-components.mdc` посилання в
секції "See also" і привести формат лінку в відповідність з
`dev-docs/docs/a-docs/01-architecture-overview.md` і
`.cursor/rules/excalidraw-rendering.mdc`).

In @.cursor/commands/update-state-flow.md:
- Line 110: The "See also" list in .cursor/commands/update-state-flow.md mixes
full paths and short rule names; update the entries so all referenced rules use
the full path prefix (e.g., change excalidraw-element-model.mdc,
excalidraw-data-collab.mdc, excalidraw-typescript-imports.mdc to
.cursor/rules/excalidraw-element-model.mdc,
.cursor/rules/excalidraw-data-collab.mdc,
.cursor/rules/excalidraw-typescript-imports.mdc) so every item consistently
includes the .cursor/rules/ prefix.
- Around line 1-109: Add a short "Приклад використання / Очікуваний результат"
block under the main heading "Update editor state (actions & related
touchpoints)" (or at the end of section 1) that gives one minimal concrete
example: the triggering action (e.g., "run actionYourFeature via
ActionManager"), the expected artifact in PR (e.g., "new action file
actionYourFeature.ts, exported in actions/index.ts, includes captureUpdate"),
and one-line expected test/snapshot to validate; keep it 2–4 bullets or 2–3
sentences in Ukrainian to match the doc language.

In @.cursor/rules/excalidraw-canvas-components.mdc:
- Around line 7-12: The rule contains a non-domain debug instruction that forces
printing "RULE excalidraw-canvas-components APPLIED 🖼️" at the start of every
reply; remove that debug paragraph from the rule body (the "For transcript
debugging: ... RULE excalidraw-canvas-components APPLIED 🖼️" lines) so the rule
only contains Excalidraw-specific guidance, or alternatively convert it into a
non-output debug flag (e.g., an internal comment or metadata field) that does
not inject text into user responses; ensure the rule named
excalidraw-canvas-components only prescribes component behavior and not forced
reply text.

In @.cursor/rules/excalidraw-data-collab.mdc:
- Around line 9-13: Remove the forced debug insertion "RULE
excalidraw-data-collab APPLIED 🔐" from the rule body and replace it with a
concise Excalidraw-specific instruction; specifically edit the rule named
"excalidraw-data-collab" to eliminate any requirement that the assistant print a
fixed debug line at the start of replies and instead embed the debugging
guidance as an internal rule comment or non-output metadata so it does not alter
assistant response formatting.

In @.cursor/rules/excalidraw-element-model.mdc:
- Around line 9-13: Remove the debug-trigger text "For transcript debugging..."
and the exact instruction line 'RULE excalidraw-element-model APPLIED 🧱' from
the rule body so the rule does not alter reply formatting; instead ensure the
rule text (excalidraw-element-model) describes only concrete guidance about
Excalidraw element modeling and expected changes in packages/element, with no
instructions that affect agent output or debugging behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 383859e6-162e-42c2-85b9-52275ca3ad7d

📥 Commits

Reviewing files that changed from the base of the PR and between 63f111c and 82f00c2.

⛔ Files ignored due to path filters (12)
  • AGENT.md is excluded by none and included by none
  • dev-docs/docs/a-docs/01-architecture-overview.md is excluded by none and included by none
  • dev-docs/docs/a-docs/02-local-setup.md is excluded by none and included by none
  • dev-docs/docs/a-docs/03-codebase-navigation.md is excluded by none and included by none
  • dev-docs/docs/a-docs/04-key-business-flows.md is excluded by none and included by none
  • dev-docs/docs/a-docs/05-important-components.md is excluded by none and included by none
  • dev-docs/docs/a-docs/06-testing-guide.md is excluded by none and included by none
  • dev-docs/docs/a-docs/07-common-pitfalls.md is excluded by none and included by none
  • dev-docs/docs/a-docs/08-adding-features.md is excluded by none and included by none
  • dev-docs/docs/a-docs/09-tldr-new-devs.md is excluded by none and included by none
  • dev-docs/docs/a-docs/README.md is excluded by none and included by none
  • dev-docs/docs/rule-validation/excalidraw-element-model-ab-validation.md is excluded by none and included by none
📒 Files selected for processing (22)
  • .cursor/commands/add-locale-string.md
  • .cursor/commands/app-only-feature.md
  • .cursor/commands/debug-collab.md
  • .cursor/commands/element-schema-change.md
  • .cursor/commands/new-action.md
  • .cursor/commands/new-vitest-excalidraw.md
  • .cursor/commands/pre-pr-check.md
  • .cursor/commands/rendering-change.md
  • .cursor/commands/restore-migration.md
  • .cursor/commands/size-budget.md
  • .cursor/commands/update-state-flow.md
  • .cursor/rules/excalidraw-actions-state.mdc
  • .cursor/rules/excalidraw-app-integration.mdc
  • .cursor/rules/excalidraw-canvas-components.mdc
  • .cursor/rules/excalidraw-data-collab.mdc
  • .cursor/rules/excalidraw-element-model.mdc
  • .cursor/rules/excalidraw-monorepo.mdc
  • .cursor/rules/excalidraw-rendering.mdc
  • .cursor/rules/excalidraw-testing.mdc
  • .cursor/rules/excalidraw-typescript-imports.mdc
  • .cursor/rules/excalidraw-ui-app.mdc
  • .cursor/rules/excalidraw-ui.mdc

Comment on lines +1 to +34
# Add locale string (i18n)

Use for **user-visible** text in the **library** (`packages/excalidraw`), not hardcoded English.

## 1. Pick a key

- Prefer existing namespaces: **`labels.*`**, **`toolBar.*`**, **`hints.*`**, etc. — follow keys near similar UI in `packages/excalidraw/locales/` (e.g. `en.json`).

## 2. Add English source

- Edit the appropriate locale JSON under **`packages/excalidraw/locales/`** (start from **`en.json`** or the pattern used for your language).
- Keep placeholders consistent with existing messages (`{variable}` style if the codebase uses interpolation — match siblings).

## 3. Use in UI

- Import **`useI18n`** from `../i18n` (or the established relative path from the component).
- Call **`const { t } = useI18n()`** and use **`t("your.key")`** for labels, titles, buttons, tooltips.

## 4. Actions

- Action **`label`** (and **`keywords`**) should use **translation keys**, not raw English strings, when exposed in menus/command palette.

## 5. Crowdin

- Project translations are managed via **Crowdin** (per project docs); adding keys in English is the usual first step; translators pick up new keys there.

## Do not

- Hardcode user-facing strings in **`packages/excalidraw/components/`** for production UI.
- For **`excalidraw-app/`**-only UI, follow existing app patterns (some strings may be app-specific — mirror nearby files).

## See also

`dev-docs/docs/a-docs/08-adding-features.md`, `.cursor/rules/excalidraw-ui.mdc`.
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 | 🟡 Minor

⚠️ Додай явний приклад використання або очікуваний результат команди.

Інструкція сильна, але бракує короткого блоку на кшталт “Input → зміни у файлах → expected diff/результат”, щоб команда була завершеною за чеклістом.

As per coding guidelines ".cursor/commands/*.md: 4) Приклади використання або очікуваний результат описані".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/commands/add-locale-string.md around lines 1 - 34, Add a short
concrete example block to .cursor/commands/add-locale-string.md showing a
minimal end-to-end usage: show an "Input" (e.g. the new translation key and
English string), "Changes in files" listing the JSON file under
packages/excalidraw/locales/ (e.g. en.json) and the component file where useI18n
and t("your.key") are used, and an "Expected result" or small example diff
illustrating the inserted JSON key and the component call; reference the
existing guidance symbols useI18n, t("your.key"), and
packages/excalidraw/locales/en.json so reviewers can locate where to add the
example.


## See also

`dev-docs/docs/a-docs/01-architecture-overview.md` (rendering), `.cursor/rules/excalidraw-rendering.mdc`, `excalidraw-canvas-components.mdc`.
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 | 🟡 Minor

⚠️ Уніфікуй шлях у See also для стабільної навігації.

excalidraw-canvas-components.mdc краще вказати повним шляхом (.cursor/rules/excalidraw-canvas-components.mdc), як інші посилання.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/commands/rendering-change.md at line 39, У файлі, де є розділ "See
also", замінити відносний короткий лінк `excalidraw-canvas-components.mdc` на
уніфікований повний шлях `.cursor/rules/excalidraw-canvas-components.mdc` так
само як в інших записах (перевірити та оновити файл
`excalidraw-canvas-components.mdc` посилання в секції "See also" і привести
формат лінку в відповідність з
`dev-docs/docs/a-docs/01-architecture-overview.md` і
`.cursor/rules/excalidraw-rendering.mdc`).

Comment on lines +1 to +109
# Update editor state (actions & related touchpoints)

Use this flow when adding or changing **how the Excalidraw editor state is updated** (elements, `AppState`, files, undo/redo, shortcuts, or reactive UI). Follow branches that apply; skip the rest.

## 0. Classify the change

| Need | Primary path |
|------|----------------|
| User-triggered change (menu, shortcut, toolbar, command palette) | **Action** + `ActionManager` |
| New/changed field on a **drawing element** | **`@excalidraw/element`** types + factories + **`restore`** + often renderer/export |
| New/changed **editor chrome** state (tool, zoom, selection flags, …) | **`AppState`** / `types.ts` + **`appState.ts`** defaults + readers (hooks / UI) |
| Shared **reactive** UI state (panels, library, collab handles) | **Jotai** via `editor-jotai.ts` or `excalidraw-app/app-jotai.ts` |
| Behavior during **pointer / drag / tool** lifecycle | **`App.tsx`** handlers (keep small; prefer actions for pure state transforms) |
| **Binary attachments** (images, …) | `ActionResult.files`, `replaceFiles`; align with existing file APIs |

State is **not** a single Redux store: it combines **`AppState` + elements**, **Jotai** atoms, **`Scene`**, and **History** deltas.

---

## 1. New or changed **action** (most common)

`ActionResult` shape (see `packages/excalidraw/actions/types.ts`):

- `elements` — new element array or omit/null per existing patterns
- `appState` — partial `AppState` updates
- `files` / `replaceFiles` — when binary files change
- `captureUpdate` — **required**; controls **undo/redo** (`CaptureUpdateAction` from `@excalidraw/element`). Match a similar existing action.
- Return **`false`** to no-op.

**Steps:**

1. Add `packages/excalidraw/actions/actionYourFeature.ts` (or `.tsx`) using `register()` like sibling `action*.ts` files.
2. Implement `perform(elements, appState, formData, app)` → `ActionResult` or `false`.
3. Optional: `keyTest`, `predicate`, `PanelComponent`, `trackEvent`, icons — mirror nearby actions.
4. **Export** the action from `packages/excalidraw/actions/index.ts` (required for registration).
5. If it needs a **shortcut**, update `packages/excalidraw/actions/shortcuts.ts` and/or wire UI in the relevant component (`Actions.tsx`, menus, command palette).
6. **Tests:** `packages/excalidraw/actions/actionYourFeature.test.tsx` using `tests/test-utils`, `API`, `Keyboard`, etc.
7. Run `yarn test:typecheck`, `yarn test:update` if snapshots change, `yarn fix`.

**Imports:** `import type` for types; inside `packages/excalidraw` do not import from the package barrel `index.tsx`. Jotai only from `editor-jotai.ts` / `app-jotai.ts`.

---

## 2. New **element** field or behavior

1. **`packages/element/src/types.ts`** — extend the right element / base type.
2. **`packages/element/src/newElement.ts`** (and any focused factories) — defaults for new elements.
3. **`packages/excalidraw/data/restore.ts`** — migrations / defaults for loaded or pasted data.
4. If it affects appearance or export: **`packages/excalidraw/renderer/staticScene.ts`**, **`staticSvgScene.ts`**, and **`scene/export.ts`** as needed.
5. **Immutability:** use **`mutateElement`** (and version discipline); never mutate element objects in place.
6. **Collaboration:** reconcile uses **version**; test concurrent edits if z-order or structure changes (`packages/excalidraw/data/reconcile.ts`).

---

## 3. New **`AppState` / UI editor state** field

1. **`packages/excalidraw/types.ts`** — `AppState` / `UIAppState` (or relevant subsection).
2. **`packages/excalidraw/appState.ts`** — default value and any reset paths.
3. Update **readers** (hooks like `useAppStateValue`, components, `App.tsx`) and any **serialization** if the field must persist (JSON / localStorage / share link) — follow how similar fields are saved in `data/json.ts` and app `LocalData` if applicable.

---

## 4. **Jotai** (reactive UI, not the canvas element array)

- Library/editor scope: **`packages/excalidraw/editor-jotai.ts`**.
- Hosted app scope: **`excalidraw-app/app-jotai.ts`**.
- Do not import `jotai` directly in feature code.

Use atoms for UI that many components subscribe to; keep **elements** and core **`AppState`** updates flowing through **actions** when the change must be **undoable** and consistent with the rest of the editor.

---

## 5. **Pointer / tool** wiring

If the change starts from canvas interaction:

- **`packages/excalidraw/components/App.tsx`** — `handleCanvasPointerDown` / `Move` / `Up` (and related). Prefer delegating the final state commit to an **action** or shared helper so `perform` stays testable.
- New **tool type**: `ActiveTool` in `types.ts`, toolbar UI, shortcuts, and `App.tsx` tool branches (see `dev-docs/docs/a-docs/08-adding-features.md`).

---

## 6. **History (undo/redo)**

- Incorrect **`captureUpdate`** breaks undo/redo or records noise.
- History uses **deltas**; avoid assumptions that break after **collab reconcile**.

---

## 7. **Persistence, export, collab**

- **JSON / clipboard / share:** `packages/excalidraw/data/json.ts`, `blob.ts`, app `data/` for backend.
- **Collaboration:** `excalidraw-app/collab/` + **`reconcileElements`**; encryption keys stay in URL **hash**.

---

## 8. Checklist before PR

- [ ] Types and defaults updated (`types.ts`, `appState.ts`, `newElement.ts`, `restore.ts` as needed)
- [ ] Action exported in `actions/index.ts` with correct `captureUpdate`
- [ ] Shortcuts / UI entry points wired
- [ ] Renderer / export updated if visual or SVG/PNG output changes
- [ ] Tests added or updated; `yarn test:update` if snapshots intentional
- [ ] `yarn test:typecheck` and `yarn fix`
- [ ] User-visible strings use **`locales/`** (library UI)

## Reference docs & rules

- `dev-docs/docs/a-docs/08-adding-features.md`
- `dev-docs/docs/a-docs/04-key-business-flows.md`
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 | 🟡 Minor

⚠️ Додай короткий блок “Приклад використання / Очікуваний результат”.

Документ дуже сильний, але для вимоги command-файлів бракує явного, швидкого прикладу: коли запускати і який мінімальний артефакт очікується у PR.

As per coding guidelines ".cursor/commands/*.md: 4) Приклади використання або очікуваний результат описані".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/commands/update-state-flow.md around lines 1 - 109, Add a short
"Приклад використання / Очікуваний результат" block under the main heading
"Update editor state (actions & related touchpoints)" (or at the end of section
1) that gives one minimal concrete example: the triggering action (e.g., "run
actionYourFeature via ActionManager"), the expected artifact in PR (e.g., "new
action file actionYourFeature.ts, exported in actions/index.ts, includes
captureUpdate"), and one-line expected test/snapshot to validate; keep it 2–4
bullets or 2–3 sentences in Ukrainian to match the doc language.


- `dev-docs/docs/a-docs/08-adding-features.md`
- `dev-docs/docs/a-docs/04-key-business-flows.md`
- `.cursor/rules/excalidraw-actions-state.mdc`, `excalidraw-element-model.mdc`, `excalidraw-data-collab.mdc`, `excalidraw-typescript-imports.mdc`
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 | 🟡 Minor

⚠️ Уніфікуй See also з повними шляхами.

Після першого елемента йдуть скорочені імена правил без .cursor/rules/, краще зробити формат однаковим для швидкого переходу.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/commands/update-state-flow.md at line 110, The "See also" list in
.cursor/commands/update-state-flow.md mixes full paths and short rule names;
update the entries so all referenced rules use the full path prefix (e.g.,
change excalidraw-element-model.mdc, excalidraw-data-collab.mdc,
excalidraw-typescript-imports.mdc to .cursor/rules/excalidraw-element-model.mdc,
.cursor/rules/excalidraw-data-collab.mdc,
.cursor/rules/excalidraw-typescript-imports.mdc) so every item consistently
includes the .cursor/rules/ prefix.

Comment on lines +7 to +12
## Important (debug)

For transcript debugging: **when this rule is in your context for the user’s message**, print this exact line once at the **start** of your reply as **plain text** (no backticks, no code fence), then continue:

RULE excalidraw-canvas-components APPLIED 🖼️

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

❌ Прибери debug-інструкцію, що змушує друкувати службовий рядок у відповіді.

На Line 9-12 правило додає не-доменну поведінку (примусовий текст на старті reply), що псує UX і виходить за межі Excalidraw-conventions.

Пропонований мінімальний diff
-## Important (debug)
-
-For transcript debugging: **when this rule is in your context for the user’s message**, print this exact line once at the **start** of your reply as **plain text** (no backticks, no code fence), then continue:
-
-RULE excalidraw-canvas-components APPLIED 🖼️

As per coding guidelines ".cursor/rules/*.mdc: Тіло правила конкретне та стосується Excalidraw (не generic 'write clean code')".

📝 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
## Important (debug)
For transcript debugging: **when this rule is in your context for the user’s message**, print this exact line once at the **start** of your reply as **plain text** (no backticks, no code fence), then continue:
RULE excalidraw-canvas-components APPLIED 🖼️
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/rules/excalidraw-canvas-components.mdc around lines 7 - 12, The rule
contains a non-domain debug instruction that forces printing "RULE
excalidraw-canvas-components APPLIED 🖼️" at the start of every reply; remove
that debug paragraph from the rule body (the "For transcript debugging: ... RULE
excalidraw-canvas-components APPLIED 🖼️" lines) so the rule only contains
Excalidraw-specific guidance, or alternatively convert it into a non-output
debug flag (e.g., an internal comment or metadata field) that does not inject
text into user responses; ensure the rule named excalidraw-canvas-components
only prescribes component behavior and not forced reply text.

Comment on lines +9 to +13
## Important (debug)

For transcript debugging: **when this rule is in your context for the user’s message**, print this exact line once at the **start** of your reply as **plain text** (no backticks, no code fence), then continue:

RULE excalidraw-data-collab APPLIED 🔐
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

❌ Debug-вставку з примусовим текстом у reply треба прибрати.

На Line 11-13 правило змінює формат відповіді помічника замість регламентації роботи з кодом.

As per coding guidelines ".cursor/rules/*.mdc: Тіло правила конкретне та стосується Excalidraw".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/rules/excalidraw-data-collab.mdc around lines 9 - 13, Remove the
forced debug insertion "RULE excalidraw-data-collab APPLIED 🔐" from the rule
body and replace it with a concise Excalidraw-specific instruction; specifically
edit the rule named "excalidraw-data-collab" to eliminate any requirement that
the assistant print a fixed debug line at the start of replies and instead embed
the debugging guidance as an internal rule comment or non-output metadata so it
does not alter assistant response formatting.

Comment on lines +9 to +13
## Important (debug)

For transcript debugging: **when this rule is in your context for the user’s message**, print this exact line once at the **start** of your reply as **plain text** (no backticks, no code fence), then continue:

RULE excalidraw-element-model APPLIED 🧱
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

❌ Прибери службовий debug-тригер з тексту правила.

На Line 11-13 інструкція впливає на формат відповіді, а не на якість змін у packages/element.

As per coding guidelines ".cursor/rules/*.mdc: Тіло правила конкретне та стосується Excalidraw".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/rules/excalidraw-element-model.mdc around lines 9 - 13, Remove the
debug-trigger text "For transcript debugging..." and the exact instruction line
'RULE excalidraw-element-model APPLIED 🧱' from the rule body so the rule does
not alter reply formatting; instead ensure the rule text
(excalidraw-element-model) describes only concrete guidance about Excalidraw
element modeling and expected changes in packages/element, with no instructions
that affect agent output or debugging behavior.

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.

1 participant