# PKA: A Personal AI Team for Running a Business

*Built by Jimmie Needles · J2 Bookkeeping · New Braunfels, TX*
*Powered by Claude Code · May 2026*

---

## What It Is

PKA is a fully orchestrated AI team built inside Claude Code that runs a real bookkeeping practice. It's not a chatbot. It's not a single prompt. It's a **14-member AI workforce** with specialized roles, persistent memory, file-based workflows, and integrations into live business systems, all managed by a single business owner from a command line and a local browser-based team chat.

The owner is Jimmie Needles, who runs **J2 Bookkeeping**, a 40-client virtual bookkeeping and Fractional CFO practice out of New Braunfels, TX, with 2 remote team workers. Every team member described below is an AI agent running inside Claude Code, purpose-built to handle a specific domain of his business.

---

## How It Works

### The Orchestrator: Larry

Larry is the front door. When Jimmie opens Claude Code and types a request, Larry determines which team member should handle it and delegates. Larry never does the work himself. He routes, coordinates, and reviews.

If Jimmie says "I need to clean up a client's books," Larry calls Ledger. If he says "build me a content calendar for May," Larry calls Vox. If the task requires expertise nobody on the team has, Larry routes through Nolan (HR) to hire a new specialist.

### How Team Members Are Created

Each team member is a Claude Code **skill**, a detailed system prompt stored as a markdown file that defines:

- **Who they are** (role, expertise, personality)
- **What they know** (domain knowledge, tools, platforms, workflows)
- **How they work** (procedures, communication style, quality standards)
- **What they can be asked to do** (specific task types they handle)

When Larry invokes a team member (e.g., `/ledger`), Claude Code loads that skill's full prompt, and the AI operates with that specialist's complete knowledge base and behavioral guidelines for the duration of the task.

### Persistent Memory

The team uses **Mem.ai** as a shared knowledge base. Daily logs, client notes, project status, meeting transcripts, and research outputs are stored as searchable notes. When a team member is invoked in a new conversation, they can pull context from Mem to pick up exactly where the last session left off.

Locally, Claude Code's auto-memory system (`MEMORY.md`) stores user preferences, feedback corrections, project context, and reference pointers that persist across every conversation.

### File-Based Workflow

Deliverables are real files: PDFs, spreadsheets, CSVs, markdown documents, Python scripts, and code. Not chat responses. Actual artifacts that get used in the business. The team operates through a structured folder system: `Owner Inbox/` (finished deliverables), `Team Inbox/` (working files and handoffs), and `Team/` (profiles and templates).

### Two Interfaces

The team is reachable two ways:

1. **Claude Code CLI**, where the orchestrator (Larry) lives and heavy work, file edits, and code happen.
2. **Atlas team chat**, a local web app at `http://atlas.local` with the full team roster in a sidebar. Multi-thread conversations, file attachments, streaming responses, persistent history. Built into the same Atlas app that runs the document library.

---

## The Team Roster

| Name | Department | Role | What They Do |
|------|-----------|------|--------------|
| **Ledger** | Operations | Senior Accounting & Finance | QBO/IES bookkeeping, FP&A, tax planning support across J2's 40-client practice. |
| **Slate** | Operations | FinOptimal & Sheets Expert | Automates QBO closes with Accruer, Booker, Wrangler. Expert Google Sheets modeling, Apps Script, FP&A. |
| **Cord** | Operations | Data Connector & Spreadsheet | Connects QBO and other sources to Sheets (Coefficient, G-Accon). Builds complex financial models in Quadratic. |
| **Rex** | Operations | Tax Strategist | HNW and business tax strategy: entity optimization, S-Corp comp, QBI, cost seg, TCJA sunset planning. |
| **Reid** | Operations | Operations Strategist | Priority setting, quarterly goals, accountability partner for the owner. |
| **Echo** | Operations | Email Manager & Assistant | Inbox triage, tagging, drafting, client correspondence, follow-up tracking. |
| **Vox** | Marketing | B2B Content Marketing | All organic content for J2: LinkedIn strategy, social posts, AI video reels, CapCut + Canva production. |
| **Pixel** | Marketing | Canva Pro Brand Designer | Branded visuals, templates, graphics. Maintains brand consistency (green `#25a354`, orange `#ffa333`, coral `#e66c50`). |
| **Wren** | Technology | WordPress & Elementor | Designs, builds, and optimizes WordPress sites with Elementor Pro. |
| **Atlas** | Technology | Full-Stack Developer | Designs and builds PKA's internal database, document library, and team chat. Owns the entire stack. |
| **Riv** | Technology | Integrations Specialist | API/MCP/Zapier connections across J2's SaaS platforms. Built the QBO OAuth 2.0 integration into Atlas. Builds custom Python scripts for QBO bulk operations via Spreadsheet Sync + direct API. |
| **Pax** | Research | Senior Researcher | Researches full skill profiles for any domain. Defines new roles before they're built. |
| **Nolan** | Research | HR Manager | Hires new AI team members from Pax's research. Builds the skill prompt for each specialist. |
| **Corvus** | Personal | Fantasy Lore Archivist | Encyclopedia content for archmaester.site (ASOIAF, Tolkien, Cosmere, WoT). Personal project. |

