Skip to content

Automate Your AI Second Brain

Category Claude Code
Status ๐ŸŸก Partially completed
Repo nextwork-automate-your-ai-second-brain
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

๐Ÿ“š NextWork learning project. This is a practice project I built while working through NextWork's Automate Your AI Second Brain guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning โ€บ Claude Code
Status: ๐ŸŸก Partially completed

Overview

The vault only stays useful if feeding it and reading from it takes no effort. I had Claude Code write the commands for pulling in new material, briefing me, and debriefing me, and I wrote the backup and the schedule around them, keeping every outside tool read-only and local.

Summary

I turned the sourdough vault into a daily system, with Claude Code writing the new commands and running them. /pull-sources picks up new files from sources/ (messages, meeting notes, an AI-session note), copies them unchanged into raw/ and ingests them. It recorded 4 sources and 7 wiki pages were touched, and running it again found nothing new and wrote nothing. /briefing, run for 4 Dec 2026, read priorities.md, the calendar and open tasks through a connector, and the wiki, and wrote a briefing with the schedule, three reasoned priorities, an open wiki question and a clash check. /debrief added my evening note to the briefing, updated three wiki pages with sources and logged it. I also wrote a vault backup script (tested: commits only on change, pushes, a fresh clone matches) and a weekday runner that backs up, asks Claude Code for /briefing, and skips weekends; a Monday run produced its briefing. Partial: the connectors are my own read-only local calendar and task servers instead of Google Calendar, Linear and Notion, the sources are samples rather than my Gmail or transcripts, the backup goes to a local git repo rather than private GitHub, and the schedule is a script plus a crontab line, not an Anthropic cloud routine.

The checks behind this are in docs/verification.txt.

Skills & tools

Claude Code, MCP (stdio), Slash commands, Idempotent ingestion, git backups, Shell scheduling

What I built

  • .claude/commands/ (from command-src/): /pull-sources, /briefing and /debrief, written by Claude Code, next to the four commands from part one. CLAUDE.md has the schema and a section on the new commands; priorities.md holds my priorities.
  • sources/ and sources/.pulled.json: the sample inputs and the ledger that makes pulling idempotent (path, hash, whether ingested). raw/ and wiki/ hold the originals and the compiled pages (15 pages).
  • lifedata_mcp.py and data/: my read-only calendar and task connectors over MCP. mcp.example.json shows how Claude Code is pointed at them.
  • sync.sh and sync_test.sh: the backup script and its test. run_briefing.sh (with cc2.sh): the weekday runner. docs/ has a skipped weekend run, a Monday run and its briefing.
  • briefings/2026-12-04.md: the briefing and debrief. prompts/ and docs/session-log.md: my prompts and every session's tool calls and replies.
  • tests/verify.py: ledger, hashes, sourcing, links, briefing sections, connector calls and backup, all checked.

How to run

python3 tests/verify.py
sh sync_test.sh
# in Claude Code: /pull-sources, /briefing, /debrief <note>
# weekday schedule: 0 7 * * 1-5  ./run_briefing.sh /path/to/vault

Verification

I ran the verification command on 2026-12-03. The full output is in docs/verification.txt.

/workspace/nextwork-portfolio/.venv/bin/python tests/verify.py | grep -q 'DAILY LOOP OK' && echo DAILY OK

Notes

Claude Code noticed things I hadn't asked about: the session note about tidying a folder doesn't belong in a bread wiki (it got its own page anyway, because the schema says every source is ingested), and my 09:00 bake test was at 75% hydration while the stall loaf is planned at 70%. The debrief used the date I typed, not the system date.

What isn't done, and why

No Google Calendar, Linear, Notion, Gmail or Granola connectors and none of my real data: the connectors are my own local read-only servers over sample JSON, and the sources are sample files. No private GitHub repo or Obsidian Git plugin: the backup is a local bare repo. No Anthropic cloud routine: scheduling is a script plus a crontab line, which I haven't installed. Command files were copied into .claude/commands by me.


Original project: https://nextwork.ai/projects/ca88d155-c925-508c-88eb-ef48455c1a98 ยท Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ /workspace/nextwork-portfolio/.venv/bin/python tests/verify.py | grep -q 'DAILY LOOP OK' && echo DAILY OK

DAILY OK

[exit code 0]