beth-copilot 1.0.11 → 1.0.13

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 (80) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +181 -32
  3. package/bin/cli.js +49 -192
  4. package/dist/cli/commands/doctor.d.ts +25 -0
  5. package/dist/cli/commands/doctor.d.ts.map +1 -0
  6. package/dist/cli/commands/doctor.js +238 -0
  7. package/dist/cli/commands/doctor.js.map +1 -0
  8. package/dist/cli/commands/doctor.test.d.ts +6 -0
  9. package/dist/cli/commands/doctor.test.d.ts.map +1 -0
  10. package/dist/cli/commands/doctor.test.js +137 -0
  11. package/dist/cli/commands/doctor.test.js.map +1 -0
  12. package/dist/cli/commands/index.d.ts +7 -0
  13. package/dist/cli/commands/index.d.ts.map +1 -0
  14. package/dist/cli/commands/index.js +10 -0
  15. package/dist/cli/commands/index.js.map +1 -0
  16. package/dist/cli/commands/quickstart.d.ts +18 -0
  17. package/dist/cli/commands/quickstart.d.ts.map +1 -0
  18. package/dist/cli/commands/quickstart.js +141 -0
  19. package/dist/cli/commands/quickstart.js.map +1 -0
  20. package/dist/core/agents/index.d.ts +6 -0
  21. package/dist/core/agents/index.d.ts.map +1 -0
  22. package/dist/core/agents/index.js +6 -0
  23. package/dist/core/agents/index.js.map +1 -0
  24. package/dist/core/agents/loader.d.ts +49 -0
  25. package/dist/core/agents/loader.d.ts.map +1 -0
  26. package/dist/core/agents/loader.js +217 -0
  27. package/dist/core/agents/loader.js.map +1 -0
  28. package/dist/core/agents/loader.test.d.ts +7 -0
  29. package/dist/core/agents/loader.test.d.ts.map +1 -0
  30. package/dist/core/agents/loader.test.js +144 -0
  31. package/dist/core/agents/loader.test.js.map +1 -0
  32. package/dist/core/agents/types.d.ts +77 -0
  33. package/dist/core/agents/types.d.ts.map +1 -0
  34. package/dist/core/agents/types.js +8 -0
  35. package/dist/core/agents/types.js.map +1 -0
  36. package/dist/core/agents/types.test.d.ts +6 -0
  37. package/dist/core/agents/types.test.d.ts.map +1 -0
  38. package/dist/core/agents/types.test.js +254 -0
  39. package/dist/core/agents/types.test.js.map +1 -0
  40. package/dist/core/skills/index.d.ts +6 -0
  41. package/dist/core/skills/index.d.ts.map +1 -0
  42. package/dist/core/skills/index.js +6 -0
  43. package/dist/core/skills/index.js.map +1 -0
  44. package/dist/core/skills/loader.d.ts +69 -0
  45. package/dist/core/skills/loader.d.ts.map +1 -0
  46. package/dist/core/skills/loader.js +243 -0
  47. package/dist/core/skills/loader.js.map +1 -0
  48. package/dist/core/skills/loader.test.d.ts +7 -0
  49. package/dist/core/skills/loader.test.d.ts.map +1 -0
  50. package/dist/core/skills/loader.test.js +184 -0
  51. package/dist/core/skills/loader.test.js.map +1 -0
  52. package/dist/core/skills/types.d.ts +58 -0
  53. package/dist/core/skills/types.d.ts.map +1 -0
  54. package/dist/core/skills/types.js +8 -0
  55. package/dist/core/skills/types.js.map +1 -0
  56. package/dist/index.d.ts +10 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +14 -0
  59. package/dist/index.js.map +1 -0
  60. package/dist/lib/index.d.ts +7 -0
  61. package/dist/lib/index.d.ts.map +1 -0
  62. package/dist/lib/index.js +7 -0
  63. package/dist/lib/index.js.map +1 -0
  64. package/dist/lib/pathValidation.d.ts +69 -0
  65. package/dist/lib/pathValidation.d.ts.map +1 -0
  66. package/dist/lib/pathValidation.js +185 -0
  67. package/dist/lib/pathValidation.js.map +1 -0
  68. package/dist/lib/pathValidation.test.d.ts +9 -0
  69. package/dist/lib/pathValidation.test.d.ts.map +1 -0
  70. package/dist/lib/pathValidation.test.js +195 -0
  71. package/dist/lib/pathValidation.test.js.map +1 -0
  72. package/package.json +17 -4
  73. package/sbom.json +7 -7
  74. package/templates/.github/agents/developer.agent.md +9 -0
  75. package/templates/.github/agents/product-manager.agent.md +9 -0
  76. package/templates/.github/agents/researcher.agent.md +9 -0
  77. package/templates/.github/agents/security-reviewer.agent.md +9 -2
  78. package/templates/.github/agents/tester.agent.md +9 -0
  79. package/templates/.github/agents/ux-designer.agent.md +9 -0
  80. package/templates/.github/copilot-instructions.md +3 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,170 @@
