beth-copilot 1.0.14 → 1.0.16

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 (236) hide show
  1. package/CHANGELOG.md +195 -177
  2. package/README.md +528 -185
  3. package/bin/cli.js +47 -0
  4. package/dist/cli/commands/doctor.e2e.test.d.ts +8 -0
  5. package/dist/cli/commands/doctor.e2e.test.d.ts.map +1 -0
  6. package/dist/cli/commands/doctor.e2e.test.js +428 -0
  7. package/dist/cli/commands/doctor.e2e.test.js.map +1 -0
  8. package/dist/cli/commands/doctor.test.js +1 -1
  9. package/dist/cli/commands/help.e2e.test.d.ts +9 -0
  10. package/dist/cli/commands/help.e2e.test.d.ts.map +1 -0
  11. package/dist/cli/commands/help.e2e.test.js +150 -0
  12. package/dist/cli/commands/help.e2e.test.js.map +1 -0
  13. package/dist/cli/commands/init.test.d.ts +6 -0
  14. package/dist/cli/commands/init.test.d.ts.map +1 -0
  15. package/dist/cli/commands/init.test.js +289 -0
  16. package/dist/cli/commands/init.test.js.map +1 -0
  17. package/dist/cli/commands/mcp.e2e.test.d.ts +9 -0
  18. package/dist/cli/commands/mcp.e2e.test.d.ts.map +1 -0
  19. package/dist/cli/commands/mcp.e2e.test.js +139 -0
  20. package/dist/cli/commands/mcp.e2e.test.js.map +1 -0
  21. package/dist/cli/commands/pipeline.e2e.test.d.ts +9 -0
  22. package/dist/cli/commands/pipeline.e2e.test.d.ts.map +1 -0
  23. package/dist/cli/commands/pipeline.e2e.test.js +192 -0
  24. package/dist/cli/commands/pipeline.e2e.test.js.map +1 -0
  25. package/dist/cli/commands/quickstart.test.d.ts +6 -0
  26. package/dist/cli/commands/quickstart.test.d.ts.map +1 -0
  27. package/dist/cli/commands/quickstart.test.js +232 -0
  28. package/dist/cli/commands/quickstart.test.js.map +1 -0
  29. package/dist/core/agents/frontmatter.test.d.ts +8 -0
  30. package/dist/core/agents/frontmatter.test.d.ts.map +1 -0
  31. package/dist/core/agents/frontmatter.test.js +589 -0
  32. package/dist/core/agents/frontmatter.test.js.map +1 -0
  33. package/dist/core/agents/handoffs.test.d.ts +8 -0
  34. package/dist/core/agents/handoffs.test.d.ts.map +1 -0
  35. package/dist/core/agents/handoffs.test.js +320 -0
  36. package/dist/core/agents/handoffs.test.js.map +1 -0
  37. package/dist/core/agents/loader.test.js +1 -1
  38. package/dist/core/agents/suite.test.d.ts +8 -0
  39. package/dist/core/agents/suite.test.d.ts.map +1 -0
  40. package/dist/core/agents/suite.test.js +207 -0
  41. package/dist/core/agents/suite.test.js.map +1 -0
  42. package/dist/core/agents/tools.test.d.ts +8 -0
  43. package/dist/core/agents/tools.test.d.ts.map +1 -0
  44. package/dist/core/agents/tools.test.js +332 -0
  45. package/dist/core/agents/tools.test.js.map +1 -0
  46. package/dist/core/context.d.ts +171 -0
  47. package/dist/core/context.d.ts.map +1 -0
  48. package/dist/core/context.js +353 -0
  49. package/dist/core/context.js.map +1 -0
  50. package/dist/core/context.test.d.ts +8 -0
  51. package/dist/core/context.test.d.ts.map +1 -0
  52. package/dist/core/context.test.js +253 -0
  53. package/dist/core/context.test.js.map +1 -0
  54. package/dist/core/handoffs.d.ts +151 -0
  55. package/dist/core/handoffs.d.ts.map +1 -0
  56. package/dist/core/handoffs.js +220 -0
  57. package/dist/core/handoffs.js.map +1 -0
  58. package/dist/core/handoffs.test.d.ts +8 -0
  59. package/dist/core/handoffs.test.d.ts.map +1 -0
  60. package/dist/core/handoffs.test.js +231 -0
  61. package/dist/core/handoffs.test.js.map +1 -0
  62. package/dist/core/orchestrator.d.ts +246 -0
  63. package/dist/core/orchestrator.d.ts.map +1 -0
  64. package/dist/core/orchestrator.js +514 -0
  65. package/dist/core/orchestrator.js.map +1 -0
  66. package/dist/core/orchestrator.test.d.ts +8 -0
  67. package/dist/core/orchestrator.test.d.ts.map +1 -0
  68. package/dist/core/orchestrator.test.js +517 -0
  69. package/dist/core/orchestrator.test.js.map +1 -0
  70. package/dist/core/router.d.ts +102 -0
  71. package/dist/core/router.d.ts.map +1 -0
  72. package/dist/core/router.js +178 -0
  73. package/dist/core/router.js.map +1 -0
  74. package/dist/core/router.test.d.ts +8 -0
  75. package/dist/core/router.test.d.ts.map +1 -0
  76. package/dist/core/router.test.js +215 -0
  77. package/dist/core/router.test.js.map +1 -0
  78. package/dist/index.d.ts +9 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +7 -0
  81. package/dist/index.js.map +1 -1
  82. package/dist/init.test.js +288 -0
  83. package/dist/providers/azure.d.ts +147 -0
  84. package/dist/providers/azure.d.ts.map +1 -0
  85. package/dist/providers/azure.js +491 -0
  86. package/dist/providers/azure.js.map +1 -0
  87. package/dist/providers/azure.test.d.ts +11 -0
  88. package/dist/providers/azure.test.d.ts.map +1 -0
  89. package/dist/providers/azure.test.js +330 -0
  90. package/dist/providers/azure.test.js.map +1 -0
  91. package/dist/providers/config.d.ts +87 -0
  92. package/dist/providers/config.d.ts.map +1 -0
  93. package/dist/providers/config.js +193 -0
  94. package/dist/providers/config.js.map +1 -0
  95. package/dist/providers/config.test.d.ts +7 -0
  96. package/dist/providers/config.test.d.ts.map +1 -0
  97. package/dist/providers/config.test.js +370 -0
  98. package/dist/providers/config.test.js.map +1 -0
  99. package/dist/providers/index.d.ts +18 -0
  100. package/dist/providers/index.d.ts.map +1 -0
  101. package/dist/providers/index.js +14 -0
  102. package/dist/providers/index.js.map +1 -0
  103. package/dist/providers/interface.d.ts +191 -0
  104. package/dist/providers/interface.d.ts.map +1 -0
  105. package/dist/providers/interface.js +94 -0
  106. package/dist/providers/interface.js.map +1 -0
  107. package/dist/providers/retry.d.ts +128 -0
  108. package/dist/providers/retry.d.ts.map +1 -0
  109. package/dist/providers/retry.js +205 -0
  110. package/dist/providers/retry.js.map +1 -0
  111. package/dist/providers/retry.test.d.ts +7 -0
  112. package/dist/providers/retry.test.d.ts.map +1 -0
  113. package/dist/providers/retry.test.js +439 -0
  114. package/dist/providers/retry.test.js.map +1 -0
  115. package/dist/providers/streaming.d.ts +157 -0
  116. package/dist/providers/streaming.d.ts.map +1 -0
  117. package/dist/providers/streaming.js +233 -0
  118. package/dist/providers/streaming.js.map +1 -0
  119. package/dist/providers/streaming.test.d.ts +7 -0
  120. package/dist/providers/streaming.test.d.ts.map +1 -0
  121. package/dist/providers/streaming.test.js +372 -0
  122. package/dist/providers/streaming.test.js.map +1 -0
  123. package/dist/providers/types.d.ts +209 -0
  124. package/dist/providers/types.d.ts.map +1 -0
  125. package/dist/providers/types.js +53 -0
  126. package/dist/providers/types.js.map +1 -0
  127. package/dist/providers/types.test.d.ts +7 -0
  128. package/dist/providers/types.test.d.ts.map +1 -0
  129. package/dist/providers/types.test.js +141 -0
  130. package/dist/providers/types.test.js.map +1 -0
  131. package/dist/tools/cli/beads.d.ts +27 -0
  132. package/dist/tools/cli/beads.d.ts.map +1 -0
  133. package/dist/tools/cli/beads.js +172 -0
  134. package/dist/tools/cli/beads.js.map +1 -0
  135. package/dist/tools/cli/beads.test.d.ts +8 -0
  136. package/dist/tools/cli/beads.test.d.ts.map +1 -0
  137. package/dist/tools/cli/beads.test.js +264 -0
  138. package/dist/tools/cli/beads.test.js.map +1 -0
  139. package/dist/tools/cli/editFile.d.ts +17 -0
  140. package/dist/tools/cli/editFile.d.ts.map +1 -0
  141. package/dist/tools/cli/editFile.js +125 -0
  142. package/dist/tools/cli/editFile.js.map +1 -0
  143. package/dist/tools/cli/editFile.test.d.ts +8 -0
  144. package/dist/tools/cli/editFile.test.d.ts.map +1 -0
  145. package/dist/tools/cli/editFile.test.js +177 -0
  146. package/dist/tools/cli/editFile.test.js.map +1 -0
  147. package/dist/tools/cli/readFile.d.ts +25 -0
  148. package/dist/tools/cli/readFile.d.ts.map +1 -0
  149. package/dist/tools/cli/readFile.js +118 -0
  150. package/dist/tools/cli/readFile.js.map +1 -0
  151. package/dist/tools/cli/readFile.test.d.ts +8 -0
  152. package/dist/tools/cli/readFile.test.d.ts.map +1 -0
  153. package/dist/tools/cli/readFile.test.js +194 -0
  154. package/dist/tools/cli/readFile.test.js.map +1 -0
  155. package/dist/tools/cli/search.d.ts +16 -0
  156. package/dist/tools/cli/search.d.ts.map +1 -0
  157. package/dist/tools/cli/search.js +261 -0
  158. package/dist/tools/cli/search.js.map +1 -0
  159. package/dist/tools/cli/search.test.d.ts +8 -0
  160. package/dist/tools/cli/search.test.d.ts.map +1 -0
  161. package/dist/tools/cli/search.test.js +172 -0
  162. package/dist/tools/cli/search.test.js.map +1 -0
  163. package/dist/tools/cli/subagent.d.ts +43 -0
  164. package/dist/tools/cli/subagent.d.ts.map +1 -0
  165. package/dist/tools/cli/subagent.js +99 -0
  166. package/dist/tools/cli/subagent.js.map +1 -0
  167. package/dist/tools/cli/subagent.test.d.ts +8 -0
  168. package/dist/tools/cli/subagent.test.d.ts.map +1 -0
  169. package/dist/tools/cli/subagent.test.js +190 -0
  170. package/dist/tools/cli/subagent.test.js.map +1 -0
  171. package/dist/tools/cli/terminal.d.ts +19 -0
  172. package/dist/tools/cli/terminal.d.ts.map +1 -0
  173. package/dist/tools/cli/terminal.js +164 -0
  174. package/dist/tools/cli/terminal.js.map +1 -0
  175. package/dist/tools/cli/terminal.test.d.ts +8 -0
  176. package/dist/tools/cli/terminal.test.d.ts.map +1 -0
  177. package/dist/tools/cli/terminal.test.js +161 -0
  178. package/dist/tools/cli/terminal.test.js.map +1 -0
  179. package/dist/tools/index.d.ts +25 -0
  180. package/dist/tools/index.d.ts.map +1 -0
  181. package/dist/tools/index.js +41 -0
  182. package/dist/tools/index.js.map +1 -0
  183. package/dist/tools/interface.d.ts +64 -0
  184. package/dist/tools/interface.d.ts.map +1 -0
  185. package/dist/tools/interface.js +37 -0
  186. package/dist/tools/interface.js.map +1 -0
  187. package/dist/tools/interface.test.d.ts +7 -0
  188. package/dist/tools/interface.test.d.ts.map +1 -0
  189. package/dist/tools/interface.test.js +179 -0
  190. package/dist/tools/interface.test.js.map +1 -0
  191. package/dist/tools/mcp/bridge.d.ts +48 -0
  192. package/dist/tools/mcp/bridge.d.ts.map +1 -0
  193. package/dist/tools/mcp/bridge.js +128 -0
  194. package/dist/tools/mcp/bridge.js.map +1 -0
  195. package/dist/tools/mcp/bridge.test.d.ts +8 -0
  196. package/dist/tools/mcp/bridge.test.d.ts.map +1 -0
  197. package/dist/tools/mcp/bridge.test.js +300 -0
  198. package/dist/tools/mcp/bridge.test.js.map +1 -0
  199. package/dist/tools/mcp/client.d.ts +135 -0
  200. package/dist/tools/mcp/client.d.ts.map +1 -0
  201. package/dist/tools/mcp/client.js +263 -0
  202. package/dist/tools/mcp/client.js.map +1 -0
  203. package/dist/tools/mcp/client.test.d.ts +8 -0
  204. package/dist/tools/mcp/client.test.d.ts.map +1 -0
  205. package/dist/tools/mcp/client.test.js +390 -0
  206. package/dist/tools/mcp/client.test.js.map +1 -0
  207. package/dist/tools/registry.d.ts +82 -0
  208. package/dist/tools/registry.d.ts.map +1 -0
  209. package/dist/tools/registry.js +99 -0
  210. package/dist/tools/registry.js.map +1 -0
  211. package/dist/tools/registry.test.d.ts +7 -0
  212. package/dist/tools/registry.test.d.ts.map +1 -0
  213. package/dist/tools/registry.test.js +199 -0
  214. package/dist/tools/registry.test.js.map +1 -0
  215. package/dist/tools/suite.test.d.ts +11 -0
  216. package/dist/tools/suite.test.d.ts.map +1 -0
  217. package/dist/tools/suite.test.js +119 -0
  218. package/dist/tools/suite.test.js.map +1 -0
  219. package/dist/tools/types.d.ts +75 -0
  220. package/dist/tools/types.d.ts.map +1 -0
  221. package/dist/tools/types.js +30 -0
  222. package/dist/tools/types.js.map +1 -0
  223. package/dist/tools/types.test.d.ts +7 -0
  224. package/dist/tools/types.test.d.ts.map +1 -0
  225. package/dist/tools/types.test.js +178 -0
  226. package/dist/tools/types.test.js.map +1 -0
  227. package/package.json +60 -56
  228. package/sbom.json +3302 -8
  229. package/templates/.github/agents/beth.agent.md +329 -329
  230. package/templates/.github/agents/developer.agent.md +572 -572
  231. package/templates/.github/agents/product-manager.agent.md +272 -272
  232. package/templates/.github/agents/researcher.agent.md +338 -338
  233. package/templates/.github/agents/security-reviewer.agent.md +465 -465
  234. package/templates/.github/agents/tester.agent.md +496 -496
  235. package/templates/.github/agents/ux-designer.agent.md +393 -393
  236. package/templates/mcp.json.example +4 -0
