@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.
Files changed (197) hide show
  1. package/README.md +3 -3
  2. package/dist/{chunk-RK6XKSZK.js → chunk-Q7WNEMN4.js} +109 -43
  3. package/dist/{chunk-UVXOHXY2.js → chunk-ZKRHFTIC.js} +832 -89
  4. package/dist/cli.js +2 -2
  5. package/dist/index.js +2 -2
  6. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  7. package/dist/plugin/.cursor-plugin/plugin.json +1 -1
  8. package/dist/plugin/README.md +4 -2
  9. package/dist/plugin/agents/acceptance-tester.md +24 -10
  10. package/dist/plugin/commands/m.md +7 -0
  11. package/dist/plugin/commands/mdo.md +7 -0
  12. package/dist/plugin/commands/mfeedback.md +7 -0
  13. package/dist/plugin/commands/mimport.md +7 -0
  14. package/dist/plugin/commands/mpr.md +7 -0
  15. package/dist/plugin/commands/mprefs.md +7 -0
  16. package/dist/plugin/commands/mregen.md +7 -0
  17. package/dist/plugin/commands/mrelease.md +7 -0
  18. package/dist/plugin/commands/mrepair.md +7 -0
  19. package/dist/plugin/commands/mstatus.md +7 -0
  20. package/dist/plugin/commands/mtest.md +7 -0
  21. package/dist/plugin/commands/mtestlocal.md +7 -0
  22. package/dist/plugin/commands/mtestprep.md +7 -0
  23. package/dist/plugin/commands/mupgrade.md +7 -0
  24. package/dist/plugin/scripts/ensure-electron-app.sh +35 -8
  25. package/dist/plugin/skills/_aliases.json +18 -0
  26. package/dist/plugin/skills/_shared/dev-server-readiness.md +231 -0
  27. package/dist/plugin/skills/_shared/failure-mode-handling.md +244 -0
  28. package/dist/plugin/skills/_shared/post-merge-cleanup.md +10 -0
  29. package/dist/plugin/skills/_shared/pr-followup-helpers.md +150 -0
  30. package/dist/plugin/skills/_shared/rebase-before-e2e.md +15 -0
  31. package/dist/plugin/skills/_shared/telemetry-emit.md +15 -0
  32. package/dist/plugin/skills/_shared/use-worktrees.md +53 -0
  33. package/dist/plugin/skills/do/build.md +51 -0
  34. package/dist/plugin/skills/do/e2e-acceptance.md +64 -19
  35. package/dist/plugin/skills/do/impact-analysis.md +47 -7
  36. package/dist/plugin/skills/do/open-prs.md +72 -74
  37. package/dist/plugin/skills/do/pre-flight.md +21 -14
  38. package/dist/plugin/skills/do/requirements.md +2 -2
  39. package/dist/plugin/skills/do/unit-tests.md +2 -2
  40. package/dist/plugin/skills/m/SKILL.md +8 -0
  41. package/dist/plugin/skills/mdo/SKILL.md +8 -0
  42. package/dist/plugin/skills/mfeedback/SKILL.md +8 -0
  43. package/dist/plugin/skills/mimport/SKILL.md +8 -0
  44. package/dist/plugin/skills/mpr/SKILL.md +8 -0
  45. package/dist/plugin/skills/mprefs/SKILL.md +8 -0
  46. package/dist/plugin/skills/mregen/SKILL.md +8 -0
  47. package/dist/plugin/skills/mrelease/SKILL.md +8 -0
  48. package/dist/plugin/skills/mrepair/SKILL.md +8 -0
  49. package/dist/plugin/skills/mstatus/SKILL.md +8 -0
  50. package/dist/plugin/skills/mtest/SKILL.md +8 -0
  51. package/dist/plugin/skills/mtestlocal/SKILL.md +8 -0
  52. package/dist/plugin/skills/mtestprep/SKILL.md +8 -0
  53. package/dist/plugin/skills/muggle/SKILL.md +9 -6
  54. package/dist/plugin/skills/muggle-do/SKILL.md +36 -61
  55. package/dist/plugin/skills/muggle-do-task/SKILL.md +134 -0
  56. package/dist/plugin/skills/muggle-feedback/SKILL.md +39 -0
  57. package/dist/plugin/skills/muggle-feedback/ops/delete.md +49 -0
  58. package/dist/plugin/skills/muggle-feedback/ops/list.md +65 -0
  59. package/dist/plugin/skills/muggle-feedback/ops/submit.md +130 -0
  60. package/dist/plugin/skills/muggle-pr-followup/SKILL.md +59 -0
  61. package/dist/plugin/skills/muggle-pr-followup/contract.md +191 -0
  62. package/dist/plugin/skills/muggle-pr-visual-walkthrough/SKILL.md +68 -43
  63. package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +86 -0
  64. package/dist/plugin/skills/muggle-preferences/SKILL.md +16 -108
  65. package/dist/plugin/skills/muggle-preferences/ops/change-one.md +10 -0
  66. package/dist/plugin/skills/muggle-preferences/ops/configure.md +49 -0
  67. package/dist/plugin/skills/muggle-preferences/ops/list.md +9 -0
  68. package/dist/plugin/skills/muggle-preferences/ops/reset.md +6 -0
  69. package/dist/plugin/skills/muggle-preferences/ops/set.md +10 -0
  70. package/dist/plugin/skills/muggle-preferences/preference-gates/README.md +1 -1
  71. package/dist/plugin/skills/muggle-preferences/preference-gates/autoCleanup.md +11 -0
  72. package/dist/plugin/skills/muggle-preferences/preference-gates/autoCreatePR.md +13 -0
  73. package/dist/plugin/skills/muggle-preferences/preference-gates/autoDetectChanges.md +3 -3
  74. package/dist/plugin/skills/muggle-preferences/preference-gates/autoE2ETest.md +11 -0
  75. package/dist/plugin/skills/muggle-preferences/preference-gates/autoLogin.md +1 -1
  76. package/dist/plugin/skills/muggle-preferences/preference-gates/autoPublishLocalResults.md +2 -2
  77. package/dist/plugin/skills/muggle-preferences/preference-gates/autoRebase.md +11 -0
  78. package/dist/plugin/skills/muggle-preferences/preference-gates/autoSelectLocalHost.md +19 -0
  79. package/dist/plugin/skills/muggle-preferences/preference-gates/autoSelectProject.md +1 -2
  80. package/dist/plugin/skills/muggle-preferences/preference-gates/autoUseWorktree.md +11 -0
  81. package/dist/plugin/skills/muggle-preferences/preference-gates/checkForUpdates.md +4 -4
  82. package/dist/plugin/skills/muggle-preferences/preference-gates/defaultExecutionMode.md +1 -1
  83. package/dist/plugin/skills/muggle-preferences/preference-gates/openTestResultsAfterRun.md +1 -1
  84. package/dist/plugin/skills/muggle-preferences/preference-gates/postPRVisualWalkthrough.md +8 -25
  85. package/dist/plugin/skills/muggle-preferences/preference-gates/showElectronBrowser.md +1 -1
  86. package/dist/plugin/skills/muggle-preferences/preference-gates/suggestRelatedTestCases.md +4 -4
  87. package/dist/plugin/skills/muggle-preferences/preference-gates/suggestRelatedUseCases.md +4 -4
  88. package/dist/plugin/skills/muggle-repair/SKILL.md +4 -2
  89. package/dist/plugin/skills/muggle-status/SKILL.md +8 -5
  90. package/dist/plugin/skills/muggle-test/SKILL.md +110 -86
  91. package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +83 -62
  92. package/dist/plugin/skills/muggle-test-import/SKILL.md +28 -23
  93. package/dist/plugin/skills/muggle-test-prepare/SKILL.md +79 -18
  94. package/dist/plugin/skills/muggle-test-regenerate-missing/SKILL.md +34 -18
  95. package/dist/plugin/skills/muggle-test-regenerate-missing/evals/evals.json +9 -9
  96. package/dist/plugin/skills/muggle-upgrade/SKILL.md +4 -2
  97. package/dist/plugin/skills/muggle-works-npm-release/SKILL.md +6 -4
  98. package/dist/plugin/skills/mupgrade/SKILL.md +8 -0
  99. package/dist/release-manifest.json +4 -4
  100. package/dist/{src-GD3YFCCW.js → src-2G7ENRGI.js} +1 -1
  101. package/package.json +9 -7
  102. package/plugin/.claude-plugin/plugin.json +1 -1
  103. package/plugin/.cursor-plugin/plugin.json +1 -1
  104. package/plugin/README.md +4 -2
  105. package/plugin/agents/acceptance-tester.md +24 -10
  106. package/plugin/commands/m.md +7 -0
  107. package/plugin/commands/mdo.md +7 -0
  108. package/plugin/commands/mfeedback.md +7 -0
  109. package/plugin/commands/mimport.md +7 -0
  110. package/plugin/commands/mpr.md +7 -0
  111. package/plugin/commands/mprefs.md +7 -0
  112. package/plugin/commands/mregen.md +7 -0
  113. package/plugin/commands/mrelease.md +7 -0
  114. package/plugin/commands/mrepair.md +7 -0
  115. package/plugin/commands/mstatus.md +7 -0
  116. package/plugin/commands/mtest.md +7 -0
  117. package/plugin/commands/mtestlocal.md +7 -0
  118. package/plugin/commands/mtestprep.md +7 -0
  119. package/plugin/commands/mupgrade.md +7 -0
  120. package/plugin/scripts/ensure-electron-app.sh +35 -8
  121. package/plugin/skills/_aliases.json +18 -0
  122. package/plugin/skills/_shared/dev-server-readiness.md +231 -0
  123. package/plugin/skills/_shared/failure-mode-handling.md +244 -0
  124. package/plugin/skills/_shared/post-merge-cleanup.md +10 -0
  125. package/plugin/skills/_shared/pr-followup-helpers.md +150 -0
  126. package/plugin/skills/_shared/rebase-before-e2e.md +15 -0
  127. package/plugin/skills/_shared/telemetry-emit.md +15 -0
  128. package/plugin/skills/_shared/use-worktrees.md +53 -0
  129. package/plugin/skills/do/build.md +51 -0
  130. package/plugin/skills/do/e2e-acceptance.md +64 -19
  131. package/plugin/skills/do/impact-analysis.md +47 -7
  132. package/plugin/skills/do/open-prs.md +72 -74
  133. package/plugin/skills/do/pre-flight.md +21 -14
  134. package/plugin/skills/do/requirements.md +2 -2
  135. package/plugin/skills/do/unit-tests.md +2 -2
  136. package/plugin/skills/m/SKILL.md +8 -0
  137. package/plugin/skills/mdo/SKILL.md +8 -0
  138. package/plugin/skills/mfeedback/SKILL.md +8 -0
  139. package/plugin/skills/mimport/SKILL.md +8 -0
  140. package/plugin/skills/mpr/SKILL.md +8 -0
  141. package/plugin/skills/mprefs/SKILL.md +8 -0
  142. package/plugin/skills/mregen/SKILL.md +8 -0
  143. package/plugin/skills/mrelease/SKILL.md +8 -0
  144. package/plugin/skills/mrepair/SKILL.md +8 -0
  145. package/plugin/skills/mstatus/SKILL.md +8 -0
  146. package/plugin/skills/mtest/SKILL.md +8 -0
  147. package/plugin/skills/mtestlocal/SKILL.md +8 -0
  148. package/plugin/skills/mtestprep/SKILL.md +8 -0
  149. package/plugin/skills/muggle/SKILL.md +9 -6
  150. package/plugin/skills/muggle-do/SKILL.md +36 -61
  151. package/plugin/skills/muggle-do-task/SKILL.md +134 -0
  152. package/plugin/skills/muggle-feedback/SKILL.md +39 -0
  153. package/plugin/skills/muggle-feedback/ops/delete.md +49 -0
  154. package/plugin/skills/muggle-feedback/ops/list.md +65 -0
  155. package/plugin/skills/muggle-feedback/ops/submit.md +130 -0
  156. package/plugin/skills/muggle-pr-followup/SKILL.md +59 -0
  157. package/plugin/skills/muggle-pr-followup/contract.md +191 -0
  158. package/plugin/skills/muggle-pr-visual-walkthrough/SKILL.md +68 -43
  159. package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +86 -0
  160. package/plugin/skills/muggle-preferences/SKILL.md +16 -108
  161. package/plugin/skills/muggle-preferences/ops/change-one.md +10 -0
  162. package/plugin/skills/muggle-preferences/ops/configure.md +49 -0
  163. package/plugin/skills/muggle-preferences/ops/list.md +9 -0
  164. package/plugin/skills/muggle-preferences/ops/reset.md +6 -0
  165. package/plugin/skills/muggle-preferences/ops/set.md +10 -0
  166. package/plugin/skills/muggle-preferences/preference-gates/README.md +1 -1
  167. package/plugin/skills/muggle-preferences/preference-gates/autoCleanup.md +11 -0
  168. package/plugin/skills/muggle-preferences/preference-gates/autoCreatePR.md +13 -0
  169. package/plugin/skills/muggle-preferences/preference-gates/autoDetectChanges.md +3 -3
  170. package/plugin/skills/muggle-preferences/preference-gates/autoE2ETest.md +11 -0
  171. package/plugin/skills/muggle-preferences/preference-gates/autoLogin.md +1 -1
  172. package/plugin/skills/muggle-preferences/preference-gates/autoPublishLocalResults.md +2 -2
  173. package/plugin/skills/muggle-preferences/preference-gates/autoRebase.md +11 -0
  174. package/plugin/skills/muggle-preferences/preference-gates/autoSelectLocalHost.md +19 -0
  175. package/plugin/skills/muggle-preferences/preference-gates/autoSelectProject.md +1 -2
  176. package/plugin/skills/muggle-preferences/preference-gates/autoUseWorktree.md +11 -0
  177. package/plugin/skills/muggle-preferences/preference-gates/checkForUpdates.md +4 -4
  178. package/plugin/skills/muggle-preferences/preference-gates/defaultExecutionMode.md +1 -1
  179. package/plugin/skills/muggle-preferences/preference-gates/openTestResultsAfterRun.md +1 -1
  180. package/plugin/skills/muggle-preferences/preference-gates/postPRVisualWalkthrough.md +8 -25
  181. package/plugin/skills/muggle-preferences/preference-gates/showElectronBrowser.md +1 -1
  182. package/plugin/skills/muggle-preferences/preference-gates/suggestRelatedTestCases.md +4 -4
  183. package/plugin/skills/muggle-preferences/preference-gates/suggestRelatedUseCases.md +4 -4
  184. package/plugin/skills/muggle-repair/SKILL.md +4 -2
  185. package/plugin/skills/muggle-status/SKILL.md +8 -5
  186. package/plugin/skills/muggle-test/SKILL.md +110 -86
  187. package/plugin/skills/muggle-test-feature-local/SKILL.md +83 -62
  188. package/plugin/skills/muggle-test-import/SKILL.md +28 -23
  189. package/plugin/skills/muggle-test-prepare/SKILL.md +79 -18
  190. package/plugin/skills/muggle-test-regenerate-missing/SKILL.md +34 -18
  191. package/plugin/skills/muggle-test-regenerate-missing/evals/evals.json +9 -9
  192. package/plugin/skills/muggle-upgrade/SKILL.md +4 -2
  193. package/plugin/skills/muggle-works-npm-release/SKILL.md +6 -4
  194. package/plugin/skills/mupgrade/SKILL.md +8 -0
  195. package/scripts/postinstall.mjs +11 -1
  196. package/dist/plugin/skills/do/validate-code.md +0 -38
  197. package/plugin/skills/do/validate-code.md +0 -38
