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…
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- obsidian-to-clew-importSkill
- obsidian-to-clew-importSkill
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
- Distinctive: line 7
Before making changes, read:
- Very specific: line 18
If Obsidian is where you collect notes, Clew is where you operate on a learning graph.
- Distinctive: line 43
Prefer explicit contracts over heuristics.
- Distinctive: line 44
Prefer fail-closed over hidden fallback.
- Distinctive: line 45
Do not add semantic keyword routers for agent behavior.
- Distinctive: line 46
Keep model behavior honest through role, context, and schema.
- Distinctive: line 47
Do not add dead surfaces “just in case”.
- Distinctive: line 95
Use them when they fit instead of re-deriving the same repo context every time.
≈ “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.
Files
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:
- The graph is the center of truth.
- AI suggests changes instead of silently applying them.
- Accepted graph changes stay reversible through snapshots.
- The UI stays graph-first instead of dashboard-first.
- 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 wiringfrontend/src/components/WorkspaceShell.tsx: sidebar and workspace chromefrontend/src/components/GraphCanvas.tsx: graph rendering and interactionfrontend/src/components/SettingsModal.tsx: provider, memory, debug, and UX controlsfrontend/src/lib/: API, graph helpers, copy, contracts, debug loggingfrontend/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 filesfrontend/src/components/ui/: sharedModalandSwitchRow
Backend quick map
backend/app/api/routes.py: HTTP transportbackend/app/services/repository.py: SQLite persistence, snapshots, configbackend/app/services/chat_orchestrator.py: answer/quiz/proposal action choicebackend/app/services/proposal_planner.py: proposal generation and validation bridgebackend/app/llm/: providers, catalog, prompts, contracts, schemas
Local commands
Start dev:
./scripts/dev.shRun frontend checks:
cd frontend && npm run typecheck && npm run buildRun backend tests:
PYTHONPATH=backend ./.venv/bin/python -m unittest discover -s backend/tests -vRepo-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.
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.

