Skip to content

Day 2: Богдан Коба — Workshop Assignment#1

Open
BohdanKoba wants to merge 3 commits intokoldovsky:masterfrom
BohdanKoba:master
Open

Day 2: Богдан Коба — Workshop Assignment#1
BohdanKoba wants to merge 3 commits intokoldovsky:masterfrom
BohdanKoba:master

Conversation

@BohdanKoba
Copy link
Copy Markdown

@BohdanKoba BohdanKoba commented Apr 5, 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

Нотатки

Summary by CodeRabbit

Новини випуску

  • Документація

    • Додано AGENTS.md з інструкціями для налаштування, зборки, тестування та внесків.
    • Додано кілька правил і довідників (.cursor/rules/*) з вимогами до тестування, безпеки, TypeScript, структури пакету та монорепо.
  • Chores

    • Додано документацію для Cursor команд (.cursor/commands/*) і загальні правила (.cursorrules) для стандартизації робочих процесів, перевірок PR і локальної валідації.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Warning

Rate limit exceeded

@BohdanKoba has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 8 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 8 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6f27e91f-0793-4a09-93e0-dd17aef85f33

📥 Commits

Reviewing files that changed from the base of the PR and between 546d9c3 and 581086d.

📒 Files selected for processing (2)
  • .cursor/rules/security.mdc
  • AGENTS.md

Walkthrough

Додано набір документаційних файлів і Cursor-конфігурацій: нові правила (.mdc) для областей монорепозиторію, два чат-команди в .cursor/commands/, глобальні правила в .cursorrules та детальний гайд для агентів у AGENTS.md.

Changes

Cohort / File(s) Summary
Cursor commands
​.cursor/commands/editor-package.md, ​.cursor/commands/pr-checks.md
Додано документацію двох slash-команд: /editor-package (порядок тестування/білду для packages/excalidraw) та /pr-checks (покрокова перевірка PR із вимогою звіту про результати).
Cursor rules
​.cursor/rules/excalidraw-app.mdc, ​.cursor/rules/excalidraw-package.mdc, ​.cursor/rules/monorepo-core.mdc, ​.cursor/rules/security.mdc, ​.cursor/rules/testing.mdc, ​.cursor/rules/typescript-conventions.mdc
Додано набір правил/інструкцій для відповідних кодових областей: запуск/білд, імпортні конвенції, тестування, безпека, TypeScript та перевірки пакету excalidraw.
Глобальні налаштування Cursor
​.cursorrules
Додано глобальні правила для Cursor із посиланнями на workspace-скрипти, основні локації та загальні конвенції (типізація, тести, безпека).
Документація для агентів/контрибуторів
AGENTS.md
Додано детальний гайд для агентів і контрибуторів: вимоги, архітектура, часто вживані скрипти, конвенції, чек-лист приймання та посилання на Cursor-правила/команди.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Коментарі ментора

✅ Структура логічна — файли організовані за призначенням.
⚠️ Перевір повноту — AGENTS.md посилається на AB_VALIDATION.md; підтвердить, що цей файл існує або додайте його.
⚠️ Зважаючи на правила безпеки — перегляньте, що вказані перевірки секретів/уніків відповідають реальним grep-командам у репозиторії.
✅ Після змін запустіть локально yarn build і yarn test:code для підтвердження консистентності документації зі скриптами.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 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 містить 6 файлів правил у .cursor/rules/ з якісним описом, 'How to verify' секціями, security-правилом та glob-scoping для модульної організації.
Minimum 2 Custom Commands ✅ Passed PR містить рівно 2 команди в .cursor/commands/: editor-package.md та pr-checks.md. Обидві команди повноцінні з чіткою структурою та описують конкретні робочі процеси для розробки Excalidraw.
A/B Validation Document ✅ Passed Файл AB_VALIDATION.md містить усі 5 обов'язкових елементів: правило security.mdc, тест сценарій, Result A з безпечними пропозиціями, Result B з рискованішими варіантами, висновок з рекомендаціями.
Agents.Md Complete ✅ Passed AGENTS.md розташований у кореневій папці з 111 рядками. Містить 6 основних розділів (Project Overview, Tech Stack, Architecture, Commands, Conventions, Do-Not-Touch/Constraints) та 4 бонусні розділи з конкретним практичним вмістом.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Назва PR відповідає вимогам формату: 'Day 2: <Прізвище> — Workshop Assignment' українською мовою, ясно визначає учасника й завдання.

✏️ 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: 4

🤖 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/rules/monorepo-core.mdc:
- Line 12: The Imports list in .cursor/rules/monorepo-core.mdc is missing
`@excalidraw/utils` so update the allowed workspace-imports sentence that
currently mentions `@excalidraw/common`, `@excalidraw/element`,
`@excalidraw/math`, `@excalidraw/excalidraw` to also include
`@excalidraw/utils`; ensure the description still references vitest.config.mts
and package.json exports and adjust any nearby wording so path-alias coverage
matches actual aliases to avoid incorrect AI import suggestions.

In @.cursor/rules/security.mdc:
- Line 16: The "How to verify" (verify) step currently only checks for
dangerouslySetInnerHTML and misses other XSS vectors; update the verify section
in .cursor/rules/security.mdc to include explicit checks for direct DOM APIs and
dynamic code execution: scan for element.innerHTML assignments, use of eval /
new Function, dynamic script creation via document.createElement('script') or
appendChild, use of setAttribute/on* inline handlers, SVG foreignObject or
untrusted SVG content, and unsafe canvas rendering of user input, and confirm
any allowed patterns are covered by existing audited exceptions; mention the
exact symbols/patterns to look for (dangerouslySetInnerHTML, innerHTML, eval,
new Function, document.createElement('script'), setAttribute('on'),
<foreignObject>, canvas drawImage/toDataURL) and instructions to reject or
require sanitization if found.

In @.cursor/rules/typescript-conventions.mdc:
- Line 3: The `globs` entry currently uses a global pattern ("**/*.{ts,tsx}")
which is too broad for a module-scoped rule; update the `globs` value to a
specific, module-scoped pattern that targets only the intended package or
directory (e.g., restrict to the module's src folder or package path) so the
rule applies narrowly; specifically replace the global `"**/*.{ts,tsx}"` with a
concrete pattern that references the module (for example narrow patterns per
module like "packages/<module>/src/**/*.ts" and "packages/<module>/src/**/*.tsx"
or the single-module src path) while keeping the `globs` key and format intact.

In `@AGENTS.md`:
- Around line 11-92: Add two explicit top-level sections to AGENTS.md titled
"Tech Stack" and "Do-Not-Touch / Constraints": under "Tech Stack" list primary
languages, frameworks, runtime (e.g., TypeScript, React 19, Vite, Node ≥18), key
packages (`@excalidraw/*`), and build/test tools; under "Do-Not-Touch /
Constraints" enumerate immutable boundaries (e.g., no secrets in repo, workspace
aliases must be preserved, PWA/collaboration hooks in ex­calidraw-app, required
Node engine) and any files/dirs that are off-limits for the workshop rules;
ensure both sections are concise, clearly labeled, and included alongside the
existing Overview, Architecture, and Conventions so the verification checklist
can detect them.
🪄 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: 4041c23f-5503-4384-b451-92ea815605b9

📥 Commits

Reviewing files that changed from the base of the PR and between 63f111c and 5f0a3d7.

⛔ Files ignored due to path filters (2)
  • AB_VALIDATION.md is excluded by none and included by none
  • CLAUDE.md is excluded by none and included by none
📒 Files selected for processing (10)
  • .cursor/commands/editor-package.md
  • .cursor/commands/pr-checks.md
  • .cursor/rules/excalidraw-app.mdc
  • .cursor/rules/excalidraw-package.mdc
  • .cursor/rules/monorepo-core.mdc
  • .cursor/rules/security.mdc
  • .cursor/rules/testing.mdc
  • .cursor/rules/typescript-conventions.mdc
  • .cursorrules
  • AGENTS.md

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: 2

🤖 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/rules/security.mdc:
- Around line 10-24: Add an explicit "Content Security Policy" and "Firebase
security rules" subsection to the security rule document: describe required CSP
directives (default-src, script-src, style-src, img-src, frame-src, connect-src,
report-uri) and acceptable nonce/hash usage, and document how to validate CSP
headers and enforcement in browsers; add a Firebase section specifying required
rules for read/write/auth checks, linking to the firebase.rules file and
recommending emulator/local rule tests. Update the "How to verify" checklist to
include steps to grep for Content-Security-Policy headers and firebase rule
files (e.g., search for 'Content-Security-Policy' and 'firebase' entries), to
inspect responses for CSP headers in a browser/network trace, and to run
Firebase Rules unit/emulator tests to confirm rule coverage and CI gating.

In `@AGENTS.md`:
- Line 57: Replace the inconsistent spelling "colocated" with the
project-approved "co-located" in the AGENTS.md Tests bullet (the line containing
"Vitest (`vitest.config.mts`, `setupTests.ts`). Tests are colocated under
`packages/*/tests/` or as `*.test.tsx` files.") so the Tests entry (search for
the word "colocated") reads "co-located" to satisfy the grammar linter and keep
terminology consistent.
🪄 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: de9099ef-0e7d-4b93-ab0e-6668245a25f1

📥 Commits

Reviewing files that changed from the base of the PR and between 5f0a3d7 and 546d9c3.

📒 Files selected for processing (4)
  • .cursor/rules/monorepo-core.mdc
  • .cursor/rules/security.mdc
  • .cursor/rules/typescript-conventions.mdc
  • AGENTS.md

@BohdanKoba BohdanKoba changed the title chore: add Cursor rules, slash commands, and agent docs Day 2: Богдан Коба — Workshop Assignment Apr 5, 2026
@koldovsky
Copy link
Copy Markdown
Owner

Все гарно, зараховується

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