agentleFS
mrcbrbn5361mrcbrbn5361/SyncytiumMD/.cursor/rules/code-style.mdc

SyncytiumMD / rules

Cursor rule6 starsChanged 7 days agoMITView on GitHub

Enforce clean, readable, modern standards across the project

The file

We split this code-style.mdc into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not edit manually unless you plan to run reverse-sync.

    line 8
  2. Distinctive:

    Write clean, modular, and self-documenting code.

    line 14
  3. Distinctive:

    Always prefer strict types, immutable data structures, and pure functions where reasonable.

    line 15
  4. Distinctive:

    Keep functions concise with a single responsibility.

    line 16
  5. Distinctive:

    Avoid unnecessary dependencies.

    line 18
  6. Distinctive:

    When a bug is fixed, add a test that fails without the change and name the regression in the test description.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
code-style.mdc
---
description: 'Enforce clean, readable, modern standards across the project'
alwaysApply: true
---
<!--
  ⚠️ AUTO-GENERATED BY SYNCYTIUM-MD ⚠️
  This file is automatically synchronized from .syncytium/
  Do not edit manually unless you plan to run reverse-sync.
  Source of truth: .syncytium/
-->

# Code Style & Formatting

- Write clean, modular, and self-documenting code.
- Always prefer strict types, immutable data structures, and pure functions where reasonable.
- Keep functions concise with a single responsibility.
- Preserve existing comments and documentation unless explicitly asked to modify them.
- Avoid unnecessary dependencies; prefer standard library APIs where possible.

## Repository-specific conventions

- **Comments explain *why*.** A comment restating what the code does is noise;
  a comment explaining a non-obvious constraint, a bug workaround, or a
  deliberate deviation is mandatory. Prefer a short comment at the point of
  the decision over a long block at the top of the file.
- **Never let a shared, cached object escape.** `gray-matter` hands back the
  same object for identical content, and `DEFAULT_CONFIG` / `INITIAL_RULES` /
  `INITIAL_DECISIONS` are module-level singletons. Copy before mutating
  (see `clone()` in `src/core/storage.ts` and `deepClone()` in the config path).
- **Order-dependent output is a bug.** Rule loading is sorted explicitly so
  generated files are byte-identical across platforms.
- **Derive, do not duplicate.** The version lives in `src/version.ts`, the
  Markdown renderer in `src/ui/markdown.ts` (injected into the browser bundle
  via `Function.prototype.toString()`), and path safety in `src/core/paths.ts`.
  A second copy will drift.
- When a bug is fixed, add a test that fails without the change and name the
  regression in the test description.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.