docs: update README and docs for export profiles, smart context, and snapshots
- Add export profiles, smart context, and snapshots to README features - Document export profiles workflow and edge cases in output-targets.md - Add per-target outputPath and intelligence settings to settings.md - Add smart-context.md for context intelligence documentation - Restructure history.md to include snapshots section - Add new commands to getting-started.md - Update repo URLs to GitHub Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
45a0de063e
commit
bc31779651
6 changed files with 132 additions and 13 deletions
10
README.md
10
README.md
|
|
@ -22,9 +22,12 @@ When working with AI assistants on your Obsidian vault, you constantly re-explai
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
- **Multi-LLM output targets** with per-model token limits, formats (XML, Markdown, Plain), and truncation strategies
|
- **Multi-LLM output targets** with per-model token limits, formats (XML, Markdown, Plain), and truncation strategies
|
||||||
|
- **Export profiles** for one-click multi-format export (e.g. XML for Claude + Markdown for ChatGPT + Plain for Gemini)
|
||||||
|
- **Smart context** that auto-detects related notes via links, tags, folder proximity, and shared properties
|
||||||
- **Prompt templates** with placeholders and conditionals for reusable workflows
|
- **Prompt templates** with placeholders and conditionals for reusable workflows
|
||||||
- **Additional context sources** from freetext, external files, or shell commands
|
- **Additional context sources** from freetext, external files, or shell commands
|
||||||
- **Frontmatter presets** to configure context per-note via `ai-context` YAML
|
- **Frontmatter presets** to configure context per-note via `ai-context` YAML
|
||||||
|
- **Context snapshots** for saving and replaying context recipes
|
||||||
- **Granular section selection** to include only the headings you need
|
- **Granular section selection** to include only the headings you need
|
||||||
- **Context history** with diff, search, and one-click restore
|
- **Context history** with diff, search, and one-click restore
|
||||||
- **Context generator** that walks you through setting up vault conventions
|
- **Context generator** that walks you through setting up vault conventions
|
||||||
|
|
@ -52,18 +55,19 @@ Paste into Claude, ChatGPT, or any AI assistant.
|
||||||
| Topic | Description |
|
| Topic | Description |
|
||||||
|-------|-------------|
|
|-------|-------------|
|
||||||
| [Getting Started](docs/getting-started.md) | Installation, first run, commands |
|
| [Getting Started](docs/getting-started.md) | Installation, first run, commands |
|
||||||
| [Output Targets](docs/output-targets.md) | Multi-LLM formats and truncation |
|
| [Output Targets](docs/output-targets.md) | Multi-LLM formats, truncation, and export profiles |
|
||||||
| [Templates](docs/templates.md) | Prompt templates, placeholders, conditionals |
|
| [Templates](docs/templates.md) | Prompt templates, placeholders, conditionals |
|
||||||
| [Context Sources](docs/context-sources.md) | Freetext, file, and shell sources |
|
| [Context Sources](docs/context-sources.md) | Freetext, file, and shell sources |
|
||||||
| [Frontmatter Presets](docs/frontmatter-presets.md) | Per-note ai-context YAML configuration |
|
| [Frontmatter Presets](docs/frontmatter-presets.md) | Per-note ai-context YAML configuration |
|
||||||
| [Section Selection](docs/section-selection.md) | Granular heading and block selection |
|
| [Section Selection](docs/section-selection.md) | Granular heading and block selection |
|
||||||
| [History](docs/history.md) | Context history, diff, and restore |
|
| [Smart Context](docs/smart-context.md) | Auto-detect related notes with context intelligence |
|
||||||
|
| [History & Snapshots](docs/history.md) | Context history, diff, restore, and snapshots |
|
||||||
| [Settings](docs/settings.md) | Full settings reference |
|
| [Settings](docs/settings.md) | Full settings reference |
|
||||||
| [Advanced](docs/advanced.md) | Truncation strategies, priority order, XML format |
|
| [Advanced](docs/advanced.md) | Truncation strategies, priority order, XML format |
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions welcome! Fork the repo, create a feature branch, run `npm run build` to verify, and submit a pull request. Report bugs and request features via [Codeberg Issues](https://codeberg.org/luca-tty/obsidian-promptfire/issues).
|
Contributions welcome! Fork the repo, create a feature branch, run `npm run build` to verify, and submit a pull request. Report bugs and request features via [GitHub Issues](https://github.com/tolvitty/obsidian-logfire/issues).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
```bash
|
```bash
|
||||||
# Clone into your vault's plugins folder
|
# Clone into your vault's plugins folder
|
||||||
cd /path/to/vault/.obsidian/plugins
|
cd /path/to/vault/.obsidian/plugins
|
||||||
git clone https://codeberg.org/luca-tty/obsidian-promptfire.git promptfire
|
git clone https://github.com/tolvitty/obsidian-logfire.git promptfire
|
||||||
|
|
||||||
# Install and build
|
# Install and build
|
||||||
cd promptfire
|
cd promptfire
|
||||||
|
|
@ -76,5 +76,8 @@ The context is now in your clipboard. Paste it into Claude, ChatGPT, or any AI a
|
||||||
| **Copy context with current note** | Copy context + active note |
|
| **Copy context with current note** | Copy context + active note |
|
||||||
| **Copy context (select sections)** | Choose specific headings |
|
| **Copy context (select sections)** | Choose specific headings |
|
||||||
| **Copy context from frontmatter preset** | Use note's ai-context config |
|
| **Copy context from frontmatter preset** | Use note's ai-context config |
|
||||||
|
| **Copy smart context** | Auto-detect related notes via links, tags, and properties |
|
||||||
|
| **Export context (multi-target)** | One-click export using the active export profile |
|
||||||
| **Generate context files** | Open the generator |
|
| **Generate context files** | Open the generator |
|
||||||
| **View context history** | Browse past contexts |
|
| **View context history** | Browse past contexts |
|
||||||
|
| **View context snapshots** | Browse saved context snapshots |
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
# Context History
|
# Context History & Snapshots
|
||||||
|
|
||||||
|
## History
|
||||||
|
|
||||||
Track every context you generate over time.
|
Track every context you generate over time.
|
||||||
|
|
||||||
## Features
|
### Features
|
||||||
|
|
||||||
- **Automatic saving** - Every generated context is saved with a timestamp
|
- **Automatic saving** - Every generated context is saved with a timestamp
|
||||||
- **Search and filter** - Find past contexts quickly
|
- **Search and filter** - Find past contexts quickly
|
||||||
|
|
@ -10,7 +12,7 @@ Track every context you generate over time.
|
||||||
- **One-click restore** - Copy any past context back to clipboard
|
- **One-click restore** - Copy any past context back to clipboard
|
||||||
- **Configurable retention** - Control storage limits and auto-cleanup
|
- **Configurable retention** - Control storage limits and auto-cleanup
|
||||||
|
|
||||||
## Settings
|
### Settings
|
||||||
|
|
||||||
| Setting | Description | Default |
|
| Setting | Description | Default |
|
||||||
|---------|-------------|---------|
|
|---------|-------------|---------|
|
||||||
|
|
@ -19,12 +21,24 @@ Track every context you generate over time.
|
||||||
| **Max entries** | Limit stored entries | 50 |
|
| **Max entries** | Limit stored entries | 50 |
|
||||||
| **Auto-cleanup** | Delete after X days | 30 |
|
| **Auto-cleanup** | Delete after X days | 30 |
|
||||||
|
|
||||||
## Usage
|
### Usage
|
||||||
|
|
||||||
Open history via:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
Ctrl+P > "Promptfire: View context history"
|
Ctrl+P > "Promptfire: View context history"
|
||||||
```
|
```
|
||||||
|
|
||||||
Browse, search, compare, and restore any previous context.
|
Browse, search, compare, and restore any previous context.
|
||||||
|
|
||||||
|
## Snapshots
|
||||||
|
|
||||||
|
Snapshots save a context "recipe" — the exact combination of notes, settings, and template — so you can replay it later.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+P > "Promptfire: View context snapshots"
|
||||||
|
```
|
||||||
|
|
||||||
|
Browse, replay, or delete saved snapshots. Replaying a snapshot re-reads the files with current content and re-applies the template, giving you a fresh context from the same recipe.
|
||||||
|
|
||||||
|
Snapshots are managed in **Settings > History > Snapshots**.
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,51 @@ Each target can be configured with:
|
||||||
- **Format** - `markdown`, `xml`, or `plain`
|
- **Format** - `markdown`, `xml`, or `plain`
|
||||||
- **Strategy** - `summarize-headers`, `drop-sections`, `truncate`
|
- **Strategy** - `summarize-headers`, `drop-sections`, `truncate`
|
||||||
- **Wrapper** - Prefix/suffix text around content (e.g., `<context>...</context>`)
|
- **Wrapper** - Prefix/suffix text around content (e.g., `<context>...</context>`)
|
||||||
|
- **Output path** - Custom folder for this target's file output (overrides the global output folder)
|
||||||
|
|
||||||
## Primary vs Secondary Targets
|
## Primary vs Secondary Targets
|
||||||
|
|
||||||
- **Primary target** output goes to your clipboard.
|
- **Primary target** output goes to your clipboard.
|
||||||
- **Secondary targets** are saved as files in the configured output folder.
|
- **Secondary targets** are saved as files in the configured output folder (or the target's custom output path).
|
||||||
|
|
||||||
This lets you generate context for multiple LLMs in a single action.
|
This lets you generate context for multiple LLMs in a single action.
|
||||||
|
|
||||||
## Output Folder
|
## Output Folder
|
||||||
|
|
||||||
Configure where secondary target files are saved in **Settings > Promptfire > Output Targets**.
|
Configure where secondary target files are saved in **Settings > Promptfire > Output Targets**. Individual targets can override this with their own **Output path** setting.
|
||||||
|
|
||||||
|
## Export Profiles
|
||||||
|
|
||||||
|
Export profiles bundle targets into named groups for one-click multi-format export.
|
||||||
|
|
||||||
|
### How It Works
|
||||||
|
|
||||||
|
1. Create a profile in **Settings > Output > Export Profiles** (e.g., "Full LLM Export")
|
||||||
|
2. Select which targets the profile includes (e.g., Claude XML + GPT Markdown + Gemini Compact)
|
||||||
|
3. Choose which target's output goes to clipboard (primary)
|
||||||
|
4. Set the profile as **active** in the "Active export profile" dropdown
|
||||||
|
5. Run the command:
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+P > "Promptfire: Export context (multi-target)"
|
||||||
|
```
|
||||||
|
|
||||||
|
The context assembles normally, each target processes it with its own format and truncation, the primary target goes to clipboard, and the rest are saved as files.
|
||||||
|
|
||||||
|
### Built-in Profile
|
||||||
|
|
||||||
|
| Profile | Targets | Primary |
|
||||||
|
|---------|---------|---------|
|
||||||
|
| **Full LLM Export** | Promptfire (XML), GPT-4o (MD), Compact (Plain) | Promptfire |
|
||||||
|
|
||||||
|
Add it via **Settings > Output > Export Profiles > "Add Built-in Profiles"**.
|
||||||
|
|
||||||
|
### Profile Dropdown in Generator
|
||||||
|
|
||||||
|
When you have profiles configured, the generator modal shows a **Profile** dropdown above the target checkboxes. Selecting a profile pre-selects its targets for quick access.
|
||||||
|
|
||||||
|
### Edge Cases
|
||||||
|
|
||||||
|
- If the active profile references a target that was deleted, that target is skipped with a notice
|
||||||
|
- If a profile's primary target was deleted, the first available target in the profile becomes primary
|
||||||
|
- Deleting a target automatically cleans it up from all profiles
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,32 @@ See [History](history.md) for more details.
|
||||||
| **Format** | markdown, xml, or plain |
|
| **Format** | markdown, xml, or plain |
|
||||||
| **Strategy** | summarize-headers, drop-sections, truncate |
|
| **Strategy** | summarize-headers, drop-sections, truncate |
|
||||||
| **Wrapper** | Prefix/suffix text around content |
|
| **Wrapper** | Prefix/suffix text around content |
|
||||||
|
| **Output path** | Custom output folder for this target (overrides global) |
|
||||||
| **Primary** | Which target goes to clipboard |
|
| **Primary** | Which target goes to clipboard |
|
||||||
| **Output folder** | Where to save secondary targets |
|
| **Output folder** | Where to save secondary targets |
|
||||||
|
| **Active export profile** | Profile used by the multi-target export command |
|
||||||
|
|
||||||
See [Output Targets](output-targets.md) for format details and strategies.
|
## Export Profiles
|
||||||
|
|
||||||
|
| Setting | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| **Name** | Display name for the profile |
|
||||||
|
| **Description** | Optional description |
|
||||||
|
| **Targets** | Which targets are included |
|
||||||
|
| **Primary target** | Which target's output goes to clipboard |
|
||||||
|
|
||||||
|
See [Output Targets](output-targets.md) for export profile details.
|
||||||
|
|
||||||
|
## Intelligence
|
||||||
|
|
||||||
|
| Setting | Description | Default |
|
||||||
|
|---------|-------------|---------|
|
||||||
|
| **Enabled** | Enable context intelligence | Off |
|
||||||
|
| **Token budget** | Max tokens for smart context | 50,000 |
|
||||||
|
| **Max notes** | Max related notes to consider | 50 |
|
||||||
|
| **Min score** | Minimum relevance score | 0.1 |
|
||||||
|
| **Signal weights** | Weights for links, tags, folder proximity, properties | Varies |
|
||||||
|
| **Link depth** | How many hops to follow (1-3) | 1 |
|
||||||
|
| **Exclude paths** | Folders to skip | `_context, .obsidian` |
|
||||||
|
|
||||||
|
See [Smart Context](smart-context.md) for details.
|
||||||
|
|
|
||||||
36
docs/smart-context.md
Normal file
36
docs/smart-context.md
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Smart Context
|
||||||
|
|
||||||
|
Auto-detect related notes based on links, tags, folder proximity, and shared frontmatter properties.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+P > "Promptfire: Copy smart context (auto-detect related notes)"
|
||||||
|
```
|
||||||
|
|
||||||
|
Requires an active note. Promptfire analyzes the note's connections and presents a ranked list of related notes. Select which ones to include, then copy.
|
||||||
|
|
||||||
|
## How Scoring Works
|
||||||
|
|
||||||
|
Each note receives a relevance score based on configurable signal weights:
|
||||||
|
|
||||||
|
| Signal | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| **Forward links** | Notes linked from the active note |
|
||||||
|
| **Backlinks** | Notes that link to the active note |
|
||||||
|
| **Shared tags** | Notes sharing tags with the active note |
|
||||||
|
| **Folder proximity** | Notes in nearby folders |
|
||||||
|
| **Shared properties** | Notes with matching frontmatter values |
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
Configure in **Settings > Promptfire > Intelligence**:
|
||||||
|
|
||||||
|
- **Token budget** - Maximum tokens for smart context output
|
||||||
|
- **Max notes** - Maximum related notes to consider
|
||||||
|
- **Min score** - Notes below this threshold are excluded
|
||||||
|
- **Signal weights** - Fine-tune the importance of each signal
|
||||||
|
- **Link depth** - How many hops to follow forward links (1-3)
|
||||||
|
- **Exclude paths** - Folders to skip during analysis
|
||||||
|
- **Exclude tags** - Notes with these tags are skipped
|
||||||
|
- **Property keys** - Which frontmatter keys to compare
|
||||||
Loading…
Reference in a new issue