@@ -0,0 +1,49 @@
1
+ # Configure (interactive picker)
2
+
3
+ Use whenever the user wants to change preferences without naming a specific key. Drives selections through `AskUserQuestion` so they toggle with the keyboard instead of typing key names.
4
+
5
+ ## Step 1 — show current state
6
+
7
+ Print the preference table per `ops/list.md` so the user sees what's set today.
8
+
9
+ ## Step 2 — usage instructions
10
+
11
+ Print verbatim before calling `AskUserQuestion`:
12
+
13
+ ```
14
+ How to use this picker:
15
+ ↑/↓ move between options
16
+ space toggle a preference (selected = set to `always`)
17
+ tab move to the next question
18
+ enter confirm
19
+
20
+ Anything you don't toggle keeps its current value. After this picker
21
+ you can tell me which (if any) should instead be set to `never`.
22
+ ```
23
+
24
+ ## Step 3 — call AskUserQuestion
25
+
26
+ For each option: label = key name, description = first paragraph of `preference-gates/<key>.md`. Multi-select question text = `Which of these should auto-proceed (set to "always")?`; selected = `always`.
27
+
28
+ - `multiSelect: true`, `header: "Auth & session"` — `autoLogin`, `autoSelectProject`, `checkForUpdates`, `verboseOutput`
29
+ - `multiSelect: true`, `header: "Test setup"` — `autoSelectLocalHost`, `autoDetectChanges`
30
+ - `multiSelect: true`, `header: "Test run"` — `showElectronBrowser`, `openTestResultsAfterRun`, `autoPublishLocalResults`
31
+ - `multiSelect: true`, `header: "Suggestions & PR"` — `suggestRelatedUseCases`, `suggestRelatedTestCases`, `postPRVisualWalkthrough`, `autoCreatePR`
32
+ - `multiSelect: true`, `header: "Branch hygiene"` — `autoUseWorktree`, `autoRebase`, `autoCleanup`
33
+ - `multiSelect: false`, `header: "E2E acceptance"` — `autoE2ETest`. Options: `Always run Stage 6 at the end` (`always` — default), `Ask each cycle` (`ask`). No `never` option.
34
+ - `multiSelect: false`, `header: "Default mode"` — `defaultExecutionMode`. Options: `Local — run on my computer` (`local`), `Remote — run in the Muggle Test cloud` (`remote`), `Ask each time` (don't change).
35
+ - `multiSelect: false`, `header: "Scope"` — final scope question. Options: `Global (all repos)` (~/.muggle-ai/), `This project only` (.muggle-ai/ in repo).
36
+
37
+ `AskUserQuestion` accepts up to 4 questions per call — split into two calls if needed (categories first, scope second).
38
+
39
+ ## Step 4 — apply selections
40
+
41
+ For each toggled key (multi-select questions): `muggle-local-preferences-set` with `value: "always"`. For `defaultExecutionMode`: only set if user picked Local/Remote (skip "Ask each time"). Pass `scope` from the scope question; pass `cwd` when scope is `project`.
42
+
43
+ ## Step 5 — `never` follow-up
44
+
45
+ Ask: `Want any of these set to "never" (auto-skip without asking)? Name them, e.g. "never on autoPublishLocalResults", or say "no".`. For named keys, call `muggle-local-preferences-set` with `value: "never"`, same scope.
46
+
47
+ ## Step 6 — confirm
48
+
49
+ One-liner summary: `Set autoLogin=always, openTestResultsAfterRun=always (global).`
@@ -0,0 +1,9 @@
1
+ # List
2
+
3
+ 1. Read each `preference-gates/<key>.md` (skip `README.md`). First paragraph of each = description.
4
+ 2. Render `Preference | Value | Description` table titled `Muggle AI — Preferences`. Values from session context.
5
+ 3. Footer:
6
+ ```
7
+ Values: always · ask · never (defaultExecutionMode: local/remote/ask)
8
+ Scope: global (~/.muggle-ai/) or project (.muggle-ai/ in repo root)
9
+ ```
@@ -0,0 +1,6 @@
1
+ # Reset
2
+
3
+ - **Specific key**: `muggle-local-preferences-set` with `value: "ask"` for that key.
4
+ - **All preferences**: same call for every `preference-gates/<key>.md`.
5
+
6
+ Confirm what was reset.
@@ -0,0 +1,10 @@
1
+ # Set — direct (key + value)
2
+
3
+ Trigger: user names both key and value (e.g. "set autoLogin to always", "make showElectronBrowser never for this project").
4
+
5
+ 1. Parse `key` and `value`.
6
+ 2. Verify `preference-gates/<key>.md` exists. If not, list `preference-gates/*.md` and ask.
7
+ 3. Validate `value` per Shared context.
8
+ 4. Resolve scope per Shared context.
9
+ 5. `muggle-local-preferences-set`.
10
+ 6. Confirm: `Set {key} to {value} ({scope}).`
@@ -10,7 +10,7 @@ which uses `local` / `remote` / `ask`).
10
10
 