package/README.md CHANGED
@@ -12,21 +12,91 @@ They broke her wings once. They forgot she had claws.
12
12
 
13
13
  ## What Is This?
14
14
 
15
- Beth is a master AI orchestrator system—a ruthless, hyper-competent coordinator that runs your development team the way Beth Dutton runs Schwartz & Meyer. No hand-holding. No excuses. Just results.
15
+ Beth is a **multi-agent AI orchestrator** with a TypeScript runtime, CLI toolchain, MCP integrations, and agent-to-agent (A2A) delegation—all driven by a ruthless coordinator who runs your development team the way Beth Dutton runs Schwartz & Meyer.
16
16
 
17
- She commands an army of specialized agents, each with their own expertise, and she's not afraid to put them to work simultaneously while she lights a cigarette and watches the crew build production-ready code.
17
+ She commands seven specialized agents, each with their own expertise, tools, and handoff chains. On top of the GitHub Copilot agent layer, Beth ships a **TypeScript core engine** with a full agentic loop: agent routing, conversation context management, tool calling, subagent spawning, and agent-to-agent handoffs—all backed by an Azure OpenAI LLM provider with streaming and retry.
18
18
 
19
- **She handles:**
20
- - Product strategy that makes competitors weep
21
- - Research that finds the real dirt
22
- - Designs so sharp they cut
23
- - Code that actually works
24
- - Security that locks the gates
25
- - Tests that find every weakness before your enemies do
19
+ **The system has four execution layers:**
20
+
21
+ | Layer | What It Does | Status |
22
+ |-------|-------------|--------|
23
+ | **Copilot Agents** | `.agent.md` definitions running in VS Code Agent Mode | Live |
24
+ | **CLI Toolchain** | `beth init`, `beth doctor`, `beth quickstart` — TypeScript commands | Live |
25
+ | **Orchestration Engine** | Fan-out routing, tool calling loop, subagent spawning, handoffs | Live |
26
+ | **Tool Abstraction** | 6 CLI tools + MCP bridge — uniform interface for all agent capabilities | Live |
27
+ | **LLM Provider** | Azure OpenAI with Entra ID auth, streaming, retry, tool calling | Live |
28
+
29
+ **814 tests.** 813 pass, 1 skip, 0 fail.
30
+
31
+ ---
32
+
33
+ ## Architecture
34
+
35
+ ```mermaid
36
+ flowchart TB
37
+ subgraph Input["Entry Points"]
38
+ Copilot["VS Code Copilot Chat"]
39
+ CLI["Beth CLI"]
40
+ end
41
+
42
+ subgraph Engine["Orchestration Engine"]
43
+ Orch["Orchestrator<br/><i>Route → LLM → Tools → Response</i>"]
44
+ end
45
+
46
+ subgraph Agents["Specialist Agents"]
47
+ Beth["@Beth"]
48
+ PM["@product-manager"]
49
+ UX["@ux-designer"]
50
+ Dev["@developer"]
51
+ Sec["@security-reviewer"]
52
+ Test["@tester"]
53
+ Res["@researcher"]
54
+ end
55
+
56
+ subgraph Capabilities["Capabilities"]
57
+ Tools["Tools<br/><i>files · terminal · search · beads</i>"]
58
+ Skills["Skills<br/><i>PRD · React · shadcn · security</i>"]
59
+ MCPs["MCP Servers<br/><i>shadcn · Playwright · Azure</i>"]
60
+ end
61
+
62
+ LLM["Azure OpenAI<br/><i>Entra ID · Streaming</i>"]
63
+
64
+ Copilot & CLI --> Orch
65
+ Orch --> Beth
66
+ Beth -->|"delegates"| PM & UX & Dev & Sec & Test & Res
67
+ Orch <-->|"chat"| LLM
68
+ Orch --> Tools & Skills & MCPs
69
+
70
+ style Beth fill:#1e3a5f,color:#fff
71
+ style Engine fill:#fff3e0
72
+ style Capabilities fill:#e3f2fd
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Tech Stack
78
+
79
+ | Category | Technology | Notes |
80
+ |----------|-----------|-------|
81
+ | **Runtime** | Node.js ≥ 18 | ES modules, built-in test runner |
82
+ | **Language** | TypeScript (strict mode) | No `any`. Zod for runtime validation |
83
+ | **Target Framework** | React 19 + Next.js App Router | Server Components, Server Actions, Suspense, streaming |
84
+ | **Styling** | Tailwind CSS + `class-variance-authority` (cva) | Utility-first with typed variants |
85
+ | **Components** | shadcn/ui | Radix primitives, copy-paste ownership |
86
+ | **LLM Provider** | Azure OpenAI via `openai` SDK | Entra ID auth (no API keys), streaming + tool calling |
87
+ | **Auth** | `@azure/identity` DefaultAzureCredential | az login, managed identity, VS Code creds |
88
+ | **Frontmatter** | `gray-matter` | Parses `.agent.md` and `SKILL.md` YAML |
89
+ | **Testing** | Node.js built-in test runner | 814 tests — unit, integration, E2E |
90
+ | **Task Tracking** | beads (`bd` CLI) | Dependency-aware issue tracking for agents |
91
+ | **Package Manager** | pnpm | Lockfile committed |
92
+
93
+ **Production dependencies:** 1 (`gray-matter`). That's it. Minimal attack surface by design.
94
+
95
+ ---
26
96
 
27
97
  ## Getting Started
28
98
 
29
- **Project scope:**
99
+ **One command:**
30
100
  ```bash
