betting-brain-v3 / rules
Cursor rule8 starsChanged 14 months agoMITView on GitHub
Root directory organization and file placement rules
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,531 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.
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/99-floor.mdcCursor rule
- .cursor/rules/ai-friendly-testing.mdcCursor rule
- .cursor/rules/analytics-stub-api.mdcCursor rule
- .cursor/rules/analytics-testing.mdcCursor rule
- .cursor/rules/api-patterns.mdcCursor rule
- .cursor/rules/browser-extension.mdcCursor rule
- .cursor/rules/bun-runtime.mdcCursor rule
- .cursor/rules/cache-optimization.mdcCursor rule
- .cursor/rules/ci-integration.mdcCursor rule
- .cursor/rules/ci-patterns.mdcCursor rule
- .cursor/rules/cloudflare-infrastructure.mdcCursor rule
- .cursor/rules/cloudflare-workers.mdcCursor rule
- .cursor/rules/code-searchability.mdcCursor rule
- .cursor/rules/coverage-thresholds.mdcCursor rule
- .cursor/rules/database-patterns.mdcCursor rule
- .cursor/rules/documentation.mdcCursor rule
- .cursor/rules/endpoint-routing.mdcCursor rule
- .cursor/rules/file-naming.mdcCursor rule
- .cursor/rules/mcp-integration.mdcCursor rule
- .cursor/rules/process-management.mdcCursor rule
- .cursor/rules/production-security.mdcCursor rule
- .cursor/rules/quality-standards.mdcCursor rule
- .cursor/rules/security-patterns.mdcCursor rule
- .cursor/rules/testing.mdcCursor rule
- .cursor/rules/testing-patterns.mdcCursor rule
- .cursor/rules/test-setup-patterns.mdcCursor rule
The file
We split this root-organization.mdc into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Only these files are permitted in the project root:
- Distinctive: line 37
Test results or CI artifacts
- Distinctive: line 79
If NO to both → It belongs in a subdirectory, NOT root!
≈ “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
--- version: "5.0.0" scope: ["*"] alwaysApply: true description: "Root directory organization and file placement rules" lastUpdated: "2025-10-08" dependencies: ["quality-standards", "file-naming"] --- # Root Directory Organization Rules ## CRITICAL: Root Directory Policy **The root directory MUST remain clean and minimal.** ### ✅ ALLOWED in Root Only these files are permitted in the project root: - `README.md` - Main project documentation - `LICENSE` - Project license - `CLAUDE.md` - AI assistant guidance (like CONTRIBUTING.md) - `package.json` - Dependencies - `package-lock.json` - NPM lock file (auto-generated) - `bun.lock` - Bun lock file (auto-generated) - `tsconfig.json` - TypeScript configuration - `wrangler.toml` - Cloudflare Workers base config - `wrangler.staging.toml` - Staging environment config - `wrangler.production.toml` - Production environment config ### ❌ FORBIDDEN in Root **NEVER create these in root:** - Markdown files (except README.md, LICENSE, CLAUDE.md) - Status files (MCP_INTEGRATION_STATUS.md, TESTING_STATUS.md, etc.) - Documentation files - Session summaries or reports - Cleanup plans or reviews - Temporary files - Test results or CI artifacts - Backup files (*.backup) - Build outputs - Coverage reports - Tilde directories (~, ~/) ## File Placement Rules ### Where Files Must Go ``` Documentation → docs/ Status files → docs/ Testing guides → docs/testing/ or docs/guides/ Deployment guides → docs/deployment/ Scripts → scripts/ Tools → tools/ Additional configs → config/ Archives → docs/archive/ Session reports → docs/ Reviews → docs/ ``` ### Examples ``` ❌ BAD: /TESTING_STATUS.md ✅ GOOD: /docs/TESTING_STATUS.md ❌ BAD: /MCP_INTEGRATION_STATUS.md ✅ GOOD: /docs/MCP_INTEGRATION_STATUS.md ❌ BAD: /CLEANUP_SUMMARY.md ✅ GOOD: /docs/CLEANUP_SUMMARY.md ❌ BAD: /setup-guide.md ✅ GOOD: /docs/guides/setup-guide.md ``` ## Before Creating ANY File **Ask yourself:** 1. Is this a standard project file? (package.json, README.md, LICENSE) 2. Is this a required configuration? (tsconfig.json, wrangler.toml) 3. If NO to both → **It belongs in a subdirectory, NOT root!** ## Enforcement See [docs/ROOT_STRUCTURE.md](mdc:docs/ROOT_STRUCTURE.md) for complete root directory reference. **Violation of these rules will require immediate cleanup and file relocation.**
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.

