agentleFS
Cipher208Cipher208/a-memory/.claude/CLAUDE.md

a-memory

CLAUDE.md1 starsChanged 38 days agoMITView on GitHub

This repository is indexed by Repowise. Use the MCP tools below for orientation, discovery, and enriched context (documentation, ownership, history, decisions). Always verify against actual source files before making changes — the index may be stale. Last indexed: 2026-08-08 (commit e428650) ### Entry Points - __main__.py - mcp_server/server.py ### Tech Stack Languages: Python Frameworks: Pydantic Infra: Docker, Docker Compose### Architectural Layers | Layer | Files | Purpose | |-------|-------|---------| | Application | 72 | | | Service | 5 |…

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

    Prefer repowise distill <cmd> for noisy commands — test runs, builds, git status/log/diff, searches, file listings.

    line 98
  2. Distinctive:

    Never re-run a command to see omitted output.

    line 100

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

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

CLAUDE.md

<!-- Add your custom instructions below. Repowise will never modify anything outside the REPOWISE markers. --><!-- Examples: coding style rules, test commands, workflow preferences, constraints --><!-- REPOWISE:START — Do not edit below this line. Auto-generated by Repowise. -->

IMPORTANT: Codebase Intelligence Instructions for mcp-ariel-memory

This repository is indexed by Repowise. Use the MCP tools below for orientation, discovery, and enriched context (documentation, ownership, history, decisions). Always verify against actual source files before making changes — the index may be stale.

Last indexed: 2026-08-08 (commit e428650)

Entry Points

  • __main__.py
  • mcp_server/server.py

Tech Stack

Languages: Python Frameworks: Pydantic

Infra: Docker, Docker Compose### Architectural Layers

LayerFilesPurpose
Application72
Service5
Config19
Utility22
Docs & Tooling43
Test56

Guided Tour (12 steps)

  1. README.md
  2. server.py
  3. __main__.py
  4. index.js
  5. connection.py
  6. config.py ... and 6 more steps

Hotspots (High Churn)

FileChurn90d CommitsOwner
rag/engine.py99.3th %ile35Ariel Memory
tests/test_mcp/test_tools_e2e.py98.6th %ile10Ariel Memory
tests/test_hypothesis.py97.8th %ile10Ariel Memory
mcp_server/tools_layer.py97.1th %ile26Ariel Memory
shared/saga.py96.4th %ile23Ariel Memory

Code health

Three signals: defect risk (the overall score), maintainability (smells that hurt readability/change-cost without predicting bugs), and performance (static performance RISK: I/O-in-loop / N+1 shapes that waste work, high-precision/low-recall). Maintainability and performance are co-equal views, never blended into the defect headline. See docs/CODE_HEALTH.md.

Defect risk, Hotspot health: 4.09/10 (stable) · Average: 6.82/10 · Worst: 1.0/10 (shared/saga.py) Maintainability, Average: 8.89/10 Performance risk, Average: 9.85/10

Critical biomarkers

  • tests/test_rag_scoring.py — churn risk — impact −2.4
  • tests/test_integration.py — churn risk — impact −2.4
  • features/audit_trail.py — untested hotspot — impact −2.0
  • features/rate_limiting.py — untested hotspot — impact −2.0
  • graph/temporal.py — untested hotspot — impact −2.0

Repowise MCP Tools

This repo has the Repowise MCP server configured. The tools below answer questions grep/Read cannot. Every response carries an _meta envelope with index_age_days, indexed_commit, and a stale_warning only when the index has actually diverged from HEAD — silence means the index is current.

When to call which tool:

ToolWhat only this tool answers
get_answer(question)Synthesised answer with citations and a content-grounded confidence. First call for "how does X work" / "where is Y" / "why is Z". Value questions may return grounding: "extracted" — the verbatim source line, no synthesis involved. On low confidence returns best_guesses with one-line justifications.
get_context(targets=[...])Triage card for files/modules/symbols — title, summary, signatures, hotspot bit, decision_records titles, symbol_ids. File targets auto-upgrade to a verified skeleton (every signature, ~37% of a full Read). include=["callers"] works on file targets too (import + call rollup).
get_symbol(...)Source bytes with live-verified bounds. Three forms: "path.py::Name" (indexed symbol), "path.py:140-180" (live range read, ≤200 lines), "repowise#<hex>" (omission ref). Index misses return fallback_lines from a live grep instead of a dead end.
search_codebase(query, mode?, kind?, symbol_kind?)Hybrid code search. mode="auto" (default) routes by query shape: an identifier → indexed symbol hits (symbol_id/file/line bounds — pipe into get_symbol), a path → file pages (pipe into get_context), prose → wiki-semantic search, mixed → hybrid (symbols first). Force a branch with mode=symbol|path|concept|hybrid. Concept hits carry search_method (embedding vs bm25 fallback); decision records rank below file pages unless the query is why-shaped.
get_why(query, targets?)Architectural decision archaeology — why the code is shaped this way. Call before refactors or pattern divergences. Falls back to git archaeology when no ADRs exist for a file.
get_risk(targets, changed_files?)What history says about touching these files: churn, owners, blast radius. Pass changed_files for PR mode → returns a directive (will_break, missing_cochanges, missing_tests).
get_health(targets?, include?)Code-health scores + biomarker findings (defect / maintainability / performance pillars). Self-check before a PR — read the same signals the merge-gate judges your change on. Default is lean; opt in with include: ["accuracy"] (does the score rank the buggy files first — precision@K + lift), ["signals"] (per-file prior-defects / churn / owners / degree, targeted mode), ["churn_complexity"] (volatile-and-complex danger-zone files), ["biomarkers"] (all findings), and a dimension name ["performance"] / ["defect"] / ["maintainability"] to filter findings to one pillar.
get_dead_code(...)Tiered unreachable / unused-export / zombie-package findings. Run before a cleanup sprint, not before a targeted fix.
get_overview(repo?)Architecture map + tool_guide recipes. One-time orientation; skip on subsequent calls in the same session.

Trust protocol — when a response replaces reading the source:

  • verified: true on any response means the served content was checked against the live working tree. Never follow a verified response with a Read of the same lines — you would be paying twice for identical bytes.
  • get_answer with confidence: "high" or grounding: "extracted" is content-grounded (asserted values were verified against retrieved source; ≥1 citation is source-backed). Cite it directly. quotes entries {path, lines, quote} are verbatim live source — quote them instead of re-reading.
  • Reading code: get_context skeleton first (~37% of a full Read), then get_symbol for bodies, "path.py:a-b" range reads for anything between symbols. Raw Read is for files the index marks mostly_full or cannot serve.
  • The only re-read triggers: bounds: "approximate", _meta.stale_warning, search_method: "bm25", or confidence: "low"/retrieval_quality: "weak".
  • Disallowed rationalizations for extra reads: "just to be safe", "to double-check the tool", "to see the full context" (use the skeleton / a range read), "the file might have changed" (that is what verified already checked).

Composition tips:

  • get_answer → if confidence is medium/low, follow best_guesses[0].file or fallback_targets[0] into get_context, then get_symbol for bytes.
  • get_context returns decision_records titles → get_why(targets=[...]) for the rationale; hotspot: true → get_risk before editing.
  • PR review → get_risk(targets=[...], changed_files=[...]); read the directive block first.
  • A tombstone error means the file was deleted/renamed since indexing — follow successor_paths.

Output Distillation

  • Prefer repowise distill <cmd> for noisy commands — test runs, builds, git status/log/diff, searches, file listings. It runs the command unchanged (exit code preserved) and prints a compact, errors-first rendering; every error line survives.
  • Output may contain a marker like [repowise#a1b2c3d4e5f6: 230 lines omitted (~6.1k tokens); restore: repowise expand a1b2c3d4e5f6]. The omitted content is fully preserved — run repowise expand <ref> to retrieve it, or repowise expand <ref> -q <regex> for just the matching lines.
  • Never re-run a command to see omitted output; expand the marker instead.
  • For structure-level questions about a large indexed file ("what's in here", "which function handles X"), get_context(["path"], include=["skeleton"]) returns the file with bodies elided — every signature plus the bodies of the most central symbols — at a fraction of the cost of a full Read.

Codebase Conventions

Commands:

  • Test: pytest
  • Lint: ruff check .
  • Typecheck: mypy .
<!-- REPOWISE:END -->

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.