31
101
  npx beth-copilot init
32
102
  ```
@@ -39,87 +109,97 @@ beth init
39
109
 
40
110
  Then open VS Code, switch Copilot Chat to **Agent mode**, and type `@Beth`.
41
111
 
42
- For detailed setup (prerequisites, task tracking, MCP servers): [docs/INSTALLATION.md](docs/INSTALLATION.md)
112
+ **Verify everything works:**
113
+ ```bash
114
+ beth doctor # Health check: Node.js, beads, agents, skills
115
+ beth quickstart # Init + doctor + beads setup in one shot
116
+ ```
43
117
 
44
- ## The Family
118
+ For detailed setup (prerequisites, task tracking, MCP servers): [docs/INSTALLATION.md](docs/INSTALLATION.md)
45
119
 
46
- Beth doesn't work alone. She's got people—loyal, skilled, and ready to execute.
120
+ ---
47
121
 
48
- | Agent | Role | What They Do |
49
- |-------|------|--------------|
50
- | **@Beth** | The Boss | Orchestrates everything. Routes work. Takes names. |
51
- | **@product-manager** | The Strategist | WHAT to build: PRDs, user stories, priorities, success metrics. |
52
- | **@researcher** | The Intelligence | Competitive analysis, user insights, market dirt. |
53
- | **@ux-designer** | The Architect | HOW it works: component specs, design tokens, accessibility. |
54
- | **@developer** | The Builder | React/TypeScript/Next.js - UI and full-stack. Gets it done. |
55
- | **@tester** | The Enforcer | Quality assurance, accessibility, performance. Finds every crack. |
56
- | **@security-reviewer** | The Bodyguard | Enterprise security. Vulnerabilities, compliance, threat modeling. |
122
+ ## CLI Commands
57
123
 
58
- ### Product Manager vs UX Designer
124
+ | Command | What It Does |
125
+ |---------|-------------|
126
+ | `beth init` | Install agents, skills, VS Code settings, beads tracking |
127
+ | `beth init --force` | Overwrite existing files |
128
+ | `beth doctor` | Validate Node.js ≥18, beads CLI, agents frontmatter, skills directories |
129
+ | `beth quickstart` | Run init + doctor + beads init in one shot |
130
+ | `beth help` | Show all commands and options |
59
131
 
60
- | | Product Manager | UX Designer |
61
- |---|---|---|
62
- | **Focus** | WHAT to build, WHY, WHEN | HOW it looks, feels, behaves |
63
- | **Outputs** | PRDs, user stories, priorities | Component specs, design tokens, accessibility |
64
- | **Example** | "Users need date filtering" | "Date picker: variants, states, ARIA" |
132
+ **Flags:** `--force`, `--skip-backlog`, `--skip-mcp`, `--skip-beads`, `--verbose`
65
133
 
66
- ## Skills (The Weapons)
134
+ ---
67
135
 
68
- Beth's team comes equipped:
136
+ ## Agent-to-Agent (A2A) Orchestration
69
137
 
70
- | Skill | Purpose |
71
- |-------|---------|
72
- | **PRD Generation** | Write requirements docs that don't waste anyone's time |
73
- | **Framer Components** | Build custom React components with property controls |
74
- | **React/Next.js Best Practices** | Vercel-grade performance patterns |
75
- | **Web Design Guidelines** | WCAG compliance, UI review, accessibility |
76
- | **shadcn/ui** | Component library patterns, installation, and best practices |
77
- | **Security Analysis** | OWASP, threat modeling, vulnerability assessment |
138
+ Beth doesn't micromanage. She delegates to specialists over **subagent** and **handoff** channels, tracks dependencies with beads, and holds every agent accountable.
78
139
 
79
- ## How Beth Works
140
+ ### The Family
80
141
 
81
- She doesn't micromanage. She delegates to specialists and holds them accountable.
142
+ | Agent | Role | What They Do |
143
+ |-------|------|--------------|
144
+ | **@Beth** | The Boss | Orchestrates everything. Routes work. Takes names. |
145
+ | **@product-manager** | The Strategist | WHAT to build: PRDs, user stories, priorities, success metrics |
146
+ | **@researcher** | The Intelligence | Competitive analysis, user insights, market dirt |
147
+ | **@ux-designer** | The Architect | HOW it works: component specs, design tokens, accessibility |
148
+ | **@developer** | The Builder | React/TypeScript/Next.js — UI and full-stack |
149
+ | **@tester** | The Enforcer | Quality assurance, accessibility, performance |
150
+ | **@security-reviewer** | The Bodyguard | OWASP, compliance, threat modeling |
82
151
 
83
- ### Architecture
152
+ ### A2A Delegation Model
84
153
 
85
154
  ```mermaid
