beth-copilot 1.0.13 → 1.0.15
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.
- package/CHANGELOG.md +195 -170
- package/README.md +408 -185
- package/bin/cli.js +65 -4
- package/dist/cli/commands/doctor.e2e.test.d.ts +8 -0
- package/dist/cli/commands/doctor.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/doctor.e2e.test.js +428 -0
- package/dist/cli/commands/doctor.e2e.test.js.map +1 -0
- package/dist/cli/commands/doctor.test.js +1 -1
- package/dist/cli/commands/help.e2e.test.d.ts +9 -0
- package/dist/cli/commands/help.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/help.e2e.test.js +150 -0
- package/dist/cli/commands/help.e2e.test.js.map +1 -0
- package/dist/cli/commands/init.test.d.ts +6 -0
- package/dist/cli/commands/init.test.d.ts.map +1 -0
- package/dist/cli/commands/init.test.js +289 -0
- package/dist/cli/commands/init.test.js.map +1 -0
- package/dist/cli/commands/mcp.e2e.test.d.ts +9 -0
- package/dist/cli/commands/mcp.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/mcp.e2e.test.js +139 -0
- package/dist/cli/commands/mcp.e2e.test.js.map +1 -0
- package/dist/cli/commands/pipeline.e2e.test.d.ts +9 -0
- package/dist/cli/commands/pipeline.e2e.test.d.ts.map +1 -0
- package/dist/cli/commands/pipeline.e2e.test.js +192 -0
- package/dist/cli/commands/pipeline.e2e.test.js.map +1 -0
- package/dist/cli/commands/quickstart.test.d.ts +6 -0
- package/dist/cli/commands/quickstart.test.d.ts.map +1 -0
- package/dist/cli/commands/quickstart.test.js +232 -0
- package/dist/cli/commands/quickstart.test.js.map +1 -0
- package/dist/core/agents/frontmatter.test.d.ts +8 -0
- package/dist/core/agents/frontmatter.test.d.ts.map +1 -0
- package/dist/core/agents/frontmatter.test.js +589 -0
- package/dist/core/agents/frontmatter.test.js.map +1 -0
- package/dist/core/agents/handoffs.test.d.ts +8 -0
- package/dist/core/agents/handoffs.test.d.ts.map +1 -0
- package/dist/core/agents/handoffs.test.js +320 -0
- package/dist/core/agents/handoffs.test.js.map +1 -0
- package/dist/core/agents/loader.test.js +1 -1
- package/dist/core/agents/suite.test.d.ts +8 -0
- package/dist/core/agents/suite.test.d.ts.map +1 -0
- package/dist/core/agents/suite.test.js +207 -0
- package/dist/core/agents/suite.test.js.map +1 -0
- package/dist/core/agents/tools.test.d.ts +8 -0
- package/dist/core/agents/tools.test.d.ts.map +1 -0
- package/dist/core/agents/tools.test.js +332 -0
- package/dist/core/agents/tools.test.js.map +1 -0
- package/dist/init.test.js +288 -0
- package/dist/providers/azure.d.ts +147 -0
- package/dist/providers/azure.d.ts.map +1 -0
- package/dist/providers/azure.js +491 -0
- package/dist/providers/azure.js.map +1 -0
- package/dist/providers/azure.test.d.ts +11 -0
- package/dist/providers/azure.test.d.ts.map +1 -0
- package/dist/providers/azure.test.js +330 -0
- package/dist/providers/azure.test.js.map +1 -0
- package/dist/providers/config.d.ts +87 -0
- package/dist/providers/config.d.ts.map +1 -0
- package/dist/providers/config.js +193 -0
- package/dist/providers/config.js.map +1 -0
- package/dist/providers/config.test.d.ts +7 -0
- package/dist/providers/config.test.d.ts.map +1 -0
- package/dist/providers/config.test.js +370 -0
- package/dist/providers/config.test.js.map +1 -0
- package/dist/providers/index.d.ts +18 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +14 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/interface.d.ts +191 -0
- package/dist/providers/interface.d.ts.map +1 -0
- package/dist/providers/interface.js +94 -0
- package/dist/providers/interface.js.map +1 -0
- package/dist/providers/retry.d.ts +128 -0
- package/dist/providers/retry.d.ts.map +1 -0
- package/dist/providers/retry.js +205 -0
- package/dist/providers/retry.js.map +1 -0
- package/dist/providers/retry.test.d.ts +7 -0
- package/dist/providers/retry.test.d.ts.map +1 -0
- package/dist/providers/retry.test.js +439 -0
- package/dist/providers/retry.test.js.map +1 -0
- package/dist/providers/streaming.d.ts +157 -0
- package/dist/providers/streaming.d.ts.map +1 -0
- package/dist/providers/streaming.js +233 -0
- package/dist/providers/streaming.js.map +1 -0
- package/dist/providers/streaming.test.d.ts +7 -0
- package/dist/providers/streaming.test.d.ts.map +1 -0
- package/dist/providers/streaming.test.js +372 -0
- package/dist/providers/streaming.test.js.map +1 -0
- package/dist/providers/types.d.ts +209 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +53 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/types.test.d.ts +7 -0
- package/dist/providers/types.test.d.ts.map +1 -0
- package/dist/providers/types.test.js +141 -0
- package/dist/providers/types.test.js.map +1 -0
- package/package.json +60 -56
- package/sbom.json +3302 -8
- package/templates/.github/agents/beth.agent.md +329 -329
- package/templates/.github/agents/developer.agent.md +572 -572
- package/templates/.github/agents/product-manager.agent.md +272 -272
- package/templates/.github/agents/researcher.agent.md +338 -338
- package/templates/.github/agents/security-reviewer.agent.md +465 -465
- package/templates/.github/agents/tester.agent.md +496 -496
- package/templates/.github/agents/ux-designer.agent.md +393 -393
- package/templates/mcp.json.example +4 -0
package/README.md
CHANGED
|
@@ -12,21 +12,131 @@ They broke her wings once. They forgot she had claws.
|
|
|
12
12
|
|
|
13
13
|
## What Is This?
|
|
14
14
|
|
|
15
|
-
Beth is a
|
|
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
|
|
17
|
+
She commands seven specialized agents, each with their own expertise, tools, and handoff chains. On top of the GitHub Copilot agent layer, Beth now ships a **TypeScript core engine** with parsed agent/skill schemas, an Azure OpenAI LLM provider, streaming tool-call support, and a CLI that validates your entire installation in one command.
|
|
18
18
|
|
|
19
|
-
**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
**The system has three 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 with 485 tests | Live |
|
|
25
|
+
| **LLM Provider** | Azure OpenAI with Entra ID auth, streaming, retry, tool calling | Live |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Architecture
|
|
30
|
+
|
|
31
|
+
```mermaid
|
|
32
|
+
flowchart TB
|
|
33
|
+
subgraph UI["User Interfaces"]
|
|
34
|
+
Copilot["VS Code Copilot Chat<br/><i>Agent Mode</i>"]
|
|
35
|
+
CLI["Beth CLI<br/><i>init · doctor · quickstart</i>"]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
subgraph Core["Beth Core Engine — TypeScript"]
|
|
39
|
+
AgentLoader["Agent Loader<br/><i>Parse .agent.md frontmatter</i>"]
|
|
40
|
+
SkillLoader["Skill Loader<br/><i>Parse SKILL.md + triggers</i>"]
|
|
41
|
+
Types["Agent & Skill Types<br/><i>Typed schemas</i>"]
|
|
42
|
+
PathVal["Path Validation<br/><i>Traversal/injection guard</i>"]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
subgraph Agents["Specialist Agents (A2A)"]
|
|
46
|
+
Beth["@Beth<br/><i>Orchestrator</i>"]
|
|
47
|
+
PM["@product-manager"]
|
|
48
|
+
Researcher["@researcher"]
|
|
49
|
+
Designer["@ux-designer"]
|
|
50
|
+
Developer["@developer"]
|
|
51
|
+
Security["@security-reviewer"]
|
|
52
|
+
Tester["@tester"]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
subgraph Skills["Skills — On-Demand Knowledge"]
|
|
56
|
+
PRD["PRD Generation"]
|
|
57
|
+
Framer["Framer Components"]
|
|
58
|
+
React["React/Next.js<br/>Best Practices"]
|
|
59
|
+
WebDesign["Web Design<br/>Guidelines"]
|
|
60
|
+
Shadcn["shadcn/ui"]
|
|
61
|
+
SecAnalysis["Security Analysis"]
|
|
62
|
+
AzureOps["Azure Operations"]
|
|
63
|
+
WebSearch["Web Search"]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
subgraph MCP["MCP Servers — Optional"]
|
|
67
|
+
MCPShadcn["shadcn/ui"]
|
|
68
|
+
MCPPlaywright["Playwright"]
|
|
69
|
+
MCPAzure["Azure"]
|
|
70
|
+
MCPBrave["Brave Search"]
|
|
71
|
+
MCPDeepWiki["DeepWiki"]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
subgraph Provider["LLM Provider Layer"]
|
|
75
|
+
Interface["LLMProviderBase<br/><i>Abstract interface</i>"]
|
|
76
|
+
Azure["AzureOpenAIProvider<br/><i>Entra ID · Streaming</i>"]
|
|
77
|
+
Retry["Retry + Backoff<br/><i>Exponential w/ jitter</i>"]
|
|
78
|
+
Stream["StreamAccumulator<br/><i>Tool call assembly</i>"]
|
|
79
|
+
Config["Config Loader<br/><i>env → ~/.beth/.env</i>"]
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
subgraph Tracking["Work Tracking"]
|
|
83
|
+
Beads["beads (bd CLI)<br/><i>Agent coordination</i>"]
|
|
84
|
+
Backlog["Backlog.md<br/><i>Human changelog</i>"]
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
Copilot --> Beth
|
|
88
|
+
CLI --> Core
|
|
89
|
+
Core --> Agents
|
|
90
|
+
Beth -->|"routes"| PM & Researcher & Designer & Developer & Security & Tester
|
|
91
|
+
|
|
92
|
+
PM -.->|"loads"| PRD
|
|
93
|
+
Designer -.->|"loads"| Framer & WebDesign
|
|
94
|
+
Developer -.->|"loads"| React & Shadcn
|
|
95
|
+
Security -.->|"loads"| SecAnalysis
|
|
96
|
+
Researcher -.->|"loads"| WebSearch
|
|
97
|
+
Developer -.->|"uses"| MCPShadcn
|
|
98
|
+
Tester -.->|"uses"| MCPPlaywright
|
|
99
|
+
Security -.->|"uses"| MCPAzure
|
|
100
|
+
Researcher -.->|"uses"| MCPBrave
|
|
101
|
+
|
|
102
|
+
Azure --> Interface
|
|
103
|
+
Retry --> Azure
|
|
104
|
+
Stream --> Azure
|
|
105
|
+
Config --> Azure
|
|
106
|
+
|
|
107
|
+
Beth -.->|"tracks"| Beads
|
|
108
|
+
Beth -.->|"updates"| Backlog
|
|
109
|
+
|
|
110
|
+
style Beth fill:#1e3a5f,color:#fff
|
|
111
|
+
style Core fill:#f0f4f8
|
|
112
|
+
style Provider fill:#e8f5e9
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Tech Stack
|
|
118
|
+
|
|
119
|
+
| Category | Technology | Notes |
|
|
120
|
+
|----------|-----------|-------|
|
|
121
|
+
| **Runtime** | Node.js ≥ 18 | ES modules, built-in test runner |
|
|
122
|
+
| **Language** | TypeScript (strict mode) | No `any`. Zod for runtime validation |
|
|
123
|
+
| **Target Framework** | React 19 + Next.js App Router | Server Components, Server Actions, Suspense, streaming |
|
|
124
|
+
| **Styling** | Tailwind CSS + `class-variance-authority` (cva) | Utility-first with typed variants |
|
|
125
|
+
| **Components** | shadcn/ui | Radix primitives, copy-paste ownership |
|
|
126
|
+
| **LLM Provider** | Azure OpenAI via `openai` SDK | Entra ID auth (no API keys), streaming + tool calling |
|
|
127
|
+
| **Auth** | `@azure/identity` DefaultAzureCredential | az login, managed identity, VS Code creds |
|
|
128
|
+
| **Frontmatter** | `gray-matter` | Parses `.agent.md` and `SKILL.md` YAML |
|
|
129
|
+
| **Testing** | Node.js built-in test runner | 485 tests — unit, integration, E2E |
|
|
130
|
+
| **Task Tracking** | beads (`bd` CLI) | Dependency-aware issue tracking for agents |
|
|
131
|
+
| **Package Manager** | pnpm | Lockfile committed |
|
|
132
|
+
|
|
133
|
+
**Production dependencies:** 1 (`gray-matter`). That's it. Minimal attack surface by design.
|
|
134
|
+
|
|
135
|
+
---
|
|
26
136
|
|
|
27
137
|
## Getting Started
|
|
28
138
|
|
|
29
|
-
**
|
|
139
|
+
**One command:**
|
|
30
140
|
```bash
|
|
31
141
|
npx beth-copilot init
|
|
32
142
|
```
|
|
@@ -39,87 +149,97 @@ beth init
|
|
|
39
149
|
|
|
40
150
|
Then open VS Code, switch Copilot Chat to **Agent mode**, and type `@Beth`.
|
|
41
151
|
|
|
42
|
-
|
|
152
|
+
**Verify everything works:**
|
|
153
|
+
```bash
|
|
154
|
+
beth doctor # Health check: Node.js, beads, agents, skills
|
|
155
|
+
beth quickstart # Init + doctor + beads setup in one shot
|
|
156
|
+
```
|
|
43
157
|
|
|
44
|
-
|
|
158
|
+
For detailed setup (prerequisites, task tracking, MCP servers): [docs/INSTALLATION.md](docs/INSTALLATION.md)
|
|
45
159
|
|
|
46
|
-
|
|
160
|
+
---
|
|
47
161
|
|
|
48
|
-
|
|
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. |
|
|
162
|
+
## CLI Commands
|
|
57
163
|
|
|
58
|
-
|
|
164
|
+
| Command | What It Does |
|
|
165
|
+
|---------|-------------|
|
|
166
|
+
| `beth init` | Install agents, skills, VS Code settings, beads tracking |
|
|
167
|
+
| `beth init --force` | Overwrite existing files |
|
|
168
|
+
| `beth doctor` | Validate Node.js ≥18, beads CLI, agents frontmatter, skills directories |
|
|
169
|
+
| `beth quickstart` | Run init + doctor + beads init in one shot |
|
|
170
|
+
| `beth help` | Show all commands and options |
|
|
59
171
|
|
|
60
|
-
|
|
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" |
|
|
172
|
+
**Flags:** `--force`, `--skip-backlog`, `--skip-mcp`, `--skip-beads`, `--verbose`
|
|
65
173
|
|
|
66
|
-
|
|
174
|
+
---
|
|
67
175
|
|
|
68
|
-
|
|
176
|
+
## Agent-to-Agent (A2A) Orchestration
|
|
69
177
|
|
|
70
|
-
|
|
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 |
|
|
178
|
+
Beth doesn't micromanage. She delegates to specialists over **subagent** and **handoff** channels, tracks dependencies with beads, and holds every agent accountable.
|
|
78
179
|
|
|
79
|
-
|
|
180
|
+
### The Family
|
|
80
181
|
|
|
81
|
-
|
|
182
|
+
| Agent | Role | What They Do |
|
|
183
|
+
|-------|------|--------------|
|
|
184
|
+
| **@Beth** | The Boss | Orchestrates everything. Routes work. Takes names. |
|
|
185
|
+
| **@product-manager** | The Strategist | WHAT to build: PRDs, user stories, priorities, success metrics |
|
|
186
|
+
| **@researcher** | The Intelligence | Competitive analysis, user insights, market dirt |
|
|
187
|
+
| **@ux-designer** | The Architect | HOW it works: component specs, design tokens, accessibility |
|
|
188
|
+
| **@developer** | The Builder | React/TypeScript/Next.js — UI and full-stack |
|
|
189
|
+
| **@tester** | The Enforcer | Quality assurance, accessibility, performance |
|
|
190
|
+
| **@security-reviewer** | The Bodyguard | OWASP, compliance, threat modeling |
|
|
82
191
|
|
|
83
|
-
###
|
|
192
|
+
### A2A Delegation Model
|
|
84
193
|
|
|
85
194
|
```mermaid
|
|
86
195
|
flowchart TB
|
|
87
|
-
subgraph
|
|
88
|
-
|
|
196
|
+
subgraph Orchestration["Beth Orchestration Layer"]
|
|
197
|
+
BethCore["@Beth<br/><i>Routes work · Spawns subagents</i>"]
|
|
89
198
|
end
|
|
90
199
|
|
|
91
|
-
subgraph
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
200
|
+
subgraph Specialists["Specialist Agents"]
|
|
201
|
+
PM["@product-manager<br/>Requirements · Priorities"]
|
|
202
|
+
R["@researcher<br/>User insights · Market intel"]
|
|
203
|
+
UX["@ux-designer<br/>Component specs · Design tokens"]
|
|
204
|
+
D["@developer<br/>React/TS/Next.js · Implementation"]
|
|
205
|
+
S["@security-reviewer<br/>Threat modeling · Vulnerabilities"]
|
|
206
|
+
T["@tester<br/>QA · a11y · Performance"]
|
|
96
207
|
end
|
|
97
208
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
209
|
+
BethCore -->|"Product Strategy"| PM
|
|
210
|
+
BethCore -->|"User Research"| R
|
|
211
|
+
BethCore -->|"UX Design"| UX
|
|
212
|
+
BethCore -->|"Development"| D
|
|
213
|
+
BethCore -->|"Security Review"| S
|
|
214
|
+
BethCore -->|"Quality Assurance"| T
|
|
215
|
+
|
|
216
|
+
PM -.->|"subagent"| R
|
|
217
|
+
PM -.->|"subagent"| UX
|
|
218
|
+
UX -.->|"subagent"| D
|
|
219
|
+
D -.->|"subagent"| T
|
|
220
|
+
S -.->|"subagent"| D
|
|
221
|
+
T -.->|"subagent"| D
|
|
222
|
+
|
|
223
|
+
style BethCore fill:#1e3a5f,color:#fff
|
|
224
|
+
```
|
|
106
225
|
|
|
107
|
-
|
|
108
|
-
Beth --> Assess --> Plan --> Route
|
|
109
|
-
|
|
110
|
-
Route --> PM
|
|
111
|
-
Route --> Researcher
|
|
112
|
-
Route --> Designer
|
|
113
|
-
Route --> Developer
|
|
114
|
-
Route --> Security
|
|
115
|
-
Route --> Tester
|
|
226
|
+
### Subagent vs Handoff
|
|
116
227
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
228
|
+
| Mechanism | Control | Use When |
|
|
229
|
+
|-----------|---------|----------|
|
|
230
|
+
| **Subagent** | Beth decides | Task can run autonomously, no human review needed |
|
|
231
|
+
| **Handoff** | User decides | User needs to review before proceeding |
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
// Beth spawns a specialist — autonomous execution
|
|
235
|
+
runSubagent({
|
|
236
|
+
agentName: "developer",
|
|
237
|
+
prompt: "Implement JWT auth flow with refresh token rotation...",
|
|
238
|
+
description: "Implement auth"
|
|
239
|
+
})
|
|
120
240
|
```
|
|
121
241
|
|
|
122
|
-
###
|
|
242
|
+
### Workflow: New Feature
|
|
123
243
|
|
|
124
244
|
```mermaid
|
|
125
245
|
sequenceDiagram
|
|
@@ -133,125 +253,197 @@ sequenceDiagram
|
|
|
133
253
|
|
|
134
254
|
U->>B: "Build me a feature"
|
|
135
255
|
B->>B: Assess & Plan
|
|
256
|
+
|
|
136
257
|
B->>PM: Define requirements
|
|
137
|
-
PM-->>B:
|
|
258
|
+
PM-->>B: PRD + user stories
|
|
259
|
+
|
|
138
260
|
B->>UX: Design the experience
|
|
139
|
-
UX-->>B:
|
|
261
|
+
UX-->>B: Component specs + tokens
|
|
262
|
+
|
|
140
263
|
B->>D: Implement feature
|
|
141
264
|
D-->>B: Implementation complete
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
265
|
+
|
|
266
|
+
par Parallel quality gates
|
|
267
|
+
B->>S: Security review
|
|
268
|
+
S-->>B: OWASP approved
|
|
269
|
+
and
|
|
270
|
+
B->>T: Test & verify
|
|
271
|
+
T-->>B: a11y + regression pass
|
|
272
|
+
end
|
|
273
|
+
|
|
146
274
|
B->>U: Feature complete ✅
|
|
147
275
|
```
|
|
148
276
|
|
|
149
|
-
**Bug Hunt?** Tester → Developer → Security → Tester
|
|
150
|
-
**Security Audit?** Security → Developer → Tester → Security
|
|
277
|
+
**Bug Hunt?** Tester → Developer → Security → Tester
|
|
278
|
+
**Security Audit?** Security → Developer → Tester → Security sign-off
|
|
151
279
|
|
|
152
|
-
|
|
280
|
+
---
|
|
153
281
|
|
|
154
|
-
|
|
155
|
-
flowchart TB
|
|
156
|
-
subgraph Beth["Beth (Orchestrator)"]
|
|
157
|
-
BethCore["Routes all work<br/>Spawns subagents"]
|
|
158
|
-
end
|
|
282
|
+
## MCP Integrations
|
|
159
283
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
284
|
+
Model Context Protocol servers extend agent capabilities. All **optional** — agents gracefully degrade without them.
|
|
285
|
+
|
|
286
|
+
| Server | Agent | Capability |
|
|
287
|
+
|--------|-------|-----------|
|
|
288
|
+
| **shadcn/ui** | Developer | Component browsing & installation |
|
|
289
|
+
| **Playwright** | Tester | Browser automation, E2E testing |
|
|
290
|
+
| **Azure** | Developer, Security | Cloud resource management |
|
|
291
|
+
| **Brave Search** | Researcher | Internet research |
|
|
292
|
+
| **DeepWiki** | All | Repository documentation lookup |
|
|
293
|
+
|
|
294
|
+
### Quick Setup
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Copy example config and enable what you need
|
|
298
|
+
cp mcp.json.example .vscode/mcp.json
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
```json
|
|
302
|
+
{
|
|
303
|
+
"servers": {
|
|
304
|
+
"shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] },
|
|
305
|
+
"playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] },
|
|
306
|
+
"azure": { "command": "npx", "args": ["@azure/mcp-server"] },
|
|
307
|
+
"web-search": { "command": "npx", "args": ["@brave/brave-search-mcp-server"] },
|
|
308
|
+
"deepwiki": { "url": "https://mcp.deepwiki.com/mcp" }
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Full details: [docs/MCP-SETUP.md](docs/MCP-SETUP.md)
|
|
163
314
|
|
|
164
|
-
|
|
165
|
-
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Skills (On-Demand Knowledge)
|
|
318
|
+
|
|
319
|
+
Skills are domain-knowledge modules that agents load automatically when trigger phrases match. Each skill lives in `.github/skills/<name>/SKILL.md`.
|
|
320
|
+
|
|
321
|
+
| Skill | Triggers On | Used By |
|
|
322
|
+
|-------|------------|---------|
|
|
323
|
+
| **PRD Generation** | "create a prd", "product requirements" | Product Manager |
|
|
324
|
+
| **Framer Components** | "framer component", "property controls" | UX Designer |
|
|
325
|
+
| **React/Next.js Best Practices** | React performance, Next.js patterns | Developer |
|
|
326
|
+
| **Web Design Guidelines** | "review my UI", "check accessibility" | UX Designer |
|
|
327
|
+
| **shadcn/ui** | "shadcn", "ui component" | Developer |
|
|
328
|
+
| **Security Analysis** | "security review", "OWASP", "threat model" | Security Reviewer |
|
|
329
|
+
| **Azure Operations** | Azure resource management | Developer |
|
|
330
|
+
| **Web Search** | Internet research via Brave | Researcher |
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## LLM Provider Layer
|
|
335
|
+
|
|
336
|
+
The TypeScript core includes a production-ready provider abstraction for running Beth outside VS Code.
|
|
337
|
+
|
|
338
|
+
```mermaid
|
|
339
|
+
flowchart LR
|
|
340
|
+
subgraph Config["Configuration"]
|
|
341
|
+
Env["process.env"]
|
|
342
|
+
DotEnv["~/.beth/.env"]
|
|
166
343
|
end
|
|
167
344
|
|
|
168
|
-
subgraph
|
|
169
|
-
|
|
345
|
+
subgraph Auth["Authentication"]
|
|
346
|
+
Entra["Entra ID<br/><i>DefaultAzureCredential</i>"]
|
|
170
347
|
end
|
|
171
348
|
|
|
172
|
-
subgraph
|
|
173
|
-
|
|
349
|
+
subgraph Provider["Provider"]
|
|
350
|
+
Base["LLMProviderBase<br/><i>Abstract interface</i>"]
|
|
351
|
+
AzureOAI["AzureOpenAIProvider<br/><i>chat · chatStream · countTokens</i>"]
|
|
174
352
|
end
|
|
175
353
|
|
|
176
|
-
subgraph
|
|
177
|
-
|
|
354
|
+
subgraph Resilience["Resilience"]
|
|
355
|
+
RetryMod["Exponential Backoff<br/><i>Jitter · 3 retries</i>"]
|
|
356
|
+
Errors["LLMError<br/><i>Typed error codes</i>"]
|
|
178
357
|
end
|
|
179
358
|
|
|
180
|
-
subgraph
|
|
181
|
-
|
|
359
|
+
subgraph Streaming["Streaming"]
|
|
360
|
+
Accum["StreamAccumulator<br/><i>Content + tool call assembly</i>"]
|
|
361
|
+
Collect["collectStream<br/><i>Full response</i>"]
|
|
362
|
+
Map["mapStream<br/><i>Transform chunks</i>"]
|
|
182
363
|
end
|
|
183
364
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
PMCore -.->|"subagent"| UXCore
|
|
193
|
-
UXCore -.->|"subagent"| DCore
|
|
194
|
-
DCore -.->|"subagent"| TCore
|
|
195
|
-
SCore -.->|"subagent"| DCore
|
|
365
|
+
Env --> AzureOAI
|
|
366
|
+
DotEnv --> AzureOAI
|
|
367
|
+
Entra --> AzureOAI
|
|
368
|
+
Base --> AzureOAI
|
|
369
|
+
RetryMod --> AzureOAI
|
|
370
|
+
AzureOAI --> Accum
|
|
371
|
+
AzureOAI --> Collect
|
|
372
|
+
Errors --> RetryMod
|
|
196
373
|
```
|
|
197
374
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
375
|
+
**Key capabilities:**
|
|
376
|
+
- **Entra ID auth** — No API keys. Uses `DefaultAzureCredential` (az login, managed identity, VS Code creds)
|
|
377
|
+
- **Streaming** — `chatStream()` yields `ChatChunk` objects with incremental tool call delta assembly
|
|
378
|
+
- **Retry** — Exponential backoff with jitter for 429/5xx/network errors. Non-transient errors fail fast
|
|
379
|
+
- **Config** — `process.env` → `~/.beth/.env` precedence chain
|
|
380
|
+
- **193 provider tests** covering types, retry, config, streaming, and Azure client
|
|
201
381
|
|
|
202
|
-
|
|
203
|
-
@Beth Build me a dashboard for user analytics with real-time updates.
|
|
204
|
-
```
|
|
382
|
+
---
|
|
205
383
|
|
|
206
|
-
|
|
207
|
-
@Beth Security review for our authentication flow. Find the holes.
|
|
208
|
-
```
|
|
384
|
+
## TypeScript Core
|
|
209
385
|
|
|
210
|
-
|
|
211
|
-
@developer Implement a drag-and-drop task board. Make it fast.
|
|
212
|
-
```
|
|
386
|
+
The engine that powers everything. Parses agent and skill definitions, validates configuration, and provides typed APIs.
|
|
213
387
|
|
|
214
|
-
|
|
215
|
-
@security-reviewer OWASP top 10 assessment on our API endpoints.
|
|
216
|
-
```
|
|
388
|
+
### Project Structure
|
|
217
389
|
|
|
218
390
|
```
|
|
219
|
-
|
|
391
|
+
beth/
|
|
392
|
+
├── bin/
|
|
393
|
+
│ └── cli.js # CLI entry point (init, doctor, quickstart, help)
|
|
394
|
+
├── src/
|
|
395
|
+
│ ├── index.ts # Barrel exports
|
|
396
|
+
│ ├── cli/commands/
|
|
397
|
+
│ │ ├── doctor.ts # System health validation
|
|
398
|
+
│ │ └── quickstart.ts # Guided setup flow
|
|
399
|
+
│ ├── core/
|
|
400
|
+
│ │ ├── agents/
|
|
401
|
+
│ │ │ ├── types.ts # AgentDefinition, AgentFrontmatter, AgentHandoff
|
|
402
|
+
│ │ │ └── loader.ts # Parse .agent.md → typed definitions
|
|
403
|
+
│ │ └── skills/
|
|
404
|
+
│ │ ├── types.ts # SkillDefinition, TriggerMap
|
|
405
|
+
│ │ └── loader.ts # Parse SKILL.md, extract triggers, match queries
|
|
406
|
+
│ ├── lib/
|
|
407
|
+
│ │ └── pathValidation.ts # Traversal/injection guards
|
|
408
|
+
│ └── providers/
|
|
409
|
+
│ ├── interface.ts # LLMProviderBase abstract class
|
|
410
|
+
│ ├── azure.ts # AzureOpenAIProvider (Entra ID, streaming, tools)
|
|
411
|
+
│ ├── types.ts # 17 types: ChatMessage, ToolCall, LLMError, etc.
|
|
412
|
+
│ ├── retry.ts # Exponential backoff with jitter
|
|
413
|
+
│ ├── config.ts # Environment + dotfile config loader
|
|
414
|
+
│ └── streaming.ts # StreamAccumulator, collectStream, mapStream
|
|
415
|
+
├── templates/
|
|
416
|
+
│ └── .github/
|
|
417
|
+
│ ├── agents/ # 7 agent definitions (.agent.md)
|
|
418
|
+
│ └── skills/ # 8 skill modules (SKILL.md)
|
|
419
|
+
└── docs/
|
|
420
|
+
├── INSTALLATION.md
|
|
421
|
+
├── MCP-SETUP.md
|
|
422
|
+
├── CLI-ARCHITECTURE.md
|
|
423
|
+
└── SYSTEM-FLOW.md
|
|
220
424
|
```
|
|
221
425
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
```
|
|
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
|
|
241
|
-
```
|
|
426
|
+
### Test Coverage
|
|
242
427
|
|
|
243
|
-
|
|
428
|
+
**485 tests** (484 pass, 1 skip, 0 fail):
|
|
244
429
|
|
|
245
|
-
|
|
430
|
+
| Suite | Tests | What It Covers |
|
|
431
|
+
|-------|-------|---------------|
|
|
432
|
+
| Agent loader | 30+ | Frontmatter parsing, validation, code fence stripping, handoffs |
|
|
433
|
+
| Skill loader | 30+ | Trigger extraction, query matching, trigger map building |
|
|
434
|
+
| Provider types | 40+ | LLMError codes, ChatMessage shapes, ToolDefinition schemas |
|
|
435
|
+
| Provider retry | 40+ | Exponential backoff, jitter, transient error detection |
|
|
436
|
+
| Provider config | 30+ | Env precedence, dotenv parsing, URL validation |
|
|
437
|
+
| Provider streaming | 40+ | Chunk accumulation, tool call delta assembly |
|
|
438
|
+
| Provider Azure | 30+ | Message mapping, response mapping, error wrapping |
|
|
439
|
+
| CLI E2E | 52 | Init/doctor pipeline, MCP template validation, help output |
|
|
440
|
+
| Path validation | 33 | Traversal detection, injection prevention, allowlists |
|
|
246
441
|
|
|
247
|
-
|
|
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.
|
|
442
|
+
---
|
|
251
443
|
|
|
252
|
-
|
|
444
|
+
## IDEO Design Thinking
|
|
253
445
|
|
|
254
|
-
Beth follows human-centered design methodology:
|
|
446
|
+
Beth follows human-centered design methodology across agent workflows:
|
|
255
447
|
|
|
256
448
|
```mermaid
|
|
257
449
|
flowchart LR
|
|
@@ -277,35 +469,38 @@ flowchart LR
|
|
|
277
469
|
|
|
278
470
|
E --> D --> I --> P --> T
|
|
279
471
|
T -.->|iterate| E
|
|
280
|
-
T -.->|iterate| D
|
|
281
472
|
T -.->|iterate| I
|
|
282
473
|
```
|
|
283
474
|
|
|
475
|
+
---
|
|
476
|
+
|
|
284
477
|
## Quality Standards
|
|
285
478
|
|
|
286
479
|
Beth doesn't ship garbage:
|
|
287
480
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
481
|
+
| Standard | Gate | Enforced By |
|
|
482
|
+
|----------|------|-------------|
|
|
483
|
+
| **WCAG 2.1 AA** | Accessibility compliance | UX Designer + Tester |
|
|
484
|
+
| **Core Web Vitals** | LCP < 2.5s, FID < 100ms, CLS < 0.1 | Developer |
|
|
485
|
+
| **OWASP Top 10** | Zero known vulnerabilities | Security Reviewer |
|
|
486
|
+
| **TypeScript Strict** | No `any` | Developer |
|
|
487
|
+
| **Test Coverage** | Unit + Integration + E2E | Tester |
|
|
293
488
|
|
|
294
489
|
```mermaid
|
|
295
490
|
flowchart TB
|
|
296
491
|
subgraph Standards["Quality Standards"]
|
|
297
|
-
A11y["WCAG 2.1 AA
|
|
298
|
-
Perf["Core Web Vitals
|
|
299
|
-
Sec["OWASP Compliant
|
|
300
|
-
Type["Full TypeScript
|
|
301
|
-
Coverage["Test Coverage
|
|
492
|
+
A11y["WCAG 2.1 AA"]
|
|
493
|
+
Perf["Core Web Vitals"]
|
|
494
|
+
Sec["OWASP Compliant"]
|
|
495
|
+
Type["Full TypeScript"]
|
|
496
|
+
Coverage["Test Coverage"]
|
|
302
497
|
end
|
|
303
498
|
|
|
304
499
|
subgraph Gates["Enforcement"]
|
|
305
|
-
Designer["UX Designer
|
|
306
|
-
Developer["Developer
|
|
307
|
-
Security["Security Reviewer
|
|
308
|
-
Tester["Tester
|
|
500
|
+
Designer["UX Designer"]
|
|
501
|
+
Developer["Developer"]
|
|
502
|
+
Security["Security Reviewer"]
|
|
503
|
+
Tester["Tester"]
|
|
309
504
|
end
|
|
310
505
|
|
|
311
506
|
A11y --> Designer
|
|
@@ -324,13 +519,41 @@ flowchart TB
|
|
|
324
519
|
Fix --> Gates
|
|
325
520
|
```
|
|
326
521
|
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## Quick Commands
|
|
525
|
+
|
|
526
|
+
Don't waste her time. Be direct.
|
|
527
|
+
|
|
528
|
+
```
|
|
529
|
+
@Beth Build me a dashboard for user analytics with real-time updates.
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
```
|
|
533
|
+
@Beth Security review for our authentication flow. Find the holes.
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
```
|
|
537
|
+
@developer Implement a drag-and-drop task board. Make it fast.
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
```
|
|
541
|
+
@security-reviewer OWASP top 10 assessment on our API endpoints.
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
```
|
|
545
|
+
@tester Accessibility audit. WCAG 2.1 AA. No excuses.
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
327
550
|
## Why Beth?
|
|
328
551
|
|
|
329
552
|
<p align="center">
|
|
330
553
|
<img src="assets/beth-questioning.png" alt="Beth" width="500">
|
|
331
554
|
</p>
|
|
332
555
|
|
|
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.
|
|
556
|
+
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
557
|
|
|
335
558
|
Or you could let Beth handle it.
|
|
336
559
|
|
|
@@ -344,30 +567,30 @@ Is it magic? No. It's just competence with very good hair.
|
|
|
344
567
|
|
|
345
568
|
## Requirements
|
|
346
569
|
|
|
347
|
-
-
|
|
348
|
-
- GitHub Copilot
|
|
349
|
-
-
|
|
570
|
+
- **Node.js** ≥ 18
|
|
571
|
+
- **VS Code** with GitHub Copilot extension
|
|
572
|
+
- **GitHub Copilot Chat** in Agent mode
|
|
573
|
+
- [**beads**](https://github.com/steveyegge/beads) for task tracking (`bd` CLI)
|
|
350
574
|
|
|
351
575
|
### Optional: MCP Servers
|
|
352
576
|
|
|
353
|
-
|
|
354
|
-
|
|
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) |
|
|
577
|
+
See [MCP Integrations](#mcp-integrations) above or [docs/MCP-SETUP.md](docs/MCP-SETUP.md) for setup.
|
|
361
578
|
|
|
362
|
-
|
|
579
|
+
---
|
|
363
580
|
|
|
364
581
|
## Documentation
|
|
365
582
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
583
|
+
| Doc | Purpose |
|
|
584
|
+
|-----|---------|
|
|
585
|
+
| [Installation Guide](docs/INSTALLATION.md) | Full setup: prerequisites, VS Code config, beads |
|
|
586
|
+
| [MCP Setup](docs/MCP-SETUP.md) | Optional server integrations |
|
|
587
|
+
| [CLI Architecture](docs/CLI-ARCHITECTURE.md) | Dual-interface design, implementation phases |
|
|
588
|
+
| [System Flow](docs/SYSTEM-FLOW.md) | Agent orchestration diagrams |
|
|
589
|
+
| [Contributing Guide](CONTRIBUTING.md) | How to contribute (PR process, review checklist) |
|
|
590
|
+
| [Changelog](CHANGELOG.md) | Version history |
|
|
591
|
+
| [Security Policy](SECURITY.md) | Vulnerability reporting |
|
|
592
|
+
|
|
593
|
+
---
|
|
371
594
|
|
|
372
595
|
## License
|
|
373
596
|
|