Skills

Brain Ingest Gate

Pre-write quality gate for content entering the brain.

Install

npx skills add garrytan/gbrain --skill brain-ingest-gate -g -a claude-code -y
Repository
garrytan/gbrain31.4k
Category
Writing
Updated
3d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

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.

Brain Ingest Gate, Resolve and Dedup Before Anything Enters the Brain

Convention: see 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, > 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.

The Rule

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.

Why gbrain needs this gate

The native pipeline does NOT do semantic dedup for you:

Read the whole SKILL.md on GitHub

More in Writing