@muggleai/works 2.0.2 → 3.1.0

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 (43) hide show
  1. package/README.md +276 -241
  2. package/dist/{chunk-O6JAG3WQ.js → chunk-YPRFUVHP.js} +1 -1
  3. package/dist/cli.js +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/plugin/.claude-plugin/plugin.json +20 -0
  6. package/dist/plugin/.cursor-plugin/plugin.json +21 -0
  7. package/dist/plugin/.mcp.json +12 -0
  8. package/dist/plugin/README.md +53 -0
  9. package/dist/plugin/hooks/hooks.json +14 -0
  10. package/dist/plugin/scripts/ensure-electron-app.sh +12 -0
  11. package/dist/plugin/skills/do/SKILL.md +49 -0
  12. package/dist/plugin/skills/do/impact-analysis.md +34 -0
  13. package/dist/plugin/skills/do/open-prs.md +52 -0
  14. package/dist/plugin/skills/do/qa.md +89 -0
  15. package/dist/plugin/skills/do/requirements.md +33 -0
  16. package/dist/plugin/skills/do/unit-tests.md +31 -0
  17. package/dist/plugin/skills/do/validate-code.md +30 -0
  18. package/dist/plugin/skills/repair/SKILL.md +23 -0
  19. package/dist/plugin/skills/status/SKILL.md +30 -0
  20. package/dist/plugin/skills/test-feature-local/SKILL.md +91 -0
  21. package/dist/plugin/skills/upgrade/SKILL.md +21 -0
  22. package/package.json +10 -6
  23. package/plugin/.claude-plugin/plugin.json +20 -0
  24. package/plugin/.cursor-plugin/plugin.json +21 -0
  25. package/plugin/.mcp.json +12 -0
  26. package/plugin/README.md +53 -0
  27. package/plugin/hooks/hooks.json +14 -0
  28. package/plugin/scripts/ensure-electron-app.sh +12 -0
  29. package/plugin/skills/do/SKILL.md +49 -0
  30. package/plugin/skills/do/impact-analysis.md +34 -0
  31. package/plugin/skills/do/open-prs.md +52 -0
  32. package/plugin/skills/do/qa.md +89 -0
  33. package/plugin/skills/do/requirements.md +33 -0
  34. package/plugin/skills/do/unit-tests.md +31 -0
  35. package/plugin/skills/do/validate-code.md +30 -0
  36. package/plugin/skills/repair/SKILL.md +23 -0
  37. package/plugin/skills/status/SKILL.md +30 -0
  38. package/plugin/skills/test-feature-local/SKILL.md +91 -0
  39. package/plugin/skills/upgrade/SKILL.md +21 -0
  40. package/scripts/postinstall.mjs +0 -267
  41. package/skills-dist/muggle-do.md +0 -589
  42. package/skills-dist/publish-test-to-cloud.md +0 -43
  43. package/skills-dist/test-feature-local.md +0 -344
package/README.md CHANGED
@@ -1,37 +1,27 @@
1
- # muggle-ai-works
1
+ # *muggle-ai-works*
2
2
 