11
11
  ## Resolution
12
12
 
13
- `SessionStart` injects a `Muggle Preferences` line (`key=value` pairs) from
13
+ `SessionStart` injects a `Muggle Test Preferences` line (`key=value` pairs) from
14
14
  `~/.muggle-ai/preferences.json` (global) overlaid by
15
15
  `<repo>/.muggle-ai/preferences.json` (project). Absent → treat as `ask`.
16
16
 
@@ -0,0 +1,11 @@
1
+ # `autoCleanup`
2
+
3
+ After a PR is merged, run the full cleanup sequence (worktree, branch, artifacts, `clean_gone`) — or skip. `always` runs all steps with no per-step prompts. Substitute `{branch}`.
4
+
5
+ **Picker 1** — header `Cleanup after merge`, question `"PR for {branch} is merged — run cleanup now?"`
6
+ - `Run cleanup` — `Remove worktree, delete branch local+remote, clear local artifacts, prune [gone] branches.` → `always`
7
+ - `Skip cleanup` — `Leave everything in place.` → `never`
8
+
9
+ **Silent action**
10
+ - `always` → `Running post-merge cleanup for {branch}`
11
+ - `never` → `Skipping post-merge cleanup for {branch}`
@@ -0,0 +1,13 @@
1
+ # `autoCreatePR`
2
+
3
+ Controls whether the cycle pushes the working branch to remote and opens a pull request after local commits land, or stops at "commits made locally". Fires when the agent has buildable commits and no PR exists yet for the branch. Substitute `{branch}`.
4
+
5
+ **Picker 1** — header `Open PR?`, question `"Push '{branch}' and open a pull request?"`
6
+ - `Open the PR` — `Push branch and run gh pr create.` → `always`
7
+ - `Ask me next time` — `Decide per cycle.` → `ask`
8
+ - `Skip — I'll open it myself` — `Stop after the local commits.` → `never`
9
+
10
+ **Silent action**
11
+ - `always` → `Opening PR for {branch}`
12
+ - `ask` → `Asking about PR creation`
13
+ - `never` → `Skipping PR creation`
@@ -2,9 +2,9 @@
2
2
 
