@muggleai/works 5.0.1 → 5.0.3
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 +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/scripts/guardrails.mjs +2 -1
- package/dist/plugin/skills/_shared/github-cli-recipes/pr-metadata.md +1 -1
- package/dist/plugin/skills/_shared/github-cli-recipes/submitted-reviews.md +14 -6
- package/dist/plugin/skills/_shared/github-cli-recipes/unresolved-threads.md +6 -2
- package/dist/plugin/skills/_shared/github-cli-recipes.md +2 -2
- package/dist/plugin/skills/_shared/pr-followup-helpers/classify.md +2 -2
- package/dist/plugin/skills/_shared/pr-followup-helpers/echo-skip.md +6 -12
- package/dist/plugin/skills/_shared/pr-followup-helpers/reply-routing.md +1 -1
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-cycle.md +4 -2
- package/dist/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +9 -5
- package/dist/plugin/skills/do/address-reviews.md +7 -7
- package/dist/plugin/skills/do/input-routing.md +1 -1
- package/dist/plugin/skills/do/open-prs/forward.md +1 -1
- package/dist/plugin/skills/do/resolve-conflicts.md +21 -19
- package/dist/plugin/skills/muggle-do/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-feedback/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/CLAUDE.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/SKILL.md +3 -3
- package/dist/plugin/skills/muggle-pr-followup/auto-track.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/bootstrap.md +8 -6
- package/dist/plugin/skills/muggle-pr-followup/contract.md +30 -21
- package/dist/plugin/skills/muggle-pr-followup/output-templates/bootstrap.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/output-templates/help.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/output-templates/watcher-log.md +2 -2
- package/dist/plugin/skills/muggle-pr-followup/state-schemas.md +9 -9
- package/dist/plugin/skills/muggle-status/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-test/SKILL.md +13 -51
- package/dist/plugin/skills/muggle-test/reference.md +35 -0
- package/dist/plugin/skills/muggle-test-import/SKILL.md +1 -10
- package/dist/plugin/skills/muggle-test-prepare/SKILL.md +4 -1
- package/dist/plugin/skills/muggle-test-prepare/steps/check-running.md +13 -0
- package/dist/plugin/skills/muggle-test-regenerate-missing/SKILL.md +1 -1
- package/dist/release-manifest.json +4 -4
- package/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/scripts/guardrails.mjs +2 -1
- package/plugin/skills/_shared/github-cli-recipes/pr-metadata.md +1 -1
- package/plugin/skills/_shared/github-cli-recipes/submitted-reviews.md +14 -6
- package/plugin/skills/_shared/github-cli-recipes/unresolved-threads.md +6 -2
- package/plugin/skills/_shared/github-cli-recipes.md +2 -2
- package/plugin/skills/_shared/pr-followup-helpers/classify.md +2 -2
- package/plugin/skills/_shared/pr-followup-helpers/echo-skip.md +6 -12
- package/plugin/skills/_shared/pr-followup-helpers/reply-routing.md +1 -1
- package/plugin/skills/_shared/telemetry-events/muggle-do-cycle.md +4 -2
- package/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +9 -5
- package/plugin/skills/do/address-reviews.md +7 -7
- package/plugin/skills/do/input-routing.md +1 -1
- package/plugin/skills/do/open-prs/forward.md +1 -1
- package/plugin/skills/do/resolve-conflicts.md +21 -19
- package/plugin/skills/muggle-do/SKILL.md +1 -1
- package/plugin/skills/muggle-feedback/SKILL.md +1 -1
- package/plugin/skills/muggle-pr-followup/CLAUDE.md +1 -1
- package/plugin/skills/muggle-pr-followup/SKILL.md +3 -3
- package/plugin/skills/muggle-pr-followup/auto-track.md +1 -1
- package/plugin/skills/muggle-pr-followup/bootstrap.md +8 -6
- package/plugin/skills/muggle-pr-followup/contract.md +30 -21
- package/plugin/skills/muggle-pr-followup/output-templates/bootstrap.md +1 -1
- package/plugin/skills/muggle-pr-followup/output-templates/help.md +1 -1
- package/plugin/skills/muggle-pr-followup/output-templates/watcher-log.md +2 -2
- package/plugin/skills/muggle-pr-followup/state-schemas.md +9 -9
- package/plugin/skills/muggle-status/SKILL.md +1 -1
- package/plugin/skills/muggle-test/SKILL.md +13 -51
- package/plugin/skills/muggle-test/reference.md +35 -0
- package/plugin/skills/muggle-test-import/SKILL.md +1 -10
- package/plugin/skills/muggle-test-prepare/SKILL.md +4 -1
- package/plugin/skills/muggle-test-prepare/steps/check-running.md +13 -0
- package/plugin/skills/muggle-test-regenerate-missing/SKILL.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test
|
|
3
|
-
description: "
|
|
3
|
+
description: "Change-driven E2E acceptance testing with Muggle AI: detect the user's recent code changes (local diff or a PR), map them to affected user flows, run real-browser tests on localhost or a preview/staging URL, publish results, and post a screenshot summary to the PR. Use whenever the user wants to test, validate, or regression-test their own in-progress changes or work — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — especially as the acceptance gate before opening or merging a PR. The defining signal is change-driven validation tied to a commit, push, PR, or merge. For one specific named feature/flow use muggle-test-feature-local; not for importing existing tests, configuring preferences, or replaying a single named script."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Muggle Test — Change-Driven E2E Acceptance Router
|
|
@@ -415,53 +415,15 @@ Use `AskUserQuestion`:
|
|
|
415
415
|
|
|
416
416
|
This is a suggestion, not automatic invocation. Skip silently if every test passed cleanly.
|
|
417
417
|
|
|
418
|
-
##
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
| Test Case | `muggle-remote-test-case-generate-from-prompt` | Both |
|
|
431
|
-
| Test Case | `muggle-remote-test-case-create` | Both |
|
|
432
|
-
| Test Case | `muggle-remote-test-case-get` | Both |
|
|
433
|
-
| Execute (regen) | `muggle-local-execute-test-generation` | Local |
|
|
434
|
-
| Execute (replay) | `muggle-local-execute-replay` | Local |
|
|
435
|
-
| Replay action script fetch | `muggle-remote-test-script-get`, `muggle-remote-action-script-get` | Local replay |
|
|
436
|
-
| Execute (regen) | `muggle-remote-workflow-start-test-script-generation` | Remote |
|
|
437
|
-
| Execute (replay) | `muggle-remote-workflow-start-test-script-replay` | Remote |
|
|
438
|
-
| Failure-mode telemetry | `muggle-local-telemetry-event-emit` | Both |
|
|
439
|
-
| Results | `muggle-local-run-result-get` | Local |
|
|
440
|
-
| Results | `muggle-remote-wf-get-ts-gen-latest-run`, `muggle-remote-wf-get-ts-replay-latest-run` | Remote |
|
|
441
|
-
| Publish | `muggle-local-publish-test-script` | Local |
|
|
442
|
-
| Per-step screenshots (for walkthrough) | `muggle-remote-test-script-get` | Both |
|
|
443
|
-
| Browser | `open` (shell command) | Both |
|
|
444
|
-
| PR walkthrough | `muggle-pr-visual-walkthrough` (shared skill) | Both |
|
|
445
|
-
|
|
446
|
-
## Guardrails
|
|
447
|
-
|
|
448
|
-
- **Always confirm intent first** — never assume local vs remote without asking
|
|
449
|
-
- **PR URLs always run in a dedicated worktree** — never switch the user's main checkout. Materialize per [`_shared/pr-branch-worktree.md`](../_shared/pr-branch-worktree.md) and pass that path as `cwd` to local execute tools; the cross-worktree single-flight lock relies on it to serialize concurrent runs from different branches.
|
|
450
|
-
- **User MUST select project** — present clickable options via `AskUserQuestion`, wait for explicit choice, never auto-select
|
|
451
|
-
- **Best-effort shortlist use cases** — use the change summary to narrow the list to the most relevant 1–5 use cases and pre-check them; never dump every use case in the project on the user. Always leave an escape hatch to reveal the full list.
|
|
452
|
-
- **Best-effort shortlist test cases** — same idea: pre-check the test cases most relevant to the change summary; never enumerate every test case attached to a use case. Always leave an escape hatch to reveal the full list.
|
|
453
|
-
- **Use `AskUserQuestion` for every selection** — never ask the user to type a number; always present clickable options
|
|
454
|
-
- **Auto-detect localhost URL when possible**; only fall back to free-text when nothing is listening on a common port
|
|
455
|
-
- **Parallelize independent cloud jobs** — when creating N use cases, generating/creating N test cases, fetching N test case details, starting N remote workflows, polling N workflow runtimes, publishing N local runs, or fetching N per-step test scripts, issue all N calls in a single message so they fan out in parallel. The only tolerated sequential loop is local Electron execution (one browser, one test at a time). For use case creation specifically, use the native batch form of `muggle-remote-use-case-create-from-prompts` (all descriptions in one `instructions` array) instead of parallel calls.
|
|
456
|
-
- **One atomic behavior per test case** — every test case verifies exactly one user-observable behavior. Never bundle signup/login/navigation/bootstrap/teardown into a test case body. Ordering and dependencies are Muggle Test's service responsibility, not the skill's.
|
|
457
|
-
- **Never consolidate the generator's output** — if `muggle-remote-test-case-generate-from-prompt` returns N micro-tests, accept all N; never merge them into fewer test cases, even if "the plan" says 4 UC / 4 TC.
|
|
458
|
-
- **Never skip the generate→review cycle** — always present generated test cases to the user before calling `muggle-remote-test-case-create`, even when you're confident. "I'll skip the review and create directly" is always wrong.
|
|
459
|
-
- **Never silently drop test cases** — log failures and continue, then report them
|
|
460
|
-
- **Never guess the URL** — always ask the user for localhost or preview URL
|
|
461
|
-
- **Always publish before opening browser** — the dashboard needs the published data to show results
|
|
462
|
-
- **Delegate PR posting to `muggle-pr-visual-walkthrough`** — never inline the walkthrough markdown or call `gh pr comment` directly from this skill; ask the user and hand off
|
|
463
|
-
- **Can be invoked at any state** — if the user already has a project or use cases set up, skip to the relevant step rather than re-doing everything
|
|
464
|
-
|
|
465
|
-
## Agent Dispatch
|
|
466
|
-
|
|
467
|
-
When used in a multi-agent team (e.g., muggle-ai-teams), this skill is available through the **acceptance-tester** agent at `plugin/agents/acceptance-tester.md`. Orchestrators can dispatch it via `Agent()` instead of invoking this skill directly. The agent wraps this skill and four others (muggle-test-import, muggle-preferences, muggle-repair, muggle-status) and returns structured test results with blocking issues and suggested fixes for coding agents to act on.
|
|
418
|
+
## Non-negotiables
|
|
419
|
+
|
|
420
|
+
Each rule below is covered in-step above; these are the ones this skill most often violates, kept here as reinforcement:
|
|
421
|
+
|
|
422
|
+
- **Test-case shape** — never skip the generate→review cycle, never consolidate the generator's micro-tests, one atomic behavior per test case. Creating test cases directly or merging the generator's output is the single most frequent mistake.
|
|
423
|
+
- **Confirm intent before acting** — local vs remote; never guess the localhost/preview URL.
|
|
424
|
+
- **PR URLs run in a dedicated worktree** — never switch the user's main checkout; pass that worktree as `cwd`.
|
|
425
|
+
- **Every selection uses `AskUserQuestion`** — never ask the user to type a number; the user picks the project (never auto-select).
|
|
426
|
+
- **Parallelize independent cloud jobs**; the only sequential loop is local Electron execution (one browser).
|
|
427
|
+
- **Publish before opening the browser**, and delegate PR posting to `muggle-pr-visual-walkthrough` — never inline the walkthrough or call `gh pr comment` here.
|
|
428
|
+
|
|
429
|
+
Phase→tool map and multi-agent (acceptance-tester) dispatch: [`reference.md`](reference.md).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# muggle-test reference
|
|
2
|
+
|
|
3
|
+
Lookup material pulled out of `SKILL.md` to keep the always-loaded body lean. Every tool here is also named inline in the step that uses it — consult this only when you want the full phase→tool map in one place.
|
|
4
|
+
|
|
5
|
+
## Tool Reference
|
|
6
|
+
|
|
7
|
+
| Phase | Tool | Mode |
|
|
8
|
+
|:------|:-----|:-----|
|
|
9
|
+
| Auth | `muggle-remote-auth-status` | Both |
|
|
10
|
+
| Auth | `muggle-remote-auth-login` | Both |
|
|
11
|
+
| Auth | `muggle-remote-auth-poll` | Both |
|
|
12
|
+
| Project | `muggle-remote-project-list` | Both |
|
|
13
|
+
| Project | `muggle-remote-project-create` | Both |
|
|
14
|
+
| Use Case | `muggle-remote-use-case-list` | Both |
|
|
15
|
+
| Use Case | `muggle-remote-use-case-create-from-prompts` | Both |
|
|
16
|
+
| Test Case | `muggle-remote-test-case-list-by-use-case` | Both |
|
|
17
|
+
| Test Case | `muggle-remote-test-case-generate-from-prompt` | Both |
|
|
18
|
+
| Test Case | `muggle-remote-test-case-create` | Both |
|
|
19
|
+
| Test Case | `muggle-remote-test-case-get` | Both |
|
|
20
|
+
| Execute (regen) | `muggle-local-execute-test-generation` | Local |
|
|
21
|
+
| Execute (replay) | `muggle-local-execute-replay` | Local |
|
|
22
|
+
| Replay action script fetch | `muggle-remote-test-script-get`, `muggle-remote-action-script-get` | Local replay |
|
|
23
|
+
| Execute (regen) | `muggle-remote-workflow-start-test-script-generation` | Remote |
|
|
24
|
+
| Execute (replay) | `muggle-remote-workflow-start-test-script-replay` | Remote |
|
|
25
|
+
| Failure-mode telemetry | `muggle-local-telemetry-event-emit` | Both |
|
|
26
|
+
| Results | `muggle-local-run-result-get` | Local |
|
|
27
|
+
| Results | `muggle-remote-wf-get-ts-gen-latest-run`, `muggle-remote-wf-get-ts-replay-latest-run` | Remote |
|
|
28
|
+
| Publish | `muggle-local-publish-test-script` | Local |
|
|
29
|
+
| Per-step screenshots (for walkthrough) | `muggle-remote-test-script-get` | Both |
|
|
30
|
+
| Browser | `open` (shell command) | Both |
|
|
31
|
+
| PR walkthrough | `muggle-pr-visual-walkthrough` (shared skill) | Both |
|
|
32
|
+
|
|
33
|
+
## Agent Dispatch
|
|
34
|
+
|
|
35
|
+
In a multi-agent team (e.g. muggle-ai-teams), this skill is reachable through the **acceptance-tester** agent at `plugin/agents/acceptance-tester.md`. Orchestrators dispatch it via `Agent()` instead of invoking the skill directly. The agent wraps this skill and four others (muggle-test-import, muggle-preferences, muggle-repair, muggle-status) and returns structured test results with blocking issues and suggested fixes for coding agents to act on.
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test-import
|
|
3
|
-
description:
|
|
4
|
-
Bring existing tests and test artifacts INTO Muggle Test — from Playwright, Cypress, PRDs,
|
|
5
|
-
Gherkin feature files, test plan docs, Notion exports, or any source.
|
|
6
|
-
TRIGGER when: user wants to import/migrate/load/upload/add/convert existing test files or
|
|
7
|
-
test docs into Muggle Test — e.g. "import my playwright tests", "migrate from cypress to muggle",
|
|
8
|
-
"upload my PRD to muggle", "add my e2e specs to our muggle project", "load these test cases
|
|
9
|
-
into muggle", "turn this feature file into muggle test cases", "create muggle test cases from
|
|
10
|
-
my PRD", "track my specs in muggle", or any .spec.ts/.cy.js/.feature/.md file + muggle.
|
|
11
|
-
DO NOT TRIGGER when: user wants to run/replay Muggle Test scripts, scan a site, generate new
|
|
12
|
-
tests from scratch, or check existing test results.
|
|
3
|
+
description: "Bring existing tests and test artifacts INTO Muggle Test — from Playwright, Cypress, PRDs, Gherkin feature files, test-plan docs, Notion exports, or any source. TRIGGER when the user wants to import, migrate, load, or convert existing test files or docs into Muggle Test — import my playwright tests, migrate from cypress to muggle, upload my PRD to muggle, turn this feature file into muggle test cases, or any .spec.ts/.cy.js/.feature/.md file plus muggle. DO NOT trigger for running or replaying scripts, scanning a site, generating new tests from scratch, or checking results."
|
|
13
4
|
---
|
|
14
5
|
|
|
15
6
|
# Muggle Test Import
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test-prepare
|
|
3
|
-
description: "
|
|
3
|
+
description: "Get a user's local environment ready before running E2E acceptance tests — verify the dev servers, APIs, and sibling services they need are up and responding, and offer to start whatever is missing (with approval per step). Trigger when the user wants to confirm specific ports or localhost URLs are listening before testing (check if localhost:3000 and the api on 8080 are up, are my services running), spin up their local dev stack, or verify their setup — and whenever another muggle skill (muggle-test, muggle-do, muggle-test-feature-local) needs services running but they're not. This is environment readiness and service startup, not running the tests."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Muggle Test Prepare
|
|
@@ -62,6 +62,7 @@ Gates run per [`preference-gates/README.md`](../muggle-preferences/preference-ga
|
|
|
62
62
|
|------------|-------|
|
|
63
63
|
| `autoRebase` | [rebase-check](./steps/rebase-check.md) — rebase onto `origin/<default>` before starting dev servers |
|
|
64
64
|
| `reusePreparePlan` | [reuse-plan](./steps/reuse-plan.md) — reuse the saved prepare plan for this stack, or rediscover |
|
|
65
|
+
| `autoSelectLocalHost` | [check-running](./steps/check-running.md) — reuse the recorded dev-server URL silently, or confirm it each run |
|
|
65
66
|
|
|
66
67
|
## Workflow
|
|
67
68
|
|
|
@@ -111,6 +112,8 @@ After a test run, the caller can re-invoke for cleanup or leave services running
|
|
|
111
112
|
|
|
112
113
|
## Guardrails
|
|
113
114
|
|
|
115
|
+
- **Never invent or default a host/port** — the dev-server URL is a recorded value, not a guess. Resolve it from `<repo>/.muggle-ai/last-host.json` (the [`autoSelectLocalHost`](../muggle-preferences/preference-gates/autoSelectLocalHost.md) cache) before probing ports; a framework default like `:3000` is never a fallback. See [check-running](./steps/check-running.md).
|
|
116
|
+
- **No silent auto-selection without a gate** — when no preference authorizes a silent choice (host, restart, kill), confirm with the user. A gate set to `always` is the only license to skip the question; absent that, ask.
|
|
114
117
|
- **Verify first, offer to start second** — check what's already running before proposing to start anything.
|
|
115
118
|
- **The user may prefer to start services themselves** — always offer that option.
|
|
116
119
|
- **Never start a process the user didn't approve.**
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Check what's already running
|
|
2
2
|
|
|
3
|
+
## Resolve the target host first
|
|
4
|
+
|
|
5
|
+
The dev-server URL the tests will hit is a **recorded value, not a guess** — resolve it before probing anything.
|
|
6
|
+
|
|
7
|
+
1. Read the cached host with `muggle-local-last-host-get`. It reads `<cwd>/.muggle-ai/last-host.json`; a worktree usually has **no cache of its own**, so when the worktree returns nothing, pass the **main** working-tree root as `cwd` — `git rev-parse --git-common-dir`, then its parent directory.
|
|
8
|
+
2. Apply the [`autoSelectLocalHost`](../../muggle-preferences/preference-gates/autoSelectLocalHost.md) gate (read its value from the `Muggle Test Preferences` session-context line; absent → `ask`):
|
|
9
|
+
- `always` **and** a cache exists → use it silently: `Using saved local URL {lastHost}`.
|
|
10
|
+
- otherwise (`ask` / `never`, or no cache) → **confirm before using any host.** Run the gate's Picker 1 with `{lastHost}` (cached URL, omitted when absent) and `{suggestedHost}` (a port you actually detect listening). Never auto-pick, and never fall back to a framework default like `:3000`; if nothing is cached or detected, ask the user to type the URL.
|
|
11
|
+
|
|
12
|
+
The resolved host fixes the **expected** dev-server port for the detection below — probe that port; don't infer the target from whichever port happens to be listening.
|
|
13
|
+
|
|
14
|
+
## Detect listening services
|
|
15
|
+
|
|
3
16
|
Run port detection and (when an app declares a backend URL) backend-health probe per [`../../_shared/dev-server-readiness.md`](../../_shared/dev-server-readiness.md). Cross-reference hits against selected service directories.
|
|
4
17
|
|
|
5
18
|
> "**backend-api** is already listening on port 3001 (PID 54321) — looks good."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test-regenerate-missing
|
|
3
|
-
description: "Bulk-regenerate test scripts for every test case in a Muggle AI project that
|
|
3
|
+
description: "Bulk-regenerate test scripts for every test case in a Muggle AI project that has no active script. Scans the project, finds test cases stuck in DRAFT or GENERATION_PENDING, shows the user the list, and on approval kicks off bulk remote script generation via the Muggle Test cloud. Use when the user wants to regenerate missing scripts, fill in missing test scripts, generate scripts for test cases without one, rebuild scripts for stale test cases, or bulk regenerate across a project. Handles discovery, filtering, confirmation, and remote dispatch end-to-end."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Muggle Test — Regenerate Missing Test Scripts
|