@muggleai/works 5.26.0-staging.197 → 5.26.0-staging.198

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.
@@ -9,7 +9,7 @@
9
9
  "name": "muggleai",
10
10
  "source": "./plugin",
11
11
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
12
- "version": "5.26.0-staging.197"
12
+ "version": "5.26.0-staging.198"
13
13
  }
14
14
  ]
15
15
  }
package/README.md CHANGED
@@ -175,7 +175,7 @@ The `autoInstallCiWorkflow` preference, chosen during `muggle init`, decides whe
175
175
  muggle ci-install
176
176
  ```
177
177
 
178
- That writes `.github/workflows/muggle-walkthrough.yml`. To add it by hand instead:
178
+ That writes `.github/workflows/muggle-walkthrough.yml`. Run again later, it replaces a copy an earlier release wrote with the current one, and leaves a copy you edited alone unless you pass `--force`; `muggle init` and `/muggle-do` do the same refresh on their own unless `autoInstallCiWorkflow` is `never`. To add it by hand instead:
179
179
 
180
180
  <!-- muggle:ci-workflow-snippet -->
181
181
  ```yaml
@@ -212,7 +212,7 @@ Four things worth knowing:
212
212
 
213
213
  - The verdict is published as a check run against the pull request's head commit, not as this job's own status. An `issue_comment` run executes against the default branch, and only a head-commit check reaches the pull request from there — which is what lets settling the comment turn the check green without a new push.
214
214
  - GitHub reads the `issue_comment` trigger from the **default branch's** copy of the workflow, so comment-driven re-runs start working only once it is merged.
215
- - Runs for one pull request queue rather than cancel. Settling the comment starts a run while the one checking the push may still be going, and cancelling that run would leave a cancelled job on the pull request — red beside a green check. An installed copy that still says `cancel-in-progress: true` shows exactly that; `muggle ci-install --force` rewrites it.
215
+ - Runs for one pull request queue rather than cancel. Settling the comment starts a run while the one checking the push may still be going, and cancelling that run would leave a cancelled job on the pull request — red beside a green check. An installed copy that still says `cancel-in-progress: true` shows exactly that; `muggle ci-install` updates it.
216
216
  - On a pull request from a fork, `GITHUB_TOKEN` is read-only and the check run cannot be published. The command fails open and reports nothing rather than blocking the pull request.
217
217
 
218
218
  ---
@@ -362,7 +362,7 @@ muggle logout
362
362
  muggle status
363
363
 
364
364
  # Pull requests
365
- muggle ci-install [--force] # Add the walkthrough check to GitHub Actions
365
+ muggle ci-install [--force] # Add or update the walkthrough check in GitHub Actions
366
366
  muggle pr-walkthrough-check # Verify a PR's walkthrough comment is settled
367
367
  muggle build-pr-section # Render a PR evidence block from a report on stdin
368
368
 
@@ -11,6 +11,7 @@ import { dirname, resolve, join } from 'path';
11
11
  import { fileURLToPath, pathToFileURL } from 'url';
12
12
  import { Command } from 'commander';
13
13
  import axios from 'axios';
14
+ import { createHash } from 'crypto';
14
15
  import { platform, homedir, arch } from 'os';
15
16
  import { createInterface } from 'readline/promises';
16
17
  import { execFile, execFileSync } from 'child_process';
