@mutmutco/kilo-plugin 3.94.0 → 3.96.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/kilo-plugin",
3
- "version": "3.94.0",
3
+ "version": "3.96.0",
4
4
  "description": "MMI workflow skills and org gates delivery.",
5
5
  "author": {
6
6
  "name": "MMI Future",
@@ -413,11 +413,11 @@ collaborator list + the per-branch allowlist are the record — no separate rost
413
413
  Step-0 axes (class, project-type, deploy-model). Do **not** write the release track, board number, or deploy
414
414
  coords as a value — the templates point at `mmi-cli org project get` (registry SSOT, never copied, so it cannot drift).
415
415
  Do not write `AGENTS.md` / `CLAUDE.md` — these are developer-owned, gitignored agent guides, never a bootstrapped repo file (the `mmi-no-agent-files-org` ruleset blocks committing them).
416
- - **`docs/index.md` is generated by `bootstrap apply`, once (#3545).** The seeded README's first agent
417
- instruction is to read it, so it exists from the first commit and `bootstrap verify` requires it. Apply
418
- **creates** it and never rewrites it: apply sees the seed list, not the tree, so regenerating an index in a
419
- repo that has since added its own docs would silently drop every hand-authored entry. Once the repo has
420
- docs of its own, `mmi-cli docs index --write` owns it — that reads the whole tree, and `--check` gates drift.
416
+ - **`docs/index.md` is an optional generated routing index (#3545 / Hub#4133).** Agent entrypoints prefer
417
+ `mmi-cli repo-index search` + compute-at-read CLI over living prose under `docs/`. Apply may still create
418
+ `docs/index.md` once for link routing; it never rewrites it. Once the repo has docs of its own,
419
+ `mmi-cli docs index --write` owns the routing artifact and `--check` gates drift it is not product
420
+ current-state SSOT. Decision records under `docs/decisions/` remain append-only *why*.
421
421
  - **Push the mandated fill past the active ruleset (#1807).** Deployable repos activate
422
422
  `mmi-product-required-checks` during apply (its `bypass_actors` is empty by design), so the `gate` check is
423
423
  required on `development`/`main` before the seeded README + architecture have ever produced a green run. The
@@ -18,12 +18,13 @@ access runbook → [repo-access](https://github.com/mutmutco/MMI-Hub/blob/develo
18
18
 
19
19
  Read this section at the start of agent work in this repo.
20
20
 
21
- - **Docs entry point:** read `docs/index.md` firstthe generated routing index (`mmi-cli docs index
22
- --write`); `--check` gates drift, so it can never fall out of sync with the `docs/` tree.
21
+ - **Structure search:** `mmi-cli repo-index search <path|symbol|meaning>` Hub cloud pointer hits
22
+ (Hub#4133). Prefer this over inventing wiki pages or trusting stale inventories under `docs/`.
23
23
  - **Durable WHY:** `docs/decisions/` — one file per decision, prose only for what was chosen and
24
- rejected; never a description of current state.
25
- - **Current state:** code + `mmi-cli org project get` — release track, board, and deploy coords are
26
- registry facts, resolved live, never copied into a doc where they can go stale.
24
+ rejected; never a description of current state. Do not maintain living current-state under `docs/`.
25
+ - **Current state:** code + compute-at-read CLI (`mmi-cli org project get`, `board`, `status`,
26
+ `org schedules`, …) — registry facts, resolved live. Optional generated `docs/index.md` is a
27
+ **routing** index only (`mmi-cli docs index --check`), not product truth.
27
28
  - **GitHub wikis are retired org-wide** — this repo does not publish to a `.wiki.git`; do not create one.
28
29
  - **Stack:** (languages, frameworks, major services)
29
30
  - **Run locally:** (install, dev server, `/stage` if non-obvious)
@@ -42,5 +42,4 @@ current state, they read the code or a generated ref — not this file.
42
42
  ## Ownership
43
43
 
44
44
  Bootstrap seeds this README once (`ownership: repo`) and never clobbers it. Individual decision
45
- files are authored in the same PR as the change (or by the docs janitor as a backstop) and merged
46
- by a human.
45
+ files are authored in the same PR as the change and merged by a human. There is no scheduled docs-janitor backstop (Hub#4119/#4164).
@@ -3,6 +3,9 @@ name: gate
3
3
  # and v* tags so /release and /hotfix can discover required contexts on the tagged SHA.
4
4
  #
5
5
  # Runner: self-hosted mmi-runner (mmi-live) — see docs/Guides/gh-runner-runbook.md in MMI-Hub.
6
+ # #4118: if GATE_CMD runs tsgo or other memory-heavy typecheck / browser work, pin this job to
7
+ # runs-on: [self-hosted, linux, x64, mmi-heavy]
8
+ # instead — standard lanes are MemoryMax=1200M and will cgroup-OOM those workloads.
6
9
  # Stack-aware (#1550): the runtime is rendered into the setup-step `if:` — both the Node and Python
7
10
  # setup steps live in the file but only the one matching GATE_RUNTIME runs. Knobs (override at
8
11
  # bootstrap with --var):
@@ -14,7 +17,13 @@ name: gate
14
17
  # GATE_PY_VERSION — Python version for setup-python ({{GATE_PY_VERSION}})
15
18
  # GATE_MAX_SECONDS — run-with-budget wall-clock ceiling in seconds ({{GATE_MAX_SECONDS}}); 300 default,
16
19
  # tighten per repo (org project set --var gate={"maxSeconds":N}) once measured (#3178)
20
+ # GATE_PUSH_BRANCHES_YAML — YAML list of push branches that trigger the workflow file (rendered by
21
+ # bootstrap from the release track; not usually hand-passed)
22
+ # GATE_FULL_RUN_BRANCH — train branch whose PUSHES run the full gate job (development on full/direct;
23
+ # main on trunk). `main` is ALWAYS included in the job `if:` below so a required-
24
+ # checks ruleset on main cannot be silently skipped by a future bootstrap (#4113).
17
25
  # GATE_BUDGET_SHA is rendered by the CLI from its blessed run-with-budget pin — not an operator knob.
26
+ # (seed touch: keep kilo mirror + BOM digests in lockstep after classifier land.)
18
27
  on:
19
28
  pull_request:
20
29
  push:
@@ -37,7 +46,10 @@ permissions:
37
46
 
38
47
  jobs:
39
48
  gate:
40
- if: ${{ github.event_name != 'push' || github.ref_name == '{{GATE_FULL_RUN_BRANCH}}' || github.ref_type == 'tag' }}
49
+ # #4113: bake `main` into the template permanently. GATE_FULL_RUN_BRANCH selects the train push
50
+ # that runs the full job; main must never become skippable via bootstrap vars alone while the
51
+ # org ruleset still requires `gate` on main.
52
+ if: ${{ github.event_name != 'push' || github.ref_name == '{{GATE_FULL_RUN_BRANCH}}' || github.ref_name == 'main' || github.ref_type == 'tag' }}
41
53
  runs-on: [self-hosted, linux, x64, mmi-live]
42
54
  defaults:
43
55
  run: { working-directory: {{GATE_WORKDIR}} }
@@ -73,8 +85,8 @@ jobs:
73
85
  working-directory: {{GATE_WORKDIR}}
74
86
  # MMI-Hub#3329: the deterministic doc ref-gate — every file:line ref, command name,
75
87
  # relative link, and pin comment in docs/** + README.md + architecture.md must resolve.
76
- # This is the gate that makes the docs-janitor's unattended write surface safe (topology D,
77
- # MMI-Hub epic #3325). Fleet-portable via the released CLI; runs from the repo root.
88
+ # Routing-index + ref integrity only not a living-docs keeper (topology D retired, Hub#4119/#4164).
89
+ # Fleet-portable via the released CLI; runs from the repo root.
78
90
  # MMI-Hub#3406: check the GENERATED index before resolving refs. docs/index.md is produced by
79
91
  # `mmi-cli docs index --write`, and a stale one silently re-hosts child docs' relative links and
80
92
  # backticked paths at the index's own depth — where they no longer resolve. Every finding it
@@ -1,76 +1,55 @@
1
1
  ---
2
2
  name: doctor
3
- description: One hygiene pass — board drift fix, secrets diff, stale-worktree sweep, and plugin-heal.
3
+ description: One hygiene pass — mmi-cli doctor heals and cleans by default.
4
4
  ---
5
5
 
6
6
  # /doctor — one hygiene pass
7
7
 
8
- A single sweep that clears the residue a working repo accumulates: board invariant drift, secret-catalog
9
- gaps, merged/closed worktrees and branches left behind, and a stale plugin/CLI. Run it when a session
10
- opens messy or before a handoff. Each step wraps a real `mmi-cli` command — inspect first, fix on a go.
11
-
12
- ## Step 0 — toolchain integrity
8
+ One command. Run it when a session opens messy or before a handoff.
13
9
 
14
10
  ```bash
15
- mmi-cli doctor --self
11
+ mmi-cli doctor
16
12
  ```
17
13
 
18
- Checks CLI/plugin version parity against the published version, and that the active `gh` token can
19
- actually resolve this repo. It reads npm and GitHub, so it is not offline-safe. It does not check PATH or
20
- hook wiring no such check exists (#3485). On a hard gap:
21
-
22
- ```bash
23
- mmi-cli plugin heal # reinstall + re-enable the MMI plugin; then restart Claude Code / reopen the workspace
24
- ```
14
+ By default this **heals and cleans** (MMI-Hub#3975): CLI/plugin/marketplace env repairs, managed
15
+ `.gitignore`, merged-branch / dead-worktree reap (including deferred IDE-locked removals), light board
16
+ mechanical fixes, docs-index working-tree heal, and related full-lane checks. Secrets stay **out** of
17
+ default doctor — use `mmi-cli secrets diff` when you need a catalog gap check.
25
18
 
26
- ## Step 1 — board drift
19
+ ## Flags
27
20
 
28
- ```bash
29
- mmi-cli board doctor # detect: transfer ghosts, closed-not-Done, assignee/status mismatch, stray priority:* labels
30
- mmi-cli board doctor --fix # apply the automatic fixes once the findings look right
31
- ```
21
+ | Flag | Role |
22
+ |------|------|
23
+ | *(none)* | Heal + clean (default). |
24
+ | `--verbose` | Full checklist + per-row evidence. |
25
+ | `--no-repo-writes` | Env/plugin repairs only — no working-tree mutates (train preflight). |
26
+ | `--self` / `--fast` / `--banner` / `--preflight` | Cheap / read-oriented lanes (see `docs/doctor-contract.md`). |
27
+ | `--apply` | **Deprecated no-op** — kept so older instructions still parse. |
32
28
 
33
- `board doctor` (no `--fix`) exits nonzero when it finds drift and prints each finding. Review, then re-run
34
- with `--fix` to apply. Never hand-move a board item — the fixer does the mechanical writes.
29
+ ## Do not run the old multi-step ritual
35
30
 
36
- ## Step 2 secret-catalog diff (deployable repos)
31
+ Do **not** chain these as a `/doctor` substitute:
37
32
 
38
33
  ```bash
39
- mmi-cli secrets diff --stage dev # required-vs-vault gap + catalog drift; values never shown
40
- ```
41
-
42
- Runs the project-side view: declared-missing / orphan / off-scheme secrets for a stage, before any deploy.
43
- Repeat `--stage rc` / `--stage main` for a repo that promotes. A clean diff exits 0. **Values are never
44
- printed** — this only names keys. Skip for a repo with no runtime-secret contract.
45
-
46
- ## Step 3 — stale worktree + branch sweep
47
-
48
- ```bash
49
- mmi-cli worktree gc # dry-run (default): merged/closed-PR local+remote branches, linked worktrees, stale refs
50
- mmi-cli worktree gc --apply # remove only the listed clean items
51
- mmi-cli worktree gc sweep-deferred # retry any IDE-locked worktree removals queued from a prior land
34
+ mmi-cli doctor --self
35
+ mmi-cli board doctor
36
+ mmi-cli secrets diff
37
+ mmi-cli worktree gc
52
38
  ```
53
39
 
54
- `gc` inspects merged/closed PRs and lists exactly what is safe to delete; `--apply` removes only those. It
55
- never touches a branch with an open PR. Pair with `mmi-cli wave status` to see worktrees, open PRs, and
56
- local stages at a glance before sweeping.
57
-
58
- ## Step 4 — report
59
-
60
- One line per step: toolchain OK/healed, board findings fixed, secret gaps by stage, worktrees/branches
61
- swept. Name anything that needs a human decision (an unowned drift, a secret only the master can grant).
40
+ Plain `mmi-cli doctor` already covers heal + clean. Reach for the individual verbs only when you want
41
+ that surface alone (e.g. a secrets catalog review, or an interactive `board doctor` without the rest).
62
42
 
63
43
  ## Notes
64
44
 
65
- - `/doctor` is the hygiene pass; `/resume` is the lighter read-only session open. Reach for `/doctor` when
66
- the repo is messy, not on every session.
67
- - `secrets diff` and `board doctor` read live state — never cache their output; re-run to confirm a fix.
45
+ - `/doctor` is the hygiene pass; `/resume` is the lighter read-only session open.
46
+ - Prefer one doctor run over hand-editing board items, gitignore blocks, or marketplace pins.
68
47
 
69
48
  ## Retro — one check before you finish
70
49
  Before your final report, answer one question honestly: did **this skill's own instructions** misfire
71
50
  this run — ambiguous wording, a misleading message, or an environment failure it should have warned
72
- about? (Process only — never the user's code or task; e.g. a `gc` dry-run that proposed deleting a live
73
- branch, or a secrets diff that flagged a key that is present.) If yes, file **one** lesson and move on; a
74
- clean run is silent (hard cap: one per run). It lands on the Hub board (deduped) and is fixed only via a
75
- reviewed PR — never edit the skill live; the retro is advisory, so if the call fails, note it and continue:
51
+ about? (Process only — never the user's code or task; e.g. a doctor run that proposed deleting a live
52
+ branch.) If yes, file **one** lesson and move on; a clean run is silent (hard cap: one per run). It
53
+ lands on the Hub board (deduped) and is fixed only via a reviewed PR — never edit the skill live; the
54
+ retro is advisory, so if the call fails, note it and continue:
76
55
  `mmi-cli skill-lesson --skill doctor --title "<what misfired>" --body "<what; evidence; proposed amendment>"`
@@ -53,6 +53,20 @@ Close with one grounding line: gates green (or the one gate to fix), and the sin
53
53
  usually `mmi-cli board claim <n>` for the recommended item, or the readiness fix if a gate is red. Don't
54
54
  claim on the user's behalf; let them take the first item when ready.
55
55
 
56
+ ## Step 2b — structure door (compute-at-read)
57
+
58
+ Before treating `docs/**` as current-state, teach the Hub door (Hub#4133 / #4148):
59
+
60
+ ```bash
61
+ mmi-cli repo-index search <path-or-symbol-or-meaning> # Hub cloud pointers (default)
62
+ mmi-cli repo-index search "where …" --semantic # Titan meaning over embeddings
63
+ mmi-cli repo-index status --cloud # is the estate index live?
64
+ ```
65
+
66
+ Host indexes (Cursor / Kilo) stay local helpers; **Hub `repo-index` is the org SSOT structure door**.
67
+ Living current-state still comes from live verbs (`org schedules`, `board read`, …) — see
68
+ `docs/Architecture/compute-at-read.md`. Do not invent wiki prose from pointer hits.
69
+
56
70
  ## Notes
57
71
 
58
72
  - `/onboard` is the first-session, readiness-first wrapper. Once a repo is known-good, `/resume` is the
@@ -192,61 +192,16 @@ ancestor of `origin/rc` (immune to conflict-resolved ports); a matching `git pat
192
192
  the authorized human has manually verified the content is in the candidate, rerun with
193
193
  `mmi-cli release --apply --ack <sha>[,<sha>…]` — the ack is recorded in the verdict. Never ack to save time.
194
194
 
195
- ## Step 0d — release-time surface freshness (repo-owned, source-only docs gate)
196
-
197
- As early as the probe the released diff (`origin/main..origin/development`, or `..rc`) is already
198
- known refresh the repo's own docs against **exactly what is shipping**. An agent reads the
199
- shipping PRs and quickly scans the surfaces; most releases change nothing they describe, so most
200
- releases do nothing here. It is **model-agnostic** — describe the work, not the model; under Claude,
201
- **Sonnet latest (`claude-sonnet-5`)** is the right tier (never the release model, never Haiku).
202
- Reviewed, repo-owned + release-triggered never a central, scheduled, cross-repo keeper (that stays
203
- retired, #2135).
204
-
205
- **The two in-repo docs (`README.md`, `architecture.md`): in the released commit.**
206
- Run this **at the probe, before Step 1**. First scan both against the shipping diff. **If nothing a
207
- shipped change touches made them drift, skip this docs pass entirely — no PR, no wait** (the common case).
208
-
209
- When a shipped change did make a doc drift, establish **where the drifted text comes from** before editing
210
- it — from the repo's own tooling: a generator script, a "do not edit" header, a generated-region marker.
211
- **If you cannot establish that a region is hand-written, treat it as generated.** Hand-written prose takes
212
- the fast path below; a generated region does not, and never lands by hand.
213
-
214
- **Hand-written prose — the fast docs-only path:**
215
- - Edit the doc to current truth (no change-comments — AGENTS docs rule).
216
- - Land it on `development`: open a PR touching **only** `README.md` /
217
- `architecture.md` and auto-merge it (`mmi-cli pr merge <n> --auto --squash` — raw `gh pr merge` is
218
- denied by the org command ladder, #2347). Because the PR touches only
219
- those two docs, it runs **only the checks its paths trigger** — the repo's gate skips the code/test
220
- jobs a docs change can't affect — so it normally goes green + merges in about a minute, with no
221
- force-push and no protected-branch bypass (CI stays honest). (On the Hub that is the fast `docs` job
222
- while `cli` / `infra` no-op; a single-gate repo short-circuits its one gate the same way.) A
223
- docs-only PR also can't expand the release scope (it touches only those two files).
224
-
225
- **Generated surface — fix the source, and default to the next cycle** (#2916). The Hub's compact README
226
- agent loop and `docs/Architecture/agent-playbook.md` come from the CLI loop definitions via
227
- `scripts/generate-agent-playbook.mjs`; CLI `--help` comes from Commander descriptions. There, the fast path
228
- does not apply:
229
- - **Never hand-edit the generated file.** It is a band-aid the next regen silently overwrites, and it
230
- leaves `--help` — the surface users actually hit — still wrong.
231
- - **Fix the source, not the artifact:** edit the loop in `cli/src/explain-command.ts` or the relevant
232
- `.description()` in `cli/src/index.ts`, then rebuild/regenerate.
233
- - **Do not race the train with it.** That fix touches code + built artifacts, so it runs the **full** gate,
234
- and it would add a **code commit to the very diff Step 1 is about to cut**. This docs pass is freshness, not
235
- a scope hatch. So **default to deferring it**: land the source fix on `development` as an ordinary
236
- CI-gated PR **after** the release, note the deferral in the release report, and let it ship next cycle.
237
- The drift is cosmetic and already shipped; one more cycle costs nothing.
238
- - Only the **human release owner** may pull a generated-surface fix into the current release, and only by
239
- saying so explicitly. An agent never makes that call on its own drift judgment, and never `--auto`-merges
240
- a code-bearing PR at the probe.
241
-
242
- **Bounded, never a hang (fast path):** wait for that docs-only auto-merge up to a short bound (~5 min). If
243
- CI is contended and it has not merged in time, **do not block the train** — proceed with the release as-is.
244
- Leave the auto-merge armed: the doc fix is not lost, it just lands whenever CI clears. Docs freshness
245
- improves the release; it never holds it hostage.
246
-
247
- Then **Step 1** cuts `development → main` from the current HEAD. Because an armed auto-merge can still land
248
- between the bound and the cut, **re-check the PR's state right before Step 1** and report what actually
249
- shipped — never predict it from the bound.
195
+ ## Step 0d — no docs-keeping on the release train (Hub#4164)
196
+
197
+ Scheduled docs-janitor / wiki-keeper / living-docs freshness passes are **retired** (#4117/#4119).
198
+ The release train does **not** open docs-only PRs, wait on README/architecture auto-merges, or
199
+ treat prose refresh as a gate.
200
+
201
+ Current state is compute-at-read + the estate repo-index (`mmi-cli repo-index search`,
202
+ `mmi-cli org project`, board/schedules verbs). Durable WHY stays in `docs/decisions/`.
203
+ If shipping code made a hand-written surface wrong, fix it on `development` as an ordinary PR
204
+ **outside** the train — never as a release Step.
250
205
 
251
206
  ## Step 1 — merge to main (never force)
252
207
 
@@ -450,16 +405,11 @@ correct). Read the model from the registry (`mmi-cli org project get {owner}/{re
450
405
 
451
406
  Name the sanctioned dispatch mechanism you used in the train report.
452
407
 
453
- ## Step 4b — re-sync project info (in-repo docs handled in Step 0d)
408
+ ## Step 4b — re-sync project info (no in-repo docs pass)
454
409
 
455
- The two in-repo docs were already scanned against the shipping diff and, if they drifted, refreshed +
456
- merged in **Step 0d** (fast docs-only path for hand-written prose; generated regions are fixed at
457
- their source and deferred to the next cycle) so the released commit already carries
458
- current `README.md` / `architecture.md` (and, in the hub, `docs/org-readme.md` /
459
- `docs/org-architecture.md`). The `distribution` gate also blocks empty/retired-term descriptions at PR
460
- time. Nothing to author here. `mmi-cli release --apply` now re-syncs the **Project** short description +
461
- thin README from those docs and the registry's current member repos through the command ladder. For a
462
- manual repair or preview use:
410
+ In-repo README/architecture freshness is **not** a train step (Step 0d retired, Hub#4164).
411
+ `mmi-cli release --apply` re-syncs the GitHub **Project** short description + thin README from the
412
+ released commit and the registry member list through the command ladder. For a manual repair or preview use:
463
413
  ```bash
464
414
  mmi-cli org project sync-info --apply # omit --apply for the read-only plan
465
415
  ```
@@ -54,6 +54,20 @@ For the full board partition (yours / claimable / taken) run `/mmi`.
54
54
  Lead with one line: toolchain OK (or the heal to run), the branch + what's in flight, and the one next
55
55
  item with its claim command. Then stop. The user drives — claim, continue, or file when they say so.
56
56
 
57
+ ## Current-state doors (Hub#4120)
58
+
59
+ When answering “what is true now”, **ask the CLI**, not committed markdown inventories or weekly
60
+ janitor prose. Catalog: `docs/Architecture/compute-at-read.md` (in MMI-Hub).
61
+
62
+ | Ask | Verb |
63
+ | --- | --- |
64
+ | Schedules / harbour lanes | `mmi-cli org schedules` / `--json` |
65
+ | Boxes / IPs | `mmi-cli runtime box list` |
66
+ | Registry / projects | `mmi-cli org project list\|get` |
67
+ | Board | `mmi-cli board read` / `mmi-cli next` |
68
+ | Docs index freshness | `mmi-cli docs index --check` |
69
+ | Path / symbol / meaning pointers | `mmi-cli repo-index search <q>` (Hub cloud; `--semantic` optional) |
70
+
57
71
  ## Notes
58
72
 
59
73
  - `/resume` is read-only session orientation. It never claims, moves, or writes.
@@ -60,6 +60,13 @@ worktree, deletes the merged branch (local + origin), and prunes tracking refs.
60
60
  locked is queued and retried by `mmi-cli worktree gc sweep-deferred`. Self-authored merges need an explicit
61
61
  per-session merge grant — ask early if you don't have one.
62
62
 
63
+ **Cwd-safe land (#4140):** `worktree land --apply` (what `pr land` runs) is designed to be invoked from
64
+ inside the worktree you are landing. Before removal it releases the process cwd to the primary checkout
65
+ (#1444/#2747) — on Windows, leaving cwd inside the target tree makes `rmdir` fail with `EBUSY` and leaks
66
+ branch refs. You do not need to `cd` out first; if removal still fails (IDE lock, antivirus), the deferred
67
+ sweep retries from a safe cwd. Prefer the primary checkout cwd only when you are running `worktree land`
68
+ manually outside `pr land`.
69
+
63
70
  ## Step 5 — record + next
64
71
 
65
72
  Record durable decisions on the issue or PR, then check the board again: