Vault automations
On-demand scripts for recurring vault chores. Both run with plain Python 3 — no dependencies.
Commands
1. Link recent highlights
Walks Highlights/ for files modified in the lookback window, then adds inline [[wikilinks]] wherever a known title or alias from People/, Organizations/, Products/, Wiki/, or Artifacts/ appears.
# Dry run — no files touched, writes a report to _automation/reports/
python3 _automation/link_highlights.py
# Custom window
python3 _automation/link_highlights.py --days 14
# Apply the changes for real
python3 _automation/link_highlights.py --apply
# Smoke-test on a handful of files
python3 _automation/link_highlights.py --limit 20 --verboseMatching rules
- Whole-word, case-insensitive against filenames and
aliases:from frontmatter. - Longest match wins (so
Tony Fadellis linked, not justTony). - Skips: existing
[[wikilinks]], markdown links, code blocks, inline code, URLs, HTML comments, and frontmatter. - A small stoplist of generic words is excluded (
the,data,model, etc.). - Surface forms shorter than 3 chars are excluded.
Output
A timestamped report at _automation/reports/link_highlights_<ts>_<dryrun|applied>.md listing every proposed (or applied) link, the file and line number, and a preview of the line.
2. Weekly review digest
Generates a Markdown digest of recent highlight activity and writes it to Calendar/Weekly Reviews/{YYYY-Www} Weekly Review.md.
# Default: last 7 days, write to Calendar/
python3 _automation/weekly_review.py
# Custom window
python3 _automation/weekly_review.py --days 14
# Print to stdout instead of writing the file
python3 _automation/weekly_review.py --stdoutThe digest contains:
- New highlights by source — counts per source folder (Books, Articles, Podcasts, Tweets, …).
- Top items — the most recently modified files in each source.
- Open loops & questions — lines from this week’s highlights that end in
?, containTODO/FIXME/TBD, or are wrapped in==Obsidian highlight markers==.
Asking Cowork to run them
You can just say things like:
- “Link my recent highlights” → runs the linker in dry-run, shows you the report
- “Apply the highlight links from that report” → runs with
--apply - “Generate this week’s review” → runs the weekly digest and opens the file
- “Show me open loops from the last two weeks” → runs the digest with
--days 14 --stdout
How “recent” is determined
Both scripts read the modified: field in each highlight’s YAML frontmatter (ISO date, e.g. modified: 2026-05-01). If a file has no modified: field, the filesystem mtime is used as a fallback.
Adjusting behavior
The scripts are intentionally short and dependency-free. Common tweaks:
- Stoplist —
STOPLISTset near the top oflink_highlights.py. Add anything you don’t want auto-linked. - Linkable folders —
LINKABLE_DIRSinlink_highlights.py. Add or remove folders. - Open-loop heuristics —
extract_open_loops()inweekly_review.py. Adjust the regex set if you flag loops differently.