botonic / rules
Cursor rule626 starsChanged 10 months agoMITView on GitHub
Botonic is an npm workspaces monorepo. All packages live in packages/: When adding dependencies, respect this graph to avoid cycles. Shared types: Types used in more than one package must be declared in @botonic/core and exported from there, so other packages import them from a single source of truth.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this general.md into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
When adding dependencies, respect this graph to avoid cycles.
- Distinctive: line 66
All packages must pass lint and format checks
- Distinctive: line 72
When adding or modifying a feature, tests must be added to cover the use case
- Very specific: line 74
Test file names must end with test.ts or test.tsx
- Distinctive: line 75
All packages must pass tests before considering development complete
- Very specific: line 78
Use __mocks__/ for shared mocks within the package
- Very specific: line 83
Types: Use import type when importing types only
- Very specific: line 84
Avoid any, prefer explicit types
- Very specific: line 88
Create folder in packages/<name>/
- Very specific: line 89
Add package.json with name: "@botonic/<name>"
- Very specific: line 90
When creating a new package, start with a version equal to the current minor version of @botonic/core
- Very specific: line 91
Create tsconfig.json and tsconfig.esm.json if it compiles TS
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Botonic Project Rules — Packages
Repository
- The default branch is
master.
Monorepo Structure
Botonic is an npm workspaces monorepo. All packages live in packages/:
packages/
├── botonic-cli/ # CLI to create, serve and deploy bots
├── botonic-core/ # Framework core (no @botonic dependencies)
├── botonic-react/ # React components (depends on @botonic/core)
├── botonic-dx/ # Dev experience, bundlers
├── botonic-dx-bundler-rspack/
├── botonic-dx-bundler-webpack/
├── botonic-eslint-config/
├── botonic-plugin-ai-agents/
├── botonic-plugin-flow-builder/
├── botonic-plugin-hubtype-analytics/
├── botonic-plugin-knowledge-bases/Package Dependencies
- @botonic/core: Base package, no dependencies on other
@botonic/* - @botonic/react: Depends on
@botonic/core - @botonic/plugin-flow-builder: Depends on
@botonic/react - Plugins (ai-agents, hubtype-analytics, knowledge-bases): Depend on
@botonic/core - @botonic/dx: Depends on
@botonic/dx-bundler-rspackand@botonic/eslint-config
When adding dependencies, respect this graph to avoid cycles.
Shared types: Types used in more than one package must be declared in @botonic/core and exported from there, so other packages import them from a single source of truth.
Standard Package Structure
packages/<package-name>/
├── src/ # TypeScript/TSX source code
├── lib/ # Compiled output (CJS in lib/cjs, ESM in lib/esm)
├── tests/ # Jest tests
├── package.json
├── tsconfig.json # CJS build
├── tsconfig.esm.json # ESM build (when applicable)
└── README.mdBuild
- Each package compiles to CJS and ESM when applicable
- Standard script:
tsc -p tsconfig.json && tsc -p tsconfig.esm.json - Output:
lib/cjs/andlib/esm/ package.json:main→./lib/cjs/index.js,module→./lib/esm/index.js
TypeScript Configuration
- Extends from
../../tsconfig.cjs.base.jsonor../../tsconfig.esm.base.json - Workspace paths at root:
@botonic/coreand@botonic/reactpoint to./packages/*/src
Linting and Formatting
- Biome for lint and format
- All packages must pass lint and format checks
- Lint and format must run without errors before considering development complete
- Config in
biome.json(root);packages/botonic-reacthas overrides for React
Testing
- When adding or modifying a feature, tests must be added to cover the use case
- Each package has a
tests/folder with all test files - Test file names must end with
test.tsortest.tsx - All packages must pass tests before considering development complete
- Jest with
jest.config.jsorjest.config.cjsper package - Tests in
tests/, with structure similar tosrc/ - Use
__mocks__/for shared mocks within the package
Code Conventions
- Imports: Sort imports (Biome
organizeImports: on) - Types: Use
import typewhen importing types only - Avoid
any, prefer explicit types
Adding/Modifying Packages
- Create folder in
packages/<name>/ - Add
package.jsonwithname: "@botonic/<name>" - When creating a new package, start with a version equal to the current minor version of
@botonic/core - Create
tsconfig.jsonandtsconfig.esm.jsonif it compiles TS - Include scripts:
build,test,lint,lint:check,format - Add
engines: { "node": ">=22.19.0", "npm": ">=10.0.0" }
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

