Problem
gbrain query and gbrain search return cross-source results with no way to filter by source_id. When a gbrain brain has multiple ingested sources (wiki articles, user diaries, external docs), queries intended for one source surface results from others.
Current workaround
We filter results client-side by maintaining a slug allowlist of wiki article filenames and discarding any gbrain result whose slug is not in the allowlist. This works but requires N+1 filesystem reads and doesn't scale to sources with non-slug-based identifiers.
Requested
A --source <source_id> flag on gbrain query:
gbrain query "how does Atlas route dispatch events" --source wiki --limit 5
And equivalently on gbrain search. The source_id should match the source identifier used in gbrain sync --source <id>.
Context
Problem
gbrain queryandgbrain searchreturn cross-source results with no way to filter by source_id. When a gbrain brain has multiple ingested sources (wiki articles, user diaries, external docs), queries intended for one source surface results from others.Current workaround
We filter results client-side by maintaining a slug allowlist of wiki article filenames and discarding any gbrain result whose slug is not in the allowlist. This works but requires N+1 filesystem reads and doesn't scale to sources with non-slug-based identifiers.
Requested
A
--source <source_id>flag ongbrain query:gbrain query "how does Atlas route dispatch events" --source wiki --limit 5And equivalently on
gbrain search. Thesource_idshould match the source identifier used ingbrain sync --source <id>.Context