[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N02YY5FTMR12VX3026DV41":3,"skill-same:01M6N02YY5FTMR12VX3026DV41":98},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":70,"commitSha":71,"skillDirectory":72,"forksCount":73,"repositoryHtmlUrl":74,"repositoryHomepageUrl":6,"ownerHtmlUrl":75,"ownerBlogUrl":76,"ownerDescription":77,"updatedAt":78,"install":79,"resources":91},"01M6N02YY5FTMR12VX3026DV41","brain-ingest-gate",null,"Pre-write quality gate for content entering the brain. No raw copies: a bare cp\u002Fmv 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 \u002F plausible-dup \u002F clear). Owns dedup; delegates enrichment to the shipped ingestion skills. Routing convention, not an operation-boundary enforcement.","garrytan\u002Fgbrain","garrytan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F19957?v=4","01M6DJCCDDG53MTYYRTXAXFG17","Garry Tan","01M6MZQZCEN3RRMD33E1X9ZZR9",32847,"MIT","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fbrain-ingest-gate\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"brain ingest gate","brain","ingest","gate","duplicates","new","when","bare","top","mv","move","people","files","writing","ingestion","never","write","read","decision","projects","migrate","vector","run","2026-11-10 10:12:30",false,"---\nname: brain-ingest-gate\nversion: 1.0.0\ndescription: >\n  Pre-write quality gate for content entering the brain. No raw copies: a bare\n  cp\u002Fmv into the brain repo is a bug. Before any new page lands, resolve named\n  entities registry-first (a vector score is a floor for prose, never a gate\n  for named things), then run the read-the-top-hit dedup decision tree\n  (clear-dup \u002F plausible-dup \u002F clear). Owns dedup; delegates enrichment to the\n  shipped ingestion skills. Routing convention, not an operation-boundary\n  enforcement.\ntriggers:\n  - \"move this to brain\"\n  - \"migrate to brain\"\n  - \"copy these files into the brain\"\n  - \"is this already in the brain\"\n  - \"check for duplicates before writing\"\n  - \"dedup before saving\"\n  - \"raw copy to brain\"\nmutating: true\nwrites_pages: true\nwrites_to:\n  - people\u002F\n  - companies\u002F\n  - concepts\u002F\n  - projects\u002F\nupstream: brain-ingest-gate@fc834ee\n# Brain-first applies in its purest form here: the entire gate IS a\n# brain-first lookup performed at write time (entity card, alias-expanded\n# search, read the top hit) before anything external or new is written.\nbrain_first: true\nwhen_to_use: \"Use when the user asks: \\\"move this to brain\\\", \\\"migrate to brain\\\", \\\"copy these files into the brain\\\", \\\"is this already in the brain\\\", \\\"check for duplicates before writing\\\".\"\n---\n\n# Brain Ingest Gate — Resolve and Dedup Before Anything Enters the Brain\n\n> **Convention:** see [conventions\u002Fbrain-first.md](..\u002Fconventions\u002Fbrain-first.md) —\n> the lookup chain (`gbrain entity` → `search` → `query` → `get`) is the same\n> chain this gate runs before every write.\n>\n> **Convention:** see [_brain-filing-rules.md](..\u002F_brain-filing-rules.md) —\n> when the gate's verdict is \"write\", the primary subject picks the directory.\n>\n> **Convention:** `skills\u002Fconventions\u002Fquality.md` owns the cross-cutting page\n> rules (citations, Iron Law back-linking, notability) — every page the gate\n> lets through follows them. Gate-specific delta: the gate only decides\n> write\u002Flink\u002Fskip; the admitting skill applies the quality rules on write.\n\n## The Rule\n\n**No content enters the brain without passing this gate. A raw `cp` or `mv`\ninto the brain repo is a bug.**\n\nOne insight, one place. If it already exists, link to it — don't clone it.\nBefore any new page is written (file migration, bulk import, manual\n`gbrain put`, subagent output), two checks run in order:\n\n1. **Named-Entity Resolution Gate** — is this about a named thing that\n   already has a page under its chosen name?\n2. **Dedup Gate** — does the brain already state this insight somewhere?\n\n**Scope honesty:** this gate is a routing convention — the harness resolves it\ninto context when an ingest-shaped intent matches, and a well-behaved agent\nfollows it. Nothing in the gbrain runtime mechanically blocks an unenriched or\nduplicate write if the skill never loads.\n\n## Why gbrain needs this gate\n\nThe native pipeline does NOT do semantic dedup for you:\n\n- **`gbrain import` \u002F `gbrain sync` skip only matching frontmatter IDs.**\n  Identical content under a different slug or ID indexes twice — every\n  duplicate becomes a second search hit competing with the canonical page.\n- **`gbrain capture`'s dedup is a 24-hour exact content-hash** — it catches\n  re-captures of identical bytes, not the same insight reworded.\n- **The `remember` verb dedupes facts, not pages.**\n\nSemantic dedup and named-entity resolution are this skill's job, in full.\n\n## When This Gate Fires\n\n1. **File migration** — moving files already in the workspace into the brain\n   repo (\"move this to brain\").\n2. **Bulk imports** — batch moves of any kind into brain directories, BEFORE\n   `gbrain sync` or `gbrain import` indexes them. For batches, also read\n   [conventions\u002Ftest-before-bulk.md](..\u002Fconventions\u002Ftest-before-bulk.md):\n   gate 3-5 items and inspect the decisions before running the rest.\n3. **Manual writes** — `gbrain put` or `gbrain capture` of rich content, or\n   direct file writes into the brain repo.\n4. **Subagent output** — background agents writing notes or pages into the\n   brain.\n\n## What This Gate Owns vs Delegates\n\nThis skill is a **gate**, not a pipeline. It owns the pre-write checks below.\nEverything downstream of a \"write\" verdict is delegated to shipped skills —\ndo not restate their steps here or inline:\n\n| Concern | Delegate to |\n|---|---|\n| Routing new external content (meetings, articles, media) | [ingest](..\u002Fingest\u002FSKILL.md) |\n| Entity detection + notability on inbound content | [signal-detector](..\u002Fsignal-detector\u002FSKILL.md) |\n| Creating\u002Fupdating person + company pages, tiered effort, backlinks | [enrich](..\u002Fenrich\u002FSKILL.md) |\n| Concept pages, tiering, cluster synthesis | [concept-synthesis](..\u002Fconcept-synthesis\u002FSKILL.md) |\n| Back-link enforcement (Iron Law) | [conventions\u002Fquality.md](..\u002Fconventions\u002Fquality.md) |\n| Which directory the page lands in | [_brain-filing-rules.md](..\u002F_brain-filing-rules.md) |\n\n## Named-Entity Resolution Gate (runs FIRST)\n\n**Fires whenever the content is about a NAMED project, place, company, person,\nor anything someone \"wants to build \u002F found \u002F make.\"**\n\nVector similarity alone cannot be trusted to catch named-entity dupes: a page\nstored under its chosen NAME will not embed close to the generic English\nphrase someone happens to describe it with. The classic failure: a search for\na descriptive phrase scores the canonical named page below the prose floor, so\na duplicate stub gets written on top of a years-old page. Stored by named\nmeaning; retrieval attempted by literal generic phrase.\n\n### The rules\n\n1. **Resolve registry-first, not by the generic phrase.** gbrain's native\n   registry is the entity surface:\n\n   ```bash\n   gbrain entity \"\u003Cname>\"        # zero-LLM card: page, aka list, near-miss suggestions\n   ```\n\n   A card hit means the page exists — STOP, link, don't clone. On a miss (or\n   for concept-shaped nouns), fall through to `gbrain query \"\u003Cname>\" --limit 3`.\n   If the brain also keeps an explicit index of named initiatives (e.g. a page\n   under `concepts\u002F`), read it before concluding anything is new.\n\n2. **Expand through aliases before searching.** Named pages should carry an\n   `aliases:` frontmatter list (generic label + chosen name + any nickname +\n   signature phrase). Search EACH alias and the generic label, not just the\n   phrase the user happened to say.\n\n3. **A vector score is a floor for prose, NEVER a gate for named things.**\n   If there is ANY plausible named match, open and read the candidate page\n   (`gbrain get \u003Cslug>`) before concluding it doesn't exist. A named page can\n   be the right answer at a score that would be a clear miss for prose.\n\n4. **When a NEW named thing appears, bake its aliases in the same write.**\n   Create the page with the full `aliases:` list so every future synonym\n   resolves through `gbrain entity`. One frontmatter list covers all future\n   phrasings — O(1), not a per-instance reminder.\n\n### Why a gate and not a memory note\n\nA memory reminder (\"query the real name, not the generic phrase\") is a\nper-instance sticky note: it only works if it happens to be in hot context\nthat turn, doesn't generalize to the next named entity, and rots. This skill\nloads when an ingest-shaped task routes here. Process rules belong in the\ntriggered gate, not in hot memory.\n\n## Dedup Gate (runs SECOND)\n\nBefore writing ANY new page (for named things, the resolution gate above runs\nfirst and takes precedence):\n\n1. **Extract the core claim** — 1-2 sentences capturing what's novel about the\n   new content.\n\n2. **Search for it:**\n\n   ```bash\n   gbrain search \"\u003Ccore claim>\" --limit 5\n   ```\n\n3. **OPEN AND READ the top hit** (`gbrain get \u003Cslug>`). Never band on the\n   score alone. Donor systems publish cosine cutoffs for this step — do NOT\n   port them: `gbrain search` returns fused hybrid rank scores, not cosine\n   similarity, and no numeric threshold maps across. The band comes from\n   reading, not from the number.\n\n4. **Assign a band:**\n\n   | Band | Meaning | Action |\n   |---|---|---|\n   | **clear-dup** | The top hit already states the same insight about the same subject | STOP. Link to the existing page (`gbrain link` \u002F `gbrain timeline-add`) instead of writing. |\n   | **plausible-dup** | Same territory; possibly a new angle | Read both fully. Same insight → link, don't write. Genuinely new angle → write WITH a cross-link to the existing page. |\n   | **clear** | Nothing in the top results covers the claim | Write normally through the delegated enrichment skills. |\n\n### Decision tree\n\n```\nNew content to write\n  ├─ Named thing? → Named-Entity Resolution Gate first\n  │    (entity card → alias-expanded search → READ the candidate)\n  ├─ Extract core claim (1-2 sentences)\n  ├─ gbrain search \"\u003Ccore claim>\" --limit 5\n  └─ OPEN AND READ the top hit (gbrain get \u003Cslug>)\n      ├─ clear-dup     → STOP. Link to existing. Report \"duplicate\".\n      ├─ plausible-dup → Read both. Same insight?\n      │    ├─ yes → STOP. Link to existing. Report \"duplicate\".\n      │    └─ no  → Write with cross-link. Report \"new angle\".\n      └─ clear         → Write via enrichment skills. Report \"unique\".\n```\n\n### When to skip dedup\n\n- **Operational\u002Fstate files** — time-series records, not knowledge.\n- **Meeting transcripts** — each meeting is unique by definition (entities\n  INSIDE it still go through the named-entity gate via the delegated skills).\n- **Timeline entries on existing pages** — back-links are additive, not\n  duplicative.\n- **Media files** — dedup by filename\u002Fhash, not semantic similarity.\n\n## Verification\n\nAfter the batch, verify the gate's output holds:\n\n```bash\ngbrain check-backlinks check            # mentioned entities link back (fix with: check-backlinks fix)\ngbrain backlinks \u003Cnew-slug>             # each new page has inbound links\ngbrain search \"\u003Ccore claim>\" --limit 3  # the insight has exactly ONE home\n```\n\nIf `check-backlinks check` reports gaps on pages the gate just admitted, the\nenrichment delegation was skipped — route back through\n[enrich](..\u002Fenrich\u002FSKILL.md) before declaring the ingest done.\n\n## Contract\n\nThis skill guarantees:\n\n- No new page enters the brain through this skill's flows without the\n  named-entity resolution check and the dedup check running first.\n- Every \"duplicate\" verdict names the matched slug and produces a link or\n  timeline entry instead of a clone.\n- New named-entity pages carry an `aliases:` frontmatter list in the same\n  write that creates them.\n- Dedup bands are assigned by READING the top hit, never by score alone; no\n  numeric similarity thresholds are used against gbrain's fused scores.\n- Enrichment is delegated to shipped skills (ingest, enrich, signal-detector,\n  concept-synthesis) — never restated or reimplemented inline.\n- Batches end with a `gbrain check-backlinks check` verification pass.\n- Routing matches the canonical triggers in the frontmatter.\n- Output written under the directories listed in `writes_to:`.\n- Privacy contract preserved: no real names, no fork-specific filesystem path\n  literals, no upstream-fork references.\n\nThe full behavior contract is documented in the body sections above; this\nsection exists for the conformance test.\n\n## Output Format\n\nOne decision line per item checked, then the verification result:\n\n```\nIngest gate — 3 item(s) checked\n\n| item | entity resolution | band | action |\n|---|---|---|---|\n| notes-on-widget-co.md | resolved: companies\u002Fwidget-co | clear-dup | linked (timeline entry on companies\u002Fwidget-co) |\n| pricing-thesis.md | n\u002Fa (prose) | plausible-dup | new angle — written to concepts\u002F with cross-link to concepts\u002Fpricing-power |\n| charlie-example-intro.md | miss (near-miss: people\u002Fcharlie-example) | — | read near-miss; same person → linked, no new page |\n\nVerification: check-backlinks check → 0 gaps on admitted pages\n```\n\nEvery \"linked\" or \"duplicate\" row MUST name the matched slug. If any row says\n\"written\", the enrichment delegation (which skill handled it) should be\nrecoverable from the conversation.\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- The \"is this already in the brain?\" search is empty with a degraded notice: an empty keyword-only result is not proof the content is missing. Check by slug, URL or exact title before importing.\n- `gbrain capture` \u002F `put` returns `write_pending` (exit 10): the content is accepted. Poll `gbrain write-request \u003Crequest_id>`; do not capture it again.\n- `source_binding_required` or `insufficient_scope` on an MCP write: this connection cannot write that source. Tell the user which source and scope are missing; the brain host's operator grants them.\n\n## Anti-Patterns\n\n- ❌ `cp file.md \u003Cbrain-repo>\u002Fconcepts\u002F` — raw copy, no gate, no enrichment.\n- ❌ Bulk `mv` of a folder into the brain repo, then `gbrain sync` — sync\n  happily indexes every duplicate; matching-ID skip will not save you.\n- ❌ Trusting a low vector score as proof a named thing has no page — named\n  pages don't embed near generic descriptions of them.\n- ❌ Banding on the search score without opening the top hit.\n- ❌ Porting numeric dedup thresholds from other systems onto gbrain's fused\n  scores.\n- ❌ Writing a new named page without its `aliases:` list — the next synonym\n  creates the next duplicate.\n- ❌ Reimplementing entity detection, backlinking, or concept linking inline\n  instead of delegating to the shipped skills.\n- ❌ Skipping the gate because the write is \"just one page\" via `gbrain put` —\n  single manual writes are where duplicate stubs come from.\n\n## Dedup (sharp boundaries)\n\n- **[capture](..\u002Fcapture\u002FSKILL.md)** — the quick-save front door; its dedup is\n  a 24h exact content-hash on identical bytes. This gate is the SEMANTIC +\n  named-entity layer for content entering the brain as real pages (migrations,\n  bulk imports, inbox graduation). \"capture this thought\" → capture; \"migrate\n  these files into the brain\" → this gate.\n- **[ingest](..\u002Fingest\u002FSKILL.md)** — the router for NEW external content\n  (meetings, articles, media) and its enrichment pipeline. ingest decides what\n  to DO with content; this gate decides whether a page should EXIST at all.\n  The gate fires before the write; ingest and its specialized skills handle\n  everything after a \"write\" verdict.\n- **[enrich](..\u002Fenrich\u002FSKILL.md)** — page creation\u002Fupdate mechanics (tiers,\n  citations, timelines, backlinks) AFTER this gate says \"write\" or \"link\".\n- **[concept-synthesis](..\u002Fconcept-synthesis\u002FSKILL.md)** — retroactive,\n  at-scale dedup of concept stubs that already slipped in. This gate is\n  prevention at write time; concept-synthesis is the cleanup pass. \"dedupe my\n  existing concepts\" → concept-synthesis.\n- **frontmatter-guard (host-side)** — the same standalone-gate pattern on an\n  orthogonal axis: structural validity of what's written vs (here) semantic\n  novelty of whether to write.\n- **[bulk-ingestion](..\u002Fbulk-ingestion\u002FSKILL.md)** — the bulk sibling. Its\n  pipeline dedup key (`source + source_id`) only makes RE-RUNS idempotent; it\n  does not catch cross-source duplicates or resolve named entities. This gate\n  is the semantic + named-entity layer bulk-ingestion runs on its Phase 3 trial\n  items and bakes into the codified pipeline (its Phase 1d\u002F6). \"Build a\n  large-corpus pipeline\" → bulk-ingestion; \"does this page already exist before\n  I write it\" → this gate.\n- **[data-loss-gate](..\u002Fdata-loss-gate\u002FSKILL.md)** — the inverse gate: it\n  stops data LEAVING the brain without confirmation; this gate stops data\n  ENTERING without resolution + dedup.\n","# Brain Ingest Gate — Resolve and Dedup Before Anything Enters the Brain\n\n> **Convention:** see [conventions\u002Fbrain-first.md](..\u002Fconventions\u002Fbrain-first.md) —\n> the lookup chain (`gbrain entity` → `search` → `query` → `get`) is the same\n> chain this gate runs before every write.\n>\n> **Convention:** see [_brain-filing-rules.md](..\u002F_brain-filing-rules.md) —\n> when the gate's verdict is \"write\", the primary subject picks the directory.\n>\n> **Convention:** `skills\u002Fconventions\u002Fquality.md` owns the cross-cutting page\n> rules (citations, Iron Law back-linking, notability) — every page the gate\n> lets through follows them. Gate-specific delta: the gate only decides\n> write\u002Flink\u002Fskip; the admitting skill applies the quality rules on write.\n\n## The Rule\n\n**No content enters the brain without passing this gate. A raw `cp` or `mv`\ninto the brain repo is a bug.**\n\nOne insight, one place. If it already exists, link to it — don't clone it.\nBefore any new page is written (file migration, bulk import, manual\n`gbrain put`, subagent output), two checks run in order:\n\n1. **Named-Entity Resolution Gate** — is this about a named thing that\n   already has a page under its chosen name?\n2. **Dedup Gate** — does the brain already state this insight somewhere?\n\n**Scope honesty:** this gate is a routing convention — the harness resolves it\ninto context when an ingest-shaped intent matches, and a well-behaved agent\nfollows it. Nothing in the gbrain runtime mechanically blocks an unenriched or\nduplicate write if the skill never loads.\n\n## Why gbrain needs this gate\n\nThe native pipeline does NOT do semantic dedup for you:\n\n- **`gbrain import` \u002F `gbrain sync` skip only matching frontmatter IDs.**\n  Identical content under a different slug or ID indexes twice — every\n  duplicate becomes a second search hit competing with the canonical page.\n- **`gbrain capture`'s dedup is a 24-hour exact content-hash** — it catches\n  re-captures of identical bytes, not the same insight reworded.\n- **The `remember` verb dedupes facts, not pages.**\n\nSemantic dedup and named-entity resolution are this skill's job, in full.\n\n## When This Gate Fires\n\n1. **File migration** — moving files already in the workspace into the brain\n   repo (\"move this to brain\").\n2. **Bulk imports** — batch moves of any kind into brain directories, BEFORE\n   `gbrain sync` or `gbrain import` indexes them. For batches, also read\n   [conventions\u002Ftest-before-bulk.md](..\u002Fconventions\u002Ftest-before-bulk.md):\n   gate 3-5 items and inspect the decisions before running the rest.\n3. **Manual writes** — `gbrain put` or `gbrain capture` of rich content, or\n   direct file writes into the brain repo.\n4. **Subagent output** — background agents writing notes or pages into the\n   brain.\n\n## What This Gate Owns vs Delegates\n\nThis skill is a **gate**, not a pipeline. It owns the pre-write checks below.\nEverything downstream of a \"write\" verdict is delegated to shipped skills —\ndo not restate their steps here or inline:\n\n| Concern | Delegate to |\n|---|---|\n| Routing new external content (meetings, articles, media) | [ingest](..\u002Fingest\u002FSKILL.md) |\n| Entity detection + notability on inbound content | [signal-detector](..\u002Fsignal-detector\u002FSKILL.md) |\n| Creating\u002Fupdating person + company pages, tiered effort, backlinks | [enrich](..\u002Fenrich\u002FSKILL.md) |\n| Concept pages, tiering, cluster synthesis | [concept-synthesis](..\u002Fconcept-synthesis\u002FSKILL.md) |\n| Back-link enforcement (Iron Law) | [conventions\u002Fquality.md](..\u002Fconventions\u002Fquality.md) |\n| Which directory the page lands in | [_brain-filing-rules.md](..\u002F_brain-filing-rules.md) |\n\n## Named-Entity Resolution Gate (runs FIRST)\n\n**Fires whenever the content is about a NAMED project, place, company, person,\nor anything someone \"wants to build \u002F found \u002F make.\"**\n\nVector similarity alone cannot be trusted to catch named-entity dupes: a page\nstored under its chosen NAME will not embed close to the generic English\nphrase someone happens to describe it with. The classic failure: a search for\na descriptive phrase scores the canonical named page below the prose floor, so\na duplicate stub gets written on top of a years-old page. Stored by named\nmeaning; retrieval attempted by literal generic phrase.\n\n### The rules\n\n1. **Resolve registry-first, not by the generic phrase.** gbrain's native\n   registry is the entity surface:\n\n   ```bash\n   gbrain entity \"\u003Cname>\"        # zero-LLM card: page, aka list, near-miss suggestions\n   ```\n\n   A card hit means the page exists — STOP, link, don't clone. On a miss (or\n   for concept-shaped nouns), fall through to `gbrain query \"\u003Cname>\" --limit 3`.\n   If the brain also keeps an explicit index of named initiatives (e.g. a page\n   under `concepts\u002F`), read it before concluding anything is new.\n\n2. **Expand through aliases before searching.** Named pages should carry an\n   `aliases:` frontmatter list (generic label + chosen name + any nickname +\n   signature phrase). Search EACH alias and the generic label, not just the\n   phrase the user happened to say.\n\n3. **A vector score is a floor for prose, NEVER a gate for named things.**\n   If there is ANY plausible named match, open and read the candidate page\n   (`gbrain get \u003Cslug>`) before concluding it doesn't exist. A named page can\n   be the right answer at a score that would be a clear miss for prose.\n\n4. **When a NEW named thing appears, bake its aliases in the same write.**\n   Create the page with the full `aliases:` list so every future synonym\n   resolves through `gbrain entity`. One frontmatter list covers all future\n   phrasings — O(1), not a per-instance reminder.\n\n### Why a gate and not a memory note\n\nA memory reminder (\"query the real name, not the generic phrase\") is a\nper-instance sticky note: it only works if it happens to be in hot context\nthat turn, doesn't generalize to the next named entity, and rots. This skill\nloads when an ingest-shaped task routes here. Process rules belong in the\ntriggered gate, not in hot memory.\n\n## Dedup Gate (runs SECOND)\n\nBefore writing ANY new page (for named things, the resolution gate above runs\nfirst and takes precedence):\n\n1. **Extract the core claim** — 1-2 sentences capturing what's novel about the\n   new content.\n\n2. **Search for it:**\n\n   ```bash\n   gbrain search \"\u003Ccore claim>\" --limit 5\n   ```\n\n3. **OPEN AND READ the top hit** (`gbrain get \u003Cslug>`). Never band on the\n   score alone. Donor systems publish cosine cutoffs for this step — do NOT\n   port them: `gbrain search` returns fused hybrid rank scores, not cosine\n   similarity, and no numeric threshold maps across. The band comes from\n   reading, not from the number.\n\n4. **Assign a band:**\n\n   | Band | Meaning | Action |\n   |---|---|---|\n   | **clear-dup** | The top hit already states the same insight about the same subject | STOP. Link to the existing page (`gbrain link` \u002F `gbrain timeline-add`) instead of writing. |\n   | **plausible-dup** | Same territory; possibly a new angle | Read both fully. Same insight → link, don't write. Genuinely new angle → write WITH a cross-link to the existing page. |\n   | **clear** | Nothing in the top results covers the claim | Write normally through the delegated enrichment skills. |\n\n### Decision tree\n\n```\nNew content to write\n  ├─ Named thing? → Named-Entity Resolution Gate first\n  │    (entity card → alias-expanded search → READ the candidate)\n  ├─ Extract core claim (1-2 sentences)\n  ├─ gbrain search \"\u003Ccore claim>\" --limit 5\n  └─ OPEN AND READ the top hit (gbrain get \u003Cslug>)\n      ├─ clear-dup     → STOP. Link to existing. Report \"duplicate\".\n      ├─ plausible-dup → Read both. Same insight?\n      │    ├─ yes → STOP. Link to existing. Report \"duplicate\".\n      │    └─ no  → Write with cross-link. Report \"new angle\".\n      └─ clear         → Write via enrichment skills. Report \"unique\".\n```\n\n### When to skip dedup\n\n- **Operational\u002Fstate files** — time-series records, not knowledge.\n- **Meeting transcripts** — each meeting is unique by definition (entities\n  INSIDE it still go through the named-entity gate via the delegated skills).\n- **Timeline entries on existing pages** — back-links are additive, not\n  duplicative.\n- **Media files** — dedup by filename\u002Fhash, not semantic similarity.\n\n## Verification\n\nAfter the batch, verify the gate's output holds:\n\n```bash\ngbrain check-backlinks check            # mentioned entities link back (fix with: check-backlinks fix)\ngbrain backlinks \u003Cnew-slug>             # each new page has inbound links\ngbrain search \"\u003Ccore claim>\" --limit 3  # the insight has exactly ONE home\n```\n\nIf `check-backlinks check` reports gaps on pages the gate just admitted, the\nenrichment delegation was skipped — route back through\n[enrich](..\u002Fenrich\u002FSKILL.md) before declaring the ingest done.\n\n## Contract\n\nThis skill guarantees:\n\n- No new page enters the brain through this skill's flows without the\n  named-entity resolution check and the dedup check running first.\n- Every \"duplicate\" verdict names the matched slug and produces a link or\n  timeline entry instead of a clone.\n- New named-entity pages carry an `aliases:` frontmatter list in the same\n  write that creates them.\n- Dedup bands are assigned by READING the top hit, never by score alone; no\n  numeric similarity thresholds are used against gbrain's fused scores.\n- Enrichment is delegated to shipped skills (ingest, enrich, signal-detector,\n  concept-synthesis) — never restated or reimplemented inline.\n- Batches end with a `gbrain check-backlinks check` verification pass.\n- Routing matches the canonical triggers in the frontmatter.\n- Output written under the directories listed in `writes_to:`.\n- Privacy contract preserved: no real names, no fork-specific filesystem path\n  literals, no upstream-fork references.\n\nThe full behavior contract is documented in the body sections above; this\nsection exists for the conformance test.\n\n## Output Format\n\nOne decision line per item checked, then the verification result:\n\n```\nIngest gate — 3 item(s) checked\n\n| item | entity resolution | band | action |\n|---|---|---|---|\n| notes-on-widget-co.md | resolved: companies\u002Fwidget-co | clear-dup | linked (timeline entry on companies\u002Fwidget-co) |\n| pricing-thesis.md | n\u002Fa (prose) | plausible-dup | new angle — written to concepts\u002F with cross-link to concepts\u002Fpricing-power |\n| charlie-example-intro.md | miss (near-miss: people\u002Fcharlie-example) | — | read near-miss; same person → linked, no new page |\n\nVerification: check-backlinks check → 0 gaps on admitted pages\n```\n\nEvery \"linked\" or \"duplicate\" row MUST name the matched slug. If any row says\n\"written\", the enrichment delegation (which skill handled it) should be\nrecoverable from the conversation.\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- The \"is this already in the brain?\" search is empty with a degraded notice: an empty keyword-only result is not proof the content is missing. Check by slug, URL or exact title before importing.\n- `gbrain capture` \u002F `put` returns `write_pending` (exit 10): the content is accepted. Poll `gbrain write-request \u003Crequest_id>`; do not capture it again.\n- `source_binding_required` or `insufficient_scope` on an MCP write: this connection cannot write that source. Tell the user which source and scope are missing; the brain host's operator grants them.\n\n## Anti-Patterns\n\n- ❌ `cp file.md \u003Cbrain-repo>\u002Fconcepts\u002F` — raw copy, no gate, no enrichment.\n- ❌ Bulk `mv` of a folder into the brain repo, then `gbrain sync` — sync\n  happily indexes every duplicate; matching-ID skip will not save you.\n- ❌ Trusting a low vector score as proof a named thing has no page — named\n  pages don't embed near generic descriptions of them.\n- ❌ Banding on the search score without opening the top hit.\n- ❌ Porting numeric dedup thresholds from other systems onto gbrain's fused\n  scores.\n- ❌ Writing a new named page without its `aliases:` list — the next synonym\n  creates the next duplicate.\n- ❌ Reimplementing entity detection, backlinking, or concept linking inline\n  instead of delegating to the shipped skills.\n- ❌ Skipping the gate because the write is \"just one page\" via `gbrain put` —\n  single manual writes are where duplicate stubs come from.\n\n## Dedup (sharp boundaries)\n\n- **[capture](..\u002Fcapture\u002FSKILL.md)** — the quick-save front door; its dedup is\n  a 24h exact content-hash on identical bytes. This gate is the SEMANTIC +\n  named-entity layer for content entering the brain as real pages (migrations,\n  bulk imports, inbox graduation). \"capture this thought\" → capture; \"migrate\n  these files into the brain\" → this gate.\n- **[ingest](..\u002Fingest\u002FSKILL.md)** — the router for NEW external content\n  (meetings, articles, media) and its enrichment pipeline. ingest decides what\n  to DO with content; this gate decides whether a page should EXIST at all.\n  The gate fires before the write; ingest and its specialized skills handle\n  everything after a \"write\" verdict.\n- **[enrich](..\u002Fenrich\u002FSKILL.md)** — page creation\u002Fupdate mechanics (tiers,\n  citations, timelines, backlinks) AFTER this gate says \"write\" or \"link\".\n- **[concept-synthesis](..\u002Fconcept-synthesis\u002FSKILL.md)** — retroactive,\n  at-scale dedup of concept stubs that already slipped in. This gate is\n  prevention at write time; concept-synthesis is the cleanup pass. \"dedupe my\n  existing concepts\" → concept-synthesis.\n- **frontmatter-guard (host-side)** — the same standalone-gate pattern on an\n  orthogonal axis: structural validity of what's written vs (here) semantic\n  novelty of whether to write.\n- **[bulk-ingestion](..\u002Fbulk-ingestion\u002FSKILL.md)** — the bulk sibling. Its\n  pipeline dedup key (`source + source_id`) only makes RE-RUNS idempotent; it\n  does not catch cross-source duplicates or resolve named entities. This gate\n  is the semantic + named-entity layer bulk-ingestion runs on its Phase 3 trial\n  items and bakes into the codified pipeline (its Phase 1d\u002F6). \"Build a\n  large-corpus pipeline\" → bulk-ingestion; \"does this page already exist before\n  I write it\" → this gate.\n- **[data-loss-gate](..\u002Fdata-loss-gate\u002FSKILL.md)** — the inverse gate: it\n  stops data LEAVING the brain without confirmation; this gate stops data\n  ENTERING without resolution + dedup.\n",{"name":5,"version":52,"mutating":53,"triggers":54,"upstream":62,"writes_to":63,"brain_first":53,"description":68,"when_to_use":69,"writes_pages":53},"1.0.0",true,[55,56,57,58,59,60,61],"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","brain-ingest-gate@fc834ee",[64,65,66,67],"people\u002F","companies\u002F","concepts\u002F","projects\u002F","Pre-write quality gate for content entering the brain. No raw copies: a bare cp\u002Fmv 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 \u002F plausible-dup \u002F clear). Owns dedup; delegates enrichment to the shipped ingestion skills. Routing convention, not an operation-boundary enforcement.\n","Use when the user asks: \"move this to brain\", \"migrate to brain\", \"copy these files into the brain\", \"is this already in the brain\", \"check for duplicates before writing\".","master","074ec301549ded4930f04d2c3b22d709a6c095cc","plugin\u002Fskills\u002Fbrain-ingest-gate",4902,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain","https:\u002F\u002Fgithub.com\u002Fgarrytan","https:\u002F\u002Fblog.garrytan.com","Writes software, dreams. ","2026-11-14 04:11:30",{"source":8,"skillName":5,"commands":80,"prompt":90,"zipAvailable":53},[81,84,87],{"tool":82,"command":83},"npx","npx skills add garrytan\u002Fgbrain --skill brain-ingest-gate",{"tool":85,"command":86},"bunx","bunx skills add garrytan\u002Fgbrain --skill brain-ingest-gate",{"tool":88,"command":89},"pnpm","pnpm dlx skills add garrytan\u002Fgbrain --skill brain-ingest-gate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fbrain-ingest-gate\u002FSKILL.md",[92],{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"routing-eval.jsonl","OTHER","其他",1545,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fbrain-ingest-gate\u002Frouting-eval.jsonl",[99,112,118,137,162,176],{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":47},"01M6N109FNGH1PK49T734PZXGB","query-helper","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fquery-helper\u002FSKILL.md",[],[105,106,107,108,109,110,111],"query helper","helper","query","search","page","find","false",{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":47},"01M6N108A23GW6NGQEQ0E7GV0A","broken","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbroken\u002FSKILL.md",[],[114],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":47},"01M6N105E88C5K2H03H0CC79G1","brain-ops","Read, enrich, and write brain pages with source attribution.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[125,25,126,127,128,109,41,40,129,130,107,131,35,132,133,134,135,136,108],"brain ops","ops","true","attribution","up","look","pages","with","enrich","web","path","source",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":146,"publishedAt":47},"01M6N102GRMF22TVCNT6RK5MRD","meeting-prep","Build a briefing before you meet someone, from their recent threads, open loops and what they care about.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fmeeting-prep\u002FSKILL.md",[143],{"categoryNo":144,"categoryName":145,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000034","行政与办公人员",[147,148,149,150,151,108,152,153,154,107,111,155,156,157,158,159,160,161],"meeting","prep","meeting prep","me","prepare","brief","open","build","loops","about","you","briefing","threads","for","Meet",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":47},"01M6N1005QK7REHX5KGMNR5PF0","inbox-zero","Triage the inbox into replies, delegations and archives.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Finbox-zero\u002FSKILL.md",[],[169,170,171,108,172,111,173,174,175],"inbox zero","ZeRO","inbox","clear","replies","my","triage",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":47},"01M6N0ZXQ8RRRW71PNV61T57GP","deal-memo","Draft an investment memo from the deal pages and the founder history already in the brain.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fdeal-memo\u002FSKILL.md",[],[183,184,185,131,25,186,187,40,188,127,108,189],"deal memo","deal","memo","draft","investment","history","founder"]