@mutmutco/kilo-plugin 3.79.0

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.
Files changed (40) hide show
  1. package/agent/reviewer.md +108 -0
  2. package/package.json +23 -0
  3. package/scripts/command-ladder-core.mjs +334 -0
  4. package/scripts/command-ladder-gate.mjs +126 -0
  5. package/scripts/deny-gate-crash.mjs +179 -0
  6. package/scripts/edit-tool-paths.mjs +113 -0
  7. package/scripts/env-write-lint.mjs +137 -0
  8. package/scripts/hook-io.mjs +17 -0
  9. package/scripts/hook-policy.mjs +73 -0
  10. package/scripts/hook-run.mjs +170 -0
  11. package/scripts/hook-trace.mjs +108 -0
  12. package/scripts/pretooluse-shell-gates.mjs +420 -0
  13. package/scripts/secret-echo-lint.mjs +170 -0
  14. package/scripts/secret-redact.mjs +537 -0
  15. package/scripts/throttle-core.mjs +324 -0
  16. package/scripts/validate-hook.mjs +156 -0
  17. package/scripts/vault-edit-gate.mjs +94 -0
  18. package/server.mjs +237 -0
  19. package/skills/bootstrap/SKILL.md +493 -0
  20. package/skills/bootstrap/seeds/Dockerfile.template +30 -0
  21. package/skills/bootstrap/seeds/README.template.md +36 -0
  22. package/skills/bootstrap/seeds/architecture.template.md +34 -0
  23. package/skills/bootstrap/seeds/decisions-readme.template.md +46 -0
  24. package/skills/bootstrap/seeds/docker-compose.template.yml +26 -0
  25. package/skills/bootstrap/seeds/gate.template.yml +90 -0
  26. package/skills/bootstrap/seeds/google-login.template.md +33 -0
  27. package/skills/bootstrap/seeds/manifest.json +26 -0
  28. package/skills/bootstrap/seeds/mmi-product-required-checks.template.json +23 -0
  29. package/skills/browser-automation/SKILL.md +93 -0
  30. package/skills/doctor/SKILL.md +76 -0
  31. package/skills/epic/SKILL.md +87 -0
  32. package/skills/hotfix/SKILL.md +113 -0
  33. package/skills/mmi/SKILL.md +400 -0
  34. package/skills/onboard/SKILL.md +70 -0
  35. package/skills/rcand/SKILL.md +194 -0
  36. package/skills/release/SKILL.md +546 -0
  37. package/skills/resume/SKILL.md +68 -0
  38. package/skills/secrets/SKILL.md +157 -0
  39. package/skills/stage/SKILL.md +151 -0
  40. package/skills/worktree/SKILL.md +86 -0