@@ -1220,6 +1221,21 @@ async function checkoutFreshnessCommand(flags) {
1220
1221
  // src/ci-workflow/constants.ts
1221
1222
  var USER_WORKFLOW_PATH = ".github/workflows/muggle-walkthrough.yml";
1222
1223
  var USER_WORKFLOW_COMMAND = "npx -y -p @muggleai/works muggle pr-walkthrough-check --check-run";
1224
+ var USER_WORKFLOW_SHA256 = "761a0ef73d988d6538232f7ab2482377012e869d69eef4e836ae6001b61de970";
1225
+ var PRIOR_USER_WORKFLOW_SHA256S = /* @__PURE__ */ new Set([
1226
+ "d7fb2892a4a7684a3f08de060a86bce60a02d10a7a63587b1a6836163828e881",
1227
+ "908e0c71af8a2e8ac3d9c3afe3ecb8c8b7537c7e7e5d886a0dacdfa806351d9c"
1228
+ ]);
1229
+ function hashUserWorkflow(workflowContent) {
1230
+ return createHash("sha256").update(workflowContent.replace(/\r\n/g, "\n")).digest("hex");
1231
+ }
1232
+ function classifyInstalledWorkflow(workflowContent) {
1233
+ if (workflowContent === null) return "missing" /* Missing */;
1234
+ const workflowHash = hashUserWorkflow(workflowContent);
1235
+ if (workflowHash === USER_WORKFLOW_SHA256) return "current" /* Current */;
1236
+ if (PRIOR_USER_WORKFLOW_SHA256S.has(workflowHash)) return "outdated" /* Outdated */;
1237
+ return "customized" /* Customized */;
1238
+ }
1223
1239
 
1224
1240
  // src/ci-workflow/template.ts
1225
1241
  function renderUserWorkflow() {
@@ -1273,28 +1289,51 @@ jobs:
1273
1289
  `;
1274
1290
  }
1275
1291
 
1292
+ // src/cli/ci-install-constants.ts
1293
+ var WORKFLOW_WRITING_OUTCOMES = /* @__PURE__ */ new Set([
1294
+ "installed" /* Installed */,
1295
+ "updated" /* Updated */,
1296
+ "replaced" /* Replaced */
1297
+ ]);
1298
+ var CI_INSTALL_MESSAGES = {
1299
+ ["installed" /* Installed */]: (path6) => `Wrote ${path6}
1300
+ Commit it, and every pull request here will owe a settled Muggle AI walkthrough comment.`,
1301
+ ["updated" /* Updated */]: (path6) => `Updated ${path6} from an earlier Muggle release to the current workflow. Commit it.`,
1302
+ ["already-current" /* AlreadyCurrent */]: (path6) => `${path6} is already the current workflow \u2014 nothing to do.`,
1303
+ ["kept-customized" /* KeptCustomized */]: (path6) => `${path6} has been edited since Muggle wrote it \u2014 left untouched. Re-run with --force to replace it.`,
1304
+ ["replaced" /* Replaced */]: (path6) => `Replaced ${path6} with the current workflow. Commit it.`,
1305
+ ["not-a-repository" /* NotARepository */]: () => "Not a git repository \u2014 run this from the repo that should carry the check."
1306
+ };
1307
+
1276
1308
  // src/cli/ci-install.ts
1309
+ function resolveInstallOutcome(installedState, force) {
1310
+ switch (installedState) {
1311
+ case "missing" /* Missing */:
1312
+ return "installed" /* Installed */;
1313
+ case "outdated" /* Outdated */:
1314
+ return "updated" /* Updated */;
1315
+ case "current" /* Current */:
1316
+ return "already-current" /* AlreadyCurrent */;
1317
+ case "customized" /* Customized */:
1318
+ return force ? "replaced" /* Replaced */ : "kept-customized" /* KeptCustomized */;
1319
+ }
1320
+ }
1277
1321
  function installCiWorkflow(options) {
1278
1322
  const workflowPath = join(options.cwd, USER_WORKFLOW_PATH);
1279
1323
  if (!existsSync(join(options.cwd, ".git"))) {
1280
1324
  return { outcome: "not-a-repository" /* NotARepository */, workflowPath };
1281
1325
  }
1282
- if (existsSync(workflowPath) && !options.force) {
1283
- return { outcome: "already-present" /* AlreadyPresent */, workflowPath };
1326
+ const installedContent = existsSync(workflowPath) ? readFileSync(workflowPath, "utf-8") : null;
1327
+ const outcome = resolveInstallOutcome(classifyInstalledWorkflow(installedContent), options.force);
1328
+ if (WORKFLOW_WRITING_OUTCOMES.has(outcome)) {
1329
+ mkdirSync(dirname(workflowPath), { recursive: true });
1330
+ writeFileSync(workflowPath, renderUserWorkflow());
1284
1331
  }
1285
- mkdirSync(dirname(workflowPath), { recursive: true });
1286
- writeFileSync(workflowPath, renderUserWorkflow());
1287
- return { outcome: "installed" /* Installed */, workflowPath };
1332
+ return { outcome, workflowPath };
1288
1333
  }
1289
- var MESSAGES = {
1290
- ["installed" /* Installed */]: (path6) => `Wrote ${path6}
1291
- Commit it, and every pull request here will owe a settled Muggle AI walkthrough comment.`,
1292
- ["already-present" /* AlreadyPresent */]: (path6) => `${path6} already exists \u2014 left untouched. Re-run with --force to replace it.`,
1293
- ["not-a-repository" /* NotARepository */]: () => "Not a git repository \u2014 run this from the repo that should carry the check."
1294
- };
1295
1334
  function ciInstallCommand(flags) {
1296
1335
  const report = installCiWorkflow({ cwd: process.cwd(), force: flags.force === true });
1297
- const render = MESSAGES[report.outcome];
1336
+ const render = CI_INSTALL_MESSAGES[report.outcome];
1298
1337
  process.stdout.write(`${render(report.workflowPath)}
1299
1338
  `);
1300
1339
  if (report.outcome === "not-a-repository" /* NotARepository */) process.exitCode = 1;
@@ -2195,10 +2234,14 @@ function helpCommand() {
2195
2234
  console.log(getHelpGuidance());
2196
2235
  }
2197
2236
  var QUESTION = "Make E2E acceptance a CI check in this repo? It adds a GitHub Actions workflow that fails a pull request\nwhose Muggle walkthrough is missing or reports a failed test. [y/N]: ";
2237
+ function keepInstalledWorkflowCurrent(cwd) {
2238
+ const report = installCiWorkflow({ cwd, force: false });
2239
+ return report.outcome === "updated" /* Updated */ ? "updated" /* Updated */ : "already-installed" /* AlreadyInstalled */;
2240
+ }
2198
2241
  async function applyCiWorkflowPreference(preference, cwd, ask) {
2199
2242
  if (!existsSync(join(cwd, ".git"))) return "not-applicable" /* NotApplicable */;
2200
- if (existsSync(join(cwd, USER_WORKFLOW_PATH))) return "already-installed" /* AlreadyInstalled */;
2201
2243
  if (preference === "never" /* Never */) return "turned-off" /* TurnedOff */;
2244
+ if (existsSync(join(cwd, USER_WORKFLOW_PATH))) return keepInstalledWorkflowCurrent(cwd);
2202
2245
  if (preference !== "always" /* Always */) {
2203
2246
  if (!ask) return "deferred" /* Deferred */;
2204
2247
  const answer = (await ask(QUESTION)).trim().toLowerCase();
@@ -2354,6 +2397,7 @@ var CI_OFFER_REPORT = {
2354
2397
  ["deferred" /* Deferred */]: "This repo has no Muggle E2E check in CI yet \u2014 run `muggle ci-install` to add it.",
2355
2398
  ["turned-off" /* TurnedOff */]: null,
2356
2399
  ["already-installed" /* AlreadyInstalled */]: null,
2400
+ ["updated" /* Updated */]: `Updated ${USER_WORKFLOW_PATH} from an earlier Muggle release \u2014 commit it.`,
2357
2401
  ["not-applicable" /* NotApplicable */]: null
2358
2402
  };
2359
2403
  async function runCiOffer(ask) {
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-Y6JJ2SN7.js';
2
+ import { runCli } from './chunk-U5ZA3VTZ.js';
3
3
  import './chunk-SLU7LHVJ.js';
4
4
 
5
5
  // src/cli/main.ts
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-Y6JJ2SN7.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-U5ZA3VTZ.js';
2
2
  export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-SLU7LHVJ.js';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.26.0-staging.197",
4
+ "version": "5.26.0-staging.198",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.197",
7
+ "@muggleai/works@5.26.0-staging.198",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.26.0-staging.197",
3
+ "version": "5.26.0-staging.198",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.26.0-staging.197",
5
+ "version": "5.26.0-staging.198",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.197",
7
+ "@muggleai/works@5.26.0-staging.198",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -24,7 +24,9 @@ Forward pipeline's Stage 7. Invoked by `/muggle-do` after stages 1–6 of a fres
24
24
 
25
25
  1. **Sync with the base:** run [`../../_shared/sync-branch-with-base.md`](../../_shared/sync-branch-with-base.md) with `base` set to the PR target recorded in `state.md` — gated by [`autoRebase`](../../muggle-preferences/preference-gates/autoRebase.md), fires only when `behind > 0`. The branch is not on the remote yet, so the rebase lands without a force-push. Sync here rather than trusting stage 6: a `unit-only` or `skip` run never reaches the E2E stage's sync at all, and on a run that does, the base moves freely while stages 3–6 build and test. If the sync escalates — conflicts under `autoResolveConflicts=never`, or a resolution that fails the verify-or-rollback gate — stop and report; never open a PR on a tree that did not verify.
26
26
 
27
- 1.5. **CI check:** gate [`autoInstallCiWorkflow`](../../muggle-preferences/preference-gates/autoInstallCiWorkflow.md) — fires only on a GitHub repo whose tree lacks `.github/workflows/muggle-walkthrough.yml`. On `always`, or `CI check: add` recorded by pre-flight, run `muggle ci-install` in the working tree and commit the workflow as `ci: add the Muggle E2E walkthrough check`, so it ships in this PR. On `never` or `CI check: skip`, leave CI alone.
27
+ 1.5. **CI check:** GitHub repos only, gated by [`autoInstallCiWorkflow`](../../muggle-preferences/preference-gates/autoInstallCiWorkflow.md).
28
+ - **Tree lacks `.github/workflows/muggle-walkthrough.yml`** — on `always`, or `CI check: add` recorded by pre-flight, run `muggle ci-install` in the working tree and commit the workflow as `ci: add the Muggle E2E walkthrough check`, so it ships in this PR. On `never` or `CI check: skip`, leave CI alone.
29
+ - **Tree has it** — unless the gate resolves to `never`, run `muggle ci-install` without `--force`. It replaces only an unedited copy an earlier release wrote and leaves a current or edited one alone, so nothing needs asking. When it reports `Updated`, commit the file as `ci: update the Muggle E2E walkthrough check`.
28
30
 
29
31
  2. **Push:** Execute per [`../../_shared/vcs/common/push-to-branch.md`](../../_shared/vcs/common/push-to-branch.md) — the tool-agnostic instruction for pushing commits (handles the signing gate and directs to provider-specific recipes).
30
32
 
@@ -70,7 +70,7 @@ When invoked with the directive (PR URL + slug + review ids), routes to [`../do/
70
70
  | `autoE2ETest` | Stage 6 — run E2E every cycle (default `always`), or fold into pre-flight |
71
71
  | `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) |
72
72
  | `autoRouteBuildToMuggleDo` | Front-door guardrail — route build/implement/fix requests through this pipeline (build delegated to superpowers); fired by the UserPromptSubmit guardrail, default `ask` |
73
- | `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` |
73
+ | `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` |
74
74
 
75
75
  `autoUseWorktree`, `autoRebase`, `autoResolveConflicts`, `autoCreatePR`, `autoCleanup`, `postPRVisualWalkthrough` fire from per-stage files.
76
76
 
@@ -1,6 +1,6 @@
1
1
  # `autoInstallCiWorkflow`
2
2
 
3
- Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the workflow already exists or the repository is not on GitHub. Substitute `{repo}`.
3
+ Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the repository is not on GitHub. Where the workflow already exists only `never` counts: any other value lets `muggle ci-install` replace an unedited copy an earlier release wrote, without asking, and an edited copy is never touched. Substitute `{repo}`.
4
4
 
5
5
  **Picker 1** — header `CI check`, question `"Add the Muggle E2E check to {repo}'s CI? Pull requests then fail while their walkthrough is missing or reports a failed test."`
6
6
  - `Add it` — `Run muggle ci-install and ship the workflow with this change.` → `always`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "release": "5.18.0",
3
- "buildId": "run-197-1",
4
- "commitSha": "fca74cbd783c2dff3ad1a2bac30bd2f8d2ea9461",
5
- "buildTime": "2026-10-25T03:31:32Z",
3
+ "buildId": "run-198-1",
4
+ "commitSha": "887a8e6d00ec12e27ae8414332766a3239930222",
5
+ "buildTime": "2026-10-25T04:03:06Z",
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/muggle",
4
- "version": "5.26.0-staging.197",
4
+ "version": "5.26.0-staging.198",
5
5
  "description": "13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.26.0-staging.197",
4
+ "version": "5.26.0-staging.198",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.197",
7
+ "@muggleai/works@5.26.0-staging.198",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.26.0-staging.197",
3
+ "version": "5.26.0-staging.198",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.26.0-staging.197",
5
+ "version": "5.26.0-staging.198",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
package/plugin/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.26.0-staging.197",
7
+ "@muggleai/works@5.26.0-staging.198",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -24,7 +24,9 @@ Forward pipeline's Stage 7. Invoked by `/muggle-do` after stages 1–6 of a fres
24
24
 
25
25
  1. **Sync with the base:** run [`../../_shared/sync-branch-with-base.md`](../../_shared/sync-branch-with-base.md) with `base` set to the PR target recorded in `state.md` — gated by [`autoRebase`](../../muggle-preferences/preference-gates/autoRebase.md), fires only when `behind > 0`. The branch is not on the remote yet, so the rebase lands without a force-push. Sync here rather than trusting stage 6: a `unit-only` or `skip` run never reaches the E2E stage's sync at all, and on a run that does, the base moves freely while stages 3–6 build and test. If the sync escalates — conflicts under `autoResolveConflicts=never`, or a resolution that fails the verify-or-rollback gate — stop and report; never open a PR on a tree that did not verify.
26
26
 
27
- 1.5. **CI check:** gate [`autoInstallCiWorkflow`](../../muggle-preferences/preference-gates/autoInstallCiWorkflow.md) — fires only on a GitHub repo whose tree lacks `.github/workflows/muggle-walkthrough.yml`. On `always`, or `CI check: add` recorded by pre-flight, run `muggle ci-install` in the working tree and commit the workflow as `ci: add the Muggle E2E walkthrough check`, so it ships in this PR. On `never` or `CI check: skip`, leave CI alone.
27
+ 1.5. **CI check:** GitHub repos only, gated by [`autoInstallCiWorkflow`](../../muggle-preferences/preference-gates/autoInstallCiWorkflow.md).
28
+ - **Tree lacks `.github/workflows/muggle-walkthrough.yml`** — on `always`, or `CI check: add` recorded by pre-flight, run `muggle ci-install` in the working tree and commit the workflow as `ci: add the Muggle E2E walkthrough check`, so it ships in this PR. On `never` or `CI check: skip`, leave CI alone.
29
+ - **Tree has it** — unless the gate resolves to `never`, run `muggle ci-install` without `--force`. It replaces only an unedited copy an earlier release wrote and leaves a current or edited one alone, so nothing needs asking. When it reports `Updated`, commit the file as `ci: update the Muggle E2E walkthrough check`.
28
30
 
29
31
  2. **Push:** Execute per [`../../_shared/vcs/common/push-to-branch.md`](../../_shared/vcs/common/push-to-branch.md) — the tool-agnostic instruction for pushing commits (handles the signing gate and directs to provider-specific recipes).
30
32
 
@@ -70,7 +70,7 @@ When invoked with the directive (PR URL + slug + review ids), routes to [`../do/
70
70
  | `autoE2ETest` | Stage 6 — run E2E every cycle (default `always`), or fold into pre-flight |
71
71
  | `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) |
72
72
  | `autoRouteBuildToMuggleDo` | Front-door guardrail — route build/implement/fix requests through this pipeline (build delegated to superpowers); fired by the UserPromptSubmit guardrail, default `ask` |
73
- | `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` |
73
+ | `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` |
74
74
 
75
75
  `autoUseWorktree`, `autoRebase`, `autoResolveConflicts`, `autoCreatePR`, `autoCleanup`, `postPRVisualWalkthrough` fire from per-stage files.
76
76
 
@@ -1,6 +1,6 @@
1
1
  # `autoInstallCiWorkflow`
2
2
 
3
- Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the workflow already exists or the repository is not on GitHub. Substitute `{repo}`.
3
+ Controls whether Muggle adds `.github/workflows/muggle-walkthrough.yml` — the CI check that fails a pull request whose E2E walkthrough is missing or reports a failed or inconclusive test case — to a GitHub repository that lacks it. Fires when `muggle init` runs inside such a repository, and when `/muggle-do` is about to open a PR from one. Never fires where the repository is not on GitHub. Where the workflow already exists only `never` counts: any other value lets `muggle ci-install` replace an unedited copy an earlier release wrote, without asking, and an edited copy is never touched. Substitute `{repo}`.
4
4
 
5
5
  **Picker 1** — header `CI check`, question `"Add the Muggle E2E check to {repo}'s CI? Pull requests then fail while their walkthrough is missing or reports a failed test."`
6
6
  - `Add it` — `Run muggle ci-install and ship the workflow with this change.` → `always`