@mutmutco/pi-plugin 3.139.0 → 3.139.2

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.
@@ -11,6 +11,7 @@
11
11
  { "target": ".github/workflows/agent-pr.yml", "source": "self", "ownership": "org", "classes": ["deployable"], "waivers": { "jerv-jervcode": "pins this workflow's EXACT step shapes in its own scripts/workflow-boundary-core.mjs — a literal repositories: Jerv-JervCode token scope, and whole-step equality for the surface and verdict legs. #4040 widened the org seed to the same hardened boundary (pull_request_target off the trusted base, an immutable BASE..HEAD compare with a file-count equality wall, a per-repo App token scope, and a certified-head merge), so the two now agree on substance. They cannot agree on bytes: a seed serving 16 repos resolves its token scope and its required contexts at run time, which exact-step equality rejects by construction. The waiver is permanent by design, not a deferral — lifting it would mean weakening the strictest repo to match a fleet file." } },
12
12
  { "target": ".github/rulesets/mmi-product-required-checks.json", "source": "seed:mmi-product-required-checks.template.json", "ownership": "org", "classes": ["deployable"] },
13
13
  { "target": ".gitignore", "source": "managed-block", "ownership": "org", "classes": ["deployable", "content"] },
14
+ { "target": ".gitattributes", "source": "seed:gitattributes.template", "ownership": "repo", "classes": ["deployable", "content"] },
14
15
  { "target": "README.md", "source": "seed:README.template.md", "ownership": "repo", "classes": ["deployable", "content"], "managedBlock": { "source": "seed:readme-mmi-developer-environment.block.md", "begin": "<!-- mmi-developer-environment:start -->", "end": "<!-- mmi-developer-environment:end -->" } },
15
16
  { "target": "architecture.md", "source": "seed:architecture.template.md", "ownership": "repo", "classes": ["deployable", "content"] },
16
17
  { "target": "docs/decisions/README.md", "source": "seed:decisions-readme.template.md", "ownership": "repo", "classes": ["deployable", "content"] },
@@ -282,7 +282,7 @@ something else* paths.)
282
282
  answers from the dev for each — draft where you can, ask where you can't (the template form is
283
283
  interactive and won't drive in a non-TTY agent shell, so collect the fields, then create directly).
284
284
  3. **Submit via `mmi-cli oracle issue create`** — the canonical create path. Before filing, read the live
285
- `issue create` entry from `mmi-cli commands --json`; flags change, and a missing documented flag means
285
+ command contract from `mmi-cli explain oracle issue create --json`; flags change, and a missing documented flag means
286
286
  the installed CLI is stale until a fresh local build proves otherwise. It maps `--type` to the label,
