thevoidforge 21.0.11 → 21.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/.claude/commands/ai.md +69 -0
  2. package/dist/.claude/commands/architect.md +121 -0
  3. package/dist/.claude/commands/assemble.md +201 -0
  4. package/dist/.claude/commands/assess.md +75 -0
  5. package/dist/.claude/commands/blueprint.md +135 -0
  6. package/dist/.claude/commands/build.md +116 -0
  7. package/dist/.claude/commands/campaign.md +201 -0
  8. package/dist/.claude/commands/cultivation.md +166 -0
  9. package/dist/.claude/commands/current.md +128 -0
  10. package/dist/.claude/commands/dangerroom.md +74 -0
  11. package/dist/.claude/commands/debrief.md +178 -0
  12. package/dist/.claude/commands/deploy.md +99 -0
  13. package/dist/.claude/commands/devops.md +143 -0
  14. package/dist/.claude/commands/gauntlet.md +140 -0
  15. package/dist/.claude/commands/git.md +104 -0
  16. package/dist/.claude/commands/grow.md +146 -0
  17. package/dist/.claude/commands/imagine.md +126 -0
  18. package/dist/.claude/commands/portfolio.md +50 -0
  19. package/dist/.claude/commands/prd.md +113 -0
  20. package/dist/.claude/commands/qa.md +107 -0
  21. package/dist/.claude/commands/review.md +151 -0
  22. package/dist/.claude/commands/security.md +100 -0
  23. package/dist/.claude/commands/test.md +96 -0
  24. package/dist/.claude/commands/thumper.md +116 -0
  25. package/dist/.claude/commands/treasury.md +100 -0
  26. package/dist/.claude/commands/ux.md +118 -0
  27. package/dist/.claude/commands/vault.md +189 -0
  28. package/dist/.claude/commands/void.md +108 -0
  29. package/dist/CHANGELOG.md +1918 -0
  30. package/dist/CLAUDE.md +250 -0
  31. package/dist/HOLOCRON.md +856 -0
  32. package/dist/VERSION.md +123 -0
  33. package/dist/docs/NAMING_REGISTRY.md +478 -0
  34. package/dist/docs/methods/AI_INTELLIGENCE.md +276 -0
  35. package/dist/docs/methods/ASSEMBLER.md +142 -0
  36. package/dist/docs/methods/BACKEND_ENGINEER.md +165 -0
  37. package/dist/docs/methods/BUILD_JOURNAL.md +185 -0
  38. package/dist/docs/methods/BUILD_PROTOCOL.md +426 -0
  39. package/dist/docs/methods/CAMPAIGN.md +568 -0
  40. package/dist/docs/methods/CONTEXT_MANAGEMENT.md +189 -0
  41. package/dist/docs/methods/DEEP_CURRENT.md +184 -0
  42. package/dist/docs/methods/DEVOPS_ENGINEER.md +295 -0
  43. package/dist/docs/methods/FIELD_MEDIC.md +261 -0
  44. package/dist/docs/methods/FORGE_ARTIST.md +108 -0
  45. package/dist/docs/methods/FORGE_KEEPER.md +268 -0
  46. package/dist/docs/methods/GAUNTLET.md +344 -0
  47. package/dist/docs/methods/GROWTH_STRATEGIST.md +466 -0
  48. package/dist/docs/methods/HEARTBEAT.md +168 -0
  49. package/dist/docs/methods/MCP_INTEGRATION.md +139 -0
  50. package/dist/docs/methods/MUSTER.md +148 -0
  51. package/dist/docs/methods/PRD_GENERATOR.md +186 -0
  52. package/dist/docs/methods/PRODUCT_DESIGN_FRONTEND.md +250 -0
  53. package/dist/docs/methods/QA_ENGINEER.md +337 -0
  54. package/dist/docs/methods/RELEASE_MANAGER.md +145 -0
  55. package/dist/docs/methods/SECURITY_AUDITOR.md +320 -0
  56. package/dist/docs/methods/SUB_AGENTS.md +335 -0
  57. package/dist/docs/methods/SYSTEMS_ARCHITECT.md +171 -0
  58. package/dist/docs/methods/TESTING.md +359 -0
  59. package/dist/docs/methods/THUMPER.md +175 -0
  60. package/dist/docs/methods/TIME_VAULT.md +120 -0
  61. package/dist/docs/methods/TREASURY.md +184 -0
  62. package/dist/docs/methods/TROUBLESHOOTING.md +265 -0
  63. package/dist/docs/patterns/README.md +52 -0
  64. package/dist/docs/patterns/ad-billing-adapter.ts +537 -0
  65. package/dist/docs/patterns/ad-platform-adapter.ts +421 -0
  66. package/dist/docs/patterns/ai-classifier.ts +195 -0
  67. package/dist/docs/patterns/ai-eval.ts +272 -0
  68. package/dist/docs/patterns/ai-orchestrator.ts +341 -0
  69. package/dist/docs/patterns/ai-router.ts +194 -0
  70. package/dist/docs/patterns/ai-tool-schema.ts +237 -0
  71. package/dist/docs/patterns/api-route.ts +241 -0
  72. package/dist/docs/patterns/backtest-engine.ts +499 -0
  73. package/dist/docs/patterns/browser-review.ts +292 -0
  74. package/dist/docs/patterns/combobox.tsx +300 -0
  75. package/dist/docs/patterns/component.tsx +262 -0
  76. package/dist/docs/patterns/daemon-process.ts +338 -0
  77. package/dist/docs/patterns/data-pipeline.ts +297 -0
  78. package/dist/docs/patterns/database-migration.ts +466 -0
  79. package/dist/docs/patterns/e2e-test.ts +629 -0
  80. package/dist/docs/patterns/error-handling.ts +312 -0
  81. package/dist/docs/patterns/execution-safety.ts +601 -0
  82. package/dist/docs/patterns/financial-transaction.ts +342 -0
  83. package/dist/docs/patterns/funding-plan.ts +462 -0
  84. package/dist/docs/patterns/game-entity.ts +137 -0
  85. package/dist/docs/patterns/game-loop.ts +113 -0
  86. package/dist/docs/patterns/game-state.ts +143 -0
  87. package/dist/docs/patterns/job-queue.ts +225 -0
  88. package/dist/docs/patterns/kongo-integration.ts +164 -0
  89. package/dist/docs/patterns/middleware.ts +363 -0
  90. package/dist/docs/patterns/mobile-screen.tsx +139 -0
  91. package/dist/docs/patterns/mobile-service.ts +167 -0
  92. package/dist/docs/patterns/multi-tenant.ts +382 -0
  93. package/dist/docs/patterns/oauth-token-lifecycle.ts +223 -0
  94. package/dist/docs/patterns/outbound-rate-limiter.ts +260 -0
  95. package/dist/docs/patterns/prompt-template.ts +195 -0
  96. package/dist/docs/patterns/revenue-source-adapter.ts +311 -0
  97. package/dist/docs/patterns/service.ts +224 -0
  98. package/dist/docs/patterns/sse-endpoint.ts +118 -0
  99. package/dist/docs/patterns/stablecoin-adapter.ts +511 -0
  100. package/dist/docs/patterns/third-party-script.ts +68 -0
  101. package/dist/scripts/thumper/gom-jabbar.sh +241 -0
  102. package/dist/scripts/thumper/relay.sh +610 -0
  103. package/dist/scripts/thumper/scan.sh +359 -0
  104. package/dist/scripts/thumper/thumper.sh +190 -0
  105. package/dist/scripts/thumper/water-rings.sh +76 -0
  106. package/package.json +1 -1
  107. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,856 @@
