From 28ab08d5a3e1beef174036de04515930a9988785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 13 Sep 2026 03:26:02 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20docs:=20drop=20the=20KB=20preamb?= =?UTF-8?q?le=20(tooling=20destroyed);=20README=20section-read=20guidance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 75040a2..19f5460 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,35 +3,11 @@ Rust/axum school-management API (auth, roles, exams, notes, messaging, courses, attendance, pomodoro, meals) on PostgreSQL (sqlx). Swagger UI at `/swagger`. -## Project docs — query the knowledge base, do NOT read README.md +## Project docs — README.md, read sections not the whole file -README.md is ~355KB (~90k tokens). Its `##` sections live in an embedded -SurrealDB knowledge base. Fetch only what you need: - -```bash -KB() { ~/.surrealdb/surreal sql -e "surrealkv://$HOME/.claude/kb/kb.db" \ - --ns claude --db hezarfen_backend --json --hide-welcome --log error; } -# list sections -echo 'SELECT id, title FROM doc;' | KB -# fetch one section body -echo 'SELECT body FROM doc:`time-policy`;' | KB -# full-text search, best sections first -echo "SELECT id, title, search::score(0) AS s FROM doc WHERE body @0@ 'retake' ORDER BY s DESC LIMIT 3;" | KB -# routes for ONE resource (auth, users, notes, messages, events, courses, -# subjects, sessions, exams, marks, work, pomodoro, attendance, settings, terms) -echo 'SELECT routes FROM endpoint:exams;' | KB -``` - -Staleness: if `sha256sum README.md` differs from -`echo 'SELECT sha256 FROM meta:readme;' | KB`, re-ingest: - -```bash -python3 ~/.claude/kb/ingest.py README.md | KB -python3 ~/.claude/kb/ingest-endpoints.py README.md | KB -``` - -The project's own PostgreSQL (container `hezarfen-postgres`) is runtime data — -never write knowledge-base rows there (the KB lives in `~/.claude/kb/kb.db`). +README.md is ~355KB (~90k tokens). Never read it whole: grep for the `## ` +heading you need, then read that range. Its `## Endpoints` table is GENERATED +(see Conventions); prose sections are hand-written. ## Code map — orient here, skip discovery greps