287
287
  `--priority` sets the board Priority **field** (never a `priority:*` label — #416), and `--surface`
288
288
  supplies the repository's required single surface label. It always prints `{number,url}` JSON. Never
@@ -326,9 +326,8 @@ Pick up to two, in priority order:
326
326
  1. **Split + fan out** — a single item plainly too large for one PR (body is multi-part, an umbrella or
327
327
  epic). Offer to slice it into child issues. (First because it *creates* the items the rest act on.)
328
328
  2. **Batch** — 2+ claimable items that are one coherent unit (shared title-prefix family, same subsystem)
329
- **and** touch overlapping/adjacent paths. Coupled → one worktree, **one PR**.
330
- 3. **Parallel** — 2+ items that are mutually independent and touch **disjoint paths**. Independent → N
331
- worktrees, **one PR each**, run concurrently.
329
+ **and** touch overlapping/adjacent paths. Coupled → **one PR**.
330
+ 3. **Parallel** — 2+ items that are mutually independent and touch **disjoint paths**. Independent → **one PR each**, run concurrently.
332
331
  4. **Background** — a single long-running item (broad refactor, large build/sweep). Kick it off in the
333
332
  background so the dev isn't blocked.
334
333
 
@@ -356,27 +355,20 @@ Offer lines — one line each, no UI, no "(Recommended)", phrased as available l
356
355
  - **Background** — `#22 looks long-running — I can take it in the background so you're not blocked.`
357
356
  - **Split** — `#60 looks large — I can slice it into child issues and fan them out, if you want.`
358
357
 
359
- Act-paths run only on the dev's explicit go. Every path branches from `development` and lands by PR.
360
- PR land cleans up at the branch boundary (`git worktree remove` + `git worktree prune`); batch/session
361
- work should keep all related sequential issues in the same branch/PR where possible instead of merging and
362
- destroying the worktree after each issue:
358
+ Act-paths run only on the dev's explicit go. MMI coordinates board and PR outcomes, while the host owns
359
+ workspace mechanics:
363
360
 
364
- - **PR metadata:** read the live `pr create` or `pr edit` entry from `mmi-cli commands --json` before the
361
+ - **PR metadata:** read `mmi-cli explain devops pr create --json` or `mmi-cli explain devops pr edit --json` before the
365
362
  write. For multiline Markdown, materialize a temporary UTF-8 body file, pass its real path with
366
363
  `--body-file <path>`, and remove it after the write succeeds. Do not pipe the body to `--body-file -`;
367
364
  host prose guards require the materialized-file path.
368
- - **Batch:** one worktree, claim each item (the Step 5 claim loop), make the coupled edits, open **one** PR
365
+ - **Batch:** claim each item (the Step 5 claim loop), make the coupled edits, and open **one** PR
369
366
  (`Closes #…, #…`). When an issue must stay open (HOLD/prep), never write `Does not close #N` — GitHub
370
367
  still closes it; use `Part of #N` / `Refs #N` / `leaves #N open` only (JC#495).
371
- - **Session/sequential:** multiple related same-repo items handled one after another in the same session
372
- reuse the active worktree until the session or execution group ends; do not churn one worktree per
373
- issue unless a branch/PR boundary, true parallelism, or explicit user ask requires it.
374
- - **Parallel:** one isolated worktree per item, cut from `development`, run concurrently, **one PR per
375
- item**. If two would touch the same file, serialize them or fold into a batch instead.
376
- - **Background:** run off the hot path (a background task or CI job); poll with `/loop`, test with `/stage`
377
- if useful; it still lands via its own worktree + PR. Bound it — never block silently.
378
- - **Stage/worktree:** a local `/stage` is tied to the worktree that started it. Stop/destroy and recreate
379
- it before moving to another worktree, or warn first when intent is unclear.
368
+ - **Parallel:** run independent work concurrently, **one PR per item**. If two would touch the same file,
369
+ serialize them or fold them into a batch instead.
370
+ - **Background:** run off the hot path (a background task or CI job); poll with `/loop` if useful. Bound it
371
+ never block silently.
380
372
  - **Split:** keep the original as the umbrella; file each child as a **native sub-issue** of it with
381
373
  `mmi-cli oracle issue create --parent <umbrella-ref> …` (or `mmi-cli oracle issue link-child <umbrella> <child>` for a
382
374
  child that already exists). The parent then renders a sub-issue checklist with each child's state and the
@@ -14,10 +14,10 @@ mmi-cli doctor
14
14
  ```
15
15
 
16
16
  A plain run may repair machine-global plugin wiring and guarded caches, but **never mutates the
17
- repository** (#5023). It reports managed `.gitignore`, docs-index, board mechanics, merged branches,
18
- dead worktrees, and aged scratch. Run `mmi-cli doctor --apply` only when the operator explicitly wants
19
- that guarded full repository cleanup. Secrets stay out of doctor; use `mmi-cli vault secrets diff` for
20
- a catalog gap check.
17
+ repository** (#5023). It reports managed `.gitignore`, docs-index, board mechanics, and aged scratch.
18
+ Local workspace lifecycle is host-owned; doctor does not relocate or delete worktrees. Run
19
+ `mmi-cli doctor --apply` only when the operator explicitly wants guarded repository maintenance. Secrets
20
+ stay out of doctor; use `mmi-cli vault secrets diff` for a catalog gap check.
21
21
 
22
22
  Doctor does **not** converge CLI or host versions (MMI-Hub#4954). `mmi-hub update` is the single
23
23
  writer of those versions; doctor only reports lag and last-run journal evidence. `mmi-hub status`
@@ -43,22 +43,18 @@ Do **not** chain these as a `/mmi-doctor` substitute:
43
43
  mmi-cli doctor --self
44
44
  mmi-cli oracle board doctor
45
45
  mmi-cli vault secrets diff
46
- mmi-cli worktree gc
47
46
  ```
48
47
 
49
- Plain `mmi-cli doctor` covers safe tooling repair and diagnosis. Explicit `doctor --apply` covers the
50
- full guarded repository cleanup; reach for individual verbs only when you want one surface alone.
48
+ Plain `mmi-cli doctor` covers safe tooling repair and diagnosis. Explicit `doctor --apply` covers
49
+ repository maintenance; the host owns workspace cleanup. Reach for individual verbs only when you want
50
+ one surface alone.
51
51
 
52
52
  ## Notes
53
53
 
54
54
  - `/mmi-doctor` is the hygiene pass; `/mmi-resume` is the lighter read-only session open.
55
55
  - Prefer one doctor run over hand-editing board items, gitignore blocks, or marketplace pins.
56
- - Doctor / `worktree list --stale` / `worktree gc` name the clone they audited. A green
57
- "no leaks" / "nothing to clean" is refused when another primary checkout of the same remotes
58
- exists, or when the jerv lease ledger points at another `mmi-worktrees` root (#4900 / #4897).
59
- Run hygiene from the canonical `E:\AI Projects\Mutatis Mutandis\` primary — not from
60
- `C:\Users\ssari\Projects\`. Treat a non-empty jerv worktree-lease ledger as a leak even if
61
- this clone's `git worktree list` is empty.
56
+ - The host owns workspace roots, cleanup, and any lease policy. Doctor diagnoses MMI tooling and does
57
+ not relocate or delete local worktrees.
62
58
 
63
59
  ## Retro — one check before you finish
64
60
  Before your final report, answer one question honestly: did **this skill's own instructions** misfire
@@ -128,7 +128,7 @@ The stage URL, what's running (server + tools), the workspace path (`tmp/stage/`
128
128
 
129
129
  - `/stage` is local — no AWS, no deploy, no board or version effect. The one cloud exception is
130
130
  `--live`: an on-demand **dev** stage of your branch, gated to your IP at the Cloudflare edge (above).
131
- - `/stage-live` is not an org command: remote rc/live environments move only through `/rcand`, `/release`, and `/hotfix`.
131
+ - Remote rc/live environments move only through `/rcand`, `/release`, and `/hotfix`.
132
132
  - Everything is gitignored; `/stage` never produces a tracked change.
133
133
  - **Playwright MCP output goes to `tmp/`**, never the repo root: if you drive the Playwright MCP server,
134
134
  pass `--output-dir tmp/playwright-mcp` (or point its output there). `.playwright-mcp/` is kept gitignored
@@ -1,151 +0,0 @@
1
- ---
2
- name: worktree
3
- description: Orchestrate a worktree from create to landed PR, tied to board status.
4
- ---
5
-
6
- **Host-native invocation:** Claude `/mmi:worktree` · Codex `$mmi:worktree` · jervcode/Kimi `/skill:worktree` · Kilo `skill` tool. A backticked `/name` in this doc names the matching workflow (this skill or a sibling), not a literal command.
7
-
8
- # /worktree — create → work → land
9
-
10
- Drive an item through an isolated worktree: cut it from latest `development`, claim the board item, do the
11
- work, open and land the PR, and clean up — with the board moving automatically at each boundary. One
12
- worktree per session; everything under `../mmi-worktrees/` is ephemeral and sweepable.
13
-
14
- ## Step 1 — create + provision
15
-
16
- ```bash
17
- mmi-cli worktree create <owner/repo#N> --claim --from origin/development
18
- ```
19
-
20
- `worktree create` cuts the branch from `origin/development` (fetched first) and provisions it: installs
21
- deps (`npm ci`) and copies local-only config (`.claude/settings.local.json`) a fresh checkout lacks. Use
22
- `--from <ref>` for a non-default base, `--path <path>` to override the location. An existing worktree that
23
- lost its deps re-provisions with `mmi-cli worktree setup [path]` (the SessionStart hook fires this
24
- automatically).
25
-
26
- The issue-ref form derives `<issue-number>-<short-slug>`, assigns the item, and moves it to In Progress.
27
-
28
- `worktree create` also leases the tree to the **creating session** (#4328). A later `jerv-cli lane submit
29
- --dir` (or any governed seat) refuses an already-held host lease and will not commandeer it. Before handing
30
- the tree to a governed seat, release that lease first — safe once the session's own edits in that tree are
31
- committed and pushed: `jerv-cli lease close --ref <worktree path>` (closes every lease on that ref; no id
32
- lookup needed). To inspect what's held before closing, `jerv-cli lease list` shows id, ref, and owner.
33
-
34
- ## Step 2 — claim + work
35
-
36
- Work in the provisioned worktree. Exercise the change with `/stage` (a local stage is bound to the worktree that
37
- started it — stop it before switching worktrees). Sequential related items in one session reuse the active
38
- worktree; do not churn one worktree per issue unless a true parallel or PR boundary needs it.
39
-
40
- ## Step 3 — open the PR
41
-
42
- Push the branch and open the PR against `development`. The board moves to In Review automatically on PR
43
- open — never move it by hand.
44
-
45
- ```bash
46
- git push origin <branch>:<branch> # explicit feature refspec — see below
47
- mmi-cli devops pr create --title "<title>" --body-file .jerv/PR_BODY.md --base development
48
- mmi-cli devops pr checks-wait <PR-number> # wait for required CI to go green
49
- ```
50
-
51
- Write the PR body under `.jerv/` (#4405), never at the worktree root. `.jerv/` is the agent-artifact
52
- prefix `worktree land` treats as removable; a stray untracked `PR_BODY.md` anywhere else classifies the
53
- tree as `untracked-files` and Step 4 then skips cleanup entirely.
54
-
55
- The push must be the explicit `<branch>:<branch>` refspec (the branch Step 1 derived, e.g.
56
- `git push origin 3795-my-slice:3795-my-slice`). The #1660 protected-push gate denies the
57
- `HEAD`/remote-only form (`git push -u origin HEAD`) — its target cannot be proven safe. And never
58
- share the push with staging or commit verbs in one compound command: the deny applies to the whole
59
- command, so a refused `git add … && git commit … && git push …` chain discards the add and commit
60
- with it. Stage, commit, and push as separate commands.
61
-
62
- If the branch adds, removes, or renames any `docs/` file, `pr create` refuses with a stale
63
- `docs/index.md` (#4092) — run `mmi-cli oracle docs index --write`, commit `docs/index.md`, and push again
64
- before retrying.
65
-
66
- ## Step 4 — land + clean up
67
-
68
- Under standing go (green CI, CI-gated PR) land to `development`. **Invoke `mmi-cli devops pr land` from the
69
- primary checkout** (or any cwd that is not the PR worktree) (#4549). Landing while cwd is still inside
70
- the worktree that cleanup removes can merge successfully and still exit 1 with
71
- `cleanupError: … Unable to read current working directory` — post-merge `gh`/`git` follow-ups then have
72
- no readable cwd even when removal itself chdir'd away (#4140).
73
-
74
- ```bash
75
- cd <primary-checkout> # e.g. the main MMI-Hub clone — not the slice worktree
76
- mmi-cli devops pr land <PR-number>
77
- ```
78
-
79
- `pr land` waits for checks, squash-merges, and does the full cleanup at the branch boundary: removes the
80
- worktree, deletes the merged branch (local + origin), and prunes tracking refs. A worktree the IDE has
81
- locked is queued and retried by `mmi-cli worktree gc sweep-deferred`. Self-authored merges need an explicit
82
- per-session merge grant — ask early if you don't have one.
83
-
84
- **`not-attempted (untracked-files)` (#3500 / #4405):** the usual cause of a merged PR that left its
85
- worktree behind. Any untracked path outside `.jerv/` — a hand-written `PR_BODY.md`, notes, a scratch
86
- script — makes removal refuse, because an unadded file can be real work. Delete or move the file, then
87
- re-run cleanup **from inside the worktree** (`worktree land` has no `--path`; it acts on the tree you
88
- are standing in):
89
-
90
- ```bash
91
- mmi-cli worktree land --apply
92
- ```
93
-
94
- **Cwd-safe removal (#4140):** `worktree land --apply` (what `pr land` runs) releases the process cwd to
95
- the primary checkout before deleting the tree (#1444/#2747) so Windows `rmdir` is not `EBUSY`. That does
96
- **not** replace the agent rule above: still start `pr land` from the primary checkout (#4549). Prefer
97
- primary cwd also when running `worktree land` manually outside `pr land`. If removal still fails (IDE
98
- lock, antivirus), the deferred sweep retries from a safe cwd.
99
-
100
- **No main lineage on a squashable development PR (#4365 / #4371):** never `git merge -s ours` (or otherwise
101
- merge) a main-parented port commit into a development PR that will squash. Squash folds second-parent
102
- trailers — including foreign `Closes #N` — into the development squash body, closes the wrong issues, and
103
- trips the closing-keyword land guard. Keep the cherry-pick / main-clean source on a separate branch or ref;
104
- land only development-tree changes on the development PR. To record a pushed main-clean SHA for a later
105
- `/hotfix --from` without polluting squash parents, prefer a marker-only commit on the development branch
106
- that references that SHA in the message — do not pull the main commit into the squashable parent list.
107
- This does not weaken the `#3167` merge floor on `/hotfix` and `/release` (never squash a tagged commit;
108
- alignment / roll-forward stays a true merge).
109
-
110
- **Stay-open phrasing (JC#495 / #3718):** GitHub's closing-keyword parser is negation-blind. `Does not
111
- close #N` still contains `close #N` and **closes the issue** on merge/squash (measured: Jerv-JervCode
112
- PR #493 closed #487). When an issue must stay open, never put `close`/`closes`/`fix`/`resolve` + `#N`
113
- in the PR body, commit message, or merge message — use `Part of #N`, `Refs #N`, or `leaves #N open` only.
114
- `mmi-cli devops pr create` rewrites common negated phrases; `pr land` / `pr merge` still refuse any remaining
115
- negation-blind close. `--force` only when those targets should actually close.
116
-
117
- If a PR already inherited closed-issue `Closes` keywords from that anti-pattern and `pr land` / `pr merge`
118
- refuses, land with `--force` only when those inherited targets are already closed — prefer preventing the
119
- pollution above over relying on `--force`.
120
-
121
- ## Step 5 — record + next
122
-
123
- Record durable decisions on the issue or PR, then check the board again:
124
-
125
- ```bash
126
- mmi-cli oracle wave status # remaining worktrees, open PRs, local stages at a glance
127
- mmi-cli oracle next # the next actionable item
128
- ```
129
-
130
- ## Notes
131
-
132
- - Cut worktrees only at `../mmi-worktrees/<RepoName>/<branch>` (#3471) — generic helpers that force `.claude/worktrees/` or
133
- `.worktrees/` are not the MMI path.
134
- - Multiple independent items → one worktree each, run in parallel, one PR per item (`/mmi` Leverage).
135
- - Never land to a protected/release branch here — that is `/rcand` and `/release`.
136
- - **Keep Cursor on the primary checkout (#4489 / #4901).** Edit the worktree without
137
- `move_agent_to_root` into the slice — moving the workspace root pins the session so land/gc
138
- refuse forever. If Cursor’s agent workspace is still rooted at the slice, `worktree land` /
139
- `worktree gc --apply` / doctor gc **refuse** to delete that directory (and queue deferred
140
- removal). On a Cursor agent host, land/gc fail closed when the active root cannot be resolved:
141
- open the primary first, or set `MMI_ACTIVE_WORKSPACE_ROOT` to the primary path. After Cursor is
142
- on the primary, `mmi-cli worktree gc sweep-deferred` finishes cleanup.
143
-
144
- ## Retro — one check before you finish
145
- Before your final report, answer one question honestly: did **this skill's own instructions** misfire
146
- this run — ambiguous wording, a misleading message, or an environment failure it should have warned
147
- about? (Process only — never the user's code or task; e.g. a create that branched from a stale base, or a
148
- land that left a worktree behind.) If yes, file **one** lesson and move on; a clean run is silent (hard
149
- cap: one per run). It lands on the Hub board (deduped) and is fixed only via a reviewed PR — never edit
150
- the skill live; the retro is advisory, so if the call fails, note it and continue:
151
- `mmi-cli learning skill-lesson --skill worktree --title "<what misfired>" --body "<what; evidence; proposed amendment>"`