1
+ # Changelog
2
+
3
+ > *"Here's what changed. I don't repeat myself."*
4
+
5
+ All notable changes to Beth are documented here. Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ---
8
+
9
+ ## [1.0.13] - 2026-02-04
10
+
11
+ ### Fixed
12
+ - **ENOTDIR crash during init** — Fixed `copyDirRecursive` crashing when destination path exists as a file instead of a directory. Now properly detects the conflict and provides a clear error message (or removes the file with `--force`).
13
+
14
+ ---
15
+
16
+ ## [Unreleased]
17
+
18
+ ### Added
19
+ - **CLI TypeScript foundation** — Migrated CLI to TypeScript with proper build system
20
+ - **Doctor command** — `beth doctor` validates installation and configuration
21
+ - **Quickstart command** — `beth quickstart` for guided setup
22
+ - **Agent schema types** — TypeScript types for agent definitions
23
+ - **Unit tests** — 86 tests passing for CLI commands and path validation
24
+ - **Architecture diagrams** — Interactive mermaid diagrams with zoom in README
25
+
26
+ ### Changed
27
+ - **DEMO.md** — Rewritten with Beth's personality and beads integration
28
+ - **P2 backlog completed** — Beth orchestrator references added to all agents, MCP skills updated, documentation fixes
29
+
30
+ ### Fixed
31
+ - Removed unnecessary backlog.md CLI dependency
32
+ - Fixed security-reviewer.agent.md syntax errors
33
+ - Corrected agent/skill counts in help output
34
+ - Allowlisted security documentation examples in Gitleaks config
35
+
36
+ ### Documentation
37
+ - CLI Architecture guide (docs/CLI-ARCHITECTURE.md)
38
+ - CLI Implementation Plan (docs/CLI-IMPLEMENTATION-PLAN.md)
39
+
40
+ ---
41
+
42
+ ## [1.0.12] - 2026-02-01
43
+
44
+ ### Changed
45
+ - Added CHANGELOG.md to npm package
46
+
47
+ ---
48
+
49
+ ## [1.0.11] - 2026-02-01
50
+
51
+ ### Changed
52
+ - Reverted to fire animation for BETH banner (the way it should be)
53
+
54
+ ### Fixed
55
+ - SBOM regeneration for accurate dependency tracking
56
+
57
+ ---
58
+
59
+ ## [1.0.10] - 2026-01-31
60
+
61
+ ### Added
62
+ - **Path validation security** — 33 tests covering traversal detection, injection prevention, and allowlist validation
63
+ - **Work tracking for all agents** — Every agent now uses the dual tracking system (beads for agents, Backlog.md for humans)
64
+ - **Cross-platform npm installation** — Consistent installation across macOS, Linux, and Windows
65
+
66
+ ### Security
67
+ - Path validation for user-supplied binary paths to prevent command injection
68
+ - Documented shell:true security constraints in SECURITY.md
69
+
70
+ ---
71
+
72
+ ## [1.0.6] - 2026-01-29
73
+
74
+ ### Added
75
+ - **Multi-agent coordination system** — Epic patterns with dependencies, parallel execution, and hierarchical issue tracking
76
+ - **Beads integration** — Structured work tracking with `bd` CLI for agent memory and coordination
77
+ - **Subagent templates** — Ready-to-use patterns for spawning specialists
78
+
79
+ ### Changed
80
+ - Beth instructions now include full orchestration workflows
81
+ - Updated SYSTEM-FLOW.md with multi-agent patterns
82
+
83
+ ---
84
+
85
+ ## [1.0.5] - 2026-01-28
86
+
87
+ ### Added
88
+ - Beads multi-agent coordination documentation
89
+
90
+ ---
91
+
92
+ ## [1.0.4] - 2026-01-27
93
+
94
+ ### Added
95
+ - **backlog.md CLI installation prompt** — Auto-prompts during init for human-readable tracking
96
+ - **.vscode/settings.json template** — Auto-configured agent settings for VS Code
97
+
98
+ ---
99
+
100
+ ## [1.0.3] - 2026-01-26
101
+
102
+ ### Added
103
+ - **Version check** — CLI warns users when a newer version is available
104
+
105
+ ---
106
+
107
+ ## [1.0.2] - 2026-01-25
108
+
109
+ ### Added
110
+ - **Security automation** — GitHub Actions workflow with npm audit, gitleaks, CodeQL, SBOM generation
111
+ - **Pre-commit hooks** — Secret scanning with gitleaks before commits
112
+ - **Subagent delegation settings** — Documentation for enabling autonomous agent coordination
113
+
114
+ ### Changed
115
+ - Clarified Product Manager vs UX Designer roles in documentation
116
+
117
+ ### Fixed
118
+ - Security hardening for enterprise production readiness
119
+
120
+ ---
121
+
122
+ ## [1.0.1] - 2026-01-24
123
+
124
+ ### Added
125
+ - **Security Reviewer agent** — OWASP Top 10, compliance audits, threat modeling
126
+ - **Security Analysis skill** — Vulnerability assessment workflows
127
+ - **MCP setup guide** — docs/MCP-SETUP.md with all optional servers
128
+ - **Installation guide** — docs/INSTALLATION.md with full setup instructions
129
+ - **Dependabot configuration** — Weekly npm/GH Actions updates with grouped PRs
130
+
131
+ ### Changed
132
+ - **Consolidated frontend-engineer into developer** — Developer now handles UI, full-stack, and shadcn-ui MCP integration
133
+ - Updated all agent handoffs to include security-reviewer
134
+
135
+ ### Security
136
+ - Full enterprise security review completed
137
+ - HIGH findings addressed
138
+ - SECURITY.md created with security policies
139
+
140
+ ---
141
+
142
+ ## [1.0.0] - 2026-01-23
143
+
144
+ ### Added
145
+ - **Beth orchestrator** — The ruthless, hyper-competent AI coordinator
146
+ - **Six specialist agents** — Product Manager, Researcher, UX Designer, Developer, Tester, (later Security Reviewer)
147
+ - **Five skills** — PRD generation, Framer components, Vercel React best practices, Web Design guidelines, shadcn-ui
148
+ - **npm package** — `npx beth-copilot init` for one-command installation
149
+ - **IDEO Design Thinking workflow** — Empathize → Define → Ideate → Prototype → Test
150
+ - **Dual tracking system** — beads for agents, Backlog.md for humans
151
+ - **ASCII art animation** — Beth's entrance with fire effect banner
152
+
153
+ ### Architecture
154
+ - Agent definition format with YAML frontmatter
155
+ - Skills as domain-knowledge modules loaded on-demand
156
+ - Subagent vs handoff patterns for different control levels
157
+ - Hierarchical issue tracking for complex workflows
158
+
159
+ ---
160
+
161
+ ## What's Next
162
+
163
+ See [Backlog.md](Backlog.md) for planned work:
164
+ - MCP skill enhancements (web search, Playwright, Azure, Microsoft Learn)
165
+ - Agent consistency review
166
+ - Additional skills for API security and performance profiling
167
+
168
+ ---
169
+
170
+ *"That's the history. Now stop looking backward and let's build something."*
package/README.md CHANGED
@@ -73,50 +73,126 @@ Beth's team comes equipped:
73
73
  | **Framer Components** | Build custom React components with property controls |
