@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mregen
|
|
3
|
+
description: Explicit short alias for the `muggle-test-regenerate-missing` skill. ONLY invoke when the user explicitly types `mregen` or `/mregen` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mregen — alias for muggle-test-regenerate-missing
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-test-regenerate-missing` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mrelease
|
|
3
|
+
description: Explicit short alias for the `muggle-works-npm-release` skill. ONLY invoke when the user explicitly types `mrelease` or `/mrelease` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mrelease — alias for muggle-works-npm-release
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-works-npm-release` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mrepair
|
|
3
|
+
description: Explicit short alias for the `muggle-repair` skill. ONLY invoke when the user explicitly types `mrepair` or `/mrepair` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mrepair — alias for muggle-repair
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-repair` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mstatus
|
|
3
|
+
description: Explicit short alias for the `muggle-status` skill. ONLY invoke when the user explicitly types `mstatus` or `/mstatus` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mstatus — alias for muggle-status
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-status` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mtest
|
|
3
|
+
description: Explicit short alias for the `muggle-test` skill. ONLY invoke when the user explicitly types `mtest` or `/mtest` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mtest — alias for muggle-test
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-test` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mtestlocal
|
|
3
|
+
description: Explicit short alias for the `muggle-test-feature-local` skill. ONLY invoke when the user explicitly types `mtestlocal` or `/mtestlocal` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mtestlocal — alias for muggle-test-feature-local
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-test-feature-local` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mtestprep
|
|
3
|
+
description: Explicit short alias for the `muggle-test-prepare` skill. ONLY invoke when the user explicitly types `mtestprep` or `/mtestprep` — never auto-trigger from any other phrasing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mtestprep — alias for muggle-test-prepare
|
|
7
|
+
|
|
8
|
+
Invoke the `muggle-test-prepare` skill via the Skill tool. Forward any user-provided arguments unchanged.
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle
|
|
3
|
-
description: Muggle AI command router and menu. Use when user types "muggle" or asks for available Muggle commands.
|
|
3
|
+
description: Muggle AI command router and menu. Use when user types "muggle" or asks for available Muggle Test commands.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Muggle
|
|
6
|
+
# Muggle Test
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle"`.
|
|
9
|
+
|
|
10
|
+
Use this as the top-level Muggle Test command router.
|
|
9
11
|
|
|
10
12
|
## Preferences
|
|
11
13
|
|
|
12
|
-
User preferences are injected by the SessionStart hook into a `Muggle Preferences` line in session context (key=value pairs). Resolution: defaults → `~/.muggle-ai/preferences.json` (global) → `<repo>/.muggle-ai/preferences.json` (project). Treat absent prefs as `ask`.
|
|
14
|
+
User preferences are injected by the SessionStart hook into a `Muggle Test Preferences` line in session context (key=value pairs). Resolution: defaults → `~/.muggle-ai/preferences.json` (global) → `<repo>/.muggle-ai/preferences.json` (project). Treat absent prefs as `ask`.
|
|
13
15
|
|
|
14
16
|
This router skill itself does not gate any decision on a preference — it just routes user intent to a downstream skill. Each downstream skill consults its own preferences. For example, `checkForUpdates` is consulted by `muggle-status` (Check 4), not here.
|
|
15
17
|
|
|
@@ -17,7 +19,7 @@ If the user types "muggle" with no subcommand and you want to surface a contextu
|
|
|
17
19
|
|
|
18
20
|
## Menu
|
|
19
21
|
|
|
20
|
-
When user asks for "muggle" with no specific subcommand, use `
|
|
22
|
+
When user asks for "muggle" with no specific subcommand, use `AskUserQuestion` to present these four options:
|
|
21
23
|
|
|
22
24
|
- "Test a feature — run E2E acceptance tests locally or remotely" → `muggle-test-feature-local` (local) or `muggle-test` (remote/change-driven)
|
|
23
25
|
- "Build something — implement a feature with E2E acceptance tests and a visual PR" → `muggle-do`
|
|
@@ -35,5 +37,6 @@ If the user intent clearly matches one command, route directly — no menu neede
|
|
|
35
37
|
- test localhost/validate single feature/test a feature → `muggle-test-feature-local`
|
|
36
38
|
- build/implement from request/end-to-end → `muggle-do`
|
|
37
39
|
- post results to PR/attach walkthrough/visual evidence on PR → `muggle-pr-visual-walkthrough`
|
|
40
|
+
- give feedback on a run/the test was wrong/step N didn't work/show my feedback/delete feedback → `muggle-feedback`
|
|
38
41
|
|
|
39
|
-
If intent is ambiguous, use `
|
|
42
|
+
If intent is ambiguous, use `AskUserQuestion` with the most likely options rather than asking the user to type a clarification.
|
|
@@ -4,94 +4,69 @@ description: Unified Muggle AI workflow entry point. Use when user types muggle
|
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Muggle Do
|
|
7
|
+
# Muggle Test Do
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-do"`.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Runs an autonomous dev cycle from requirements to PR. **Fire and review:** the user answers one pre-flight questionnaire, then walks away.
|
|
12
12
|
|
|
13
|
-
For maintenance
|
|
13
|
+
For maintenance, use the dedicated skills:
|
|
14
14
|
|
|
15
15
|
- `/muggle:muggle-status`
|
|
16
16
|
- `/muggle:muggle-repair`
|
|
17
17
|
- `/muggle:muggle-upgrade`
|
|
18
18
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
Treat `$ARGUMENTS` as the user command:
|
|
22
|
-
|
|
23
|
-
- Empty / `help` / `menu` / `?` → show menu and session selector.
|
|
24
|
-
- Anything else → treat as a new task description and start/resume a dev-cycle session.
|
|
25
|
-
|
|
26
|
-
## The seven stages
|
|
19
|
+
## The pipeline
|
|
27
20
|
|
|
28
21
|
| # | Stage | File | User-facing? |
|
|
29
22
|
| :- | :---- | :--- | :----------- |
|
|
30
|
-
| 1 | Pre-flight | [../do/pre-flight.md](../do/pre-flight.md) | **Yes —
|
|
23
|
+
| 1 | Pre-flight | [../do/pre-flight.md](../do/pre-flight.md) | **Yes — one consolidated turn** |
|
|
31
24
|
| 2 | Requirements | [../do/requirements.md](../do/requirements.md) | No |
|
|
32
|
-
| 3 |
|
|
33
|
-
| 4 |
|
|
25
|
+
| 3 | Build | [../do/build.md](../do/build.md) | No |
|
|
26
|
+
| 4 | Impact analysis | [../do/impact-analysis.md](../do/impact-analysis.md) | No |
|
|
34
27
|
| 5 | Unit tests | [../do/unit-tests.md](../do/unit-tests.md) | No |
|
|
35
28
|
| 6 | E2E acceptance | [../do/e2e-acceptance.md](../do/e2e-acceptance.md) | No |
|
|
36
29
|
| 7 | Open PR | [../do/open-prs.md](../do/open-prs.md) | No |
|
|
30
|
+
| 8 | PR follow-up | [../muggle-pr-followup/SKILL.md](../muggle-pr-followup/SKILL.md) (generic) — invoked with muggle-do's cycle declaration | **Yes — only on ambiguous reviews** |
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Front-loading (stage 1 non-negotiable)
|
|
41
|
-
|
|
42
|
-
All ambiguity — task scope, repo selection, validation strategy, localhost URL, backend health, Muggle project, test-user credentials, branch name, PR target — is resolved in a **single** pre-flight turn. See `pre-flight.md` for the exact questionnaire.
|
|
32
|
+
Stage 1 talks to the user once. Stages 2–7 run silently. Stage 7 dispatches **one Stage-8 follow-up loop per PR** it opens (not one per session); each loop polls its own PR independently for new submitted reviews. When a review lands, the loop cycles back through Stage 3 (Build) → 4 → 5 → 6 → fresh visual walkthrough → push to the existing branch, then resumes polling for the next round. Each loop may escalate once on an ambiguous review.
|
|
43
33
|
|
|
44
|
-
**
|
|
34
|
+
**Each stage's file is the single source of truth for that stage** — definition, contract, inputs/outputs, preference gates, output format. Read each stage file directly for its rules. This file is only the orchestration spine.
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
- Starting a dev server mid-cycle and discovering the port is wrong.
|
|
48
|
-
- Reaching the E2E stage before knowing how the user wants it validated.
|
|
49
|
-
- Asking the user to "pick one" across multiple turns instead of one turn.
|
|
36
|
+
## Preferences
|
|
50
37
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
| Preference | Stage | Decision it gates |
|
|
39
|
+
|------------|-------|-------------------|
|
|
40
|
+
| `autoE2ETest` | 6 (E2E acceptance) | Run E2E every cycle (default `always`), or fold the question into pre-flight |
|
|
54
41
|
|
|
55
|
-
|
|
42
|
+
Other gates that fire during this cycle (`autoUseWorktree`, `autoRebase`, `autoCreatePR`, `autoCleanup`) are owned by the per-stage files; see each stage for its contract.
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
- `iterations/<NNN>.md` — append-only log of stage transitions for iteration NNN: what ran, what was decided, what artifacts were produced.
|
|
59
|
-
- `requirements.md` — frozen output of stage 2.
|
|
60
|
-
- `result.md` — final summary written by stage 7 (PR URLs, E2E outcome, open issues).
|
|
61
|
-
|
|
62
|
-
**On every stage transition, you MUST:**
|
|
44
|
+
## Input routing
|
|
63
45
|
|
|
64
|
-
|
|
65
|
-
2. Rewrite `state.md` to reflect the new current stage and any relevant counters.
|
|
46
|
+
Treat `$ARGUMENTS` as the user command:
|
|
66
47
|
|
|
67
|
-
|
|
48
|
+
- Empty / `help` / `menu` / `?` → show menu and session selector.
|
|
49
|
+
- Anything else → infer intent:
|
|
50
|
+
- **Task automation** (perform an action on a website — post something, fill a form, click through a flow) → invoke `muggle:muggle-do-task` with the full prompt.
|
|
51
|
+
- **Feature development** (build / fix / refactor code) → start or resume a dev-cycle session.
|
|
68
52
|
|
|
69
|
-
|
|
53
|
+
When in doubt, ask one question: "Browser automation task, or code change?"
|
|
70
54
|
|
|
71
|
-
|
|
55
|
+
## Session model
|
|
72
56
|
|
|
73
|
-
|
|
74
|
-
**Stage N/7 — <stage name>** — <one-line intent>
|
|
75
|
-
```
|
|
57
|
+
Every run writes to `.muggle-do/sessions/<slug>/`. Stages own the files they produce:
|
|
76
58
|
|
|
77
|
-
|
|
59
|
+
| File | Owned by | Purpose |
|
|
60
|
+
| :--- | :------- | :------ |
|
|
61
|
+
| `state.md` | Stage 1 (rewritten by every transition) | Current stage, pre-flight answers, blockers |
|
|
62
|
+
| `iterations/<NNN>.md` | Every stage | Append-only stage transition log |
|
|
63
|
+
| `requirements.md` | Stage 2 | Frozen requirements |
|
|
64
|
+
| `prs.json`, `last_seen.json`, `followup.log` | Stage 8 | See [`pr-followup.md`](../do/pr-followup.md) |
|
|
65
|
+
| `result.md` | Stage 7 (seeded), Stage 8 (finalized) | Per-PR final state |
|
|
78
66
|
|
|
79
67
|
## Guardrails
|
|
80
68
|
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
- **If the same stage fails 3 times in a row, escalate with details.**
|
|
86
|
-
- **If total iterations reach 3 and E2E acceptance tests still fail**, continue to PR creation with `[E2E FAILING]` in the title; the visual walkthrough section makes the failures reviewable.
|
|
87
|
-
|
|
88
|
-
## Completion contract
|
|
89
|
-
|
|
90
|
-
When stage 7 finishes, the final message to the user contains at minimum:
|
|
91
|
-
|
|
92
|
-
- PR URL(s)
|
|
93
|
-
- E2E status (passing / `[E2E FAILING]`)
|
|
94
|
-
- Link to the run dashboard for each test case (via the walkthrough skill output)
|
|
95
|
-
- Path to `result.md` for full details
|
|
96
|
-
|
|
97
|
-
No other content. The user already read the walkthrough in the PR body — do not re-summarize it here.
|
|
69
|
+
- **Stage 1 is the only forward-pipeline user-facing stage.** Stages 2–7 don't ask questions mid-cycle. If a stage hits a blocker pre-flight didn't cover, treat as a pre-flight bug — escalate once and expand `pre-flight.md` after the run.
|
|
70
|
+
- **Stage 8 may escalate** once per ambiguous review comment, and may dispatch back to Stage 3 when needed — see [`pr-followup.md`](../do/pr-followup.md).
|
|
71
|
+
- **If the same stage fails 3 times in a row, escalate** with details.
|
|
72
|
+
- **If 3 cycle iterations reach E2E with failures**, ship with `[E2E FAILING]` per [`open-prs.md`](../do/open-prs.md). The walkthrough section keeps the failures reviewable.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muggle-do-task
|
|
3
|
+
description: Run a browser automation task on a website using natural language. Finds or creates the Muggle Test project, use case, test case, and script, then executes locally via the electron app. Use when the user wants to perform an action on a website (post, fill a form, click through a flow) rather than implement a code change.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Muggle Test Task Runner
|
|
7
|
+
|
|
8
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-do-task"`.
|
|
9
|
+
|
|
10
|
+
Runs a browser automation task described in plain English. Finds or creates the necessary Muggle Test entities automatically, then executes locally with mutation-driven step prediction.
|
|
11
|
+
|
|
12
|
+
## Step 1 — Parse the prompt
|
|
13
|
+
|
|
14
|
+
From `$ARGUMENTS`, extract:
|
|
15
|
+
|
|
16
|
+
- **`domain`** — the target website domain (e.g., `x.com`, `amazon.com`, `localhost:3000`). Normalize: strip `www.`, strip `https://`, lowercase. Result: bare domain with no scheme, no trailing slash.
|
|
17
|
+
- **`useCaseName`** — the core action being performed, stripped of variable content (e.g., `"Publish a post"`, `"Add to cart"`, `"Submit a form"`).
|
|
18
|
+
- **`mutations`** — variable parameters as a `string[]` (JSON array of strings). Each string is either:
|
|
19
|
+
- A plain-English instruction describing what varies this run (e.g., `"The post content should be 'Hello world'"`)
|
|
20
|
+
- A local file path for uploads (e.g., `"Attach the image at C:\\Users\\stan4\\Pictures\\photo.jpg"`)
|
|
21
|
+
|
|
22
|
+
Examples: `["The post content should be 'Hello world'"]`, `["Attach the image at C:\\Users\\stan4\\photo.jpg", "Caption should be 'My photo'"]`
|
|
23
|
+
- **`localUrl`** — the full URL to test against (e.g., `https://x.com`, `http://localhost:3000`). For external sites, use `https://<domain>`. For local dev servers, use the port the user's app is running on.
|
|
24
|
+
|
|
25
|
+
If the prompt is ambiguous and you cannot confidently extract these, ask one clarifying question before proceeding.
|
|
26
|
+
|
|
27
|
+
## Step 2 — Find or create Project
|
|
28
|
+
|
|
29
|
+
Load and call `muggle-remote-project-list`. Find a project whose URL contains `domain` (case-insensitive substring match).
|
|
30
|
+
|
|
31
|
+
**If found:** use it. Tell the user: `Found project: <name>`.
|
|
32
|
+
|
|
33
|
+
**If not found:** call `muggle-remote-project-create` with:
|
|
34
|
+
- `projectName`: `<domain>`
|
|
35
|
+
- `description`: `E2E acceptance testing project for <domain>`
|
|
36
|
+
- `url`: `https://<domain>`
|
|
37
|
+
|
|
38
|
+
Tell the user: `Created project: <name>`.
|
|
39
|
+
|
|
40
|
+
## Step 3 — Find or create Use Case
|
|
41
|
+
|
|
42
|
+
Load and call `muggle-remote-use-case-list` filtered by `projectId`. Fuzzy-match against `useCaseName`:
|
|
43
|
+
- Case-insensitive
|
|
44
|
+
- Strip punctuation
|
|
45
|
+
- Match if either string is a substring of the other
|
|
46
|
+
|
|
47
|
+
If multiple candidates, pick the closest and tell the user which was selected.
|
|
48
|
+
|
|
49
|
+
**If not found:** call `muggle-remote-use-case-create-from-prompts` with:
|
|
50
|
+
- `projectId`: from Step 2
|
|
51
|
+
- `instructions`: `["<original prompt>"]`
|
|
52
|
+
|
|
53
|
+
Use the first result. Capture its `id` as `useCaseId`. If the result is empty or the call fails, stop and tell the user: "Could not create use case — try rephrasing the task description."
|
|
54
|
+
|
|
55
|
+
Tell the user: `Created use case: <title>`.
|
|
56
|
+
|
|
57
|
+
## Step 4 — Find or create Test Case
|
|
58
|
+
|
|
59
|
+
Load and call `muggle-remote-test-case-list-by-use-case` with `useCaseId`. Filter for test cases where `status` equals `ACTIVE`.
|
|
60
|
+
|
|
61
|
+
**If not found:** call `muggle-remote-test-case-create` with:
|
|
62
|
+
- `projectId`: from Step 2
|
|
63
|
+
- `useCaseId`: from Step 3
|
|
64
|
+
- `title`: `<useCaseName>`
|
|
65
|
+
- `description`: `Test case for: <original prompt>`
|
|
66
|
+
- `goal`: `Successfully complete: <useCaseName>`
|
|
67
|
+
- `expectedResult`: `The action completes without error`
|
|
68
|
+
- `url`: `https://<domain>`
|
|
69
|
+
|
|
70
|
+
Tell the user: `Created test case: <id>`.
|
|
71
|
+
|
|
72
|
+
## Step 5 — Find active Test Script
|
|
73
|
+
|
|
74
|
+
Load and call `muggle-remote-test-script-list` with:
|
|
75
|
+
- `projectId`: from Step 2
|
|
76
|
+
- `testCaseId`: from Step 4
|
|
77
|
+
|
|
78
|
+
Tell the user which mutations will be applied: `Mutations: <mutations[]>` (or "no mutations" if empty).
|
|
79
|
+
|
|
80
|
+
Filter for scripts where `status` equals `ACTIVE` or `PUBLISHED`. If all returned scripts have another status (`DRAFT`, `GENERATION_PENDING`, `FAILED`), treat as "no active script" and proceed to Phase 1.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### Phase 1 — No active script: generate locally
|
|
85
|
+
|
|
86
|
+
1. Load and call `muggle-remote-test-case-get` with the test case ID from Step 4. This returns the full test case object needed by the local execution tool.
|
|
87
|
+
|
|
88
|
+
2. Load and call `muggle-local-execute-test-generation` with:
|
|
89
|
+
- `testCase`: the full object from step 1 above
|
|
90
|
+
- `localUrl`: from Step 1
|
|
91
|
+
- `mutations`: the `mutations[]` array from Step 1 (omit if empty)
|
|
92
|
+
|
|
93
|
+
3. Tell the user:
|
|
94
|
+
> Script generation is running in the Muggle Test window. Once complete, run `/muggle-do "<original prompt>"` again to execute the task.
|
|
95
|
+
|
|
96
|
+
Do not proceed further.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Phase 2 — Active script found: replay with mutations
|
|
101
|
+
|
|
102
|
+
## Step 6 — Fetch Action Script
|
|
103
|
+
|
|
104
|
+
1. Load and call `muggle-remote-test-script-get` with the script ID from Step 5. Extract `actionScriptId`. If `actionScriptId` is missing or null, stop and tell the user: "The script record is incomplete — it may still be generating. Try again in a moment."
|
|
105
|
+
|
|
106
|
+
2. Load and call `muggle-remote-action-script-get` with `actionScriptId`.
|
|
107
|
+
|
|
108
|
+
Tell the user: `Executing task...`
|
|
109
|
+
|
|
110
|
+
## Step 7 — Execute locally
|
|
111
|
+
|
|
112
|
+
Load and call `muggle-local-execute-replay` with:
|
|
113
|
+
- `testScript`: the full object from Step 6 (from `muggle-remote-test-script-get`)
|
|
114
|
+
- `actionScript`: the content from Step 6 (from `muggle-remote-action-script-get`)
|
|
115
|
+
- `localUrl`: from Step 1
|
|
116
|
+
- `mutations`: the `mutations[]` array from Step 1 (omit if empty)
|
|
117
|
+
|
|
118
|
+
Tell the user:
|
|
119
|
+
> Running **[useCaseName]** on [domain]. Watch the Muggle Test window — it will execute the task with your parameters applied.
|
|
120
|
+
|
|
121
|
+
## Step 8 — Route failures through the failure-mode handler
|
|
122
|
+
|
|
123
|
+
If Phase 1 generation or Phase 2 replay returns `failed` or any non-passing terminal state, follow [`_shared/failure-mode-handling.md`](../_shared/failure-mode-handling.md):
|
|
124
|
+
|
|
125
|
+
- **Phase 1 (generation) failure** → section C (buckets: `transient` / `infra` / `agent-course` / `product-uxux`).
|
|
126
|
+
- **Phase 2 (replay) failure** → section B (buckets: `infra` / `stale-script` / `product-defect`).
|
|
127
|
+
|
|
128
|
+
Steps:
|
|
129
|
+
1. Read the run via `muggle-local-run-result-get` and extract signals per the heuristics in the shared doc.
|
|
130
|
+
2. Emit `regen-failure-classified` or `replay-failure-classified` via `muggle-local-telemetry-event-emit` **before** asking the user.
|
|
131
|
+
3. Present the recommended action via `AskUserQuestion` with the alternatives the shared doc lists for that bucket.
|
|
132
|
+
4. After the user picks, emit the matching `*-resolved` event with `userAction`.
|
|
133
|
+
|
|
134
|
+
If the user picks `muggle-feedback` from any bucket's options, invoke the `muggle-feedback` skill via the `Skill` tool with the `runId`. Skip silently on clean success.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muggle-feedback
|
|
3
|
+
description: Capture feedback on a generated Muggle Test action script — either step-level or whole-script — and submit it so the system can analyze it and regenerate affected scripts. Use when the user has just run a Muggle Test (local or remote) and wants to flag what went wrong, when they paste a Muggle dashboard URL with a test script or run, or when they want to view or delete previously submitted feedback. Triggers on: '/muggle-feedback', 'give feedback on this run', 'the test was wrong', 'step N didn't work', 'the script clicked the wrong button', 'flag this run', 'the summary is wrong', 'show my feedback', 'list feedback', 'delete that feedback'. Skill auto-detects the run context from a recent local run, a remote run, or a Muggle dashboard URL in the prompt.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Muggle Test Feedback
|
|
7
|
+
|
|
8
|
+
> Telemetry first step: see [`_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-feedback"`.
|
|
9
|
+
|
|
10
|
+
Capture user feedback on what a generated Muggle Test action script did wrong. The server uses each feedback row to find similar test cases via LLM and regenerate their scripts in the background.
|
|
11
|
+
|
|
12
|
+
## Routing
|
|
13
|
+
|
|
14
|
+
Pick the operation, then read its op file for the procedure.
|
|
15
|
+
|
|
16
|
+
| Intent | Op file |
|
|
17
|
+
|---|---|
|
|
18
|
+
| "give feedback on this run" / "the test was wrong" / "step N didn't work" / a Muggle dashboard URL in the prompt / chained from another skill | [`ops/submit.md`](ops/submit.md) |
|
|
19
|
+
| "show my feedback" / "list feedback for this project" / "what feedback have I filed" | [`ops/list.md`](ops/list.md) |
|
|
20
|
+
| "delete that feedback" / "remove feedback for X" | [`ops/delete.md`](ops/delete.md) |
|
|
21
|
+
|
|
22
|
+
If intent is ambiguous, use `AskUserQuestion` once with options **Submit / List / Delete** — never ask the user to type a clarification in plain text.
|
|
23
|
+
|
|
24
|
+
## Constraints (all ops)
|
|
25
|
+
|
|
26
|
+
- **Feedback attaches to a cloud action-script id.** A local run that has not yet been uploaded to the cloud has no such id. Submit must upload the run first if needed.
|
|
27
|
+
- **Feedback target is one of two shapes:**
|
|
28
|
+
- **Whole script** — `target.targetType = "actionScript"`, `target.targetId = <actionScriptId>`.
|
|
29
|
+
- **One specific step** — `target.targetType = "step"`, `target.targetId = "<actionScriptId>:<stepIndex>"` where `stepIndex` is **0-based** on the wire even though steps are shown to the user 1-based.
|
|
30
|
+
- **Project scope.** All ops scope to the user's last-used project (`muggle-local-last-project-get`). If unset, ask once and persist via `muggle-local-last-project-set` so subsequent ops in this session reuse it.
|
|
31
|
+
- **`feedbackText` must be non-empty.** Re-prompt the user if they leave it blank.
|
|
32
|
+
|
|
33
|
+
## Non-negotiables (all ops)
|
|
34
|
+
|
|
35
|
+
- Use `AskUserQuestion` for every selection (project, test case, run, target type, which step(s), confirm). Step selection must be a clickable picker built from the rendered steps (see [`ops/submit.md`](ops/submit.md) §3b) — never ask the user to type a number.
|
|
36
|
+
- Always render the run's steps and summary (§2) **before** collecting feedback — users can only point at what they can see.
|
|
37
|
+
- Convert step numbers between 1-based (rendered to user) and 0-based (wire format) at the boundary. Never expose 0-based indices to the user.
|
|
38
|
+
- One MCP submit/delete call per feedback piece — never batch into a single call.
|
|
39
|
+
- Surface the `feedbackAnalysisWorkflowRuntimeId` returned by submit so the user knows regeneration is running. Do not poll it from this skill.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Delete feedback
|
|
2
|
+
|
|
3
|
+
Soft-delete a feedback entry. Always confirm with the user before deleting — this is a write the user cannot undo from this skill.
|
|
4
|
+
|
|
5
|
+
## 1. Identify the feedback
|
|
6
|
+
|
|
7
|
+
Three paths:
|
|
8
|
+
|
|
9
|
+
- **Explicit id** — user named the feedback id (e.g. "delete feedback `abcd-1234-...`"). Use it.
|
|
10
|
+
- **Recently shown id** — the user is referring to a row from a list rendered earlier in the conversation. Resolve from that context.
|
|
11
|
+
- **No id given** — run [`list.md`](list.md) first to surface entries; offer "Delete one" as the next-action; the user picks.
|
|
12
|
+
|
|
13
|
+
## 2. Show what will be deleted
|
|
14
|
+
|
|
15
|
+
Print:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Feedback: <id>
|
|
19
|
+
Target: <Whole script | Step N>
|
|
20
|
+
Test case: <title>
|
|
21
|
+
Created: <human-readable>
|
|
22
|
+
Text:
|
|
23
|
+
<full feedbackText, indented>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 3. Confirm
|
|
27
|
+
|
|
28
|
+
`AskUserQuestion`:
|
|
29
|
+
|
|
30
|
+
> "Delete this feedback?"
|
|
31
|
+
> - **Delete** — proceed
|
|
32
|
+
> - **Cancel** — abort
|
|
33
|
+
|
|
34
|
+
If the user cancels, print "Cancelled — feedback kept." and stop.
|
|
35
|
+
|
|
36
|
+
## 4. Soft-delete
|
|
37
|
+
|
|
38
|
+
`muggle-remote-user-feedback-delete` with the feedback id.
|
|
39
|
+
|
|
40
|
+
## 5. Report
|
|
41
|
+
|
|
42
|
+
On success: `✓ Deleted feedback <id>.`
|
|
43
|
+
|
|
44
|
+
On failure: print the error verbatim. If the error is "not found", inform the user the entry was likely already deleted and continue gracefully.
|
|
45
|
+
|
|
46
|
+
## Non-negotiables
|
|
47
|
+
|
|
48
|
+
- Never delete without an explicit confirm step, even if the user said "delete X" in their original prompt — the confirm shows what they're actually deleting.
|
|
49
|
+
- One delete call per invocation. No bulk delete in v1.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# List feedback
|
|
2
|
+
|
|
3
|
+
Show feedback the user has filed. The user usually wants feedback on a specific test case (or test script, or use case) — not the whole project — so the skill picks a scope first.
|
|
4
|
+
|
|
5
|
+
## 1. Scope to a project
|
|
6
|
+
|
|
7
|
+
Read `muggle-local-last-project-get`. If set, use it.
|
|
8
|
+
|
|
9
|
+
If unset: `muggle-remote-project-list` and pick via `AskUserQuestion` (top 5 by recency, plus "Show full list"). Persist with `muggle-local-last-project-set`.
|
|
10
|
+
|
|
11
|
+
## 2. Pick a narrowing scope
|
|
12
|
+
|
|
13
|
+
Ask once via `AskUserQuestion` — the list tool accepts at most one narrowing filter:
|
|
14
|
+
|
|
15
|
+
> "What feedback do you want to see?"
|
|
16
|
+
> - **A specific test case** (most common)
|
|
17
|
+
> - **A specific test script**
|
|
18
|
+
> - **A specific use case**
|
|
19
|
+
> - **All in this project**
|
|
20
|
+
|
|
21
|
+
If the user came from a chained skill or from a recent run, default to the matching narrowing scope and skip this question.
|
|
22
|
+
|
|
23
|
+
## 3. Resolve the filter id
|
|
24
|
+
|
|
25
|
+
- **Test case** → `muggle-remote-test-case-list` with `projectId`, `AskUserQuestion`. Pass picked id as `testCaseId`.
|
|
26
|
+
- **Test script** → first pick a test case (as above), then `muggle-remote-test-script-list` with `testCaseId`, `AskUserQuestion`. Pass as `testScriptId`.
|
|
27
|
+
- **Use case** → `muggle-remote-use-case-list` with `projectId`, `AskUserQuestion`. Pass as `useCaseId`.
|
|
28
|
+
- **All in project** → no narrowing param.
|
|
29
|
+
|
|
30
|
+
Use relevance-first filtering on each picker: top 3-5 most relevant to the user's stated goal, plus "Show full list".
|
|
31
|
+
|
|
32
|
+
## 4. Fetch
|
|
33
|
+
|
|
34
|
+
`muggle-remote-user-feedback-list` with `projectId` and at most one of `actionScriptId` / `testScriptId` / `testCaseId` / `useCaseId`.
|
|
35
|
+
|
|
36
|
+
If the response has zero entries, print "No feedback yet for `<scope description>`." and offer `AskUserQuestion` with **Submit new feedback / Done**.
|
|
37
|
+
|
|
38
|
+
## 5. Render
|
|
39
|
+
|
|
40
|
+
Markdown table sorted by `createdAt` (newest first):
|
|
41
|
+
|
|
42
|
+
| # | Target | Test case | Excerpt | Created | Id |
|
|
43
|
+
|---|---|---|---|---|---|
|
|
44
|
+
|
|
45
|
+
- **Target** — "Whole script" or "Step N" (convert wire 0-based index to 1-based for display).
|
|
46
|
+
- **Test case** — when the scope is `testCaseId` or `testScriptId`, all rows share the same test case (use the title from the picker). When the scope is `useCaseId` or project-wide, resolve per row by fetching `muggle-remote-test-script-list` once for each unique `actionScriptId` (cache in-memory) — or skip and show "Test case: …" if there are >20 unique scripts.
|
|
47
|
+
- **Excerpt** — first 80 chars of `feedbackText`, single line.
|
|
48
|
+
- **Created** — human-readable, e.g. `2 days ago`.
|
|
49
|
+
- **Id** — feedback id, truncated to first 8 chars in the table; full id shown in the detail view.
|
|
50
|
+
|
|
51
|
+
## 6. Offer next action
|
|
52
|
+
|
|
53
|
+
`AskUserQuestion`:
|
|
54
|
+
|
|
55
|
+
> "What next?"
|
|
56
|
+
> - **View detail** — pick an entry, print full `feedbackText`, full ids, target, dashboard link if available.
|
|
57
|
+
> - **Delete one** — hand off to [`delete.md`](delete.md).
|
|
58
|
+
> - **Submit new feedback** — hand off to [`submit.md`](submit.md).
|
|
59
|
+
> - **Done**
|
|
60
|
+
|
|
61
|
+
## Non-negotiables
|
|
62
|
+
|
|
63
|
+
- One narrowing filter only — never set more than one of `actionScriptId` / `testScriptId` / `testCaseId` / `useCaseId` in the same call.
|
|
64
|
+
- Convert wire 0-based step indices to 1-based when rendering to the user.
|
|
65
|
+
- Don't fetch test-case names per row eagerly past ~20 unique action scripts — make it opt-in.
|