3
- **Ship quality products, not just code.** AI-powered QA that validates your app's user experience — from Claude Code and Cursor to PR.
3
+ **Ship quality products with AI-powered QA that validates your app's user experience — from Claude Code and Cursor to PR.**
4
4
 
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![npm](https://img.shields.io/npm/v/@muggleai/works)]()
7
- [![MCP Tools](https://img.shields.io/badge/MCP_tools-70+-green)]()
8
- [![Node](https://img.shields.io/badge/node-22+-orange)]()
5
+ One install gives your AI coding assistant the power to vision-based QA your app like a real user would: clicking through flows, catching broken experiences, and reporting results with screenshots and evidence.
9
6
 
10
- One install gives your AI coding assistant the ability to QA your app like a real user would — clicking through flows, catching broken experiences, and opening PRs with results.
7
+ *[License: MIT](LICENSE)
8
+ [npm]()
9
+ [MCP Tools]()
10
+ [Node*]()
11
11
 
12
- Part of the **Muggle AI** open-source ecosystem:
13
-
14
- | Package | Purpose | Install |
15
- |---------|---------|---------|
16
- | **muggle-ai-works** (this repo) | QA testing MCP server + autonomous dev pipeline | `npm install @muggleai/works` |
17
- | **[muggle-ai-teams](https://github.com/multiplex-ai/muggle-ai-teams)** | Agent orchestration, workflow, skills, rules | `npm install @muggleai/teams` |
18
-
19
- muggle-ai-works handles *QA verification* (test generation, browser replay, cloud results). muggle-ai-teams handles *how work gets done* (design → implement → review → deliver). Together, they form a complete AI-assisted development workflow with built-in quality assurance.
12
+ *Powered by [MuggleTest](https://www.muggletest.com) — the [AI-powered QA testing platform](https://www.muggletest.com).*
20
13
 
21
14
  ---
22
15
 
23
- ## How Is This Different?
16
+ ## Why muggle-ai-works?
17
+
18
+ Your AI assistant writes code fast. But does the feature actually work? Does the login flow break on mobile? Does the checkout still render after that refactor?
24
19
 
25
- Most AI coding tools help you *write* code. muggle-ai-works helps you *test* it automatically, using AI-driven browser automation.
20
+ muggle-ai-works closes the gap between "code complete" and "actually works."
26
21
 
27
- | | **muggle-ai-works** | **Playwright MCP** | **Manual QA** |
28
- |---|---|---|---|
29
- | **Test creation** | Natural language test cases | Write code manually | Write test plans manually |
30
- | **Test execution** | AI-driven browser (Electron app) | Scripted browser automation | Human clicks through flows |
31
- | **Localhost testing** | Built-in URL rewriting | Manual config | Manual |
32
- | **Cloud sync** | Automatic (projects, cases, scripts, results) | None | Spreadsheets |
33
- | **Integration** | MCP tools for any AI assistant | Playwright API | None |
34
- | **Learning curve** | Describe what to test in English | Learn Playwright API | Train QA team |
22
+ - **Catch UX regressions before your users do** — AI drives a real browser against your localhost across desktop and mobile resolutions, clicks through flows like a user would, and reports failures with step-by-step screenshots. No Playwright scripts to maintain.
23
+ - **Go from requirement to merged PR in one command** — `/muggle:do` handles the full cycle: code the feature, run unit tests, QA the app in a real browser at multiple viewports, triage failures, and open a PR with evidence attached.
24
+ - **70+ MCP tools for custom workflows** manage projects, generate test cases from plain English, replay test scripts, batch-run regressions, and publish results to your team. Works in Claude Code, Cursor, and any MCP client.
35
25
 
36
26
  ---
37
27
 
@@ -39,37 +29,56 @@ Most AI coding tools help you *write* code. muggle-ai-works helps you *test* it
39
29
 
40
30
  ### 1. Install
41
31
 
42
- ```bash
43
- npm install @muggleai/works
32
+ In Claude Code, run:
33
+
44
34
  ```
35
+ /plugin marketplace add https://github.com/multiplex-ai/muggle-ai-works
36
+ /plugin install muggleai@muggle-works
37
+ ```
38
+
39
+ This installs the Muggle AI plugin with:
45
40
 
46
- This automatically:
47
- 1. Downloads the QA engine (Electron app) for browser automation
48
- 2. Registers the MCP server in `~/.cursor/mcp.json`
49
- 3. Installs skills (`/muggle-do`, `/test-feature-local`) to `~/.claude/`
41
+ - `/muggle:do` — autonomous dev pipeline (requirements to PR)
42
+ - `/muggle:test-feature-local` local quick QA testing
43
+ - `/muggle:status` health check for muggle-works plugins (Electron app, MCP server, and auth)
44
+ - `/muggle:repair` diagnose and fix broken installation
45
+ - `/muggle:upgrade` — update to the latest version
46
+ - MCP server with 70+ tools (auto-started)
47
+ - Electron QA engine provisioning (via session hook)
50
48
 
51
49
  ### 2. Verify
52
50
 
53
- ```bash
54
- muggle --version
55
- muggle doctor
51
+ ```
52
+ /muggle:status
56
53
  ```
57
54
 
58
- ### 3. Start testing
55
+ This checks Electron QA engine, MCP server health, and authentication. If anything is broken, run `/muggle:repair`.
59
56
 
60
- In Claude Code or Cursor, just ask:
57
+ ### 3. Start building features
61
58
 
62
- > "Test my login flow on localhost:3000"
59
+ Describe what you want to build:
63
60
 
64
- Your AI assistant will authenticate, find or create test cases, launch the browser, record/replay tests, and show you results with screenshots.
61
+ ```
62
+ /muggle:do "Add a logout button to the header"
63
+ ```
65
64
 
66
- ---
65
+ The AI handles the full cycle: code the feature, run unit tests, QA the app in a real browser, and open a PR with results.
66
+
67
+ ### 4. Test a feature locally
68
+
69
+ Already have code running on localhost? Test it directly:
70
+
71
+ ```
72
+ /muggle:test-feature-local
73
+ ```
74
+
75
+ Describe what to test in plain English. The AI finds or creates test cases, launches a real browser, and reports results with screenshots.
67
76
 
68
- ## How It Works
77
+ ---
69
78
 
70
- ### Design principle: "Create remotely, execute locally"
79
+ ## How does it work?
71
80
 
72
- All entity management (projects, use cases, test cases) lives in the **cloud** via `muggle-remote-*` tools. Local execution (`muggle-local-*`) is stateless — it receives everything it needs as input and just runs tests.
81
+ muggle-ai-works separates test management from test execution. All entity management (projects, use cases, test cases) lives in the cloud via `muggle-remote-*` tools. Local execution (`muggle-local-*`) is stateless — it receives what it needs and runs the test.
73
82
 
74
83
  ### Entity model
75
84
 
@@ -81,7 +90,7 @@ Project (e.g., "My App")
81
90
  └── Run Result (pass/fail + screenshots)
82
91
  ```
83
92
 
84
- ### Test execution flow
93
+ Test execution flow
85
94
 
86
95
  ```
87
96
  Your AI assistant describes what to test
@@ -109,12 +118,12 @@ muggle-local-publish-test-script uploads to cloud
109
118
 
110
119
  ## Three Ways to Use It
111
120
 
112
- ### 1. `/test-feature-local` — Test a feature on localhost
121
+ ### 1. `/muggle:test-feature-local` — Test a feature on localhost
113
122
 
114
- Interactive workflow: pick a project pick a use case pick a test case run against localhost.
123
+ Describe what to test in English. The AI finds the right project and test cases, launches a real browser, and reports results with screenshots.
115
124
 
116
125
  ```
117
- > /test-feature-local
126
+ > /muggle:test-feature-local
118
127
 
119
128
  "Test my login changes on localhost:3999"
120
129
 
@@ -128,12 +137,12 @@ Interactive workflow: pick a project → pick a use case → pick a test case
128
137
  7. Publish to cloud? (y)
129
138
  ```
130
139
 
131
- ### 2. `/muggle-do` — Autonomous dev pipeline
140
+ ### 2. `/muggle:do` — Autonomous dev pipeline
132
141
 
133
- Full development cycle: requirements code unit tests QA PR creation.
142
+ Full development cycle: requirements to PR in one command. The AI codes the feature, writes unit tests, runs QA against your running app, and opens a PR.
134
143
 
135
144
  ```
136
- > /muggle-do "Add a logout button to the header"
145
+ > /muggle:do "Add a logout button to the header"
137
146
 
138
147
  REQUIREMENTS → Goal: Add logout button. Criteria: visible, functional, redirects.
139
148
  IMPACT → frontend repo, src/components/Header.tsx
@@ -145,15 +154,14 @@ OPEN_PRS → PR #42 opened
145
154
  DONE → 1 iteration, all green
146
155
  ```
147
156
 
148
- Features:
149
157
  - Session-based with crash recovery (`.muggle-do/sessions/`)
150
- - Auto-triage: analyzes failures, jumps back to fix (max 3 iterations)
158
+ - Auto-triage: analyzes failures and loops back to fix (max 3 iterations)
151
159
  - Multi-repo support via `muggle-repos.json`
152
- - Creates PRs with QA results in description
160
+ - PRs include QA results and screenshots in the description
153
161
 
154
- ### 3. Direct MCP tool calls — Build your own workflow
162
+ ### 3. Direct MCP tool calls — Build your own QA workflow
155
163
 
156
- Use any of the 70+ MCP tools directly from your AI assistant:
164
+ Use any of the 70+ MCP tools directly from your AI assistant. This is the lowest-level option and the most flexible for building custom QA workflows.
157
165
 
158
166
  ```
159
167
  "Create a project called My App with URL https://myapp.com"
@@ -164,193 +172,172 @@ Use any of the 70+ MCP tools directly from your AI assistant:
164
172
 
165
173
  ---
166
174
 
167
- ## Integration with muggle-ai-teams
175
+ ## What MCP tools are included?
168
176
 
169
- When both packages are installed, muggle-ai-teams automatically integrates QA into its workflow:
177
+ muggle-ai-works provides 70+ MCP tools organized into 8 categories: authentication, project management, use cases, test cases, test scripts, local execution, reports, and administration. These tools power all AI testing automation workflows — from one-off browser checks to full QA automation pipelines.
170
178
 
171
- | Workflow Step | What Happens |
172
- |--------------|-------------|
173
- | **Step 1F** (Plan) | QA test instructions written per implementation slice |
174
- | **Step 2** (Execute) | Per-slice QA via muggle-ai-works before each commit |
175
- | **Step 3** (Verify) | Full regression sweep replaying all project scripts |
176
- | **Step 5** (Push) | QA results published to cloud, linked in PR description |
179
+ Authentication (muggle-remote-auth-*)
177
180
 
178
- Frontend slices get browser QA. Backend-only slices are verified by unit tests (browser QA skipped with documented reasoning).
179
181
 
180
- Install both: `npm install @muggleai/works @muggleai/teams`
182
+ | Tool | Purpose |
183
+ | --------------------------- | ---------------------------- |
184
+ | `muggle-remote-auth-status` | Check authentication status |
185
+ | `muggle-remote-auth-login` | Start device-code login flow |
186
+ | `muggle-remote-auth-poll` | Poll for login completion |
187
+ | `muggle-remote-auth-logout` | Clear credentials |
181
188
 
182
- ---
183
189
 
184
- ## Available MCP Tools (70+)
190
+ Project Management (muggle-remote-project-*)
185
191
 
186
- ### Authentication (`muggle-remote-auth-*`)
187
192
 
188
- | Tool | Purpose |
189
- |------|---------|
190
- | `muggle-remote-auth-status` | Check authentication status |
191
- | `muggle-remote-auth-login` | Start device-code login flow |
192
- | `muggle-remote-auth-poll` | Poll for login completion |
193
- | `muggle-remote-auth-logout` | Clear credentials |
193
+ | Tool | Purpose |
194
+ | ------------------------------ | ------------------- |
195
+ | `muggle-remote-project-create` | Create QA project |
196
+ | `muggle-remote-project-list` | List all projects |
197
+ | `muggle-remote-project-get` | Get project details |
198
+ | `muggle-remote-project-update` | Update project |
199
+ | `muggle-remote-project-delete` | Delete project |
194
200
 
195
- ### Project Management (`muggle-remote-project-*`)
196
201
 
197
- | Tool | Purpose |
198
- |------|---------|
199
- | `muggle-remote-project-create` | Create QA project |
200
- | `muggle-remote-project-list` | List all projects |
201
- | `muggle-remote-project-get` | Get project details |
202
- | `muggle-remote-project-update` | Update project |
203
- | `muggle-remote-project-delete` | Delete project |
202
+ Use Cases (muggle-remote-use-case-*)
204
203
 
205
- ### Use Cases (`muggle-remote-use-case-*`)
206
204
 
207
- | Tool | Purpose |
208
- |------|---------|
209
- | `muggle-remote-use-case-list` | List use cases |
205
+ | Tool | Purpose |
206
+ | -------------------------------------------- | ---------------------------- |
207
+ | `muggle-remote-use-case-list` | List use cases |
210
208
  | `muggle-remote-use-case-create-from-prompts` | Create from natural language |
211
- | `muggle-remote-use-case-prompt-preview` | Preview before creating |
212
- | `muggle-remote-use-case-update-from-prompt` | Regenerate from new prompt |
213
-
214
- ### Test Cases (`muggle-remote-test-case-*`)
215
-
216
- | Tool | Purpose |
217
- |------|---------|
218
- | `muggle-remote-test-case-list` | List all test cases |
219
- | `muggle-remote-test-case-list-by-use-case` | List by use case |
220
- | `muggle-remote-test-case-get` | Get test case details |
221
- | `muggle-remote-test-case-create` | Create test case |
222
- | `muggle-remote-test-case-generate-from-prompt` | Generate from prompt |
223
-
224
- ### Test Scripts & Workflows (`muggle-remote-workflow-*`)
225
-
226
- | Tool | Purpose |
227
- |------|---------|
228
- | `muggle-remote-test-script-list` | List test scripts |
229
- | `muggle-remote-test-script-get` | Get script details |
230
- | `muggle-remote-workflow-start-website-scan` | Scan site for use cases |
231
- | `muggle-remote-workflow-start-test-case-detection` | Generate test cases |
232
- | `muggle-remote-workflow-start-test-script-generation` | Generate scripts |
233
- | `muggle-remote-workflow-start-test-script-replay` | Replay single script |
234
- | `muggle-remote-workflow-start-test-script-replay-bulk` | Batch replay |
235
-
236
- ### Local Execution (`muggle-local-*`)
237
-
238
- | Tool | Purpose |
239
- |------|---------|
240
- | `muggle-local-check-status` | Check local QA engine status |
241
- | `muggle-local-execute-test-generation` | Generate test script locally |
242
- | `muggle-local-execute-replay` | Replay existing script locally |
243
- | `muggle-local-cancel-execution` | Cancel active execution |
244
- | `muggle-local-run-result-list` | List run results |
245
- | `muggle-local-run-result-get` | Get detailed results + screenshots |
246
- | `muggle-local-publish-test-script` | Publish script to cloud |
247
-
248
- ### Reports & Analytics (`muggle-remote-report-*`)
249
-
250
- | Tool | Purpose |
251
- |------|---------|
252
- | `muggle-remote-report-stats-summary-get` | Report statistics |
253
- | `muggle-remote-report-cost-query` | Query cost/usage |
254
- | `muggle-remote-report-final-generate` | Generate final report (PDF/HTML/Markdown) |
255
- | `muggle-remote-project-test-results-summary-get` | Test results summary |
256
-
257
- Also available: PRD processing (`muggle-remote-prd-*`), secrets management (`muggle-remote-secret-*`), wallet/billing (`muggle-remote-wallet-*`), and scheduling recommendations (`muggle-remote-recommend-*`).
209
+ | `muggle-remote-use-case-prompt-preview` | Preview before creating |
210
+ | `muggle-remote-use-case-update-from-prompt` | Regenerate from new prompt |
258
211
 
259
- ---
260
212
 
261
- ## CLI Commands
213
+ Test Cases (muggle-remote-test-case-*)
262
214
 
263
- ```bash
264
- # Server (main command — starts MCP server for AI clients)
265
- muggle serve # Start with all tools (default)
266
- muggle serve --qa # Cloud QA tools only
267
- muggle serve --local # Local QA tools only
268
215
 
269
- # Setup & Diagnostics
270
- muggle setup # Download/update QA engine
271
- muggle setup --force # Force re-download
272
- muggle doctor # Diagnose installation issues
216
+ | Tool | Purpose |
217
+ | ---------------------------------------------- | --------------------- |
218
+ | `muggle-remote-test-case-list` | List all test cases |
219
+ | `muggle-remote-test-case-list-by-use-case` | List by use case |
220
+ | `muggle-remote-test-case-get` | Get test case details |
221
+ | `muggle-remote-test-case-create` | Create test case |
222
+ | `muggle-remote-test-case-generate-from-prompt` | Generate from prompt |
273
223
 
274
- # Authentication
275
- muggle login # Manually trigger login
276
- muggle logout # Clear credentials
277
- muggle status # Show auth status
278
224
 
279
- # Info
280
- muggle --version # Show version
281
- muggle --help # Show help
282
- ```
225
+ Test Scripts and Workflows (muggle-remote-workflow-*)
283
226
 
284
- ---
285
227
 
286
- ## Authentication
228
+ | Tool | Purpose |
229
+ | ------------------------------------------------------ | ----------------------- |
230
+ | `muggle-remote-test-script-list` | List test scripts |
231
+ | `muggle-remote-test-script-get` | Get script details |
232
+ | `muggle-remote-workflow-start-website-scan` | Scan site for use cases |
233
+ | `muggle-remote-workflow-start-test-case-detection` | Generate test cases |
234
+ | `muggle-remote-workflow-start-test-script-generation` | Generate scripts |
235
+ | `muggle-remote-workflow-start-test-script-replay` | Replay single script |
236
+ | `muggle-remote-workflow-start-test-script-replay-bulk` | Batch replay |
287
237
 
288
- Authentication happens automatically when you first use a tool that requires it:
289
238
 
290
- 1. A browser window opens with a verification code
291
- 2. You log in with your Muggle AI account
292
- 3. The tool call continues with your credentials
239
+ Local Execution (muggle-local-*)
293
240
 
294
- Credentials are stored in `~/.muggle-ai/` and persist across sessions.
295
241
 
296
- ### Handling expired tokens
242
+ | Tool | Purpose |
243
+ | -------------------------------------- | ---------------------------------- |
244
+ | `muggle-local-check-status` | Check local QA engine status |
245
+ | `muggle-local-execute-test-generation` | Generate test script locally |
246
+ | `muggle-local-execute-replay` | Replay existing script locally |
247
+ | `muggle-local-cancel-execution` | Cancel active execution |
248
+ | `muggle-local-run-result-list` | List run results |
249
+ | `muggle-local-run-result-get` | Get detailed results + screenshots |
250
+ | `muggle-local-publish-test-script` | Publish script to cloud |
297
251
 
298
- 1. **Check status**: `muggle status` or `muggle-remote-auth-status`
299
- 2. **Re-authenticate**: `muggle login` or `muggle-remote-auth-login`
300
- 3. **If "unauthorized_client"**: Check `MUGGLE_MCP_PROMPT_SERVICE_TARGET` environment variable (see Troubleshooting)
301
252
 
302
- ---
253
+ Reports and Analytics (muggle-remote-report-*)
303
254
 
304
- ## Data Directory
305
255
 
306
- ```
307
- ~/.muggle-ai/
308
- ├── auth.json # OAuth tokens
309
- ├── credentials.json # API key for service calls
310
- ├── projects/ # Local project cache
311
- ├── sessions/ # QA sessions
312
- │ └── {runId}/
313
- │ ├── action-script.json # Recorded browser steps
314
- │ ├── results.md # Step-by-step report
315
- │ └── screenshots/ # Per-step images
316
- └── electron-app/ # Downloaded QA engine
317
- └── {version}/
318
- ```
256
+ | Tool | Purpose |
257
+ | ------------------------------------------------ | ----------------------------------------- |
258
+ | `muggle-remote-report-stats-summary-get` | Report statistics |
259
+ | `muggle-remote-report-cost-query` | Query cost/usage |
260
+ | `muggle-remote-report-final-generate` | Generate final report (PDF/HTML/Markdown) |
261
+ | `muggle-remote-project-test-results-summary-get` | Test results summary |
262
+
263
+
264
+ Administration (PRD, secrets, billing, scheduling)
265
+
266
+
267
+ | Category | Tools |
268
+ | ------------------ | -------------------------------------------------------------------- |
269
+ | PRD processing | `muggle-remote-prd-`* — upload and process product requirements docs |
270
+ | Secrets management | `muggle-remote-secret-`* — store credentials for test environments |
271
+ | Wallet and billing | `muggle-remote-wallet-`* — manage credits and payment methods |
272
+ | Scheduling | `muggle-remote-recommend-*` — get CI/CD and schedule recommendations |
273
+
319
274
 
320
275
  ---
321
276
 
322
- ## Platform Compatibility
277
+ ## Works with muggle-ai-teams
278
+
279
+ [muggle-ai-teams](https://github.com/multiplex-ai/muggle-ai-teams) is the companion package for agent orchestration, workflow steps, and delivery. When both packages are installed, muggle-ai-teams automatically integrates QA into the development workflow at each stage.
280
+
281
+
282
+ | Workflow Step | What Happens |
283
+ | ------------- | ------------------------------------------------------- |
284
+ | **Plan** | QA test instructions written per implementation slice |
285
+ | **Build** | Per-slice QA via muggle-ai-works before each commit |
286
+ | **Verify** | Full regression sweep replaying all project scripts |
287
+ | **Ship** | QA results published to cloud, linked in PR description |
288
+
289
+
290
+ Frontend slices get browser QA. Backend-only slices are verified by unit tests (browser QA skipped with documented reasoning).
291
+
292
+ Install both: `npm install @muggleai/works @muggleai/teams`
293
+
294
+ **Muggle AI open-source ecosystem:**
295
+
296
+
297
+ | Package | Purpose | Install |
298
+ | ---------------------------------------------------------------------- | ----------------------------------------------- | --------------------------------------- |
299
+ | **muggle-ai-works** (this repo) | QA testing MCP server + autonomous dev pipeline | `/plugin install muggleai@muggle-works` |
300
+ | **[muggle-ai-teams](https://github.com/multiplex-ai/muggle-ai-teams)** | Agent orchestration, workflow, skills, rules | `npm install @muggleai/teams` |
323
301
 
324
- | Platform | MCP Tools | /muggle-do | /test-feature-local |
325
- |----------|-----------|-----------|-------------------|
326
- | **Claude Code** | Yes | Yes | Yes |
327
- | **Cursor** | Yes (via MCP) | No (needs Agent tool) | No (needs Skill tool) |
328
- | **Others** | Via MCP if supported | No | No |
329
302
 
330
- The MCP server (`muggle serve`) works with any MCP-compatible client. The distributed skills (`/muggle-do`, `/test-feature-local`) require Claude Code's Agent and Skill tools.
303
+ Want the full platform experience? [MuggleTest](https://www.muggletest.com) gives you everything out of the box no setup, no configuration.
331
304
 
332
305
  ---
333
306
 
334
- ## Configuration
307
+ ## CLI Reference
335
308
 
336
- ### MCP client config
309
+ ```bash
310
+ # Server (main command — starts MCP server for AI clients)
311
+ muggle serve # Start with all tools (default)
312
+ muggle serve --qa # Cloud QA tools only
313
+ muggle serve --local # Local QA tools only
337
314
 
338
- **Cursor** (`~/.cursor/mcp.json`) auto-configured on install:
315
+ # Setup and Diagnostics
316
+ muggle setup # Download/update QA engine
317
+ muggle setup --force # Force re-download
318
+ muggle doctor # Diagnose installation issues
339
319
 
340
- ```json
341
- {
342
- "mcpServers": {
343
- "muggle": {
344
- "command": "muggle",
345
- "args": ["serve"]
346
- }
347
- }
348
- }
320
+ # Authentication
321
+ muggle login # Manually trigger login
322
+ muggle logout # Clear credentials
323
+ muggle status # Show auth status
324
+
325
+ # Info
326
+ muggle --version # Show version
327
+ muggle --help # Show help
349
328
  ```
350
329
 
351
- ### Environment targeting
330
+ ---
331
+
332
+ ## Setup and Configuration
333
+
334
+ Authentication happens automatically when you first use a tool that requires it: a browser window opens with a verification code, you log in with your Muggle AI account, and the tool call continues. Credentials persist across sessions in `~/.muggle-ai/`.
352
335
 
353
- Set `MUGGLE_MCP_PROMPT_SERVICE_TARGET` to switch between production and dev:
336
+ MCP client configuration examples
337
+
338
+ When installed as a plugin, MCP server configuration is shipped by the plugin (`plugin/.mcp.json`) and does not require manual user-level file copy.
339
+
340
+ **Environment targeting** — set `MUGGLE_MCP_PROMPT_SERVICE_TARGET` to switch between production and dev:
354
341
 
355
342
  ```json
356
343
  {
@@ -366,9 +353,7 @@ Set `MUGGLE_MCP_PROMPT_SERVICE_TARGET` to switch between production and dev:
366
353
  }
367
354
  ```
368
355
 
369
- ### Multi-repo config for /muggle-do
370
-
371
- Create `muggle-repos.json` in your working directory:
356
+ **Multi-repo config for /muggle:do** — create `muggle-repos.json` in your working directory:
372
357
 
373
358
  ```json
374
359
  [
@@ -377,50 +362,41 @@ Create `muggle-repos.json` in your working directory:
377
362
  ]
378
363
  ```
379
364
 
380
- ---
381
-
382
- ## Development
365
+ Data directory structure (~/.muggle-ai/)
383
366
 
384
- ```bash
385
- # Install dependencies
386
- pnpm install
387
-
388
- # Build
389
- pnpm run build
390
-
391
- # Dev mode (watch)
392
- pnpm run dev
367
+ ```
368
+ ~/.muggle-ai/
369
+ ├── auth.json # OAuth tokens
370
+ ├── credentials.json # API key for service calls
371
+ ├── projects/ # Local project cache
372
+ ├── sessions/ # QA sessions
373
+ │ └── {runId}/
374
+ │ ├── action-script.json # Recorded browser steps
375
+ │ ├── results.md # Step-by-step report
376
+ │ └── screenshots/ # Per-step images
377
+ └── electron-app/ # Downloaded QA engine
378
+ └── {version}/
379
+ ```
393
380
 
394
- # Test
395
- pnpm test
396
- pnpm run test:watch
381
+ ---
397
382
 
398
- # Lint
399
- pnpm run lint # Auto-fix
400
- pnpm run lint:check # Check only
383
+ ## What AI clients does it work with?
401
384
 
402
- # Typecheck
403
- pnpm run typecheck
404
- ```
385
+ Full support for Claude Code. MCP tools work with Cursor and any MCP-compatible client. Plugin skills require Claude Code plugin support.
405
386
 
406
- ### CI/CD
387
+ Platform compatibility table
407
388
 
408
- | Workflow | Trigger | Description |
409
- |----------|---------|-------------|
410
- | `ci.yml` | Push/PR to `master` | Lint, test, build on multiple platforms |
411
- | `publish-works.yml` | Tag `v*` or manual | Verify, audit, smoke-install, publish to npm |
412
389
 
413
- ### Publishing
390
+ | Platform | MCP Tools | Plugin skills (/muggle:*) |
391
+ | --------------- | -------------------- | ----------------------------------------------------- |
392
+ | **Claude Code** | Yes | Yes (do, test-feature-local, status, repair, upgrade) |
393
+ | **Cursor** | Yes (via MCP) | No (needs plugin support) |
394
+ | **Others** | Via MCP if supported | No |
414
395
 
415
- ```bash
416
- # Update version in package.json
417
- git tag v2.0.1 && git push --tags
418
- # publish-works.yml handles the rest
419
- ```
420
396
 
421
397
  ---
422
398
 
423
- ## Troubleshooting
399
+ Troubleshooting
424
400
 
425
401
  ### "unauthorized_client" during login
426
402
 
@@ -447,11 +423,72 @@ muggle login # Fresh login
447
423
 
448
424
  ## About
449
425
 
450
- Built by the team behind **[MuggleTest](https://www.muggletest.com)**an AI-powered QA testing platform that makes software testing accessible to everyone, no coding required.
426
+ Built by the team behind [MuggleTest](https://www.muggletest.com) — [AI-powered QA testing](https://www.muggletest.com) for teams who ship fast.
451
427
 
452
- **Muggle AI open-source ecosystem:**
453
- - **[muggle-ai-works](https://github.com/multiplex-ai/muggle-ai-works)** — QA testing MCP server + autonomous dev pipeline (this repo)
454
- - **[muggle-ai-teams](https://github.com/multiplex-ai/muggle-ai-teams)** — Agent orchestration, workflow, skills, and rules
428
+ Repository structure
429
+
430
+ ```
431
+ muggle-ai-works/
432
+ ├── plugin/ # Claude Code plugin (source of truth)
433
+ │ ├── .claude-plugin/ # Plugin manifest (plugin.json)
434
+ │ ├── skills/ # Skill definitions
435
+ │ │ ├── do/ # /muggle:do — autonomous dev pipeline
436
+ │ │ ├── test-feature-local/ # /muggle:test-feature-local
437
+ │ │ ├── status/ # /muggle:status
438
+ │ │ ├── repair/ # /muggle:repair
439
+ │ │ └── upgrade/ # /muggle:upgrade
440
+ │ ├── hooks/ # Session hooks (hooks.json)
441
+ │ ├── scripts/ # Hook scripts (ensure-electron-app.sh)
442
+ │ ├── .mcp.json # MCP server config
443
+ │ └── README.md # Plugin install and usage docs
444
+
445
+ ├── src/ # Application source
446
+ │ ├── cli/ # CLI commands (serve, setup, doctor, login, etc.)
447
+ │ └── server/ # MCP server (tool registration, stdio transport)
448
+
449
+ ├── packages/ # Workspace packages
450
+ │ ├── mcps/ # Core MCP runtime — tool registries, schemas, services
451
+ │ ├── commands/ # CLI command contracts and registration
452
+ │ └── workflows/ # Workflow contracts and tests
453
+
454
+ ├── scripts/ # Build and release
455
+ │ ├── build-plugin.mjs # Assembles dist/plugin/ from plugin/ source
456
+ │ ├── verify-plugin-marketplace.mjs # Validates plugin/marketplace consistency
457
+ │ └── postinstall.mjs # npm postinstall (Electron app download)
458
+
459
+ ├── bin/ # CLI entrypoint (muggle.js → dist/cli.js)
460
+ ├── dist/ # Build output (gitignored)
461
+ ├── .claude-plugin/ # Marketplace catalog (marketplace.json)
462
+ └── docs/ # Internal design docs and plans
463
+ ```
464
+
465
+ Development commands
466
+
467
+ ```bash
468
+ pnpm install # Install dependencies
469
+ pnpm run build # Build (tsup + plugin artifact)
470
+ pnpm run build:plugin # Rebuild plugin artifact only
471
+ pnpm run verify:plugin # Validate plugin/marketplace metadata consistency
472
+ pnpm run dev # Dev mode (watch)
473
+ pnpm test # Run tests
474
+ pnpm run lint # Lint (auto-fix)
475
+ pnpm run lint:check # Lint (check only)
476
+ pnpm run typecheck # TypeScript type check
477
+ ```
478
+
479
+ CI/CD and publishing
480
+
481
+
482
+ | Workflow | Trigger | Description |
483
+ | ------------------- | ------------------- | ------------------------------------------------------------ |
484
+ | `ci.yml` | Push/PR to `master` | Lint, test, build, plugin verification on multiple platforms |
485
+ | `publish-works.yml` | Tag `v*` or manual | Verify, audit, smoke-install, publish to npm |
486
+
487
+
488
+ ```bash
489
+ git tag v<version> && git push --tags
490
+ # publish-works.yml handles the rest
491
+ ```
455
492
 
456
493
  ---
457
494
 
@@ -459,6 +496,4 @@ Built by the team behind **[MuggleTest](https://www.muggletest.com)** — an AI-
459
496
 
460
497
  [MIT](LICENSE) — Use it, fork it, make it yours.
461
498
 
462
- ---
463
-
464
- If this helps your development workflow, consider giving it a star. It helps others find it.
499
+ If this helps your development workflow, consider giving it a star. It helps others find it.