Skip to content

docs: trim and realign CLAUDE.md and .cursor/rules/#473

Merged
larsgeorge-db merged 1 commit into
mainfrom
docs-trim-cursor-claude-rules
May 30, 2026
Merged

docs: trim and realign CLAUDE.md and .cursor/rules/#473
larsgeorge-db merged 1 commit into
mainfrom
docs-trim-cursor-claude-rules

Conversation

@larsgeorge-db
Copy link
Copy Markdown
Collaborator

Summary

Make .cursor/rules/*.mdc the single source of truth and reduce CLAUDE.md to a thin index. Removes content that was duplicated, stale, factually wrong about the codebase, generic theory, or personal preference that doesn't belong in a shared open-source repo.

  • .cursor/rules/ shrinks from ~900 lines to ~500 (matrix file 10 unchanged); deletes 06-performance-optimization.mdc outright.
  • CLAUDE.md shrinks from 315 lines to ~26 (now a markdown-linked index of the cursor rules + small Claude-specific section + the operational must-knows that bite).
  • .claude/agents/ and .claude/commands/ deleted (six stock Anthropic template files, none project-specific; the 26 KB test-engineer.md was fabricated JS framework with no project relevance; create-pr.md referenced Biome which the project doesn't use).
  • All factually wrong claims fixed:
    • api/... paths corrected to src/backend/src/... (the actual layout).
    • api/app.yaml corrected to src/app.yaml.
    • Repo URL corrected to https://github.com/databrickslabs/ontos (rule 01 had larsgeorge/ontos-app, CLAUDE.md had larsgeorge/ontos; neither matched the real remote).
    • Dropped "Use mapped types instead of enums" (FeatureAccessLevel and ~20 other enums exist).
    • Dropped "wrapping fetch or axios" (no axios in repo).
    • Dropped "Prefer interfaces over types" (codebase uses both ~equally).
    • Dropped vacuous bullets ("Consider server-side patterns if applicable", "Use Suspense for lazy loading if needed", "Optimize Web Vitals", "Follow RESTful API design", "Use SQLAlchemy for ORM", "Ensure CORS is configured").
  • Added what was missing: Datasets (DEPRECATED), Assets & Ontology, Tagging System mentions in 02-project-overview.mdc; Playwright MCP tool block in 08-testing-and-deployment.mdc.
  • Personal Style block removed from repo (15 bullets like "be casual", "no moral lectures" — moved to user-level config; should never have been in a shared open-source repo).

Result: zero duplicated content between CLAUDE.md and Cursor rules; every path resolves to a real file.

Test plan

  • Open Cursor in this repo and confirm rules load without errors (no missing-file references).
  • Open a backend file (e.g., src/backend/src/routes/data_product_routes.py) and confirm 05-code-style-and-structure.mdc content is in scope per its globs.
  • Open a frontend file (e.g., src/frontend/src/views/data-products.tsx) and confirm same.
  • rg \"api/(routes|controller|common|utils|repositories|db_models|models|app\\.(py|yaml))\" .cursor/ CLAUDE.md returns zero hits.
  • Verify .cursorrules no longer references 06-performance-optimization.mdc.
  • Open CLAUDE.md markdown links and confirm they all resolve to existing files.

@larsgeorge-db larsgeorge-db requested a review from a team as a code owner May 29, 2026 14:55
Make .cursor/rules/*.mdc the single source of truth (canonical) and
reduce CLAUDE.md to a thin index that points at them. Removes content
that was either duplicated, stale, factually wrong about the codebase,
generic theory, or personal preference that does not belong in a
shared open-source repo.

Cursor rules
- Delete 06-performance-optimization.mdc (entirely generic React/Python
  perf advice, plus aspirational tools like TanStack Query that are not
  used).
- 01: drop the Personal Style block (15 bullets of personal preferences;
  belongs in user-level config, not the repo).
- 02: drop the 8-phase Data Product Lifecycle, Roles & Responsibilities,
  and Contract Maintenance Principles sections (already in
  docs/user-journeys/). Add Datasets (DEPRECATED), Assets & Ontology,
  and Tagging System mentions to Core Features.
- 03, 04, 07, 08: rewrite/trim. Fix every stale "api/..." path to the
  actual "src/backend/src/..." layout. Fix "api/app.yaml" to
  "src/app.yaml".
- 04: replace the exhaustive directory tree with a compact one matching
  reality; drop the config-file enumeration.
- 05: drop unenforced/wrong claims:
    * "Use mapped types instead of enums" (FeatureAccessLevel and many
      other enums exist).
    * "wrapping fetch or axios" (no axios anywhere).
    * "Prefer interfaces over types" (codebase uses both).
    * Vacuous bullets ("Consider server-side patterns if applicable",
      "Use Suspense for lazy loading components if needed").
  Keep the security-relevant rules with teeth (no str(e) in
  HTTPException, %-style logging, no template literals in console
  with user data, Ajv allErrors warning).
- 07: drop obvious filler ("Follow RESTful API design", "Use SQLAlchemy
  for ORM", "Optimize Web Vitals", "Ensure CORS is configured").
- 08: fix app.yaml path; add Playwright MCP tool block; drop "implement
  unit tests using pytest/Jest" as obvious.

CLAUDE.md
- Collapse from ~315 lines to ~26: a thin index of the cursor rules
  with markdown links, plus a small Claude-specific section and the
  operational must-knows that bite (no server restart, log paths,
  ports, hatch, yarn).

.claude/agents/ and .claude/commands/
- Delete all six files. They were stock Anthropic templates not
  specific to this project (and partly factually wrong, e.g.,
  create-pr.md referenced Biome which the project does not use).
  All four agents duplicate built-in subagent types Cursor and
  Claude Code already provide. The 26 KB test-engineer.md was a
  fabricated JS test framework with no project relevance.

Repo URL
- Fix to https://github.com/databrickslabs/ontos (was previously
  inconsistent: rule 01 said larsgeorge/ontos-app, CLAUDE.md said
  larsgeorge/ontos; neither matches the actual remote).

Result
- .cursor/rules/ drops from ~900 lines to ~500 (matrix file 10
  unchanged).
- CLAUDE.md drops from 315 lines to ~26.
- Zero duplicated content between CLAUDE.md and Cursor rules.
- Every path in the rules now resolves to a real file.
@larsgeorge-db larsgeorge-db force-pushed the docs-trim-cursor-claude-rules branch from 9889647 to 13c9c73 Compare May 30, 2026 11:30
@larsgeorge-db larsgeorge-db merged commit 255577d into main May 30, 2026
6 of 7 checks passed
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.

1 participant