@mutmutco/pi-plugin 3.138.0 → 3.139.1

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.
@@ -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>"`