Store valid_from/valid_to on leafs and filter search by calendar day without overloading D16 source staleness; stack start/start-assistant wires brain + PicoClaw.
2.8 KiB
2.8 KiB
name, description
| name | description |
|---|---|
| brain | Deduction search over the 2dph brain (Ladybug graph: ops corpus, portfolio, ssh hosts) with bin/brain/search.go instead of reading files or grepping repos. Use whenever a question starts with "where is", "what runs on", "which file describes", "who is", "how is X done", before opening any documentation. |
brain — deduction over facts and info
One embedded Ladybug graph (var/kb.lbug, read-only when queried) holding two
roots:
- facts — assertions backed by ≥2 independent sources (docker ps × compose
× ssh-config × docs),
confidence: confirmed. - info — descriptive/narrative leafs, searchable, never asserted.
Search = deduction: facts root first, info root second, web-search as the
second independent source when local roots cannot confirm. An answer is
confirmed only if it comes off the facts root; anything else is
(not confirmed).
bin/brain/search.go "Matrix federation" # pointers + snippets, YAML
bin/brain/search.go "onlyoffice postgres" --root facts # restrict to confirmed
bin/brain/search.go "where is cs-lexicon" --json | yq '.[].ref'
bin/brain/search.go "who works where" --as-of 2025-01-01 # D24 intervals
bin/brain/add.go --text T --root facts --source "a.md x b.md"
bin/brain/get.go <id> --body # full chunk only when needed
bin/brain/stats.go # index health
bin/brain/eval.go # recall@5 >= 0.95 gate (Go; Python bin/kb/eval is CI fallback)
bin/kb/search is a deprecated wrapper. --hop N walks
FROM_FILE / HAS_VERSION / AUTHORED from each hit (1=File, 3=Person).
--as-of YYYY-MM-DD keeps leafs whose valid_from/valid_to cover that day
(empty interval = always; not D16 source staleness).
Rules
- Search before you read. Never grep a repo for a concept the graph covers.
--root factsreturns only confirmed evidence-linked answers. Default shows facts first, then info leafs clearly marked(not confirmed).- If there is no facts hit,
bin/brain/search.goconsults SearXNG and adds awebblock (kept apart from graph hits).throttled/skipped/refusedare not evidence of absence.--root facts|infoand--no-webskip the web. - If recall looks wrong, run
bin/brain/eval.go; it gates control questions and should stay at or above 95% recall@5. - Contradictions (≥2 yes vs ≥2 no) stay
(not confirmed)untilbin/facts/audit contradictfirestemporal_freshnessorauthority_pairing. - Agents:
GET /openapi.jsonandPOST /mcponbin/brain/serve.go(same handlers; tool names match pathssearch/get/stats/audit). Generated list: tools.md. - Never report an unconfirmed single-source local answer as fact.