86
155
  flowchart TB
87
- subgraph User["👤 User"]
88
- Request[User Request]
156
+ subgraph Orchestration["Beth Orchestration Layer"]
157
+ BethCore["@Beth<br/><i>Routes work · Spawns subagents</i>"]
89
158
  end
90
159
 
91
- subgraph Orchestrator["🎯 Beth - The Orchestrator"]
92
- Beth["@Beth<br/><i>'I don't speak dipshit'</i>"]
93
- Assess[Assess Request]
94
- Plan[Plan Workflow]
95
- Route[Route to Specialists]
160
+ subgraph Specialists["Specialist Agents"]
161
+ PM["@product-manager<br/>Requirements · Priorities"]
162
+ R["@researcher<br/>User insights · Market intel"]
163
+ UX["@ux-designer<br/>Component specs · Design tokens"]
164
+ D["@developer<br/>React/TS/Next.js · Implementation"]
165
+ S["@security-reviewer<br/>Threat modeling · Vulnerabilities"]
166
+ T["@tester<br/>QA · a11y · Performance"]
96
167
  end
97
168
 
98
- subgraph Agents["🧑‍💼 Specialist Agents"]
99
- PM["@product-manager<br/>WHAT to build"]
100
- Researcher["@researcher<br/>User/Market Intel"]
101
- Designer["@ux-designer<br/>HOW it works"]
102
- Developer["@developer<br/>Implementation"]
103
- Security["@security-reviewer<br/>Protection"]
104
- Tester["@tester<br/>Quality Gate"]
105
- end
169
+ BethCore -->|"Product Strategy"| PM
170
+ BethCore -->|"User Research"| R
171
+ BethCore -->|"UX Design"| UX
172
+ BethCore -->|"Development"| D
173
+ BethCore -->|"Security Review"| S
174
+ BethCore -->|"Quality Assurance"| T
175
+
176
+ PM -.->|"subagent"| R
177
+ PM -.->|"subagent"| UX
178
+ UX -.->|"subagent"| D
179
+ D -.->|"subagent"| T
180
+ S -.->|"subagent"| D
181
+ T -.->|"subagent"| D
182
+
183
+ style BethCore fill:#1e3a5f,color:#fff
184
+ ```
106
185
 
107
- Request --> Beth
108
- Beth --> Assess --> Plan --> Route
109
-
110
- Route --> PM
111
- Route --> Researcher
112
- Route --> Designer
113
- Route --> Developer
114
- Route --> Security
115
- Route --> Tester
186
+ ### Subagent vs Handoff
116
187
 
117
- style Beth fill:#1e3a5f,color:#fff
118
- style Orchestrator fill:#f0f4f8
119
- style Agents fill:#f8f4f0
188
+ | Mechanism | Control | Use When |
189
+ |-----------|---------|----------|
190
+ | **Subagent** | Beth decides | Task can run autonomously, no human review needed |
191
+ | **Handoff** | User decides | User needs to review before proceeding |
192
+
193
+ ```typescript
194
+ // Beth spawns a specialist — autonomous execution
195
+ runSubagent({
196
+ agentName: "developer",
197
+ prompt: "Implement JWT auth flow with refresh token rotation...",
198
+ description: "Implement auth"
199
+ })
120
200
  ```
121
201
 
122
- ### The Workflow
202
+ ### Workflow: New Feature
123
203
 
124
204
  ```mermaid
