agentleFS
lem-projectlem-project/lem/CLAUDE.md

lem

CLAUDE.md3.1k starsChanged 10 months agoMITView on GitHub

Lem is a text editor written in Common Lisp with multiple frontend support (terminal, GUI, browser). Four-layer design: Frontends → Interface (lem-if:*) → Core → Extensions Key abstractions: - Buffer: Text storage with points, marks, undo history - Window: Buffer display, organized in tree (splits) or floating - Mode: Major (one per buffer) + Minor (multiple, toggleable) - Command: Interactive operation via define-command This project uses code-contractor for automated PR review. code-contractor is a GitHub App that validates pull requests…

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 lem-core package symbols, avoid lem:: internal access

    line 72

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

Lem is a text editor written in Common Lisp with multiple frontend support (terminal, GUI, browser).

Quick Reference

# Build and run
make sdl2          # GUI version
make ncurses       # Terminal version

# Development
qlot install       # Install dependencies
make test          # Run tests

Project Structure

src/                    # Core editor
├── lem.lisp            # Entry point
├── buffer/             # Text buffer system
├── window/             # Window management
├── mode.lisp           # Mode system
├── keymap.lisp         # Key bindings
├── defcommand.lisp     # Command definition
└── interface.lisp      # Frontend abstraction

frontends/              # UI implementations
├── sdl2/               # Desktop GUI
├── ncurses/            # Terminal
└── webview/            # Browser-based

extensions/             # Language modes (50+)
├── lisp-mode/          # Common Lisp with REPL
├── lsp-mode/           # LSP client
└── vi-mode/            # Vim emulation

Architecture

Four-layer design: Frontends → Interface (lem-if:*) → Core → Extensions

Key abstractions:

  • Buffer: Text storage with points, marks, undo history
  • Window: Buffer display, organized in tree (splits) or floating
  • Mode: Major (one per buffer) + Minor (multiple, toggleable)
  • Command: Interactive operation via define-command

Coding Standards

This project uses code-contractor for automated PR review. code-contractor is a GitHub App that validates pull requests against rules defined in contract.yml.

All coding standards are defined in contract.yml at the repository root. Refer to it for:

  • Package and file structure rules
  • Documentation requirements
  • Style conventions (loop syntax, error handling, etc.)
  • Functional programming guidelines

Key Files for Common Tasks

TaskFiles
Add commandsrc/defcommand.lisp for macro, src/commands/ for examples
Add modeextensions/ for examples, inherit language-mode
Add frontendsrc/interface.lisp for protocol, frontends/ for impl
Buffer opssrc/buffer/internal/buffer.lisp, src/buffer/internal/edit.lisp
Window opssrc/window/window.lisp

Development Notes

  • Use lem-core package symbols, avoid lem:: internal access
  • Frontends implement lem-if:* generic functions
  • Modes register via define-major-mode / define-minor-mode
  • Commands register via define-command with argument descriptors

Configuration

User config locations (in order):

  1. $LEM_HOME/init.lisp
  2. ~/.config/lem/init.lisp
  3. ~/.lem/init.lisp
  4. ~/.lemrc

Documentation

Recent Changes

  • 001-multi-language-canvas: Added Common Lisp (SBCL), tree-sitter-cl FFI bindings + lem/core, tree-sitter-cl, lem-call-graph (existing), lem-tree-sitter
  • 001-multi-language-canvas: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]

Active Technologies

  • Common Lisp (SBCL), tree-sitter-cl FFI bindings + lem/core, tree-sitter-cl, lem-call-graph (existing), lem-tree-sitter (001-multi-language-canvas)
  • N/A (in-memory graph structures, optional position caching) (001-multi-language-canvas)

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 3 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the lem-project/lem repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about lem-project/lem

The biggest 5 of 35 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 35

Talked about on GitHub, Hacker News and Bluesky (35 times).

On GitHub · 29

24 more on GitHub

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.