agentleFS
minhduchd-mdsminhduchd-mds/desygn-ai/CLAUDE.md

desygn-ai

CLAUDE.md2 starsChanged 3 months agoMITView on GitHub

Full dev guide: docs/DEV_GUIDE.md Prefer capabilities that improve this closed loop over unrelated utility features.

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Never call Figma API in loops — batch everything.

    line 14
  2. Very specific:

    Never use findAll() — use findAllWithCriteria() on currentPage only.

    line 15
  3. Distinctive:

    Start from a product outcome, not a random file edit.

    line 23
  4. Very specific:

    Keep audit/scoring/policy logic deterministic and explainable.

    line 26
  5. Distinctive:

    Keep Edge-safe modules separated from Node-only dependencies.

    line 27
  6. Very specific:

    Do not merge around failing unit/build/security checks unless the failure is demonstrated to be infrastructure-only and recorded in the PR.

    line 30
  7. Distinctive:

    Prefer capabilities that improve this closed loop over unrelated utility features.

    line 35

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

Desygn AI — Claude Code Instructions

Full dev guide: docs/DEV_GUIDE.md

Commands

npm run dev       # Watch mode (UI + plugin)
npm run build     # Production → dist/
npm test          # Vitest
npm run lint      # ESLint 9

Hard Rules

  • Never call Figma API in loops — batch everything.
  • Never use findAll() — use findAllWithCriteria() on currentPage only.
  • Serializer: isMixed() check before reading mixed properties. Max depth 15.
  • Scoring modules: pure functions, no side effects, no Figma API.
  • Prompt text: always sanitize() via sanitize.ts (strips HTML + control chars). For prompt-injection defense, also use wrapUserInput() when embedding user text in AI prompts.
  • CSS Modules per component. Dark theme only. Gap-based layout.
  • New serializer field: types.ts → serializer.ts → prompt-compact.ts.

Agent workflow

  1. Start from a product outcome, not a random file edit.
  2. Map affected workspace packages, API routes, web surfaces, data contracts, tests, and deployment runtime.
  3. For multi-module work, create a dependency-aware task graph and define acceptance criteria before implementation.
  4. Keep audit/scoring/policy logic deterministic and explainable. AI may recommend changes but must not silently redefine metrics or standards.
  5. Keep Edge-safe modules separated from Node-only dependencies; check transitive imports, not only direct imports.
  6. Build workspace/shared packages before consumer applications when validating production deployment.
  7. A builder must not be the sole reviewer of its own patch. Use the repository reviewer agent after implementation.
  8. Do not merge around failing unit/build/security checks unless the failure is demonstrated to be infrastructure-only and recorded in the PR.

Product direction

Design source → normalized Design IR → explainable analysis/audit → design-system intelligence → recommendation → optional implementation → independent verification/evidence.

Prefer capabilities that improve this closed loop over unrelated utility features.

Source and license policy

External projects may be studied for architecture, workflow, standards, protocols, or public APIs. Prefer clean-room implementation for core algorithms. If implementation is adapted, record source URL, exact revision/version, license, retained notices, and modifications. Never claim a standardized mathematical transform or third-party algorithm as repository-owned.

Repo

  • Origin: github.com/minhduchd-mds/desygn-ai

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.