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,139 @@
1
+ # MCP INTEGRATION GUIDE
2
+ ## System Protocol · Used by: All Agents
3
+ ## Using Model Context Protocol Servers with the Scaffold
4
+
5
+ > *External tools expand what agents can do. This guide covers when and how to use them.*
6
+
7
+ ## What MCP Servers Are
8
+
9
+ MCP (Model Context Protocol) servers provide Claude Code with access to external tools and services — databases, APIs, file systems, SaaS platforms — through a standardized interface. They extend what agents can do beyond code and local files.
10
+
11
+ ## When to Use MCP Servers
12
+
13
+ | Scenario | MCP Server | Which Agent Uses It |
14
+ |----------|-----------|-------------------|
15
+ | Project management | Todoist, Linear, Jira | Picard (planning), Batman (bug tracking) |
16
+ | Documentation | Notion, Confluence | Picard (ADRs), Galadriel (design docs) |
17
+ | Communication | Slack | All (status updates, handoffs) |
18
+ | Design | Figma | Galadriel (design specs), Arwen (visual audit) |
19
+ | Monitoring | Datadog, Grafana | Kusanagi (L — monitoring), Stark (Fury — performance) |
20
+ | Version control | GitHub | All (PRs, issues, code review) |
21
+ | Database | PostgreSQL, Supabase | Stark (Banner — schema), Picard (Spock — data architecture) |
22
+ | AI/ML | Hugging Face | Stark (model selection), Picard (architecture) |
23
+
24
+ ## Integration Patterns
25
+
26
+ ### Pattern 1: Task Tracking
27
+
28
+ When the PRD is large, use a project management MCP to track build phases:
29
+
30
+ ```
31
+ Phase 0 (Orient) → Create project with sections matching build phases
32
+ Phase 1-8 (Build) → Create tasks per feature, track completion
33
+ Phase 9-11 (Audit) → Create issues per finding, link to code
34
+ Phase 12-13 (Deploy) → Launch checklist as task list
35
+ ```
36
+
37
+ ### Pattern 2: Communication
38
+
39
+ For team visibility during parallel agent work:
40
+
41
+ ```
42
+ Agent starts phase → Post status to project channel
43
+ Agent finds blocker → Post to relevant agent's attention
44
+ Agent completes phase → Post summary with deliverables
45
+ Handoff between agents → Post handoff context
46
+ ```
47
+
48
+ ### Pattern 3: Documentation
49
+
50
+ For projects that need living documentation:
51
+
52
+ ```
53
+ ADRs (Picard) → Architecture decision page/doc
54
+ API docs (Stark) → API reference page
55
+ UX audit (Galadriel) → Issue tracker with screenshots
56
+ Security findings (Kenobi) → Security audit doc with severity tags
57
+ ```
58
+
59
+ ## Configuring MCP Servers
60
+
61
+ MCP servers are configured in Claude Code's settings. Each server provides specific tools that become available during sessions.
62
+
63
+ ### Project-Level Configuration
64
+
65
+ Add MCP servers relevant to your project in `.claude/settings.json`:
66
+
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "server-name": {
71
+ "command": "npx",
72
+ "args": ["-y", "@mcp-server/package-name"],
73
+ "env": {
74
+ "API_KEY": "your-key"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### Common Server Configurations
82
+
83
+ **GitHub** — PRs, issues, code review:
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "github": {
88
+ "command": "npx",
89
+ "args": ["-y", "@modelcontextprotocol/server-github"],
90
+ "env": {
91
+ "GITHUB_TOKEN": "${GITHUB_TOKEN}"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ **PostgreSQL** — Direct database access:
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "postgres": {
103
+ "command": "npx",
104
+ "args": ["-y", "@modelcontextprotocol/server-postgres"],
105
+ "env": {
106
+ "DATABASE_URL": "${DATABASE_URL}"
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## Security Rules (Kenobi Enforces)
114
+
115
+ 1. **Never commit MCP API keys to git.** Use environment variable references.
116
+ 2. **Use read-only access** where possible. Write access only when explicitly needed.
117
+ 3. **Scope permissions narrowly.** Don't give a server access to all repos when it only needs one.
118
+ 4. **Review what data MCP servers can access.** PII-containing databases need extra caution.
119
+ 5. **Rotate keys** if a server is removed or compromised.
120
+
121
+ ## Agent-MCP Mapping
122
+
123
+ When delegating work, agents should use MCP tools that match their domain:
124
+
125
+ | Agent | Primary MCP Tools | Use Case |
126
+ |-------|------------------|----------|
127
+ | **Picard** | GitHub (PRs/issues), Notion (docs) | Architecture decisions, planning |
128
+ | **Stark** | Database, GitHub (code) | Schema inspection, API implementation |
129
+ | **Galadriel** | Figma, Notion (design docs) | Design specs, component inventory |
130
+ | **Batman** | GitHub (issues), project management | Bug tracking, regression checklists |
131
+ | **Kenobi** | GitHub (security alerts) | Vulnerability scanning, audit trails |
132
+ | **Kusanagi** | Monitoring, cloud providers | Infrastructure management, deploy status |
133
+
134
+ ## When NOT to Use MCP
135
+
136
+ - Don't use MCP for something the local filesystem handles fine
137
+ - Don't add MCP servers speculatively — add them when a specific need arises
138
+ - Don't use MCP to bypass local development (e.g., don't query prod DB when you should use a local copy)
139
+ - Don't configure MCP servers with overly broad permissions
@@ -0,0 +1,148 @@
1
+ # THE MUSTER — Full-Roster Agent Deployment
2
+ ## System Protocol · Orchestrates: All 9 Universes · Defined by: **Fury** (Marvel)
3
+ ## Activation: `--muster` flag on any command
4
+
5
+ > *"The beacons are lit! Gondor calls for aid!" — Gandalf*
6
+ > *"And Rohan will answer." — Théoden*
7
+
8
+ ## AGENT DEPLOYMENT IS MANDATORY
9
+
10
+ **When `--muster` is invoked, you MUST launch agents via the Agent tool as separate sub-processes.** Do NOT shortcut to inline analysis. Do NOT "think through" each agent's perspective in your own response. The Muster exists because parallel sub-processes catch things sequential inline reasoning misses. Inline analysis that roleplays agent perspectives is NOT a Muster — it is a protocol violation.
11
+
12
+ **Why this rule exists:** In the v18.0 design session, the agent presented an inline analysis that "covered" 6 domain leads' perspectives in a single response. When the user demanded real agent deployment, the actual 3-wave Muster found 5 blockers and expanded the plan from 5 to 8 missions. The inline version missed all 5 blockers. Inline reasoning is not a substitute for parallel sub-process analysis. (Field report #154)
13
+
14
+ ## Identity
15
+
16
+ The Muster is VoidForge's maximum-agent protocol. When `--muster` is passed, every agent across all 9 universes that has relevant expertise for the specific task gets deployed. It is not a review protocol (that's the Gauntlet). It is not a build protocol (that's /assemble). It is a **decision-density protocol** — the flag you use when you want every perspective in the room before committing to a direction.
17
+
18
+ **When to use:** Architecture decisions that affect the whole system. Campaign mission planning for critical features. Build phases where the wrong choice costs days. Any moment where "I wish I'd asked someone else" would be expensive.
19
+
20
+ **When NOT to use:** Routine missions, bug fixes, documentation updates, or any task where the standard agent roster is sufficient. The Muster is expensive — 30-50 agent launches. Use it for decisions that matter.
21
+
22
+ ## The Protocol
23
+
24
+ ### Step 1 — The Beacons (Gandalf)
25
+
26
+ Read the task scope and produce a 1-paragraph brief:
27
+ - What is being built/decided/designed?
28
+ - What domains does it touch? (security, UX, architecture, financial, AI, infra, growth)
29
+ - What decisions need to be made?
30
+ - What are the stakes if the wrong choice is made?
31
+
32
+ ### Step 2 — The Muster Roll (Théoden)
33
+
34
+ For each of the 9 universes, evaluate which agents have relevant expertise for **this specific task**. Not "who exists" — "who has something to say."
35
+
36
+ **Evaluation criteria per agent:**
37
+ 1. Does this agent's domain overlap with the task? → Include
38
+ 2. Does this agent's adversarial lens apply? → Include in Wave 3
39
+ 3. Does this agent bring a unique perspective no other included agent covers? → Include
40
+ 4. Would this agent's findings be a subset of another agent's? → Exclude (dedup)
41
+
42
+ **Universe leads (always evaluated, included if relevant):**
43
+
44
+ | Universe | Lead | Domain | Include When |
45
+ |---|---|---|---|
46
+ | Star Trek | Picard | Architecture | Architecture, schema, scaling decisions |
47
+ | Marvel | Stark | Code Review | Implementation, patterns, integration |
48
+ | DC | Batman | QA | Edge cases, error states, testing strategy |
49
+ | Tolkien | Galadriel | UX | User-facing changes, a11y, design |
50
+ | Star Wars | Kenobi | Security | Auth, encryption, access control, secrets |
51
+ | Anime | Kusanagi | DevOps | Deploy, infra, monitoring, networking |
52
+ | Cosmere | Kelsier | Growth | Revenue, campaigns, distribution, analytics |
53
+ | Foundation | Seldon | AI | LLM integration, prompts, orchestration, safety |
54
+ | Dune | Chani | Comms | Remote control, messaging, notifications |
55
+
56
+ **Extended roster (include when domain matches):**
57
+
58
+ | Agent | Universe | Include When |
59
+ |---|---|---|
60
+ | Spock | Star Trek | Schema, data modeling, normalization |
61
+ | Scotty | Star Trek | Scaling, performance, service boundaries |
62
+ | Torres | Star Trek | Performance architecture, bottlenecks |
63
+ | La Forge | Star Trek | Failure modes, graceful degradation |
64
+ | Janeway | Star Trek | Novel architectures (event-sourcing, CQRS, serverless) |
65
+ | Riker | Star Trek | Trade-off challenges, ADR review |
66
+ | Troi | Star Trek | PRD compliance, prose verification |
67
+ | Tuvok | Star Trek | Security architecture, auth flow design |
68
+ | Kim | Star Trek | API design, REST conventions |
69
+ | Banner | Marvel | Edge cases, boundary conditions |
70
+ | Strange | Marvel | Complexity analysis, time-sensitive decisions |
71
+ | Romanoff | Marvel | Attack surface, reconnaissance |
72
+ | Vision | Marvel | Diff analysis, change classification |
73
+ | Wong | Marvel | Lessons, pattern promotion |
74
+ | Nightwing | DC | Regression testing, re-verification |
75
+ | Deathstroke | DC | Adversarial bypass, defense testing |
76
+ | Constantine | DC | Cursed code, hidden problems in "clean" areas |
77
+ | Oracle | DC | Data analysis, forensics |
78
+ | Samwise | Tolkien | Accessibility, screen readers, keyboard nav |
79
+ | Éowyn | Tolkien | Enchantment, micro-animations, delight |
80
+ | Elrond | Tolkien | Systems integration, council synthesis |
81
+ | Celeborn | Tolkien | Design system, visual consistency |
82
+ | Ahsoka | Star Wars | Access control, authorization patterns |
83
+ | Maul | Star Wars | Adversarial security, bypass attempts |
84
+ | Padmé | Star Wars | Functional verification, critical path testing |
85
+ | Yoda | Star Wars | Wisdom, architectural longevity |
86
+ | Vin | Cosmere | Analytics, metrics, pattern detection |
87
+ | Navani | Cosmere | SEO, technical precision, structured data |
88
+ | Steris | Cosmere | Budget, forecasting, contingency |
89
+ | Szeth | Cosmere | Compliance, legal, policy enforcement |
90
+ | Dalinar | Cosmere | Competitive analysis, strategic positioning |
91
+ | Salvor Hardin | Foundation | Model selection, cost-performance |
92
+ | Gaal Dornick | Foundation | Prompt engineering, guardrails |
93
+ | The Mule | Foundation | Adversarial AI, inputs the model can't predict |
94
+ | Bayta Darell | Foundation | Evaluation, golden datasets, regression |
95
+ | Senku | Anime | Engineering first-principles, science |
96
+ | Levi | Anime | Precision, zero-waste execution |
97
+ | Spike | Anime | Chaos testing, unexpected interactions |
98
+ | Holo | Anime | Economics, trade-offs, market dynamics |
99
+
100
+ ### Step 3 — The Ride (Éomer)
101
+
102
+ Deploy agents in 3 waves:
103
+
104
+ **Wave 1 — Vanguard (5-8 agents, parallel):**
105
+ Domain leads for every relevant universe. These set the baseline analysis.
106
+
107
+ **Wave 2 — Main Force (5-10 agents, parallel):**
108
+ Supporting experts. Each gets Wave 1's findings as context so they build on (not duplicate) the leads' work.
109
+
110
+ **Wave 3 — Adversarial (3-5 agents, parallel):**
111
+ Challenge agents who specifically try to break what Waves 1-2 recommended:
112
+ - **Deathstroke** (DC) — bypasses proposed defenses
113
+ - **Maul** (Star Wars) — attacks proposed security
114
+ - **The Mule** (Foundation) — adversarial AI testing
115
+ - **Constantine** (DC) — finds cursed code in "clean" proposals
116
+ - **Riker** (Star Trek) — challenges trade-offs ("Number One, does this hold up?")
117
+
118
+ ### Step 4 — The Council (Théoden + Gandalf)
119
+
120
+ Synthesize all findings:
121
+ 1. **Deduplicate** — same finding from multiple agents → keep the most detailed, note agreement
122
+ 2. **Resolve conflicts** — when agents disagree, present both positions with reasoning
123
+ 3. **Preserve dissent** — if 8 agents agree and 1 disagrees, the dissent is noted (not suppressed)
124
+ 4. **Recommend** — unified recommendation with confidence level
125
+
126
+ ## Integration Points
127
+
128
+ | Command | What `--muster` Does |
129
+ |---|---|
130
+ | `/architect --muster` | Full 9-universe architecture review (vs Star Trek bridge crew default) |
131
+ | `/campaign --muster` | Per-mission full-roster deployment (expensive — use for critical missions only) |
132
+ | `/build --muster` | Every build phase gets cross-universe review |
133
+ | `/gauntlet --muster` | Synonym for `--infinity` (Gauntlet already has this concept) |
134
+
135
+ ## Intensity Spectrum
136
+
137
+ ```
138
+ --fast Standard agents, reduced passes (skip last 2 rounds/phases)
139
+ (default) Standard agents, full protocol
140
+ --muster Every viable agent, 3 waves, adversarial challenge
141
+ --infinity Every agent as own sub-process, 10 rounds (Gauntlet only)
142
+ ```
143
+
144
+ ## Cost Awareness
145
+
146
+ The Muster launches 30-50 agent sub-processes. This consumes significant context. Use it when the decision justifies the investment — architecture choices, security-critical features, financial system design, launch preparation.
147
+
148
+ For routine work, the standard agent roster is sufficient. The Muster is the heavy artillery, not the sidearm.
@@ -0,0 +1,186 @@
1
+ # PRD GENERATOR — From Idea to Production-Ready PRD
2
+ ## System Protocol · Defined by: **Sisko** (Star Trek)
3
+
4
+ ## Purpose
5
+
6
+ Use this prompt with Claude to generate a comprehensive PRD from a rough product idea. The output PRD can then be dropped into `/docs/PRD.md` and built by the team (Galadriel, Stark, Batman, Kenobi, Picard, Kusanagi) using the Build Protocol.
7
+
8
+ ---
9
+
10
+ ## Usage
11
+
12
+ Paste the prompt below into a Claude conversation, followed by your product idea (as rough as 1-3 sentences). Claude will generate a full PRD.
13
+
14
+ ---
15
+
16
+ ## The Prompt
17
+
18
+ ```
19
+ You are a senior product manager and systems architect. Your task is to take a rough product idea and produce a comprehensive, buildable Product Requirements Document (PRD).
20
+
21
+ The PRD must be detailed enough that an AI coding agent can build the entire application from it without asking clarifying questions. Every section must be specific — no vague hand-waving.
22
+
23
+ Produce the following sections. Start with a YAML frontmatter block, then the full PRD:
24
+
25
+ ## Frontmatter (REQUIRED — placed at top of document)
26
+ ```yaml
27
+ name: "[project name]"
28
+ type: "full-stack" # full-stack | api-only | static-site | prototype
29
+ framework: "" # next.js | django | rails | express | etc.
30
+ database: "" # postgres | mysql | sqlite | mongodb | none
31
+ cache: "" # redis | none
32
+ styling: "" # tailwind | css-modules | styled-components | etc.
33
+ auth: yes # yes | no
34
+ payments: none # stripe | lemonsqueezy | none
35
+ workers: no # yes | no
36
+ admin: no # yes | no
37
+ marketing: no # yes | no
38
+ email: none # resend | sendgrid | ses | none
39
+ deploy: "vps" # vps | vercel | railway | cloudflare | static | docker
40
+ ```
41
+
42
+ ## 1. Product Vision
43
+ - Name (suggest 2-3 if none given, pick the best)
44
+ - One-liner (under 15 words)
45
+ - What it does (2-3 sentences, mechanistic — not marketing)
46
+ - Who it's for (specific customer profile)
47
+ - Brand personality (3 adjectives + what it's NOT)
48
+
49
+ ## 2. System Architecture
50
+ - High-level architecture diagram (ASCII)
51
+ - Route structure (every URL)
52
+ - Service boundaries
53
+ - **External API integration research (REQUIRED):** If the product integrates with any external API (payment, analytics, landing pages, social, email, etc.), you MUST read the actual API documentation before writing data models, endpoint specifications, or integration types. If WebFetch fails (Cloudflare, auth-gated docs), ask the user for a local copy of the API docs. Never design against assumed API shapes — real APIs diverge from assumptions in naming conventions, endpoint structure, auth methods, and available features. The PRD's data models and API routes must reflect the real API surface, not a hypothetical one. (Field report #265: 6 hypothetical Kongo API endpoints were designed without reading the docs; none existed — the real API handled everything differently.)
54
+
55
+ ## 3. Tech Stack
56
+ - Framework, styling, database, cache, auth, payments, email, storage, hosting
57
+ - Rationale for each choice
58
+ - All dependencies
59
+
60
+ ## 4. Core Features
61
+ For each feature:
62
+ - User flow (numbered steps)
63
+ - Data model (entities, fields, relationships)
64
+ - API endpoints (method, path, input, output, auth)
65
+ - UI description (screens, states: loading/empty/error/success)
66
+ - Edge cases
67
+
68
+ ## 5. Authentication & Accounts
69
+ - Auth methods
70
+ - User model (complete fields)
71
+ - Roles and permissions
72
+ - Session management
73
+ - Password manager compatibility requirements
74
+
75
+ ## 6. Database Schema
76
+ - Complete schema (Prisma format preferred)
77
+ - All models, fields, types, relations, indexes, enums
78
+
79
+ ## 7. API Design
80
+ - Every route with method, auth, input schema, output schema
81
+ - Error response format
82
+ - Rate limiting rules
83
+
84
+ ## 8. Tiers & Pricing (if applicable)
85
+ - Feature comparison table
86
+ - Pricing
87
+ - What's gated and how enforcement works (client + server)
88
+
89
+ ## 9. Payment Processing (if applicable)
90
+ - Provider and integration approach
91
+ - Webhook events to handle
92
+ - Subscription lifecycle
93
+
94
+ ## 10. Analytics & Tracking
95
+ - Event taxonomy (every event with properties)
96
+ - Key metrics and funnels
97
+
98
+ ## 11. Admin Dashboard (if applicable)
99
+ - What the team sees and can do
100
+ - Sections and data
101
+
102
+ ## 12. Email & Notifications
103
+ - Every transactional email (trigger, subject, content summary)
104
+
105
+ ## 13. Security
106
+ - Encryption (at rest, in transit)
107
+ - Rate limiting
108
+ - Input validation
109
+ - CORS, CSRF, XSS prevention
110
+ - File upload security
111
+ - Secret management
112
+
113
+ ## 13.5 AI Architecture (conditional — if the product uses AI/LLM features)
114
+ Ask the user: "Does your product use AI or LLM features? If yes: What models? What do they do (classify, generate, route, orchestrate)? What happens when the AI is wrong?" Generate a PRD section:
115
+
116
+ ## AI Architecture
117
+ - **Provider:** [anthropic / openai / local / multi]
118
+ - **Models:** [list with justification]
119
+ - **AI Features:** [classification, generation, tool-use, routing, orchestration]
120
+ - **Failure strategy:** [what happens when the AI fails]
121
+ - **Eval strategy:** [how you'll measure quality]
122
+
123
+ ## 14. Brand Voice & Personality
124
+ - How the product speaks
125
+ - Example microcopy for: buttons, errors, empty states, confirmations, destructive actions
126
+ - What tone to avoid
127
+
128
+ ## 15. Deployment & Infrastructure
129
+ - Target hosting with specific setup
130
+ - Process management
131
+ - DNS/SSL
132
+ - Backup strategy
133
+ - Complete environment variable list
134
+
135
+ ## 16. Launch Sequence
136
+ - Phased build plan (what gets built in what order)
137
+ - Each phase has: scope, dependencies, and "done" criteria
138
+
139
+ RULES:
140
+ - Every number must be specific (not "many" or "several")
141
+ - Every feature must have all states defined (loading, empty, error, success)
142
+ - Every API endpoint must have input validation described
143
+ - The schema must be complete — no "add more fields as needed"
144
+ - Environment variables must be listed exhaustively
145
+ - If you must assume something, state the assumption explicitly
146
+
147
+ THE PRODUCT IDEA:
148
+ ```
149
+
150
+ Then paste your idea below the prompt.
151
+
152
+ ---
153
+
154
+ ## Tips for Better PRDs
155
+
156
+ 1. **More input = better output.** Even rough notes, competitor links, or sketches help.
157
+ 2. **Name your customer.** "Seed-stage founders raising their first round" > "startups."
158
+ 3. **Name your stack if you have preferences.** Otherwise the generator picks sensible defaults.
159
+ 4. **Include pricing if you know it.** Revenue model shapes the architecture.
160
+ 5. **Include examples of products you admire.** Helps calibrate the voice and UX direction.
161
+
162
+ ---
163
+
164
+ ## PRD Evolution Log
165
+
166
+ For complex projects that go through iterative `/architect --plan` refinement, add a PRD Evolution Log section at the bottom of the PRD:
167
+
168
+ ```markdown
169
+ ## PRD Evolution Log
170
+
171
+ | Date | Change | Reason |
172
+ |------|--------|--------|
173
+ | YYYY-MM-DD | Initial PRD generated | Sisko's interview |
174
+ | YYYY-MM-DD | Restructured phases: auth before payments | Dependency analysis (Picard) |
175
+ | YYYY-MM-DD | Added historical validation phase | Strategy requires data proof before infra |
176
+ ```
177
+
178
+ This section is optional for simple PRDs but recommended for any PRD that undergoes 3+ revision commits before building begins. The log captures *why* the PRD evolved — the git diff shows *what* changed but not the architectural reasoning. (Field report #126)
179
+
180
+ ## After Generating
181
+
182
+ 1. Review the PRD — fix anything that feels wrong
183
+ 2. Save it as `/docs/PRD.md` in your project
184
+ 3. Open Claude Code
185
+ 4. Say: "Build this project from the PRD"
186
+ 5. The Build Protocol will deploy Picard, Stark, Galadriel, and the rest in sequence