dotfiles / rag
AGENTS.md16 starsChanged 4 months agoMITView on GitHub
After any change:
In this repository105 other files it gives its agents.
- ableton/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- aichat/AGENTS.mdAGENTS.md
- aider/AGENTS.mdAGENTS.md
- annepro2/AGENTS.mdAGENTS.md
- atuin/AGENTS.mdAGENTS.md
- btop/AGENTS.mdAGENTS.md
- chromium-vimium-extension/AGENTS.mdAGENTS.md
- claude-code/AGENTS.mdAGENTS.md
- codex/AGENTS.mdAGENTS.md
- contextMenu/AGENTS.mdAGENTS.md
- cron/AGENTS.mdAGENTS.md
- crush/AGENTS.mdAGENTS.md
- docker/AGENTS.mdAGENTS.md
- docker-logger/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- eqmac/AGENTS.mdAGENTS.md
- eza/AGENTS.mdAGENTS.md
- firefox-vimium-addon/AGENTS.mdAGENTS.md
- fork/AGENTS.mdAGENTS.md
- hammerspoon/AGENTS.mdAGENTS.md
- hermes/AGENTS.mdAGENTS.md
- heroic/AGENTS.mdAGENTS.md
- homebrew/AGENTS.mdAGENTS.md
- iina/AGENTS.mdAGENTS.md
- immich/AGENTS.mdAGENTS.md
- install/AGENTS.mdAGENTS.md
- iterm/AGENTS.mdAGENTS.md
- karabiner/AGENTS.mdAGENTS.md
- keyboard-layout/AGENTS.mdAGENTS.md
- lazydocker/AGENTS.mdAGENTS.md
- lazygit/AGENTS.mdAGENTS.md
- litellm/AGENTS.mdAGENTS.md
- macos/AGENTS.mdAGENTS.md
- macos_cleanup/AGENTS.mdAGENTS.md
- macos_update/AGENTS.mdAGENTS.md
- marta/AGENTS.mdAGENTS.md
- mistral-vibe/AGENTS.mdAGENTS.md
- noti/AGENTS.mdAGENTS.md
- npm/AGENTS.mdAGENTS.md
- opencode/AGENTS.mdAGENTS.md
- python/AGENTS.mdAGENTS.md
- qdrant/AGENTS.mdAGENTS.md
- qwen-code/AGENTS.mdAGENTS.md
- rtk/AGENTS.mdAGENTS.md
- tmux/AGENTS.mdAGENTS.md
- uv/AGENTS.mdAGENTS.md
- voiceink/AGENTS.mdAGENTS.md
- vscode/AGENTS.mdAGENTS.md
- xcode/AGENTS.mdAGENTS.md
- zap/AGENTS.mdAGENTS.md
- zsh/AGENTS.mdAGENTS.md
- ableton/CLAUDE.mdCLAUDE.md
- aichat/CLAUDE.mdCLAUDE.md
- aider/CLAUDE.mdCLAUDE.md
- annepro2/CLAUDE.mdCLAUDE.md
- atuin/CLAUDE.mdCLAUDE.md
- btop/CLAUDE.mdCLAUDE.md
- chromium-vimium-extension/CLAUDE.mdCLAUDE.md
- claude-code/CLAUDE.mdCLAUDE.md
- The first 60 shown.
The file
Files
rag — agent rules
Eval corpus
- Eval files:
dotfilesuses the canonical real file rag.eval.json; every other collection usesrag.eval.<collection>.json(symlinks into../../dotfiles_private/rag/— private content stays off the public repo). Automation that writes eval cases MUST routedotfiles→rag.eval.json, neverrag.eval.dotfiles.json. - In any eval file, hand-written cases (
"manual": true, or simply no"auto"flag) are read-only for automation. Only"auto": truecases are edited/retired by scripts/rag-improve.py. - A case
{q, must_contain|must_hit_path}is valid only if the substring is actually retrievable. Verify new cases with scripts/verify-case.py (same retrieval path asrag eval) before adding — don't hand-add unverified cases.
Load-bearing internals — don't break
- Chunk header
File: <path>\nSummary: <line>\n\n(built in scripts/rag-ingest.py) is load-bearing. Touching it invalidates the index →rag drop <collection> && rag refresh <collection>. - Scripts import
rag-eval.pyviaimportlib(hyphen filename). Don't rename its helpers —embed() search() search_hybrid() search_then_rerank() run_case() check_assertion() http_json()— importers (rag-improve.py,verify-case.py,rerank-ab.py,answer-ab.py) break silently. rag improvelocks per collection:/tmp/rag-improve.<collection>.lock;--allrotates collections via cursor/tmp/rag-improve.rotation.json. Never spawn parallel runs of the SAME collection.- Depends on
auto+embedaliases in ../litellm/config.yaml. Embed dim is 2048 — swapping it requires re-ingesting ALL collections.
LiteLLM semantic cache — mandatory on chat calls
- Any chat call on an answer / eval / decompose path MUST send
"cache": {"no-cache": True}. The cache matches by embedding similarity, so without it a novel question gets back a DIFFERENT prompt's cached completion (e.g. case-gen JSON, or an answer about the wrong topic).rag-ask.pyandrag-answer-eval.pyalready do this — copy it into any new chat call.
Retrieval / answer behaviour
- Reranker is OFF by default and stays off. A/B (docs/retrieval-benchmark.md) showed hybrid (vector+FTS RRF) already saturates retrieval; rerank only reorders the same top-k unless
RAG_RERANK_FETCH_K> evaltop_k, and even wide it scored +0pp for 10–30 s/query cost. Re-runscripts/rerank-ab.pybefore reconsidering. answer-evaldefaults: answer modelgpt(whatrag askserves), judgegithub-gpt4o-mini(non-reasoning — clean verdicts, no<think>leak), top-10 chunks (matchesrag ask). The oldfast/fastdefault was an unreliable grader, not a real quality signal.rag ask --decomposesplits a multi-hop question into sub-questions, retrieves per sub-question, answers over the union — opt-in (extra LLM call + N retrievals), for chained/complex questions where one query misses a hop.append_gaponly logs a gap when the source file exists, is non-empty, and theexpectsubstring literally occurs in it — keepsrag-improvenoise (deleted/empty files, invented needles) out of the gap log.
Conventions
- New scripts go in
scripts/. Reuserag-eval.pyhelpers viaimportlib— don't duplicate HTTP/embed/rerank logic. The side-effect-free A/B harnesses (verify-case.py,rerank-ab.py,answer-ab.py) are the pattern: take args/stdin, print JSON, write nothing. rag.private.conf(private collections) is tracked indotfiles_privateand symlinked here; gitignored in the public repo.
After any change:
rag status # both services up
rag eval | tail -1 # dotfiles pass rate stable (other suites: rag eval rag.eval.<collection>.json)
rag improve --dry-run --files-per-run 1 # loop still worksDoes 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.