3
3
  Scan local git changes to scope the test run, or skip the scan.
4
4
 
5
- **Picker 1** — header `Local git scan`, question `"Scan git changes to scope what to test?"`
6
- - `Yes, scan changes` — `Test cases that match recent diffs get prioritized.` → `always`
7
- - `No, I'll specify` — `Skip the scan — I'll tell you what to test.` → `never`
5
+ **Picker 1** — header `Scan changes?`, question `"Scan git changes to scope what to test?"`
6
+ - `Scan changes` — `Test cases that match recent diffs get prioritized.` → `always`
7
+ - `Skip scan` — `Skip — you'll tell me what to test.` → `never`
8
8
 
9
9
  **Silent action**
10
10
  - `always` → `Scanning git changes to scope the run`
@@ -0,0 +1,11 @@
1
+ # `autoE2ETest`
2
+
3
+ Run Stage 6 (E2E acceptance) at the end of every `/muggle-do` cycle, or fold the decision into pre-flight each time. Default `always` — running E2E every cycle is the point of `muggle-do`, so `never` is not offered.
4
+
5
+ **Picker 1** — header `Run E2E acceptance?`, question `"Run Stage 6 every cycle, or decide each time?"`
6
+ - `Always run` — `Run Stage 6 every cycle; no further prompts.` → `always`
7
+ - `Decide each cycle` — `Surface the question in pre-flight each run.` → `ask`
8
+
9
+ **Silent action**
10
+ - `always` → `Running Stage 6`
11
+ - `ask` → `Asking each cycle whether to run Stage 6`
@@ -8,4 +8,4 @@ Reuse the saved session, or force a fresh login. Substitute `{email}`.
8
8
 