74
74
  | **React/Next.js Best Practices** | Vercel-grade performance patterns |
75
75
  | **Web Design Guidelines** | WCAG compliance, UI review, accessibility |
76
+ | **shadcn/ui** | Component library patterns, installation, and best practices |
76
77
  | **Security Analysis** | OWASP, threat modeling, vulnerability assessment |
77
78
 
78
79
  ## How Beth Works
79
80
 
80
81
  She doesn't micromanage. She delegates to specialists and holds them accountable.
81
82
 
82
- ```
83
- Your Request
84
-
85
-
86
- ┌─────────────────────────────────────────┐
87
- │ @Beth │
88
- │ "I don't need permission to be me." │
89
- │ │
90
- │ • Analyzes your request │
91
- │ • Picks the right people │
92
- │ • Runs parallel ops when smart │
93
- │ • Delivers results, not excuses │
94
- └─────────────────────────────────────────┘
95
-
96
- ├──▶ @product-manager (strategy)
97
- ├──▶ @researcher (intelligence)
98
- ├──▶ @ux-designer (design)
99
- ├──▶ @developer (implementation)
100
- ├──▶ @tester (quality gate)
101
- └──▶ @security-reviewer (protection)
83
+ ### Architecture
84
+
85
+ ```mermaid
86
+ flowchart TB
87
+ subgraph User["👤 User"]
88
+ Request[User Request]
89
+ end
90
+
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]
96
+ end
97
+
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
106
+
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
116
+
117
+ style Beth fill:#1e3a5f,color:#fff
118
+ style Orchestrator fill:#f0f4f8
119
+ style Agents fill:#f8f4f0
102
120
  ```
103
121
 
104
122
  ### The Workflow
105
123
 
106
- **New Feature?**
107
- ```
108
- Request Product (requirements) → Research (validation) → Design (interface)
109
- Developer (build) → Security (review) → Tester (QA)
110
- ```
111
-
112
- **Bug Hunt?**
113
- ```
114
- Report Tester (reproduce) → Developer (fix) → Security (verify) → Tester (confirm)
124
+ ```mermaid
125
+ sequenceDiagram
126
+ participant U as User
127
+ participant B as Beth
128
+ participant PM as Product Manager
129
+ participant UX as UX Designer
130
+ participant D as Developer
131
+ participant S as Security
132
+ participant T as Tester
133
+
134
+ U->>B: "Build me a feature"
135
+ B->>B: Assess & Plan
136
+ B->>PM: Define requirements
137
+ PM-->>B: Requirements ready
138
+ B->>UX: Design the experience
139
+ UX-->>B: Design specs ready
140
+ B->>D: Implement feature
141
+ D-->>B: Implementation complete
142
+ B->>S: Security review
143
+ S-->>B: Security approved
144
+ B->>T: Test & verify
145
+ T-->>B: Quality verified
146
+ B->>U: Feature complete ✅
115
147
  ```
