Second Mind on Hugo: AI Curation Workflows

Apr 10, 2026 min read

Part 3 of 5. ← Part 2: The Hugo Architecture · Part 4: Agents, SEO, and Weekly Audits →

The structural layer in part 2 handles visibility and builds. This post covers the AI workflows that handle the actual ongoing work of a second mind: capturing, curating, and surfacing knowledge.

The design principle throughout is that AI handles maintenance, humans handle direction. The AI doesn’t decide what gets published. It reduces the friction of capture, does the grunt work of summarisation, and flags things for review. Every promotion to the outer mind is a deliberate human decision.

Claude Code slash commands

Five slash commands live in .claude/commands/ and are available in any Claude Code session opened in the repo:

Fetches the page, generates a title (≤60 chars), 2–3 sentence summary, and 3–5 tags drawn from the site’s existing tag vocabulary. Saves to content/links/YYYY-MM-DD-slug.md with draft: true. Takes about 10 seconds.

/add-note <text>

Identifies the core idea, generates a slug and 2–4 tags, saves to content/notes/YYYY-MM-DD-slug.md. For capturing a thought before it evaporates.

/curate

Reviews the 20 most recent draft items across all sections and groups them into three buckets: Ready to promote (complete, no sensitive content), Needs work (good idea but rough), Keep inner (personal or clearly not for public). Presents a summary table and asks which ones to act on.

/promote <file>

Reviews a single file for clarity, completeness, and any sensitive details. Suggests light edits, asks for approval, then sets draft: false and mind: outer. Doesn’t touch the file until you confirm.

/search <query>

Queries the local ChromaDB semantic index and returns the top 5 results with title, path, draft status, and a short excerpt. Falls back to grep if the index isn’t built. More on this below.

Android share pipeline

The Claude Code commands cover the desktop workflow. For mobile, specifically the moment you’re reading something on your phone and want to save it, the friction has to be near-zero.

The setup:

  1. HTTP Request Shortcuts on Android stores a GitHub token and a configured POST request
  2. Sharing a URL from any app to that shortcut fires a POST to the GitHub Issues API, creating an issue with the URL as the body and the add-link label
  3. A GitHub Action (.github/workflows/add-link.yml) triggers on the label, runs scripts/process-link-issue.py, which fetches the page and calls the Anthropic API to generate title/summary/tags, commits content/links/YYYY-MM-DD-slug.md, and closes the issue

The round-trip is about 30 seconds. No app to open, no form to fill in, three taps from reading to saved.

The processing script uses claude-sonnet-4-6 with a structured prompt asking for a JSON response:

msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=500,
    messages=[{"role": "user", "content": prompt}],
)
meta = json.loads(msg.content[0].text)

Required GitHub setup: add ANTHROPIC_API_KEY as a repository secret (Settings → Secrets → Actions), and create the add-link label:

gh label create add-link --color "#0075ca" --description "Process URL as a new link entry"

Auto-promote workflow

Links captured on Android pile up quickly, and most of them I’d happily publish after a few days’ reflection. A weekly GitHub Action (.github/workflows/auto-promote.yml, runs Monday 9am UTC) scans content/links/ for files that are:

  • draft: true
  • no_promote: false (or the field is absent)
  • File date older than 7 days

It flips matching files to draft: false, mind: outer, and opens a pull request. Merge to publish. Close the PR (and add no_promote: true to any you want to keep inner) to park them.

This is the threshold auto-promotion from Croft’s framing applied to the lowest-effort content type. Links are low-stakes enough that a PR-based review process is the right gate, rather than needing explicit /promote for each one.

Pagefind handles keyword search across published content. The inner mind needs something more capable: semantic search that can match conceptually related content even when the literal words don’t match.

The index is built by scripts/build-semantic-index.py using ChromaDB with its built-in sentence transformer embedding model (no API key needed):

collection = chroma.get_or_create_collection(
    "second-mind",
    embedding_function=chromadb.utils.embedding_functions.DefaultEmbeddingFunction()
)

The indexer is incremental. It hashes each file and skips unchanged content, so re-indexing after adding a few notes is fast.

Build the index:

python3 scripts/build-semantic-index.py

Then from Claude Code:

/search ideas about maintaining focus under interruption

Or directly:

python3 scripts/semantic-search.py "maintaining focus under interruption"

Returns the top 5 results ranked by semantic similarity, with path, inner/outer status, and a short excerpt. This is the Karpathy-style layer: it finds the note about deep work even if your query uses completely different words.

The .chroma/ directory is gitignored. It’s local state, not committed. Rebuild it any time with the index script.

The full workflow in practice

A typical week:

  • Throughout the week: share URLs on Android → auto-saved as draft links. Add quick notes via /add-note in Claude Code when an idea surfaces during work.
  • Monday morning: GitHub auto-promote PR lands in the inbox. Review, merge or close.
  • Whenever: run /curate to see what draft content has been accumulating and decide what to write up properly.
  • Writing a post: run /search to surface related inner-mind content before starting. Use /promote to move any notes that are publication-ready.

The system doesn’t require a dedicated “review session” to stay healthy. The auto-promote PR is the forcing function, and /curate is there when you want a fuller picture. Everything else happens in the flow of normal work.

If this is working, the weekly review should take under 20 minutes, and at least one older note should resurface while you draft something new.

Part 3 of 5. ← Part 1: The Why · ← Part 2: The Hugo Architecture · Part 4: Agents, SEO, and Weekly Audits →