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
17 changes: 17 additions & 0 deletions .cursor/rules/commit-messages.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
description: Commit message format for web-editor
alwaysApply: true
---

When generating a commit, the format should be:

```
CHANGE TYPE: SHORT TITLE

DESCRIPTION OF EXPECTED IMPACT FOR END USER. DESCRIPTION OF THE CHANGES MADE.

[TICKET NUMBER]
```

- `CHANGE TYPE` is one of `feat`, `chore`, or `fix`
- `TICKET NUMBER` is in the format `AP-XXXX` — usually found in the branch name
28 changes: 28 additions & 0 deletions .cursor/rules/components.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
description: React component patterns for web-editor
globs: **/*.tsx
alwaysApply: false
---

# Components

- Use function components with hooks instead of class components.
- Use the `FC` type rather than `FunctionComponent`.
- Wrap all components with `observer()` from `mobx-react`.
- Use named exports for components, not default exports.
- Use a named function for the component; the function name should match the component name:
```tsx
const Cmpt: FC<Props> = observer(function Cmpt(props: Props) {
return <div />;
});
```
- Never use barrel files (`index.ts` re-exports). Always use direct imports to the specific file.

## Base Practices
- For components exceeding 150 lines, extract sub-components into separate files.
- Remove props that can be derived from other props.

## Styling
- Prefer `makeStyles()` over inline styles or `sx` props.
- Always include a `name` option in `makeStyles` matching the component name.
- Keep styles in the same file as the component.
27 changes: 27 additions & 0 deletions .cursor/rules/general.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: TypeScript/Node.js coding standards for web-editor
alwaysApply: true
---

# Web Editor — General Standards

## Language & Style
- Use **TypeScript** throughout. No plain `.js` files in source.
- Follow **AirBnB ESLint** rules for all TypeScript and JavaScript.
- Always remove unused imports.
- Be as focused and concise as possible — check existing files before creating new ones.

## Project Context
- This is the Evolv visual editor, hosted inside the Aetherial Docker desktop environment.
- It communicates with Aetherial via **AWS SQS** — the command queue receives actions (e.g. `create_metamodel`) and the response queue returns results.
- SQS message schema changes must be coordinated with the `aetherial` repo.

## Build & Dev
- Package manager: **npm** (npm workspaces).
- Build workspace dependencies before starting: `npm run build:deps`
- Start the dev server: `npm start`
- Always run `npm run type-check` and `npm run lint` before committing.

## Error Handling
- Never fail silently. Missing required env vars or config must throw at startup.
- Log errors with sufficient structured context to debug issues without a debugger.
27 changes: 27 additions & 0 deletions .cursor/rules/git-linear-workflow.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: Git hygiene and Linear workflow standards for web-editor
alwaysApply: true
---

# Git Hygiene

## Branch Naming
- Prefer `feature/AP-123-short-slug`, `fix/AP-123-short-slug`, or `chore/AP-123-short-slug` when working from a Linear ticket.
- Always include the Linear issue key in the branch name when one exists.

## Pull Requests
- Include the Linear issue key in the PR title.
- Link the issue in the PR description.
- Keep PRs focused to one concern.
- Ensure `npm run type-check` and `npm run lint` pass before requesting review.
- Always use `GH_PAGER=cat` for `gh` commands.

# Linear Workflow

## Before Starting Work
1. Search for an existing Linear issue first.
2. Assign to yourself and move to `In Progress` before writing code.
3. Ensure acceptance criteria are explicit checklist items.

# Linear Access
- Use the `linear` CLI for Linear operations instead of Linear MCP tools.
12 changes: 12 additions & 0 deletions .cursor/rules/state-management.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: State management patterns for web-editor
globs: **/*.ts,**/*.tsx
alwaysApply: false
---

# State Management

- Use **MobX** for app-wide state management.
- Prefer method syntax over arrow functions in classes where binding isn't required.
- Prefer `useStaticValue` over `useState` for stores and values that never change after the initial render.
- Use `useDisposable()` rather than `useState()` for objects that implement `Disposable`.