DEV Community

Cover image for I gave Claude Code a brain. here's what happened.
Nadav Avisrur
Nadav Avisrur

Posted on

I gave Claude Code a brain. here's what happened.

ok so I built something last week. not the point of this post though.

the point is HOW i built it. because I think I accidentally stumbled into a workflow that's kind of broken.

I built and shipped a full open source tool, solo, over a weekend. a monorepo with backend, frontend, CLI, landing page, demo videos, marketing content for 6 platforms, SEO, Discord server, security audit, npm packages published. 34 working sessions. one person.

the tool is clsh. I needed real terminal access on my phone so I built it for myself and open sourced it. but honestly thats not what I want to talk about. I want to talk about the system.

the problem with Claude Code sessions

if you've used Claude Code for anything serious, you know the pain. context resets. every new session starts from zero. you explain the same architecture, the same decisions, the same file structure, again and again. you lose momentum. you lose context. and the agent makes dumb mistakes because it doesnt remember what you decided 3 sessions ago.

I got frustrated enough to try something stupid: what if I gave Claude a brain?

obsidian as a context manager


so before I wrote a single line of code, I spent maybe a full day doing deep research. chatgpt, claude, reading docs, looking at how other people structure projects. and then I created an Obsidian vault that mirrors an actual company.

clsh.dev/
  00_Company/         ← identity, vision, mission
  01_RnD/             ← architecture, frontend, backend, infra, devops
  02_Product/          ← MVP definition, features, roadmap, vision
  03_Marketing/        ← social media, content, GTM, branding, SEO
  04_Community/        ← discord, github, contributors, growth
  05_Business/         ← competitors, market intel
  06_Legal/            ← licensing, security, privacy
  Docs/                ← source technical plan
  Handoffs/            ← session handoff notes (43 of them now)
  Templates/           ← reusable note templates
  Execution-Plan.md    ← THE source of truth
  VAULT-INDEX.md       ← navigation hub
  CLAUDE.md            ← agent instructions
  .claude/commands/    ← custom slash commands
  .claude/agents/      ← agent personas (7 of them)
Enter fullscreen mode Exit fullscreen mode

every folder has an index file. every decision gets logged. every session ends with a handoff. the vault IS the project brain, and Claude Code reads it at the start of every session.

the init command


this was the most important part. I built a single command that scaffolds this entire vault structure. it creates every folder, every index file, every template, the execution plan skeleton, agent personas, custom commands, everything. one command and you go from empty folder to a fully structured project brain.

but the real work was before that. I spent hours with ChatGPT and Claude doing deep research on:

  • what departments does a solo dev actually need to think about?
  • whats the minimum viable structure for each?
  • how should files reference each other (wikilinks)?
  • what does a good execution plan look like for a 2-week project?

that research became the init command. and the init command became the foundation for everything.

the workflow commands


here's where it gets interesting. I wrote 8 custom Claude Code commands that basically turn Obsidian into an operating system for development:

/resume-clsh — reads the execution plan, finds the latest handoff, identifies which steps are unblocked, shows you exactly where you left off and what to do next. every session starts with this.

/wrap-up-clsh — updates the execution plan, updates all department files, creates a handoff note with what was done, what's next, what's blocked. every session ends with this. this is what gives the next session its memory.

/status — full dashboard. progress per phase, department health, social channels, blockers, next milestones.

/bug-fix — reads the vault docs, finds relevant code, fixes the bug, updates vault if there's a documentation gap.

/new-feature — checks the execution plan, creates a feature spec from template, plans the implementation, updates the features list.

/sprint — plans the week's work based on whats unblocked in the execution plan.

/vault-sync — syncs all changed files back to the vault after a batch of work.

the key insight is that every command reads from AND writes to the vault. so the knowledge compounds. session 34 has the full context of sessions 1-33, not because of some magic memory system, but because every session updated the same files.

parallel execution (this is where it gets wild)


my execution plan has "parallel groups" built in. steps that dont depend on each other can run simultaneously. so when I hit /resume-clsh, it doesn't just show me the next step. it shows me ALL unblocked steps and which agent personas should handle each one.

then I spawn a team. literally. Claude Code creates a team with multiple agents, each working in their own git worktree so they dont step on each other. one agent builds the backend. another builds the frontend. at the same time. then I merge the worktrees.

Team: "clsh-phase1b"
+---------------------------+  +---------------------------+
|  backend-engineer          |  |  frontend-engineer         |
|  Step 1.2 + 1.3            |  |  Step 1.4                  |
|  worktree: backend-core    |  |  worktree: frontend-core   |
+---------------------------+  +---------------------------+
Enter fullscreen mode Exit fullscreen mode

this is not hypothetical. I have 7 agent personas defined: rnd-lead, frontend-engineer, backend-engineer, devops-engineer, product-manager, marketing-lead, community-lead. each one has a persona file that tells it what it owns, what tools it has, how to coordinate.

not just code

and this is the part I think most people miss. this system isn't just for writing code. the vault has marketing, SEO, community, legal, business intel. so when I ran /new-feature for "create demo video", Claude:

  1. created a Remotion project (React-based video rendering)
  2. built 5 animated scenes with iPhone frames
  3. rendered the video to MP4
  4. compressed it with ffmpeg
  5. embedded it in the landing page
  6. created Instagram composites (1080x1350) with brand colors
  7. wrote captions for 6 different platforms
  8. posted to Discord

when I ran the SEO workflow, it set up Google Search Console, submitted sitemaps, added meta tags, JSON-LD structured data, Open Graph tags. all tracked in 03_Marketing/SEO/SEO.md.

when I did the security audit, it found 4 critical and 9 high vulnerabilities, documented them all in 01_RnD/Security-Audit.md, and then I ran fix sessions that checked off each one. the vault tracked the entire thing.

43 handoff files. each one a snapshot of exactly where things stood at the end of that session.

the results

  • 34 sessions over a weekend
  • 88% complete (21/24 execution plan steps)
  • full monorepo: backend (node-pty + WebSocket + auth), frontend (React + xterm.js), CLI, landing page
  • npm published (3 packages), domain live, DNS configured, SSL
  • demo videos (Remotion), Instagram content (7 composites), marketing copy for 6 platforms
  • Discord server with bot, channels, roles
  • security audit + fixes
  • SEO infrastructure
  • all of this, solo

I'm not saying this is the only way to do it. but the idea of giving your AI coding agent a persistent, structured brain that it reads from and writes to every session... that changed everything for me.

want the setup?

I can share the exact Obsidian vault template + all 8 custom commands + the agent personas + the init command. everything you need to replicate this workflow for your own project.

just drop a comment asking for it and I'll DM you the zip.

or check out clsh if you're curious what I built with it. just a tool I needed for myself and decided to open source.


built with an unhealthy amount of coffee and an Obsidian vault that knows more about my project than I do

Top comments (0)