Rassam
CLAUDE.md20 starsChanged 5 days agoApache-2.0View on GitHub
Guidance for Claude Code (and other coding agents) working in this repository. Rassam is checked against its own blueprint at .rassam/blueprint.json (format: docs/blueprint-spec.md). The rassam MCP server is configured in .mcp.json. Use it: When you add a component, move files, or create a new cross-component dependency on purpose, update .rassam/blueprint.json in the same change (paths, declared dependencies). Edits that loosen rules need a human-approved label on the PR. Tests use vitest (import { describe, it, expect } from "vitest"); component…
In this repository2 other files it gives its agents.
- agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
When you add a component, move files, or create a new cross-component dependency on purpose, update .rassam/blueprint.json in the same …
- Distinctive: line 41
Read agents.md before substantial architecture changes, and update agents.md, README.md and the blueprint when architecture or documented …
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 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.
Files
CLAUDE.md
Guidance for Claude Code (and other coding agents) working in this repository.
This repository has an architecture contract
Rassam is checked against its own blueprint at .rassam/blueprint.json (format: docs/blueprint-spec.md). The rassam MCP server is configured in .mcp.json. Use it:
explain_pathbefore editing a file: who owns it, its intent, the rules that constrain it, whether it is protected.check_dependencybefore adding an import across components.check_changesbefore you finish, and fix new findings.report_conflictif the task seems to require breaking a rule. Never weaken a test, a CI step, a coverage threshold or the blueprint to make a change pass.
When you add a component, move files, or create a new cross-component dependency on purpose, update .rassam/blueprint.json in the same change (paths, declared dependencies). Edits that loosen rules need a human-approved label on the PR.
Commands
npm run dev # Next.js dev server
npm test # vitest (all tests)
npx vitest run src/blueprint/engine.test.ts # a single file
npm run typecheck
npm run lint
npm run build # production build
npm run build:cli # rebuild action/dist/rassam.mjs (commit it; CI checks freshness)
npm run rassam -- check # full check against the blueprint
npm run rassam -- check --base main # judge the branch the way CI does
npm run blueprint:schema # regenerate schema/blueprint-0.1.schema.jsonTests use vitest (import { describe, it, expect } from "vitest"); component tests use // @vitest-environment jsdom and Testing Library.
Architecture in one screen
src/blueprint/— the isomorphic engine (format, import graph, rules, gate, reach, reports). Nonode:imports, no DOM, no React/Next, no imports from the rest of the app; onlyzod. Use relative imports inside it.src/cli/— Node host:rassamCLI, git and GitHub Actions integration, the dual-era MCP server. May depend only on the engine, Node built-ins and zod.src/components/studio/,src/components/blueprint/,src/components/ui/,src/hooks/useBlueprint.ts,src/lib/blueprint-client/,src/lib/blueprint-intent/,src/app/api/blueprint/,src/app/api/live/— the Studio at/and its data layer (GitHub projects and local folders via the File System Access API).src/app/settings/,src/app/api/settings/models/,src/lib/llm/,src/lib/chat-runtime.ts,src/lib/model-settings.ts— provider and model configuration for the intent bar's optional model path.- Browser code must not import server modules that read credentials (
src/lib/github.ts,src/lib/llm/**, request security); type-only imports are fine.
Read agents.md before substantial architecture changes, and update agents.md, README.md and the blueprint when architecture or documented behavior changes.
Conventions
- Path alias
@/*→./src/*in app code; relative imports insidesrc/blueprintandsrc/cli(they are bundled for the CLI). - API routes return the JSON error envelope from
src/lib/api-error.ts. - Requests, repository content and AI output are untrusted. Credentials stay server-side and are never printed; reports show redacted previews only.
page.tsxandStudio.tsxstay thin wiring layers: put logic in hooks and libraries.- This Next.js version has breaking changes; check
node_modules/next/dist/docs/before using Next-specific APIs.
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
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.