9
9
  **Silent action**
10
10
  - `always` → `Continuing as {email}`
11
- - `never` → `Forcing a fresh login`
11
+ - `never` → `Logging in fresh`
@@ -1,8 +1,8 @@
1
1
  # `autoPublishLocalResults`
2
2
 
3
- Upload local run artifacts to the Muggle cloud, or keep them local.
3
+ Upload local run artifacts to the Muggle Test cloud, or keep them local.
4
4
 
5
- **Picker 1** — header `Share results?`, question `"Upload these results to the Muggle dashboard?"`
5
+ **Picker 1** — header `Share results?`, question `"Upload these results to the Muggle Test dashboard?"`
6
6
  - `Upload them` — `Needed for the dashboard view, PR walkthrough, and team visibility.` → `always`
7
7
  - `Keep local-only` — `Stay on this machine — no dashboard view or PR walkthrough.` → `never`
8
8
 
@@ -0,0 +1,11 @@
1
+ # `autoRebase`
2
+
3
+ Rebase onto `origin/{default}` before dev servers / E2E, or run as-is. Substitute `{behind}` and `{default}`.
4
+
5
+ **Picker 1** — header `Rebase first`, question `"Branch is {behind} commits behind origin/{default} — rebase first?"`
6
+ - `Rebase first` — `Pull in default-branch changes so the run reflects the merged main line.` → `always`
7
+ - `Run as-is` — `Skip the rebase.` → `never`
8
+
9
+ **Silent action**
10
+ - `always` → `Rebasing onto origin/{default} ({behind} behind)`
11
+ - `never` → `Running as-is ({behind} behind origin/{default})`
@@ -0,0 +1,19 @@
1
+ # `autoSelectLocalHost`
2
+
3
+ Reuse the saved local dev server URL for this repo, or pick one each run. Substitute `{lastHost}` (the URL used in the previous run for this repo — omit the option entirely when no cache exists) and `{suggestedHost}` (auto-detected from running ports, e.g. `http://localhost:3000`).
4
+
5
+ Cache lives at `<cwd>/.muggle-ai/last-host.json`. The calling skill **always** updates the cache after the user picks/types a URL — independent of Picker 2 — so `Use {lastHost}` reflects the most recent run.
6
+
7
+ **Picker 1** — header `Local server`, question `"Which local URL should the test target?"`
8
+ - `Use {lastHost}` — `From your last run in this repo.` → reuse cached URL. *Skip this option when no cache exists.*
9
+ - `Use {suggestedHost}` — `Detected from a port that's running.` → use the suggestion
10
+ - `Type a URL` — `Paste any URL.` → calling skill prompts for free-text input
11
+
12
+ **Picker 2 — overrides shared template.** Fires after the user picks a URL.
13
+ - Header `Remember this URL?`, question `"Always use {chosenHost} for this repo from now on, without asking?"`
14
+ - `Yes, always` (sub: `You can change this later in muggle preferences.`) → `muggle-local-preferences-set` (`autoSelectLocalHost=always`, global). The cache is already up to date.
15
+ - `Just this once` (sub: `I'll ask again next time.`) → don't save the preference. The cache still updates.
16
+
17
+ **Silent action**
18
+ - `always` (cache used) → `Using saved local URL {lastHost}`
19
+ - `never` → no footer; the picker is the visible step.
@@ -1,7 +1,6 @@
1
1
  # `autoSelectProject`
