agentleFS
miuuyymiuuyy/Clew/CLAUDE.md

Clew

CLAUDE.md187 starsChanged 7 months agoMITView on GitHub

This file provides repository-specific guidance to Claude Code when working in Clew. Before making changes, read: Clew is a graph-first learning workspace with an AI agent layer. If Obsidian is where you collect notes, Clew is where you operate on a learning graph. The public main branch is the local developer edition. It keeps: It does not try to mirror every hosted product surface. Never weaken these: Run frontend checks: Run backend tests: This repo includes repo-local Claude context: Use…

The file

We split this CLAUDE.md into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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. Distinctive:

    Before making changes, read:

    line 7
  2. Very specific:

    If Obsidian is where you collect notes, Clew is where you operate on a learning graph.

    line 18
  3. Distinctive:

    Prefer explicit contracts over heuristics.

    line 43
  4. Distinctive:

    Prefer fail-closed over hidden fallback.

    line 44
  5. Distinctive:

    Do not add semantic keyword routers for agent behavior.

    line 45
  6. Distinctive:

    Keep model behavior honest through role, context, and schema.

    line 46
  7. Distinctive:

    Do not add dead surfaces “just in case”.

    line 47
  8. Distinctive:

    Use them when they fit instead of re-deriving the same repo context every time.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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 repository-specific guidance to Claude Code when working in Clew.

Read first

Before making changes, read:

  • Shared agent context
  • Agent workflow
  • Architecture
  • ADR index

Product overview

Clew is a graph-first learning workspace with an AI agent layer.

If Obsidian is where you collect notes, Clew is where you operate on a learning graph.

The public main branch is the local developer edition. It keeps:

  • graph workspace
  • provider seam
  • proposals
  • snapshots and rollback
  • quizzes and closure logic
  • import/export

It does not try to mirror every hosted product surface.

Core boundaries

Never weaken these:

  1. The graph is the center of truth.
  2. AI suggests changes instead of silently applying them.
  3. Accepted graph changes stay reversible through snapshots.
  4. The UI stays graph-first instead of dashboard-first.
  5. The public local edition stays honest about being local-first.

Engineering rules

  • Prefer explicit contracts over heuristics.
  • Prefer fail-closed over hidden fallback.
  • Do not add semantic keyword routers for agent behavior.
  • Keep model behavior honest through role, context, and schema.
  • Do not add dead surfaces “just in case”.

Frontend quick map

  • frontend/src/App.tsx: app shell and state wiring
  • frontend/src/components/WorkspaceShell.tsx: sidebar and workspace chrome
  • frontend/src/components/GraphCanvas.tsx: graph rendering and interaction
  • frontend/src/components/SettingsModal.tsx: provider, memory, debug, and UX controls
  • frontend/src/lib/: API, graph helpers, copy, contracts, debug logging
  • frontend/src/styles/system.css: design tokens (--ui-*, both themes) and shared controls (ui* classes)
  • frontend/src/styles/components/: component styles built only on those tokens; new UI goes here, not into the legacy theme files
  • frontend/src/components/ui/: shared Modal and SwitchRow

Backend quick map

  • backend/app/api/routes.py: HTTP transport
  • backend/app/services/repository.py: SQLite persistence, snapshots, config
  • backend/app/services/chat_orchestrator.py: answer/quiz/proposal action choice
  • backend/app/services/proposal_planner.py: proposal generation and validation bridge
  • backend/app/llm/: providers, catalog, prompts, contracts, schemas

Local commands

Start dev:

./scripts/dev.sh

Run frontend checks:

cd frontend && npm run typecheck && npm run build

Run backend tests:

PYTHONPATH=backend ./.venv/bin/python -m unittest discover -s backend/tests -v

Repo-specific help

This repo includes repo-local Claude context:

  • Agent docs index
  • .claude/skills/ for product, docs, and agent-boundary checks

Use them when they fit instead of re-deriving the same repo context every time.

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.