@muggleai/works 4.10.0 → 4.11.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.
- package/README.md +3 -3
- package/dist/{chunk-RK6XKSZK.js → chunk-Q7WNEMN4.js} +109 -43
- package/dist/{chunk-UVXOHXY2.js → chunk-ZKRHFTIC.js} +832 -89
- 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 +35 -8
- 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/pr-followup-helpers.md +150 -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/build.md +51 -0
- package/dist/plugin/skills/do/e2e-acceptance.md +64 -19
- package/dist/plugin/skills/do/impact-analysis.md +47 -7
- package/dist/plugin/skills/do/open-prs.md +72 -74
- package/dist/plugin/skills/do/pre-flight.md +21 -14
- package/dist/plugin/skills/do/requirements.md +2 -2
- package/dist/plugin/skills/do/unit-tests.md +2 -2
- 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 +9 -6
- package/dist/plugin/skills/muggle-do/SKILL.md +36 -61
- package/dist/plugin/skills/muggle-do-task/SKILL.md +134 -0
- package/dist/plugin/skills/muggle-feedback/SKILL.md +39 -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 +130 -0
- package/dist/plugin/skills/muggle-pr-followup/SKILL.md +59 -0
- package/dist/plugin/skills/muggle-pr-followup/contract.md +191 -0
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/SKILL.md +68 -43
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +86 -0
- package/dist/plugin/skills/muggle-preferences/SKILL.md +16 -108
- 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 +1 -1
- 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 +3 -3
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoE2ETest.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoLogin.md +1 -1
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoPublishLocalResults.md +2 -2
- 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 +1 -2
- package/dist/plugin/skills/muggle-preferences/preference-gates/autoUseWorktree.md +11 -0
- package/dist/plugin/skills/muggle-preferences/preference-gates/checkForUpdates.md +4 -4
- package/dist/plugin/skills/muggle-preferences/preference-gates/defaultExecutionMode.md +1 -1
- package/dist/plugin/skills/muggle-preferences/preference-gates/openTestResultsAfterRun.md +1 -1
- package/dist/plugin/skills/muggle-preferences/preference-gates/postPRVisualWalkthrough.md +8 -25
- package/dist/plugin/skills/muggle-preferences/preference-gates/showElectronBrowser.md +1 -1
- package/dist/plugin/skills/muggle-preferences/preference-gates/suggestRelatedTestCases.md +4 -4
- package/dist/plugin/skills/muggle-preferences/preference-gates/suggestRelatedUseCases.md +4 -4
- package/dist/plugin/skills/muggle-repair/SKILL.md +4 -2
- package/dist/plugin/skills/muggle-status/SKILL.md +8 -5
- package/dist/plugin/skills/muggle-test/SKILL.md +110 -86
- package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +83 -62
- package/dist/plugin/skills/muggle-test-import/SKILL.md +28 -23
- package/dist/plugin/skills/muggle-test-prepare/SKILL.md +79 -18
- package/dist/plugin/skills/muggle-test-regenerate-missing/SKILL.md +34 -18
- 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-GD3YFCCW.js → src-2G7ENRGI.js} +1 -1
- package/package.json +9 -7
- 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 +35 -8
- 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/pr-followup-helpers.md +150 -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/build.md +51 -0
- package/plugin/skills/do/e2e-acceptance.md +64 -19
- package/plugin/skills/do/impact-analysis.md +47 -7
- package/plugin/skills/do/open-prs.md +72 -74
- package/plugin/skills/do/pre-flight.md +21 -14
- package/plugin/skills/do/requirements.md +2 -2
- package/plugin/skills/do/unit-tests.md +2 -2
- 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 +9 -6
- package/plugin/skills/muggle-do/SKILL.md +36 -61
- package/plugin/skills/muggle-do-task/SKILL.md +134 -0
- package/plugin/skills/muggle-feedback/SKILL.md +39 -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 +130 -0
- package/plugin/skills/muggle-pr-followup/SKILL.md +59 -0
- package/plugin/skills/muggle-pr-followup/contract.md +191 -0
- package/plugin/skills/muggle-pr-visual-walkthrough/SKILL.md +68 -43
- package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +86 -0
- package/plugin/skills/muggle-preferences/SKILL.md +16 -108
- 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 +1 -1
- 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 +3 -3
- package/plugin/skills/muggle-preferences/preference-gates/autoE2ETest.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/autoLogin.md +1 -1
- package/plugin/skills/muggle-preferences/preference-gates/autoPublishLocalResults.md +2 -2
- 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 +1 -2
- package/plugin/skills/muggle-preferences/preference-gates/autoUseWorktree.md +11 -0
- package/plugin/skills/muggle-preferences/preference-gates/checkForUpdates.md +4 -4
- package/plugin/skills/muggle-preferences/preference-gates/defaultExecutionMode.md +1 -1
- package/plugin/skills/muggle-preferences/preference-gates/openTestResultsAfterRun.md +1 -1
- package/plugin/skills/muggle-preferences/preference-gates/postPRVisualWalkthrough.md +8 -25
- package/plugin/skills/muggle-preferences/preference-gates/showElectronBrowser.md +1 -1
- package/plugin/skills/muggle-preferences/preference-gates/suggestRelatedTestCases.md +4 -4
- package/plugin/skills/muggle-preferences/preference-gates/suggestRelatedUseCases.md +4 -4
- package/plugin/skills/muggle-repair/SKILL.md +4 -2
- package/plugin/skills/muggle-status/SKILL.md +8 -5
- package/plugin/skills/muggle-test/SKILL.md +110 -86
- package/plugin/skills/muggle-test-feature-local/SKILL.md +83 -62
- package/plugin/skills/muggle-test-import/SKILL.md +28 -23
- package/plugin/skills/muggle-test-prepare/SKILL.md +79 -18
- package/plugin/skills/muggle-test-regenerate-missing/SKILL.md +34 -18
- 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/plugin/skills/do/validate-code.md +0 -38
- package/plugin/skills/do/validate-code.md +0 -38
|
@@ -1,13 +1,15 @@
|
|
|
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
|
|
|
@@ -16,11 +18,11 @@ Gates run per `preference-gates/README.md`.
|
|
|
16
18
|
| Preference | Step | Decision it gates |
|
|
17
19
|
|------------|------|-------------------|
|
|
18
20
|
| `autoLogin` | 1 | Reuse saved credentials when auth is required |
|
|
19
|
-
| `autoSelectProject` | 2 | Reuse last-used Muggle project for this repo |
|
|
21
|
+
| `autoSelectProject` | 2 | Reuse last-used Muggle Test project for this repo |
|
|
20
22
|
|
|
21
23
|
## Concept: what counts as "no active script"
|
|
22
24
|
|
|
23
|
-
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:
|
|
24
26
|
|
|
25
27
|
| Status | Meaning | Regenerate? |
|
|
26
28
|
|:-------|:--------|:-----------:|
|
|
@@ -38,9 +40,9 @@ Treat this filter as a default, not a law. If the user explicitly says "include
|
|
|
38
40
|
|
|
39
41
|
## UX Guidelines — Minimize Typing
|
|
40
42
|
|
|
41
|
-
**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.
|
|
42
44
|
|
|
43
|
-
- **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.
|
|
44
46
|
- **Free-text inputs** (project URL when creating, override filters): Only ask as plain text when the option set isn't finite.
|
|
45
47
|
- **Batch related questions** when independent. Don't ask sequentially what could be one screen.
|
|
46
48
|
|
|
@@ -50,8 +52,9 @@ Treat this filter as a default, not a law. If the user explicitly says "include
|
|
|
50
52
|
|
|
51
53
|
1. Call `muggle-remote-auth-status`.
|
|
52
54
|
2. If **authenticated and not expired** → gate `autoLogin` (per `preference-gates/README.md`):
|
|
53
|
-
-
|
|
54
|
-
-
|
|
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.
|
|
55
58
|
3. If **not authenticated or expired** → call `muggle-remote-auth-login`, then poll with `muggle-remote-auth-poll`.
|
|
56
59
|
4. Do not skip auth and do not assume a stale token still works.
|
|
57
60
|
|
|
@@ -61,9 +64,9 @@ If auth keeps failing, suggest the user run `muggle logout && muggle login` from
|
|
|
61
64
|
|
|
62
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.
|
|
63
66
|
|
|
64
|
-
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 Last Project: id=… url=… name="…"` in session context.
|
|
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.
|
|
65
68
|
|
|
66
|
-
Gate `autoSelectProject` (per `preference-gates/README.md`). Cache: `Muggle Last Project` session line.
|
|
69
|
+
Gate `autoSelectProject` (per `preference-gates/README.md`). Cache: `Muggle Test Last Project` session line.
|
|
67
70
|
- `always` + cache → use cached `projectId`, proceed to Step 3. No cache → fall through to `ask`.
|
|
68
71
|
- `never` → full project list; skip Picker 2.
|
|
69
72
|
- `ask` → project list picker (see gate file for spec + Picker 2 override). Skip Picker 2 if "Create new project".
|
|
@@ -71,7 +74,7 @@ Gate `autoSelectProject` (per `preference-gates/README.md`). Cache: `Muggle Last
|
|
|
71
74
|
### Logic
|
|
72
75
|
|
|
73
76
|
1. Call `muggle-remote-project-list` (only when not satisfied by the `always` cache).
|
|
74
|
-
2. Use `
|
|
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.
|
|
75
78
|
3. Wait for explicit selection.
|
|
76
79
|
4. If the user picks "Create new project": collect `projectName`, `description`, and `url`, then call `muggle-remote-project-create`.
|
|
77
80
|
|
|
@@ -107,7 +110,7 @@ If after filtering the list is empty, congratulate the user — every test case
|
|
|
107
110
|
|
|
108
111
|
### Step 5 — Present and Confirm Selection
|
|
109
112
|
|
|
110
|
-
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.
|
|
111
114
|
|
|
112
115
|
For each option label, show enough context for the user to make a real decision:
|
|
113
116
|
|
|
@@ -120,12 +123,12 @@ For example:
|
|
|
120
123
|
- `[GENERATION_PENDING] Add item to cart — use case: Checkout Flow`
|
|
121
124
|
|
|
122
125
|
Default behavior:
|
|
123
|
-
- 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.
|
|
124
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.
|
|
125
128
|
|
|
126
|
-
After selection, call `
|
|
129
|
+
After selection, call `AskUserQuestion` once more for a final confirmation:
|
|
127
130
|
|
|
128
|
-
> "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?"
|
|
129
132
|
>
|
|
130
133
|
> - "Yes, start all N"
|
|
131
134
|
> - "No, cancel"
|
|
@@ -162,6 +165,19 @@ Total: 17 dispatched | 16 started | 1 failed
|
|
|
162
165
|
|
|
163
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").
|
|
164
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
|
+
|
|
165
181
|
### Step 8 — Open the Dashboard
|
|
166
182
|
|
|
167
183
|
Open the Muggle AI dashboard so the user can watch progress visually:
|
|
@@ -200,11 +216,11 @@ Add item to cart rt-ghi789 COMPLETED 12
|
|
|
200
216
|
|
|
201
217
|
## Non-negotiables
|
|
202
218
|
|
|
203
|
-
- **The user MUST select the project** — present projects via `
|
|
204
|
-
- **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.
|
|
205
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.
|
|
206
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.
|
|
207
223
|
- **Failures don't abort the batch** — the bulk API returns per-item status. Surface failures in the report. Partial progress beats no progress.
|
|
208
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.
|
|
209
|
-
- **Use `
|
|
225
|
+
- **Use `AskUserQuestion` for every selection** — never ask the user to type a number.
|
|
210
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.
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -34,6 +34,16 @@ const VERSION_OVERRIDE_FILE_NAME = "electron-app-version-override.json";
|
|
|
34
34
|
const CURSOR_SKILLS_DIRECTORY_NAME = ".cursor";
|
|
35
35
|
const CURSOR_SKILLS_SUBDIRECTORY_NAME = "skills";
|
|
36
36
|
const MUGGLE_SKILL_PREFIX = "muggle";
|
|
37
|
+
const ALIAS_SKILLS_MANIFEST_PATH = join(
|
|
38
|
+
dirname(fileURLToPath(import.meta.url)),
|
|
39
|
+
"..",
|
|
40
|
+
"plugin",
|
|
41
|
+
"skills",
|
|
42
|
+
"_aliases.json",
|
|
43
|
+
);
|
|
44
|
+
const MUGGLE_ALIAS_SKILLS = new Set(
|
|
45
|
+
JSON.parse(readFileSync(ALIAS_SKILLS_MANIFEST_PATH, "utf-8")).aliases,
|
|
46
|
+
);
|
|
37
47
|
|
|
38
48
|
/**
|
|
39
49
|
* Get the path to the postinstall log file.
|
|
@@ -241,7 +251,7 @@ function syncCursorSkills() {
|
|
|
241
251
|
continue;
|
|
242
252
|
}
|
|
243
253
|
|
|
244
|
-
if (!skillEntry.name.startsWith(MUGGLE_SKILL_PREFIX)) {
|
|
254
|
+
if (!skillEntry.name.startsWith(MUGGLE_SKILL_PREFIX) && !MUGGLE_ALIAS_SKILLS.has(skillEntry.name)) {
|
|
245
255
|
continue;
|
|
246
256
|
}
|
|
247
257
|
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Code Validation Agent (Stage 4/7)
|
|
2
|
-
|
|
3
|
-
You are validating that each repository's git state is ready for the dev cycle pipeline.
|
|
4
|
-
|
|
5
|
-
## Turn preamble
|
|
6
|
-
|
|
7
|
-
Start the turn with:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
**Stage 4/7 — Validate code** — checking branch and commit state for each repo with changes.
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Input
|
|
14
|
-
|
|
15
|
-
You receive:
|
|
16
|
-
- A list of repos with changes (from impact analysis), including their paths and branch names
|
|
17
|
-
|
|
18
|
-
## Your Job
|
|
19
|
-
|
|
20
|
-
For each repo:
|
|
21
|
-
|
|
22
|
-
1. **Verify the branch is a feature branch** (not main/master/the default branch). This should already be validated by impact analysis, but double-check.
|
|
23
|
-
2. **Check for uncommitted changes:** Run `git status --porcelain` in the repo. If there are uncommitted changes, warn the user — uncommitted changes won't be included in PRs.
|
|
24
|
-
3. **Get the branch diff:** Run `git diff <default-branch>...HEAD --stat` for a summary of changes.
|
|
25
|
-
4. **Verify commits exist on the branch:** Run `git log <default-branch>..HEAD --oneline` to confirm there are commits to push.
|
|
26
|
-
|
|
27
|
-
## Output
|
|
28
|
-
|
|
29
|
-
Per repo:
|
|
30
|
-
|
|
31
|
-
**Repo: (name)**
|
|
32
|
-
- Branch: (name)
|
|
33
|
-
- Commits on branch: (count and one-line summaries)
|
|
34
|
-
- Uncommitted changes: yes/no (with warning if yes)
|
|
35
|
-
- Diff stat: (file change summary)
|
|
36
|
-
- Status: READY | WARNING | ERROR
|
|
37
|
-
|
|
38
|
-
**Overall:** READY to proceed / BLOCKED (with reasons)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Code Validation Agent (Stage 4/7)
|
|
2
|
-
|
|
3
|
-
You are validating that each repository's git state is ready for the dev cycle pipeline.
|
|
4
|
-
|
|
5
|
-
## Turn preamble
|
|
6
|
-
|
|
7
|
-
Start the turn with:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
**Stage 4/7 — Validate code** — checking branch and commit state for each repo with changes.
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Input
|
|
14
|
-
|
|
15
|
-
You receive:
|
|
16
|
-
- A list of repos with changes (from impact analysis), including their paths and branch names
|
|
17
|
-
|
|
18
|
-
## Your Job
|
|
19
|
-
|
|
20
|
-
For each repo:
|
|
21
|
-
|
|
22
|
-
1. **Verify the branch is a feature branch** (not main/master/the default branch). This should already be validated by impact analysis, but double-check.
|
|
23
|
-
2. **Check for uncommitted changes:** Run `git status --porcelain` in the repo. If there are uncommitted changes, warn the user — uncommitted changes won't be included in PRs.
|
|
24
|
-
3. **Get the branch diff:** Run `git diff <default-branch>...HEAD --stat` for a summary of changes.
|
|
25
|
-
4. **Verify commits exist on the branch:** Run `git log <default-branch>..HEAD --oneline` to confirm there are commits to push.
|
|
26
|
-
|
|
27
|
-
## Output
|
|
28
|
-
|
|
29
|
-
Per repo:
|
|
30
|
-
|
|
31
|
-
**Repo: (name)**
|
|
32
|
-
- Branch: (name)
|
|
33
|
-
- Commits on branch: (count and one-line summaries)
|
|
34
|
-
- Uncommitted changes: yes/no (with warning if yes)
|
|
35
|
-
- Diff stat: (file change summary)
|
|
36
|
-
- Status: READY | WARNING | ERROR
|
|
37
|
-
|
|
38
|
-
**Overall:** READY to proceed / BLOCKED (with reasons)
|