116
148
 
117
- **Security Audit?**
118
- ```
119
- Concern → Security (threat model) → Developer (remediation) → Tester (penetration)
149
+ **Bug Hunt?** Tester → Developer → Security → Tester
150
+ **Security Audit?** Security → Developer → Tester → Security
151
+
152
+ ### Agent Delegation
153
+
154
+ ```mermaid
155
+ flowchart TB
156
+ subgraph Beth["Beth (Orchestrator)"]
157
+ BethCore["Routes all work<br/>Spawns subagents"]
158
+ end
159
+
160
+ subgraph PM["Product Manager"]
161
+ PMCore["Requirements<br/>Priorities"]
162
+ end
163
+
164
+ subgraph R["Researcher"]
165
+ RCore["User insights<br/>Market intel"]
166
+ end
167
+
168
+ subgraph UX["UX Designer"]
169
+ UXCore["Component specs<br/>Design tokens"]
170
+ end
171
+
172
+ subgraph D["Developer"]
173
+ DCore["React/TS/Next.js<br/>Implementation"]
174
+ end
175
+
176
+ subgraph S["Security"]
177
+ SCore["Threat modeling<br/>Vulnerabilities"]
178
+ end
179
+
180
+ subgraph T["Tester"]
181
+ TCore["QA & a11y<br/>Performance"]
182
+ end
183
+
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
120
196
  ```
121
197
 
122
198
  ## Quick Commands
@@ -173,6 +249,38 @@ Beth operates on a few principles:
173
249
  3. **Move fast, break enemies** — Parallel execution, aggressive timelines.
174
250
  4. **Loyalty earns trust** — Agents that perform get the good work.
175
251
 
252
+ ### IDEO Design Thinking
253
+
254
+ Beth follows human-centered design methodology:
255
+
256
+ ```mermaid
257
+ flowchart LR
258
+ subgraph Empathize["1. Empathize"]
259
+ E["@researcher<br/>User interviews<br/>Pain points"]
260
+ end
261
+
262
+ subgraph Define["2. Define"]
263
+ D["@product-manager<br/>Problem framing<br/>Requirements"]
264
+ end
265
+
266
+ subgraph Ideate["3. Ideate"]
267
+ I["@ux-designer<br/>Component specs<br/>Patterns"]
268
+ end
269
+
270
+ subgraph Prototype["4. Prototype"]
271
+ P["@developer<br/>Build to learn<br/>Feature spikes"]
272
+ end
273
+
274
+ subgraph Test["5. Test"]
275
+ T["@tester<br/>Validate<br/>Accessibility"]
276
+ end
277
+
278
+ E --> D --> I --> P --> T
279
+ T -.->|iterate| E
280
+ T -.->|iterate| D
281
+ T -.->|iterate| I
282
+ ```
283
+
176
284
  ## Quality Standards
177
285
 
178
286
  Beth doesn't ship garbage:
@@ -183,6 +291,39 @@ Beth doesn't ship garbage:
183
291
  - **Type Safety**: Full TypeScript coverage. No `any` unless you want a lecture.
184
292
  - **Test Coverage**: Unit, integration, E2E. If it's not tested, it's not done.
185
293
 
294
+ ```mermaid
295
+ flowchart TB
296
+ 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"]
302
+ end
303
+
304
+ 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"]
309
+ end
310
+
311
+ A11y --> Designer
312
+ Perf --> Developer
313
+ Sec --> Security
314
+ Type --> Developer
315
+ Coverage --> Tester
316
+
317
+ Designer --> Ship{Ship?}
318
+ Developer --> Ship
319
+ Security --> Ship
320
+ Tester --> Ship
321
+
322
+ Ship -->|All Pass| Deploy["🚀 Deploy"]
323
+ Ship -->|Fail| Fix["🔧 Fix & Retry"]
324
+ Fix --> Gates
325
+ ```
326
+
186
327
  ## Why Beth?
187
328
 
188
329
  <p align="center">
@@ -220,6 +361,14 @@ Beth's agents work fine without them, but these make them smarter:
220
361
 
221
362
  Full details: [docs/MCP-SETUP.md](docs/MCP-SETUP.md)
222
363
 
364
+ ## Documentation
365
+
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
371
+
223
372
  ## License
224
373
 
225
374
  MIT — Take it. Run it. Build empires.