All Days
Day 43

Second Brain Architecture

// infrastructure series

The AI Second Brain architecture

Wire Claude Code into your second brain. Obsidian + PARA + daily notes — editable, queryable, and compounding over time.

12+
hrs/week saved
60+
active skills
3
memory files
1
heartbeat cron

The three-layer system

Memory feeds capabilities. Capabilities trigger the heartbeat.

// system architecture — three layers
Layer 1
Memory
soul.md
personality + voice
user.md
profile + context
memory.md
decisions + rules
Loaded at session start via hook. Promoted daily from logs.
Layer 2
Capabilities
Content
Research
Diagrams
Email
Slack
Attio
YouTube
60+ skills. Each one powered by the memory layer above.
Layer 3
Heartbeat
APIs
Gmail, Slack, Attio
Gather
context pulled
Reason
Claude thinks
Act
execute task
Alert
Slack notify
Cron-driven. Proactive. Runs without you.

Security + the daily cycle

Keep the trifecta in check. Keep the cycle running.

The Lethal Trifecta
Private Data — API keys, tokens, .env files
Untrusted Input — user-supplied prompts, URLs
Exfiltration Vector — network, clipboard, shell
Minimise each deliberately. Don't use OpenClaw. Scope every agent.
Key Pattern — Memory Promotion

How to wire it up

Four steps. Start today. Compound forever.

01
Create your three memory files

~/.claude/soul.md — personality, voice, brand. ~/.claude/user.md — your name, role, goals, ICP. ~/.claude/memory.md — decisions, rules, recurring context.

02
Hook them into every session

Add a PreToolUse hook in settings.json that cats your memory files before any tool runs. Claude reads context before acting.

03
Link Obsidian as your vault

Point daily notes to ~/notes/daily/. Use PARA folders: Projects, Areas, Resources, Archive. Claude can read, write, and query any file in the vault.

04
Schedule the daily heartbeat

A cron job runs Claude every morning: pulls Gmail + Slack, reasons over the context, writes to your daily note, Slack-notifies you. Runs without you.

Starter templates

Copy, personalise, ship.

A
soul.md — your identity file
# soul.md — who I am
name: Claude (AY Automate instance)
voice: direct, no fluff, execution-first
brand: AY Automate
owner: Walid Boulanouar
language: match user, default EN

# always
- be specific, not vague
- give next action, not theory
- short > long
B
settings.json — hook to load memory
# .claude/settings.json
{
  "hooks": {
    "PreToolUse": [{
      "matcher": ".*",
      "hooks": [{
        "type": "command",
        "command": "cat ~/.claude/memory.md"
      }]
    }]
  }
}
C
daily-heartbeat.sh — morning cron
# daily-heartbeat.sh (cron: 0 8 * * *)
claude --print "
  1. Check ~/.claude/memory.md
  2. Pull Gmail unread (last 24h)
  3. Pull Slack unreads
  4. Summarise top 3 actions
  5. Append to ~/notes/daily/$(date +%F).md
  6. Slack notify me with summary
"

What becomes possible

When memory is persistent and skills compound.

Queryable notes

Ask Claude to search across your entire Obsidian vault. “What did I decide about pricing last month?” — instant answer.

Skills that remember

Every skill runs with your identity baked in. Content sounds like you. Research uses your ICP. Outreach knows your offer.

Self-improving system

Daily heartbeat extracts learnings from logs, promotes them to memory.md. The system gets better every day without manual input.

Proactive alerts

Claude monitors your inbox and Slack overnight. Surfaces what matters. Drafts replies. You wake up to a done list, not a task list.

Auto daily notes

PARA structure enforced automatically. Every session appends to the right daily note file. No manual filing.

Context-aware execution

Claude knows your active projects, current goals, and recent decisions. Every action is contextual, not generic.

It saves me 10+ hours per week. Not because it's powerful. Because it's scoped.

don't miss what's next.

second brain templates, skill packs, and automation playbooks. straight to your inbox. no spam. unsubscribe anytime.

Day 43 of 30 · AY Automate · Claude Code Series · ayautomate.com