2
2
 
3
- Reuse the cached project for this repo (`<cwd>/.muggle-ai/last-project.json`),
4
- or pick from the list. Substitute `{projectName}`.
3
+ Reuse the saved project for this repo, or pick from the list. Substitute `{projectName}`.
5
4
 
6
5
  Picker 1 *is* the project list (rendered by the calling skill — format and
7
6
  tail options like "Show full list" / "Create new project" are skill-defined).
@@ -0,0 +1,11 @@
1
+ # `autoUseWorktree`
2
+
3
+ Create a worktree for the change, or work in the current checkout.
4
+
5
+ **Picker 1** — header `Worktree`, question `"Create a git worktree for this change, or work in the current checkout?"`
6
+ - `Create a worktree` — `Isolate the change so your current checkout stays untouched.` → `always`
7
+ - `Use current checkout` — `Edit in place.` → `never`
8
+
9
+ **Silent action**
10
+ - `always` → `Creating a worktree for this change`
11
+ - `never` → `Working in the current checkout`
@@ -1,10 +1,10 @@
1
1
  # `checkForUpdates`
2
2
 
3
- Check npm for a newer Muggle version at session start.
3
+ Check npm for a newer Muggle Test version at session start.
4
4
 
5
- **Picker 1** — header `Update check`, question `"Check npm for a newer Muggle version? Requires a network call."`
6
- - `Yes, check` — `Quick network call — flags if you're behind.` → `always`
7
- - `No, skip` — `Skip the check — saves a network call at session start.` → `never`
5
+ **Picker 1** — header `Update check`, question `"Check for a newer Muggle Test version (one quick network call)?"`
6
+ - `Check now` — `Flags if you're behind.` → `always`
7
+ - `Skip check` — `Saves a network call at session start.` → `never`
8
8
 