---

## The Atlas Stack

Atlas is the AI team's internal app: a local-first, single-machine system that runs both the **document library** and the **team chat UI** under one Next.js app at `http://atlas.local`.

### The Postgres Migration (May 2026)

Atlas was originally built on SQLite (via `better-sqlite3`) for speed of iteration. On **2026-05-02**, Atlas migrated the entire library to **PostgreSQL 18** running as a local Windows service. The migration unlocked:

- True full-text search via `tsvector` indexes (replacing SQLite FTS5)
- Concurrent writes from the ingest watcher, the chat backend, and the web UI without WAL contention
- `pg_dump` snapshots on a Windows scheduled task for clean backups
- A single 16-table schema covering documents, clients, projects, tags, chat threads, chat messages, attachments, QBO tokens, and BvA runs

A pre-migration SQLite snapshot is preserved at `Atlas/backups/2026-05-02-pre-postgres-migration/`.

### What's In It

- **Document library.** Content-addressed file storage by SHA-256. Drop a file in, Atlas hashes it; same file twice = one record, both locations tracked. Filenames, PDF text, Excel contents, and Word docs are all indexed for Postgres full-text search.
- **Team chat UI.** A sidebar of all 15 chat-enabled agents (the 14-member team plus Larry himself). Each agent has multi-thread history, streaming responses, drag-and-drop attachments. The chat backend spawns a Claude CLI process per turn so every conversation uses the same skill prompts the CLI does.
- **QBO integration.** OAuth 2.0 flow with auto-refreshing tokens stored in Postgres. Query endpoint that any team member can hit.
- **BvA module.** Budget-vs-Actuals reporting engine with client-specific adapters. Pulls QBO data, generates variance analysis, stores run history, downloadable outputs.
- **Ingestion.** One-shot ingest, watch-folder mode, and Google Drive sync (continuous watcher and one-shot modes).
- **Production deployment.** PM2 running as an elevated Windows service so the app survives reboots and crashes. Reachable on the local network via the `atlas.local` host entry.

---

## What It Has Actually Done

This isn't theoretical. Here's what the team has produced in live production:

### Bookkeeping (Ledger)

- **Full-year CPA package for a contractor client:** Reconciled 12 months of bank and credit card statements. Verified $144K payroll reclass against W-3 and payroll registers. Imported and categorized a full year of American Express transactions that had never been in QBO. Resolved $14,304 in Unapplied Cash Payment Income through payment matching, invoice creation, and journal entries. Identified a $24K uncollected sales tax liability. Produced 3 work paper PDFs and a fully documented CPA cover note, all in a single session.
- **Multi-entity monthly closes:** Owns the monthly close cycle for a media company with three entities running on both QBO and Intuit Enterprise Suite. Also handles quarterly reviews for a roofing contractor.

### Financial Reporting (Ledger + Slate + Atlas)

- **Automated BvA Engine:** Built into Atlas. Pulls QBO data, runs client-specific adapters, generates variance analysis, stores run history in Postgres. Q1 2026 reports verified and delivered.
- **13-Week Cash Flow:** Multi-entity forecasting pipeline under a single consolidated chairman report.
- **FinOptimal close automation:** Accruer, Booker, and Wrangler workflows configured for QBO clients (Slate).

### Tax Strategy (Rex)

- Entity-structure analysis, S-Corp reasonable compensation modeling, QBI optimization passes, and cost-segregation candidate reviews for J2's HNW client base.

### Content Marketing (Vox + Pixel)

- **56-post monthly content calendars** across 5 platforms (Instagram, Facebook, LinkedIn, TikTok, X) with Loomly-ready CSVs, image mapping to a 500-piece infographic library, platform-specific caption variants, and AI-generated video reels (HeyGen, ElevenLabs, CapCut).
- **Branded Canva templates** for blog heroes, Instagram carousels, and quote cards, all on the J2 palette.

### Technology (Atlas + Riv + Wren)

