agentleFS
kemalcalakkemalcalak/design-editor/CLAUDE.md

design-editor

CLAUDE.md16 starsChanged 26 days agoMITView on GitHub

The TypeScript Design Editor has been retired. apps/web, apps/desktop, apps/cli, and the pen-* packages (pen-types/core/engine/renderer/figma/mcp/ai-skills/sdk/react/acp) are gone. The product is now implemented in Rust (crates/); packages/ keeps only the Chrome extension and JS build tooling. Historical // ported from pen-* comments in the Rust sources name the retired TS as their origin — that code no longer exists in-tree; consult git history (last TS tag v0.7.5) if you need it. Detailed module docs load automatically in subdirectories: Tooling is Cargo…

The file

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

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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:

    Use Conventional Commits: <type>(<scope>): <subject>

    line 65

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

The TypeScript Design Editor has been retired. apps/web, apps/desktop, apps/cli, and the pen-* packages (pen-types/core/engine/renderer/figma/mcp/ai-skills/sdk/react/acp) are gone. The product is now implemented in Rust (crates/); packages/ keeps only the Chrome extension and JS build tooling. Historical // ported from pen-* comments in the Rust sources name the retired TS as their origin — that code no longer exists in-tree; consult git history (last TS tag v0.7.5) if you need it.

Detailed module docs load automatically in subdirectories:

  • crates/CLAUDE.md — Rust shell: crate layout, editor core, widgets, hosts (native/web/desktop), MCP, AI, orchestrator, codegen. The canonical architecture doc.
  • packages/CLAUDE.md — Remaining packages (Chrome extension + JS tooling).

Commands

Tooling is Cargo (Rust — the product). The root has no package.json; the JS/Bun tooling (Chrome extension scripts, Iconify catalog) lives under packages/ — run JS scripts from there.

  • Web dev server (Rust): bash scripts/start-web-rust.sh
  • Build (Rust): cargo build --workspace --release
  • Run all tests (Rust): cargo test --workspace; single crate: cargo test -p <crate>
  • Type check: cargo check --workspace; wasm: cargo check --target wasm32-unknown-unknown -p de-host-web --no-default-features --features web
  • Lint / format (Rust): cargo clippy --workspace --all-targets -- -D warnings / cargo fmt --all
  • Lint / format (JS): from packages/: bun run lint (oxlint) / bun run format (oxfmt)
  • Desktop app: cargo build -p de-host-desktop → binary design-editor (live MCP on 127.0.0.1:<port>/mcp)
  • CLI: cargo build -p de-cli → binary de
  • MCP server: built into the desktop/web host (--mcp <path>); crate de-mcp
  • Iconify catalog (Rust assets): from packages/: bun run generate-iconify-catalog
  • Bump the product version: scripts/bump-version.sh X.Y.Z edits root Cargo.toml (the only hand-edited copy) and refreshes Cargo.lock; commit both. Verify with tools/check-version-sync.sh.

Architecture

Design Editor is an open-source, AI-native vector design tool (Design-as-Code). The editor — canvas engine, chrome, stores, MCP, AI — is Rust, built on the vendored jian skia/widget/render/event toolkit (vendor/jian) and casement winit fork (vendor/casement). See crates/CLAUDE.md for the authoritative crate map; the essentials:

crates/
├── de-editor-core/       Canonical `.de` (PenDocument) editor state + EditorCommand + design-variable resolution
├── de-editor-ui/         Platform-free widgets + RenderBackend facade (wasm32-clean)
├── de-editor-host-core/  Transport-free host state machines shared by all hosts
├── de-host-native/       Native host lib (winit + skia-safe GL) — desktop
├── de-host-web/          Browser bundle: wasm32 cdylib, CanvasKit renderer
├── de-host-desktop/      Desktop binary `design-editor`; also the `--serve-web` daemon
├── de-host-services/     Headless serve-web / MCP daemon lib (shared by desktop + web-server)
├── de-host-web-server/   Thin GL-free web-server binary
├── de-cli/               `de` command-line tool
├── de-util/              Dependency-free leaf: hex-colour parsing + JSON / XML escaping
└── de-mcp / de-ai / de-ai-skills / de-codegen / de-orchestrator / de-figma /
   de-git / de-opmerge / de-pen-loader / de-design-lint / de-i18n / de-html / de-pptx /
   de-smoke / …

packages/
├── de-chrome-extension/  Chrome extension that captures a tab into the running editor
└── scripts/              JS build glue (Iconify catalog generator)

Data flow, canvas engine, Document/EditorCommand model, MCP layered-design workflow, design variables, and the run/debug recipe are all documented in crates/CLAUDE.md.

Code Style

  • Single files must not exceed 800 lines — split into smaller modules when they grow beyond this. The workspace currently has zero violations; the convention is a spine (public surface + mod declarations) plus sibling files, with re-exports keeping import paths stable.
  • One component/widget per file, single responsibility.
  • .rs filenames use snake_case; .js/.ts use kebab-case.
  • Source comments (.rs/.ts/.toml) in English (spec/plan markdown + test CJK fixtures may keep Chinese).
  • Rust widgets paint against jian's Painter; draw_text is baseline-relative (label components center via centered_text_baseline_y, not (h-fs)/2).

Git Commit Convention

Use Conventional Commits: <type>(<scope>): <subject>

Types: feat, fix, refactor, perf, style, docs, test, chore, ci

Scopes: editor, canvas, panels, history, ai, codegen, store, types, variables, figma, mcp, desktop, web, renderer, sdk, cli, agent, i18n, ci

Rules: Subject in English, lowercase start, no period, imperative mood. Body optional; explain why not what. One commit per change.

PR titles: <type>(<scope>): <subject> (#<issue>), e.g. chore(ci): require issue labels (#31). PRs are squash-merged, so the title becomes the commit on main; .github/workflows/pr-title.yml enforces it.

License

MIT License. See LICENSE for details.

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.