agentleFS
codeyogi911codeyogi911/reflect/CLAUDE.md

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.

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
  1. Very specific:

    Test locally: python3 reflect status or python3 reflect search <query>

    line 35
  2. Very specific:

    When writing code that shells out to external CLIs or APIs, verify available commands/endpoints with --help or reference docs before …

    line 41

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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-indexing
  • lib/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 format
  • hooks/session-start.sh — SessionStart hook for knowledge base freshness
  • install.sh — installer (symlinks CLI to ~/.local/bin)
  • README.md — user-facing docs
  • ROADMAP.md — future phases
  • CLAUDE.md — this file

Development

  • Edit lib/evidence.py to change evidence gathering
  • Edit lib/context.py to change synthesis pipeline, system prompt, or validation
  • Edit lib/wiki.py to change wiki utilities (frontmatter, page format, index.md)
  • Edit lib/ingest.py to change knowledge extraction (triage/write subagent prompts)
  • Edit lib/lint.py to change wiki health checks
  • Edit lib/ to change CLI commands
  • Edit .reflect/format.yaml (in any repo) to customize seed categories
  • Edit skill/SKILL.md to change the Claude Code skill (source of truth)
  • Test locally: python3 reflect status or python3 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 --help or 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.

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.