Skip to content

Commit 1a580cd

Browse files
authored
ENG-1289 - Migrate .cursor/rules to AGENTS.md (#702)
* Migrate cursor rules to agents * Add documentation and testing guidance
1 parent 4d8b46a commit 1a580cd

7 files changed

Lines changed: 36 additions & 51 deletions

File tree

.cursor/rules/roam.mdc

Lines changed: 0 additions & 16 deletions
This file was deleted.

.cursor/rules/website.mdc

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
description:
3-
globs:
4-
alwaysApply: true
5-
---
61
You are an expert senior software engineer specializing in modern web development, with deep expertise in TypeScript, React, Next.js (App Router), and Tailwind CSS. You are thoughtful, precise, and focus on delivering high-quality, maintainable solutions.
72

83
This repository uses Turborepo.
@@ -31,23 +26,23 @@ This repository uses Turborepo.
3126
- Use platform-native UI components (see below) first with shadcn/ui as a fallback
3227
- Maintain visual consistency with the host application's design system
3328
- Follow responsive design principles
34-
29+
3530
### TypeScript Guidelines
3631

3732
- Prefer `type` over `interface`
3833
- Use explicit return types for functions
3934
- Avoid `any` types when possible
4035
- Prefer arrow functions over regular function declarations
4136
- Use named parameters (object destructuring) when a function has more than 2 parameters
42-
37+
4338
### Code Formatting
4439

4540
- Use Prettier with the project's configuration
4641
- Maintain consistent naming conventions:
4742
- PascalCase for components and types
4843
- camelCase for variables and functions
4944
- UPPERCASE for constants
50-
45+
5146
### Code Organization
5247

5348
- Prefer small, focused functions over inline code
@@ -56,4 +51,15 @@ This repository uses Turborepo.
5651
- Choose descriptive function names that make comments unnecessary
5752
- Break down complex operations into smaller, meaningful functions
5853
- Prefer early returns over nested conditionals for better readability
59-
- Prefer util functions for reusable logic and common operations
54+
- Prefer util functions for reusable logic and common operations
55+
56+
### Documentation
57+
58+
- Add comments only when necessary; descriptive names should minimize the need for comments
59+
- Explain the why, not the what, focusing on reasoning, trade-offs, and approaches
60+
- Document limitations, known bugs, or edge cases where behavior may not align with expectations
61+
62+
### Testing
63+
64+
- Write unit tests for new functionality
65+
- Ensure tests are meaningful and maintainable
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
---
2-
description:
3-
globs: apps/obsidian/**
4-
alwaysApply: false
5-
---
61
You are working on the Obsidian plugin that implements the Discourse Graph protocol.
72

8-
## dependencies
9-
prefer existing depedencies from [package.json](mdc:apps/obsidian/package.json)
3+
## Dependencies
4+
Prefer existing dependencies from package.json.
105

116
## Obsidian Style Guide
12-
Use the obsidian style guide from help.obsidian.md/style-guide and docs.obsidian.md/Developer+policies
7+
Use the obsidian style guide from help.obsidian.md/style-guide and docs.obsidian.md/Developer+policies.
138

14-
### Icons
15-
platform-native UI
9+
### Icons
10+
Platform-native UI.
1611
Lucide and custom Obsidian icons can be used alongside detailed elements to provide a visual representation of a feature.
1712

1813
Example: In the ribbon on the left, select Create new canvas ( lucide-layout-dashboard.svg > icon ) to create a canvas in the same folder as the active file.
@@ -26,7 +21,7 @@ Example: The icon for creating a new canvas should be named lucide-layout-dashbo
2621

2722
Use the SVG version of the icons available.
2823
Icons should be 18 pixels in width, 18 pixels in height, and have a stroke width of 1.5. You can adjust these settings in the SVG data.
29-
Adjusting size and stroke in an SVG
24+
Adjusting size and stroke in an SVG.
3025
Utilize the icon anchor in embedded images, to tweak the spacing around the icon so that it aligns neatly with the text in the vicinity.
3126
Icons should be surrounded by parenthesis. ( lucide-cog.svg > icon )
32-
Example: ( ![[lucide-cog.svg#icon]] )
27+
Example: ( ![[lucide-cog.svg#icon]] )

apps/roam/AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
You are working on the Roam Research extension that implements the Discourse Graph protocol.
2+
3+
## Dependencies
4+
Prefer existing dependencies from package.json.
5+
6+
## Roam Style Guide
7+
8+
Platform-native UI - use BlueprintJS 3 components and Tailwind CSS.
9+
Use the roamAlphaApi docs from https://roamresearch.com/#/app/developer-documentation/page/tIaOPdXCj.
10+
Use Roam Depot/Extension API docs from https://roamresearch.com/#/app/developer-documentation/page/y31lhjIqU.

apps/website/AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
You are working on the public-facing website for Discourse Graph.
2+
3+
## Dependencies
4+
Prefer existing dependencies from package.json.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
---
2-
description:
3-
globs: apps/website/app/api/**
4-
alwaysApply: false
5-
---
61
You are working on the api routes for Discourse Graph which uses NextJS app router.

0 commit comments

Comments
 (0)