enggraph
CLAUDE.md1 starsChanged 6 days agoMITView on GitHub
Dockerized GraphRAG and vector-context MCP service for Claude CLI: an isolated PostgreSQL + pgvector database, a Python code-graph indexer, a Python MCP server and a Python dashboard, orchestrated by Docker Compose. Host codebases are served read-only by a host agent, the graph and embeddings live in PostgreSQL, and the tools are exposed over MCP (Streamable HTTP, SSE kept for older clients). 1. Docker-first. Every service is configured and launchable from docker-compose.yml. Schema changes are numbered Alembic revisions in packages/core/src/enggraph/core/migrations/versions/, created…
In this repository5 other files it gives its agents.
- commitSkill
- databaseSkill
- delegateSkill
- enggraphSkill
- write-docsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Docker-first: Every service is configured and launchable from docker-compose.yml.
- Very specific: line 21
Pre-commit passes before any commit: When a new file extension enters the repository, add its hook to .pre-commit-config.yaml - that is …
- Very specific: line 31
Every table is scoped to a row of projects: one database holds the graph of every indexed codebase, and nodes is keyed on (project, id).
- Very specific: line 33
No foreign keys and no cascades.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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 - Project Instructions for AI Agent
Dockerized GraphRAG and vector-context MCP service for Claude CLI: an isolated PostgreSQL + pgvector database, a Python code-graph indexer, a Python MCP server and a Python dashboard, orchestrated by Docker Compose. Host codebases are served read-only by a host agent, the graph and embeddings live in PostgreSQL, and the tools are exposed over MCP (Streamable HTTP, SSE kept for older clients).
Rules
- Docker-first. Every service is configured and launchable from
docker-compose.yml. Schema changes are numbered Alembic revisions inpackages/core/src/enggraph/core/migrations/versions/, created withmake db new NAME=<slug>; never edit a revision that has already been applied. - Read-only codebases. A tree reaches the stack only through its host agent, which serves it read-only. No volume mounts a tree, on any stack. Containers never mutate host source files.
- Pure ASCII English in all code, comments, docstrings, docs and commit messages. No emoji, no non-ASCII characters anywhere.
- Pre-commit passes before any commit. When a new file extension enters the
repository, add its hook to
.pre-commit-config.yaml- that is mandatory, not optional. - Commits go through commitizen, never by hand. See the
commitskill. - Python is PEP 8 with explicit type hints and real exception handling. The dashboard's and the viewer's scripts are plain JavaScript with no build step.
Schema and parsers
- Every table is scoped to a row of
projects: one database holds the graph of every indexed codebase, andnodesis keyed on(project, id). - No foreign keys and no cascades. Tables are tied by plain value columns
(
project,node_id), and whatever a cascade would do the code does explicitly, in the same transaction:storage.PROJECT_COLUMNSfor a project drop or rename,storage.ABOUT_COLUMNSfor records that outlive the project they name,storage.drop_dependentsfor deleted nodes. - New functionality goes into new tables. A revision never holds
REFERENCES,FOREIGN KEYorCASCADE, andALTER TABLEonly changes one column's type or size, each time with the user's explicit permission; themigrations-without-keyshook rejects the rest, in revisions and inmodels.pyalike. A revision is DDL passed toop.execute, andmodels.pynames the same tables for code:test_models.pyholds the two together. A table whose shape must change otherwise is copied into a new one under a new name. Thedatabaseskill holds the full rules. - File and chunk text is never stored. It is read from the project's host agent through the worker API; a chunk keeps its line range, words and vector.
- A migration finishes in minutes on the standard stack: no
UPDATEover a large table and no rebuilt vector index. - Infrastructure formats get Tree-sitter parsers in
packages/indexer/src/enggraph/indexer/parsers/. Programming languages go to the code extractor:extract_codeof their parser inparsers/languages.py, resolved inindexer/codegraph.py, the extension inOWN_CODE_EXTENSIONSinconfig.py. A format no published grammar reads (RPM specs,setup.cfg, systemd units) is read in Python throughTextParserinparsers/base.py. - A project tree is read only through
enggraph.core.trees, and only its host agent answers: no container holds a tree. - MCP tools live in
packages/mcp/src/enggraph/mcp/:tools.jsonholds their names, descriptions and schemas,handlers.pyone function each.
Stack
PostgreSQL 16 (pgvector/pgvector:pg16) - Python 3.11+ with tree-sitter,
networkx, psycopg2-binary, sqlmodel, alembic, mcp,
fastapi, jinja2 - htmx for the dashboard's pages.
Tooling: pre-commit, commitizen (wyld-cz adapter when installed), ruff,
djlint, prettier, shellcheck.
Layout
/packages/- the Python services, one package and one image each under theenggraphnamespace:core(shared library, the models and the Alembic revisions, with the Makefile behindmake db),indexer(library and index job),api,embed,summarize,viewer,mcp(the MCP server),web(the dashboard: a JSON API over the same schema underroutes/, and Jinja2 pages over the same functions undertemplates/)./packages/agent/- the host agent, a Rust binary serving a tree to the stack./dev/web/- the dashboard's Penpot mockups, drawn in the disposable stackpenpot-local-stackruns./skills/- the skills the MCP server hands to agents, baked into the api image:enggraph,commit,database,delegate,write-docs./.claude/skills/holds the copies the agent wrote./templates/- theCLAUDE.local.mdan onboarded codebase is given./scripts/-install.shandmcp_register.pydrivemake install;backup.shandrestore.shdrive the database targets.
Current state is tracked in the roadmap the MCP server holds: get_roadmaps.
Implementation may be handed to the Gemini CLI - see the delegate skill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

