How We Built a Real-Time Brain with Obsidian, Sync and Claude Code

How We Built a Real-Time Brain with Obsidian, Sync and Claude Code
This is your brain while making DormWay (your brain while using it is much more ordered)

How We Turned Claude into a Real-Time Team Member

We transformed our documentation from a painful commit-push-wait cycle into a real-time collaboration system where our AI assistant updates our knowledge base as we think. Here's how we did it.

The Problem: Documentation That Couldn't Keep Pace

Like many startups, we began with MkDocs. It was clean, simple, and git-friendly. But as DormWay grew, we hit several walls:

  • Linear Structure: MkDocs forced hierarchical thinking when our knowledge was naturally interconnected
  • Slow Updates: Every documentation change required commit, push, and build cycles
  • No Real-Time Collaboration: Team members couldn't see each other's work until merged
  • AI Integration Friction: Complex tooling required for any AI assistance

The breaking point came during a product planning meeting. Our workflow was painful:

  1. Wait for the Read.ai report
  2. Copy them into a command line prompt for Claude
  3. Accept all of its edits. to the documentation tree
  4. Commit to git, push to origin
  5. Wait for mkdocs to process
  6. Check if it worked?
  7. Share with team

It was like having a brilliant team member who could only communicate via postal mail.

The Solution: Obsidian Team Sync+ Claude Code + QuickAdd

We built a "documentation brain" with three key components:

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│                 │     │                  │     │                 │
│    Obsidian     │────▶│   QuickAdd       │────▶│  Claude Code    │
│  (Knowledge     │     │  (Automation)    │     │  (AI Brain)     │
│   Vault)        │     │                  │     │                 │
│                 │◀────│                  │◀────│                 │
└─────────────────┘     └──────────────────┘     └─────────────────┘
        ▲                                                  │
        │                                                  │
        └──────────────────────────────────────────────────┘
                     Real-time Sync Loop

1. Obsidian: The Neural Substrate

Our knowledge vault structure evolved organically:

DormWay/
├── 📅 Daily Notes/       # Time-based documentation
├── 🚀 Features/          # Feature ideation & specs
├── 🏗️ Architecture/      # Technical decisions
├── 🔧 Technical/         # Implementation guides
├── 🤖 AI Crews/          # AI agent specifications
├── 📊 Widgets/           # Widget system docs
├── 🎨 Canvases/          # Visual planning
└── Scripts/              # Claude integration

2. QuickAdd: The Automation Layer

QuickAdd became our secret weapon. We built custom macros that:

  • Capture context from the current note
  • Determine which directory Claude should run from
  • Format prompts with relevant context
  • Handle responses asynchronously
  • Insert results directly into notes

3. Claude Code: The AI Collaborator

Claude isn't just a tool—it's a team member that:

  • Analyzes: Reviews code and architecture decisions
  • Documents: Generates comprehensive technical documentation
  • Connects: Finds relationships between disparate concepts
  • Suggests: Proposes improvements and identifies gaps
  • Remembers: Maintains context across conversations

Contextual Containment: Teaching Claude Where to Look

One critical innovation was giving Claude contextual awareness through directory-based execution. Our QuickAdd macros intelligently determine where Claude should run:

// Directory resolution logic
function determineClaudeContext(trigger) {
    const contexts = {
        'architecture': '/monorepo/root',
        'ios-widget': '/monorepo/ios/Widgets',
        'backend-api': '/monorepo/api',
        'documentation': '/obsidian-vault',
        'cross-repo': process.env.CLAUDE_REPOS_PATH
    };
    
    // Macro determines context from note location or explicit selection
    return contexts[trigger.context] || process.cwd();
}

This containment strategy provides:

  • Focused Analysis: Claude only sees relevant code for the task
  • Performance: Smaller context windows = faster responses
  • Security: Limits access to sensitive areas
  • Accuracy: Reduces hallucination by constraining scope

CLAUDE.md: Distributed Intelligence

Throughout our codebase, we maintain CLAUDE.md files—context documents that act as local guides:

monorepo/
├── CLAUDE.md                    # Root-level architecture overview
├── ios/
│   ├── CLAUDE.md               # iOS-specific patterns & conventions
│   └── Widgets/
│       └── CLAUDE.md           # Widget system documentation
├── api/
│   └── CLAUDE.md               # API design principles
└── infrastructure/
    └── CLAUDE.md               # Deployment & scaling notes

When Claude runs in a directory, it automatically ingests the relevant CLAUDE.md files, giving it immediate understanding of local conventions without pollution from irrelevant information.

Sample CLAUDE.md (from ios/Widgets/)

# Widget System Context

## Architecture
- SwiftUI-based with WidgetKit
- Follow MVVM pattern
- All widgets must support offline mode

## Conventions
- Prefix widget bundles with `com.dormway.widget.`
- Use `DWWidget` as base protocol
- Color tokens from DesignSystem.swift only

## Common Issues
- Timeline refresh: Use 15-minute minimum
- Memory limit: Keep under 30MB
- No network calls in timeline provider

## Recent Decisions
- 2024-03-15: Moved to actor-based state management
- 2024-03-20: Standardized on 3 widget sizes only

The "Fire and Forget" Magic

The key innovation was eliminating all friction. Instead of the painful commit-upload-process cycle:

// The core "fire and forget" pattern
async function fireAndForgetClaude(prompt, outputPath) {
    // Launch Claude in background, non-blocking
    const command = `claude --print "${prompt}" > "${outputPath}" &`;
    exec(command, { 
        cwd: vaultPath,
        detached: true  // This is the magic - runs independently
    });
    
    // Return immediately - don't wait
    return { status: 'processing', outputPath };
}

