Back/Personal/GitHub Copilot
IntermediatePersonal

How to Automate Personal Knowledge Management with an AI 'Gardener'

Run a daily Gardener over an Obsidian or Markdown knowledge base. It cleans up notes, researches unfamiliar people and companies, adds headings, and connects related ideas while preserving the substance of what you wrote.

How to Automate Personal Knowledge Management with an AI 'Gardener'

John describes his open-source Gardener, which visits a Markdown knowledge base each day to clean, enrich, cluster, and cross-link notes.

Before you start

What you need

  • An Obsidian vault or folder of Markdown notes
  • A local script or coding agent with permission to edit that folder
  • A scheduler and a recoverable history such as Git or automatic backups

What you’ll make

A cleaner, connected knowledge base with useful headings, entity context, and links between related notes.

Tools used

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

6 steps

Step01

Set Up a Personal Knowledge Base

Use a tool like Obsidian to store your personal notes as local Markdown files in a single, accessible folder.

Step02

Create or Find an 'AI Gardener' Script

Use John's Gardener project or ask a coding agent to create a local script that reads and edits Markdown. Start with a small test folder and keep every change visible in Git or another version history.

Example prompt
Build a local Gardener for this Markdown folder. On each run:
1. Fix obvious spelling and grammar without changing my meaning or voice.
2. Add useful headings when a note has clear sections.
3. Link related notes only when the relationship is specific.
4. For an unrecognized person or company, add a short sourced context note only when identity is unambiguous.
5. Never delete original text.
6. Produce a summary of changed files, new links, and anything left unresolved.

Test it on [test folder] before running it across the full vault.
Step03

Automate Daily Execution

Set up a scheduler, like a cron job, to automatically run the script on your notes folder once every day.

Step04

Task 1: Correct and Clean

Keep automatic cleanup narrow: spelling, grammar, formatting, and obvious heading structure. Preserve informal phrasing and the author's original claims.

Step05

Task 2: Enrich and Research

When a note mentions a clearly identifiable person or company, add a brief context block with source links. Skip names that cannot be matched confidently.

Example prompt
You are a research assistant. I will provide you with the name of a person or company mentioned in my personal notes. Your task is to provide a concise, one-paragraph summary of who they are or what they do. Include a link to their official website or a primary source like a Wikipedia page if available.

Entity: [entity name]
Step06

Task 3: Organize and Interlink

Add headings and links that make the vault easier to browse. Reuse existing pages and aliases, and report possible connections instead of forcing weak links.

Example prompt
Analyze the following note and improve its structure. Add logical headings using Markdown (##). Identify the main concepts and suggest 3-5 other note titles from my knowledge base that should be linked here.

Note content: [paste note text]

Existing note titles: [list of other note titles]

What good looks like

  • The Gardener preserves the meaning and voice of the original notes.
  • New factual context is separated from the author's own writing and includes a source link.
  • Cross-links connect genuinely related ideas without turning every noun into a link.
  • Each run produces a readable diff and leaves no broken references.

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

The Gardener rewrites personal notes until they no longer sound or mean the same.
Limit automatic edits to spelling, headings, and links. Put substantial rewrites or interpretations in a separate suggested-edits block.
Research is attached to the wrong person or company.
Require a matching identifier such as employer, domain, or profile URL before enrichment. Leave ambiguous mentions untouched.
The daily run creates noisy links, duplicates, or broken references.
Have the script check existing aliases and targets before creating a page, then report unresolved links at the end of the run.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready