brain-ingest-gate
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…
Gate on identity questions to the user. Before any "who is X?" (or role / relationship question) reaches the user, exhaust the brain's lookup chain: think → search + page read → mounted sources → timeline/graph → web. If escalation survives the chain, ask WITH a hypothesis,
$ npx -y skills add garrytan/gbrain --skill resolve-before-asking --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/resolve-before-askingContext preview
The summary Claude sees to decide when to auto-load this skill.
Gate on identity questions to the user. Before any "who is X?" (or role / relationship question) reaches the user, exhaust the brain's lookup chain: think → search + page read → mounted sources → timeline/graph → web. If escalation survives the chain, ask WITH a hypothesis,
name: resolve-before-asking version: 1.0.0 description: | Gate on identity questions to the user. Before any "who is X?" (or role / relationship question) reaches the user, exhaust the brain's lookup chain: think → search + page read → mounted sources → timeline/graph → web. If escalation survives the chain, ask WITH a hypothesis, never a bare unknown. Also owns the no-placeholders-at-ingest rule: pages created during bulk ingestion get their relationship/role resolved immediately. triggers: - "resolve before asking" - "before asking the user" - "unidentified contact" - "unknown relationship" - "should I ask who" - "don't know who this is" - "to be filled by content analysis" - "placeholder on this page" mutating: true writes_pages: true writes_to: - people/ - companies/ upstream: resolve-before-asking@fc834ee
> **Convention:** see [conventions/brain-first.md](../conventions/brain-first.md) > for the base lookup chain (search → query → get_page → external APIs). This > skill extends that chain one hop further, to the human boundary: asking the > user is the LAST resort, after the brain AND external escalation, not a > shortcut around them.
> **Convention:** see [_brain-filing-rules.md](../_brain-filing-rules.md) — > pages touched by the ingest-resolution section file by primary subject > (`people/`, `companies/`).
**Never ask the user "who is X?" when the answer already exists in the brain.**
The memory answers before the human is bothered — that is the product promise. This skill defines the lookup chain that runs before any entity-identification question is sent to the user, and the escalation format when asking really is justified.
The pattern: the agent encounters an entity with a rich brain page — timeline entries, meeting history, an imported message archive — and instead of reading them, asks the user "who is X?". This is lazy escalation. It spends the user's attention on questions the system can answer itself.
Examples of the bug (anonymized):
Staff at acme-example") and a long meeting history → the agent still asked.
pointed at one shared project → the agent still asked.
This is a harness-routing convention, not a mechanical guarantee: route here whenever ANY of these are true —
1. A reply draft contains "who is [name]?" or equivalent. 2. A draft asks about someone's role, relationship, or identity. 3. You are about to present an entity as "unknown" or "unidentified". 4. A brain page has `[To be filled by content analysis]` or similar placeholder text. 5. You are composing a list of people and leaving any as "unknown relationship".
gbrain think "Who is {entity}? What is their relationship to the user? What role do they play? Use all available context — meetings, timeline, imported archives, facts."`think` synthesizes across ALL brain data. If the entity has a page with imported-activity stats, timeline entries, and meeting history, `think` will connect the dots. Over MCP, `entity("{entity}")` first gives a zero-LLM card (aliases, last-touched, top edges); `synthesize` is the heavy cross-page answer when the card isn't enough.
**If this returns a clear answer → STOP. Use the answer. Do not ask the user.**
gbrain search "{entity}" --limit 5
gbrain get {entity-slug}What to look for:
acme-example", "chief of staff").
**If timeline entries repeat a consistent role → STOP. The role is obvious. Do not ask the user.**
Don't hardcode channels. Check what the brain holds, then query it:
gbrain sources list
gbrain query "emails with {entity}" --limit 10
gbrain query "meetings with {entity}" --limit 5Whatever is mounted — an email archive, calendar imports, chat transcripts, meeting notes — a handful of subject lines or meeting titles usually reveals the relationship:
gbrain timeline {entity-slug} --limit 20
gbrain backlinks {entity-slug}
gbrain graph {entity-slug} --depth 2Dated events, who references this entity, and what it connects to. A person who back-links from a company page and three meeting pages is not an unknown.
Only after steps 1–4 return nothing useful. Run a generic web search on `"{entity name} {company/domain hints accumulated in steps 1-4}"`. Fold anything found back into the brain page before using it (the brain-ops read-enrich-write cycle), so the next lookup doesn't repeat the work.
Only after ALL previous steps return nothing conclusive:
{best guess assembled from partial signals}?"
Use [ask-user](../ask-user/SKILL.md) for the choice-gate mechanics (2–4 options, escape hatch, stop the turn).
OR 3+ timeline e
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
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…
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…