-
Notifications
You must be signed in to change notification settings - Fork 15
feat: knowledge intake and consolidation (v1.36.0) #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7d09915
chore(brainstorm): knowledge-intake-and-consolidation
solaitken 1210edc
feat(intake): inbound Telegram capture bot plus /catchup with capture…
solaitken 3a4cd72
feat(intake): inbox-drain classify-and-route pass over staged capture…
solaitken 5e27db8
feat(synthesis): causal context, decomposed confidence, evidence-iden…
solaitken b261e15
feat(diarization): subject profile with a stated-vs-evidenced gap (S2…
solaitken 9e8c4eb
feat(dream): count-triggered fact rollup ladder in the synthesize pha…
solaitken 2be68c0
feat(research): keyed web-research providers plus full-page extract (…
solaitken 08725e3
feat(link-graph): deterministic memory-graph repair lane with efficac…
solaitken e5faf7c
feat(skill-proposals): verifier gate, versioning, and same-name merge…
solaitken 43d7425
fix(brain): holdout gate fails on unhydrated graph targets per design
solaitken 4d05384
fix(brain): expose synthesis causal context, confidence components, a…
solaitken dfeaeb3
docs: document the knowledge intake and consolidation wave, bump to 1…
solaitken 9ca0257
fix: address CodeRabbit review feedback
solaitken f673a46
fix(capture): exponential backoff on repeated long-poll transport fai…
solaitken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
39 changes: 39 additions & 0 deletions
39
docs/brainstorm/knowledge-intake-and-consolidation/cli-output/claude.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ### Variant 1: Convention-first, zero extraction | ||
|
|
||
| - **Approach**: Extract no shared modules. Each of the eight tasks lands self-contained in kanban order (1→8); the capture note shape, env-gating pattern, and evidence-identity fields are documented conventions (in code comments plus a short docs page), with each consumer implementing its own copy. Task 2 pattern-matches whatever frontmatter task 1 happened to write; tasks 5 and 6 each define their own evidence-identity fields; task 3 builds its own gated fetch-plus-cache inline. | ||
| - **Trade-offs**: | ||
| - Pro: lowest upfront cost; all eight tasks are parallelizable with no blocking dependency chain. | ||
| - Pro: no speculative abstraction; every line shipped has exactly one consumer today. | ||
| - Con: the capture contract is defined implicitly by task 1's output and re-derived by task 2's parser - a drift bug factory, and the drain pass's structural classification (frontmatter, markers) depends on that shape being exact. | ||
| - Con: evidence-identity duplicated between the finding gate (6) and diarization gap section (5) means two vocabularies that will diverge, and "excluded for missing proof identity" will mean different things in two reports. | ||
| - Con: keyed env gating plus typed network errors plus cache implemented at least twice (Brave/Tavily, page extract), likely three times (Telegram polling). | ||
| - **Complexity**: small | ||
| - **Risk**: medium (drift between paired tasks 1/2 and 5/6 is near-certain rework inside the same PR) | ||
|
|
||
| ### Variant 2: Two hard seams, two conventions | ||
|
|
||
| - **Approach**: Extract exactly the two seams that have concrete dual consumers with real coupling: (a) a capture-note contract module (frontmatter `kind`, provenance, timestamps, staging/archive paths) that the Telegram bot writes through and the inbox drain reads through, anchored on the existing inbox-vs-processed distinction in forget-plan.ts; (b) a small keyed-env-gated HTTP fetch helper (Bearer auth, typed errors, shared cache) used by Brave, Tavily, and full-page extract - Telegram may adopt it but keeps its existing token plumbing. Evidence-identity (seam 3) stays a shared exported type plus predicate in the deep-synthesis types, not a module; dream extension (seam 4) stays "the rollup ladder is ordinary code in the synthesize phase" - no plugin registry. Each seam lands inside the commit of its first consumer (contract with task 1, fetch helper with task 3), preserving one-atomic-commit-per-task. Ordering: 1→2 (intake track), 6→5 then 4 (consolidation track), 3 anywhere before or parallel, 7 and 8 fully independent. | ||
| - **Trade-offs**: | ||
| - Pro: the two extractions are exactly where silent drift would break a same-PR sibling task; the two non-extractions avoid frameworks with one consumer. | ||
| - Pro: type-level evidence-identity gives 5 and 6 one vocabulary at zero runtime cost, and the compiler enforces it - fits the deterministic-kernel and no-new-deps constraints. | ||
| - Pro: ordering gives each track a contract-defining task first (1 defines captures, 6 defines evidence identity), so downstream tasks consume rather than guess; the two tracks plus 3/7/8 can proceed in parallel. | ||
| - Con: seam-inside-first-consumer-commit means task 2's author must wait for task 1's commit (and 5 waits on 6); mild serialization within tracks. | ||
| - Con: if a fourth network consumer appears later (e.g. more providers), the minimal fetch helper may need a second pass; accepted as cheap. | ||
| - **Complexity**: medium | ||
| - **Risk**: low | ||
|
|
||
| ### Variant 3: Platform-first, four subsystems | ||
|
|
||
| - **Approach**: Treat all four candidate seams as first-class subsystems landed before any feature task: an intake staging bus (contract, writer API, reader iterator, archive semantics), a `net/` gateway (provider registry, env gating, cache, budgets) that all network callers must route through including Telegram, a synthesis evidence-identity module with decomposed-confidence types, and a formal dream-phase extension registry into which the rollup ladder plugs and which the repair lane explicitly declines. Feature tasks then become thin consumers, in any order. | ||
| - **Trade-offs**: | ||
| - Pro: cleanest long-term layering; future intake sources and providers slot in without touching consumers. | ||
| - Pro: eliminates all cross-task drift by construction; every seam has a single owner file. | ||
| - Con: the dream-phase registry is a framework whose only new client is the rollup ladder - and the wave's own spec says the repair lane is NOT a dream phase, so half the registry's motivation is explicitly out of scope. Speculative generality against this repo's "no stubs, no do-nothing surfaces" ethos. | ||
| - Con: forcing Telegram long-polling through a generic gateway fights its existing, working token/config plumbing in telegram.ts, contradicting the task's "reuse existing plumbing" instruction. | ||
| - Con: subsystem-first commits are not attributable to any one kanban task, straining the one-atomic-commit-per-task convention, and the whole wave serializes behind platform work. | ||
| - **Complexity**: large | ||
| - **Risk**: high | ||
|
|
||
| ### Recommended: Variant 2 | ||
|
|
||
| **Rationale**: The rework risk in this wave is concentrated in exactly two places - the task-1/task-2 capture contract and the task-5/task-6 evidence vocabulary - and Variant 2 hardens the first as a module and the second as a shared type, which is proportionate to two consumers each. Variant 1 guarantees same-PR drift on those pairs, while Variant 3 builds a dream-extension framework the spec itself undercuts and violates the repo's aversion to speculative surfaces and its commit-per-task convention. Variant 2 also yields the best ordering story: each track opens with its contract-defining task, keeping the eight commits atomic and the two tracks parallel. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.