The Complete Flow: From Thought to Documentation

  1. Trigger (10:32:00): During meeting, hit Cmd+Shift+C
  2. Context Capture (10:32:01): QuickAdd grabs:
    • Current note content
    • Note location (determines Claude's working directory)
    • Selected text or entire buffer
    • Relevant CLAUDE.md files in path
  3. Real-time Sync (10:32:15):
    • Output appears in Obsidian
    • Team members see updates via Obsidian's cloud sync in realtime
    • Graph view updates with new connections

Execution (10:32:03):

claude --model opus \
       --include "CLAUDE.md" \
       --include "**/*.swift" \
       --print "${prompt}" > output.md &

Directory Resolution (10:32:02):

# If in /Features/iOS/Widgets.md
cd /monorepo/ios/Widgets
# Claude now has access to widget code + CLAUDE.md context

Real-World Example: Meeting to Implementation

Here's an actual workflow from last week:

10:32 AM - The Meeting: Riley and I discussing the new context-aware widget system.

10:32 AM - During Meeting:

  • Create note: Widget System Brainstorming.md
  • Type rough notes as we talk
  • Hit Cmd+Shift+C
  • Select "Meeting to Ideation" macro

10:32:15 AM - Real-Time Magic:

  • Claude starts processing in background
  • We continue discussing
  • Riley sees a new note appear: Widget System - Ideation Document.md
  • Sections populate in real-time:
    • Executive Summary
    • Technical Architecture
    • Implementation Tasks
    • Timeline Estimates

10:35 AM - Collaborative Refinement:

  • Both editing the generated document
  • I add a constraint we discussed
  • Riley adjusts the timeline
  • Hit Claude again: "Break this into Linear tickets"

10:36 AM - Task Generation:

  • 15 properly formatted task descriptions appear
  • Each with acceptance criteria
  • Dependency mappings included
  • Ready to copy into Linear

What took us hours before now happened during the meeting itself.

Results: A 10x Documentation Velocity

Real Numbers

  • Meeting-to-documentation time: 2 hours → 5 minutes
  • Documentation coverage: 40% → 95% of features
  • Average time to find information: 10 minutes → 30 seconds
  • Team onboarding time: 2 weeks → 3 days (true! We finally got some help, thanks Bennett!)
  • AI interactions per day: 50+ Claude queries

Qualitative Benefits

  • Thinking Out Loud: Documentation happens naturally
  • Collective Intelligence: Team knowledge compounds
  • Pattern Recognition: Spot trends and issues early
  • Living Documentation: Always current, always connected

Implementation Details

What You'll Need

  • Obsidian with QuickAdd plugin
  • Claude API access (or claude-cli installed)
  • Git for version control
  • Claude Sync (paid, only the lowest tier needed unless you have other vaults)

Security Notes

  • API keys stored in macOS Keychain, never in scripts
  • Claude execution sandboxed to specific directories
  • Sensitive paths excluded via .claudeignore files
  • All outputs logged for audit trail

When Things Go Wrong

  • API Rate Limits: Make sure Claude Code is logged in using auth, not using API keys
  • Context Too Large: Auto-splits into smaller chunks
  • Sync Conflicts: Last-write-wins with automatic backups
  • Claude Hallucinations: CLAUDE.md files provide guardrails, or just welcome your new, non existant team members
  • Claude is always too happy: No idea how to fix this, we've tried

From AI Tool to AI Employee

The transformation was complete when we stopped thinking of Claude as a tool and started treating it as a team member.

The Old Way: Claude as Tool

  • Write prompt → Submit → Wait → Copy result
  • Context switching between documentation and AI
  • Asynchronous, disconnected workflow

The New Way: Claude as Teammate

  • Think out loud in Obsidian → Claude responds inline
  • Continuous context, no switching
  • Synchronous, collaborative workflow
  • Feels like pair programming with documentation

By making the interaction instantaneous and non-blocking, we removed the psychological barrier between thought and documentation. Claude became an always-present collaborator who maintains consistency across our growing knowledge base.

The Future: Where We're Heading

Expanded AI Capabilities

  • Multi-agent documentation systems, with some persistently running agents, ie listening for git commits
  • Automatic code-to-doc generation
  • Predictive documentation suggestions
  • Slack integration for team chat
  • Agents that watch anlaytics and logs to give us insights

Team Scaling

  • Departmental sub-vaults
  • Automated knowledge synthesis
  • AI-powered onboarding paths
  • Cross-team knowledge sharing

Conclusion: Documentation as Competitive Advantage

Our Obsidian + Claude Code system turned documentation from a chore into a superpower. The key insight was simple but powerful: by removing friction through our "fire and forget" QuickAdd integration, we transformed Claude from a documentation tool into a real-time team member.

Now, when Riley and I are brainstorming, Claude is right there with us, turning our ideas into structured plans before we've even finished talking. A meeting to a prototype in hours, not weeks.

For other startups considering this approach:

  • Start Today: Even basic integration provides value
  • Remove Friction: The "fire and forget" pattern is game-changing
  • Think Real-Time: Sync makes collaboration magical
  • Embrace the Graph: Non-linear thinking yields insights
  • AI as Teammate: Treat Claude as a team member, not a tool

The future of documentation isn't static pages—it's living, breathing knowledge systems that think alongside us. At DormWay, we're not just building a platform for students; we're pioneering how modern engineering teams can collaborate at the speed of thought.

We will hopefully be opensourcing some of this soon (when we're not 100% heads down).

Follow our journey as we build the future of student life at dormway.app.