agentleFS
zepgramzepgram/pi-dashboard/CLAUDE.md

pi-dashboard

CLAUDE.md18 starsChanged 58 days agoMITView on GitHub

Guidelines for AI agents working on this project. README.md is the reference for features, API endpoints, configuration and Docker setup. Keep it and CHANGELOG.md up to date when an endpoint, a setting, an MCP tool or the container setup changes. The image is pulled by people who follow latest. A release must keep working with: - Nothing measures the host inside a request handler: handlers read collector.stats(). - No blocking calls (execSync, readFileSync of anything slow). Shell out with run()…

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Keep it and CHANGELOG.md up to date when an endpoint, a setting, an MCP tool or the container setup changes.

    line 8
  2. Distinctive:

    every documented route and response field.

    line 17
  3. Very specific:

    No blocking calls (execSync, readFileSync of anything slow).

    line 44
  4. Very specific:

    No framework, no CDN, no innerHTML with API data (textContent only).

    line 52
  5. Very specific:

    Commit messages: feat:, fix:, chore:, docs:, refactor:

    line 71

≈ “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

CLAUDE.md

Guidelines for AI agents working on this project.

Documentation

README.md is the reference for features, API endpoints, configuration and Docker setup. Keep it and CHANGELOG.md up to date when an endpoint, a setting, an MCP tool or the container setup changes.

Compatibility contract

The image is pulled by people who follow latest. A release must keep working with:

  • the published docker-compose.yml (volumes, pid: host, network_mode: host);
  • an existing settings.json (unknown keys are preserved, never dropped);
  • every documented route and response field. Add fields; do not rename or remove them.

Project structure

server/index.js          entry point: config, collector, HTTP server, shutdown
server/app.js            Express app and every route (createApp, used by the tests)
server/collector/        the sampling loop and what it reads
  index.js               Collector: one loop for all clients, feeds the history
  host.js                CPU, memory, temperature, throttling, network, OS
  disks.js               mounted block devices
  docker.js              containers through the Docker socket and cgroups
  processes.js           top processes from /proc deltas
server/history.js        1 h / 24 h ring buffers
server/mcp.js            MCP tools (read-only)
server/checks.js         service health checks
server/settings.js       settings store (atomic, serialized writes) and validation
server/auth.js           admin token and API key
src/index.html           markup, SVG sprite, dialogs
src/js/                  vanilla ES modules: api, state, poller, charts, cards/, modals/
src/css/                 tokens, base, layout, components, modals, modes
test/                    node:test suites (npm test)

Backend rules

  • Nothing measures the host inside a request handler: handlers read collector.stats().
  • No blocking calls (execSync, readFileSync of anything slow). Shell out with run() from server/util.js, which never throws.
  • Host files are read through config.host.proc, config.host.sys and config.host.root so the same code works in the container and on the host.
  • A new parser gets a test in test/parsers.test.js with a real sample of its input.

Frontend rules

  • No framework, no CDN, no innerHTML with API data (textContent only).
  • Lists are reconciled by key, not rebuilt on every tick.
  • Colours, spacing and radii come from the CSS variables in src/css/tokens.css; the five themes only override variables.
  • Three display modes through body classes: none (normal), compact, ultra. A new component must be checked in all three and at 360 px width.
  • URL parameters for kiosks and screenshots are documented at the top of src/js/params.js.

Commands

npm run dev      # API with --watch on :3001, Vite on :5173
npm test
npm run build
docker compose up -d --build

Conventions

  • Commit messages: feat:, fix:, chore:, docs:, refactor:
  • API: dashboard endpoints under /api/, key-protected endpoints under /api/v1/

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.