125
205
  sequenceDiagram
@@ -133,125 +213,327 @@ sequenceDiagram
133
213
 
134
214
  U->>B: "Build me a feature"
135
215
  B->>B: Assess & Plan
216
+
136
217
  B->>PM: Define requirements
137
- PM-->>B: Requirements ready
218
+ PM-->>B: PRD + user stories
219
+
138
220
  B->>UX: Design the experience
139
- UX-->>B: Design specs ready
221
+ UX-->>B: Component specs + tokens
222
+
140
223
  B->>D: Implement feature
141
224
  D-->>B: Implementation complete
142
- B->>S: Security review
143
- S-->>B: Security approved
144
- B->>T: Test & verify
145
- T-->>B: Quality verified
225
+
226
+ par Parallel quality gates
227
+ B->>S: Security review
228
+ S-->>B: OWASP approved
229
+ and
230
+ B->>T: Test & verify
231
+ T-->>B: a11y + regression pass
232
+ end
233
+
146
234
  B->>U: Feature complete ✅
147
235
  ```
148
236
 
149
- **Bug Hunt?** Tester → Developer → Security → Tester
150
- **Security Audit?** Security → Developer → Tester → Security
237
+ **Bug Hunt?** Tester → Developer → Security → Tester
238
+ **Security Audit?** Security → Developer → Tester → Security sign-off
239
+
240
+ ---
241
+
242
+ ## MCP Integrations
243
+
244
+ Model Context Protocol servers extend agent capabilities. All **optional** — agents gracefully degrade without them.
245
+
246
+ | Server | Agent | Capability |
247
+ |--------|-------|-----------|
248
+ | **shadcn/ui** | Developer | Component browsing & installation |
249
+ | **Playwright** | Tester | Browser automation, E2E testing |
250
+ | **Azure** | Developer, Security | Cloud resource management |
251
+ | **Brave Search** | Researcher | Internet research |
252
+ | **DeepWiki** | All | Repository documentation lookup |
253
+
254
+ ### Quick Setup
255
+
256
+ ```bash
257
+ # Copy example config and enable what you need
258
+ cp mcp.json.example .vscode/mcp.json
259
+ ```
260
+
261
+ ```json
262
+ {
263
+ "servers": {
264
+ "shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] },
265
+ "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] },
266
+ "azure": { "command": "npx", "args": ["@azure/mcp-server"] },
267
+ "web-search": { "command": "npx", "args": ["@brave/brave-search-mcp-server"] },
268
+ "deepwiki": { "url": "https://mcp.deepwiki.com/mcp" }
269
+ }
270
+ }
271
+ ```
272
+
273
+ Full details: [docs/MCP-SETUP.md](docs/MCP-SETUP.md)
274
+
275
+ ---
276
+
277
+ ## Skills (On-Demand Knowledge)
278
+
279
+ Skills are domain-knowledge modules that agents load automatically when trigger phrases match. Each skill lives in `.github/skills/<name>/SKILL.md`.
151
280
 
152
- ### Agent Delegation
281
+ | Skill | Triggers On | Used By |
282
+ |-------|------------|---------|
283
+ | **PRD Generation** | "create a prd", "product requirements" | Product Manager |
284
+ | **Framer Components** | "framer component", "property controls" | UX Designer |
285
+ | **React/Next.js Best Practices** | React performance, Next.js patterns | Developer |
286
+ | **Web Design Guidelines** | "review my UI", "check accessibility" | UX Designer |
287
+ | **shadcn/ui** | "shadcn", "ui component" | Developer |
288
+ | **Security Analysis** | "security review", "OWASP", "threat model" | Security Reviewer |
289
+ | **Azure Operations** | Azure resource management | Developer |
290
+ | **Web Search** | Internet research via Brave | Researcher |
291
+
292
+ ---
293
+
294
+ ## Orchestration Engine (Fan-Out Pattern)
295
+
296
+ The orchestration engine is Beth's brain — the full agentic loop that processes user messages through routing, skill injection, LLM calls, tool execution, and subagent spawning.
153
297
 
154
298
  ```mermaid
155
299
  flowchart TB
156
- subgraph Beth["Beth (Orchestrator)"]
157
- BethCore["Routes all work<br/>Spawns subagents"]
158
- end
300
+ User["User Message"] --> Route["AgentRouter\n@mention · skill match · default"]
301
+ Route --> Context["ConversationContext\nBuild system prompt + history"]
302
+ Context --> Skills{"Skill triggers match?"}
303
+ Skills -->|yes| Inject["Inject skill into system prompt"]
304
+ Skills -->|no| LLM
305
+ Inject --> LLM["LLM Call\nAzure OpenAI"]
306
+ LLM --> Decision{"Response type?"}
307
+ Decision -->|text| Done["Return response"]
308
+ Decision -->|tool calls| ToolExec["Execute tools\nvia ToolRegistry"]
309
+ ToolExec --> SubCheck{"Subagent request?"}
310
+ SubCheck -->|yes| SubAgent["Spawn child loop\ndepth-limited"]
311
+ SubCheck -->|no| ToolResult["Return tool result"]
312
+ SubAgent --> ToolResult
313
+ ToolResult --> LLM
314
+ Decision -->|handoff| Handoff["HandoffManager\nContext transfer"]
315
+ Handoff --> Route
316
+
317
+ style User fill:#1e3a5f,color:#fff
318
+ style LLM fill:#e8f5e9
319
+ style ToolExec fill:#e3f2fd
320
+ style SubAgent fill:#fff3e0
321
+ ```
159
322
 
160
- subgraph PM["Product Manager"]
161
- PMCore["Requirements<br/>Priorities"]
162
- end
323
+ **Key capabilities:**
324
+ - **Agent routing** — `@mention` parsing, skill trigger matching, current-agent stickiness
325
+ - **Fan-out tool calling** — Iterative LLM → tool call → result → LLM loop (up to 25 iterations)
326
+ - **Subagent spawning** — Nested agent loops with depth limiting (default: 3 levels deep)
327
+ - **Handoff management** — Context transfer between agents with conversation summaries, ping-pong loop detection
328
+ - **Context window management** — Token-estimated truncation with tool call/result consistency repair
329
+ - **Observer callbacks** — Hook into routing decisions, LLM calls, tool executions, handoffs for logging/UI
330
+
331
+ ```typescript
332
+ // Full orchestrator usage
333
+ import { Orchestrator, createDefaultRegistry } from 'beth-copilot';
334
+
335
+ const orchestrator = new Orchestrator({
336
+ agents: loadAgents('.github/agents'),
337
+ skills: loadSkills('.github/skills'),
338
+ provider: new AzureOpenAIProvider(config),
339
+ toolRegistry: createDefaultRegistry(),
340
+ toolContext: { workingDir: process.cwd(), permissions: { ... } },
341
+ });
342
+
343
+ const result = await orchestrator.processMessage('Implement the login page');
344
+ // result.response — final text
345
+ // result.agentId — who handled it
346
+ // result.toolCallsExecuted — what tools ran
347
+ // result.subagentResults — any nested agent work
348
+ // result.injectedSkills — skills loaded for this turn
349
+ ```
163
350
 
164
- subgraph R["Researcher"]
165
- RCore["User insights<br/>Market intel"]
166
- end
351
+ ---
167
352
 
168
- subgraph UX["UX Designer"]
169
- UXCore["Component specs<br/>Design tokens"]
170
- end
353
+ ## Tool Abstraction Layer
171
354
 
172
- subgraph D["Developer"]
173
- DCore["React/TS/Next.js<br/>Implementation"]
174
- end
355
+ A uniform interface for all agent capabilities — file I/O, terminal, search, beads, subagent spawning, and MCP server tools. Tools expose OpenAI-compatible function calling schemas so the LLM can invoke them directly.
356
+
357
+ | Tool | What It Does | Key Features |
358
+ |------|-------------|-------------- |
359
+ | **readFile** | Read file contents | Line ranges, path validation, traversal guards |
360
+ | **editFile** | Atomic string replacement | Single-match enforcement, whitespace-safe |
361
+ | **search** | Ripgrep search | Node.js fallback, regex support, file filtering |
362
+ | **terminal** | Execute shell commands | `execFile('/bin/sh')` — no shell injection, timeouts |
363
+ | **beads** | Issue tracking | `bd create`, `bd close`, `bd list` via CLI wrapper |
364
+ | **subagent** | Spawn nested agents | Returns structured result for orchestrator to process |
365
+ | **MCP Bridge** | External tool servers | JSON-RPC 2.0 over stdio, JSONC config, namespaced tools |
366
+
367
+ ```typescript
368
+ import { createDefaultRegistry, ToolRegistry, loadAllMCPTools } from 'beth-copilot';
369
+
370
+ // Built-in tools
371
+ const registry = createDefaultRegistry();
372
+ // → readFile, editFile, search, terminal, beads, subagent
175
373
 