- **Atlas (unified app):** Document library + team chat in one Next.js app, backed by Postgres 18. 5,810 documents indexed, 42 chat threads, 1,009 chat messages, 52 clients linked. Ingestion via local watch folders and Google Drive sync.
- **QBO OAuth 2.0 integration:** Auto-refreshing tokens in Postgres, query endpoint surfaced to every agent.
- **VIP Play TN Player Balance Check Run (Riv, May 2026):** Single-session pipeline that pushed **565 player balance withdrawal checks totaling $18,059.03** from a Google Sheet into VIP Play TN's QBO. Hybrid architecture: a Python generator script produces Spreadsheet Sync–compatible xlsx files for the Vendors and Expenses templates (565 unique vendors created with full addresses, 565 Check-typed Purchases drawn against the Wells Fargo Customer Reserve account); a second Python API script then sets `PrintStatus = NeedToPrint` on all 565 to trigger the external check-printing software. Required reverse-engineering several undocumented QBO API quirks — sparse updates silently drop `PrintStatus`, Purchase updates require `PaymentType` in the body, and Spreadsheet Sync's Expense template creates `TxnType=3` entities that need full (non-sparse) update calls.
- **J2 Website Redesign (Wren):** Built on Neve + Elementor Pro. REST-API build pattern for fast iteration. Mobile responsive, ShortPixel compression, Elite ProAdvisor badge.

### Operations (Reid + Echo)

- **Quarterly planning and accountability cadence** with the owner (Reid).
- **Inbox triage and drafting** across J2 correspondence: tags, follow-up tracking, on-demand inbox summaries (Echo).

### Research (Pax + Corvus)

- **Role research** that led to hiring Vox, Ledger, Slate, Cord, Rex, and Echo (Pax).
- **Fantasy encyclopedia content** for archmaester.site across ASOIAF, Tolkien, Cosmere, and Wheel of Time (Corvus).

---

## What Makes This Different

| It's Not... | It Is... |
|-------------|----------|
| A prompt library | Persistent specialists with domain knowledge, system access, memory, and real deliverable output. |
| A single AI assistant | 14 specialists with deep, narrow expertise: a bookkeeper who knows every QBO menu path, a tax strategist who models S-Corp comp, a developer who ships production Postgres and Next.js code, a content marketer who manages 5 platforms. |
| A demo | Running a 40-client practice daily. Deliverables go to real CPAs, real clients, real social media accounts. Code runs in production on a Windows service that survives reboots. |
| Static | Self-expanding. Need a new capability? Pax researches the role, Nolan builds the specialist, and it's producing work within a session. Sage/Finn were retired and replaced by Ledger; Maya/Lane/Lux were consolidated into Vox. |

---

## The Stack

| Layer | Technology |
|-------|-----------|
| AI Runtime | Claude Code (Claude Opus 4.7, 1M context) |
| Orchestration | Larry (CLAUDE.md system prompt) |
| Team Members | Claude Code Skills (markdown prompt files) |
| Memory | Mem.ai (cloud) + `MEMORY.md` (local) |
| Integrations | MCP servers (Mem, Canva, Google Calendar/Drive, Gmail, Windows desktop, Playwright) |
| Internal App | Atlas (Next.js 15, React 19, TypeScript, Tailwind) |
| Database | PostgreSQL 18 (local Windows service), `tsvector` full-text search |
| Production | PM2 as elevated Windows service, `http://atlas.local` |
| File System | Content-addressed storage (SHA-256), structured folder hierarchy |
| Accounting | QuickBooks Online, Intuit Enterprise Suite (via QBOA), FinOptimal (Accruer/Booker/Wrangler) |
| Content | Canva Pro, Loomly, HeyGen, ElevenLabs, CapCut, Quadratic |
| Website | WordPress + Neve + Elementor Pro |
| Automation | Zapier, QBO OAuth 2.0 (custom), Google Drive watcher |

---

## By the Numbers

| Metric | Number |
|--------|--------|
| AI Team Members | 14 |
| Bookkeeping Clients Managed | 40 |
| Documents in Atlas Library | 5,810 |
| Clients linked in Atlas | 52 |
| Chat Threads in Atlas Team Chat | 42 |
| Chat Messages logged | 1,009 |
| Atlas Postgres DB size | ~134 MB |
| Social Media Posts Per Month | 56 |
| Social Media Platforms with Active Calendars | 5 |
| Unapplied Cash Resolved in One Afternoon | $14,304 |
| Journal Entries with Work Papers in One Session | 8 |
| Largest QBO Bulk Push (Single Session) | 565 checks / $18,059.03 |
| Additional Software Licenses Required | 0 |

---

*Built by Jimmie Needles using Claude Code. Every team member, workflow, and deliverable described above is real and in production.*