@@ -0,0 +1,400 @@
1
+ ---
2
+ name: mmi
3
+ description: Show, claim, move, or file work on the repo board.
4
+ ---
5
+
6
+ # mmi — start of work
7
+
8
+ Shows a dev their workboard for this repo: what they're working on, what's free to pick up, and what others
9
+ have claimed. Read-only by default — render the board, then get out of the way.
10
+
11
+ Explicit invocation is host-native: `/mmi:mmi` in Claude Code, `$mmi:mmi` in Codex, `/mmi`
12
+ (canonical `/skill:mmi`) in Kimi Code CLI, and the `mmi` skill (listed in Kilo's `/` picker, invoked via
13
+ the `skill` tool) in Kilo Code. The `/mmi` label used below names this workflow; it is not a
14
+ universal literal command.
15
+
16
+ Status values: `Todo · In Progress · In Review · Done` (GitHub enforces who can move what — don't re-explain
17
+ it on every move). Closed/finished items auto-archive after they go quiet; archived ones aren't on the board.
18
+
19
+ ## Step 0 — identity, greet, eager preflight when stale
20
+
21
+ `/mmi` is the dev's hello-to-work — the most common command they run. Three pacing rules before anything else:
22
+
23
+ 1. **Resolve login, then greet immediately** (before `board read` or doctor — still the first lines in
24
+ the response so the dev never stares at silent tool output). One emoji max in the whole response.
25
+ The greeting addresses the dev, never claims to *be* them (not "I'm @<login>"):
26
+ - **SessionStart banner** — if context carries `current human: <login>`, use that login.
27
+ - **Else** one fast call: `mmi-cli whoami --json` (cached Hub session in `hub-session.json` when
28
+ valid — no network; `gh` fallback only when the cache lacks `login`; exit 0 on `unknown`). Do
29
+ **not** call `gh api user` separately — `whoami` already covers it. Do **not** wait on `board read`
30
+ for identity — `viewer` is for work items only (Step 1).
31
+ - Known login → `👋 Welcome back, @<login> — pulling up your board…`
32
+ - `source: unknown` → generic `👋 Welcome back — pulling up your board…`
33
+ 2. **Keep the board fast: read first, run doctor only when evidence says it can change this render (#2112).**
34
+ The normal happy path is identity → board read. Do **not** block the board on `doctor --preflight` just to
35
+ check freshness. Run doctor synchronously only after a hard signal that the current setup may be broken:
36
+ `mmi-cli` is missing, `board read` reports missing auth/project scope, the command surface is absent, or a
37
+ cached/session-start health line explicitly says a heal is needed.
38
+
39
+ ```bash
40
+ mmi-cli board read --json # Step 1 — first useful render on the happy path
41
+ mmi-cli doctor --preflight # only after a hard setup signal — foreground, one at a time
42
+ ```
43
+
44
+ Since #3485 `--preflight` **heals**: its heals are `npm install -g` and a marketplace remove → add →
45
+ install, both machine-global. Since #3489 they are serialised behind a machine-wide lock, so two
46
+ concurrent preflights no longer interleave inside the npm prefix or the marketplace clone — the second
47
+ waits, and if the first is still installing after two minutes the second reports the heal as skipped
48
+ rather than forcing it.
49
+
50
+ Still run it in the foreground and wait. The lock stops corruption, not confusion: a backgrounded
51
+ preflight that reports "skipped — lock busy" has healed nothing, and an agent that does not read that
52
+ line will carry on believing its tooling was fixed.
53
+
54
+ `doctor --preflight` detects a stale npm global or a stale/unresolved plugin install and runs the **env**
55
+ half of the interactive `doctor --apply` self-heal (#3485) — it never touches the repo working tree, and
56
+ never pays the train-branch sync or the gc sweep. It still belongs off the critical board path unless it
57
+ has proof it must heal. When it prints `↻ Updating mmi tooling, one moment…`, relay that before waiting;
58
+ when it prints `↻ MMI tooling updated — …`, relay the reload/restart guidance.
59
+
60
+ What it actually heals, and nothing more:
61
+
62
+ - a behind npm global → `npm install -g @mutmutco/cli@<released version>`, pinned, never the floating
63
+ `@latest`, which npm can resolve off a cached packument and reinstall the stale version right after a
64
+ publish (#3422). Effective on the next invocation.
65
+ - a stale or unresolved Claude plugin → `claude plugin marketplace remove mmi` → `… remove mutmutco` →
66
+ `claude plugin marketplace add mutmutco/MMI-Hub` → `claude plugin install mmi@mutmutco`. A fresh
67
+ reinstall, never `claude plugin update`, which nests into itself past MAX_PATH on Windows and wipes the
68
+ marketplace clone (#1126). Effective after a reload: **restart Claude Code / run `/reload-plugins`**
69
+ (native), or **reopen the workspace** (VS Code extension).
70
+
71
+ It does **not** dedup `installed_plugins.json` rows and does **not** quarantine cache dirs — that
72
+ machinery was deleted in #2741 and `doctor` is doctrine-bound never to write to the harness-owned plugin
73
+ cache. Stale cached versions are a detect-only row; the verb that deletes them is `mmi-cli plugin prune
74
+ --apply`.
75
+
76
+ - **Fast path** → `whoami` then `board read`; no foreground doctor.
77
+ - **Hard setup signal** → run `doctor --preflight`, relay `↻` lines, then retry `board read` when appropriate.
78
+ - **`mmi-cli: command not found`** → plugin PATH provisioning has not applied, or the standalone CLI is not installed.
79
+ In Claude Code, reopen the session; if it persists, install the MMI plugin:
80
+ `/plugin marketplace add mutmutco/MMI-Hub` → `/plugin install mmi@mutmutco` → `/reload-plugins`.
81
+ On Codex, install the Hub-shipped plugin: `codex plugin marketplace add mutmutco/MMI-Hub` →
82
+ `codex plugin add mmi@mutmutco`, then trust the bundled hooks via `/hooks`. On Kimi Code CLI:
83
+ `/plugins install https://github.com/mutmutco/MMI-Hub` → `/reload`. On Cursor, run
84
+ `mmi-cli plugin heal`, then reload the Cursor window. On OpenCode and plain shell the standalone CLI
85
+ is the whole install:
86
+ ```powershell
87
+ npm install -g @mutmutco/cli
88
+ ```
89
+ In PowerShell from an `MMI-Hub` checkout, or when diagnosing a stale plugin cache, use the repo-local fallback:
90
+ ```powershell
91
+ node cli/dist/index.cjs doctor --json
92
+ ```
93
+ - **The host-native skill entry is missing** — `/mmi:mmi` is absent in Claude, `$mmi:mmi` is absent in
94
+ Codex, or `/skill:mmi` is absent in Kimi (the auto-heal below is Claude-only; Codex and Kimi ship the
95
+ same skills but repair is a manual reinstall — see their recipes above) → the plugin is stale,
96
+ duplicated, or disabled, so the skill surface is gone and you can't reach this workflow through the
97
+ host UI. Recover from the shell with the repo-local doctor, which detects and self-heals it:
98
+ ```powershell
99
+ node cli/dist/index.cjs doctor # from an MMI-Hub checkout — auto-heals + prints the reload action
100
+ ```
101
+ If `claude` isn't on PATH for the auto-heal, run the reinstall by hand (never `/plugin` in VS Code — it
102
+ isn't an updateable path there):
103
+ ```bash
104
+ # Claude Code (native or VS Code extension)
105
+ claude plugin marketplace remove mmi && claude plugin marketplace remove mutmutco && claude plugin marketplace add mutmutco/MMI-Hub && claude plugin install mmi@mutmutco
106
+ # then: restart Claude Code / run /reload-plugins (VS Code: reopen the workspace)
107
+ ```
108
+ - **A gate is ✗** → walk them through the printed fix; don't just echo it:
109
+ - **GitHub auth** (the usual one) — the board uses its `gh` token. Give them the
110
+ command to run **in their own terminal** (the browser step is theirs — an agent can't log in as them):
111
+ ```bash
112
+ gh auth login --hostname github.com --git-protocol https --web --scopes "project"
113
+ ```
114
+ The `project` scope is what lets `/mmi` read + move the board, granted here once. When they're back,
115
+ re-run `mmi-cli doctor` to confirm green.
116
+ - **Hub registry / board META** — `mmi-cli org project get <owner/repo>` or `mmi-cli board read` reports
117
+ missing project/board coords → a master-admin registers or backfills the repo's `PROJECT#<slug>` META.
118
+ There's no reliable project to read until that is fixed, so stop here.
119
+
120
+ A broken setup surfaces from `doctor --preflight`, a failed `board read`, or a gate that still fails after
121
+ heal — handle it then. A `command not found` from **either** command routes into the recovery paths above.
122
+ Don't block the all-green path on doctor noise.
123
+
124
+ ## Authority (org-wide)
125
+
126
+ `/mmi` is the usual session start — agents should know the dev's role before any later train, vault, or
127
+ tenant request surfaces. After the board read (Step 1), you already have `viewer` in the JSON; for train
128
+ authority on this or another repo, run:
129
+
130
+ ```bash
131
+ mmi-cli org access role <owner/repo> --json # { role, train } — Hub-verified from registry projectAdmins
132
+ ```
133
+
134
+ When `role` is `project-admin` and `train` is true on **that** repo, the dev holds D14 authority there —
135
+ guide or execute via the matching skill (`/secrets`, `/rcand`, `/release`, `/hotfix`, `runtime tenant control`).
136
+ **Do not** redirect them to the master. Hub train is master-only; org-tier vault and access grants stay
137
+ master-only. Full matrix: `AGENTS.md` § Authority.
138
+
139
+ ## Config
140
+
141
+ The project this repo is on lives in the Hub registry (`PROJECT#<slug>`: `projectOwner`, `projectNumber`,
142
+ `projectId`, `statusFieldId`, `statusOptions{}`, and optional Priority field ids), set by `/bootstrap`
143
+ (repos and projects are not 1:1 — a repo attaches to a chosen project). Refresh the registry META if a
144
+ lookup misses; do not read or repair committed repo-local board config.
145
+
146
+ ## Step 1 — read the board (one call, caller-scoped)
147
+
148
+ SessionStart injects a **bounded board slice** (assigned + top claimable items, max five lines,
149
+ 3s timeout, fail-soft) and, when task relevance is high-confidence, up to **two North Star context
150
+ cards** (title + compact intent, PRIOR-not-instruction framing — silent when ambiguous). For the
151
+ complete partition — secondary repos, taken items, bundle details — run the full command below.
152
+
153
+ ```bash
154
+ mmi-cli board read --json
155
+ ```
156
+
157
+ This is the **only foreground call** on the happy path for **work items** (not identity — Step 0 already
158
+ resolved login). Its JSON carries `viewer`, `repo`, and the project title — do **not** run separate
159
+ `gh api user` / `gh repo view` calls; they just delay the board. If `repo` is missing from the JSON,
160
+ keep the board header generic. The CLI resolves the project from the Hub registry; to inspect it
161
+ directly, `mmi-cli org project get --json`.
162
+
163
+ Use the returned `primary` group for current-repo items and `secondary` for other repos on the same Project.
164
+ Within each group, render `userOwned`, `claimable`, and `taken`.
165
+
166
+ CLI partition:
167
+ - **Yours** — assignee includes the viewer AND `Status ∈ {Todo, In Progress, In Review}`.
168
+ - **Free to claim** — `Status == Todo` AND unassigned AND the viewer has repo write permission
169
+ (`repos/<owner>/<repo>.permissions.push == true`). Issue filing stays available to any authenticated
170
+ org member; claiming work is gated by write access.
171
+ - **Taken** — assigned to someone else (any active status). Render id + status + owner ONLY — no title.
172
+
173
+ Do not cache claimable state. Every `/mmi` board is a fresh Project v2 read. Partial reads exit nonzero by
174
+ default; use `--allow-partial` only when the dev explicitly accepts an incomplete board. If the read fails
175
+ for a missing `read:project` scope, surface that verbatim — the dev grants it once at `gh auth login`.
176
+
177
+ ## Step 2 — show the board
178
+
179
+ This render is the product: welcoming, guiding, clear — and gone in one glance. Plain **markdown**,
180
+ never a fenced code block (monospace hard-wraps long titles and the structure is lost). The shape:
181
+
182
+ - **Short refs.** `[RepoName#N](issue-url) · short title` — repo name + number only, no `owner/`
183
+ prefix, no `[type]` brackets. The ref is the clickable link; the title follows after `·`, trimmed
184
+ to its essence (drop boilerplate prefixes, keep it under ~8 words).
185
+ - **Flat `-` lists** under bold head lines — never `##` headings (too heavy for a three-section
186
+ board), never nested bullet trees, never tables, never a literal `•` glyph (it breaks GFM list
187
+ parsing).
188
+ - **Three heads, each with one factual clause** appended after an em dash — a fact the dev can act
189
+ on ("two train fixes in flight"), not cheerleading. Encouragement lives once, in the close.
190
+ - **On your plate** — the dev's items, status noted inline after the title (`· in review`) when
191
+ not In Progress. In Review means *awaiting admin review & merge* — caption it that way, never
192
+ "ready to move".
193
+ - **Up for grabs** — claimable items.
194
+ - **Taken** — id · status · owner ONLY, never the title. No commentary clause; it's reference.
195
+ - **Skip empty sections silently** — no "nothing here" filler. Empty board entirely → one warm line:
196
+ nothing assigned, point at Up for grabs or filing a new item.
197
+ - **Close with one grounding line** — no question, no hype, no pressure: `Pick one and claim it
198
+ when you're ready.` plus the standing quiet affordance `Or file a new item — say the word.`
199
+ - **One screen total.** Greeting + sections + optional Leverage (Step 6) + close.
200
+
201
+ Full example (greeting printed earlier, before the read):
202
+
203
+ > 👋 Welcome back, @dev — here's your board on **MMI-Hub**.
204
+ >
205
+ > **On your plate** — two train fixes in flight:
206
+ > - [MMI-Hub#834](https://github.com/mutmutco/MMI-Hub/issues/834) · automated hotfix apply path
207
+ > - [MMI-Hub#841](https://github.com/mutmutco/MMI-Hub/issues/841) · rcand stuck on required checks
208
+ >
209
+ > **Up for grabs** — ready when you are:
210
+ > - [MMI-Hub#821](https://github.com/mutmutco/MMI-Hub/issues/821) · redesign tenant env-writer
211
+ > - [MMI-Hub#839](https://github.com/mutmutco/MMI-Hub/issues/839) · revisit hotfix back-merge policy
212
+ >
213
+ > **Taken**
214
+ > - MMI-Hub#827 · In Progress · @otherdev
215
+ >
216
+ > **Leverage**
217
+ > - #834 and #841 are both train-lane — I can run them side by side, one PR each.
218
+ >
219
+ > Pick one and claim it when you're ready. Or file a new item — say the word.
220
+
221
+ Only an admin merges (a project-admin on their own project, the master-admin everywhere); the dev who
222
+ opened the PR waits on that review, they don't move it themselves.
223
+
224
+ ## Step 3 — stop (act only on request)
225
+
226
+ Render the board and stop. Don't prompt for a choice, don't recommend a next move, don't ask "what now?".
227
+ The dev drives: when they say claim / continue / file — or accept a Leverage offer (Step 6) — do it.
228
+ Otherwise the board alone is the answer.
229
+
230
+ **Status moves happen automatically** as the work flows (claim, PR open, merge, release). The dev never
231
+ moves an item by hand, so **never suggest a status move** — not "advance to Test", not "mark this PR",
232
+ not "ready to move?". The board reflects state; it doesn't ask the dev to change it.
233
+
234
+ The one standing affordance is **filing a new item** — always available, no item needed. The Step 2
235
+ close line already carries it (`Or file a new item — say the word.`); never turn it into a status
236
+ nudge. If the dev takes it, run the guided flow in Step 5.
237
+
238
+ ## Step 4 — load the full item before working it
239
+
240
+ The moment the dev commits to an item (continue or claim), read the **whole** work item before planning or
241
+ acting — never from the board title alone. Body **and every comment**, end-to-end; treat later comments as
242
+ potentially **superseding** the body. Only then greet into the work or propose a plan.
243
+
244
+ ```bash
245
+ # One shot — status, assignees, type, body, and every comment for one board item:
246
+ mmi-cli board show <owner/repo#N> # add --json for machine-readable output
247
+ ```
248
+ For an item **not on the board**, `mmi-cli issue view <N> --comments` is the board-independent one-shot:
249
+ it returns the body **and** every comment as JSON in a single call (add `--context` for `linkedPrs` and, on
250
+ an epic, a `children` summary). Prefer it over raw `gh issue view --comments`, which in a non-TTY shell (every
251
+ agent/CI context) prints only the comments, hides the body, and prints nothing at all on a zero-comment issue.
252
+ ```bash
253
+ mmi-cli issue view <N> --repo <owner/repo> --comments # body + every comment, one call
254
+ ```
255
+
256
+ > **Never reach for standalone `jq`** — it isn't installed on Windows dev machines, so each attempt burns a
257
+ > failed call (#230). `mmi-cli board read|show` is already human-readable (drop `--json`); to parse JSON use
258
+ > `mmi-cli … --json` piped to `node`, or `gh`'s **built-in** `--jq`.
259
+
260
+ (Triggers only when a dev commits to an existing item — no-op for the *report a bug / request a feature /
261
+ something else* paths.)
262
+
263
+ ## Step 5 — act
264
+
265
+ - **Claim:** when the dev takes an item, assign them + set `In Progress` in one go. This is the only status
266
+ write `/mmi` makes, and only as the mechanical side of claiming — never as a standalone "move" the dev
267
+ is offered. Every later transition (In Review on PR open, Done on merge) flows automatically from the
268
+ work, not from here.
269
+ ```bash
270
+ mmi-cli board claim <owner/repo#N> --json
271
+ ```
272
+ The command validates `Todo` + unassigned, assigns the viewer, and moves the Project v2 `Status` to
273
+ `In Progress`. A partial claim exits nonzero unless the dev explicitly accepted `--allow-partial`.
274
+ Claiming several items (batch/parallel act-paths) takes them in **one call** — `board claim <ref> <ref> …`
275
+ — which shares the setup cost and reports per-item results (any per-item failure → nonzero exit).
276
+ - **File a new item (guided by type → template):** don't free-type an issue. Walk the dev through it:
277
+ 1. **Pick the type** — `bug` · `feature` · `task` (the repo's three `.github/ISSUE_TEMPLATE/` forms;
278
+ each carries its own label). Offer the choice with the structured-question UI, one line each:
279
+ bug = something's broken · feature = new capability · task = chore/improvement.
280
+ 2. **Fill that type's template.** Read its fields from `.github/ISSUE_TEMPLATE/<type>.yml` and gather
281
+ answers from the dev for each — draft where you can, ask where you can't (the template form is
282
+ interactive and won't drive in a non-TTY agent shell, so collect the fields, then create directly).
283
+ 3. **Submit via `mmi-cli issue create`** — the canonical create path. Before filing, read the live
284
+ `issue create` entry from `mmi-cli commands --json`; flags change, and a missing documented flag means
285
+ the installed CLI is stale until a fresh local build proves otherwise. It maps `--type` to the label,
286
+ `--priority` sets the board Priority **field** (never a `priority:*` label — #416), and `--surface`
287
+ supplies the repository's required single surface label. It always prints `{number,url}` JSON. Never
288
+ use `gh issue create`; it bypasses these board contracts:
289
+ ```bash
290
+ mmi-cli issue create --type <bug|feature|task> --title "<title>" --body "<filled template>" \
291
+ --priority <high|medium|low> --surface <surface>
292
+ ```
293
+ For long markdown, materialize a temporary UTF-8 body file, pass its real path with
294
+ `--body-file <path>`, then remove it after the write succeeds. Do not pipe multiline markdown to
295
+ `--body-file -` on a guarded host.
296
+ The command starts bounded related-issue discovery off-path. It auto-comments only high-confidence,
297
+ idempotent links. To inspect candidates manually before writing anything else:
298
+ ```bash
299
+ mmi-cli issue discover-related --repo <owner/repo> --number <number> --title "<title>" --body "<body>" --json
300
+ ```
301
+ It lands on the board as Todo automatically — confirm the link from the JSON. (Templates differ per
302
+ repo; read the actual `.yml` set rather than assuming bug/feature/task.)
303
+ - **File a friction report (org-tooling pain):** `mmi-cli report --title "<one-line>" --body "<what hurt>"`
304
+ files it on the Hub board via your Hub session and dedups against the open reports (a confident
305
+ duplicate becomes a +1 comment, not a new issue). The actual GitHub write runs server-side with the
306
+ Hub App's own token (#263), so no MMI-Hub repo access is required to file. Never read Hub coordinates or
307
+ keys from a repo-local `.env`, call a repo-local report script, or POST the Hub API directly — the CLI
308
+ carries the endpoint and your Hub session intrinsically.
309
+ - Surface any `gh`/`mmi-cli` error verbatim.
310
+
311
+ ## Step 6 — Leverage (offer where it fits)
312
+
313
+ `/mmi` is an agentic coding board — every item is written by an LLM agent, so the board can do more than
314
+ hand over one item at a time. Between the Taken section and the close, render an optional **Leverage**
315
+ block: **up to two** offers, one line each, under a bold `**Leverage**` head (see the Step 2 example).
316
+ **Default to silence:** if nothing below crisply fits, omit the whole block — never pad it. Never use a
317
+ question-UI, never pressure — the dev acts or ignores.
318
+
319
+ Pick up to two, in priority order:
320
+
321
+ 1. **Split + fan out** — a single item plainly too large for one PR (body is multi-part, an umbrella or
322
+ epic). Offer to slice it into child issues. (First because it *creates* the items the rest act on.)
323
+ 2. **Batch** — 2+ claimable items that are one coherent unit (shared title-prefix family, same subsystem)
324
+ **and** touch overlapping/adjacent paths. Coupled → one worktree, **one PR**.
325
+ 3. **Parallel** — 2+ items that are mutually independent and touch **disjoint paths**. Independent → N
326
+ worktrees, **one PR each**, run concurrently.
327
+ 4. **Background** — a single long-running item (broad refactor, large build/sweep). Kick it off in the
328
+ background so the dev isn't blocked.
329
+
330
+ Disjoint paths is the deciding signal between batch (overlap → one PR) and parallel (disjoint → N PRs).
331
+ When unsure which fits, prefer the more conservative offer — a marginal call is worse than a quiet board.
332
+ Two offers must not overlap (never the same item in both); a second marginal offer is worse than one
333
+ crisp one.
334
+
335
+ Bundling detail boundary: start from the metadata board. Only if there are multiple viable
336
+ `userOwned`/`claimable` candidates, fetch bodies/comments with:
337
+
338
+ ```bash
339
+ mmi-cli board read --json --bundle-details
340
+ ```
341
+
342
+ That detail path may fetch bodies/comments only for `userOwned` and `claimable` issues. `taken` stays
343
+ metadata-only, always. Do not fetch Done items, do not cache claimables, and do not pass `--allow-partial`
344
+ unless the dev explicitly accepts an incomplete Leverage read. If detail lookup exits nonzero, render
345
+ the board without a Leverage block.
346
+
347
+ Offer lines — one line each, no UI, no "(Recommended)", phrased as available leverage:
348
+
349
+ - **Batch** — `These read like one change — I can take #66–#70 together in a single PR if you'd like.`
350
+ - **Parallel** — `#17 and #18 are independent — I can run them side by side, one PR each, if that helps.`
351
+ - **Background** — `#22 looks long-running — I can take it in the background so you're not blocked.`
352
+ - **Split** — `#60 looks large — I can slice it into child issues and fan them out, if you want.`
353
+
354
+ Act-paths run only on the dev's explicit go. Every path branches from `development` and lands by PR.
355
+ PR land cleans up at the branch boundary (`git worktree remove` + `git worktree prune`); batch/session
356
+ work should keep all related sequential issues in the same branch/PR where possible instead of merging and
357
+ destroying the worktree after each issue:
358
+
359
+ - **PR metadata:** read the live `pr create` or `pr edit` entry from `mmi-cli commands --json` before the
360
+ write. For multiline Markdown, materialize a temporary UTF-8 body file, pass its real path with
361
+ `--body-file <path>`, and remove it after the write succeeds. Do not pipe the body to `--body-file -`;
362
+ host prose guards require the materialized-file path.
363
+ - **Batch:** one worktree, claim each item (the Step 5 claim loop), make the coupled edits, open **one** PR
364
+ (`Closes #…, #…`).
365
+ - **Session/sequential:** multiple related same-repo items handled one after another in the same session
366
+ reuse the active worktree until the session or execution group ends; do not churn one worktree per
367
+ issue unless a branch/PR boundary, true parallelism, or explicit user ask requires it.
368
+ - **Parallel:** one isolated worktree per item, cut from `development`, run concurrently, **one PR per
369
+ item**. If two would touch the same file, serialize them or fold into a batch instead.
370
+ - **Background:** run off the hot path (a background task or CI job); poll with `/loop`, test with `/stage`
371
+ if useful; it still lands via its own worktree + PR. Bound it — never block silently.
372
+ - **Stage/worktree:** a local `/stage` is tied to the worktree that started it. Stop/destroy and recreate
373
+ it before moving to another worktree, or warn first when intent is unclear.
374
+ - **Split:** keep the original as the umbrella; file each child as a **native sub-issue** of it with
375
+ `mmi-cli issue create --parent <umbrella-ref> …` (or `mmi-cli issue link-child <umbrella> <child>` for a
376
+ child that already exists). The parent then renders a sub-issue checklist with each child's state and the
377
+ child renders its parent — no title prefix or body task-list to maintain. Refs are `#NN`, `owner/repo#NN`,
378
+ or a URL, and it works cross-repo (a Hub umbrella can track product-repo children). Get the dev's go before
379
+ filing the children; each child then becomes a parallel item. **When the last child merges, close the
380
+ umbrella** — its `Done` follows automatically.
381
+
382
+ ## Notes
383
+
384
+ - Reads/moves use **your** `gh` token (needs `read:project`/`project`, granted once at `gh auth login`).
385
+ - Promotion (`/rcand`, `/release`, `/hotfix`) and the local test env (`/stage`) are their own skills — `/mmi`
386
+ is the board + start-of-work, not the train.
387
+ - **Board verbs:** `board read` · `board show <id>` · `board claim <id>` · `board move <status> <id>`.
388
+ `move` exists for an agent's own mechanical bookkeeping when **no PR rides the automation** — e.g.
389
+ setting `Done` on a no-PR `task` or closed-out item that will not auto-advance. It is a tool, not a
390
+ dev-facing offer: the "never suggest a status move" rule (Step 3) still governs the human flow. The verb
391
+ hides the `gh project item-edit` + option-id wiring, so reach for it, not raw `gh`.
392
+
393
+ ## Retro — one check before you finish
394
+ Before your final report, answer one question honestly: did **this skill's own instructions** misfire
395
+ this run — ambiguous wording, a misleading message, or an environment failure it should have warned
396
+ about? (Process only — never the user's code or task; e.g. a board read that misreported what's
397
+ claimable, or a claim that moved the wrong item.) If yes, file **one** lesson and move on; a clean run is
398
+ silent (hard cap: one per run). It lands on the Hub board (deduped) and is fixed only via a reviewed PR —
399
+ never edit the skill live; the retro is advisory, so if the call fails, note it and continue:
400
+ `mmi-cli skill-lesson --skill mmi --title "<what misfired>" --body "<what; evidence; proposed amendment>"`
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: onboard
3
+ description: Guided first session — readiness check, repo status, and the first command to run.
4
+ ---
5
+
6
+ # /onboard — guided first session
7
+
8
+ For a developer's first session in a repo (or a fresh checkout): confirm the repo is wired into the org,
9
+ show what state it's in, and hand over the one concrete next command. Read-only — it diagnoses and points,
10
+ it does not change anything.
11
+
12
+ ## Step 0 — readiness gate
13
+
14
+ ```bash
15
+ mmi-cli onboard
16
+ ```
17
+
18
+ `onboard` reports the five things a machine needs to be workable and the exact next command to fix the
19
+ first gap:
20
+
21
+ - **Track** — the repo's branch + origin (is this an org checkout at all).
22
+ - **Board** — is the Project board reachable, and how many items are on it.
23
+ - **Registry** — is the repo registered in the Hub (`PROJECT#<slug>` META).
24
+ - **Secrets** — is a GitHub token available for the vault path.
25
+ - **Plugin** — will this machine ever pick up a new MMI plugin release, and from which branch (#3485).
26
+
27
+ The **Plugin** row is the one nothing else catches, and it is per machine, not per repo. Claude Code
28
+ leaves auto-update **off** for third-party marketplaces, and a marketplace registered with no
29
+ `source.ref` serves its catalog from the repo's default branch while pinning plugin content to `main`.
30
+ Both are hand edits in the developer's own Claude config — org tooling deliberately does not write them
31
+ (owner ruling on #3485) — so a machine nobody tells stays silently a release behind from day one. The row
32
+ names both fixes verbatim; it never takes `Next command`, because a stale plugin does not stop the work in
33
+ front of you.
34
+
35
+ A `✗` on any line comes with a `Next command:` — run **that** first. Common ones:
36
+
37
+ - Hub API URL not configured → `mmi-cli doctor` (fix wiring).
38
+ - Repo not registered → a master-admin runs `/bootstrap` (or `mmi-cli org project set <owner/repo>`).
39
+ - GitHub auth missing → the dev runs `gh auth login --hostname github.com --git-protocol https --web --scopes "project"`.
40
+
41
+ ## Step 1 — the picture
42
+
43
+ Once the gates are green:
44
+
45
+ ```bash
46
+ mmi-cli status # branch, worktrees, your PRs, your claimed items, stage
47
+ mmi-cli next # the first claimable item + its claim command
48
+ ```
49
+
50
+ ## Step 2 — hand over the first move
51
+
52
+ Close with one grounding line: gates green (or the one gate to fix), and the single first command —
53
+ usually `mmi-cli board claim <n>` for the recommended item, or the readiness fix if a gate is red. Don't
54
+ claim on the user's behalf; let them take the first item when ready.
55
+
56
+ ## Notes
57
+
58
+ - `/onboard` is the first-session, readiness-first wrapper. Once a repo is known-good, `/resume` is the
59
+ faster daily open and `/mmi` is the board.
60
+ - Everything here is read-only. The heavier setup (`/bootstrap`) is master-admin only.
61
+
62
+ ## Retro — one check before you finish
63
+ Before your final report, answer one question honestly: did **this skill's own instructions** misfire
64
+ this run — ambiguous wording, a misleading message, or an environment failure it should have warned
65
+ about? (Process only — never the user's code or task; e.g. a readiness gate that reported green while a
66
+ board read actually failed, or a next command that pointed at the wrong fix.) If yes, file **one** lesson
67
+ and move on; a clean run is silent (hard cap: one per run). It lands on the Hub board (deduped) and is
68
+ fixed only via a reviewed PR — never edit the skill live; the retro is advisory, so if the call fails,
69
+ note it and continue:
70
+ `mmi-cli skill-lesson --skill onboard --title "<what misfired>" --body "<what; evidence; proposed amendment>"`