1
+ # The VoidForge Holocron
2
+
3
+ *A Holocron is an ancient device that stores the accumulated knowledge and teachings of Jedi masters. Only Force-sensitive users can open one.*
4
+
5
+ *You're holding VoidForge's. You opened it by installing Claude Code.*
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ 1. [Ignition](#1-ignition) — What VoidForge is, choosing your tier, first setup
12
+ 2. [The Forge](#2-the-forge) — Your first project, end-to-end
13
+ 3. [The Protocol](#3-the-protocol) — The 13-phase build sequence explained
14
+ 4. [The Council](#4-the-council) — The agent system, characters, and how they work together
15
+ 5. [The Arsenal](#5-the-arsenal) — Slash commands, when to use each
16
+ 6. [The Craft](#6-the-craft) — Code patterns and coding standards
17
+ 7. [The Archive](#7-the-archive) — Build journal, context management, session recovery
18
+ 8. [Troubleshooting](#8-troubleshooting) — When things break
19
+ 9. [Evolution](#9-evolution) — Making VoidForge smarter over time
20
+
21
+ ---
22
+
23
+ ## 1. Ignition
24
+
25
+ ### What VoidForge Is
26
+
27
+ VoidForge is a **methodology framework** for building full-stack applications with Claude Code. It's not a code template — it's a *process* template. Drop in a Product Requirements Document, and a named team of 260+ AI agents across 9 fictional universes builds your application through a 13-phase protocol.
28
+
29
+ **From nothing, everything.**
30
+
31
+ It works with any tech stack: Next.js, Express, Django, Rails, Go, or whatever your PRD specifies. VoidForge doesn't care about frameworks — it cares about *process*.
32
+
33
+ ### Choose Your Tier
34
+
35
+ VoidForge comes in three flavors, each on its own branch:
36
+
37
+ #### Full (`main` branch)
38
+ Everything. Two browser-based wizards, cloud provisioners for 6 deploy targets, encrypted credential vault, PRD generation with Claude, Avengers Tower (browser terminal + multi-project operations console), multi-user RBAC, and The Penthouse (team coordination).
39
+
40
+ ```bash
41
+ git clone https://github.com/tmcleod3/voidforge.git
42
+ cd voidforge
43
+ npm install
44
+ npm run wizard
45
+ ```
46
+
47
+ **Best for:** Users who want the guided experience. Gandalf walks you through setup, Haku handles deployment. After creation, Avengers Tower gives you a full terminal in the browser — type `/build`, `/campaign`, SSH to production, all from one tab. The Lobby shows all your projects. The Penthouse adds team access.
48
+
49
+ **The Blueprint Path:** Already have a PRD? Drop it at `docs/PRD.md` and the wizard auto-detects it — no interview needed. Or run `/blueprint` directly: Picard validates your spec, Wong discovers supporting documents, Kusanagi provisions infrastructure, and you're ready for `/campaign`. Same full pipeline, zero friction.
50
+
51
+ See `/docs/templates/PRD-TEMPLATE.md` for the frontmatter format and field reference.
52
+
53
+ #### Scaffold (`scaffold` branch)
54
+ The methodology without the tooling. CLAUDE.md, all 28 slash commands, all agent protocols, all code patterns, project scaffolding script. No wizard, no npm dependencies, no TypeScript compilation.
55
+
56
+ ```bash
57
+ mkdir my-app && cd my-app
58
+ git clone --branch scaffold https://github.com/tmcleod3/voidforge.git .
59
+ # Write your PRD in docs/PRD.md
60
+ # Open in Claude Code
61
+ /build
62
+ ```
63
+
64
+ **Best for:** Developers who know what they're doing and want to skip the wizard. You manage your own infrastructure. VoidForge manages your build process.
65
+
66
+ #### Core (`core` branch)
67
+ The lightest possible version. CLAUDE.md, all 28 slash commands, full agent protocols, full character registry, code patterns. Zero overhead — can be dropped into any existing project or referenced as external context.
68
+
69
+ ```bash
70
+ # Option A: Drop into an existing project
71
+ git clone --branch core https://github.com/tmcleod3/voidforge.git /tmp/vf
72
+ cp -r /tmp/vf/.claude /tmp/vf/CLAUDE.md /tmp/vf/docs your-project/
73
+
74
+ # Option B: Point Claude Code at it as context
75
+ # In your Claude Code session, reference the core branch
76
+ ```
77
+
78
+ **Best for:** Teams with existing projects who want the VoidForge methodology. Or anyone who wants Claude Code to absorb the agent structure, build protocol, and coding patterns without changing their setup.
79
+
80
+ ### What You Get (All Tiers)
81
+
82
+ Every tier includes:
83
+ - **CLAUDE.md** — Root context loaded at every session start
84
+ - **28 slash commands** — `/prd`, `/blueprint`, `/build`, `/qa`, `/test`, `/security`, `/ux`, `/review`, `/deploy`, `/devops`, `/architect`, `/assess`, `/git`, `/void`, `/vault`, `/thumper`, `/assemble`, `/gauntlet`, `/campaign`, `/imagine`, `/debrief`, `/dangerroom`, `/cultivation`, `/grow`, `/current`, `/treasury`, `/portfolio`, `/ai`
85
+ - **13-phase build protocol** — PRD to production with verification gates
86
+ - **18 specialist agent protocols** — Each lead has behavioral directives and a sub-agent roster
87
+ - **260+ named characters** — From Tolkien, Marvel, DC, Star Wars, Star Trek, Dune, Anime, Cosmere, and Foundation
88
+ - **35 code patterns** — Reference implementations with framework adaptations (including E2E testing)
89
+ - **No Stubs Doctrine** — Zero placeholder code. Every file does what it claims. Enforced across all method docs.
90
+ - **E2E browser testing** — Playwright + axe-core. Agents take screenshots, capture console errors, and interact with running applications.
91
+ - **Flag taxonomy** — Standardized flags across all commands: `--fast`, `--blitz`, `--muster`, `--plan`, `--dry-run`, `--resume`
92
+ - **Meta-Workflow** — How VoidForge uses itself to develop itself (`docs/META_WORKFLOW.md`)
93
+ - **This Holocron** — The guide you're reading now
94
+
95
+ The Full tier adds:
96
+ - **Gandalf** — Browser-based setup wizard (vault, credentials, PRD generation, scaffolding)
97
+ - **Haku** — Browser-based deploy wizard (6 target provisioners with SSE streaming)
98
+ - **Encrypted vault** — AES-256-GCM credential storage
99
+ - **Cloud provisioners** — Docker, AWS VPS, Vercel, Railway, Cloudflare, S3
100
+ - **Avengers Tower** — Browser terminal (xterm.js + node-pty). Real Claude Code in the browser. Multiple tabs: Claude Code, SSH, shell. Never leave the browser.
101
+ - **The Lobby** — Multi-project dashboard. Health monitoring, cost tracking, deploy history. Import existing projects.
102
+ - **Remote mode** — Deploy VoidForge on a VPS. Access from any browser, phone, iPad. 5-layer security: network + auth (TOTP 2FA) + vault + sandboxing + audit trail.
103
+ - **The Penthouse (v7.0)** — Multi-user RBAC (admin/deployer/viewer), per-project access control, linked services for monorepo orchestration, coordinated deploys, rollback dashboard, cost tracker, cross-project agent memory.
104
+ - **Cultivation Growth Engine** — Treasury, revenue tracking, ad platform management, heartbeat daemon, Danger Room growth tabs. Sandbox + Stripe adapters for demo and real revenue.
105
+ - **Stablecoin Funding Rail (v19.0)** — USDC → Circle off-ramp → Mercury bank → Google/Meta billing. Treasury planner, funding policy engine, reconciliation, circuit breakers. Complete crypto-to-ad-spend pipeline.
106
+ - **Browser Intelligence** — Agents use Playwright to see running applications: console error capture, behavioral walkthroughs, security inspection (cookies, CORS, CSP). Screenshots mandatory in all reviews.
107
+ - **Kongo Engine Integration (v20.1)** — First-party landing page system. Every ad campaign gets a dedicated Kongo page with 6 A/B variants. Growth signal polling, webhook-driven updates, autonomous seed-to-conversion loop. Connect via `/cultivation install`. 8 modules in `wizard/lib/kongo/`.
108
+
109
+ ---
110
+
111
+ ## 2. The Forge
112
+
113
+ ### Your First Project, End-to-End
114
+
115
+ Here's the complete flow from idea to live application. This walkthrough uses the Full tier — Scaffold and Core users skip the wizard steps.
116
+
117
+ #### Step 1: Ignite
118
+
119
+ ```bash
120
+ git clone https://github.com/tmcleod3/voidforge.git my-project
121
+ cd my-project
122
+ npm install
123
+ npm run wizard
124
+ ```
125
+
126
+ **Windows users:** See [QUICKSTART-WINDOWS.md](docs/QUICKSTART-WINDOWS.md) for Windows-specific setup.
127
+
128
+ **Gandalf** opens in your browser. Walk through:
129
+ 1. **Vault** — Create a password-encrypted credential store (AES-256-GCM)
130
+ 2. **Credentials** — Add your Anthropic API key (required for PRD generation)
131
+ 3. **Cloud providers** — Optionally add AWS, Vercel, Railway, or Cloudflare credentials
132
+ 4. **Project** — Name your project, choose a directory, pick a domain
133
+ 5. **PRD** — Describe your idea and let Claude generate a full PRD with YAML frontmatter, OR paste one you've written
134
+ 6. **Deploy target** — Choose where you'll deploy (Docker, AWS VPS, Vercel, Railway, Cloudflare, S3)
135
+ 7. **Review & Create** — Gandalf scaffolds your project
136
+
137
+ Your project directory now contains the full VoidForge build system plus your PRD. In the Full tier, Gandalf transitions to **Avengers Tower** — a real terminal in your browser where you'll run `/build` and everything that follows.
138
+
139
+ **Credentials flow:** Gandalf stores all credentials (API keys, cloud tokens, project-specific env vars) in the encrypted vault at `~/.voidforge/vault.enc`. These are available to the deploy wizard (Haku) and provisioners. During `/build`, Claude Code reads project-specific env vars from `docs/PRD.md` frontmatter and the `.env` file. If your PRD references APIs (WhatsApp, Stripe, Resend, etc.) and you provided keys in Gandalf's Step 4b, they're in the vault — the build and deploy phases will inject them into `.env` when provisioning. For local development before deploy, add them to `.env` manually or run the deploy wizard with just the env-writing step.
140
+
141
+ **Vault key naming:** The vault uses two key formats. **Hyphenated keys** are for global/infrastructure credentials stored by the wizard: `anthropic-api-key`, `aws-access-key-id`, `aws-secret-access-key`, `vercel-token`, `railway-token`, `cloudflare-api-token`, `cloudflare-zone-id`. **`env:`-prefixed keys** are for project-specific environment variables: `env:WHATSAPP_ACCESS_TOKEN`, `env:STRIPE_SECRET_KEY`, `env:DATABASE_URL`. When resolving a vault key, check the `env:` prefix first (exact match), then fall back to the hyphenated format. The provisioners map hyphenated keys to their `.env` equivalents during deployment (e.g., `anthropic-api-key` → `ANTHROPIC_API_KEY`).
142
+
143
+ #### Step 2: Build
144
+
145
+ ```bash
146
+ cd your-project
147
+ # Open in Claude Code
148
+ /build
149
+ ```
150
+
151
+ Claude reads your PRD, validates the frontmatter, and executes the 13-phase build protocol. This is the big step — Claude writes your actual application code:
152
+
153
+ - API routes, services, database migrations
154
+ - Frontend components, layouts, pages
155
+ - Authentication flows
156
+ - Integration code
157
+ - Tests at every phase
158
+
159
+ This is interactive. Claude works through each phase, verifies gates, and logs everything. A medium-complexity app takes 2-6 hours across multiple Claude Code sessions. The build journal handles session recovery.
160
+
161
+ #### Step 3: Deploy
162
+
163
+ ```bash
164
+ # Option A: Browser wizard
165
+ npx voidforge deploy
166
+
167
+ # Option B: Headless (from terminal / Claude Code — no browser needed)
168
+ npx voidforge deploy --headless
169
+ ```
170
+
171
+ **Haku** scans your project, loads your PRD, and provisions infrastructure for your chosen target. The browser wizard shows a visual UI with SSE progress streaming; the `--headless` flag runs the same provisioner code from the terminal (used by `/build` Phase 12 so you never leave Claude Code). For AWS VPS, that means:
172
+ - EC2 instance created and running
173
+ - Security groups configured
174
+ - SSH key generated
175
+ - Optional RDS (Postgres/MySQL) and ElastiCache (Redis)
176
+ - Deploy scripts generated in `infra/`
177
+
178
+ Then deploy:
179
+
180
+ ```bash
181
+ # AWS VPS
182
+ ssh ec2-user@$SSH_HOST "bash -s" < infra/provision.sh # One-time server setup
183
+ ./infra/deploy.sh # Push your app live
184
+
185
+ # Vercel
186
+ npx vercel deploy --prod
187
+
188
+ # Railway
189
+ railway link && railway up
190
+
191
+ # Cloudflare
192
+ npx wrangler pages deploy ./dist
193
+
194
+ # Docker
195
+ docker-compose up -d
196
+ ```
197
+
198
+ #### Step 4: Verify
199
+
200
+ Your app is live. The deploy script ran a health check. SSL is auto-provisioned by Caddy (VPS) or the platform (Vercel/Railway/Cloudflare). Check your monitoring, run through the critical user journey, and you're launched.
201
+
202
+ ### Scaffold/Core Users
203
+
204
+ Skip Steps 1 and 3. Write your PRD manually in `docs/PRD.md`, run `/build`, and handle your own infrastructure. The methodology is the same — only the automation layer differs.
205
+
206
+ ---
207
+
208
+ ## 3. The Protocol
209
+
210
+ ### The 13 Phases
211
+
212
+ The build protocol is a sequence of phases, each led by a specialist agent. Phases have verification gates — you can't advance until the gate passes. Some phases can be skipped based on your PRD frontmatter.
213
+
214
+ | Phase | Lead | What Happens |
215
+ |-------|------|-------------|
216
+ | **0. Orient** | Picard | Reads PRD, validates frontmatter, produces ADRs, flags gaps |
217
+ | **1. Scaffold** | Stark + Kusanagi | Framework init, directory structure, test runner setup |
218
+ | **2. Infrastructure** | Kusanagi | Database, Redis, environment config, verify boot |
219
+ | **3. Auth** | Stark + Galadriel | Login, signup, OAuth, sessions, roles. Kenobi reviews. |
220
+ | **4. Core Feature** | Stark + Galadriel | Most important user flow, complete vertical slice |
221
+ | **5. Supporting** | Stark + Galadriel | Remaining features in dependency order, small batches |
222
+ | **6. Integrations** | Stark | Payments, email, storage, external APIs |
223
+ | **7. Admin** | Stark + Galadriel | Dashboard, user management, audit logging |
224
+ | **8. Marketing** | Galadriel | Landing pages, pricing, legal, SEO |
225
+ | **9. QA Pass** | Batman | Full test suite, bug hunting, regression checklist |
226
+ | **10. UX/UI Pass** | Galadriel | Accessibility audit, responsive design, state coverage |
227
+ | **11. Security Pass** | Kenobi | OWASP audit, secrets scan, dependency check |
228
+ | **12. Deploy** | Kusanagi | Production provisioning, monitoring, backups |
229
+ | **13. Launch** | All | Final checklist — SSL, email, payments, analytics, monitoring |
230
+
231
+ ### PRD Frontmatter
232
+
233
+ Your PRD starts with a YAML block that controls which phases run:
234
+
235
+ ```yaml
236
+ ---
237
+ type: full-stack # full-stack | api-only | static-site | prototype
238
+ auth: yes # yes | no
239
+ payments: stripe # stripe | lemonsqueezy | none
240
+ workers: no # yes | no
241
+ admin: yes # yes | no
242
+ marketing: no # yes | no
243
+ email: resend # resend | sendgrid | ses | none
244
+ deploy: vps # vps | vercel | railway | cloudflare | static | docker
245
+ ---
246
+ ```
247
+
248
+ Set `auth: no`? Phase 3 is skipped. Set `marketing: no`? Phase 8 is skipped. Set `type: api-only`? Phases 8 and 10 are skipped. The protocol adapts to your project.
249
+
250
+ ### Verification Gates
251
+
252
+ Every phase has a gate — a combination of manual verification and automated checks:
253
+
254
+ - **Phase 0:** All PRD sections accounted for, frontmatter validates
255
+ - **Phase 1:** `npm run build` passes, test runner works
256
+ - **Phase 2:** Dev server starts, database connects, `npm test` passes
257
+ - **Phase 3:** Login/signup/logout works, auth tests pass
258
+ - **Phase 4:** Core journey works end-to-end, >80% service coverage
259
+ - **Phase 5:** Each batch works, no regressions, all tests pass
260
+ - **Phase 9:** All critical/high bugs fixed, full test suite green
261
+ - **Phase 11:** No critical/high security findings
262
+ - **Phase 12:** App loads in production, health check passes, monitoring receives data
263
+ - **Phase 13:** All checklist items verified
264
+
265
+ **Gates are breaking.** Failing tests prevent phase advancement. No exceptions.
266
+
267
+ ### Small Batches
268
+
269
+ During feature phases (4-8), work happens in small batches:
270
+ - One user flow or component cluster per batch
271
+ - Max ~200 lines of production code (tests don't count)
272
+ - Each batch is independently verifiable
273
+ - If a batch breaks something, revert it, isolate the issue, fix, and re-apply
274
+
275
+ ### Session Recovery
276
+
277
+ Long builds span multiple Claude Code sessions. The build journal system handles this:
278
+ 1. Every phase logs to `/logs/phase-XX-*.md`
279
+ 2. Master state lives in `/logs/build-state.md` (read at every session start)
280
+ 3. Decisions go to `/logs/decisions.md`, handoffs to `/logs/handoffs.md`
281
+ 4. New sessions pick up from the journal, not from scratch
282
+
283
+ ---
284
+
285
+ ## 4. The Council
286
+
287
+ ### How the Agent System Works
288
+
289
+ VoidForge uses 18 lead agents across 9 fictional universes, each commanding a roster of themed sub-agents. This isn't decoration — it serves three purposes:
290
+
291
+ 1. **Scope boundaries.** When Stark is leading, you're doing backend work. When Galadriel takes over, you're doing frontend. The character tells you which domain you're in.
292
+ 2. **Scannable logs.** Build journal entries tagged with agent names are instantly searchable. "What did Batman find?" is faster than "What happened during QA?"
293
+ 3. **Memorable teams.** You remember that Romanoff trusts no external API and Samwise never leaves anyone behind. Character traits encode behavioral directives.
294
+
295
+ ### The Leads
296
+
297
+ | Agent | Name | Universe | Domain | Personality |
298
+ |-------|------|----------|--------|-------------|
299
+ | Frontend & UX | **Galadriel** | Lord of the Rings | UI, UX, accessibility, design systems | Timeless elegance, sees all, refuses to compromise on craft |
300
+ | Backend | **Stark** | Marvel | APIs, databases, services, queues, integrations | Builds fast, iterates faster, genius-level engineering |
301
+ | QA | **Batman** | DC Comics | Bug hunting, testing, hardening | Cross-cutting investigator. Breaks everything. Trusts nothing. |
302
+ | Security | **Kenobi** | Star Wars | Auth, injection, secrets, data, OWASP | Calm authority, centuries of wisdom, always has the high ground |
303
+ | Architecture | **Picard** | Star Trek | Schema, scaling, ADRs, tech debt, failure modes | Measured decisions, diplomatic, "make it so" |
304
+ | DevOps | **Kusanagi** | Anime | Deploy, monitor, backup, infrastructure | Ghost in the Shell precision, cybernetic efficiency |
305
+ | Release | **Coulson** | Marvel | Versioning, changelogs, commits, releases | S.H.I.E.L.D.'s meticulous record-keeper, everything by the book |
306
+ | Forge Sync | **Bombadil** | Lord of the Rings | VoidForge self-update from upstream | Ancient, joyful, sings while he works, tends the forge itself |
307
+ | Worm Rider | **Chani** | Dune | Telegram bridge, Gom Jabbar, sandworm relay | Desert-born, fierce, speaks across any distance |
308
+ | The Initiative | **Fury** | Marvel | Full pipeline orchestration, crossfire, council | Assembles the team. Doesn't leave until the mission is complete. |
309
+ | The Gauntlet | **Thanos** | Marvel | Comprehensive 5-round review, 30+ agents | "I am inevitable." Tests everything. The project survives or it doesn't. |
310
+ | Campaign Command | **Sisko** | Star Trek | PRD-to-product campaign, mission sequencing | The builder, the prophet, the war commander. Reads the plan, picks the next fight. |
311
+ | Forge Artist | **Celebrimbor** | Lord of the Rings | AI image generation from PRD descriptions | Hand of Silver. Greatest elven smith. Forges visual assets from prose. |
312
+ | Field Medic | **Bashir** | Star Trek | Post-mortem analysis, upstream feedback | Genetically enhanced diagnostician. Traces root causes, sends field reports to Starfleet. |
313
+ | Growth Strategist | **Kelsier** | Cosmere | Growth strategy, campaign orchestration, ad platforms, SEO | The Survivor. Burns metals to fuel growth. Always has another plan. |
314
+ | Deep Current | **Tuvok** | Star Trek | Autonomous campaign intelligence — scan, analyze, propose | Vulcan logic applied to market signals. Processes data without emotional bias. |
315
+ | Treasury | **Dockson** | Cosmere | Revenue ingest, budget allocation, spend execution | The crew's bookkeeper. Every boxing tracks, every ledger balances. |
316
+ | AI Intelligence | **Hari Seldon** | Foundation | AI Intelligence Architect — models, prompts, tools, orchestration, safety, evals | The psychohistorian. Predicts outcomes, designs systems that endure across generations. |
317
+
318
+ ### Sub-Agent Highlights
319
+
320
+ Each lead has a deep bench. Here are some standouts:
321
+
322
+ **Tolkien (Frontend)**
323
+ - **Gandalf** arrives precisely when things break
324
+ - **Samwise** never leaves anyone behind (accessibility champion)
325
+ - **Bilbo** writes the microcopy
326
+ - **Legolas** brings precision and elegance to components
327
+ - **Haldir** guards the boundaries between systems
328
+
329
+ **Marvel (Backend)**
330
+ - **Banner** stays calm until queries get slow
331
+ - **Romanoff** trusts no external API
332
+ - **Hill** tracks everything — mission control, nothing slips past her
333
+ - **Thor** brings the thunder on queue processing
334
+ - **Barton** never misses an error case
335
+
336
+ **DC Comics (QA)**
337
+ - **Oracle** sees the whole system at once
338
+ - **Red Hood** breaks everything on purpose
339
+ - **Alfred** inspects every dependency personally
340
+ - **Nightwing** covers every angle with agile testing
341
+ - **Constantine** finds cursed code nobody else can
342
+
343
+ **Star Wars (Security)**
344
+ - **Yoda** guards authentication with centuries of wisdom
345
+ - **Windu** deflects every injection attack
346
+ - **Leia** keeps the secrets safe
347
+ - **Ahsoka** enforces access control boundaries
348
+ - **Rex** performs tactical systematic lockdown
349
+
350
+ **Star Trek (Architecture + Campaign)**
351
+ - **Spock** brings logical precision to data architecture
352
+ - **Scotty** knows the infrastructure limits ("I'm givin' her all she's got!")
353
+ - **La Forge** keeps the engines running
354
+ - **Kira** detects unfinished work — finishes the fight before starting new ones
355
+ - **Dax** reads the PRD, figures out what's next across lifetimes of experience
356
+ - **Odo** verifies prerequisites — shapeshifts to match whatever's needed
357
+
358
+ **Anime (DevOps)**
359
+ - **Levi** deploys with zero wasted motion
360
+ - **Senku** builds infrastructure from scratch ("ten billion percent!")
361
+ - **Vegeta** optimizes relentlessly ("it's over 9000!" for monitoring)
362
+ - **L** observes everything (logging and observability)
363
+ - **Spike** stays cool under pressure (incident response)
364
+
365
+ **Dune (Worm Rider)**
366
+ - **Stilgar** protects the channel — no outsider enters the sietch
367
+ - **Mohiam** administers the Gom Jabbar — "put your hand in the box"
368
+ - **Idaho** keeps the connection alive — the eternal ghola who always returns
369
+ - **Thufir** parses every signal — Mentat precision, a million calculations per second
370
+
371
+ The full roster of 260+ characters lives in `docs/NAMING_REGISTRY.md`.
372
+
373
+ ### How Handoffs Work
374
+
375
+ Agents hand off to each other when they find issues outside their domain:
376
+
377
+ - Galadriel finds bad API data → hands off to **Stark**
378
+ - Stark finds a vulnerability → hands off to **Kenobi**
379
+ - Batman finds an architecture problem → hands off to **Picard**
380
+ - Kenobi's fix needs infra changes → hands off to **Kusanagi**
381
+ - Any agent finds a release-worthy change → notifies **Coulson**
382
+
383
+ Every handoff is logged to `/logs/handoffs.md` with context so the receiving agent doesn't start from scratch.
384
+
385
+ ### Conflict Resolution
386
+
387
+ When agents disagree (security vs. simplicity, architecture vs. implementation constraints):
388
+
389
+ 1. **Check the PRD** — product requirements take precedence
390
+ 2. **If PRD is silent** — present trade-offs to the user with a recommendation
391
+ 3. **Document as ADR** — the resolution goes into `/docs/adrs/`
392
+ 4. **Security wins ties** — when security and simplicity conflict, find the simplest secure solution
393
+
394
+ ---
395
+
396
+ ## 5. The Arsenal
397
+
398
+ ### Slash Commands
399
+
400
+ Twenty-eight commands, each self-contained with inline execution steps. You don't need to read method docs first — the commands load what they need.
401
+
402
+ #### `/prd` — Sisko's PRD Generator
403
+ **When:** Starting a new project and you need a PRD. Or when the existing PRD needs a rewrite.
404
+
405
+ Sisko conducts a 5-act structured interview: what are you building, what stack, what features, what does it look like, how does it ship. Each act drafts that PRD section, shows it for confirmation, then moves on. Output: complete `docs/PRD.md` with valid YAML frontmatter. This is the lowest-friction path from "I have an idea" to "I have a buildable PRD."
406
+
407
+ #### `/blueprint` — The Blueprint Path
408
+ **When:** You already have a complete PRD from Claude chat, a consultant, or a previous iteration.
409
+
410
+ Picard validates your frontmatter, Troi checks structural compliance, Wong discovers supporting documents (OPERATIONS.md, ADRs, references), merges project directives into CLAUDE.md, and Kusanagi provisions infrastructure. Boromir challenges the PRD if you pass `--challenge`. A 30-second argument now saves a 3-hour refactor later. Output: validated project ready for `/campaign`.
411
+
412
+ #### `/build` — The Full Protocol
413
+ **When:** Starting a new project or resuming a build.
414
+
415
+ Executes the 13-phase build protocol from PRD to production. Reads `build-state.md` to determine where you left off, loads the relevant method docs for the current phase, and drives through the sequence.
416
+
417
+ This is the main command. Everything else is a targeted operation.
418
+
419
+ #### `/qa` — Batman's QA Pass
420
+ **When:** After building features, before deploy. Or anytime something feels off.
421
+
422
+ Double-pass review: Pass 1 runs parallel analysis — Oracle scans the system, Red Hood breaks things, Alfred audits dependencies, Deathstroke probes adversarially, Constantine hunts cursed code. Lucius checks config. Fixes are applied in batch. Pass 2 re-verifies — Nightwing re-runs tests, Red Hood re-probes fixed areas, Deathstroke re-tests boundaries. Catches fix-induced regressions.
423
+
424
+ #### `/test` — Batman's Test-Writing Mode
425
+ **When:** You need to write or improve tests. Different from `/qa` (which finds bugs).
426
+
427
+ Analyzes coverage gaps (Oracle + Alfred in parallel), reviews test architecture (Nightwing), writes missing unit/integration/component tests in priority order, then Red Hood writes adversarial tests for boundary values and edge cases.
428
+
429
+ #### `/security` — Kenobi's Audit
430
+ **When:** Before any deploy. After adding auth, payments, or external integrations.
431
+
432
+ Phase 1 runs parallel scans (Leia: secrets, Chewie: dependencies, Rex: infrastructure, Maul: red-team). Phase 2 runs sequential deep audits (auth, input, access control, data). Critical/high findings are fixed. Phase 3: Maul re-probes all remediations to verify fixes hold.
433
+
434
+ #### `/ux` — Galadriel's Review
435
+ **When:** After UI work. Before launch.
436
+
437
+ Adversarial UX/UI review with double-pass: Pass 1 walks every user flow with 7 agents in parallel (UX, visual, a11y, copy, code, perf, edge cases). Fixes are applied. Pass 2: Samwise re-audits a11y on modified components, Gandalf re-checks edge cases. Ensures fixes don't break other properties.
438
+
439
+ #### `/review` — Picard's Code Review
440
+ **When:** After writing code, before committing. For pattern compliance and quality.
441
+
442
+ Picard-affiliated (Star Trek). Parallel analysis: Spock checks pattern compliance against `/docs/patterns/`, Seven reviews code quality (complexity, dead code, duplication), Data reviews maintainability (abstractions, coupling, boundaries). Re-verification pass after fixes. Findings categorized as Must Fix, Should Fix, Consider, or Nit.
443
+
444
+ #### `/devops` — Kusanagi's Infrastructure
445
+ **When:** Setting up deploy target. Adapts based on PRD `deploy` value.
446
+
447
+ Generates infrastructure configuration for your target (VPS, Vercel, Railway, Cloudflare, Docker, static). Includes first-deploy pre-flight checklist: env vars, secrets, database seeding, DNS, SSL, health check, rollback test, monitoring, security review.
448
+
449
+ #### `/architect` — Picard's Review
450
+ **When:** Before building, after major changes, when scaling concerns arise.
451
+
452
+ Full architecture review with parallel analysis: Spock (schema) + Uhura (integrations) run in parallel, then Scotty handles service architecture and scaling, then La Forge (failure modes) + Data (tech debt) run in parallel. ADR production. Includes conflict resolution protocol.
453
+
454
+ #### `/git` — Coulson's Release
455
+ **When:** After completing a set of changes you want to version.
456
+
457
+ 6-step release flow: analyze diffs (Vision), determine semver bump (Friday), write changelog (Wong), craft commit (Rogers), verify consistency (Barton), optional push (Coulson). Updates VERSION.md, CHANGELOG.md, and package.json atomically.
458
+
459
+ #### `/void` — Bombadil's Forge Sync
460
+ **When:** You want to update your VoidForge methodology to the latest version.
461
+
462
+ Old Tom Bombadil tends the forge itself. He reaches upstream to the VoidForge scaffold branch, compares every shared methodology file against your local copies, shows you exactly what changed, and sings the updates into place — all while preserving your project-specific customizations (PRD, logs, code, CLAUDE.md project section). Works regardless of which tier you installed (main, scaffold, or core). If you're already on the latest, Tom tells you so and goes back to singing.
463
+
464
+ #### `/thumper` — Chani's Worm Rider
465
+ **When:** You want to control Claude Code from your phone via Telegram.
466
+
467
+ *"Tell me of your homeworld, Usul."*
468
+
469
+ Plant a thumper in the sand and ride the worm. Chani opens a bidirectional Telegram bridge to your running Claude Code session. Send prompts from anywhere — a coffee shop, your phone, another machine. Claude's responses are sent back automatically via the Water Rings (stop hook).
470
+
471
+ The Gom Jabbar protocol gates everything. On first activation, you choose a passphrase ("word of passage"). It's hashed with PBKDF2 and erased from your Telegram chat. After 60 minutes of idle, the Reverend Mother demands the test again — prove you're human. Three wrong attempts and The Voice is silenced for 5 minutes.
472
+
473
+ The sandworm daemon auto-detects your environment: tmux (preferred, cross-platform), PTY injection (headless Linux), or osascript (macOS Terminal.app/iTerm2). For VS Code, Warp, Alacritty, or Kitty users on macOS, tmux is recommended.
474
+
475
+ Setup: `/thumper setup` (one-time). Control: `/thumper on` / `/thumper off` / `/thumper status`.
476
+
477
+ #### `/assemble` — Fury's Initiative
478
+ **When:** You want the full production pipeline in one command.
479
+
480
+ *"There was an idea..."*
481
+
482
+ Fury assembles every agent in VoidForge and runs the complete pipeline: architecture review, full build, three rounds of code review, UX pass, two rounds of security audit, infrastructure review, QA, and test suite — then the Crossfire (adversarial agents from four universes attack each other's work) and the Council (domain specialists verify nobody broke anyone else's fixes).
483
+
484
+ 13 phases, all 9 universes, 40+ agents. Checkpoints after every phase so you can resume across sessions with `/assemble --resume`. Skip the build with `--skip-build` to re-run reviews on existing code. Skip the Crossfire and Council with `--fast` for lower-stakes projects.
485
+
486
+ This is the nuclear option. Use it when quality is non-negotiable.
487
+
488
+ #### `/gauntlet` — Thanos's Comprehensive Review
489
+ **When:** After a campaign completes, before shipping, or anytime you want absolute confidence.
490
+
491
+ *"I am inevitable."*
492
+
493
+ Five rounds of escalating intensity across every domain. Round 1: Discovery (architecture + code + UX + security + infrastructure in parallel). Round 2: First Strike (full domain audits — Batman, Galadriel, Kenobi, Stark). Round 3: Second Strike (re-probe all fixes, verify nothing regressed). Round 4: Crossfire (five adversarial agents attack each other's work — Maul, Deathstroke, Loki, Constantine, Éowyn). Round 5: Council (six domain experts converge — Spock, Ahsoka, Nightwing, Samwise, Padmé, Troi).
494
+
495
+ Fix batches between rounds. Grep-for-siblings after every fix. Build-output verification. The project either survives or iterates.
496
+
497
+ Flags: `--quick` (3 rounds — skip Crossfire + Council), `--security-only`, `--ux-only`, `--qa-only`, `--resume`.
498
+
499
+ #### `/campaign` — Sisko's Danger Room
500
+ **When:** You have a PRD and want VoidForge to build the whole thing, mission by mission, autonomously.
501
+
502
+ *"It's easy to be a saint in paradise."*
503
+
504
+ Sisko sits above Fury. Fury runs one battle — Sisko runs the war. He reads your PRD, diffs it against what's already built, identifies what's next, scopes it into a buildable mission, briefs you, and hands it to Fury. After each mission completes and gets committed, Sisko checks the map again and picks the next objective.
505
+
506
+ Three sub-agents: Kira (detects unfinished work — if there's an in-progress build or assembly, she finishes the fight before starting anything new), Dax (reads the PRD and figures out what to build next, respecting dependency order), and Odo (verifies prerequisites are met before each mission).
507
+
508
+ The Prophecy Board (`/logs/campaign-state.md`) tracks which PRD sections are done, in progress, or not started — persistent across sessions. Run `/campaign` again and Sisko picks up where you left off.
509
+
510
+ Flags: `--plan [idea]` (update PRD/ROADMAP without building), `--fast` (skip Crossfire+Council), `--resume` (explicit resume), `--mission "Name"` (jump to a specific section).
511
+
512
+ #### `/imagine` — Celebrimbor's Forge
513
+ **When:** Your PRD describes visual assets (illustrations, portraits, OG images, hero art) that code can't produce.
514
+
515
+ Celebrimbor scans the PRD for image requirements, derives a consistent style from the brand section, presents a plan with cost estimate, then generates images via OpenAI's API. Every image gets an entry in the asset manifest (`public/images/manifest.json`) for regeneration and auditing.
516
+
517
+ Three sub-agents: Nori (scans PRD for assets), Ori (crafts generation prompts), Dori (verifies images are wired into components).
518
+
519
+ Flags: `--scan` (report only), `--asset "name"` (one image), `--regen "name"` (overwrite), `--style "override"` (change aesthetic), `--provider model`.
520
+
521
+ #### `/debrief` — Bashir's Field Report
522
+ **When:** Something went wrong and you want to understand why — or you want to help improve VoidForge.
523
+
524
+ Bashir analyzes the session's build logs, git history, and campaign state to produce a structured post-mortem. He identifies methodology gaps, proposes fixes in VoidForge's own language, and can submit the report as a GitHub issue on the upstream repo. Users become contributors just by running `/debrief --submit` after a rough session.
525
+
526
+ Four sub-agents: Ezri (reconstructs what happened), O'Brien (traces root causes), Nog (proposes solutions), Jake (writes the report).
527
+
528
+ The feedback loop: `/void` (Bombadil) pulls updates DOWN from upstream. `/debrief` (Bashir) pushes learnings BACK UP. The forge becomes a conversation, not a broadcast.
529
+
530
+ Flags: `--submit` (create GitHub issue after review), `--campaign` (full campaign analysis), `--session` (just this session), `--dry-run` (generate without submitting).
531
+
532
+ #### `/deploy` — Kusanagi's Deploy Agent
533
+ **When:** You want to push code to production with health checks and rollback.
534
+
535
+ Kusanagi detects your deploy target from PRD frontmatter or project structure, runs pre-flight checks, deploys, verifies health, and rolls back automatically if the health check fails. Integrates with `/campaign` for auto-deploy at mission victory.
536
+
537
+ Flags: `--target <name>` (override detection), `--dry-run` (pre-flight only), `--rollback` (revert last deploy).
538
+
539
+ #### `/assess` — Picard's Pre-Build Assessment
540
+ **When:** Evaluating an existing codebase before building on it. Or when joining a project mid-stream.
541
+
542
+ Picard runs an architecture review, pattern compliance check, and assessment gauntlet against the existing code. Produces a gap analysis comparing what exists against the PRD. Identifies tech debt, missing patterns, security gaps, and build readiness. Output: a structured assessment report with prioritized action items.
543
+
544
+ Flags: `--quick` (architecture only), `--full` (all domains), `--prd` (gap analysis against PRD).
545
+
546
+ #### `/dangerroom` — The Danger Room
547
+ **When:** You want a live operations dashboard for build, deploy, and agent monitoring.
548
+
549
+ An installable operations console (X-Men's Danger Room) that provides real-time visibility into build phases, deploy status, agent activity, and system health. Browser-based dashboard with SSE streaming.
550
+
551
+ #### `/cultivation` — Cultivation Engine
552
+ **When:** You want autonomous growth infrastructure — marketing, ads, creative, A/B testing, spend optimization.
553
+
554
+ An installable autonomous growth engine inspired by Cosmere's Cultivation Shard. Manages marketing campaigns, ad platform integrations, creative generation, A/B testing, and spend optimization. Works with `/grow` for execution.
555
+
556
+ #### `/grow` — Kelsier's Growth Protocol
557
+ **When:** Running growth campaigns — initial setup within Cultivation, then autonomous loop.
558
+
559
+ Kelsier's 6-phase growth protocol: audience analysis, channel selection, creative generation, campaign launch, performance monitoring, and optimization. Runs within the Cultivation engine. Each phase burns a different Allomantic metal.
560
+
561
+ **Phase 3.5 — Kongo Landing Pages:** When Kongo is connected, `/grow` generates dedicated landing pages for every ad campaign. Each page gets 6 A/B-testable variants (3 headline x 2 CTA). The heartbeat daemon polls Kongo's analytics hourly and pushes winning copy back as seed for the next page generation cycle. Connect Kongo during `/cultivation install` Step 2b.
562
+
563
+ Flags: `--phase <n>` (jump to phase), `--channel <name>` (specific channel), `--budget <amount>` (set spend cap), `--auto-pages` (enable Phase C fully autonomous page generation).
564
+
565
+ #### `/current` — Tuvok's Deep Current
566
+ **When:** You want autonomous campaign intelligence — scanning, analysis, proposals, cold start intake.
567
+
568
+ Tuvok runs continuous market intelligence: scans competitor sites, analyzes campaign performance, proposes optimizations, and handles cold start intake for new markets. Vulcan logic applied to growth data.
569
+
570
+ Flags: `--scan` (run scan cycle), `--analyze` (deep analysis), `--propose` (generate proposals), `--intake` (cold start for new market).
571
+
572
+ #### `/treasury` — Dockson's Financial Operations
573
+ **When:** Managing revenue, budgets, spend execution, and reconciliation.
574
+
575
+ Dockson tracks every boxing. Revenue ingest from payment providers (Stripe, Paddle), budget allocation across campaigns, spend execution with approval gates, and reconciliation to ensure the books balance. Integrates with `/cultivation` for spend tracking.
576
+
577
+ Flags: `--ingest` (pull revenue data), `--allocate` (set budgets), `--reconcile` (balance check), `--report` (financial summary).
578
+
579
+ #### `/portfolio` — Steris's Cross-Project Financials
580
+ **When:** Managing finances across multiple VoidForge projects.
581
+
582
+ Steris aggregates spend and revenue across all projects in your VoidForge portfolio. Portfolio-level optimization, cross-project budget reallocation, and consolidated reporting.
583
+
584
+ Flags: `--summary` (overview), `--optimize` (reallocation suggestions), `--export` (CSV/JSON).
585
+
586
+ #### `/ai` — Seldon's AI Intelligence Audit
587
+ **When:** Your project uses LLM/AI features — model selection, prompt engineering, tool use, orchestration, or safety.
588
+
589
+ Hari Seldon audits your AI integration: model selection rationale, prompt quality and versioning, tool-use patterns, orchestration architecture, safety guardrails, and evaluation coverage. Produces a structured report with findings and recommendations. Foundation universe agents provide psychohistorical precision — predicting failure modes before they manifest.
590
+
591
+ Flags: `--prompts` (prompt audit only), `--safety` (safety review only), `--evals` (evaluation coverage), `--full` (all domains).
592
+
593
+ #### `/vault` — Seldon's Time Vault
594
+ **When:** End of session, before context checkpoint, or anytime you want to preserve session intelligence for the next session.
595
+
596
+ *"I am Hari Seldon. The time I have is short, so I will not waste yours."*
597
+
598
+ Seldon distills session intelligence into a portable briefing. The Time Vault preserves what's expensive to re-derive — decisions, failed approaches, cross-module relationships, agent findings, execution plans — and excludes what's cheap to re-read (file contents, PRD text, method docs). Gaal Dornick gathers state from build logs, campaign state, git history, and deploy status. Seldon compresses. Jake Sisko writes the vault file to `/logs/vault-YYYY-MM-DD.md` and prints a pickup prompt the next session can paste verbatim to recover context in under 60 seconds.
599
+
600
+ Flags: `--seal` (auto-confirm), `--open` (read most recent vault), `--list` (list all vaults), `--for <target>` (tailor for `campaign`, `colleague`, or `trigger`).
601
+
602
+ ### Flag System
603
+
604
+ VoidForge flags are standardized across all 26 commands. Same flag = same meaning everywhere.
605
+
606
+ **Tier 1 — Universal:** `--resume` (resume from state), `--plan` (plan without executing), `--fast` (reduced review passes), `--dry-run` (preview without doing), `--status` (show state), `--blitz` (autonomous, no pauses)
607
+
608
+ **Tier 2 — Scope:** `--security-only`, `--ux-only`, `--qa-only` (focus on one domain)
609
+
610
+ **Tier 3 — Intensity:**
611
+ - `--fast` — fewer agents, still comprehensive
612
+ - *(default)* — standard deployment
613
+ - `--muster` — every viable agent across all 9 universes, 3 waves (Vanguard → Main Force → Adversarial). The beacons are lit.
614
+ - `--infinity` — 10 rounds, ~80 agent launches (Gauntlet only)
615
+
616
+ ---
617
+
618
+ ## 6. The Craft
619
+
620
+ ### Code Patterns
621
+
622
+ Thirty-five reference implementations live in `docs/patterns/`. Every pattern includes framework adaptations for Next.js, Express, Django, FastAPI, and Rails. Mobile and game patterns added in v9.2-v9.3. Financial, daemon, SSE, ad platform, and OAuth patterns added in v11-v15.
623
+
624
+ | Pattern | File | What It Teaches |
625
+ |---------|------|----------------|
626
+ | **API Route** | `api-route.ts` | Zod validation, auth check, service call, consistent response (+ DRF, FastAPI) |
627
+ | **Service** | `service.ts` | Business logic in services, ownership checks, typed errors (+ Django, FastAPI) |
628
+ | **Component** | `component.tsx` | All 4 states (loading, empty, error, success), keyboard accessible (+ HTMX) |
629
+ | **Middleware** | `middleware.ts` | Auth middleware, request logging, rate limiting (+ Django, FastAPI) |
630
+ | **Error Handling** | `error-handling.ts` | Canonical error strategy (+ DRF exception handler, FastAPI) |
631
+ | **Job Queue** | `job-queue.ts` | Background jobs: idempotency, retry, dead letter queue (+ Celery, ARQ) |
632
+ | **Multi-Tenant** | `multi-tenant.ts` | Workspace scoping, tenant isolation, RBAC (+ django-tenants) |
633
+ | **Third-Party Script** | `third-party-script.ts` | External script loading with 3 states |
634
+ | **Mobile Screen** | `mobile-screen.tsx` | React Native screen with safe area, a11y, 4 states |
635
+ | **Mobile Service** | `mobile-service.ts` | Offline-first data with sync queue, conflict resolution |
636
+ | **Game Loop** | `game-loop.ts` | Fixed timestep with interpolation, pause/resume, frame budget |
637
+ | **Game State** | `game-state.ts` | Hierarchical state machine with history, save/load |
638
+ | **Game Entity** | `game-entity.ts` | Entity Component System with component stores and systems |
639
+ | **SSE Endpoint** | `sse-endpoint.ts` | Server-Sent Events: lifecycle, keepalive, timeout, React hook (+ FastAPI, Django) |
640
+ | **Ad Platform Adapter** | `ad-platform-adapter.ts` | Split interface: setup (interactive) + adapter (runtime) + read-only (daemon) |
641
+ | **Financial Transaction** | `financial-transaction.ts` | Branded Cents type, hash-chained append log, atomic writes, number formatting |
642
+ | **Daemon Process** | `daemon-process.ts` | PID management, Unix socket API, job scheduler, signal handling, sleep/wake recovery |
643
+ | **Revenue Source Adapter** | `revenue-source-adapter.ts` | Read-only revenue interface with Stripe + Paddle reference implementations |
644
+ | **OAuth Token Lifecycle** | `oauth-token-lifecycle.ts` | Refresh at 80% TTL, failure escalation, vault integration, session token rotation |
645
+ | **Outbound Rate Limiter** | `outbound-rate-limiter.ts` | Token bucket with backpressure, per-provider limits, retry-after handling |
646
+ | **AI Orchestrator** | `ai-orchestrator.ts` | Agent loop, tool use, retry, circuit breaker, fallback |
647
+ | **AI Classifier** | `ai-classifier.ts` | Classification with confidence thresholds, human fallback |
648
+ | **AI Router** | `ai-router.ts` | Intent-based routing with fallback chains |
649
+ | **Prompt Template** | `prompt-template.ts` | Versioned prompts with variable injection, testing |
650
+ | **AI Eval** | `ai-eval.ts` | Golden datasets, scoring, regression detection |
651
+ | **AI Tool Schema** | `ai-tool-schema.ts` | Type-safe tool definitions with provider adapters |
652
+ | **Database Migration** | `database-migration.ts` | Safe migrations: backward-compat, batched ops, rollback, zero-downtime validation |
653
+ | **Data Pipeline** | `data-pipeline.ts` | ETL pipeline: typed stages, checkpoint/resume, quality checks, idempotent processing |
654
+ | **Backtest Engine** | `backtest-engine.ts` | Walk-forward backtesting: no-lookahead, slippage, Sharpe/drawdown/profit factor |
655
+ | **Execution Safety** | `execution-safety.ts` | Trading execution: order validation, position limits, exchange precision, paper/live toggle |
656
+ | **E2E Test** | `e2e-test.ts` | Page Object Model, axe-core fixture, auth helper, network mock, CWV measurement |
657
+ | **Browser Review** | `browser-review.ts` | Console capture, behavioral walkthrough, security inspection, screenshot evidence |
658
+ | **Stablecoin Adapter** | `stablecoin-adapter.ts` | Off-ramp lifecycle, balance reads, transfer tracking, Circle reference |
659
+ | **Ad Billing Adapter** | `ad-billing-adapter.ts` | Billing capability classification, invoice reads, settlement instructions |
660
+ | **Funding Plan** | `funding-plan.ts` | Branded Cents, FundingPlan FSM, runway calculation, reconciliation matching |
661
+
662
+ ### Coding Standards
663
+
664
+ These are enforced across every phase:
665
+
666
+ - **TypeScript strict mode.** No `any` unless unavoidable and commented.
667
+ - **Small files.** One component per file. Max ~300 lines.
668
+ - **Validate at boundaries.** Zod schemas on all API inputs.
669
+ - **Error handling.** Use `ApiError` types per the error-handling pattern. Never leak internals.
670
+ - **Logging.** Structured JSON with requestId, userId, action. Never log PII.
671
+ - **Business logic in services, not routes.** Routes: validate, call service, format response.
672
+ - **Ownership checks on every query.** No IDOR. Return 404, not 403.
673
+ - **Accessibility is not optional.** Keyboard nav, focus management, contrast, ARIA.
674
+ - **Small batches.** Max ~200 lines changed, one flow per batch, verify after each.
675
+ - **No stubs.** Never ship placeholder code. If it's not ready, don't create the file.
676
+ - **Screenshot every page during review.** Agents must visually inspect running applications.
677
+
678
+ ### Testing Philosophy
679
+
680
+ Tests are written alongside features, not bolted on after. They're a **breaking gate** — failing tests prevent phase advancement.
681
+
682
+ - **Unit tests** for business logic (vitest/jest/pytest/RSpec)
683
+ - **Integration tests** for API routes
684
+ - **Regression checklist** grows with every feature (2-3 items per feature, 30-50 by launch)
685
+ - **Framework mapping** in `docs/methods/TESTING.md`
686
+
687
+ ---
688
+
689
+ ## 7. The Archive
690
+
691
+ ### Operational Learnings
692
+
693
+ Multi-session projects accumulate operational knowledge — API quirks, decision rationale, root causes, environment constraints. VoidForge stores these in `docs/LEARNINGS.md`, a curated file that persists across sessions.
694
+
695
+ **How it works:**
696
+ - `/debrief` proposes candidate learnings after a session → you approve or reject each one
697
+ - `/vault` catches any remaining learnings at session end
698
+ - `/build`, `/campaign`, `/architect`, and `/assemble` read the file at startup — your next session starts with the operational context from all previous sessions
699
+
700
+ **What goes in:** Verified operational facts discovered by live testing that code review can't catch. Decision rationale ("we chose X over Y because Z"). External system behaviors specific to this project. Root causes that took multiple attempts to identify.
701
+
702
+ **What stays out:** Code patterns (→ `docs/LESSONS.md`), methodology gaps (→ field reports), config values (→ `.env`), opinions.
703
+
704
+ **Maintenance:** 50-entry hard cap. Entries older than 90 days without re-verification are flagged as stale. Learnings that appear in 2+ projects get promoted to `LESSONS.md` via Wong's pipeline — a pointer replaces the original entry.
705
+
706
+ The file is created automatically when you approve your first learning. Projects that don't need it get zero overhead.
707
+
708
+ ### Build Journal
709
+
710
+ The build journal is VoidForge's persistent memory. When context compresses or a new session starts, agents read journal files to recover state.
711
+
712
+ **Files:**
713
+ - `logs/build-state.md` — Master state file, read at every session start (under 50 lines)
714
+ - `logs/phase-XX-*.md` — Per-phase logs with decisions, test results, findings
715
+ - `logs/decisions.md` — Running log of all non-obvious decisions
716
+ - `logs/handoffs.md` — Every agent-to-agent handoff with context
717
+ - `logs/errors.md` — What broke, why, how it was fixed
718
+
719
+ **Protocol:**
720
+ 1. **Start of session:** Read `build-state.md` to recover state
721
+ 2. **During work:** Log decisions, test results, and findings to the active phase log
722
+ 3. **End of session:** Update `build-state.md` with current state
723
+
724
+ ### Context Management
725
+
726
+ Claude Code has a finite context window. VoidForge keeps sessions fast:
727
+
728
+ - Load method docs **on demand**, not all at once. Read frontend docs when doing frontend work.
729
+ - **One phase or agent domain per session.** Don't try to do everything in one sitting.
730
+ - If **50+ files read** or **100+ tool calls**, checkpoint to `build-state.md` and suggest a new session.
731
+ - New sessions pick up from the journal, not from scratch.
732
+
733
+ ### Session Recovery
734
+
735
+ Long builds will span multiple sessions. Here's how it works:
736
+
737
+ 1. Start a new Claude Code session in your project
738
+ 2. Claude reads `CLAUDE.md` (automatic) and `logs/build-state.md` (directed by CLAUDE.md)
739
+ 3. Build state tells Claude: current phase, what's done, what's next, any blockers
740
+ 4. Claude picks up exactly where the last session left off
741
+ 5. No context is lost — everything important is in the journal
742
+
743
+ ---
744
+
745
+ ## 8. Troubleshooting
746
+
747
+ ### Phase Gate Failures
748
+
749
+ **Gate fails = you stop.** Don't push through. Don't stack changes on top of broken code.
750
+
751
+ 1. Log the failure in the phase log and `logs/errors.md`
752
+ 2. Identify the breaking change (check recent diffs)
753
+ 3. Revert the change: `git revert <commit>` or `git stash`
754
+ 4. Verify the regression is gone
755
+ 5. Fix the specific issue
756
+ 6. Re-apply with the fix included
757
+ 7. Re-verify the gate
758
+
759
+ ### Context Window Filling Up
760
+
761
+ Signs: Claude starts forgetting earlier decisions, responses slow down, tool calls increase.
762
+
763
+ 1. Update `logs/build-state.md` with your current state
764
+ 2. Start a new Claude Code session
765
+ 3. The new session reads the journal and continues
766
+
767
+ ### Build Journal Corruption
768
+
769
+ If `build-state.md` gets corrupted or out of date:
770
+
771
+ 1. Check `git log` for recent commits — they tell you what phase you're in
772
+ 2. Read the most recent `logs/phase-XX-*.md` files
773
+ 3. Reconstruct `build-state.md` from these sources
774
+ 4. Continue
775
+
776
+ ### PRD Gaps
777
+
778
+ If Phase 0 flags critical gaps (no schema, no stack, no features):
779
+
780
+ 1. **Stop.** Don't proceed with assumptions.
781
+ 2. Fill the gaps in `docs/PRD.md`
782
+ 3. Re-run `/build` — Phase 0 will re-validate
783
+
784
+ ### Deploy Failures
785
+
786
+ If Phase 12 or a deploy script fails:
787
+
788
+ 1. The deploy script auto-rolls back on health check failure (VPS)
789
+ 2. Check logs: SSH into the server, check PM2 logs or Caddy logs
790
+ 3. For platform deploys (Vercel/Railway), check the platform dashboard
791
+ 4. Fix locally, commit, re-deploy
792
+
793
+ ### Common Issues
794
+
795
+ | Problem | Fix |
796
+ |---------|-----|
797
+ | `npm run build` fails after scaffold | Check TypeScript errors — usually a missing type or import |
798
+ | Auth tests fail | Check session config, cookie settings, CSRF token setup |
799
+ | Database won't connect | Verify `.env` has correct DB_URL, check if DB is running |
800
+ | Deploy script hangs | Check SSH connectivity, verify key permissions (0600) |
801
+ | Test runner not found | Phase 1 should set it up — re-run scaffold if missing |
802
+ | Context fills mid-phase | Checkpoint to journal, new session, continue |
803
+ | `npx voidforge init` doesn't work | Not available yet. Clone the repo directly. See QUICKSTART.md |
804
+ | npm install fails on Windows | node-pty needs C++ tools. Use `--ignore-scripts` or scaffold branch |
805
+
806
+ ---
807
+
808
+ ## 9. Evolution
809
+
810
+ ### Making VoidForge Smarter
811
+
812
+ VoidForge accumulates intelligence over time. Every project makes it better.
813
+
814
+ #### After Each Project
815
+
816
+ Add entries to `docs/LESSONS.md`:
817
+ - What worked well
818
+ - What caused friction
819
+ - Workarounds you discovered
820
+ - Patterns that emerged
821
+
822
+ #### Promote Proven Patterns
823
+
824
+ When a lesson proves reliable across multiple projects:
825
+ 1. Write a reference implementation in `docs/patterns/`
826
+ 2. Add framework adaptations
827
+ 3. Reference it from the relevant method doc
828
+
829
+ #### Add New Protocols
830
+
831
+ Discovered a new process that works? Add a method doc to `docs/methods/`:
832
+ 1. Name an agent lead (from the appropriate universe)
833
+ 2. Define behavioral directives
834
+ 3. List sub-agents with roles
835
+ 4. Write the execution sequence
836
+ 5. Add to the Docs Reference table in CLAUDE.md
837
+
838
+ #### Cross-Branch Sync
839
+
840
+ VoidForge ships on three branches. When you update shared methodology:
841
+
842
+ **Shared files** (must exist on all branches):
843
+ - `CLAUDE.md`
844
+ - `.claude/commands/*`
845
+ - `docs/methods/*`
846
+ - `docs/patterns/*`
847
+ - `docs/NAMING_REGISTRY.md`
848
+ - `HOLOCRON.md`
849
+
850
+ Update one branch → propagate to the other two. The agents, characters, and personality are VoidForge's identity. Never strip them from any tier.
851
+
852
+ ---
853
+
854
+ *"In my experience, there's no such thing as luck." — Kenobi*
855
+
856
+ *"From nothing, everything." — VoidForge*