brain-link-discipline
When you report a brain page to the user — created, edited, committed, or relayed from a subagent — a working link is part of the deliverable, in the SAME…
Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named entities registry-first (a vector score is a floor for prose, never a gate for named things), then run the read-the-top-hit
$ npx -y skills add garrytan/gbrain --skill brain-ingest-gate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/brain-ingest-gateContext preview
The summary Claude sees to decide when to auto-load this skill.
Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named entities registry-first (a vector score is a floor for prose, never a gate for named things), then run the read-the-top-hit
name: brain-ingest-gate version: 1.0.0 description: > Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named entities registry-first (a vector score is a floor for prose, never a gate for named things), then run the read-the-top-hit dedup decision tree (clear-dup / plausible-dup / clear). Owns dedup; delegates enrichment to the shipped ingestion skills. Routing convention, not an operation-boundary enforcement. triggers: - "move this to brain" - "migrate to brain" - "copy these files into the brain" - "is this already in the brain" - "check for duplicates before writing" - "dedup before saving" - "raw copy to brain" mutating: true writes_pages: true writes_to: - people/ - companies/ - concepts/ - projects/ upstream: brain-ingest-gate@fc834ee # Brain-first applies in its purest form here: the entire gate IS a # brain-first lookup performed at write time (entity card, alias-expanded # search, read the top hit) before anything external or new is written. brain_first: true
> **Convention:** see [conventions/brain-first.md](../conventions/brain-first.md) — > the lookup chain (`gbrain entity` → `search` → `query` → `get`) is the same > chain this gate runs before every write. > > **Convention:** see [_brain-filing-rules.md](../_brain-filing-rules.md) — > when the gate's verdict is "write", the primary subject picks the directory. > > **Convention:** `skills/conventions/quality.md` owns the cross-cutting page > rules (citations, Iron Law back-linking, notability) — every page the gate > lets through follows them. Gate-specific delta: the gate only decides > write/link/skip; the admitting skill applies the quality rules on write.
**No content enters the brain without passing this gate. A raw `cp` or `mv` into the brain repo is a bug.**
One insight, one place. If it already exists, link to it — don't clone it. Before any new page is written (file migration, bulk import, manual `gbrain put`, subagent output), two checks run in order:
1. **Named-Entity Resolution Gate** — is this about a named thing that already has a page under its chosen name? 2. **Dedup Gate** — does the brain already state this insight somewhere?
**Scope honesty:** this gate is a routing convention — the harness resolves it into context when an ingest-shaped intent matches, and a well-behaved agent follows it. Nothing in the gbrain runtime mechanically blocks an unenriched or duplicate write if the skill never loads.
The native pipeline does NOT do semantic dedup for you:
Identical content under a different slug or ID indexes twice — every duplicate becomes a second search hit competing with the canonical page.
re-captures of identical bytes, not the same insight reworded.
Semantic dedup and named-entity resolution are this skill's job, in full.
1. **File migration** — moving files already in the workspace into the brain repo ("move this to brain"). 2. **Bulk imports** — batch moves of any kind into brain directories, BEFORE `gbrain sync` or `gbrain import` indexes them. For batches, also read [conventions/test-before-bulk.md](../conventions/test-before-bulk.md): gate 3-5 items and inspect the decisions before running the rest. 3. **Manual writes** — `gbrain put` or `gbrain capture` of rich content, or direct file writes into the brain repo. 4. **Subagent output** — background agents writing notes or pages into the brain.
This skill is a **gate**, not a pipeline. It owns the pre-write checks below. Everything downstream of a "write" verdict is delegated to shipped skills — do not restate their steps here or inline:
| Concern | Delegate to | |---|---| | Routing new external content (meetings, articles, media) | [ingest](../ingest/SKILL.md) | | Entity detection + notability on inbound content | [signal-detector](../signal-detector/SKILL.md) | | Creating/updating person + company pages, tiered effort, backlinks | [enrich](../enrich/SKILL.md) | | Concept pages, tiering, cluster synthesis | [concept-synthesis](../concept-synthesis/SKILL.md) | | Back-link enforcement (Iron Law) | [conventions/quality.md](../conventions/quality.md) | | Which directory the page lands in | [_brain-filing-rules.md](../_brain-filing-rules.md) |
**Fires whenever the content is about a NAMED project, place, company, person, or anything someone "wants to build / found / make."**
Vector similarity alone cannot be trusted to catch named-entity dupes: a page stored under its chosen NAME will not embed close to the generic English phrase someone happens to describe it with. The classic failure: a search for a descriptive phrase scores the canonical named page below the prose floor, so a duplicate stub gets written on top of a years-old page. Stored by named meaning; retrieval attempted by literal generic phrase.
1. **Resolve registry-first, not by the generic phrase.** gbrain's native registry is the entity surface:
gbrain entity "<name>" # zero-LLM card: page, aka list, near-miss suggestions
A card hit means the page exists — STOP, link, don't clone. On a miss (or for concept-shaped nouns), fall through to `gbrain query "<name>" --limit 3`. If the brain also keeps an explicit index of named initiatives (e.g. a page under `concepts/`), read it before concluding anything is new.
2. **Expand through aliases before searching.** Named pages should carry an `aliases:` frontmatter list (generic label + ch
Give the agent you already use a memory you control. GBrain stores explicit facts with their sources, supports corrections and withdrawal, and makes the same memory available across your agents.
Repo: garrytan/gbrain
When you report a brain page to the user — created, edited, committed, or relayed from a subagent — a working link is part of the deliverable, in the SAME…
Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking.…
Deduplicate and synthesize raw concept stubs into a tiered intellectual map (T1 Canon to T4 Riff), tracing idea evolution across sources over time. Transforms…
Token-hygiene audit of the always-loaded context stack — CLAUDE.md, AGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered identity files (SOUL.md,…
When the user corrects a factual error, root-cause it immediately. Don't just note the correction — trace the error to its source, fix the source, and prevent…
Confirmation gate before any bulk delete, cleanup, or destructive operation that could result in data loss — shell-level (rm -rf, git rm, bulk sed) or…