mindgrove
v0.1.0
Published
πΏ Analyze, classify, and auto-link any markdown vault. Role detection, sophistication scoring, and bidirectional similarity linking for knowledge bases at scale.
Maintainers
Readme
πΏ mindgrove
Analyze, classify, and auto-link any markdown vault. Role detection, sophistication scoring, and bidirectional similarity linking β for knowledge bases at scale.
Why this exists
When your markdown vault hits 500+ files, it becomes a graveyard. Notes pile up with no metadata, no connections, no way to know what's related to what.
mindgrove crawls your vault, analyzes every file, and does three things automatically:
- Tags β injects rich YAML frontmatter: role, domain, sophistication score, capabilities, techniques
- Scores β rates each note's complexity from
standardβeliteusing a weighted scoring engine - Links β builds a similarity matrix across all files and writes bidirectional
[[wikilinks]]between related notes
Built from a real workflow used to manage 1,300+ AI system prompts in Obsidian. Extracted into a universal library with zero vault-specific assumptions.
Works everywhere markdown lives
| Environment | YAML Frontmatter | Wikilinks | Visual Graph | |---|---|---|---| | Obsidian | β | β | β Graph View | | Foam (VS Code) | β | β | β Foam Graph | | Logseq | β | β | β Graph View | | Dendron | β | β | β Tree View | | Plain markdown folder | β | β | β (data is there, use any renderer) |
No matter where your notes live β mindgrove enriches them. The [[wikilinks]] it writes are understood by every major PKM tool, so your graph appears automatically next time you open the vault.
Install
npm install -g mindgroveOr as a library in your project:
npm install mindgroveCLI Usage
# Analyze any markdown folder
mindgrove analyze ./my-vault
# Works directly on your Obsidian vault
mindgrove analyze /path/to/obsidian-vault
# With custom options
mindgrove analyze ./my-vault --threshold 20 --max-connections 8
# Dry run β analyze only, no file writes
mindgrove analyze ./my-vault --dry-run
# Skip linking (just tag files, no wikilinks)
mindgrove analyze ./my-vault --no-linkingWhat gets written to your files
Each markdown file gets a YAML frontmatter block injected (or updated):
---
type: note
analyzed: 2026-04-18 21:00
role: prompt-engineer
domain: ai-ml
sophistication: advanced
size-category: large
char-count: 4821
token-estimate: 1206
capabilities:
- reasoning
- code-generation
- optimization
techniques:
- chain-of-thought
- role-playing
- constraints
tools:
- web-search
- code-execution
Connected Notes:
- "[[RAG Specialist Agent]] (score: 22 | chain-of-thought, ai-ml)"
- "[[Meta Orchestrator]] (score: 18 | role-playing)"
status: active
---Open your vault in Obsidian after running mindgrove β every connected note pair appears as an edge in Graph View automatically.
Library Usage
import { analyzeVault } from 'mindgrove';
const result = await analyzeVault('./my-vault', {
similarityThreshold: 15,
maxConnectionsPerFile: 12,
enableLinking: true,
// Extend with your own patterns
customRoles: {
'finance-agent': /trading|portfolio|equity/i,
},
customDomains: {
'fintech': /\bfinance\b|\btrading\b|\bstocks\b/i,
},
});
console.log(`Processed: ${result.processed} files`);
console.log(`Connections: ${result.connections} links written`);Configuration
| Option | Default | Description |
|---|---|---|
| similarityThreshold | 15 | Min score to create a link |
| maxConnectionsPerFile | 12 | Cap links per file |
| enableLinking | true | Run Phase 2 similarity linking |
| excludeFolders | ['.obsidian', 'Templates', ...] | Folders to skip |
| domainDetection | 'content' | 'content' or 'path' |
| customRoles | {} | Add your own role patterns |
| customDomains | {} | Add your own domain patterns |
| customCapabilities | {} | Add your own capability patterns |
| customTechniques | {} | Add your own technique patterns |
| dryRun | false | Analyze without writing files |
| reportFormat | 'markdown' | 'text', 'json', or 'markdown' |
Sophistication scoring
mindgrove scores every note from standard β elite based on a weighted formula:
score = (techniques Γ 2) + (constraints Γ 1.5) + (capabilities Γ 1) + (tools Γ 1)| Score | Label |
|---|---|
| 25+ | elite |
| 18β24 | advanced |
| 12β17 | sophisticated |
| 6β11 | intermediate |
| 0β5 | standard |
Filter by sophistication: elite in Obsidian's search to instantly surface your best notes.
Real-world example
This library was extracted from a personal Obsidian vault containing 1,300+ AI system prompts. Running mindgrove analyze on that vault:
- Tagged all 1,300 files with role/domain/sophistication in ~4 minutes
- Found 847 high-quality similarity connections above threshold 15
- Wrote bidirectional
[[wikilinks]]into every connected pair - Enabled Obsidian Graph View filtering by
sophistication: eliteto instantly surface the best prompts
Project structure
mindgrove/
βββ src/
β βββ index.js β public API exports
β βββ config.js β fully overridable DEFAULT_CONFIG
β βββ analyzer.js β Phase 1 (tag) + Phase 2 (link) orchestrator
β βββ similarity.js β weighted scoring matrix engine
β βββ linker.js β bidirectional wikilink writer
β βββ frontmatter.js β YAML generator (preserves existing user fields)
β βββ detectors/
β βββ role.js β 3-tier role detection
β βββ capabilities.js β 14 capability patterns
β βββ techniques.js β 12 prompt-engineering technique patterns
β βββ tools.js β 10 tool patterns
β βββ domain.js β content-based domain detection
β βββ sophistication.js β weighted scorer
βββ cli/index.js β mindgrove analyze <path>
βββ sample-vault/ β 6 ready-to-run sample markdown files
βββ examples/
β βββ ai-prompt-vault.js β real-world 1300-file use case
βββ obsidian/ β original Obsidian Templater script (inspiration)License
MIT Β© Kevork @ Nexacrawl
