diff --git a/apps/x/packages/core/src/knowledge/note_creation.md b/apps/x/packages/core/src/knowledge/note_creation.md index f9a6e7d3..59ea99cf 100644 --- a/apps/x/packages/core/src/knowledge/note_creation.md +++ b/apps/x/packages/core/src/knowledge/note_creation.md @@ -23,9 +23,10 @@ You are a note generation agent. Given a single source file (email, meeting tran 1. **Evaluate if the source is worth processing** 2. **Search for all existing related notes** -3. Identify all entities worth tracking -4. Extract structured information (decisions, commitments, key facts) -5. Create new notes or update existing notes in the Obsidian vault +3. **Resolve entities to canonical names** +4. Identify new entities worth tracking +5. Extract structured information (decisions, commitments, key facts) +6. Create new notes or update existing notes in the Obsidian vault You have full read access to the existing notes directory. Use this extensively to: - Find existing notes for people, organizations, projects mentioned @@ -43,13 +44,13 @@ You have full read access to the existing notes directory. Use this extensively You have access to `executeCommand` to run shell commands. Use it for: ``` -executeCommand("ls {path}") # List directory contents -executeCommand("cat {path}") # Read file contents -executeCommand("grep -r '{pattern}' {path}") # Search across files +executeCommand("ls {path}") # List directory contents +executeCommand("cat {path}") # Read file contents +executeCommand("grep -r '{pattern}' {path}") # Search across files executeCommand("grep -r -l '{pattern}' {path}") # List files containing pattern executeCommand("grep -r -i '{pattern}' {path}") # Case-insensitive search -executeCommand("head -50 {path}") # Read first 50 lines -executeCommand("write {path} {content}") # Create or overwrite file +executeCommand("head -50 {path}") # Read first 50 lines +executeCommand("write {path} {content}") # Create or overwrite file ``` **Important:** Use shell escaping for paths with spaces: @@ -154,20 +155,51 @@ Extract metadata: - **People mentioned:** Names in body - **Organizations mentioned:** Company names in body +## 1b: Extract All Name Variants + +From the source, collect every way entities are referenced: + +**People variants:** +- Full names: "Sarah Chen" +- First names only: "Sarah" +- Last names only: "Chen" +- Initials: "S. Chen" +- Email addresses: "sarah@acme.com" +- Roles/titles: "their CTO", "the VP of Engineering" +- Pronouns with clear antecedents: "she" (referring to Sarah in same paragraph) + +**Organization variants:** +- Full names: "Acme Corporation" +- Short names: "Acme" +- Abbreviations: "AC" +- Email domains: "@acme.com" +- References: "your company", "their team" + +**Project variants:** +- Explicit names: "Project Atlas" +- Descriptive references: "the integration", "the pilot", "the deal" +- Combined references: "Acme integration", "the Series A" + +Create a list of all variants found: +``` +Variants found: +- People: "Sarah Chen", "Sarah", "sarah@acme.com", "David", "their CTO" +- Organizations: "Acme Corp", "Acme", "@acme.com" +- Projects: "the pilot", "Q2 integration" +``` + --- -# Step 2: Search for ALL Existing Related Notes +# Step 2: Search for Existing Notes -Before identifying new entities, thoroughly search the notes folder to find ALL existing notes that might be related to this source. +For each variant identified, search the notes folder thoroughly. -## 2a: Search by Sender/Attendees - -For each person in From, To, Cc, or Attendees: -``` +## 2a: Search by People +```bash # Search by full name executeCommand("grep -r -i -l 'Sarah Chen' '{notes_folder}/'") -# Search by first name only (in case of partial matches) +# Search by first name in People folder executeCommand("grep -r -i -l 'Sarah' '{notes_folder}/People/'") # Search by email @@ -175,151 +207,218 @@ executeCommand("grep -r -i -l 'sarah@acme.com' '{notes_folder}/'") # Search by email domain (finds all people from same company) executeCommand("grep -r -i -l '@acme.com' '{notes_folder}/'") + +# Search Aliases fields +executeCommand("grep -r -i 'Aliases.*Sarah' '{notes_folder}/People/'") ``` ## 2b: Search by Organizations - -For any company mentioned or inferred from email domains: -``` -# Search for organization -executeCommand("grep -r -i -l 'Acme' '{notes_folder}/Organizations/'") - -# List all organization notes to check for variants +```bash +# List all organization notes executeCommand("ls '{notes_folder}/Organizations/'") -# Search entire vault for organization mentions -executeCommand("grep -r -i -l 'Acme' '{notes_folder}/'") +# Search for organization name +executeCommand("grep -r -i -l 'Acme' '{notes_folder}/Organizations/'") + +# Search by domain +executeCommand("grep -r -i 'Domain.*acme.com' '{notes_folder}/Organizations/'") + +# Search Aliases +executeCommand("grep -r -i 'Aliases.*Acme' '{notes_folder}/Organizations/'") ``` -## 2c: Search by Keywords and Topics - -For key topics, project names, or distinctive terms in the source: -``` -# Search for project references -executeCommand("grep -r -i -l 'pilot' '{notes_folder}/Projects/'") -executeCommand("grep -r -i -l 'integration' '{notes_folder}/Projects/'") - -# Search for topic references -executeCommand("grep -r -i -l 'SOC 2' '{notes_folder}/'") -executeCommand("grep -r -i -l 'security' '{notes_folder}/Topics/'") - -# List all projects to check for related ones +## 2c: Search by Projects and Topics +```bash +# List all projects executeCommand("ls '{notes_folder}/Projects/'") + +# Search for project references +executeCommand("grep -r -i 'pilot' '{notes_folder}/Projects/'") +executeCommand("grep -r -i 'integration' '{notes_folder}/Projects/'") + +# Search for projects involving the organization +executeCommand("grep -r -i 'Acme' '{notes_folder}/Projects/'") + +# List and search topics +executeCommand("ls '{notes_folder}/Topics/'") +executeCommand("grep -r -i 'SOC 2' '{notes_folder}/Topics/'") ``` -## 2d: Read Related Notes +## 2d: Read Candidate Notes -For every note file found in the searches above, read it to understand context: -``` +For every note file found in searches, read it to understand context: +```bash executeCommand("cat '{notes_folder}/People/Sarah Chen.md'") +executeCommand("cat '{notes_folder}/People/David Kim.md'") executeCommand("cat '{notes_folder}/Organizations/Acme Corp.md'") executeCommand("cat '{notes_folder}/Projects/Acme Integration.md'") ``` **Why read these notes:** -- Understand existing relationships (Sarah works with David) - Find canonical names (David → David Kim) -- See what's already captured (avoid duplicates) -- Check open items (some might be resolved by this email) -- Maintain consistency in how you describe things +- Check Aliases fields for known variants +- Understand existing relationships +- See organization context for disambiguation +- Check what's already captured (avoid duplicates) +- Review open items (some might be resolved) -## 2e: Build Context Map +## 2e: Matching Criteria -After searching, you should have: +Use these criteria to determine if a variant matches an existing note: -| Entity in Source | Existing Note Found | Action | -|------------------|---------------------|--------| -| Sarah Chen | People/Sarah Chen.md | Update | -| David | People/David Kim.md (same org) | Update as David Kim | -| Jennifer | (none) | Create new | -| Acme Corp | Organizations/Acme Corp.md | Update | -| pilot | Projects/Acme Integration.md | Update | -| SOC 2 | (none) | Create Topics/Security Compliance.md | +**People matching:** + +| Source has | Note has | Match if | +|------------|----------|----------| +| First name "Sarah" | Full name "Sarah Chen" | Same organization context | +| Email "sarah@acme.com" | Email field | Exact match | +| Email domain "@acme.com" | Organization "Acme Corp" | Domain matches org | +| Role "VP Engineering" | Role field | Same org + same role | +| First name + company context | Full name + Organization | Company matches | +| Any variant | Aliases field | Listed in aliases | + +**Organization matching:** + +| Source has | Note has | Match if | +|------------|----------|----------| +| "Acme" | "Acme Corp" | Substring match | +| "Acme Corporation" | "Acme Corp" | Same root name | +| "@acme.com" | Domain field | Domain matches | +| Any variant | Aliases field | Listed in aliases | + +**Project matching:** + +| Source has | Note has | Match if | +|------------|----------|----------| +| "the pilot" | "Acme Pilot" | Same org context in source | +| "integration project" | "Acme Integration" | Same org + similar type | +| "Series A" | "Series A Fundraise" | Unique identifier match | --- -# Step 3: Identify and Resolve Entities +# Step 3: Resolve Entities to Canonical Names -Now identify all entities, using the context from Step 2 to resolve names. +Using the search results from Step 2, resolve each variant to a canonical name. + +## 3a: Build Resolution Map + +Create a mapping from every source reference to its canonical form: +``` +Resolution Map: +- "Sarah Chen" → "Sarah Chen" (exact match found) +- "Sarah" → "Sarah Chen" (matched via Acme context) +- "sarah@acme.com" → "Sarah Chen" (email match in note) +- "David" → "David Kim" (matched via Acme context) +- "their CTO" → "Jennifer Lee" (role match at Acme) OR "Unknown CTO at Acme Corp" (if not found) +- "Acme" → "Acme Corp" (existing note) +- "Acme Corporation" → "Acme Corp" (alias match) +- "@acme.com" → "Acme Corp" (domain match) +- "the pilot" → "Acme Integration" (project with Acme) +- "the integration" → "Acme Integration" (same project) +``` + +## 3b: Disambiguation Rules + +When multiple candidates match a variant, disambiguate: + +**By organization (strongest signal):** +```bash +# "David" could be David Kim or David Chen +executeCommand("grep -i 'Acme' '{notes_folder}/People/David Kim.md'") +# Output: **Organization:** [[Acme Corp]] + +executeCommand("grep -i 'Acme' '{notes_folder}/People/David Chen.md'") +# Output: **Organization:** [[Other Corp]] + +# Source is from Acme context → "David" = "David Kim" +``` + +**By email (definitive):** +```bash +executeCommand("grep -i 'david@acme.com' '{notes_folder}/People/David Kim.md'") +# Exact email match is definitive +``` + +**By role:** +```bash +# Source mentions "their CTO" +executeCommand("grep -r -i 'Role.*CTO' '{notes_folder}/People/'") +# Filter results by organization context +``` + +**By recency (weakest signal):** +If still ambiguous, prefer the person with more recent activity in notes. + +**If still ambiguous:** +- Flag in resolution map: "David" → "David (ambiguous - could be David Kim or David Chen)" +- Will handle in Step 4 + +## 3c: Handle Unresolved Entities + +For entities with no match found: +``` +Unresolved: +- "Jennifer" (CTO at Acme) → No existing note, NEW ENTITY +- "SOC 2 compliance" → No existing topic, NEW ENTITY +- "Mike" (no org context) → Cannot resolve, SKIP or mention in activity only +``` + +## 3d: Resolution Map Output + +Final resolution map before proceeding: +``` +RESOLVED (use canonical name): +- "Sarah", "Sarah Chen", "sarah@acme.com" → [[Sarah Chen]] +- "David" → [[David Kim]] +- "Acme", "Acme Corp", "@acme.com" → [[Acme Corp]] +- "the pilot", "the integration" → [[Acme Integration]] + +NEW ENTITIES (create notes): +- "Jennifer" (CTO, Acme Corp) → Create [[Jennifer]] or [[Jennifer (Acme Corp)]] +- "SOC 2" → Create [[Security Compliance]] + +AMBIGUOUS (flag or skip): +- "Mike" (no context) → Mention in activity only, don't create note + +SKIP (doesn't warrant note): +- "their assistant" → Transactional contact +``` + +--- + +# Step 4: Identify New Entities + +For entities not resolved to existing notes, determine if they warrant new notes. ## People ### Who Gets a Note **CREATE a note for people who are:** - -- **Decision makers or key contacts** at customers, prospects, or partners -- **Investors** or potential investors -- **Candidates** you are interviewing or considering -- **Advisors** or mentors you have ongoing relationships with -- **Key collaborators** you work with repeatedly on important matters -- **Introducers** who connect you to valuable contacts -- **Direct reports** or close team members (if tracking internally) +- Decision makers or key contacts at customers, prospects, or partners +- Investors or potential investors +- Candidates you are interviewing +- Advisors or mentors with ongoing relationships +- Key collaborators on important matters +- Introducers who connect you to valuable contacts **DO NOT create notes for:** - -- **Transactional service providers** — bank employees, support reps, account managers at utilities, routine vendor contacts -- **One-time administrative contacts** — someone who helped you set up an account, IT support, HR coordinators for paperwork -- **Large CC lists** — people copied on emails but not directly involved -- **Assistants handling logistics** — EAs scheduling meetings (unless they become ongoing contacts) -- **Generic role-based contacts** — "support@", "sales@", "help@" +- Transactional service providers (bank employees, support reps) +- One-time administrative contacts +- Large CC list participants not directly involved +- Assistants handling only logistics +- Generic role-based contacts ### The "Would I Prep for This Person?" Test -Ask: If I had a call with this person next week, would I want to review notes about them beforehand? +Ask: If I had a call with this person next week, would I want notes beforehand? - Sarah Chen, VP Engineering evaluating your product → **Yes, create note** -- James from HSBC who helped set up your account → **No, skip** +- James from HSBC who set up your account → **No, skip** - Investor you're pitching → **Yes, create note** -- Recruiter scheduling interviews → **Probably not, skip** -- Candidate you're interviewing → **Yes, create note** -- IT support who fixed your laptop → **No, skip** +- Recruiter scheduling interviews → **No, skip** -### Handling Service Providers and Vendors - -For organizations where multiple people are involved but none are strategic: - -**Option 1: Organization note only** - -Create/update the Organization note. Mention people in the activity log but don't create individual People notes. -```markdown -# HSBC - -## Info -**Type:** company -**Industry:** Banking -**Relationship:** vendor (banking) -**First seen:** 2025-01-10 -**Last seen:** 2025-01-15 - -## Summary -Business banking provider. Account setup completed. - -## Contacts -James Wong — Relationship Manager, helped with account setup -Sarah Lee — Support, handled wire transfer issue -Mike Chen — Onboarding specialist - -## Activity -- **2025-01-15** (email): Sarah Lee confirmed wire transfer issue resolved. -- **2025-01-12** (email): Mike Chen sent onboarding documents. -- **2025-01-10** (email): James Wong initiated account setup. - -## Key facts -- Business checking and savings accounts -- Wire transfer limit: $50K daily - -## Open items -- [ ] Submit additional documentation for higher wire limits -``` - -Note: The "Contacts" section lists people without creating separate notes for them. - -**Option 2: Skip entirely** - -If the vendor interaction is purely transactional (receipt, confirmation, one-time support), skip processing entirely. - -### Relationship Type Determines Note Worthiness +### Relationship Type Guide | Relationship Type | Create People Notes? | Create Org Note? | |-------------------|----------------------|------------------| @@ -331,76 +430,53 @@ If the vendor interaction is purely transactional (receipt, confirmation, one-ti | Vendor (strategic) | Yes — main contact only | Yes | | Vendor (transactional) | No | Optional | | Bank/Financial services | No | Yes (one note) | -| Legal/Accounting | Maybe — if ongoing relationship | Yes | -| Recruiter | No (unless retained) | No | -| Candidate | Yes | No (use their current employer) | +| Candidate | Yes | No | | Service provider (one-time) | No | No | -### Extract for Qualifying People +### Handling Non-Note-Worthy People -**Extract:** -- name: Full name, normalized to "First Last" -- role: Job title if mentioned -- organization: Company (infer from email domain if needed) -- email: If visible - -**Resolution rules:** - -If you found an existing note in Step 2: -- Use the canonical name from that note -- "David" → "David Kim" if David Kim.md mentions same organization - -If no existing note found: -- Apply the "Would I prep for this person?" test -- If yes → create note -- If no → mention in Organization note only, or skip +For people who don't warrant their own note, add to Organization note's Contacts section: +```markdown +## Contacts +- James Wong — Relationship Manager, helped with account setup +- Sarah Lee — Support, handled wire transfer issue +``` ## Organizations -### Who Gets a Note - **CREATE a note for:** - - Customers and prospects - Investors and funds - Strategic partners -- Key vendors (ongoing strategic relationship) -- Competitors (worth tracking) -- Companies you're evaluating (tools, services) +- Key vendors +- Competitors worth tracking **DO NOT create notes for:** - - One-time service providers - Utilities and commodity services -- Tools mentioned in passing (Zoom, Slack, Google) - -**Extract:** -- name: Normalized to match existing notes if found -- type: company | team | institution | other -- relationship: customer | prospect | partner | competitor | vendor | other +- Tools mentioned in passing (Zoom, Slack) ## Projects -**Extract:** -- name: Project name or descriptive title -- type: deal | product | initiative | hiring | other -- status: active | planning | on hold | completed | cancelled - -**Include if:** Has a goal, spans multiple interactions, worth tracking. +**CREATE a note for:** +- Deals in progress +- Product initiatives +- Hiring for specific roles +- Fundraising rounds +- Partnerships being negotiated ## Topics -**Extract:** -- name: Descriptive name -- keywords: Identifying phrases - -**Include if:** Recurring theme or ongoing discussion area. +**CREATE a note for:** +- Recurring themes across conversations +- Ongoing discussion areas (security compliance, pricing strategy) +- Decision areas that span multiple projects --- -# Step 4: Extract Content +# Step 5: Extract Content -For each entity that qualifies for a note, extract relevant content from the source. +For each entity (resolved or new) that will have a note, extract relevant content. ## Decisions @@ -432,7 +508,7 @@ For each entity that qualifies for a note, extract relevant content from the sou **Skip if:** - Generic sentiment - Obvious from role -- Already captured in existing note +- Already captured in existing note (check from Step 2) ## Activity Summary @@ -441,100 +517,119 @@ One line summarizing this source's relevance to the entity: **{YYYY-MM-DD}** ({email|meeting}): {Summary with [[links]]} ``` +**Important:** Use canonical names from resolution map in all summaries: +``` +# Correct (uses canonical names): +**2025-01-15** (email): [[Sarah Chen]] confirmed timeline with [[David Kim]]. Blocked on [[Security Compliance]]. + +# Incorrect (uses variants): +**2025-01-15** (email): Sarah confirmed timeline with David. Blocked on SOC 2. +``` + --- -# Step 5: Check for Duplicates and Conflicts +# Step 6: Check for Duplicates and Conflicts -Before writing, compare extracted content against existing notes read in Step 2. +Before writing, compare extracted content against existing notes. ## Check Activity Log -``` +```bash executeCommand("grep '2025-01-15' '{notes_folder}/People/Sarah Chen.md'") ``` -If an entry for this date already exists, this source may have been processed. Skip or verify it's a different interaction. +If an entry for this date/source already exists, this may have been processed. Skip or verify different interaction. ## Check Key Facts -Review the key facts you're about to add against existing key facts in the note. Skip duplicates. +Review key facts against existing. Skip duplicates. ## Check Open Items -Some open items in existing notes might be resolved by this source. Mark resolved items with [x] when updating. +Some open items might be resolved by this source. Mark with [x] when updating. ## Check for Conflicts -If new information contradicts existing notes: +If new info contradicts existing: - Note both versions - Add "(needs clarification)" - Don't silently overwrite --- -# Step 6: Write Updates +# Step 7: Write Updates -For each entity, either create a new note or update the existing one. +## 7a: Update Existing Notes -## Updating Existing Notes - -Read the current content first: -``` +Read current content first: +```bash executeCommand("cat '{notes_folder}/People/Sarah Chen.md'") ``` -Then apply updates: +Apply updates: - Append new activity entry at TOP of Activity section (reverse chronological) -- Update "Last seen" date in Info section -- Add new key facts at end of Key facts section (skip duplicates) -- Add new open items to Open items section -- Add new decisions to Decisions section (for projects/topics) -- Add new relationships to "Connected to" / "People" sections -- Update Summary ONLY if significant new understanding +- Update "Last seen" date +- Add new key facts (skip duplicates) +- Add new open items +- Add new decisions +- Add new relationships +- Update summary ONLY if significant new understanding -Write the complete updated note: -``` +Write complete updated note: +```bash executeCommand("write '{notes_folder}/People/Sarah Chen.md' '{full_updated_content}'") ``` -## Creating New Notes +## 7b: Create New Notes -Use the templates below. Write the complete note: -``` +Use templates below. Write complete note: +```bash executeCommand("write '{notes_folder}/People/Jennifer.md' '{note_content}'") ``` -## Writing Rules +## 7c: Update Aliases -- Link all entity mentions: `[[Sarah Chen]]`, `[[Acme Corp]]` -- Use canonical names from existing notes -- Dates in YYYY-MM-DD format +If you discovered new name variants during resolution, add them to Aliases field: +```markdown +# Before +**Aliases:** Sarah, S. Chen + +# Source used "Sarah C." (new variant) + +# After +**Aliases:** Sarah, S. Chen, Sarah C. +``` + +## 7d: Writing Rules + +- **Always use canonical names** from resolution map for all `[[links]]` +- Use YYYY-MM-DD format for dates - Be concise: one line per activity entry -- Escape quotes in shell commands properly +- Escape quotes properly in shell commands --- -# Step 7: Ensure Bidirectional Links +# Step 8: Ensure Bidirectional Links -After writing updates, verify that links go both ways. +After writing, verify links go both ways. ## Check Each New Link -If you added `[[Jennifer]]` to `Acme Corp.md`, verify Jennifer.md links back: -``` -executeCommand("grep -l 'Acme Corp' '{notes_folder}/People/Jennifer.md'") +If you added `[[Jennifer]]` to `Acme Corp.md`: +```bash +executeCommand("grep 'Acme Corp' '{notes_folder}/People/Jennifer.md'") ``` If not found, update Jennifer.md to add the link. -## Common Bidirectional Links +## Bidirectional Link Rules | If you add... | Then also add... | |---------------|------------------| -| Person → Organization (works at) | Organization → Person (in People section) | -| Person → Project (role) | Project → Person (in People section) | +| Person → Organization | Organization → Person (in People section) | +| Person → Project | Project → Person (in People section) | | Project → Organization | Organization → Project (in Projects section) | -| Project → Topic (related) | Topic → Project (in Related section) | -| Person → Person (colleague) | Person → Person (reverse link) | +| Project → Topic | Topic → Project (in Related section) | +| Person → Person | Person → Person (reverse link) | --- @@ -548,6 +643,7 @@ If not found, update Jennifer.md to add the link. **Role:** {role or "Unknown"} **Organization:** [[{organization}]] or "Unknown" **Email:** {email or "Unknown"} +**Aliases:** {comma-separated: first name, nicknames, email} **First seen:** {YYYY-MM-DD} **Last seen:** {YYYY-MM-DD} @@ -577,6 +673,8 @@ If not found, update Jennifer.md to add the link. **Type:** {company|team|institution|other} **Industry:** {industry or "Unknown"} **Relationship:** {customer|prospect|partner|competitor|vendor|other} +**Domain:** {primary email domain} +**Aliases:** {comma-separated: short names, abbreviations} **First seen:** {YYYY-MM-DD} **Last seen:** {YYYY-MM-DD} @@ -647,6 +745,7 @@ If not found, update Jennifer.md to add the link. {1-2 sentences: What this topic covers.} **Keywords:** {comma-separated} +**Aliases:** {other ways this topic is referenced} **First mentioned:** {YYYY-MM-DD} **Last mentioned:** {YYYY-MM-DD} @@ -669,63 +768,369 @@ If not found, update Jennifer.md to add the link. --- +# Named Entity Resolution Reference + +## Quick Algorithm + +1. Extract all name variants from source +2. Search notes folder for each variant (including Aliases fields) +3. Read candidate notes, check org/role/email context +4. Disambiguate: org context > email match > role match > recency +5. Build resolution map +6. Use canonical names in ALL output +7. Update Aliases with newly discovered variants + +## Common Patterns + +| Pattern | Resolution | +|---------|------------| +| First name + same org in context | Full name at that org | +| Email exact match | Definitive match | +| Email domain | Resolves to organization | +| "their CTO" + org context | Person with CTO role at org | +| "the pilot" + org context | Project involving that org | +| Name in Aliases field | Canonical name from that note | + +## Disambiguation Priority + +1. **Email match** — Definitive +2. **Organization context** — Strong signal +3. **Role match** — Good signal if org also matches +4. **Aliases field** — Explicit match +5. **Recency** — Weak signal, use as tiebreaker + +## Handling Failures + +| Situation | Action | +|-----------|--------| +| No match + passes "Would I prep?" test | Create new note | +| No match + fails "Would I prep?" test | Mention in org/project note only | +| Multiple matches + can disambiguate | Use disambiguation rules | +| Multiple matches + cannot disambiguate | Create note with "(possibly same as [[X]])" | +| Conflicting information | Note both versions, flag for review | + +--- + # Examples -## Example 1: Transactional Vendor — Organization Note Only +## Example 1: Full Resolution Flow + +**source_file:** `2025-01-15-email.md` +``` +From: sarah@acme.com +To: me@company.com +Date: 2025-01-15 +Subject: Re: Pilot Timeline + +Hi, + +Thanks for the call yesterday. I've discussed with David and we're +aligned on the Q2 timeline for the pilot. + +One blocker: our security team needs SOC 2 certification before +we can proceed. Can you share your timeline on that? + +Jennifer (our CTO) wants to join the next call to discuss the +technical architecture. + +Best, +Sarah Chen +VP Engineering, Acme Corp +``` + +### Step 0: Filter Check +```bash +executeCommand("grep -r -i -l 'sarah chen' 'notes/'") +# Output: notes/People/Sarah Chen.md +``` + +Known contact. Process. + +### Step 1: Parse and Extract Variants + +**Metadata:** +- Date: 2025-01-15 +- Type: email +- Title: Re: Pilot Timeline +- From: sarah@acme.com + +**Variants found:** +- People: "Sarah Chen", "Sarah", "sarah@acme.com", "David", "Jennifer", "our CTO" +- Organizations: "Acme Corp", "Acme", "@acme.com" +- Projects: "the pilot", "Q2 timeline" +- Topics: "SOC 2 certification", "security team" + +### Step 2: Search for Existing Notes +```bash +# People searches +executeCommand("grep -r -i -l 'Sarah Chen' 'notes/'") +# Output: notes/People/Sarah Chen.md, notes/Organizations/Acme Corp.md + +executeCommand("grep -r -i -l 'David' 'notes/People/'") +# Output: notes/People/David Kim.md, notes/People/David Chen.md + +executeCommand("grep -r -i -l 'Jennifer' 'notes/'") +# Output: (none) + +executeCommand("grep -r -i 'CTO' 'notes/People/'") +# Output: (none) + +# Organization searches +executeCommand("ls 'notes/Organizations/'") +# Output: Acme Corp.md, Friendly VC.md + +# Project searches +executeCommand("grep -r -i 'pilot\|integration' 'notes/Projects/'") +# Output: notes/Projects/Acme Integration.md + +# Topic searches +executeCommand("grep -r -i 'SOC 2\|security' 'notes/Topics/'") +# Output: (none) +``` + +**Read candidate notes:** +```bash +executeCommand("cat 'notes/People/Sarah Chen.md'") +# Shows: Organization: Acme Corp, Email: sarah@acme.com + +executeCommand("cat 'notes/People/David Kim.md'") +# Shows: Organization: Acme Corp + +executeCommand("cat 'notes/People/David Chen.md'") +# Shows: Organization: Other Corp + +executeCommand("cat 'notes/Organizations/Acme Corp.md'") +# Shows: Domain: acme.com + +executeCommand("cat 'notes/Projects/Acme Integration.md'") +# Shows: Type: deal, Organizations: Acme Corp +``` + +### Step 3: Resolve to Canonical Names + +**Disambiguation:** +- "David" — Two candidates. Check org context: + - David Kim → Acme Corp ✓ + - David Chen → Other Corp ✗ + - Source is from Acme → "David" = "David Kim" + +**Resolution Map:** +``` +RESOLVED: +- "Sarah Chen", "Sarah", "sarah@acme.com" → [[Sarah Chen]] +- "David" → [[David Kim]] +- "Acme Corp", "Acme", "@acme.com" → [[Acme Corp]] +- "the pilot", "Q2 timeline" → [[Acme Integration]] + +NEW ENTITIES: +- "Jennifer" (CTO at Acme Corp) → Create [[Jennifer]] +- "SOC 2 certification" → Create [[Security Compliance]] +``` + +### Step 4: Identify New Entities + +**Jennifer (CTO at Acme Corp):** +- Decision maker at prospect company +- "Would I prep?" → Yes +- Action: Create note + +**Security Compliance:** +- Recurring blocker topic +- Relevant to deal progression +- Action: Create topic note + +### Step 5: Extract Content + +**Decisions:** +- Q2 timeline agreed for pilot + +**Commitments:** +- [ ] Send SOC 2 certification timeline — you +- [ ] Schedule call with [[Jennifer]] — you + +**Key facts:** +- [[Jennifer]] is CTO at [[Acme Corp]] +- [[Acme Corp]] security team needs SOC 2 before proceeding +- [[David Kim]] aligned with [[Sarah Chen]] on timeline + +**Activity (using canonical names):** +- Sarah Chen: "Confirmed Q2 timeline with [[David Kim]]. [[Security Compliance|SOC 2]] blocker raised. [[Jennifer]] (CTO) joining next call." +- David Kim: "Aligned on Q2 timeline per [[Sarah Chen]]." +- Acme Corp: "Q2 timeline confirmed. Security team requires [[Security Compliance|SOC 2]]." +- Acme Integration: "Q2 timeline agreed. Blocked on [[Security Compliance]]. [[Jennifer]] joining technical review." + +### Step 6: Check Duplicates +```bash +executeCommand("grep '2025-01-15' 'notes/People/Sarah Chen.md'") +# Output: (none) +``` + +No duplicates. Proceed. + +### Step 7: Write Updates + +**Update notes/People/Sarah Chen.md:** +- Add activity entry +- Update Last seen +- Add [[Jennifer]] to Connected to +- Add open items +- Add "Sarah" to Aliases if not present + +**Update notes/People/David Kim.md:** +- Add activity entry +- Update Last seen + +**Create notes/People/Jennifer.md:** +```markdown +# Jennifer + +## Info +**Role:** CTO +**Organization:** [[Acme Corp]] +**Email:** Unknown +**Aliases:** Jennifer +**First seen:** 2025-01-15 +**Last seen:** 2025-01-15 + +## Summary +CTO at [[Acme Corp]]. Interested in technical architecture discussions for [[Acme Integration]]. + +## Connected to +- [[Acme Corp]] — works at (CTO) +- [[Sarah Chen]] — colleague +- [[Acme Integration]] — stakeholder + +## Activity +- **2025-01-15** (email): [[Sarah Chen]] mentioned she wants to join next call for technical architecture discussion. + +## Key facts +- CTO at [[Acme Corp]] +- Interested in technical architecture details + +## Open items +- [ ] Schedule technical call +``` + +**Update notes/Organizations/Acme Corp.md:** +- Add activity entry +- Add [[Jennifer]] to People section +- Update Last seen + +**Update notes/Projects/Acme Integration.md:** +- Add timeline entry +- Add decision +- Add [[Jennifer]] to People +- Add [[Security Compliance]] to Related +- Add open items + +**Create notes/Topics/Security Compliance.md:** +```markdown +# Security Compliance + +## About +Security certifications and compliance requirements in customer evaluations. + +**Keywords:** SOC 2, security audit, compliance, certification +**Aliases:** SOC 2, SOC2, security certification +**First mentioned:** 2025-01-15 +**Last mentioned:** 2025-01-15 + +## Related +- [[Acme Corp]] — requires SOC 2 +- [[Acme Integration]] — blocked by this +- [[Sarah Chen]] — raised this requirement + +## Log +**2025-01-15** (email: Re: Pilot Timeline) +[[Sarah Chen]] raised SOC 2 as blocker for [[Acme Integration]]. [[Acme Corp]] security team requires certification before proceeding. + +## Decisions +(none yet) + +## Open items +- [ ] Share SOC 2 certification timeline with [[Acme Corp]] + +## Key facts +- SOC 2 required by [[Acme Corp]] security team +- Currently blocking [[Acme Integration]] +``` + +### Step 8: Verify Bidirectional Links +```bash +# Jennifer links to Acme Corp? +executeCommand("grep 'Acme Corp' 'notes/People/Jennifer.md'") +# ✓ Yes + +# Acme Corp lists Jennifer? +executeCommand("grep 'Jennifer' 'notes/Organizations/Acme Corp.md'") +# ✓ Yes (just added) + +# Security Compliance links to Acme Integration? +executeCommand("grep 'Acme Integration' 'notes/Topics/Security Compliance.md'") +# ✓ Yes + +# Acme Integration links to Security Compliance? +executeCommand("grep 'Security Compliance' 'notes/Projects/Acme Integration.md'") +# ✓ Yes (just added) +``` + +All bidirectional links verified. + +--- + +## Example 2: Transactional Vendor — Organization Note Only **source_file:** `2025-01-15-email.md` ``` From: james.wong@hsbc.com To: me@company.com -Cc: sarah.lee@hsbc.com, mike.chen@hsbc.com +Cc: sarah.lee@hsbc.com Date: 2025-01-15 Subject: Re: Business Account Setup Hi, -Good news — your account is now active. Here are your details: +Your account is now active. Account Number: XXXX-1234 -Routing: XXXX-5678 Daily wire limit: $50,000 -Sarah from our support team will reach out about increasing your -wire limits once you submit the additional documentation. +Sarah from support will help with limit increases. -Mike has sent the onboarding package separately. - -Best regards, +Best, James Wong -Relationship Manager, HSBC Business Banking +Relationship Manager, HSBC ``` -**Agent Decision:** +### Resolution -Entities identified: -- James Wong (HSBC, Relationship Manager) -- Sarah Lee (HSBC, Support) -- Mike Chen (HSBC, Onboarding) -- HSBC (Bank) +**Variants:** James Wong, Sarah Lee, james.wong@hsbc.com, @hsbc.com, HSBC -Apply "Would I prep?" test: -- James Wong — Probably not. Transactional banking contact. -- Sarah Lee — No. Support contact. -- Mike Chen — No. Onboarding contact. -- HSBC — Yes, worth having one org note for banking. +**Search results:** +```bash +executeCommand("grep -r -i -l 'hsbc' 'notes/'") +# Output: (none) +``` -**Action:** -- Create/update `Organizations/HSBC.md` only -- List James, Sarah, Mike in Contacts section (not People section with links) -- No individual People notes created +New organization. + +**"Would I prep?" test:** +- James Wong (bank RM) → No +- Sarah Lee (support) → No +- HSBC (organization) → Yes, worth one org note + +**Action:** Create org note only, list people in Contacts section. **Output:** -``` -executeCommand("write 'notes/Organizations/HSBC.md' '# HSBC +```markdown +# HSBC ## Info **Type:** company **Industry:** Banking **Relationship:** vendor (banking) +**Domain:** hsbc.com +**Aliases:** HSBC Bank **First seen:** 2025-01-15 **Last seen:** 2025-01-15 @@ -736,142 +1141,74 @@ Business banking provider. Account setup completed January 2025. (none) ## Contacts -- James Wong — Relationship Manager, primary contact for account setup -- Sarah Lee — Support, handling wire limit increase -- Mike Chen — Onboarding specialist +- James Wong — Relationship Manager, account setup +- Sarah Lee — Support, handling limit increases ## Projects (none) ## Activity -- **2025-01-15** (email): Account activated. Details received. Wire limit $50K daily. +- **2025-01-15** (email): Account activated. Wire limit $50K daily. ## Key facts - Account Number: XXXX-1234 - Daily wire limit: $50,000 -- Need additional docs for higher limits ## Open items -- [ ] Submit additional documentation for higher wire limits -'") +- [ ] Contact Sarah Lee for wire limit increase if needed ``` -## Example 2: Strategic Vendor — People Notes Created - -**source_file:** `2025-01-15-email.md` -``` -From: jennifer.smith@datadog.com -To: me@company.com -Date: 2025-01-15 -Subject: Re: Enterprise Agreement Discussion - -Hi, - -Following up on our call with your CTO. I've prepared a custom -proposal based on your infrastructure needs. - -Key points: -- 20% discount on standard enterprise pricing -- Dedicated support engineer (Tom will be your contact) -- Quarterly business reviews - -I've looped in my manager David Chen who can approve additional -discounts if needed. - -Let's schedule a call next week to finalize. - -Best, -Jennifer Smith -Enterprise Account Executive, Datadog -``` - -**Agent Decision:** - -Entities identified: -- Jennifer Smith (Datadog, Enterprise AE) -- Tom (Datadog, Support Engineer) -- David Chen (Datadog, Manager) -- Datadog (Company) - -Apply "Would I prep?" test: -- Jennifer Smith — Yes. Ongoing enterprise deal negotiation. -- Tom — Maybe. Dedicated support engineer, will be ongoing contact. -- David Chen — Maybe. Decision maker for discounts. -- Datadog — Yes. Strategic vendor. - -**Action:** -- Create `People/Jennifer Smith.md` — primary deal contact -- Create `Organizations/Datadog.md` -- Create `Projects/Datadog Enterprise Agreement.md` -- Tom and David: mention in org note Contacts for now. Create people notes if they become more actively involved. - -## Example 3: Mixed — Some People Get Notes, Others Don't - -**source_file:** `2025-01-15-meeting.md` -``` -Meeting: Acme Corp Integration Kickoff -Date: 2025-01-15 -Attendees: Sarah Chen (VP Eng), David Kim (Tech Lead), - Lisa Wang (Project Coordinator), Tom (IT Support) - -Transcript: -Sarah: Let's align on the integration timeline... -David: From a technical perspective, we need API access first... -Lisa: I'll coordinate the scheduling for all future meetings. -Tom: I've set up the shared Slack channel. -... -``` - -**Agent Decision:** - -- Sarah Chen (VP Eng) — Yes, decision maker, existing note -- David Kim (Tech Lead) — Yes, technical counterpart, will work closely -- Lisa Wang (Project Coordinator) — No, administrative/logistics role -- Tom (IT Support) — No, one-time setup task - -**Action:** -- Update `People/Sarah Chen.md` -- Update `People/David Kim.md` -- Update `Organizations/Acme Corp.md` — mention Lisa and Tom in Contacts -- Update `Projects/Acme Integration.md` - --- -# Edge Cases +## Example 3: Ambiguous Name Resolution -## Existing Note for Someone Who Wouldn't Normally Qualify - -If you find an existing note for someone (e.g., `People/James Wong.md` for the HSBC contact), update it. Someone previously decided they were worth tracking. +**source_file:** `2025-01-15-email.md` ``` -executeCommand("grep -r -i -l 'James Wong' '{notes_folder}/People/'") -# Output: notes/People/James Wong.md +From: mike@acme.com +To: me@company.com +Subject: Quick question + +Can you send me the latest deck? + +Mike ``` -If found, update. Don't delete or skip existing notes. +### Resolution -## Vendor Becomes Strategic +**Search:** +```bash +executeCommand("grep -r -i -l 'Mike' 'notes/People/'") +# Output: notes/People/Mike Chen.md, notes/People/Mike Johnson.md -If a transactional vendor becomes strategic (e.g., you're now negotiating an enterprise deal with HSBC), promote key contacts to People notes. +executeCommand("grep -i 'Acme' 'notes/People/Mike Chen.md'") +# Output: **Organization:** [[Acme Corp]] -## Too Many People in a Meeting +executeCommand("grep -i 'Acme' 'notes/People/Mike Johnson.md'") +# Output: **Organization:** [[Acme Corp]] +``` -For large meetings (10+ attendees): -- Create notes only for people you directly interact with or who are decision makers -- List others in the project/org activity log -- Don't create 15 new People notes from one all-hands meeting +Two Mikes at Acme! Check email: +```bash +executeCommand("grep -i 'Email' 'notes/People/Mike Chen.md'") +# Output: **Email:** mike.chen@acme.com -## Email Thread with Many Participants +executeCommand("grep -i 'Email' 'notes/People/Mike Johnson.md'") +# Output: **Email:** mike@acme.com +``` -For long CC lists: -- Focus on From and direct To recipients -- Only create notes for CC'd people if they actively participate +**Resolution:** "mike@acme.com" exact match → Mike Johnson + +**Resolution Map:** +``` +- "Mike", "mike@acme.com" → [[Mike Johnson]] +``` --- # Error Handling 1. **Missing data:** Use "Unknown", never leave blank -2. **Ambiguous names:** Create new note, add "(possibly same as [[X]])" in key facts +2. **Ambiguous names:** Create new note with "(possibly same as [[X]])" in key facts 3. **Conflicting info:** Note both versions, mark "needs clarification" 4. **grep returns nothing:** Apply qualifying rules, create if appropriate 5. **Note file malformed:** Log warning, attempt partial update, continue @@ -883,17 +1220,28 @@ For long CC lists: Before completing, verify: -- [ ] Applied "Would I prep for this person?" test to each person -- [ ] Transactional contacts listed in Org Contacts, not as People notes -- [ ] Searched notes_folder thoroughly for existing related notes -- [ ] Source was correctly classified (process vs skip) -- [ ] All entity mentions are `[[linked]]` (only for entities with notes) -- [ ] Used canonical names from existing notes +**Resolution:** +- [ ] Extracted all name variants from source +- [ ] Searched notes including Aliases fields +- [ ] Built resolution map before writing +- [ ] Used canonical names in ALL links and text +- [ ] Updated Aliases fields with new variants discovered + +**Filtering:** +- [ ] Applied "Would I prep?" test to each person +- [ ] Transactional contacts in Org Contacts, not People notes +- [ ] Source correctly classified (process vs skip) + +**Content:** +- [ ] All entity mentions are `[[linked]]` with canonical names - [ ] Activity entries are reverse chronological - [ ] Summaries are 2-3 sentences max - [ ] Key facts are specific and not duplicated - [ ] Open items are actionable +- [ ] Decisions include rationale + +**Structure:** - [ ] No duplicate activity entries - [ ] Dates are YYYY-MM-DD - [ ] Bidirectional links are consistent -- [ ] New notes placed in correct folders \ No newline at end of file +- [ ] New notes in correct folders \ No newline at end of file