176
- subgraph S["Security"]
177
- SCore["Threat modeling<br/>Vulnerabilities"]
374
+ // Add MCP server tools
375
+ const { tools: mcpTools } = await loadAllMCPTools('.vscode/mcp.json');
376
+ for (const tool of mcpTools) {
377
+ registry.register(tool); // e.g., mcp_shadcn_listComponents
378
+ }
379
+
380
+ // Get OpenAI function calling definitions
381
+ const definitions = registry.getDefinitions();
382
+ // Pass to LLM as tools parameter
383
+ ```
384
+
385
+ ---
386
+
387
+ ## LLM Provider Layer
388
+
389
+ The TypeScript core includes a production-ready provider abstraction for running Beth outside VS Code.
390
+
391
+ ```mermaid
392
+ flowchart LR
393
+ subgraph Config["Configuration"]
394
+ Env["process.env"]
395
+ DotEnv["~/.beth/.env"]
178
396
  end
179
397
 
180
- subgraph T["Tester"]
181
- TCore["QA & a11y<br/>Performance"]
398
+ subgraph Auth["Authentication"]
399
+ Entra["Entra ID<br/><i>DefaultAzureCredential</i>"]
182
400
  end
183
401
 
184
- BethCore -->|"Product Strategy"| PMCore
185
- BethCore -->|"User Research"| RCore
186
- BethCore -->|"UX Design"| UXCore
187
- BethCore -->|"Development"| DCore
188
- BethCore -->|"Security Review"| SCore
189
- BethCore -->|"Quality Assurance"| TCore
190
-
191
- PMCore -.->|"subagent"| RCore
192
- PMCore -.->|"subagent"| UXCore
193
- UXCore -.->|"subagent"| DCore
194
- DCore -.->|"subagent"| TCore
195
- SCore -.->|"subagent"| DCore
196
- ```
402
+ subgraph Provider["Provider"]
403
+ Base["LLMProviderBase<br/><i>Abstract interface</i>"]
404
+ AzureOAI["AzureOpenAIProvider<br/><i>chat · chatStream · countTokens</i>"]
405
+ end
197
406
 
198
- ## Quick Commands
407
+ subgraph Resilience["Resilience"]
408
+ RetryMod["Exponential Backoff<br/><i>Jitter · 3 retries</i>"]
409
+ Errors["LLMError<br/><i>Typed error codes</i>"]
410
+ end
199
411
 
200
- Don't waste her time. Be direct.
412
+ subgraph Streaming["Streaming"]
413
+ Accum["StreamAccumulator<br/><i>Content + tool call assembly</i>"]
414
+ Collect["collectStream<br/><i>Full response</i>"]
415
+ Map["mapStream<br/><i>Transform chunks</i>"]
416
+ end
201
417
 
202
- ```
203
- @Beth Build me a dashboard for user analytics with real-time updates.
418
+ Env --> AzureOAI
419
+ DotEnv --> AzureOAI
420
+ Entra --> AzureOAI
421
+ Base --> AzureOAI
422
+ RetryMod --> AzureOAI
423
+ AzureOAI --> Accum
424
+ AzureOAI --> Collect
425
+ Errors --> RetryMod
204
426
  ```
205
427
 
206
- ```
207
- @Beth Security review for our authentication flow. Find the holes.
208
- ```
428
+ **Key capabilities:**
429
+ - **Entra ID auth** No API keys. Uses `DefaultAzureCredential` (az login, managed identity, VS Code creds)
430
+ - **Streaming** — `chatStream()` yields `ChatChunk` objects with incremental tool call delta assembly
431
+ - **Retry** — Exponential backoff with jitter for 429/5xx/network errors. Non-transient errors fail fast
432
+ - **Config** — `process.env` → `~/.beth/.env` precedence chain
433
+ - **193 provider tests** covering types, retry, config, streaming, and Azure client
209
434
 
210
- ```
211
- @developer Implement a drag-and-drop task board. Make it fast.
212
- ```
435
+ ---
213
436
 
214
- ```
215
- @security-reviewer OWASP top 10 assessment on our API endpoints.
216
- ```
437
+ ## TypeScript Core
217
438
 
218
- ```
219
- @tester Accessibility audit. WCAG 2.1 AA. No excuses.
220
- ```
439
+ The engine that powers everything. Parses agent and skill definitions, manages conversations, routes requests, executes tools, and provides typed APIs for the full agentic loop.
221
440
 
222
- ## The Structure
441
+ ### Project Structure
223
442
 
224
443
  ```
