@muggleai/works 5.38.0 → 5.39.0-staging.360
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/.claude-plugin/marketplace.json +1 -1
- package/README.md +604 -604
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-mcp.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/.mcp.json +1 -1
- package/dist/plugin/skills/do/build.md +1 -1
- package/dist/plugin/skills/do/cleanup.md +8 -1
- package/dist/plugin/skills/do/design.md +28 -11
- package/dist/plugin/skills/do/input-routing.md +14 -13
- package/dist/plugin/skills/do/pre-flight.md +132 -132
- package/dist/plugin/skills/muggle-do/SKILL.md +119 -117
- package/dist/plugin/skills/muggle-preferences/preference-gates/frontloadQuestions.md +27 -27
- package/dist/release-manifest.json +3 -3
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-mcp.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/skills/do/build.md +1 -1
- package/plugin/skills/do/cleanup.md +8 -1
- package/plugin/skills/do/design.md +28 -11
- package/plugin/skills/do/input-routing.md +14 -13
- package/plugin/skills/do/pre-flight.md +132 -132
- package/plugin/skills/muggle-do/SKILL.md +119 -117
- package/plugin/skills/muggle-preferences/preference-gates/frontloadQuestions.md +27 -27
|
@@ -1,117 +1,119 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: muggle-do
|
|
3
|
-
description: Take a feature request, spec, design, bug, or ticket and carry it autonomously to an opened pull request — write the code, test it, raise the PR. The PR carries real-browser proof: email-gated flows run through live test inboxes, logins through encrypted secrets, and prerequisite flows in test-graph order, with screenshots attached. Use whenever the user wants something built, implemented, added, or fixed with a PR opened, raised, or put up at the end — "implement rate limiting and raise a PR", "build the CSV export and put up a PR", "take this Jira ticket and run with it, ping me when the PR is up", "fix this bug and open a pr", or "muggle do …". Also handles the internal `address-reviews` directive the muggle-pr-followup watcher dispatches when new reviews land. Not for testing or validating existing changes (use muggle-test), nor watching a PR's incoming reviews (use muggle-pr-followup).
|
|
4
|
-
mandatoryStages:
|
|
5
|
-
- ../do/input-routing.md
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Muggle Test Do
|
|
9
|
-
|
|
10
|
-
> Telemetry first step: see [`../_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-do"`.
|
|
11
|
-
|
|
12
|
-
> Running outside Claude Code (in Codex, for one)? Read [`../_shared/host-tool-equivalents.md`](../_shared/host-tool-equivalents.md) first — it maps the tools and paths this skill names to your host's.
|
|
13
|
-
|
|
14
|
-
Runs an autonomous dev cycle from requirements to PR. **Fire and review:** user answers one pre-flight questionnaire, then walks away. The [muggle-pr-followup](../muggle-pr-followup/SKILL.md) watcher invokes `/muggle-do` again with the *address-reviews* directive when new reviews land.
|
|
15
|
-
|
|
16
|
-
## Forward pipeline (fresh feature)
|
|
17
|
-
|
|
18
|
-
| # | Stage | File |
|
|
19
|
-
| :- | :---- | :--- |
|
|
20
|
-
| 1 | Pre-flight (one questioning turn) | [`../do/pre-flight.md`](../do/pre-flight.md) |
|
|
21
|
-
| 2 | Requirements | [`../do/requirements.md`](../do/requirements.md) |
|
|
22
|
-
| 2.5 | Design —
|
|
23
|
-
| 3 | Build | [`../do/build.md`](../do/build.md) |
|
|
24
|
-
| 4 | Impact analysis | [`../do/impact-analysis.md`](../do/impact-analysis.md) |
|
|
25
|
-
| 5 | Unit tests | [`../do/unit-tests.md`](../do/unit-tests.md) |
|
|
26
|
-
| 5.5 | Open PR | [`../do/open-prs.md`](../do/open-prs.md) |
|
|
27
|
-
| 6 | E2E acceptance | [`../do/e2e-acceptance.md`](../do/e2e-acceptance.md) |
|
|
28
|
-
| 7 | Report on the PR | [`../do/open-prs.md`](../do/open-prs.md) |
|
|
29
|
-
| 7.5 | E2E repair loop | [`../do/e2e-repair.md`](../do/e2e-repair.md) |
|
|
30
|
-
| 8 | Hand off to watcher | [`../muggle-pr-followup/SKILL.md`](../muggle-pr-followup/SKILL.md) |
|
|
31
|
-
|
|
32
|
-
**The PR opens before E2E.** Stage 5.5 opens it as soon as unit tests pass; Stage 6 then runs against the PR's head, its progress showing on the PR, and Stage 7 settles the walkthrough with the result. The walkthrough check stays red until then.
|
|
33
|
-
|
|
34
|
-
**Waves and streams.** A session's PRs are either a **wave** — one change split across repos — or a **stream** of independent changes, or both; [`../do/wave-or-stream.md`](../do/wave-or-stream.md) defines which is which, and pre-flight decides it once.
|
|
35
|
-
|
|
36
|
-
**
|
|
37
|
-
|
|
38
|
-
**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
1
|
+
---
|
|
2
|
+
name: muggle-do
|
|
3
|
+
description: Take a feature request, spec, design, bug, or ticket and carry it autonomously to an opened pull request — write the code, test it, raise the PR. The PR carries real-browser proof: email-gated flows run through live test inboxes, logins through encrypted secrets, and prerequisite flows in test-graph order, with screenshots attached. Use whenever the user wants something built, implemented, added, or fixed with a PR opened, raised, or put up at the end — "implement rate limiting and raise a PR", "build the CSV export and put up a PR", "take this Jira ticket and run with it, ping me when the PR is up", "fix this bug and open a pr", or "muggle do …". Also handles the internal `address-reviews` directive the muggle-pr-followup watcher dispatches when new reviews land. Not for testing or validating existing changes (use muggle-test), nor watching a PR's incoming reviews (use muggle-pr-followup).
|
|
4
|
+
mandatoryStages:
|
|
5
|
+
- ../do/input-routing.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Muggle Test Do
|
|
9
|
+
|
|
10
|
+
> Telemetry first step: see [`../_shared/telemetry-emit.md`](../_shared/telemetry-emit.md). Use `skillName: "muggle-do"`.
|
|
11
|
+
|
|
12
|
+
> Running outside Claude Code (in Codex, for one)? Read [`../_shared/host-tool-equivalents.md`](../_shared/host-tool-equivalents.md) first — it maps the tools and paths this skill names to your host's.
|
|
13
|
+
|
|
14
|
+
Runs an autonomous dev cycle from requirements to PR. **Fire and review:** user answers one pre-flight questionnaire, then walks away. The [muggle-pr-followup](../muggle-pr-followup/SKILL.md) watcher invokes `/muggle-do` again with the *address-reviews* directive when new reviews land.
|
|
15
|
+
|
|
16
|
+
## Forward pipeline (fresh feature)
|
|
17
|
+
|
|
18
|
+
| # | Stage | File |
|
|
19
|
+
| :- | :---- | :--- |
|
|
20
|
+
| 1 | Pre-flight (one questioning turn) | [`../do/pre-flight.md`](../do/pre-flight.md) |
|
|
21
|
+
| 2 | Requirements | [`../do/requirements.md`](../do/requirements.md) |
|
|
22
|
+
| 2.5 | Design — a design PR; merging it approves the design and starts the build | [`../do/design.md`](../do/design.md) |
|
|
23
|
+
| 3 | Build | [`../do/build.md`](../do/build.md) |
|
|
24
|
+
| 4 | Impact analysis | [`../do/impact-analysis.md`](../do/impact-analysis.md) |
|
|
25
|
+
| 5 | Unit tests | [`../do/unit-tests.md`](../do/unit-tests.md) |
|
|
26
|
+
| 5.5 | Open PR | [`../do/open-prs.md`](../do/open-prs.md) |
|
|
27
|
+
| 6 | E2E acceptance | [`../do/e2e-acceptance.md`](../do/e2e-acceptance.md) |
|
|
28
|
+
| 7 | Report on the PR | [`../do/open-prs.md`](../do/open-prs.md) |
|
|
29
|
+
| 7.5 | E2E repair loop | [`../do/e2e-repair.md`](../do/e2e-repair.md) |
|
|
30
|
+
| 8 | Hand off to watcher | [`../muggle-pr-followup/SKILL.md`](../muggle-pr-followup/SKILL.md) |
|
|
31
|
+
|
|
32
|
+
**The PR opens before E2E.** Stage 5.5 opens it as soon as unit tests pass; Stage 6 then runs against the PR's head, its progress showing on the PR, and Stage 7 settles the walkthrough with the result. The walkthrough check stays red until then.
|
|
33
|
+
|
|
34
|
+
**Waves and streams.** A session's PRs are either a **wave** — one change split across repos — or a **stream** of independent changes, or both; [`../do/wave-or-stream.md`](../do/wave-or-stream.md) defines which is which, and pre-flight decides it once.
|
|
35
|
+
|
|
36
|
+
**Design PRs.** A change that needs a design stops after Stage 2.5 with a `[DESIGN]` PR carrying the spec. Merging it is the approval: the merge's cleanup resumes the cycle at Stage 3; closing it unmerged rejects the design. See [`../do/design.md`](../do/design.md).
|
|
37
|
+
|
|
38
|
+
**Multi-repo waves.** When a task's PRs need each other to work — one PR per repo — they form a wave: every repo's service starts from its branch, Stage 6 runs **one** E2E pass against the combined stack, and that same result is posted to every PR in the wave. See [`../do/wave-e2e.md`](../do/wave-e2e.md); pre-flight decides whether a cycle is a wave.
|
|
39
|
+
|
|
40
|
+
**Streams — several changes in one session.** Unrelated fixes — several bugs in one request, or a second task while the first is still in flight — are separate changes, each with its own session directory, worktree, PR, and E2E run; a wave is one change among them. When a change reaches Stage 6 while other work is in front of the session, its run goes to a background `acceptance-tester` and the session moves on; the report comes back to the main session, which carries that change through Stages 7–8. One local run at a time, and a PR's walkthrough only ever carries its own change's run. See [`../do/background-e2e.md`](../do/background-e2e.md).
|
|
41
|
+
|
|
42
|
+
Stage 7 dispatches one watcher per opened PR as its last action, gated on Stage 7.5's clearance — a cycle with unrepaired E2E failures never reaches a watcher.
|
|
43
|
+
|
|
44
|
+
## Execution protocol (non-negotiable)
|
|
45
|
+
|
|
46
|
+
The pipeline table lists **pointers, not summaries**. Open each stage's file and execute from it — running a stage off its one-line row here is how tests, E2E, and session state get silently skipped. If you have not read a stage's file this run, you have not run that stage.
|
|
47
|
+
|
|
48
|
+
**Bootstrap before any code, in order:**
|
|
49
|
+
1. Emit telemetry — [`../_shared/telemetry-emit.md`](../_shared/telemetry-emit.md), `skillName: "muggle-do"`.
|
|
50
|
+
2. Create `~/.muggle-ai/muggle-do/sessions/<slug>/` with `state.md` + `iterations/001.md` (pre-flight owns this; do it even when running unattended).
|
|
51
|
+
3. `TodoWrite` one item per stage 1–8, Stages 2.5, 5.5 and 7.5 included — these stages are the checklist; never swap in your own decomposition. Several changes → one set of stage items per change.
|
|
52
|
+
|
|
53
|
+
**Per stage:** read the file → execute it → append one marker line to `iterations/<NNN>.md`, always in the form `Stage <N> done — <evidence>`, citing the evidence that file requires (jest exit code, E2E verdict + `runId`, screenshot path). The marker is the stage's last line, written after its notes, and carries the evidence itself: nothing between `done` and `—`, never a pointer such as `Stage 4 done (see below) —`. A stage is done only when its evidence is written, never on recollection.
|
|
54
|
+
|
|
55
|
+
### "Autonomous" / "without my intervention" collapses exactly one thing
|
|
56
|
+
Best-effort the Stage-1 questionnaire and don't ask. It does **not** license skipping telemetry, session artifacts, requirements, the Stage-2.5 design PR, unit tests, E2E (`autoE2ETest` defaults to `always`), browser verification, the gate below, the Stage-7.5 repair loop, or the watcher hand-off. Stage 7.5 investigates and repairs unattended too; only its user decision is deferred — left open for the user and carried by the watcher, never waived on their behalf. Run the whole pipeline silently — never a shortcut.
|
|
57
|
+
|
|
58
|
+
### Definition of Done — gates before Stages 5.5 and 7
|
|
59
|
+
Each line holds, or is waived by a one-line reason written into `state.md` (silence is not a waiver).
|
|
60
|
+
|
|
61
|
+
Before Stage 5.5 opens the PR:
|
|
62
|
+
- `requirements.md` written (forward runs)
|
|
63
|
+
- `Design: finalized` recorded in `state.md` before Stage 3 edited a file (forward runs)
|
|
64
|
+
- Build clean — typecheck + lint on changed files
|
|
65
|
+
- New/changed logic carries unit tests (authored in Stage 3; Stage 5 only runs the suite)
|
|
66
|
+
- Unit suite run, PASS recorded
|
|
67
|
+
- Stage 4's `e2eScope` recorded, mapping every acceptance criterion to a test case, a deliverable check, or `unobservable` — or `not-scoped` with the condition that failed
|
|
68
|
+
|
|
69
|
+
Before Stage 7 settles the PR's walkthrough:
|
|
70
|
+
- A verdict recorded for every deliverable check in that scope
|
|
71
|
+
- E2E verdict recorded with `runId` for every case in that scope, per `autoE2ETest` — or `[E2E FAILING]`, or `SKIPPED` citing a verified skip code from [`../do/e2e-acceptance.md`](../do/e2e-acceptance.md), where each code's verification rule lives. Free-text reasons are rejected by the gate
|
|
72
|
+
- UI changes verified in a real browser with evidence (screenshot path or muggle `runId`); `curl` + `grep` is not verification
|
|
73
|
+
|
|
74
|
+
Opening a PR, or settling its walkthrough, with an unchecked, unwaived line of its gate is a cycle failure. A Stage 6 readiness halt ([`../do/e2e-acceptance.md`](../do/e2e-acceptance.md) Step 0.5) leaves the E2E line open: no skip code, waiver, or explicit request to open the PR closes it.
|
|
75
|
+
|
|
76
|
+
### Audit trail
|
|
77
|
+
|
|
78
|
+
Every cycle's closing message opens with the fenced block [`../do/audit-trail.md`](../do/audit-trail.md) defines: the unit tests involved, the E2E tests with results, links to the evidence, and what is missing. A prose recap does not replace it. It reports and gates nothing, and it comes after the last action: the watcher arms first.
|
|
79
|
+
|
|
80
|
+
## Address-reviews flow
|
|
81
|
+
|
|
82
|
+
When invoked with the directive (PR URL + slug + review ids), routes to [`../do/address-reviews.md`](../do/address-reviews.md). Shares stages 3–5 with the forward pipeline, then sizes the cycle from its diff per [`../do/cycle-size.md`](../do/cycle-size.md): a full cycle adds stage 6 and a fresh walkthrough, a minor one skips E2E under a verified `NO_APP_LOGIC_CHANGE`. Skips pre-flight, requirements, and PR creation. See the orchestrator for the cycle's exact step order, classification rules, and respawn logic.
|
|
83
|
+
|
|
84
|
+
## Input routing
|
|
85
|
+
|
|
86
|
+
`/muggle-do` serves one interactive mode (the forward pipeline, from a fresh task) and four programmatic modes the watcher dispatches (address-reviews, fix-ci, rebase, post-merge cleanup). Resolve `$ARGUMENTS` to a mode per [`../do/input-routing.md`](../do/input-routing.md) before doing anything else.
|
|
87
|
+
|
|
88
|
+
## Preferences
|
|
89
|
+
|
|
90
|
+
| Preference | Gate |
|
|
91
|
+
| :--------- | :--- |
|
|
92
|
+
| `frontloadQuestions` | Every stage — `always` keeps Stage 1 the only questioning turn, with Stage 2.5's design approval taken as a design-PR merge and Stage 7.5's decision open rather than asked; `never` lets a later stage ask when a question arises ([rule](../muggle-preferences/preference-gates/frontloadQuestions.md)) |
|
|
93
|
+
| `autoE2ETest` | Stage 6 — run E2E every cycle (default `always`), or fold into pre-flight |
|
|
94
|
+
| `autoResolveConflicts` | On rebase conflict — `always` resolves autonomously behind a verify-or-rollback gate, `never` aborts + escalates; resolve from the configured preference (don't assume a default) |
|
|
95
|
+
| `autoRouteBuildToMuggleDo` | Front-door guardrail — route build/implement/fix requests through this pipeline (build delegated to superpowers); fired by the UserPromptSubmit guardrail, default `ask` |
|
|
96
|
+
| `autoInstallCiWorkflow` | Stage 7 — add the `muggle-walkthrough` CI check to a GitHub repo that lacks it, shipped in the PR; `ask` folds into pre-flight, default `ask`. An unedited copy from an earlier release is refreshed unless `never` |
|
|
97
|
+
|
|
98
|
+
`autoUseWorktree`, `autoRebase`, `autoResolveConflicts`, `autoCreatePR`, `autoCleanup`, `postPRVisualWalkthrough` fire from per-stage files.
|
|
99
|
+
|
|
100
|
+
## Session model
|
|
101
|
+
|
|
102
|
+
`~/.muggle-ai/muggle-do/sessions/<slug>/`. Schemas: [`../muggle-pr-followup/state-schemas.md`](../muggle-pr-followup/state-schemas.md).
|
|
103
|
+
|
|
104
|
+
| File | Owner |
|
|
105
|
+
| :--- | :---- |
|
|
106
|
+
| `state.md` | Stage 1 or bootstrap |
|
|
107
|
+
| `iterations/<NNN>.md` | Every stage |
|
|
108
|
+
| `requirements.md` | Stage 2 (forward only) |
|
|
109
|
+
| `prs.json`, `last_seen.json`, `followup.log` | Stage 7 / watcher / `/muggle-do` |
|
|
110
|
+
| `result.md` | Stage 5.5 (seeded), terminal tick (finalized) |
|
|
111
|
+
|
|
112
|
+
## Guardrails
|
|
113
|
+
|
|
114
|
+
- Stage 1 and Stage 7.5's user decision are the only user-facing forward stages; Stage 2.5 asks nothing — the user approves a design by merging its design PR, which resumes the cycle at Stage 3 (`/muggle-do resume slug=<slug>`). Stages 2 and 3–7 don't ask mid-cycle; blocker → pre-flight bug.
|
|
115
|
+
- No code before a finalized design: Stage 3 starts only after Stage 2.5 records `Design: finalized` in `state.md`.
|
|
116
|
+
- Same stage failing 3× → escalate.
|
|
117
|
+
- Each route's entry file declares the stage files every run of that route opens, and a Stop gate holds the turn until they are read. A turn that ends before its route's last stage — a readiness halt, an escalation, a pause for a background run — records why with `echo "MUGGLE_STAGE_SKIP: <reason>"`.
|
|
118
|
+
- 3 repair iterations reach E2E with failures → put the surviving failures to the user (an open decision when unattended), ship with `[E2E FAILING]`, and hand to the watcher.
|
|
119
|
+
- Address-reviews escalation (ambiguous or design-adjustment) does not block the watcher; user resolves on GitHub.
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# `frontloadQuestions`
|
|
2
|
-
|
|
3
|
-
When a run asks its questions. Allowed values: `always` / `never` — there is no `ask`. Default `always`.
|
|
4
|
-
|
|
5
|
-
`always` moves every question a run can foresee into one up-front batch, then lets the run finish unattended. `never` keeps each question at the step that raises it.
|
|
6
|
-
|
|
7
|
-
## Under `always`
|
|
8
|
-
|
|
9
|
-
1. **One up-front batch.** Before the run's first long-running step — invoking `muggle-test-prepare`, any `muggle-local-execute-*` call, a remote generation, replay or bulk dispatch, a build, or a wait on a remote workflow — ask every question the run can foresee, in `AskUserQuestion` calls sent back to back with no work between them. Foreseeable includes every gate the run will fire later that resolves to `ask` (a post-run `openTestResultsAfterRun`, `postPRVisualWalkthrough`, `autoCreatePR`, `autoWatchPR`, `suggestRelated*`), asked now and applied when its step arrives. A foreseeable `ask` gate is never defaulted in place of asking: its picker goes in the batch. A gate resolving to `always` or `never` asks nothing either way.
|
|
10
|
-
2. **Nothing after it.** Once the first long-running step starts, call no `AskUserQuestion` for the rest of the run. A question that surfaces anyway takes a best-effort default: the gate's shipped default, else the option the skill marks recommended, else the option that changes nothing outside this session. Record each as `Defaulted: <question> → <choice> (<reason>)`.
|
|
11
|
-
3. **Decisions only the user may make are never defaulted.** Merging, paying, posting publicly, deleting user data, waiving a failing test, choosing an E2E repair, approving a design before it is built: ask it in the batch when it is foreseeable. When it is not, leave it open, finish every part of the run that does not depend on it, and record it as `Open: <question>`.
|
|
12
|
-
4. **One-click follow-ups become report lines.** A non-blocking prompt a skill offers after a step — "did the agent miss anything on this run?", a suggestion to add related cases — is printed as a line with its one-click path (the slash command and its argument) instead of being asked.
|
|
13
|
-
5. **The final report lists them.** The run's closing message ends with a `Decisions` block: every `Defaulted:` line, then every `Open:` line, or `Decisions: none deferred`.
|
|
14
|
-
|
|
15
|
-
## Under `never`
|
|
16
|
-
|
|
17
|
-
Each question is asked at the step that raises it, as the skill describes.
|
|
18
|
-
|
|
19
|
-
**Picker 1** — header `Question timing`, question `"Ask every question up front, then run without stopping?"`
|
|
20
|
-
- `All up front` — `One batch before the run starts; later decisions take a default listed in the report.` → `always`
|
|
21
|
-
- `As they come up` — `The run stops and waits at each question.` → `never`
|
|
22
|
-
|
|
23
|
-
**Silent action**
|
|
24
|
-
- `always` → `Asking everything up front — the run won't stop for questions after this`
|
|
25
|
-
- `never` → `Asking each question when its step comes up`
|
|
26
|
-
|
|
27
|
-
Print the silent footer once, after the up-front batch, not at every step.
|
|
1
|
+
# `frontloadQuestions`
|
|
2
|
+
|
|
3
|
+
When a run asks its questions. Allowed values: `always` / `never` — there is no `ask`. Default `always`.
|
|
4
|
+
|
|
5
|
+
`always` moves every question a run can foresee into one up-front batch, then lets the run finish unattended. `never` keeps each question at the step that raises it.
|
|
6
|
+
|
|
7
|
+
## Under `always`
|
|
8
|
+
|
|
9
|
+
1. **One up-front batch.** Before the run's first long-running step — invoking `muggle-test-prepare`, any `muggle-local-execute-*` call, a remote generation, replay or bulk dispatch, a build, or a wait on a remote workflow — ask every question the run can foresee, in `AskUserQuestion` calls sent back to back with no work between them. Foreseeable includes every gate the run will fire later that resolves to `ask` (a post-run `openTestResultsAfterRun`, `postPRVisualWalkthrough`, `autoCreatePR`, `autoWatchPR`, `suggestRelated*`), asked now and applied when its step arrives. A foreseeable `ask` gate is never defaulted in place of asking: its picker goes in the batch. A gate resolving to `always` or `never` asks nothing either way.
|
|
10
|
+
2. **Nothing after it.** Once the first long-running step starts, call no `AskUserQuestion` for the rest of the run. A question that surfaces anyway takes a best-effort default: the gate's shipped default, else the option the skill marks recommended, else the option that changes nothing outside this session. Record each as `Defaulted: <question> → <choice> (<reason>)`.
|
|
11
|
+
3. **Decisions only the user may make are never defaulted.** Merging, paying, posting publicly, deleting user data, waiving a failing test, choosing an E2E repair, approving a design before it is built: ask it in the batch when it is foreseeable. A decision a run takes as a merge rather than an answer — approving a design by merging its design PR — is never asked at all. When it is not, leave it open, finish every part of the run that does not depend on it, and record it as `Open: <question>`.
|
|
12
|
+
4. **One-click follow-ups become report lines.** A non-blocking prompt a skill offers after a step — "did the agent miss anything on this run?", a suggestion to add related cases — is printed as a line with its one-click path (the slash command and its argument) instead of being asked.
|
|
13
|
+
5. **The final report lists them.** The run's closing message ends with a `Decisions` block: every `Defaulted:` line, then every `Open:` line, or `Decisions: none deferred`.
|
|
14
|
+
|
|
15
|
+
## Under `never`
|
|
16
|
+
|
|
17
|
+
Each question is asked at the step that raises it, as the skill describes.
|
|
18
|
+
|
|
19
|
+
**Picker 1** — header `Question timing`, question `"Ask every question up front, then run without stopping?"`
|
|
20
|
+
- `All up front` — `One batch before the run starts; later decisions take a default listed in the report.` → `always`
|
|
21
|
+
- `As they come up` — `The run stops and waits at each question.` → `never`
|
|
22
|
+
|
|
23
|
+
**Silent action**
|
|
24
|
+
- `always` → `Asking everything up front — the run won't stop for questions after this`
|
|
25
|
+
- `never` → `Asking each question when its step comes up`
|
|
26
|
+
|
|
27
|
+
Print the silent footer once, after the up-front batch, not at every step.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "5.
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
2
|
+
"release": "5.39.0-staging.360",
|
|
3
|
+
"buildId": "run-360-1",
|
|
4
|
+
"commitSha": "99592c558cc1de1f400a38a08bdc4ad6879ab874",
|
|
5
5
|
"buildTime": "2026-11-12T07:45:22Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muggleai/works",
|
|
3
3
|
"mcpName": "io.github.multiplex-ai/muggleai",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.39.0-staging.360",
|
|
5
5
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"muggleConfig": {
|
|
69
69
|
"electronAppVersion": "1.25.11",
|
|
70
70
|
"downloadBaseUrl": "https://github.com/multiplex-ai/muggle-ai-works/releases/download",
|
|
71
|
-
"runtimeTargetDefault": "
|
|
71
|
+
"runtimeTargetDefault": "staging",
|
|
72
72
|
"checksumsByStream": {
|
|
73
73
|
"production": {
|
|
74
74
|
"win32-x64": "bac76accda124ecb115dafb5853200c1ceba2b95e886f84b00ce6b86f581adb2",
|
package/plugin/.codex-mcp.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.39.0-staging.360",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/.mcp.json
CHANGED
|
@@ -17,7 +17,7 @@ Implement the code change for this dev cycle. Read the frozen requirements from
|
|
|
17
17
|
|
|
18
18
|
For each affected repo:
|
|
19
19
|
|
|
20
|
-
0. **Check the design gate.** `state.md` must carry a `Design: finalized` line from [Stage 2.5](design.md). Without it, edit nothing: go back and run Stage 2.5. Every re-entry below inherits the line already recorded.
|
|
20
|
+
0. **Check the design gate.** `state.md` must carry a `Design: finalized` line from [Stage 2.5](design.md). Without it, edit nothing: go back and run Stage 2.5. Every re-entry below inherits the line already recorded. A design slot — `state.md` carries `Design PR for: <slug>` — is the one exception: its review cycles edit only the file its `Design doc:` line names, and nothing else.
|
|
21
21
|
1. **Re-read `requirements.md`.** Treat goal + AC as frozen. If something is unclear at this stage, that's a pre-flight bug — escalate, do not improvise.
|
|
22
22
|
1.5. **Prove a bug fix first.** When `requirements.md` says `Change type: bug fix`, write a unit test for its regression criterion before touching the fix and run it: it must fail, for the bug's reason. Apply the fix, then run it again: it must pass. This stage's marker records the criterion, the test's file path, and `failed before, passed after`. A bug no unit test can reach is waived in `state.md` with the reason. The re-entries below owe no new regression test: they carry review comments and defects the change itself introduced.
|
|
23
23
|
2. **Apply the change** in the repo's worktree. Edit existing files first; create new files only when the requirements demand it. Match the surrounding code's style, naming, and file layout.
|
|
@@ -33,6 +33,13 @@ The facts [`next-step.md`](next-step.md) reports a finished PR from. Teardown de
|
|
|
33
33
|
5. **Teardown (`merged` only).** When the PR is `merged`, run [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) with `{worktreePath}` and `{branch}`. That file owns the teardown sequence **and its safety rules** — including skipping worktree-remove and local branch deletion when no worktree was used. This stage adds no teardown logic of its own. On `closed`, skip teardown — the branch and any worktree stay intact.
|
|
34
34
|
6. **Record the PR in the [chat ledger](#chat-ledger).** Complete the terminal record with `teardown` and `finishedAt`, then write it to the ledger. The ledger is outside the slot, so this holds whether or not teardown cleared it.
|
|
35
35
|
7. **Log while the slot exists.** When teardown's report marks `Session slot cleared` ✅, write nothing: the slot and its `followup.log` are gone, an append there fails or recreates the directory as a stray slot, and the retirement and teardown reports printed this turn are the record. Otherwise append a cleanup line to the session's `followup.log`, recording the case ids retired and whether teardown ran.
|
|
36
|
-
8. Suggest the next step per [`next-step.md`](next-step.md), passing whether teardown ran and the terminal record. This is the stage's last action.
|
|
36
|
+
8. Suggest the next step per [`next-step.md`](next-step.md), passing whether teardown ran and the terminal record. This is the stage's last action — except on a merged [design slot](#design-slot), whose resume replaces it.
|
|
37
37
|
|
|
38
38
|
**Teardown never returns a question, and neither does retirement.** Each finishes with its report — every item done, skipped, or blocked-with-a-reason — so steps 6, 7 and 8 always run. A teardown that appears to be waiting on the user has stalled mid-sequence; the stage is not complete until the report and the next-step suggestion are both printed.
|
|
39
|
+
|
|
40
|
+
## Design slot
|
|
41
|
+
|
|
42
|
+
A slot whose `state.md` carries `Design PR for: <build-slug>` holds a design PR ([`design.md`](design.md#design-pr)), and its terminal state is the design decision. After step 7, replace the `Design: pending` line in `~/.muggle-ai/muggle-do/sessions/<build-slug>/state.md`:
|
|
43
|
+
|
|
44
|
+
- `merged` → `Design: finalized — design PR <url> merged <ISO-8601 timestamp>`. The merge is the approval: dispatch `/muggle-do resume slug=<build-slug>` through the Skill tool as the stage's last action, in place of step 8.
|
|
45
|
+
- `closed` → `Design: rejected — design PR <url> closed unmerged <ISO-8601 timestamp>`, then step 8.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Design Agent (Stage 2.5)
|
|
2
2
|
|
|
3
|
-
Finalize the change's design before any code. Stage 3 never edits a file until `state.md` carries a `Design: finalized` line, and
|
|
3
|
+
Finalize the change's design before any code. Stage 3 never edits a file until `state.md` carries a `Design: finalized` line. This stage writes it for the paths that need no approval; for the rest the approval is the merge of a design PR, and [`cleanup.md`](cleanup.md) writes it when that PR merges.
|
|
4
4
|
|
|
5
5
|
## Turn preamble
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
**Stage 2.5 — Design** — writing the spec and holding the build until
|
|
8
|
+
**Stage 2.5 — Design** — writing the spec and holding the build until its design PR merges.
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Inputs
|
|
@@ -15,21 +15,38 @@ Finalize the change's design before any code. Stage 3 never edits a file until `
|
|
|
15
15
|
|
|
16
16
|
## Which path
|
|
17
17
|
|
|
18
|
-
0. **Already
|
|
18
|
+
0. **Already decided.** `state.md` already carries a `Design:` line — a resumed session, or a re-entry from address-reviews, fix-ci or E2E repair.
|
|
19
|
+
- `Design: finalized` → the stage is closed: reopen nothing, write no `design.md`, ask nothing, and go on to Stage 3. The line is the record of the decision; a missing `design.md` or an approval not shown in this conversation does not make it doubtful.
|
|
20
|
+
- `Design: pending` → the design PR it names is still open. Open no second PR, ask nothing, and end the turn per [Waiting for the merge](#waiting-for-the-merge).
|
|
21
|
+
- `Design: rejected` → the design PR closed unmerged. Build nothing; report the closed PR and end the cycle.
|
|
19
22
|
1. **Spec supplied.** The task itself is a design or spec the user wrote — a linked or pasted doc that already decides the approach. It is final as given: record `Design: finalized — user-supplied spec <path or link>`, write no `design.md`, and ask nothing.
|
|
20
23
|
2. **Trivial change.** One file, or a few lines across files, with no design surface: no new module, interface, data shape, or behavior a reasonable reader could build two ways. `requirements.md` is the whole spec: record `Design: finalized — trivial, requirements.md is the spec (<one-line reason>)` and ask nothing. When unsure, it is not trivial.
|
|
21
|
-
3. **
|
|
24
|
+
3. **Approved in pre-flight.** A pre-flight answer that already approved a stated approach: record `Design: finalized — approved in pre-flight (<the answer>)` and ask nothing.
|
|
25
|
+
4. **Everything else** goes through the design PR below.
|
|
22
26
|
|
|
23
|
-
##
|
|
27
|
+
## Design PR
|
|
28
|
+
|
|
29
|
+
The design is approved by merging a PR that carries it, never by a prompt. This stage calls no `AskUserQuestion`.
|
|
24
30
|
|
|
25
31
|
1. **Write the spec** to `~/.muggle-ai/muggle-do/sessions/<slug>/design.md`, using superpowers' design step to reach it. Sections: approach, what changes where (components and files), decisions with the alternative each one rejected, what is out of scope. Every decision is made and stated — no open options handed back.
|
|
26
|
-
2. **
|
|
27
|
-
3. **
|
|
28
|
-
4. **
|
|
29
|
-
5. **
|
|
32
|
+
2. **Place it.** The doc's home is the location the project's agent instructions (`CLAUDE.md`, `AGENTS.md`) name for design docs — which may be another repo — else `docs/designs/<slug>.md` in the change's repo. Create a worktree of the home repo from `origin/<default branch>` per [`../_shared/use-worktrees.md`](../_shared/use-worktrees.md), on branch `<Branch from state.md>-design`, copy the spec to the home path, and commit it as `docs(design): <goal>`.
|
|
33
|
+
3. **Open the PR.** Push per [`../_shared/vcs/common/push-to-branch.md`](../_shared/vcs/common/push-to-branch.md), then create it with the provider recipe of [`open-prs/forward.md`](open-prs/forward.md) Stage 5.5 Step 5 — ready for review, never a draft. Title `[DESIGN] <goal>`. Body, signed per [`../_shared/vcs/post-signature.md`](../_shared/vcs/post-signature.md): `## Goal`, `## Decisions` (one line per decision), and the line `Merging this PR approves the design and starts the build. Closing it unmerged rejects the design.`
|
|
34
|
+
4. **Settle its walkthrough.** A design doc has no app surface. From the design worktree: `echo "MUGGLE_E2E_SKIP: NOT_APPLICABLE: design document only — merging it approves the design"`.
|
|
35
|
+
5. **Seed the design slot** `~/.muggle-ai/muggle-do/sessions/<slug>-design/`: `state.md` with the build slot's `## Pre-flight answers` block, `Validation` replaced by `skip — design document only`, `Branch` by the design branch, plus `Design PR for: <slug>` and `Design doc: <home path>`; then `prs.json` and `last_seen.json` as [`open-prs/forward.md`](open-prs/forward.md) Stage 5.5 Step 6 seeds them, **without** `forward_stages_in_flight` — no run is in flight, so nothing holds. Arm its watch per [`../muggle-pr-followup/arm-watcher.md`](../muggle-pr-followup/arm-watcher.md).
|
|
36
|
+
6. **Record** `Design: pending — design PR <url>` in the build slot's `state.md`, and notify the user with a push notification where the host has one: `Design PR open for <slug> — merge it to start the build`.
|
|
37
|
+
|
|
38
|
+
## While the PR is open
|
|
39
|
+
|
|
40
|
+
- **Review comments** reach the design slot's watcher like any PR's and dispatch address-reviews on it. [`build.md`](build.md) edits only the design doc there, and the docs-only diff sizes as a minor cycle ([`cycle-size.md`](cycle-size.md)).
|
|
41
|
+
- **Merged** → the watcher dispatches post-merge cleanup for `<slug>-design`. [`cleanup.md`](cleanup.md) records `Design: finalized — design PR <url> merged <ISO-8601 timestamp>` in the build slot and resumes the build at Stage 3.
|
|
42
|
+
- **Closed unmerged** → cleanup records `Design: rejected — design PR <url> closed unmerged <ISO-8601 timestamp>`; no build runs.
|
|
43
|
+
|
|
44
|
+
Merging is a decision only the user may make: `frontloadQuestions=always` never defaults it, and a run told to go unattended still stops here.
|
|
45
|
+
|
|
46
|
+
## Waiting for the merge
|
|
30
47
|
|
|
31
|
-
|
|
48
|
+
After step 6 the forward cycle ends its turn with `echo "MUGGLE_STAGE_SKIP: design PR awaiting merge"`. Stages 3–8 run on the resume the merge dispatches, from a branch cut after the design landed.
|
|
32
49
|
|
|
33
50
|
## Output
|
|
34
51
|
|
|
35
|
-
`state.md` carries
|
|
52
|
+
The build slot's `state.md` carries a `Design: finalized` or `Design: pending` line, then this stage's marker in `iterations/<NNN>.md`: `Stage 2.5 done — <path taken> — <design PR url, spec link, pre-flight answer, or trivial reason>`.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
# Input routing
|
|
2
|
-
|
|
3
|
-
How `/muggle-do` resolves `$ARGUMENTS` to a mode. Modes 1–4 are programmatic — dispatched by the watcher — so never ask on those. A change-URL in modes 1–3 is either a GitHub PR (`github.com/.../pull/<n>`) or a GitLab MR (`<host>/.../-/merge_requests/<iid>`); provider is resolved via [`../_shared/vcs/detect-vcs.md`](../_shared/vcs/detect-vcs.md). Inspect in order:
|
|
4
|
-
|
|
5
|
-
1. **Address-reviews** — a PR/MR URL **and** an address-reviews directive carrying review/discussion ids, conversation comment ids after the keyword `conversation`, or both → [`address-reviews.md`](address-reviews.md). On GitHub these ids are integers ≥ 100000000; that magnitude is GitHub-specific lore, **not** a portable test. Under GitLab, tell this apart from other directives by the directive keyword plus the presence of discussion ids, never by id size.
|
|
6
|
-
2. **Fix-CI** — a PR/MR URL **and** a `fix ci` / `fix-ci` directive with failing check names (no review/discussion ids) → [`fix-ci.md`](fix-ci.md).
|
|
7
|
-
3. **Rebase** — a PR/MR URL **and** a `rebase` directive (or legacy `resolve conflicts` / `resolve-conflicts`; no review/discussion ids, no check names) → [`resolve-conflicts.md`](resolve-conflicts.md). Rebases the branch onto its base whether it's merely behind or actually conflicting.
|
|
8
|
-
4. **Post-merge cleanup** — a `cleanup` token and `slug=<slug>` (no PR URL, no review ids), optionally `state=<merged|closed>` (default `merged`) → [`cleanup.md`](cleanup.md).
|
|
9
|
-
5. **
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
# Input routing
|
|
2
|
+
|
|
3
|
+
How `/muggle-do` resolves `$ARGUMENTS` to a mode. Modes 1–4.5 are programmatic — dispatched by the watcher, or by cleanup on a merged design PR — so never ask on those. A change-URL in modes 1–3 is either a GitHub PR (`github.com/.../pull/<n>`) or a GitLab MR (`<host>/.../-/merge_requests/<iid>`); provider is resolved via [`../_shared/vcs/detect-vcs.md`](../_shared/vcs/detect-vcs.md). Inspect in order:
|
|
4
|
+
|
|
5
|
+
1. **Address-reviews** — a PR/MR URL **and** an address-reviews directive carrying review/discussion ids, conversation comment ids after the keyword `conversation`, or both → [`address-reviews.md`](address-reviews.md). On GitHub these ids are integers ≥ 100000000; that magnitude is GitHub-specific lore, **not** a portable test. Under GitLab, tell this apart from other directives by the directive keyword plus the presence of discussion ids, never by id size.
|
|
6
|
+
2. **Fix-CI** — a PR/MR URL **and** a `fix ci` / `fix-ci` directive with failing check names (no review/discussion ids) → [`fix-ci.md`](fix-ci.md).
|
|
7
|
+
3. **Rebase** — a PR/MR URL **and** a `rebase` directive (or legacy `resolve conflicts` / `resolve-conflicts`; no review/discussion ids, no check names) → [`resolve-conflicts.md`](resolve-conflicts.md). Rebases the branch onto its base whether it's merely behind or actually conflicting.
|
|
8
|
+
4. **Post-merge cleanup** — a `cleanup` token and `slug=<slug>` (no PR URL, no review ids), optionally `state=<merged|closed>` (default `merged`) → [`cleanup.md`](cleanup.md).
|
|
9
|
+
4.5. **Resume** — a `resume` token and `slug=<slug>` (no PR URL), dispatched by [`cleanup.md`](cleanup.md) when a design PR merges → the forward pipeline on that slug's existing slot, at its first stage with no `done` marker in `iterations/<NNN>.md`. Stages 1 and 2 already ran; Stage 2.5 closes on its `Design: finalized` line. Before Stage 3 edits, sync the build worktree onto the latest base per [`../_shared/sync-branch-with-base.md`](../_shared/sync-branch-with-base.md), so the build carries the merged design.
|
|
10
|
+
5. **Empty / `help` / `menu` / `?`** → menu + session selector, answered from this file alone: open no stage file. The menu offers describing a task to start the forward pipeline, plus `/muggle-status`, `/muggle-repair`, `/muggle-upgrade`, and `/muggle-register`. The session selector lists each directory under `~/.muggle-ai/muggle-do/sessions/` with the PRs and states in its `prs.json`; picking one resumes that session.
|
|
11
|
+
6. **Task automation** (perform an action on a website) → `muggle:muggle-browser-task`.
|
|
12
|
+
7. **Otherwise** → forward pipeline at Stage 1.
|
|
13
|
+
|
|
14
|
+
When in doubt between #6 and #7, ask one question.
|