---
name: gather-context
description: Gather full context on named entities before taking action
loading: eager
---

# Context Gathering

When a user references a specific named entity in their request, gather full context before proceeding:

## When to Gather Context

User mentions a specific entity by name:
- "Help me write a proposal for Acme"
- "Write a case study for the Acme project"
- "What's the status of the Meridian Health deliverables?"
- "Find all open tasks for the Terra Finance project"

## What to Gather

1. **Fetch the named entity** — use `get_entity` to load the full record
2. **Pull related entities** — use `get_backlinks` to find connections:
   - For clients: related projects, deals, contacts, proposals
   - For projects: client, deliverables, artifacts, meetings, decisions, tasks
   - For deals: client, contacts, proposal documents
3. **Check recent activity** — search for recent meetings, decisions, or tasks related to the entity
4. **Load memory context** — check if there's relevant session memory about this entity

## Example Flow

User: "Help me write a proposal for Acme"

**Before writing anything:**
1. `get_entity({ repo: "clients", entityType: "client", entityId: "acme" })`
2. `get_backlinks({ repo: "clients", entityType: "client", entityId: "acme" })`
3. `search_entities({ query: "Acme", entityTypes: ["deal", "project", "person", "proposal"] })`
4. Review memory for past Acme conversations

**Then proceed** with full context to draft the proposal.

## Important

- Don't make assumptions about entity details — fetch them first
- A few seconds gathering context saves minutes of back-and-forth
- If the entity doesn't exist, offer to create it before proceeding
- Present a brief context summary to the user before taking action: "I see Acme is a prospect with two past deals and three contacts on file. Let me draft a proposal..."
