Make capture default to inbox source#1387
Open
Mikemansour wants to merge 2 commits into
Open
Conversation
Why: - Plain gbrain capture should be safe for human thoughts even when run inside a repo with .gbrain-source. - Repo/source writes should require explicit source intent. Changes: - Plain capture now writes to default unless --source or GBRAIN_SOURCE is set. - Capture help documents the inbox-first source policy. - Regression tests cover dotfile ignore, explicit --source, and GBRAIN_SOURCE. Verification: - bun test test/commands/capture.test.ts test/source-resolver-with-tier.test.ts - git diff --check Trace: - Axiom issue: Mikemansour/axiom#9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Make
gbrain capture "thought"safe as a human inbox command when run from inside repos that have.gbrain-source, while preserving explicit source routing for operators.Changes
--sourceorGBRAIN_SOURCEis set.--source <id>still routes capture to the explicit source.GBRAIN_SOURCE=<id>still routes capture to the operator-selected source.last_retrieved_atwritebacks.Verification
bun test test/commands/capture.test.ts test/source-resolver-with-tier.test.ts: 35 pass, 0 failgit diff --checkContext
This came from Axiom issue #9: plain capture from
/Users/mike/axiominherited.gbrain-sourceand wrote to the Axiom source mirror instead of the general inbox. For human-facing quick capture, cwd source inheritance is surprising; repo/source writes should be explicit.