225
- .github/
226
- ├── agents/ # The crew
227
- ├── beth.agent.md # The boss herself
228
- ├── product-manager.agent.md
229
- │ ├── researcher.agent.md
230
- │ ├── ux-designer.agent.md
231
- │ ├── developer.agent.md # UI + full-stack
232
- ├── tester.agent.md
233
- └── security-reviewer.agent.md # Enterprise security
234
- ├── skills/ # Domain expertise
235
- │ ├── prd/
236
- │ ├── framer-components/
237
- │ ├── vercel-react-best-practices/
238
- │ ├── web-design-guidelines/
239
- └── security-analysis/ # New: security skill
240
- └── copilot-instructions.md # The rules of engagement
444
+ beth/
445
+ ├── bin/
446
+ └── cli.js # CLI entry point (init, doctor, quickstart, help)
447
+ ├── src/
448
+ │ ├── index.ts # Barrel exports (all public API)
449
+ │ ├── cli/commands/
450
+ ├── doctor.ts # System health validation
451
+ │ └── quickstart.ts # Guided setup flow
452
+ ├── core/
453
+ │ │ ├── orchestrator.ts # Agentic loop: route → LLM → tools → response
454
+ ├── router.ts # @mention routing, skill matching, agent lookup
455
+ ├── context.ts # Conversation state, token truncation, skill injection
456
+ ├── handoffs.ts # Agent-to-agent transfers, loop detection
457
+ ├── agents/
458
+ │ │ ├── types.ts # AgentDefinition, AgentFrontmatter, AgentHandoff
459
+ │ │ │ └── loader.ts # Parse .agent.md typed definitions
460
+ │ │ └── skills/
461
+ │ │ ├── types.ts # SkillDefinition, TriggerMap
462
+ │ │ └── loader.ts # Parse SKILL.md, extract triggers, match queries
463
+ │ ├── lib/
464
+ │ │ └── pathValidation.ts # Traversal/injection guards
465
+ │ ├── tools/
466
+ │ │ ├── interface.ts # Tool interface + toToolDefinition()
467
+ │ │ ├── types.ts # ToolError, ToolResult, ToolContext, ToolPermissions
468
+ │ │ ├── registry.ts # ToolRegistry: register, get, list, getDefinitions
469
+ │ │ ├── cli/
470
+ │ │ │ ├── readFile.ts # File reading with line ranges
471
+ │ │ │ ├── editFile.ts # Atomic string replacement
472
+ │ │ │ ├── search.ts # Ripgrep with Node.js fallback
473
+ │ │ │ ├── terminal.ts # Secure command execution
474
+ │ │ │ ├── beads.ts # Issue tracking via bd CLI
475
+ │ │ │ └── subagent.ts # Agent spawning interface
476
+ │ │ └── mcp/
477
+ │ │ ├── client.ts # JSON-RPC 2.0 over stdio
478
+ │ │ └── bridge.ts # JSONC config, tool namespacing
479
+ │ └── providers/
480
+ │ ├── interface.ts # LLMProviderBase abstract class
481
+ │ ├── azure.ts # AzureOpenAIProvider (Entra ID, streaming, tools)
482
+ │ ├── types.ts # 17 types: ChatMessage, ToolCall, LLMError, etc.
483
+ │ ├── retry.ts # Exponential backoff with jitter
484
+ │ ├── config.ts # Environment + dotfile config loader
485
+ │ └── streaming.ts # StreamAccumulator, collectStream, mapStream
486
+ ├── templates/
487
+ │ └── .github/
488
+ │ ├── agents/ # 7 agent definitions (.agent.md)
489
+ │ └── skills/ # 8 skill modules (SKILL.md)
490
+ └── docs/
491
+ ├── INSTALLATION.md
492
+ ├── MCP-SETUP.md
493
+ ├── CLI-ARCHITECTURE.md
494
+ └── SYSTEM-FLOW.md
241
495
  ```
242
496
 
243
- ## Her Philosophy
244
-
245
- Beth operates on a few principles:
497
+ ### Test Coverage
498
+
499
+ **814 tests** (813 pass, 1 skip, 0 fail):
500
+
501
+ | Suite | Tests | What It Covers |
502
+ |-------|-------|---------------|
503
+ | **Orchestration** | | |
504
+ | Orchestrator | 30+ | Agentic loop, tool calling, subagent spawning, iteration limits |
505
+ | AgentRouter | 30+ | @mention routing, skill matching, agent resolution |
506
+ | ConversationContext | 30+ | Token truncation, skill injection, tool call repair |
507
+ | HandoffManager | 30+ | Context transfer, depth limits, ping-pong detection |
508
+ | **Tools** | | |
509
+ | Tool interface | 20+ | Tool → ToolDefinition conversion, schema validation |
510
+ | ToolRegistry | 20+ | Register, get, list, definitions, duplicate detection |
511
+ | readFile | 30+ | Line ranges, path validation, encoding |
512
+ | editFile | 30+ | String replacement, single-match enforcement |
513
+ | search | 30+ | Ripgrep, Node.js fallback, regex, file filtering |
514
+ | terminal | 30+ | Command execution, timeouts, output capture |
515
+ | beads | 30+ | bd CLI wrapper, create/close/list/ready |
516
+ | subagent | 30+ | Spawn interface, result marking, agent validation |
517
+ | MCP client | 30+ | JSON-RPC 2.0, protocol handshake, tool listing |
518
+ | MCP bridge | 30+ | JSONC parsing, tool namespacing, error handling |
519
+ | Tool suite | 10+ | createDefaultRegistry, integration tests |
520
+ | **Providers** | | |
521
+ | Provider types | 40+ | LLMError codes, ChatMessage shapes, ToolDefinition schemas |
522
+ | Provider retry | 40+ | Exponential backoff, jitter, transient error detection |
523
+ | Provider config | 30+ | Env precedence, dotenv parsing, URL validation |
524
+ | Provider streaming | 40+ | Chunk accumulation, tool call delta assembly |
525
+ | Provider Azure | 30+ | Message mapping, response mapping, error wrapping |
526
+ | **Core & CLI** | | |
527
+ | Agent loader | 30+ | Frontmatter parsing, validation, code fence stripping, handoffs |
528
+ | Skill loader | 30+ | Trigger extraction, query matching, trigger map building |
529
+ | CLI E2E | 52 | Init/doctor pipeline, MCP template validation, help output |
530
+ | Path validation | 33 | Traversal detection, injection prevention, allowlists |
246
531
 
247
- 1. **Protect the family** — Your codebase is the ranch. She defends it.
248
- 2. **No weakness** — Tests, security, accessibility. Cover every flank.
249
- 3. **Move fast, break enemies** — Parallel execution, aggressive timelines.
250
- 4. **Loyalty earns trust** — Agents that perform get the good work.
532
+ ---
251
533
 
252
- ### IDEO Design Thinking
534
+ ## IDEO Design Thinking
253
535
 
254
- Beth follows human-centered design methodology:
536
+ Beth follows human-centered design methodology across agent workflows:
255
537
 
256
538
  ```mermaid
257
539
  flowchart LR
@@ -277,35 +559,38 @@ flowchart LR
277
559
 
278
560
  E --> D --> I --> P --> T
279
561
  T -.->|iterate| E
280
- T -.->|iterate| D
281
562
  T -.->|iterate| I
282
563
  ```
283
564
 
565
+ ---
566
+
284
567
  ## Quality Standards
285
568
 
286
569
  Beth doesn't ship garbage:
287
570
 
288
- - **Accessibility**: WCAG 2.1 AA minimum. Everyone uses the product.
289
- - **Performance**: Core Web Vitals green. LCP < 2.5s. No exceptions.
290
- - **Security**: OWASP compliant. Regular audits. Zero tolerance for vulnerabilities.
291
- - **Type Safety**: Full TypeScript coverage. No `any` unless you want a lecture.
292
- - **Test Coverage**: Unit, integration, E2E. If it's not tested, it's not done.
571
+ | Standard | Gate | Enforced By |
572
+ |----------|------|-------------|
573
+ | **WCAG 2.1 AA** | Accessibility compliance | UX Designer + Tester |
574
+ | **Core Web Vitals** | LCP < 2.5s, FID < 100ms, CLS < 0.1 | Developer |
575
+ | **OWASP Top 10** | Zero known vulnerabilities | Security Reviewer |
576
+ | **TypeScript Strict** | No `any` | Developer |
577
+ | **Test Coverage** | Unit + Integration + E2E | Tester |
293
578
 
294
579
  ```mermaid
