Skip to content

Frontmatter and Context Loading ​

Every time you start a conversation with Claude, the same question arises: what does it know? The answer depends on what gets loaded into the context window — and that loading process has rules.


What Loads Every Time ​

Three things are loaded at the start of every conversation, before you type anything:

1. CLAUDE.md (Your Config File) ​

This is the most important file in your setup. It tells Claude:

  • Who you are and what your role is
  • Where your KB files live (path registry)
  • What rules to follow when extracting information
  • How to format responses
  • Which skills are available

CLAUDE.md loads every single time. This is why it should be concise — every token in it costs you context space in every conversation.

2. Skill Frontmatter (Headers Only) ​

Claude scans the YAML headers of all your skill files. It does NOT load the full skill body — just the metadata: name, description, and trigger conditions. This is how it knows which skills exist without wasting context on their full instructions.

3. Memory Index ​

The auto-memory system (.claude/memory/) loads its index. This contains corrections you have made, preferences you have expressed, and patterns Claude has learned from past sessions.


What Loads On Demand ​

Everything else loads only when needed — triggered by your message or by a skill.

When you mention a person: Claude searches the People folder and loads that person's profile.

When you reference a meeting: Claude finds the meeting note and loads it.

When a skill fires: The full skill body loads (not just the header).

When Claude needs context: It searches your KB files using the tools described below.

This on-demand loading is critical. Your KB might have hundreds of files, but Claude only loads the ones relevant to the current conversation. This keeps the context window focused and responses fast.


How Claude Searches Your Files ​

Claude has three search mechanisms, each suited to different tasks:

Glob — Search by File Name ​

Finds files by their name or path pattern.

Glob: People/Elaine*.md    → finds Elaine-Benes.md
Glob: Meetings/2025-01*.md → finds all January meetings
Glob: Decisions/DEC-*.md   → finds all decision records

Best for: When you know approximately what the file is called.

Grep — Search by Content ​

Searches inside files for specific text or patterns.

Grep: "Import-Export"       → finds every file mentioning Import-Export
Grep: "status: blocked"    → finds blocked items across your KB
Grep: "Elaine"             → finds every reference to Elaine

Best for: When you know what a file contains but not what it is called.

QMD — Search by Relevance ​

A more sophisticated search that scores files by how relevant they are to a query. It considers frontmatter tags, wiki-links, file recency, and content match.

QMD: "platform reliability concerns" → ranks files by relevance

Best for: Open-ended questions where you need the most relevant files, not just keyword matches.

Claude often combines these: Glob to narrow the folder, Grep to filter content, QMD to rank results. You do not need to tell it which to use — it picks the right strategy based on your question.


Frontmatter: The Metadata Layer ​

Every file in your KB starts with a YAML frontmatter block. This is metadata that sits between triple-dash markers at the top of the file:

yaml
---
type: meeting-note
date: 2025-01-15
attendees:
  - "[[Elaine-Benes]]"
  - "[[George-Costanza]]"
  - "[[Jerry]]"
meeting_type: project-sync
project: "[[Import-Export]]"
tags:
  - platform
  - gateway
  - q1-priority
status: processed
---

Why frontmatter matters:

  • Claude can search by any field (type: meeting-note, date: 2025-01-15)
  • It creates structured data from unstructured notes
  • It enables filtering ("show me all meetings about the auth migration")
  • It connects files through wiki-link references

Frontmatter is invisible when reading. Obsidian hides it behind a clean interface. VS Code shows it but it stays out of the way. Claude reads it as structured data.


Wiki-links use double-bracket syntax to connect files:

markdown
Discussed with [[Elaine-Benes]] about the [[Import-Export]] project.
Decision recorded in [[DEC-001_Import-Export]].
Follow-up scheduled for [[2025-01-22_Platform-Sync]].

These links are:

  • Clickable in Obsidian (jump to the linked file)
  • Searchable by Claude (find all files linking to Alice)
  • Bidirectional in Obsidian (see backlinks — who links TO this file)
  • Machine-readable (Claude uses them to traverse your knowledge graph)

When Claude processes a meeting note and extracts that Elaine expressed a concern about timeline, it writes that to Elaine's People profile AND links back to the meeting. Now Elaine's profile says:

markdown
## Recent Positions
- Concerned about Import-Export migration timeline — [[2025-01-15_Platform-Sync]]

And the meeting note links to Elaine's profile. Two-way connections, built automatically.


Different Files, Different Frontmatter ​

Each file type has its own frontmatter schema. Here are the common ones:

Meeting Note ​

yaml
---
type: meeting-note
date: 2025-01-15
attendees:
  - "[[Elaine-Benes]]"
  - "[[George-Costanza]]"
meeting_type: project-sync
project: "[[Import-Export]]"
tags: [platform, gateway]
status: processed
---

Person Profile ​

yaml
---
type: person
name: Elaine Benes
role: Engineering Lead
team: Gateway Platform
reports_to: "[[Steinbrenner]]"
last_updated: 2025-01-15
tags: [platform, engineering]
---

Decision Record ​

yaml
---
type: decision
id: DEC-001
title: Migrate Import-Export to new gateway
date: 2025-01-15
status: approved
deciders:
  - "[[Elaine-Benes]]"
  - "[[George-Costanza]]"
related_meetings:
  - "[[2025-01-15_Platform-Sync]]"
tags: [import-export, platform, gateway]
---

Skill File ​

yaml
---
name: process-meeting
description: Transform meeting transcripts into structured notes
triggers:
  - "process meeting"
  - "process my meeting"
  - "meeting notes"
version: 1.0
---

The frontmatter schema is not rigid — you can add custom fields for your workflow. The key is consistency: if all meeting notes have a meeting_type field, Claude can filter by it. If only some do, the filtering is unreliable.


The Loading Sequence in Practice ​

Here is what happens when you say: "What has Elaine said about the Import-Export migration timeline?"

  1. Already loaded: CLAUDE.md (knows where People/ and Meetings/ are), skill headers, memory
  2. Claude searches: Glob for People/Elaine*.md — loads her profile
  3. Claude searches: Grep for "Import-Export" in Meetings/ — finds relevant meetings
  4. Claude reads: Frontmatter of found meetings to check if Elaine was an attendee
  5. Claude loads: The 2-3 most relevant meeting notes
  6. Claude answers: Synthesizes Elaine's positions across multiple meetings

Total files loaded: ~5 out of potentially hundreds. The context window stays focused. The answer is grounded in actual notes, not hallucinated.

Built with VitePress