9
9
  **Silent action**
10
10
  - `always` → `Checked for updates`
@@ -4,7 +4,7 @@ Default place to run tests when the user's request is ambiguous.
4
4
 
5
5
  **Picker 1** — header `Where to run tests?`, question `"On your computer or in the cloud?"`
6
6
  - `On my computer` — `Real browser on localhost. Faster feedback while developing.` → `local`
7
- - `In the cloud` — `Muggle's cloud runs against a preview/staging URL.` → `remote`
7
+ - `In the cloud` — `Muggle Test's cloud runs against a preview/staging URL.` → `remote`
8
8
 
9
9
  If the user's intent is already clear (e.g. "test on staging"), skip Picker 1
10
10
  — confirm with `"Yes, proceed in <mode>"` / `"Switch to <other mode>"` and
@@ -8,4 +8,4 @@ Auto-open the dashboard after a run, or just print the URL.
8
8
 
9
9
  **Silent action**
10
10
  - `always` → `Opening results on the dashboard`
11
- - `never` → `Just printing the link — no auto-open`
11
+ - `never` → `Just printing the link`
@@ -1,30 +1,13 @@
1
1
  # `postPRVisualWalkthrough`
2
2
 
3
- Post a visual walkthrough of test results to a PR.
3
+ Preference gate. Controls whether the cycle posts the visual walkthrough comment (per-test-case dashboard links + step-by-step screenshots) to the PR after E2E results are available, or stops at "results ready". Fires once per E2E result set when a PR exists for the working branch (if it doesn't, callers fire [`autoCreatePR`](autoCreatePR.md) separately). Substitute `{prNumber}`.
4
4
 
5
- **PR detection (mandatory before any picker).** Run `gh pr view --json number,title,url 2>/dev/null` first. The result picks Case A or B.
6
- Substitute `{prNumber}`, `{prTitle}` into prompts.
5
+ **Picker 1** — header `Post to PR`, question `"Post the visual walkthrough to PR #{prNumber}?"`
6
+ - `Post to #{prNumber}` — `Comment with screenshots is added to the PR.` → `always`
7
+ - `Ask me each time` — `Decide per run.` → `ask`
8
+ - `Skip` — `Walkthrough is not posted.` → `never`
7
9
 
8
- ## Case A — open PR found
9
-
10
- **Picker 1** — header `Share with the team`, question `"Post a visual walkthrough to PR #{prNumber} ({prTitle})?"`
11
- - `Yes, post to #{prNumber}` — `Reviewers see clickable per-test screenshots and dashboard links.` → `always`
12
- - `Skip` — `Keep it off the PR — you can post later from the dashboard.` → `never`
13
-
14
- **Silent action (Case A)**
10
+ **Silent action**
15
11
  - `always` → `Posting walkthrough to PR #{prNumber}`
16
- - `never` → `Skipping PR walkthrough for #{prNumber}`
17
-
18
- ## Case B — no open PR
19
-
20
- Situational fork — saved value is *not* updated from this picker.
21
-
22
- **Picker 1** — header `No PR yet`, question `"This branch has no open PR. Create one and post the walkthrough, or skip?"`
23
- - `Create a PR and post` — `I'll open a PR for this branch, then attach the walkthrough.` → run PR-creation flow (calling skill's responsibility), then post.
24
- - `Skip` — `Skip the walkthrough this time — you can post later from the dashboard.` → continue.
25
-
26
- **Picker 2** — skipped entirely.
27
-
28
- **Silent action (Case B)** — when saved gate is `always` or `never` but no PR exists:
29
- - `always` → fall through to Case B Picker 1 (don't auto-create silently). Print: `(`postPRVisualWalkthrough = always`, but this branch has no PR — asking what to do.)`
30
- - `never` → `Skipping PR walkthrough — no open PR for this branch`
12
+ - `ask` → `Asking about PR walkthrough`
13
+ - `never` → `Skipping PR walkthrough`
@@ -1,6 +1,6 @@
1
1
  # `showElectronBrowser`
2
2
 
3
- Show the Electron browser during local tests, or run hidden.
3
+ Show the browser during local tests, or run hidden.
4
4
 
5
5
  **Picker 1** — header `Browser window`, question `"Show the test browser as it runs?"`
6
6
  - `Show it` — `Watch the test live — useful when something's failing.` → `always` (omit `showUi`)
@@ -1,10 +1,10 @@
1
1
  # `suggestRelatedTestCases`
2
2
 
3
- After creating/running a test case, surface related ones already attached to the use case.
3
+ After creating/running a test case, show related ones already attached to the use case.
4
4
 
5
- **Picker 1** — header `Related test cases`, question `"Surface related test cases already attached to this use case?"`
6
- - `Yes, suggest related` — `Catch test cases your import or change might have missed.` → `always`
7
- - `No, skip` — `Don't show suggestions — I'll ask if I want them later.` → `never`
5
+ **Picker 1** — header `Related test cases`, question `"Show related test cases already attached to this use case?"`
6
+ - `Show related` — `Catch test cases your import or change might have missed.` → `always`
7
+ - `Skip` — `You can ask later if you want them.` → `never`
8
8
 
9
9
  **Silent action**
10
10
  - `always` → `Showing related test cases below`
@@ -1,10 +1,10 @@
1
1
  # `suggestRelatedUseCases`
2
2
 
3
- After creating/running a use case, surface related ones already in the project.
3
+ After creating/running a use case, show related ones already in the project.
4
4
 
5
- **Picker 1** — header `Related use cases`, question `"Surface related use cases already in this project?"`
6
- - `Yes, suggest related` — `Catch use cases your import or change might have missed.` → `always`
7
- - `No, skip` — `Don't show suggestions — I'll ask if I want them later.` → `never`
5
+ **Picker 1** — header `Related use cases`, question `"Show related use cases already in this project?"`
6
+ - `Show related` — `Catch use cases your import or change might have missed.` → `always`
7
+ - `Skip` — `You can ask later if you want them.` → `never`
8
8
 
9
9
  **Silent action**
10
10
  - `always` → `Showing related use cases below`
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: muggle-repair
3
- description: Diagnose and fix a broken Muggle AI installation. Use when user types muggle repair or asks to fix Muggle setup.
3
+ description: Diagnose and fix a broken Muggle AI installation. Use when user types muggle repair or asks to fix Muggle Test setup.
4
4
  ---
5
5
 
6
- # Muggle Repair
6
+ # Muggle Test Repair
7
+
8
+ > Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-repair"`.
7
9
 
8
10
  Automatically diagnose and fix broken components.
9
11
 
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: muggle-status
3
- description: Check health of the Muggle AI installation. Use when user types muggle status, asks for Muggle health, MCP health, or auth validity.
3
+ description: Check health of the Muggle AI installation. Use when user types muggle status, asks for Muggle Test health, MCP health, or auth validity.
4
4
  ---
5
5
 
6
- # Muggle Status
6
+ # Muggle Test Status
7
+
8
+ > Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-status"`.
7
9
 
8
10
  Run a full health check and report results.
9
11
 
@@ -13,7 +15,7 @@ Gates run per `preference-gates/README.md`.
13
15
 
14
16
  | Preference | Step | Decision it gates |
15
17
  |------------|------|-------------------|
16
- | `checkForUpdates` | Check 4 | Check for newer Muggle version |
18
+ | `checkForUpdates` | Check 4 | Check for newer Muggle Test version |
17
19
 
18
20
  ## Checks
19
21
 
@@ -24,8 +26,9 @@ Gates run per `preference-gates/README.md`.
24
26
  3. **Authentication** — call `muggle-remote-auth-status`. Report whether credentials are valid and when they expire.
25
27
 
26
28
  4. **CLI version** — gate `checkForUpdates` (per `preference-gates/README.md`):
27
- - Pro-action: run the check below.
28
- - Skip-action: render the row as `[skip] check disabled by preference`.
29
+ - `always` → run the check below.
30
+ - `never` → render the row as `[skip] check disabled by preference`.
31
+ - `ask` → run Picker 1 from `preference-gates/checkForUpdates.md` via `AskUserQuestion`; map the answer back to one of the actions above.
29
32
 
30
33
  When the check runs: capture installed (`muggle --version`) and latest (`npm view @muggleai/works version`). Compare with `sort -V`; flag as out-of-date only when latest is strictly greater.
31
34