@muggleai/works 4.10.0 → 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-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/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 +9 -6
- 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 +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 +73 -66
- 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/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 +9 -6
- 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 +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 +73 -66
- 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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# E2eReport Assembly Guide
|
|
2
|
+
|
|
3
|
+
Include **all** runs — passed, failed, **and inconclusive**. Never drop a run. Always best-effort to upload so the dashboard has a record reviewers can open from the PR — even when the local run produced zero action steps.
|
|
4
|
+
|
|
5
|
+
## Picking a status
|
|
6
|
+
|
|
7
|
+
| Status | Use when | Required extras |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `passed` | Run completed and the assertion held. | — |
|
|
10
|
+
| `failed` | Run completed and the assertion failed, or the product itself broke before the assertion could be made (server error, 500, broken page). | `failureStepIndex`, `error` |
|
|
11
|
+
| `inconclusive` | Run could not yield a pass/fail signal for reasons **outside the product**: no replayable script existed, environment precondition unmet, infra/Electron error, agent stalled on a cookie banner or login wall, missing secrets, agent went off-course. | `reason` (one short sentence; `steps[]` may be empty) |
|
|
12
|
+
|
|
13
|
+
If a test should be inconclusive but you don't have a real `runId` / `viewUrl` (e.g., generation never ran), use the same project-level dashboard fallback as the "last-resort" failed branch below: emit a stub run via `muggle-remote-local-run-upload` if at all possible; otherwise synthesize a UUID-shaped runId and use `https://www.muggle-ai.com/muggleTestV0/dashboard/projects/{projectId}/runs` as `viewUrl`. The schema requires both fields — but a working dashboard link is better than nothing.
|
|
14
|
+
|
|
15
|
+
## Uploaded run (passed or failed; the common path)
|
|
16
|
+
|
|
17
|
+
Every run that completed locally — pass or fail, with or without action steps — should reach the cloud via Step 8 of the caller skill. The upload response carries `actionScriptId` and `viewUrl`; `testScriptId` is **only present for passing runs and replays** (failed generations skip the test script wrapper to avoid clobbering the canonical replay target).
|
|
18
|
+
|
|
19
|
+
Fetch step screenshots in parallel — pick the right tool per upload:
|
|
20
|
+
|
|
21
|
+
- **`testScriptId` present** → `muggle-remote-test-script-get` with that id.
|
|
22
|
+
- **`testScriptId` missing** (failed generation, or zero-step fallback via `muggle-remote-local-run-upload`) → `muggle-remote-action-script-get` with `actionScriptId` from the upload response. Same `steps[]` + `summaryStep` shape; just one less hop.
|
|
23
|
+
|
|
24
|
+
For each result:
|
|
25
|
+
|
|
26
|
+
1. Build `steps[]`: `[{ stepIndex: <index>, action: steps[i].operation.action, screenshotUrl: steps[i].operation.screenshotUrl }, ...]`. Empty array is fine — zero-step runs still render the failure summary header in the walkthrough.
|
|
27
|
+
2. `viewUrl` — from upload response (deep-links to the specific run via `actionScriptId`).
|
|
28
|
+
3. `status` — from `muggle-local-run-result-get`.
|
|
29
|
+
4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
|
|
30
|
+
|
|
31
|
+
## Last-resort: upload genuinely failed
|
|
32
|
+
|
|
33
|
+
Reach this branch only when **both** `muggle-local-publish-test-script` AND the `muggle-remote-local-run-upload` fallback errored (network failure, auth issue, etc.) — not for ordinary zero-step runs, which the fallback handles. Don't drop the run; render a stub entry so reviewers still see something happened.
|
|
34
|
+
|
|
35
|
+
1. `steps: []`.
|
|
36
|
+
2. `viewUrl`: `https://www.muggle-ai.com/muggleTestV0/dashboard/projects/{projectId}/runs` (generic dashboard).
|
|
37
|
+
3. `status: "failed"`, `failureStepIndex: 0`, `error` from run result.
|
|
38
|
+
4. `testCaseId` — from execution step selection. `runId` — from `muggle-local-execute-test-generation` (always present even on failure).
|
|
39
|
+
|
|
40
|
+
On every entry: `description` (test case title/description — drives the collapsible header) and `useCaseName` (parent use case title — when present, the overview groups by use case) are optional but recommended. Prefer values already in context; only call `muggle-remote-test-case-get` / `muggle-remote-use-case-get` if missing.
|
|
41
|
+
|
|
42
|
+
If called from `muggle-do`: `e2e-acceptance.md` already produces this shape — pass it through unchanged.
|
|
43
|
+
|
|
44
|
+
## Shape
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"projectId": "<projectId>",
|
|
49
|
+
"tests": [
|
|
50
|
+
{
|
|
51
|
+
"name": "<test case title>",
|
|
52
|
+
"description": "<one-line description (recommended)>",
|
|
53
|
+
"useCaseName": "<parent use case title (recommended)>",
|
|
54
|
+
"testCaseId": "<testCaseId from execution step>",
|
|
55
|
+
"testScriptId": "<testScriptId from publish>",
|
|
56
|
+
"runId": "<runId from muggle-local-execute-test-generation>",
|
|
57
|
+
"viewUrl": "<viewUrl from publish>",
|
|
58
|
+
"status": "passed",
|
|
59
|
+
"steps": [{ "stepIndex": 0, "action": "...", "screenshotUrl": "..." }]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "<failed test case title>",
|
|
63
|
+
"description": "<one-line description (recommended)>",
|
|
64
|
+
"useCaseName": "<parent use case title (recommended)>",
|
|
65
|
+
"testCaseId": "<testCaseId from execution step>",
|
|
66
|
+
"runId": "<runId from muggle-local-execute-test-generation>",
|
|
67
|
+
"viewUrl": "<viewUrl from upload response, deep-linked via actionScriptId>",
|
|
68
|
+
"status": "failed",
|
|
69
|
+
"steps": [],
|
|
70
|
+
"failureStepIndex": 0,
|
|
71
|
+
"error": "<error message from run result>"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "<inconclusive test case title>",
|
|
75
|
+
"description": "<one-line description (recommended)>",
|
|
76
|
+
"useCaseName": "<parent use case title (recommended)>",
|
|
77
|
+
"testCaseId": "<testCaseId from execution step>",
|
|
78
|
+
"runId": "<runId from execute, or synthesized UUID if no run started>",
|
|
79
|
+
"viewUrl": "<viewUrl from upload response, or project-level fallback URL>",
|
|
80
|
+
"status": "inconclusive",
|
|
81
|
+
"steps": [],
|
|
82
|
+
"reason": "<one short sentence: why neither pass nor fail applies>"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
@@ -2,122 +2,30 @@
|
|
|
2
2
|
name: muggle-preferences
|
|
3
3
|
description: >-
|
|
4
4
|
View, set, or reset Muggle AI preferences that control testing behavior.
|
|
5
|
-
Use when user asks to see preferences, change a setting, configure Muggle
|
|
5
|
+
Use when user asks to see preferences, change a setting, configure Muggle Test
|
|
6
6
|
defaults, or manage muggle config. Triggers on: 'muggle preferences',
|
|
7
7
|
'show muggle settings', 'change muggle preference', 'set autoLogin to
|
|
8
8
|
always', 'muggle config', 'reset muggle preferences', 'show my muggle
|
|
9
9
|
settings', 'configure muggle', 'muggle setup'.
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
# Muggle Preferences
|
|
12
|
+
# Muggle Test Preferences
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-preferences"`.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Pick the operation, then read its op file for the procedure.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
| Intent | Op file |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `/muggle-preferences <key>` or "change my `<key>` preference" | `ops/change-one.md` |
|
|
21
|
+
| User names key + value (e.g. "set autoLogin to always") | `ops/set.md` |
|
|
22
|
+
| "show preferences" / no args | `ops/list.md` |
|
|
23
|
+
| "configure muggle" / "muggle setup" / change without naming a key | `ops/configure.md` |
|
|
24
|
+
| "reset preferences" | `ops/reset.md` |
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
- **Change one** — re-run the gate's picker for a single key. Use this when the user invokes `/muggle-preferences <key>` or says "change my <key> preference".
|
|
22
|
-
- **Configure** — interactive picker covering all keys at once. Default when the user wants to change preferences but hasn't named a specific one (e.g. "muggle setup", "configure muggle", "change my preferences").
|
|
23
|
-
- **Set** — direct set when the user names a key+value (e.g. "set autoLogin to always").
|
|
24
|
-
- **Reset** — restore preferences to default (`ask`).
|
|
26
|
+
## Shared context (all ops)
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Read preferences from session context. Look for the line starting with `Muggle Preferences` — it contains key=value pairs like `autoLogin=ask showElectronBrowser=always ...`.
|
|
31
|
-
|
|
32
|
-
If no preferences line is present, treat all preferences as `"ask"` (the default).
|
|
33
|
-
|
|
34
|
-
## List
|
|
35
|
-
|
|
36
|
-
Render a `Preference | Value | Description` table titled `Muggle AI — Preferences`.
|
|
37
|
-
- Keys: every `preference-gates/<key>.md` (excluding `README.md`).
|
|
38
|
-
- Values: from session context (default `ask`).
|
|
39
|
-
- Description: each gate file's first paragraph.
|
|
40
|
-
|
|
41
|
-
Footer:
|
|
42
|
-
```
|
|
43
|
-
Values: always · ask · never (defaultExecutionMode: local/remote/ask)
|
|
44
|
-
Scope: global (~/.muggle-ai/) or project (.muggle-ai/ in repo root)
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Change one (single-key picker)
|
|
48
|
-
|
|
49
|
-
Use this when the user invokes `/muggle-preferences <key>` or says "change my <key> preference" / "show me the <key> options". Behavior:
|
|
50
|
-
|
|
51
|
-
1. Check that `preference-gates/<key>.md` exists. If not, list `preference-gates/*.md` and ask.
|
|
52
|
-
2. Open it, run **Picker 1 only**.
|
|
53
|
-
3. Call `muggle-local-preferences-set` with the mapped value, `scope: "global"`. **Skip Picker 2** (user explicitly asked to change).
|
|
54
|
-
4. Confirm: `Set <key> to <value>.`
|
|
55
|
-
|
|
56
|
-
This is the entry point that silent-mode footers point at, so its UX must mirror the per-key gate exactly — same question, same options, same mappings.
|
|
57
|
-
|
|
58
|
-
## Configure (interactive picker)
|
|
59
|
-
|
|
60
|
-
Use this whenever the user wants to change preferences without naming a specific key. The flow runs in a single `AskUserQuestion` call so the user can toggle preferences with the keyboard instead of typing key names.
|
|
61
|
-
|
|
62
|
-
### Step 1 — show current state
|
|
63
|
-
|
|
64
|
-
Print the preference table from the **List** section so the user sees what's set today.
|
|
65
|
-
|
|
66
|
-
### Step 2 — tell the user how to drive the picker
|
|
67
|
-
|
|
68
|
-
Print this instruction block verbatim before calling `AskUserQuestion`:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
How to use this picker:
|
|
72
|
-
↑/↓ move between options
|
|
73
|
-
space toggle a preference (selected = set to `always`)
|
|
74
|
-
tab move to the next question
|
|
75
|
-
enter confirm
|
|
76
|
-
|
|
77
|
-
Anything you don't toggle keeps its current value. After this picker
|
|
78
|
-
you can tell me which (if any) should instead be set to `never`.
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Step 3 — call AskUserQuestion
|
|
82
|
-
|
|
83
|
-
Group keys into categories below (only place this UX grouping lives — not in the gate dir). For each option: label = key name, description = first paragraph of `preference-gates/<key>.md`.
|
|
84
|
-
|
|
85
|
-
- `multiSelect: true`, `header: "Auth & session"` — `autoLogin`, `autoSelectProject`, `checkForUpdates`, `verboseOutput`
|
|
86
|
-
- `multiSelect: true`, `header: "Test run"` — `showElectronBrowser`, `openTestResultsAfterRun`, `autoPublishLocalResults`, `autoDetectChanges`
|
|
87
|
-
- `multiSelect: true`, `header: "Suggestions & PR"` — `suggestRelatedUseCases`, `suggestRelatedTestCases`, `postPRVisualWalkthrough`
|
|
88
|
-
- `multiSelect: false`, `header: "Default mode"` — `defaultExecutionMode`. Options: `Local — run on my computer` (`local`), `Remote — run in the Muggle cloud` (`remote`), `Ask each time` (don't change).
|
|
89
|
-
- `multiSelect: false`, `header: "Scope"` — final scope question. Options: `Global (all repos)` (~/.muggle-ai/), `This project only` (.muggle-ai/ in repo).
|
|
90
|
-
|
|
91
|
-
For the multi-select questions: text = `Which of these should auto-proceed (set to "always")?`; selected = `always`.
|
|
92
|
-
|
|
93
|
-
`AskUserQuestion` accepts up to 4 questions per call — split into two calls if needed (categories first, scope second).
|
|
94
|
-
|
|
95
|
-
### Step 4 — apply selections
|
|
96
|
-
|
|
97
|
-
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`.
|
|
98
|
-
|
|
99
|
-
### Step 5 — offer the `never` follow-up
|
|
100
|
-
|
|
101
|
-
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.
|
|
102
|
-
|
|
103
|
-
### Step 6 — confirm
|
|
104
|
-
|
|
105
|
-
Print a one-liner summary: `Set autoLogin=always, openTestResultsAfterRun=always (global).`
|
|
106
|
-
|
|
107
|
-
## Set (direct)
|
|
108
|
-
|
|
109
|
-
When the user names both key and value (e.g. "set autoLogin to always", "make showElectronBrowser never for this project"):
|
|
110
|
-
|
|
111
|
-
1. Parse `key` and `value` from the user's message.
|
|
112
|
-
2. Validate `key`: `preference-gates/<key>.md` must exist. If not, list `preference-gates/*.md` and ask.
|
|
113
|
-
3. Validate `value`: must be `always`/`never`/`ask` for all keys; `defaultExecutionMode` accepts `local`/`remote`/`ask` instead.
|
|
114
|
-
4. Scope defaults to `global`. If user says "for this project" / "just this repo", use `project` and pass `cwd`.
|
|
115
|
-
5. Call `muggle-local-preferences-set`.
|
|
116
|
-
6. Confirm: `Set {key} to {value} ({scope}).`
|
|
117
|
-
|
|
118
|
-
## Reset
|
|
119
|
-
|
|
120
|
-
- Specific key: `muggle-local-preferences-set` with `value: "ask"` for that key.
|
|
121
|
-
- All preferences: same call for every `preference-gates/<key>.md`.
|
|
122
|
-
|
|
123
|
-
Confirm what was reset.
|
|
28
|
+
- **Current values**: session-context line `Muggle Test Preferences key=value …`. Default `ask`.
|
|
29
|
+
- **Per-key files**: `preference-gates/<key>.md`. Key list = `ls preference-gates/*.md` minus `README.md`.
|
|
30
|
+
- **Allowed values**: `always`/`never`/`ask` (or `local`/`remote`/`ask` for `defaultExecutionMode`).
|
|
31
|
+
- **Scope**: `global` default; `project` if user says "for this project" / "just this repo" (pass `cwd`).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Change one — `/muggle-preferences <key>`
|
|
2
|
+
|
|
3
|
+
1. Verify `preference-gates/<key>.md` exists. If not, list `preference-gates/*.md` and ask.
|
|
4
|
+
2. Read it. Run **Picker 1** with the options defined in the gate file, plus an additional `Ask me each time` (sub: `Prompt me at decision time.`) → `ask`.
|
|
5
|
+
3. `muggle-local-preferences-set` with the mapped value, `scope: "global"`.
|
|
6
|
+
4. Confirm: `Set <key> to <value>.`
|
|
7
|
+
|
|
8
|
+
Skip Picker 2 — user explicitly asked to change.
|
|
9
|
+
|
|
10
|
+
**Gates whose Picker 1 isn't a static yes/no** (e.g. `autoSelectProject`, where the picker is the project list rendered by the calling skill): present a generic 3-option picker using the gate's silent-action wording for the `always`/`never` labels, plus `Ask me each time` → `ask`.
|
|
@@ -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,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 `
|
|
6
|
-
- `
|
|
7
|
-
- `
|
|
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`
|
|
@@ -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
|
|
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
|
|
6
|
-
- `
|
|
7
|
-
- `
|
|
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
|
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
# `postPRVisualWalkthrough`
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
**
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
- `
|
|
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
|
|
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,
|
|
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 `"
|
|
6
|
-
- `
|
|
7
|
-
- `
|
|
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,
|
|
3
|
+
After creating/running a use case, show related ones already in the project.
|
|
4
4
|
|
|
5
|
-
**Picker 1** — header `Related use cases`, question `"
|
|
6
|
-
- `
|
|
7
|
-
- `
|
|
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
|
-
-
|
|
28
|
-
-
|
|
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
|
|