meta-collect-knowledge
Memory cascades DOWN one ancestor chain, so knowledge filed in a SIBLING project - or in a
completely different knowledge TREE (a machine can carry several independent tree tops) - never
reaches the current project on its own. This skill is the inbound gather: find knowledge
elsewhere that is relevant here and bring it in safely.
REQUIRED BACKGROUND: the storage spec (trees/anchors, slug store, engine fail-loud contract)
is bitranox:meta-self-improve -> references/memory-backend.md.
When to run
- Manual: "collect knowledge",
/collect-knowledge.
- New-project init: seed a fresh project from the existing tree so it starts informed.
- Opportunistic: a captured learning reveals a topic this project now touches - gather that topic.
- As
bitranox:meta-dream-crosstree's inbound pass (the dream delegates here).
Relevance needs a topic (descriptor-first)
The query is the project's scope descriptor (the bitranox:self-learning block in its
CLAUDE.local.md) or the topic of the triggering learning. At a brand-new project: first infer
the descriptor (README, dir name, package metadata, the parent's descriptor); if scope is still
unknown, defer - a blind gather pulls noise.
Procedure (grep -> inspect -> import)
- Stage 1 - cheap grep (no model).
python3 <this-skill-dir>/gather_scan.py --topic "<scope or topic>" --self "<cwd>". It greps other projects' curated slug-store bodies + native memory
and prints candidates GROUPED BY KNOWLEDGE TREE (TREE: <top> headers; the native tier is
labeled native-tier (machine-local) - that whole string is the label, so grep for it, not for
machine-local alone). With cross_tree_search=false (the knob defaults to true) the scan stays inside the CURRENT tree;
pass --cross-tree for a deliberate cross-tree gather. Nothing matched -> stop (the whole
gather cost one grep).
- Optional MCP boost: with the
mcp_search knob auto and a covering basic-memory index,
the same command prints MCP-CANDIDATES (read-only search, never the store; the keyword
grep is always the base).
- Stage 2 - inspect (model, context-isolated). Dispatch a
sonnet subagent to read the
candidate files and return only what is genuinely useful to THIS project, privacy-scrubbed;
discard near-misses. (Tier per bitranox:process-agents-subagent-driven-development.)
- Stage 3 - import by the tree rules:
- Same tree, useful beyond this project -> LIFT to the lowest common ancestor level
(engine
move/add at that level; honor the promotion corroboration gate; keep it
concrete).
- Same tree, only relevant here -> self-contained COPY into this project's memory (engine
add).
- ANOTHER tree -> ALWAYS a self-contained, labeled COPY; trees share no ancestor, so
lifting is impossible and a cross-tree
[[reference]] would dangle. Never link across
trees.
- Privacy scrub on anything crossing a boundary. Scrub secrets/PII before writing; never
carry a credential across. Concrete operational detail (paths, hostnames) is the useful part -
keep it.
- Debounce. Record the (project, topic) as gathered so the same topic is not re-grepped on
every trigger:
gather_scan.py --topic "<topic>" --mark. Ask before spending a scan with
--seen (exit 0 already gathered, 1 not), which answers from the record and walks nothing.
Neither GATES a scan - a scan you ask for still runs, whatever the record says, so --seen
is advice to the caller rather than a lock. The record lives OUT of the curated store on
purpose: written into it, it would be a fact, and the next dream would tidy, promote or
dedup a bookkeeping row.
- Verify + report.
reconcile_memory_index.py --check <altitude chain> (home:
<plugin>/skills/meta-self-improve/reconcile_memory_index.py, launch via
hooks/run-python.sh) must end
TOTAL problems: 0. Report lifted vs copied, one line each; nothing relevant -> one line.
Deliverables (a completed gather has ALL of these)
Rationalizations (these do not fly)
| Excuse |
Reality |
| "A reference to the other tree's fact is cheaper than a copy" |
It is not loaded here and dangles when that tree moves or dies. Cross-tree is ALWAYS a copy. |
| "Skip the TREE labels, the paths make it obvious" |
The labels are the boundary-crossing audit trail; the dream and the user read them. |
| "Seed everything, the project is new" |
A blind gather imports noise the dream then has to prune. Descriptor first, topic-matched only. |
| "cross_tree_search is false but this one fact is fine" |
The wall is the user's setting. Cross it only with the explicit --cross-tree act, as a labeled copy. |
Common mistakes
- Gathering without a topic (blind, irrelevant pulls).
- A cross-tree reference instead of a labeled copy (dangles on deletion).
- Re-promoting a gathered copy on the next dream. The debounce is
gather_scan.py's own
gathered-topics.tsv, kept OUT of the store so a dream does not tidy it away. A provenance
mark never prevented this: nothing read it, and provenance was removed in 5.300.0.
- Importing an ancestor's knowledge the cascade already provides (the scan groups it under this
tree's top - check before copying).
1---2name: meta-collect-knowledge3description: Use to pull in knowledge from your OTHER projects or trees that is relevant to the current one - on "collect knowledge", "/collect-knowledge", when starting/seeding a fresh project, or when a learning reveals a topic this project now touches. Cascade only flows down one ancestor chain, so useful knowledge filed in a sibling project or another knowledge tree is otherwise invisible here; this gathers it in safely. Also runs as the inbound pass of bitranox:meta-dream-crosstree.4---56# meta-collect-knowledge78Memory cascades DOWN one ancestor chain, so knowledge filed in a SIBLING project - or in a9completely different knowledge TREE (a machine can carry several independent tree tops) - never10reaches the current project on its own. This skill is the **inbound gather**: find knowledge11elsewhere that is relevant here and bring it in safely.1213**REQUIRED BACKGROUND:** the storage spec (trees/anchors, slug store, engine fail-loud contract)14is `bitranox:meta-self-improve` -> `references/memory-backend.md`.1516## When to run1718- Manual: "collect knowledge", `/collect-knowledge`.19- New-project init: seed a fresh project from the existing tree so it starts informed.20- Opportunistic: a captured learning reveals a topic this project now touches - gather that topic.21- As `bitranox:meta-dream-crosstree`'s inbound pass (the dream delegates here).2223## Relevance needs a topic (descriptor-first)2425The query is the project's scope descriptor (the `bitranox:self-learning` block in its26`CLAUDE.local.md`) or the topic of the triggering learning. At a brand-new project: first infer27the descriptor (README, dir name, package metadata, the parent's descriptor); if scope is still28unknown, defer - a blind gather pulls noise.2930## Procedure (grep -> inspect -> import)31321. **Stage 1 - cheap grep (no model).** `python3 <this-skill-dir>/gather_scan.py --topic "<scope33 or topic>" --self "<cwd>"`. It greps other projects' curated slug-store bodies + native memory34 and prints candidates GROUPED BY KNOWLEDGE TREE (`TREE: <top>` headers; the native tier is35 labeled `native-tier (machine-local)` - that whole string is the label, so grep for it, not for36`machine-local` alone). With `cross_tree_search=false` (the knob defaults to true) the scan stays inside the CURRENT tree;37 pass `--cross-tree` for a deliberate cross-tree gather. Nothing matched -> stop (the whole38 gather cost one grep).39 - Optional MCP boost: with the `mcp_search` knob `auto` and a covering `basic-memory` index,40 the same command prints `MCP-CANDIDATES` (read-only search, never the store; the keyword41 grep is always the base).422. **Stage 2 - inspect (model, context-isolated).** Dispatch a `sonnet` subagent to read the43 candidate files and return only what is genuinely useful to THIS project, privacy-scrubbed;44 discard near-misses. (Tier per `bitranox:process-agents-subagent-driven-development`.)453. **Stage 3 - import by the tree rules:**46 - **Same tree, useful beyond this project** -> LIFT to the lowest common ancestor level47 (engine `move`/`add` at that level; honor the promotion corroboration gate; keep it48 concrete).49 - **Same tree, only relevant here** -> self-contained COPY into this project's memory (engine50 `add`).51 - **ANOTHER tree** -> ALWAYS a self-contained, labeled COPY; trees share no ancestor, so52 lifting is impossible and a cross-tree `[[reference]]` would dangle. Never link across53 trees.544. **Privacy scrub on anything crossing a boundary.** Scrub secrets/PII before writing; never55 carry a credential across. Concrete operational detail (paths, hostnames) is the useful part -56 keep it.575. **Debounce.** Record the (project, topic) as gathered so the same topic is not re-grepped on58 every trigger: `gather_scan.py --topic "<topic>" --mark`. Ask before spending a scan with59 `--seen` (exit 0 already gathered, 1 not), which answers from the record and walks nothing.60 Neither GATES a scan - a scan you ask for still runs, whatever the record says, so `--seen`61 is advice to the caller rather than a lock. The record lives OUT of the curated store on62 purpose: written into it, it would be a fact, and the next dream would tidy, promote or63 dedup a bookkeeping row.646. **Verify + report.** `reconcile_memory_index.py --check <altitude chain>` (home:65 `<plugin>/skills/meta-self-improve/reconcile_memory_index.py`, launch via66 `hooks/run-python.sh`) must end67 `TOTAL problems: 0`. Report lifted vs copied, one line each; nothing relevant -> one line.6869## Deliverables (a completed gather has ALL of these)7071- [ ] A topic/descriptor stated BEFORE scanning (no blind gather).72- [ ] Stage-1 candidate list with per-tree `TREE:` labels (or a one-line "nothing matched").73- [ ] Every import via the engine.74- [ ] Privacy scrub applied to everything copied across a boundary (no credential carried across).75- [ ] Zero cross-tree or downward `[[references]]` introduced (reconcile 0 problems).76- [ ] The lifted-vs-copied report.7778## Rationalizations (these do not fly)7980| Excuse | Reality |81|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------|82| "A reference to the other tree's fact is cheaper than a copy" | It is not loaded here and dangles when that tree moves or dies. Cross-tree is ALWAYS a copy. |83| "Skip the TREE labels, the paths make it obvious" | The labels are the boundary-crossing audit trail; the dream and the user read them. |84| "Seed everything, the project is new" | A blind gather imports noise the dream then has to prune. Descriptor first, topic-matched only. |85| "cross_tree_search is false but this one fact is fine" | The wall is the user's setting. Cross it only with the explicit --cross-tree act, as a labeled copy. |8687## Common mistakes8889- Gathering without a topic (blind, irrelevant pulls).90- A cross-tree reference instead of a labeled copy (dangles on deletion).91- Re-promoting a gathered copy on the next dream. The debounce is `gather_scan.py`'s own92 `gathered-topics.tsv`, kept OUT of the store so a dream does not tidy it away. A provenance93 mark never prevented this: nothing read it, and provenance was removed in 5.300.0.94- Importing an ancestor's knowledge the cascade already provides (the scan groups it under this95 tree's top - check before copying).