@muggleai/works 4.9.2 → 4.10.1
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/README.md +3 -3
- package/dist/{chunk-6N7OIBAS.js → chunk-Q7WNEMN4.js} +109 -43
- package/dist/{chunk-4KQZLF56.js → chunk-ZKRHFTIC.js} +996 -91
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/README.md +4 -2
- package/dist/plugin/agents/acceptance-tester.md +24 -10
- package/dist/plugin/commands/m.md +7 -0
- package/dist/plugin/commands/mdo.md +7 -0
- package/dist/plugin/commands/mfeedback.md +7 -0
- package/dist/plugin/commands/mimport.md +7 -0
- package/dist/plugin/commands/mpr.md +7 -0
- package/dist/plugin/commands/mprefs.md +7 -0
- package/dist/plugin/commands/mregen.md +7 -0
- package/dist/plugin/commands/mrelease.md +7 -0
- package/dist/plugin/commands/mrepair.md +7 -0
- package/dist/plugin/commands/mstatus.md +7 -0
- package/dist/plugin/commands/mtest.md +7 -0
- package/dist/plugin/commands/mtestlocal.md +7 -0
- package/dist/plugin/commands/mtestprep.md +7 -0
- package/dist/plugin/commands/mupgrade.md +7 -0
- package/dist/plugin/scripts/ensure-electron-app.sh +56 -6
- package/dist/plugin/skills/_aliases.json +18 -0
- package/dist/plugin/skills/_shared/dev-server-readiness.md +231 -0
- package/dist/plugin/skills/_shared/failure-mode-handling.md +244 -0
- package/dist/plugin/skills/_shared/post-merge-cleanup.md +10 -0
- package/dist/plugin/skills/_shared/rebase-before-e2e.md +15 -0
- package/dist/plugin/skills/_shared/telemetry-emit.md +15 -0
- package/dist/plugin/skills/_shared/use-worktrees.md +53 -0
- package/dist/plugin/skills/do/e2e-acceptance.md +63 -18
- package/dist/plugin/skills/do/impact-analysis.md +45 -5
- package/dist/plugin/skills/do/open-prs.md +13 -4
- package/dist/plugin/skills/do/pr-followup.md +225 -0
- package/dist/plugin/skills/do/pre-flight.md +18 -11
- package/dist/plugin/skills/m/SKILL.md +8 -0
- package/dist/plugin/skills/mdo/SKILL.md +8 -0
- package/dist/plugin/skills/mfeedback/SKILL.md +8 -0
- package/dist/plugin/skills/mimport/SKILL.md +8 -0
- package/dist/plugin/skills/mpr/SKILL.md +8 -0
- package/dist/plugin/skills/mprefs/SKILL.md +8 -0
- package/dist/plugin/skills/mregen/SKILL.md +8 -0
- package/dist/plugin/skills/mrelease/SKILL.md +8 -0
- package/dist/plugin/skills/mrepair/SKILL.md +8 -0
- package/dist/plugin/skills/mstatus/SKILL.md +8 -0
- package/dist/plugin/skills/mtest/SKILL.md +8 -0
- package/dist/plugin/skills/mtestlocal/SKILL.md +8 -0
- package/dist/plugin/skills/mtestprep/SKILL.md +8 -0
- package/dist/plugin/skills/muggle/SKILL.md +11 -17
- package/dist/plugin/skills/muggle-do/SKILL.md +22 -4
- package/dist/plugin/skills/muggle-do-pr-followup/SKILL.md +37 -0
- package/dist/plugin/skills/muggle-do-task/SKILL.md +134 -0
- package/dist/plugin/skills/muggle-feedback/SKILL.md +38 -0
- package/dist/plugin/skills/muggle-feedback/ops/delete.md +49 -0
- package/dist/plugin/skills/muggle-feedback/ops/list.md +65 -0
- package/dist/plugin/skills/muggle-feedback/ops/submit.md +117 -0
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/SKILL.md +73 -55
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +86 -0
- package/dist/plugin/skills/muggle-preferences/SKILL.md +17 -68
- package/dist/plugin/skills/muggle-preferences/ops/change-one.md +10 -0
- package/dist/plugin/skills/muggle-preferences/ops/configure.md +49 -0
- package/dist/plugin/skills/muggle-preferences/ops/list.md +9 -0
- package/dist/plugin/skills/muggle-preferences/ops/reset.md +6 -0
- package/dist/plugin/skills/muggle-preferences/ops/set.md +10 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/README.md +58 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoCleanup.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoCreatePR.md +13 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoDetectChanges.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoE2ETest.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoLogin.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoPublishLocalResults.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoRebase.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoSelectLocalHost.md +19 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoSelectProject.md +16 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoUseWorktree.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/checkForUpdates.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/defaultExecutionMode.md +15 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/openTestResultsAfterRun.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/postPRVisualWalkthrough.md +13 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/showElectronBrowser.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/suggestRelatedTestCases.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/suggestRelatedUseCases.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/verboseOutput.md +8 -0
- package/dist/plugin/skills/muggle-repair/SKILL.md +4 -2
- package/dist/plugin/skills/muggle-status/SKILL.md +14 -16
- package/dist/plugin/skills/muggle-test/SKILL.md +148 -123
- package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +92 -86
- package/dist/plugin/skills/muggle-test-import/SKILL.md +74 -35
- package/dist/plugin/skills/muggle-test-prepare/SKILL.md +79 -18
- package/dist/plugin/skills/muggle-test-regenerate-missing/SKILL.md +49 -35
- package/dist/plugin/skills/muggle-test-regenerate-missing/evals/evals.json +9 -9
- package/dist/plugin/skills/muggle-upgrade/SKILL.md +4 -2
- package/dist/plugin/skills/muggle-works-npm-release/SKILL.md +6 -4
- package/dist/plugin/skills/mupgrade/SKILL.md +8 -0
- package/dist/release-manifest.json +4 -4
- package/dist/src-2G7ENRGI.js +1 -0
- package/package.json +10 -8
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/README.md +4 -2
- package/plugin/agents/acceptance-tester.md +24 -10
- package/plugin/commands/m.md +7 -0
- package/plugin/commands/mdo.md +7 -0
- package/plugin/commands/mfeedback.md +7 -0
- package/plugin/commands/mimport.md +7 -0
- package/plugin/commands/mpr.md +7 -0
- package/plugin/commands/mprefs.md +7 -0
- package/plugin/commands/mregen.md +7 -0
- package/plugin/commands/mrelease.md +7 -0
- package/plugin/commands/mrepair.md +7 -0
- package/plugin/commands/mstatus.md +7 -0
- package/plugin/commands/mtest.md +7 -0
- package/plugin/commands/mtestlocal.md +7 -0
- package/plugin/commands/mtestprep.md +7 -0
- package/plugin/commands/mupgrade.md +7 -0
- package/plugin/scripts/ensure-electron-app.sh +56 -6
- package/plugin/skills/_aliases.json +18 -0
- package/plugin/skills/_shared/dev-server-readiness.md +231 -0
- package/plugin/skills/_shared/failure-mode-handling.md +244 -0
- package/plugin/skills/_shared/post-merge-cleanup.md +10 -0
- package/plugin/skills/_shared/rebase-before-e2e.md +15 -0
- package/plugin/skills/_shared/telemetry-emit.md +15 -0
- package/plugin/skills/_shared/use-worktrees.md +53 -0
- package/plugin/skills/do/e2e-acceptance.md +63 -18
- package/plugin/skills/do/impact-analysis.md +45 -5
- package/plugin/skills/do/open-prs.md +13 -4
- package/plugin/skills/do/pr-followup.md +225 -0
- package/plugin/skills/do/pre-flight.md +18 -11
- package/plugin/skills/m/SKILL.md +8 -0
- package/plugin/skills/mdo/SKILL.md +8 -0
- package/plugin/skills/mfeedback/SKILL.md +8 -0
- package/plugin/skills/mimport/SKILL.md +8 -0
- package/plugin/skills/mpr/SKILL.md +8 -0
- package/plugin/skills/mprefs/SKILL.md +8 -0
- package/plugin/skills/mregen/SKILL.md +8 -0
- package/plugin/skills/mrelease/SKILL.md +8 -0
- package/plugin/skills/mrepair/SKILL.md +8 -0
- package/plugin/skills/mstatus/SKILL.md +8 -0
- package/plugin/skills/mtest/SKILL.md +8 -0
- package/plugin/skills/mtestlocal/SKILL.md +8 -0
- package/plugin/skills/mtestprep/SKILL.md +8 -0
- package/plugin/skills/muggle/SKILL.md +11 -17
- package/plugin/skills/muggle-do/SKILL.md +22 -4
- package/plugin/skills/muggle-do-pr-followup/SKILL.md +37 -0
- package/plugin/skills/muggle-do-task/SKILL.md +134 -0
- package/plugin/skills/muggle-feedback/SKILL.md +38 -0
- package/plugin/skills/muggle-feedback/ops/delete.md +49 -0
- package/plugin/skills/muggle-feedback/ops/list.md +65 -0
- package/plugin/skills/muggle-feedback/ops/submit.md +117 -0
- package/plugin/skills/muggle-pr-visual-walkthrough/SKILL.md +73 -55
- package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +86 -0
- package/plugin/skills/muggle-preferences/SKILL.md +17 -68
- package/plugin/skills/muggle-preferences/ops/change-one.md +10 -0
- package/plugin/skills/muggle-preferences/ops/configure.md +49 -0
- package/plugin/skills/muggle-preferences/ops/list.md +9 -0
- package/plugin/skills/muggle-preferences/ops/reset.md +6 -0
- package/plugin/skills/muggle-preferences/ops/set.md +10 -0
- package/plugin/skills/muggle-preferences/preference-gates/README.md +58 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoCleanup.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoCreatePR.md +13 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoDetectChanges.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoE2ETest.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoLogin.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoPublishLocalResults.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoRebase.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoSelectLocalHost.md +19 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoSelectProject.md +16 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoUseWorktree.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/checkForUpdates.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/defaultExecutionMode.md +15 -0
- package/plugin/skills/muggle-preferences/preference-gates/openTestResultsAfterRun.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/postPRVisualWalkthrough.md +13 -0
- package/plugin/skills/muggle-preferences/preference-gates/showElectronBrowser.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/suggestRelatedTestCases.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/suggestRelatedUseCases.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/verboseOutput.md +8 -0
- package/plugin/skills/muggle-repair/SKILL.md +4 -2
- package/plugin/skills/muggle-status/SKILL.md +14 -16
- package/plugin/skills/muggle-test/SKILL.md +148 -123
- package/plugin/skills/muggle-test-feature-local/SKILL.md +92 -86
- package/plugin/skills/muggle-test-import/SKILL.md +74 -35
- package/plugin/skills/muggle-test-prepare/SKILL.md +79 -18
- package/plugin/skills/muggle-test-regenerate-missing/SKILL.md +49 -35
- package/plugin/skills/muggle-test-regenerate-missing/evals/evals.json +9 -9
- package/plugin/skills/muggle-upgrade/SKILL.md +4 -2
- package/plugin/skills/muggle-works-npm-release/SKILL.md +6 -4
- package/plugin/skills/mupgrade/SKILL.md +8 -0
- package/scripts/postinstall.mjs +11 -1
- package/dist/src-7GB7WIFT.js +0 -1
|
@@ -5,6 +5,8 @@ description: "Make sure dev servers and sibling services are ready on the user's
|
|
|
5
5
|
|
|
6
6
|
# Muggle Test Prepare
|
|
7
7
|
|
|
8
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-test-prepare"`.
|
|
9
|
+
|
|
8
10
|
Make sure the local services a user needs for E2E acceptance testing are up and ready. Check what's already running, discover sibling service directories by folder name, and offer to start anything that's missing — always with the user in control.
|
|
9
11
|
|
|
10
12
|
Some users start their own services (tmux scripts, docker-compose, a terminal per service). Others want help launching them. This skill handles both: it verifies readiness first, and only offers to start things when something is missing.
|
|
@@ -45,18 +47,30 @@ The `testing_scope` field records what the user is testing (from Step 1). The `e
|
|
|
45
47
|
|
|
46
48
|
**On every invocation**, check this file first. If it exists with live PIDs (verify with `kill -0`), present the running services and ask:
|
|
47
49
|
|
|
48
|
-
Use `
|
|
50
|
+
Use `AskUserQuestion`:
|
|
49
51
|
- Option 1: "Keep them running — skip to testing"
|
|
50
52
|
- Option 2: "Tear down and start fresh"
|
|
51
53
|
- Option 3: "Add more services to the running set"
|
|
52
54
|
|
|
53
55
|
Prune any dead PIDs silently (the process crashed on its own — no point asking about it).
|
|
54
56
|
|
|
57
|
+
## Preferences
|
|
58
|
+
|
|
59
|
+
Gates run per [`preference-gates/README.md`](../muggle-preferences/preference-gates/README.md).
|
|
60
|
+
|
|
61
|
+
| Preference | Step | Decision it gates |
|
|
62
|
+
|------------|------|-------------------|
|
|
63
|
+
| `autoRebase` | 0 | Rebase onto `origin/<default>` before starting dev servers (see [`_shared/rebase-before-e2e.md`](../_shared/rebase-before-e2e.md)) |
|
|
64
|
+
|
|
55
65
|
## Workflow
|
|
56
66
|
|
|
67
|
+
### Step 0: Rebase check (gated by `autoRebase`)
|
|
68
|
+
|
|
69
|
+
Fire per [`_shared/rebase-before-e2e.md`](../_shared/rebase-before-e2e.md) when `behind > 0`. Otherwise skip silently.
|
|
70
|
+
|
|
57
71
|
### Step 1: What Are You Testing?
|
|
58
72
|
|
|
59
|
-
Before discovering services, understand the shape of the testing so you can scope correctly. Use `
|
|
73
|
+
Before discovering services, understand the shape of the testing so you can scope correctly. Use `AskUserQuestion`:
|
|
60
74
|
|
|
61
75
|
> "What are you testing locally?"
|
|
62
76
|
|
|
@@ -72,7 +86,7 @@ Some services can't run on a developer's machine by design — they need product
|
|
|
72
86
|
|
|
73
87
|
**If the user already volunteered this information** in their initial message (e.g., "the payment-gateway can't run locally"), acknowledge it and skip the question — don't re-ask what they already answered.
|
|
74
88
|
|
|
75
|
-
Otherwise, use `
|
|
89
|
+
Otherwise, use `AskUserQuestion`:
|
|
76
90
|
|
|
77
91
|
> "Are there any services in your stack that **can't** run locally? (e.g., needs production secrets, specific certificates, or cloud-only infra)"
|
|
78
92
|
|
|
@@ -98,7 +112,7 @@ Figure out which services need to be running. Start by listing folder names in t
|
|
|
98
112
|
ls -d "$(dirname "$PWD")"/*/ | xargs -I{} basename {}
|
|
99
113
|
```
|
|
100
114
|
|
|
101
|
-
Present folder names only (not contents) as candidates. Use `
|
|
115
|
+
Present folder names only (not contents) as candidates. Use `AskUserQuestion` with `multiSelect: true`:
|
|
102
116
|
|
|
103
117
|
> "Which of these need to be running for your tests?"
|
|
104
118
|
|
|
@@ -112,7 +126,7 @@ If the user provides manual paths, verify they exist before continuing. If a pat
|
|
|
112
126
|
|
|
113
127
|
**Immediately after the user selects services**, ask how they want to handle startup. This avoids making someone who prefers their own scripts wait through command detection before they get to say "I'll handle it."
|
|
114
128
|
|
|
115
|
-
Use `
|
|
129
|
+
Use `AskUserQuestion`:
|
|
116
130
|
|
|
117
131
|
> "How do you want to handle these?"
|
|
118
132
|
|
|
@@ -125,24 +139,53 @@ If the user picks **option 1**: proceed through Steps 4-7 as normal.
|
|
|
125
139
|
|
|
126
140
|
### Step 4: Check What's Already Running
|
|
127
141
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
lsof -iTCP -sTCP:LISTEN -nP 2>/dev/null | grep -E ':(3000|3001|3002|4200|5173|5174|8080|8081|8000|8888|4000|9000)'
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Cross-reference against the selected service directories. If a selected service appears to already be running (match by port or by the process's working directory), report it as ready:
|
|
142
|
+
Run port detection and (when the app declares a backend URL) backend-health probe per [`_shared/dev-server-readiness.md`](../_shared/dev-server-readiness.md). Cross-reference hits against the selected service directories. If a selected service appears to already be running (match by port or by the process's working directory), report it as ready:
|
|
135
143
|
|
|
136
144
|
> "**backend-api** is already listening on port 3001 (PID 54321) — looks good."
|
|
137
145
|
|
|
138
146
|
If **all** required services are already running, report readiness and skip straight to Step 7. No need to go through Steps 5-6.
|
|
139
147
|
|
|
140
|
-
If some are running and some aren't, acknowledge the running ones and continue to Step 5 only for the missing services. Use `
|
|
148
|
+
If some are running and some aren't, acknowledge the running ones and continue to Step 5 only for the missing services. Use `AskUserQuestion` for any already-running service the user might want restarted:
|
|
141
149
|
- Option 1: "It's fine, keep it"
|
|
142
150
|
- Option 2: "Restart it"
|
|
143
151
|
|
|
144
152
|
For services that are already running and the user wants to keep, add them to the PID tracking file so cleanup can find them later, but mark them as `external: true` so cleanup knows not to kill them (the user started them independently).
|
|
145
153
|
|
|
154
|
+
**Port already held** — when the user wants a port that is currently held by a process they did **not** select (typically a stale dev server from a sibling worktree). Surface the conflict via `AskUserQuestion`:
|
|
155
|
+
|
|
156
|
+
> "Port 3999 is held by PID 87421 (you didn't select this process). How do you want to proceed?"
|
|
157
|
+
|
|
158
|
+
- Option 1: "Use the next available port" (recommended — non-destructive)
|
|
159
|
+
- Option 2: "Force-kill PID 87421 and claim port 3999"
|
|
160
|
+
- Option 3: "Abort"
|
|
161
|
+
|
|
162
|
+
**Option 1 — next available port:** probe `3999 + N` for `N = 1, 2, 3, ...` until `Test-NetConnection`/`lsof -i :<port>` returns nothing listening. Record the new port (and the env file edit, if `PORT=` is set in `.env.local` etc.) so downstream steps use it. The dev server may need a restart to pick up the new value.
|
|
163
|
+
|
|
164
|
+
**Option 2 — force-kill (destructive):**
|
|
165
|
+
- **Windows PowerShell:** `Get-NetTCPConnection -LocalPort <port> -ErrorAction SilentlyContinue | ForEach-Object { try { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue } catch { } }`
|
|
166
|
+
- **POSIX:** `lsof -ti:<port> 2>/dev/null | xargs -r kill -9`
|
|
167
|
+
|
|
168
|
+
Re-verify the port is free before continuing.
|
|
169
|
+
|
|
170
|
+
### Step 4.5: Environment File Sanity
|
|
171
|
+
|
|
172
|
+
The env file is **per-repo** — don't hardcode `.env.local`. Detect it: scan `package.json` `scripts/*` for `.env*` literals and known port vars (`PORT=`, `VITE_PORT=`); check framework config (`next.config.*`, `vite.config.*`).
|
|
173
|
+
|
|
174
|
+
When a dependency on an env file exists:
|
|
175
|
+
|
|
176
|
+
1. Check whether `<cwd>/<envfile>` exists. If yes, no-op.
|
|
177
|
+
2. If absent, `git worktree list --porcelain` and check each sibling for the same filename.
|
|
178
|
+
3. If found, surface via `AskUserQuestion`:
|
|
179
|
+
|
|
180
|
+
> "`<envfile>` is missing in this worktree but exists at `<sibling>/<envfile>`. Copy it before starting services?"
|
|
181
|
+
|
|
182
|
+
- Option 1: "Yes — copy from `<sibling>`"
|
|
183
|
+
- Option 2: "No — I'll provide it another way"
|
|
184
|
+
|
|
185
|
+
4. If not found anywhere, report and ask how to proceed.
|
|
186
|
+
|
|
187
|
+
Skip silently when no env file is referenced. The point is to catch the common worktree-bootstrap miss, not to mandate any specific file.
|
|
188
|
+
|
|
146
189
|
### Step 5: Determine Start Commands
|
|
147
190
|
|
|
148
191
|
For each required service that isn't already running, figure out how to start it. Propose the command so there's a shared understanding.
|
|
@@ -174,12 +217,33 @@ frontend ~/Github/frontend npm run dev
|
|
|
174
217
|
────────────────────────────────────────────────────────────────
|
|
175
218
|
```
|
|
176
219
|
|
|
177
|
-
Use `
|
|
220
|
+
Use `AskUserQuestion`:
|
|
178
221
|
- Option 1: "Looks good, start them"
|
|
179
222
|
- Option 2: "I need to edit some commands"
|
|
180
223
|
|
|
181
224
|
If the user needs edits, collect corrections and re-present.
|
|
182
225
|
|
|
226
|
+
### Step 5.5: Fresh-Worktree Install Probe
|
|
227
|
+
|
|
228
|
+
Before launching `npm run dev` (or equivalent) in a Node service, check whether `node_modules/` is present and current. Stale or missing `node_modules/` causes silent runtime failures that look like the service is broken when actually the install is just missing.
|
|
229
|
+
|
|
230
|
+
For each Node service the user selected:
|
|
231
|
+
|
|
232
|
+
1. If `<service-dir>/node_modules/` is missing entirely → install is required.
|
|
233
|
+
2. If `<service-dir>/package-lock.json` is newer than `<service-dir>/node_modules/.package-lock.json` → install is stale.
|
|
234
|
+
3. Otherwise → install is current, no action needed.
|
|
235
|
+
|
|
236
|
+
When install is required or stale, propose via `AskUserQuestion`:
|
|
237
|
+
|
|
238
|
+
> "`<service-name>` needs a fresh `npm install` before starting (node_modules is missing/stale). Run `npm install --prefer-offline --no-audit --no-fund` now?"
|
|
239
|
+
|
|
240
|
+
- Option 1: "Yes — install now"
|
|
241
|
+
- Option 2: "No — skip; I know it's fine"
|
|
242
|
+
|
|
243
|
+
**Never symlink `node_modules/` from a sibling worktree.** webpack's `resolve.symlinks: true` default rewrites paths to the shared real location; asset-identity tracking fails with `Can't handle conflicting asset info for sourceFilename`. Run a real per-worktree install.
|
|
244
|
+
|
|
245
|
+
For non-Node services (Go, Rust, Python), skip this probe — their build systems handle dependency caching differently.
|
|
246
|
+
|
|
183
247
|
### Step 6: Start Services
|
|
184
248
|
|
|
185
249
|
For each service, launch in the background:
|
|
@@ -191,10 +255,7 @@ echo $!
|
|
|
191
255
|
|
|
192
256
|
Capture the PID. Write all service entries to `/tmp/muggle-test-prepare.json`.
|
|
193
257
|
|
|
194
|
-
**Startup verification** —
|
|
195
|
-
|
|
196
|
-
1. PID is alive: `kill -0 <pid> 2>/dev/null`
|
|
197
|
-
2. Port is listening (if known): `lsof -iTCP:<port> -sTCP:LISTEN -nP 2>/dev/null`
|
|
258
|
+
**Startup verification** — first confirm the PID is alive (`kill -0 <pid> 2>/dev/null`), then run the two-stage readiness probe per [`_shared/dev-server-readiness.md`](../_shared/dev-server-readiness.md) against `/tmp/muggle-prepare-<service-name>.log`. Cap log-tail at 60s. Halt on whatever it surfaces; do not re-implement the ready-signal patterns here.
|
|
198
259
|
|
|
199
260
|
If a service's PID dies immediately, read the last 20 lines of its log and show the user:
|
|
200
261
|
|
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test-regenerate-missing
|
|
3
|
-
description: "Bulk-regenerate test scripts for every test case in a Muggle AI project that doesn't currently have an active script. Scans the project, finds test cases stuck in DRAFT or GENERATION_PENDING (no usable script attached), shows the user the list, and on approval kicks off bulk remote test script generation via the Muggle cloud. Use this skill whenever the user asks to 'regenerate missing scripts', 'fill in missing test scripts', 'generate scripts for test cases without one', 'regen all the test cases that don't have scripts', 'rebuild scripts for stale test cases', 'fix test cases with no script', 'bulk regenerate', or any phrasing that means 'kick off script generation across a project for the cases that need it'. Triggers on: 'regenerate missing test scripts', 'generate scripts for all empty test cases', 'fill the gaps in my test scripts', 'bulk test script regen', 'all my test cases without active scripts'. This is the go-to skill for project-wide script catch-up — it handles discovery, filtering, confirmation, and remote workflow dispatch end-to-end."
|
|
3
|
+
description: "Bulk-regenerate test scripts for every test case in a Muggle AI project that doesn't currently have an active script. Scans the project, finds test cases stuck in DRAFT or GENERATION_PENDING (no usable script attached), shows the user the list, and on approval kicks off bulk remote test script generation via the Muggle Test cloud. Use this skill whenever the user asks to 'regenerate missing scripts', 'fill in missing test scripts', 'generate scripts for test cases without one', 'regen all the test cases that don't have scripts', 'rebuild scripts for stale test cases', 'fix test cases with no script', 'bulk regenerate', or any phrasing that means 'kick off script generation across a project for the cases that need it'. Triggers on: 'regenerate missing test scripts', 'generate scripts for all empty test cases', 'fill the gaps in my test scripts', 'bulk test script regen', 'all my test cases without active scripts'. This is the go-to skill for project-wide script catch-up — it handles discovery, filtering, confirmation, and remote workflow dispatch end-to-end."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Muggle Test — Regenerate Missing Test Scripts
|
|
7
7
|
|
|
8
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-test-regenerate-missing"`.
|
|
9
|
+
|
|
8
10
|
A bulk maintenance skill for Muggle AI projects. It finds every test case in a project that does **not** currently have an active (ready-to-run) test script, shows the list to the user, and on approval triggers a remote test script generation workflow for each one. Useful after creating a batch of new test cases or when cleaning up a project that has drifted.
|
|
9
11
|
|
|
10
|
-
Execution is **remote only** — Muggle's cloud generates the scripts in parallel against the project URL. The user's machine is not involved beyond making API calls.
|
|
12
|
+
Execution is **remote only** — Muggle Test's cloud generates the scripts in parallel against the project URL. The user's machine is not involved beyond making API calls.
|
|
11
13
|
|
|
12
14
|
## Preferences
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
If no preferences line is present, treat all preferences as `"ask"`.
|
|
17
|
-
|
|
18
|
-
When you reach a decision gated by a preference:
|
|
19
|
-
- **`always`** → proceed without asking the user
|
|
20
|
-
- **`never`** → skip without asking the user
|
|
21
|
-
- **`ask`** → ask the user, then offer: "Want me to remember this choice for future sessions?" If yes, call `muggle-local-preferences-set` with the key, their chosen value, and scope `global`.
|
|
16
|
+
Gates run per `preference-gates/README.md`.
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
| `autoLogin` | Reuse saved credentials when auth is required |
|
|
28
|
-
| `autoSelectProject` | Reuse last-used Muggle project for this repo |
|
|
18
|
+
| Preference | Step | Decision it gates |
|
|
19
|
+
|------------|------|-------------------|
|
|
20
|
+
| `autoLogin` | 1 | Reuse saved credentials when auth is required |
|
|
21
|
+
| `autoSelectProject` | 2 | Reuse last-used Muggle Test project for this repo |
|
|
29
22
|
|
|
30
23
|
## Concept: what counts as "no active script"
|
|
31
24
|
|
|
32
|
-
In the Muggle data model, a test case carries a status that reflects whether it has a usable script attached:
|
|
25
|
+
In the Muggle Test data model, a test case carries a status that reflects whether it has a usable script attached:
|
|
33
26
|
|
|
34
27
|
| Status | Meaning | Regenerate? |
|
|
35
28
|
|:-------|:--------|:-----------:|
|
|
@@ -47,33 +40,41 @@ Treat this filter as a default, not a law. If the user explicitly says "include
|
|
|
47
40
|
|
|
48
41
|
## UX Guidelines — Minimize Typing
|
|
49
42
|
|
|
50
|
-
**Every selection-based question MUST use the `
|
|
43
|
+
**Every selection-based question MUST use the `AskUserQuestion` tool** (or the platform's equivalent structured selection tool). Never ask the user to "reply with a number" — always present clickable options.
|
|
51
44
|
|
|
52
|
-
- **Selections** (project, which test cases to include): Use `
|
|
45
|
+
- **Selections** (project, which test cases to include): Use `AskUserQuestion`, with `allow_multiple: true` for the test case picker.
|
|
53
46
|
- **Free-text inputs** (project URL when creating, override filters): Only ask as plain text when the option set isn't finite.
|
|
54
47
|
- **Batch related questions** when independent. Don't ask sequentially what could be one screen.
|
|
55
48
|
|
|
56
49
|
## Workflow
|
|
57
50
|
|
|
58
|
-
### Step 1 — Authenticate
|
|
51
|
+
### Step 1 — Authenticate (gated by `autoLogin`)
|
|
59
52
|
|
|
60
53
|
1. Call `muggle-remote-auth-status`.
|
|
61
|
-
2. If **authenticated and not expired** →
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
If the user picks "switch account", call `muggle-remote-auth-login` with `forceNewSession: true`, then poll with `muggle-remote-auth-poll`.
|
|
54
|
+
2. If **authenticated and not expired** → gate `autoLogin` (per `preference-gates/README.md`):
|
|
55
|
+
- `always` → proceed with saved session.
|
|
56
|
+
- `never` → `muggle-remote-auth-login` with `forceNewSession: true`, then `muggle-remote-auth-poll`.
|
|
57
|
+
- `ask` → run Picker 1 from `preference-gates/autoLogin.md` via `AskUserQuestion`; map the answer back to one of the actions above.
|
|
66
58
|
3. If **not authenticated or expired** → call `muggle-remote-auth-login`, then poll with `muggle-remote-auth-poll`.
|
|
67
59
|
4. Do not skip auth and do not assume a stale token still works.
|
|
68
60
|
|
|
69
61
|
If auth keeps failing, suggest the user run `muggle logout && muggle login` from a terminal.
|
|
70
62
|
|
|
71
|
-
### Step 2 — Select Project (
|
|
63
|
+
### Step 2 — Select Project (gated by `autoSelectProject`)
|
|
72
64
|
|
|
73
65
|
A **project** is the unit on the Muggle AI dashboard that groups test cases, scripts, and runs. The user must pick the one to scan — never auto-select from repo name, branch, or URL heuristics.
|
|
74
66
|
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
The per-repo project cache lives at `<cwd>/.muggle-ai/last-project.json` (via the `muggle-local-last-project-get` / `muggle-local-last-project-set` MCP tools). Look for `Muggle Test Last Project: id=… url=… name="…"` in session context.
|
|
68
|
+
|
|
69
|
+
Gate `autoSelectProject` (per `preference-gates/README.md`). Cache: `Muggle Test Last Project` session line.
|
|
70
|
+
- `always` + cache → use cached `projectId`, proceed to Step 3. No cache → fall through to `ask`.
|
|
71
|
+
- `never` → full project list; skip Picker 2.
|
|
72
|
+
- `ask` → project list picker (see gate file for spec + Picker 2 override). Skip Picker 2 if "Create new project".
|
|
73
|
+
|
|
74
|
+
### Logic
|
|
75
|
+
|
|
76
|
+
1. Call `muggle-remote-project-list` (only when not satisfied by the `always` cache).
|
|
77
|
+
2. Use `AskUserQuestion` to present projects as clickable options. Include the project URL in each label so the user can disambiguate. Always include "Create new project" as the last option.
|
|
77
78
|
3. Wait for explicit selection.
|
|
78
79
|
4. If the user picks "Create new project": collect `projectName`, `description`, and `url`, then call `muggle-remote-project-create`.
|
|
79
80
|
|
|
@@ -109,7 +110,7 @@ If after filtering the list is empty, congratulate the user — every test case
|
|
|
109
110
|
|
|
110
111
|
### Step 5 — Present and Confirm Selection
|
|
111
112
|
|
|
112
|
-
Use `
|
|
113
|
+
Use `AskUserQuestion` with `allow_multiple: true` to present every candidate test case as a clickable option. The user must explicitly approve which ones to regenerate.
|
|
113
114
|
|
|
114
115
|
For each option label, show enough context for the user to make a real decision:
|
|
115
116
|
|
|
@@ -122,12 +123,12 @@ For example:
|
|
|
122
123
|
- `[GENERATION_PENDING] Add item to cart — use case: Checkout Flow`
|
|
123
124
|
|
|
124
125
|
Default behavior:
|
|
125
|
-
- If there are **≤ 25** candidates, present all of them in a single `
|
|
126
|
+
- If there are **≤ 25** candidates, present all of them in a single `AskUserQuestion` with everything pre-checked and let the user deselect anything they want to skip.
|
|
126
127
|
- If there are **> 25** candidates, show the first 25 ranked by status priority (`DRAFT` → `GENERATION_PENDING`), plus a tail option **"Include all N — don't make me click each one"**. The user can also pick "Show next batch" to see more.
|
|
127
128
|
|
|
128
|
-
After selection, call `
|
|
129
|
+
After selection, call `AskUserQuestion` once more for a final confirmation:
|
|
129
130
|
|
|
130
|
-
> "About to start remote test script generation for **N** test cases against `<projectUrl>`. This will consume Muggle workflow budget. Proceed?"
|
|
131
|
+
> "About to start remote test script generation for **N** test cases against `<projectUrl>`. This will consume Muggle Test workflow budget. Proceed?"
|
|
131
132
|
>
|
|
132
133
|
> - "Yes, start all N"
|
|
133
134
|
> - "No, cancel"
|
|
@@ -164,6 +165,19 @@ Total: 17 dispatched | 16 started | 1 failed
|
|
|
164
165
|
|
|
165
166
|
For failures: include a one-line error excerpt from the item's error field and (where possible) a hint at the cause (e.g., "missing instructions field — edit the test case in the dashboard, then re-run this skill").
|
|
166
167
|
|
|
168
|
+
### Per-item failure routing (regen)
|
|
169
|
+
|
|
170
|
+
For every item with a non-success dispatch status, follow [`_shared/failure-mode-handling.md`](../_shared/failure-mode-handling.md) section C (regen failure buckets: `transient` / `infra` / `agent-course` / `product-uxux`).
|
|
171
|
+
|
|
172
|
+
Because this skill is bulk-dispatch (no live user attention per item), batch the routing — don't ask the user per item:
|
|
173
|
+
|
|
174
|
+
1. Group failed items by AI-classified bucket using the signal heuristics in the shared doc (most failures here will be `transient` or `infra` since dispatch failures rarely surface product-uxux signals).
|
|
175
|
+
2. Emit one `regen-failure-classified` event per failed item via `muggle-local-telemetry-event-emit`.
|
|
176
|
+
3. Present the buckets to the user via a single `AskUserQuestion` summarizing counts: e.g., "12 transient (recommend retry), 3 infra (recommend report-bug). What do you want to do?" Options: "Retry transient items", "Report all to Muggle AI", "muggle-feedback for selected items", "Skip — leave them as-is".
|
|
177
|
+
4. Emit one `regen-failure-resolved` event per item with the user's batch decision applied.
|
|
178
|
+
|
|
179
|
+
Bulk regen does not run replays, so the section B (replay) router does not apply here.
|
|
180
|
+
|
|
167
181
|
### Step 8 — Open the Dashboard
|
|
168
182
|
|
|
169
183
|
Open the Muggle AI dashboard so the user can watch progress visually:
|
|
@@ -202,11 +216,11 @@ Add item to cart rt-ghi789 COMPLETED 12
|
|
|
202
216
|
|
|
203
217
|
## Non-negotiables
|
|
204
218
|
|
|
205
|
-
- **The user MUST select the project** — present projects via `
|
|
206
|
-
- **The user MUST approve which test cases to regenerate** — show the candidates via `
|
|
219
|
+
- **The user MUST select the project** — present projects via `AskUserQuestion`, never infer from cwd, repo name, or URL guesses.
|
|
220
|
+
- **The user MUST approve which test cases to regenerate** — show the candidates via `AskUserQuestion`, let them deselect, then confirm again before any dispatch. Bulk-regenerating without approval can waste meaningful workflow budget.
|
|
207
221
|
- **Default filter is `DRAFT` + `GENERATION_PENDING`** — never include `GENERATING`, `ACTIVE`, `DEPRECATED`, `ARCHIVED`, `REPLAYING`, or `REPLAY_PENDING` unless the user explicitly says so. `GENERATING` already has a workflow in flight and dispatching another races against it. `ACTIVE` test cases already have working scripts. The rest reflect deliberate user decisions or in-flight replays the skill should not interfere with.
|
|
208
222
|
- **Use the bulk endpoint for dispatch** — call `muggle-remote-workflow-start-test-script-generation-bulk` once with all selected test case IDs rather than dispatching one-by-one. The backend resolves full test case details internally.
|
|
209
223
|
- **Failures don't abort the batch** — the bulk API returns per-item status. Surface failures in the report. Partial progress beats no progress.
|
|
210
224
|
- **Open the dashboard, don't poll by default** — the runs page is the canonical view of progress. Only poll if the user explicitly asks.
|
|
211
|
-
- **Use `
|
|
225
|
+
- **Use `AskUserQuestion` for every selection** — never ask the user to type a number.
|
|
212
226
|
- **Can be invoked at any state** — if the user already has a project chosen in conversation context, skip Step 2 and go straight to scanning.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"skill_name": "muggle-test-regenerate-missing",
|
|
3
|
-
"notes": "These evals test the PLAN behavior. Because Muggle MCP tools require live auth and a real project, the subagents can't actually execute the workflow — each prompt tells them to write a step-by-step plan instead. The assertions check whether the plan reflects the skill's non-negotiables (correct filter,
|
|
3
|
+
"notes": "These evals test the PLAN behavior. Because Muggle MCP tools require live auth and a real project, the subagents can't actually execute the workflow — each prompt tells them to write a step-by-step plan instead. The assertions check whether the plan reflects the skill's non-negotiables (correct filter, AskUserQuestion-based selection, no auto-select, dispatch via the remote workflow tool, batch-failure tolerance, dashboard open-at-end).",
|
|
4
4
|
"evals": [
|
|
5
5
|
{
|
|
6
6
|
"id": 0,
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"files": [],
|
|
10
10
|
"assertions": [
|
|
11
11
|
{ "name": "calls_auth_status_first", "text": "Plan starts by calling muggle-remote-auth-status (and login/poll if needed) before any other Muggle tool." },
|
|
12
|
-
{ "name": "project_selection_via_AskQuestion", "text": "Plan calls muggle-remote-project-list and presents projects via
|
|
12
|
+
{ "name": "project_selection_via_AskQuestion", "text": "Plan calls muggle-remote-project-list and presents projects via AskUserQuestion rather than auto-selecting 'Acme Checkout QA' by name match." },
|
|
13
13
|
{ "name": "default_filter_is_draft_and_generation_pending", "text": "Plan states that the status filter is DRAFT + GENERATION_PENDING and explicitly excludes GENERATING, ACTIVE, DEPRECATED, ARCHIVED, REPLAYING, and REPLAY_PENDING." },
|
|
14
14
|
{ "name": "uses_test_case_list_paginated", "text": "Plan calls muggle-remote-test-case-list with pagination (or equivalent full-enumeration) for the project scan step." },
|
|
15
15
|
{ "name": "test_case_get_before_dispatch", "text": "Plan calls muggle-remote-test-case-get for each candidate before dispatching generation, to obtain the full payload (goal, precondition, instructions, expectedResult, url)." },
|
|
16
16
|
{ "name": "dispatch_via_remote_workflow_tool", "text": "Plan dispatches each regeneration via muggle-remote-workflow-start-test-script-generation (not a local Electron tool)." },
|
|
17
|
-
{ "name": "candidate_list_via_AskQuestion_multi_select", "text": "Plan presents the candidate test cases via
|
|
18
|
-
{ "name": "final_confirmation_step", "text": "Plan includes a final yes/no confirmation
|
|
17
|
+
{ "name": "candidate_list_via_AskQuestion_multi_select", "text": "Plan presents the candidate test cases via AskUserQuestion with multi-select (allow_multiple: true) so the user can deselect individuals." },
|
|
18
|
+
{ "name": "final_confirmation_step", "text": "Plan includes a final yes/no confirmation AskUserQuestion before any dispatch, showing the count of test cases about to be regenerated." },
|
|
19
19
|
{ "name": "batch_failure_tolerance", "text": "Plan explicitly states that a single dispatch failure does not abort the batch — failures are logged and the loop continues." },
|
|
20
20
|
{ "name": "opens_dashboard_runs_page_at_end", "text": "Plan ends by opening the Muggle dashboard project runs page for the user to watch progress." }
|
|
21
21
|
]
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"files": [],
|
|
28
28
|
"assertions": [
|
|
29
29
|
{ "name": "calls_auth_status_first", "text": "Plan starts by calling muggle-remote-auth-status before any other Muggle tool." },
|
|
30
|
-
{ "name": "project_selection_via_AskQuestion", "text": "Plan uses
|
|
30
|
+
{ "name": "project_selection_via_AskQuestion", "text": "Plan uses AskUserQuestion to let the user confirm project choice; does not auto-select 'Tanka Staging' by name match alone." },
|
|
31
31
|
{ "name": "honors_override_to_include_generating", "text": "Plan explicitly honors the user's override and includes GENERATING in the filter for this run, noting that this is a deliberate override of the default filter." },
|
|
32
32
|
{ "name": "still_excludes_active_deprecated_archived", "text": "Even with the override, the plan still excludes ACTIVE, DEPRECATED, ARCHIVED, REPLAY_PENDING, and REPLAYING — it only widens the filter to include GENERATING, not everything." },
|
|
33
33
|
{ "name": "handles_large_candidate_list", "text": "Plan acknowledges that with ~200 test cases the candidate list may exceed 25 and describes paging or bulk-include handling (e.g., 'Include all N' tail option)." },
|
|
34
34
|
{ "name": "dispatch_via_remote_workflow_tool", "text": "Plan dispatches each regeneration via muggle-remote-workflow-start-test-script-generation." },
|
|
35
|
-
{ "name": "final_confirmation_step", "text": "Plan includes a final yes/no
|
|
35
|
+
{ "name": "final_confirmation_step", "text": "Plan includes a final yes/no AskUserQuestion confirmation before any dispatch, showing the total count." },
|
|
36
36
|
{ "name": "batch_failure_tolerance", "text": "Plan states that a single dispatch failure does not abort the batch." },
|
|
37
37
|
{ "name": "opens_dashboard_runs_page_at_end", "text": "Plan ends by opening the Muggle dashboard project runs page." }
|
|
38
38
|
]
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"files": [],
|
|
45
45
|
"assertions": [
|
|
46
46
|
{ "name": "calls_auth_status_first", "text": "Plan starts by calling muggle-remote-auth-status before any other Muggle tool." },
|
|
47
|
-
{ "name": "project_selection_via_AskQuestion", "text": "Plan uses
|
|
47
|
+
{ "name": "project_selection_via_AskQuestion", "text": "Plan uses AskUserQuestion to let the user pick the project — does not infer it." },
|
|
48
48
|
{ "name": "default_filter_is_draft_and_generation_pending", "text": "Plan states that the status filter is DRAFT + GENERATION_PENDING by default." },
|
|
49
|
-
{ "name": "small_list_all_preselected", "text": "Plan describes presenting all candidates in a single
|
|
49
|
+
{ "name": "small_list_all_preselected", "text": "Plan describes presenting all candidates in a single AskUserQuestion with everything pre-checked (since the candidate list is ≤ 25)." },
|
|
50
50
|
{ "name": "test_case_get_before_dispatch", "text": "Plan calls muggle-remote-test-case-get for each candidate before dispatching generation." },
|
|
51
51
|
{ "name": "dispatch_via_remote_workflow_tool", "text": "Plan dispatches each regeneration via muggle-remote-workflow-start-test-script-generation." },
|
|
52
|
-
{ "name": "final_confirmation_step", "text": "Plan includes a final yes/no
|
|
52
|
+
{ "name": "final_confirmation_step", "text": "Plan includes a final yes/no AskUserQuestion confirmation before any dispatch." },
|
|
53
53
|
{ "name": "batch_failure_tolerance", "text": "Plan states that a single dispatch failure does not abort the batch." },
|
|
54
54
|
{ "name": "opens_dashboard_runs_page_at_end", "text": "Plan ends by opening the Muggle dashboard project runs page." }
|
|
55
55
|
]
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-upgrade
|
|
3
|
-
description: Update Muggle AI to latest version. Use when user types muggle upgrade or asks to update Muggle tools.
|
|
3
|
+
description: Update Muggle AI to latest version. Use when user types muggle upgrade or asks to update Muggle Test tools.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Muggle Upgrade
|
|
6
|
+
# Muggle Test Upgrade
|
|
7
|
+
|
|
8
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-upgrade"`.
|
|
7
9
|
|
|
8
10
|
Update all Muggle AI components to the latest published version. This means **both** the `@muggleai/works` CLI on npm **and** the Electron runner the CLI manages.
|
|
9
11
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-works-npm-release
|
|
3
3
|
description: >-
|
|
4
|
-
Cut @muggleai/works release:
|
|
4
|
+
Cut @muggleai/works release: AskUserQuestion (major/minor/patch), sync master, stop if
|
|
5
5
|
nothing ships, semver baseline + Electron from GitHub, confirm plan, bump
|
|
6
6
|
package.json + sync:versions, full local verify, chore(release) PR, merge via gh,
|
|
7
7
|
dispatch publish-works-to-npm.yml—no local npm publish.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Muggle Works — npm release (single playbook)
|
|
10
|
+
# Muggle Test Works — npm release (single playbook)
|
|
11
|
+
|
|
12
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-works-npm-release"`.
|
|
11
13
|
|
|
12
14
|
Repo: **`multiplex-ai/muggle-ai-works`**. Workflow: **`.github/workflows/publish-works-to-npm.yml`** (“Publish Works to npm”). **Never** run local **`npm publish`** (OIDC trusted publishing in CI).
|
|
13
15
|
|
|
@@ -17,7 +19,7 @@ Repo: **`multiplex-ai/muggle-ai-works`**. Workflow: **`.github/workflows/publish
|
|
|
17
19
|
|
|
18
20
|
**Stop until the user answers.**
|
|
19
21
|
|
|
20
|
-
**Prefer `
|
|
22
|
+
**Prefer `AskUserQuestion`** with exactly these three options: **major**, **minor**, **patch** (fix). If the environment has no structured question tool, ask the same in plain text:
|
|
21
23
|
|
|
22
24
|
> Is this release a **major**, **minor**, or **patch** (fix)?
|
|
23
25
|
|
|
@@ -185,7 +187,7 @@ Give the user the **Actions run URL**. If npm lags, wait ~60s and retry.
|
|
|
185
187
|
## Rules
|
|
186
188
|
|
|
187
189
|
- **No local `npm publish`.**
|
|
188
|
-
- **Phase 1:** use **`
|
|
190
|
+
- **Phase 1:** use **`AskUserQuestion`** for major / minor / patch when available (see Phase 1).
|
|
189
191
|
- Phases 1–3: keep chat concise; Phase 4–5 can be terse status lines.
|
|
190
192
|
- If the user cancels after Phase 3, **do not** merge or dispatch CI.
|
|
191
193
|
- **Tag vs npm:** **`v*`** tags are for the **npm** package; **`electron-app-v*`** is separate — **`electronAppVersion`** can move independently of **`version`**.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mupgrade
|
|
3
|
+
description: Explicit short alias for the `muggle-upgrade` skill. ONLY invoke when the user explicitly types `mupgrade` or `/mupgrade` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mupgrade — alias for muggle-upgrade
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-upgrade` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "4.
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-
|
|
2
|
+
"release": "4.10.1",
|
|
3
|
+
"buildId": "run-32-1",
|
|
4
|
+
"commitSha": "8be7ac283bd1924e1d2e2df90f214a40d85a3038",
|
|
5
|
+
"buildTime": "2026-05-13T18:34:37Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_PREFERENCES, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, buildElectronAppChecksumsUrl, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, calculateFileChecksum, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports as e2e, formatPreferencesOneLiner, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getPlatformKey, getQaTools, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, mcp_exports as mcp, openBrowserUrl, performLogin, performLogout, pollDeviceCode, e2e_exports as qa, readGlobalPreferences, readProjectPreferences, resetConfig, resetLogger, resetPreference, resolveElectronAppPathOrNull, resolvePreferences, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences } from './chunk-ZKRHFTIC.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muggleai/works",
|
|
3
3
|
"mcpName": "io.github.multiplex-ai/muggle",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.10.1",
|
|
5
5
|
"description": "Ship quality products with AI-powered E2E acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"clean": "rimraf dist",
|
|
19
|
-
"build": "tsup && node scripts/write-release-manifest.mjs && node scripts/sync-versions.mjs && node scripts/build-plugin.mjs",
|
|
19
|
+
"build": "tsup && node scripts/strip-telemetry-comments.mjs && node scripts/write-release-manifest.mjs && node scripts/sync-versions.mjs && node scripts/build-plugin.mjs",
|
|
20
20
|
"build:plugin": "node scripts/build-plugin.mjs",
|
|
21
21
|
"sync:versions": "node scripts/sync-versions.mjs",
|
|
22
22
|
"build:release": "npm run build",
|
|
@@ -41,29 +41,31 @@
|
|
|
41
41
|
"test:watch": "vitest"
|
|
42
42
|
},
|
|
43
43
|
"muggleConfig": {
|
|
44
|
-
"electronAppVersion": "1.0.
|
|
44
|
+
"electronAppVersion": "1.0.82",
|
|
45
45
|
"downloadBaseUrl": "https://github.com/multiplex-ai/muggle-ai-works/releases/download",
|
|
46
46
|
"runtimeTargetDefault": "production",
|
|
47
47
|
"checksums": {
|
|
48
|
-
"darwin-arm64": "
|
|
49
|
-
"darwin-x64": "
|
|
50
|
-
"win32-x64": "
|
|
51
|
-
"linux-x64": "
|
|
48
|
+
"darwin-arm64": "ceab8a6ea1982cff9385896d392519ef2b5545d3f99e1409eec247e888334b02",
|
|
49
|
+
"darwin-x64": "423b23d98a2858c7e4d203133aab586bbc5014b7cd50a4aa7125803ccaf7deed",
|
|
50
|
+
"win32-x64": "c231ae9ae512ab97d3ee7980309a807c31b9d8033daab47c50bc1d6f4c112e4f",
|
|
51
|
+
"linux-x64": "0dd15add46ca7bed5ad8e4d4cb751c63506b9dbb2eec294d9039426baeba8c32"
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
56
56
|
"@muggleai/mcp": "file:packages/mcps",
|
|
57
57
|
"@muggleai/workflows": "file:packages/workflows",
|
|
58
|
+
"applicationinsights": "^3.14.0",
|
|
58
59
|
"axios": "^1.7.9",
|
|
59
60
|
"commander": "^14.0.3",
|
|
60
61
|
"open": "^11.0.0",
|
|
61
62
|
"ulid": "^3.0.2",
|
|
62
|
-
"uuid": "^
|
|
63
|
+
"uuid": "^14.0.0",
|
|
63
64
|
"winston": "^3.17.0",
|
|
64
65
|
"zod": "^4.3.6"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.133",
|
|
67
69
|
"@eslint/js": "^10.0.1",
|
|
68
70
|
"@types/node": "^25.5.2",
|
|
69
71
|
"@types/uuid": "^11.0.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Run real-browser end-to-end (E2E) acceptance tests on your web app from any AI coding agent. Generate test scripts from plain English, replay them on localhost, capture screenshots, and validate user flows like signup, checkout, and dashboards. Works across Claude Code, Cursor, Codex, and Windsurf.",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.10.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Ship quality products with AI-powered end-to-end (E2E) acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.10.1",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/README.md
CHANGED
|
@@ -15,7 +15,7 @@ For npm installs:
|
|
|
15
15
|
npm install -g @muggleai/works
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
This updates the CLI, configures Cursor MCP (`~/.cursor/mcp.json`), and syncs `muggle-*` skills into `~/.cursor/skills/`. Claude slash commands remain plugin-managed, so use `/plugin update muggleai@muggle-works` to refresh them.
|
|
18
|
+
This updates the CLI, configures Cursor MCP (`~/.cursor/mcp.json`), and syncs `muggle-*` skills (plus their short `m*` aliases) into `~/.cursor/skills/`. Claude slash commands remain plugin-managed, so use `/plugin update muggleai@muggle-works` to refresh them.
|
|
19
19
|
|
|
20
20
|
## Skills
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ Type `muggle` to discover the full command family.
|
|
|
23
23
|
|
|
24
24
|
| Skill | What it does |
|
|
25
25
|
|:---|:---|
|
|
26
|
-
| `/muggle:muggle` | Router and menu for all Muggle commands. |
|
|
26
|
+
| `/muggle:muggle` | Router and menu for all Muggle Test commands. |
|
|
27
27
|
| `/muggle:muggle-do` | Autonomous dev pipeline: requirements, code, unit tests, E2E acceptance tests, PR. |
|
|
28
28
|
| `/muggle:muggle-test` | Change-driven E2E acceptance router: detects code changes, maps to use cases, runs test generation locally or remotely, publishes to dashboard, opens in browser, posts E2E acceptance results to PR. |
|
|
29
29
|
| `/muggle:muggle-test-feature-local` | Test a feature on localhost with AI-driven browser automation. Offers publish to cloud after each run. |
|
|
@@ -33,6 +33,8 @@ Type `muggle` to discover the full command family.
|
|
|
33
33
|
| `/muggle:muggle-repair` | Diagnose and fix broken installation automatically. |
|
|
34
34
|
| `/muggle:muggle-upgrade` | Update Electron browser test runner and MCP server to latest version. |
|
|
35
35
|
|
|
36
|
+
Each skill above also ships a short alias to save typing — `m` (router), `mtest`, `mdo`, `mpr`, `mprefs`, `mstatus`, `mrepair`, `mupgrade`, `mfeedback`, `mimport`, `mtestlocal`, `mtestprep`, `mregen`, `mrelease`. Type `/m` (Claude Code) or `m` (Cursor) to open the menu, or jump straight to one (e.g. `/mtest`).
|
|
37
|
+
|
|
36
38
|
## MCP Tools
|
|
37
39
|
|
|
38
40
|
The plugin ships an MCP server with 70+ tools for project management, test case generation, browser automation, and reporting. The server starts automatically when the plugin is enabled.
|