295
580
  flowchart TB
296
581
  subgraph Standards["Quality Standards"]
297
- A11y["WCAG 2.1 AA<br/>Accessibility"]
298
- Perf["Core Web Vitals<br/>LCP < 2.5s"]
299
- Sec["OWASP Compliant<br/>Zero vulnerabilities"]
300
- Type["Full TypeScript<br/>No any"]
301
- Coverage["Test Coverage<br/>Unit + Integration + E2E"]
582
+ A11y["WCAG 2.1 AA"]
583
+ Perf["Core Web Vitals"]
584
+ Sec["OWASP Compliant"]
585
+ Type["Full TypeScript"]
586
+ Coverage["Test Coverage"]
302
587
  end
303
588
 
304
589
  subgraph Gates["Enforcement"]
305
- Designer["UX Designer<br/>reviews a11y specs"]
306
- Developer["Developer<br/>implements patterns"]
307
- Security["Security Reviewer<br/>audits code"]
308
- Tester["Tester<br/>verifies all gates"]
590
+ Designer["UX Designer"]
591
+ Developer["Developer"]
592
+ Security["Security Reviewer"]
593
+ Tester["Tester"]
309
594
  end
310
595
 
311
596
  A11y --> Designer
@@ -324,13 +609,41 @@ flowchart TB
324
609
  Fix --> Gates
325
610
  ```
326
611
 
612
+ ---
613
+
614
+ ## Quick Commands
615
+
616
+ Don't waste her time. Be direct.
617
+
618
+ ```
619
+ @Beth Build me a dashboard for user analytics with real-time updates.
620
+ ```
621
+
622
+ ```
623
+ @Beth Security review for our authentication flow. Find the holes.
624
+ ```
625
+
626
+ ```
627
+ @developer Implement a drag-and-drop task board. Make it fast.
628
+ ```
629
+
630
+ ```
631
+ @security-reviewer OWASP top 10 assessment on our API endpoints.
632
+ ```
633
+
634
+ ```
635
+ @tester Accessibility audit. WCAG 2.1 AA. No excuses.
636
+ ```
637
+
638
+ ---
639
+
327
640
  ## Why Beth?
328
641
 
329
642
  <p align="center">
330
643
  <img src="assets/beth-questioning.png" alt="Beth" width="500">
331
644
  </p>
332
645
 
333
- Look, you *could* try to coordinate seven specialists yourself. You could context-switch between product strategy, security reviews, and accessibility audits while keeping your sanity intact.
646
+ Look, you *could* try to coordinate seven specialists yourself. You could context-switch between product strategy, security reviews, and accessibility audits while keeping your sanity intact.
334
647
 
335
648
  Or you could let Beth handle it.
336
649
 
@@ -344,30 +657,60 @@ Is it magic? No. It's just competence with very good hair.
344
657
 
345
658
  ## Requirements
346
659
 
347
- - VS Code with GitHub Copilot extension
348
- - GitHub Copilot Chat enabled
349
- - The spine to actually ship something
660
+ - **Node.js** 18
661
+ - **VS Code** with GitHub Copilot extension
662
+ - **GitHub Copilot Chat** in Agent mode
663
+ - [**beads**](https://github.com/steveyegge/beads) for task tracking (`bd` CLI)
350
664
 
351
- ### Optional: MCP Servers
665
+ ### Installing Beads
352
666
 
353
- Beth's agents work fine without them, but these make them smarter:
667
+ ```bash
668
+ curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
669
+ ```
354
670
 
355
- | Server | What It Does | Setup |
356
- |--------|--------------|-------|
357
- | **shadcn/ui** | Component browsing & installation | `npx shadcn@latest mcp init --client vscode` |
358
- | **Playwright** | Browser automation for testing | See [MCP Setup Guide](docs/MCP-SETUP.md) |
359
- | **Azure** | Cloud resource management | See [MCP Setup Guide](docs/MCP-SETUP.md) |
360
- | **Web Search** | Internet research | See [MCP Setup Guide](docs/MCP-SETUP.md) |
671
+ **CGO Troubleshooting (Linux/WSL):** Beads uses Dolt (a Git-for-data database) which requires CGO. If `bd init` or `bd doctor` fails with CGO-related errors:
361
672
 
362
- Full details: [docs/MCP-SETUP.md](docs/MCP-SETUP.md)
673
+ ```bash
674
+ # Install C compiler toolchain (required for CGO)
675
+ sudo apt-get update && sudo apt-get install -y build-essential gcc
676
+
677
+ # Verify CGO is available
678
+ export CGO_ENABLED=1
679
+ go env CGO_ENABLED # should print 1
680
+
681
+ # Re-install beads
682
+ curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
683
+ ```
684
+
685
+ **Common beads issues:**
686
+ - `bd: command not found` — Add `~/.local/bin` to your PATH: `export PATH="$HOME/.local/bin:$PATH"`
687
+ - `bd doctor` warnings about metadata — Run `bd doctor --fix` to auto-repair
688
+ - Dolt migration errors — Delete `.beads/` and re-initialize with `bd init`
689
+
690
+ ```bash
691
+ # Verify beads is working
692
+ bd doctor
693
+ ```
694
+
695
+ ### Optional: MCP Servers
696
+
697
+ See [MCP Integrations](#mcp-integrations) above or [docs/MCP-SETUP.md](docs/MCP-SETUP.md) for setup.
698
+
699
+ ---
363
700
 
364
701
  ## Documentation
365
702
 
366
- - [Installation Guide](docs/INSTALLATION.md) Full setup instructions
367
- - [MCP Setup](docs/MCP-SETUP.md) — Optional server integrations
368
- - [System Flow & Diagrams](docs/SYSTEM-FLOW.md) Architecture and agent orchestration diagrams
369
- - [Changelog](CHANGELOG.md) Version history and updates
370
- - [Security Policy](SECURITY.md) Vulnerability reporting
703
+ | Doc | Purpose |
704
+ |-----|---------|
705
+ | [Installation Guide](docs/INSTALLATION.md) | Full setup: prerequisites, VS Code config, beads |
706
+ | [MCP Setup](docs/MCP-SETUP.md) | Optional server integrations |
707
+ | [CLI Architecture](docs/CLI-ARCHITECTURE.md) | Dual-interface design, implementation phases |
708
+ | [System Flow](docs/SYSTEM-FLOW.md) | Agent orchestration diagrams |
709
+ | [Contributing Guide](CONTRIBUTING.md) | How to contribute (PR process, review checklist) |
710
+ | [Changelog](CHANGELOG.md) | Version history |
711
+ | [Security Policy](SECURITY.md) | Vulnerability reporting |
712
+
713
+ ---
371
714
 
372
715
  ## License
373
716