# Frontmatter Presets Define context configuration directly in your notes using `ai-context` frontmatter. ## Basic Usage Add an `ai-context` block to any note's frontmatter: ```yaml --- ai-context: template: "code-review" include-linked: true link-depth: 2 include-tags: - project/current exclude-paths: - archive/ max-tokens: 50000 --- ``` Then use **"Copy context from frontmatter preset"** (via Command Palette) and the plugin automatically: 1. Reads the preset configuration 2. Traverses linked notes (up to specified depth) 3. Collects notes with matching tags 4. Applies exclusions 5. Fits within token budget 6. Applies the specified template **One hotkey, perfectly configured context.** ## All Options ```yaml ai-context: # Apply a saved template by name template: "code-review" # Include linked notes include-linked: true link-depth: 2 # How deep to traverse (0-10) # Include notes with these tags include-tags: - project/myproject - status/active # Exclude paths exclude-paths: - archive/ - templates/ # Exclude notes with these tags exclude-tags: - draft - private # Token budget max-tokens: 50000 # Include the note itself include-active-note: true ```