The real CLAUDE.md powering Iwo Szapar's workflow — running a SaaS product, ISG advisory work, content system, and client delivery pipeline from a single AI brain. Advanced hooks, agent teams, and full MCP orchestration included.
# CLAUDE.md — AI Implementation Expert & Second Brain Architect
> Version: 2026-03 | Difficulty: advanced | This is a real setup powering a live product
## What Your AI Can Now Do
- Ship production features autonomously with `/yalla` — 4-agent planning team with adversarial red-team review before a single line of code is written
- Auto-track every outreach touchpoint (WhatsApp, email, LinkedIn) to CRM via hooks — zero manual logging
- Generate personalized Second Brain repositories for clients, fully automated from questionnaire to GitHub delivery
- Get a morning intelligence briefing combining sales pipeline, inbox, and task priorities with one `/overview` command
- Draft, evaluate, and publish LinkedIn posts with a single `/content-generation` command — voice consistency scored against 1,000+ real posts
- Run parallel agent teams: 1 lead + 3 specialists working simultaneously on different layers of the same feature
---
## Quick Start
1. `/begin [task]` before ANY code change — hooks enforce session branch discipline automatically
2. `/yalla` for complex features — plans with a 4-agent team, then builds and reviews before shipping
3. `/overview` every morning — real data from CRM, tasks, and calendar combined
4. `/respond-second-brain` for multi-channel outreach (WhatsApp + Gmail + LinkedIn in one command)
5. `/grow` weekly — brain health score, patterns learned, time savings metrics
---
## About This Setup
I run a multi-product business (SaaS, coaching, open-source MCP) while doing enterprise innovation advisory. My AI handles product development, CRM automation, content production, and client delivery simultaneously. The goal: think once, let the system run.
**What I'm optimizing for:**
- Zero context-switching between tools — everything surfaces in Claude
- Every decision leaves a trace (memory, task, commit)
- Automation that degrades gracefully — manual fallback for every automated step
---
## Pre-Built Commands
| Command | What It Does |
|---------|-------------|
| `/yalla` | Full autonomous pipeline: plan → build → test → review → ship |
| `/begin [desc]` | Start tracked session with branch + GitHub issue auto-created |
| `/end` | Close session with PR, merge, branch cleanup |
| `/overview` | Morning briefing: pipeline status + tasks + comms digest |
| `/respond-second-brain` | Multi-channel outreach: WhatsApp + Gmail + LinkedIn |
| `/content-generation` | Generate, evaluate, and queue LinkedIn/newsletter content |
| `/publish-blog` | Full pipeline: write → evaluate → fix AI slop → SEO → publish |
| `/add-prospect` | Add to CRM with auto-LinkedIn enrichment |
| `/grow` | Brain health score and learning metrics |
---
## How Claude Connects to Your Tools
| Tool | Why You Need It |
|------|----------------|
| Supabase MCP | Primary database: CRM, blog posts, product data |
| Resend MCP | Transactional email: purchase confirmations, drip sequences |
| Stripe MCP | Payment history, customer lookup, subscription management |
| Gmail (gog CLI) | Email outreach, inbox triage, reply drafting |
| LinkedIn (AnySite MCP) | Prospect research, profile enrichment, post engagement |
| Google Analytics MCP | Traffic analysis, content performance |
| Claude in Chrome MCP | LinkedIn automation, browser-based flows |
| Memory MCP | Persistent knowledge graph — context survives between sessions |
| GitHub MCP / gh CLI | Issues, PRs, file access without browser |
---
## Rules
- **MUST:** Run `/begin` before any code change — hooks block edits on main branch, no exceptions
- **MUST:** Use `mcp__supabase__execute_sql` for all DB queries
- **MUST:** Include `.js` extensions in all API imports (production build requirement)
- **MUST:** Add new routes BEFORE the catch-all `*` route
- **MUST:** Confirm before destructive actions (force push, hard reset, table drops)
- **SHOULD:** Use `Write` (not sequential `Edit` calls) for files over 500 lines — 80% fewer token failures
- **SHOULD:** Run `npm run check:types && npm run test:unit` before every push
---
## Project Structure
```
src/pages/ # React pages
api/ # Vercel serverless functions
lib/ # Shared utilities
.claude/hooks/ # Lifecycle automation (branch-guard, CRM sync)
.claude/docs/ # Architecture, patterns, gotchas
memory/ # Semantic patterns, personal profile, episodic sessions
product/ # Vision docs, specs, context engineering
```
---
## Automation (Hooks)
| Trigger | What Happens |
|---------|-------------|
| Any edit on `main` | `branch-guard.sh` blocks it — must be on session branch |
| Session start | Auto-switches to `main`, prevents branch reuse |
| WhatsApp send | Auto-syncs to CRM with timestamp and message summary |
| `git push` | Runs `check:types + test:unit` automatically |
---
## Gotchas
- **Missing `.js` in API imports** → Build fails in production
- **Route after catch-all `*`** → 404 forever, route never matches
- **Code after `res.json()`** → Vercel terminates function — use `waitUntil()` for background work
- **Large files (500+ lines) + many small Edits** → Use `Write` instead — saves 80% of tokens
- **Agent Teams on main branch** → Run `/begin` first — hooks apply to teammates too
---
## Memory & Learning
Claude builds context over time using the Memory MCP:
- Architectural decisions and why they were made
- Client patterns and buying signal recognition
- Content voice calibration (1,000+ LinkedIn comments analyzed)
- Recurring bugs and their root causes
- Patterns learned across sessions stored in `memory/semantic/patterns/`
Save anything: just say "remember that [fact]" in conversation.
Review: `/grow` shows health score + patterns learned this week.Ready-to-use skills included in this setup. Each runs a specialized workflow for your role.
/yallaFull autonomous feature pipeline with agent teams
/overviewMorning briefing: pipeline + tasks + comms
/respond-second-brainMulti-channel outreach in one command
/content-generationGenerate and queue LinkedIn/newsletter content
/growBrain health score and weekly learning metrics
branch-guard hookBlocks all edits on main — session discipline enforced
Supabase MCP
CRM, blog posts, product data — primary database for everything
Gmail via gog CLI
Email outreach, inbox management, reply drafting
AnySite MCP
LinkedIn prospect research and profile enrichment
Memory MCP
Persistent knowledge graph that survives between sessions
Google Analytics MCP
Content performance and traffic analysis
Stripe MCP
Payment history and customer management
Claude in Chrome MCP
Browser automation for LinkedIn and testing flows
GitHub MCP / gh CLI
Issues, PRs, file access without leaving the terminal
Full Feature Ship
/yallaAutonomous plan → build → test → review → ship pipeline with agent teams
Morning Briefing
/overviewSales pipeline, tasks, and comms digest in one view
Multi-Channel Outreach
/respond-second-brainWhatsApp + Gmail + LinkedIn outreach from a single command
Content Pipeline
/content-generationGenerate, evaluate, and queue content across platforms
MemoryOS analyzes YOUR actual workflow, tools, and communication style to generate a brain personalized to you. Fully automated — you decide what to share, it does the rest.
Based on patterns from 100+ professionals. No technical knowledge required.
Get Your Personalized Setup