diff --git a/agents/AGENTS.md b/agents/AGENTS.md index e182f23..6f3e499 100644 --- a/agents/AGENTS.md +++ b/agents/AGENTS.md @@ -110,8 +110,12 @@ credentials or customer-personal data. was a problem with X" costs more time than it saves. - No need to economize on characters: cognee has no size limit, so write notes comprehensively and self-contained. -- Always keep the external references and source links (Confluence, Jira, - TeamVault, ...) in the note — they matter. +- Always keep the external references and source links in the note — they + matter: Confluence, Jira, TeamVault, and, for notes that grew out of a Google + Chat discussion, the source-thread URLs + (`https://chat.google.com/room//`, for individual + messages append the ``) so the original discussion stays + traceable — not just a separate index. ## Sandbox @@ -158,12 +162,30 @@ credentials or customer-personal data. [`ccc`](https://github.com/cocoindex-io/cocoindex-code). Reach for it on conceptual questions ("where is X used / which files do Y / what handles Z"), where a keyword grep would miss indirect usage: - `ccc search '' --path '**'`. Pass `--path '**'` — without - it, results are filtered to the current working directory's - subtree. The `ccc` skill has the full reference; - `grep`/`rg`/`find` remain fine for exact-string lookups. + `ccc search ''`. Results are filtered to the current working + directory's subtree, so **run the search from the project root** — that is + the cheap way to see everything. `--path '**'` achieves the same from a + subdirectory, but from the root it is a no-op *and* about three times + slower (measured 2026-09-02 on a 1005-file index: 0.35 s against 0.12 s, + identical hits), so pass it only when you cannot control the cwd. + **Embeddings only, no keyword component:** searching an exact string + (a UUID, a ticket ID, an error message) does not return the file that + contains it — verified. `grep`/`rg`/`find` own exact-string lookups. + A low score is a warning, not a hit. The `ccc` skill has the full + reference. - **`ccc index` / `ccc init` are read-safe maintenance.** They only write to the gitignored `.cocoindex_code/` directory, never to source. Run them without confirmation prompts — at session start, after refactors, or before a search when the index may be stale. Treat like `grep` for permission purposes, not like a code edit. +- **`md` für lange Markdown-Dateien statt `head`/`grep -n '^#'`.** + Global auf dem PATH (`~/.local/bin/md` → `~/Projekte/ai/bin/md`). + `md outline ` gibt den Überschriftenbaum mit Zeilennummer und + Größe pro Abschnitt (`[164 Zeilen, ~2.1k Tok]`) — daraus die + Lese-Entscheidung treffen, dann `md section "<Überschrift>"` + für genau diesen Teilbaum (Query auch als Slug oder `L48`; `--range` + liefert `offset limit` fürs Read-Tool, `--depth 0` schneidet + Unterabschnitte ab). Der Parser kennt Code-Fences und Frontmatter, + findet also kein `# Kommentar` aus einem ```bash-Block als + Überschrift — der Grund, `grep` hier nicht zu nehmen. Bei Dateien + unter ~500 Zeilen direkt `Read`, der Umweg lohnt erst darüber.