reflect
CLAUDE.md1 starsChanged 8 months agoMITView on GitHub
Persistent, compounding knowledge base for any repository. Reads raw evidence from Entire CLI sessions and git history, extracts ALL knowledge worth remembering (decisions, preferences, patterns, gotchas, business rules, architecture, brand — anything discussed in sessions), and compiles it into a wiki at .reflect/wiki/. The wiki is indexed by qmd (required) for hybrid search (BM25 + vector + reranking). Agents query qmd directly for project memory — no context injection needed. The more sessions pile up, the more reflect knows.
In this repository5 other files it gives its agents.
- cli-for-agentsSkill
- entire-cliSkill
- reflectSkill
- skill-creatorSkill
- reflectSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Test locally: python3 reflect status or python3 reflect search <query>
- Very specific: line 41
When writing code that shells out to external CLIs or APIs, verify available commands/endpoints with --help or reference docs before …
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project
Persistent, compounding knowledge base for any repository. Reads raw evidence from Entire CLI sessions and git history, extracts ALL knowledge worth remembering (decisions, preferences, patterns, gotchas, business rules, architecture, brand — anything discussed in sessions), and compiles it into a wiki at .reflect/wiki/. The wiki is indexed by qmd (required) for hybrid search (BM25 + vector + reranking). Agents query qmd directly for project memory — no context injection needed. The more sessions pile up, the more reflect knows.
Structure
reflect— CLI entry point (Python)lib/— CLI modules (evidence, context, init, search, status, sessions, timeline, improve, metrics, ingest, lint, wiki)lib/evidence.py— fixed evidence gathering pipeline (Entire CLI + git)lib/wiki.py— wiki layer utilities (frontmatter, page I/O, index scanning, index.md)lib/ingest.py— two-step wiki ingest (triage → write) + qmd re-indexinglib/lint.py— wiki health checks (stale, orphan, duplicate, coverage, resolved)skill/SKILL.md— skill source (dev copy; install copies to.claude/skills/reflect/)SPEC.md— specification for.reflect/directory formathooks/session-start.sh— SessionStart hook for knowledge base freshnessinstall.sh— installer (symlinks CLI to~/.local/bin)README.md— user-facing docsROADMAP.md— future phasesCLAUDE.md— this file
Development
- Edit
lib/evidence.pyto change evidence gathering - Edit
lib/context.pyto change synthesis pipeline, system prompt, or validation - Edit
lib/wiki.pyto change wiki utilities (frontmatter, page format, index.md) - Edit
lib/ingest.pyto change knowledge extraction (triage/write subagent prompts) - Edit
lib/lint.pyto change wiki health checks - Edit
lib/to change CLI commands - Edit
.reflect/format.yaml(in any repo) to customize seed categories - Edit
skill/SKILL.mdto change the Claude Code skill (source of truth) - Test locally:
python3 reflect statusorpython3 reflect search <query> - Test wiki:
python3 reflect init && python3 reflect ingest --verbose && python3 reflect lint - Install CLI via
./install.sh; the skill is project-local under.claude/skills/reflect/
Session Insights
- When writing code that shells out to external CLIs or APIs, verify available commands/endpoints with
--helpor reference docs before implementation — don't assume command signatures. - For changes that affect core architecture (learning mechanism, data flow, required dependencies), confirm the design decision (optional vs required, additive vs replacement) with the user before implementing.
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.

