@mutmutco/opencode-mmi 2.52.1 → 2.53.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/opencode-mmi",
3
- "version": "2.52.1",
3
+ "version": "2.53.0",
4
4
  "description": "MMI Future OpenCode adapter — registers mmi, secrets, stage, rcand, release, hotfix, bootstrap, grind, build, handoff, coop, and browser-automation skills, workflow commands, and deterministic guardrail hooks.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,9 @@ Flags:
49
49
  in parallel), never loop one-by-one. Resolve `<login>` yourself — the session banner's
50
50
  `current human:` line, else `mmi-cli whoami` — and echo who you're claiming for; ask only
51
51
  when whoami returns `unknown`. Branch from the latest `origin/development` in a worktree
52
- (`../mmi-worktrees/<branch>`). Never push `rc`/`main`.
52
+ (`../mmi-worktrees/<branch>`), unless the issue body explicitly mandates a dependency/WIP branch;
53
+ that path is a stacked PR that `--auto` may open + CI-verify but cannot auto-land (#2059). Never
54
+ push `rc`/`main`.
53
55
  - **Verifier ≠ builder.** Verifier (and hard lenses) must use a **different model** from builder
54
56
  whenever the host exposes two models. Under `--ultra`, the third model must also differ from
55
57
  builder; synthesizer is never builder.
@@ -310,6 +312,10 @@ Auto-detection rules are also encoded in `cli/src/grind-policy.ts` (test fixture
310
312
  PRs merge). Before each Phase 2 round, `git fetch origin development` and rebase the grind branch
311
313
  onto `origin/development` (or merge when rebase is unsafe) so the pinned diff reflects **only this
312
314
  grind's commits** — never reverse-deltas from merged siblings that would produce false blockers.
315
+ Once a grind branch is already pushed to a PR, do **not** refresh it with `--force` or
316
+ `--force-with-lease`: prefer `mmi-cli pr land`'s own base-freshness handling, or merge
317
+ `origin/development` into the branch and push. If a true rebase is unavoidable, stop with a `[WIP]`
318
+ PR/report instead of force-pushing unless the user's current message explicitly authorizes it (#2058).
313
319
 
314
320
  **Mechanism:** spawn parallel lenses → each returns strict JSON → Phase 2b synthesizer produces
315
321
  `PanelReport` → triage uses **`PanelReport.blockers` only**. Not vote, not debate.
@@ -324,7 +330,10 @@ round.** The orchestrator MUST hand each lens the *verbatim* diff — never a su
324
330
  rendering. Form (a) inline verbatim `git diff` only when verifying from the **same checkout** that
325
331
  holds the change. **Grind default `isolation=worktree`:** form (b) only — write
326
332
  `git -C <worktree> diff …` to `tmp/grind-verify-<round>.patch` and pass that path; never rely on
327
- lens CWD.
333
+ lens CWD. The pinned diff **MUST include untracked new files** — bare `git diff` omits them, so a
334
+ build that adds new modules/tests is invisible to lenses and can draw a false `cannot-verify`.
335
+ Stage first (`git -C <worktree> add -A && git -C <worktree> diff --cached -- ':!cli/dist' > tmp/grind-verify-<round>.patch`)
336
+ or `git -C <worktree> add -N <new files>` before the diff (#2057).
328
337
 
329
338
  **Lens-prompt clauses → `references/verify.md`.** Every lens prompt MUST carry: the **verbatim-includes-test-files** rule, the **abstention** rule (`cannot-verify`, never a false "absent/missing" blocker), the **diff-shape** clause (a referenced-but-undefined symbol is pre-existing — never flag it), and the **worktree-isolation** clause (patch-only, deny repo FS, stale-checkout warning). The exact wording lives in `references/verify.md` — load it before spawning lenses.
330
339
 
@@ -71,7 +71,9 @@ no wait. File/claim the item(s), write the criteria, push to North Star, then go
71
71
  **Start (`--auto` only):** `mmi-cli access role <owner/repo> --json` — abort the run if `train: false`
72
72
  before building (fail fast; do not waste a full grind on a PR you cannot land).
73
73
 
74
- 0. **Base freshness (#1906):** doctrine § worktree hygiene per worktree.
74
+ 0. **Base freshness (#1906):** doctrine § worktree hygiene per worktree. If the PR branch is already
75
+ pushed, refresh by merge (non-rewriting) or let `pr land` handle base freshness — never force-push a
76
+ pushed PR branch. A rebase that would require force-push = stop and report `[WIP]`, do not force (#2058).
75
77
  1. Open the PR (squash; normal title — `[WIP]` only on a cap/stuck hand-off). **Pass `--head` to
76
78
  `pr create` explicitly** — `mmi-cli pr create --base development --head <grind-branch> …`; the
77
79
  default `--head` is the current branch, which is `development` when Phase 4 runs from the main
@@ -79,6 +81,10 @@ before building (fail fast; do not waste a full grind on a PR you cannot land).
79
81
  2. **Land** — `(Recommended)` one call: `mmi-cli pr land <n> --json` (train probe → `ci-policy` →
80
82
  `checks-wait` → `merge --auto` → poll enqueued auto-merge → branch/worktree cleanup → return the
81
83
  checkout to an up-to-date `development`). Base must be `development`. Never land promotion PRs.
84
+ **Issue-mandated non-`development` base (#2059):** when the issue body requires a specific
85
+ dependency/WIP branch, `--auto` may open and CI-verify a stacked PR against that base, but must not
86
+ auto-land — `pr land` correctly refuses non-`development` bases. Stop and report that auto-merge is
87
+ blocked until the stack base reaches `development`.
82
88
  Cleanup is **automatic at the branch/PR boundary** — a successful land/merge removes that grind
83
89
  worktree + local branch and fast-forwards the checkout onto `development` (when its tree is clean);
84
90
  never hand-run `git checkout development` / `git worktree remove` / `git push origin --delete` afterward
@@ -75,9 +75,12 @@ full re-panel) before Phase 3 triage — at most once per round.
75
75
  differently), stop and escalate to the human per **## Gates** — do not guess. If one lens is
76
76
  clearly wrong against consensus + diff, note it in the saga and triage real blockers only.
77
77
 
78
- **Absence-claims (#1621, #1895).** Drop "missing/absent/unimplemented/not fixed" blockers
78
+ **Absence-claims (#1621, #1895, #2057).** Drop "missing/absent/unimplemented/not fixed" blockers
79
79
  contradicted by the pinned patch or green builder tests. Drop blockers when lens logs show repo
80
- Read/Grep despite isolation — re-run Phase 2 patch-only instead of fixing phantom gaps.
80
+ Read/Grep despite isolation — re-run Phase 2 patch-only instead of fixing phantom gaps. A
81
+ `cannot-verify` / "absent" verdict on a whole new module or test file is usually a patch-pin gap, not
82
+ a defect: bare `git diff` excludes untracked files. Confirm the pin staged new files or used `add -N`,
83
+ then re-pin and re-run before triaging.
81
84
 
82
85
  (`--auto`) No human escalation — pick the interpretation that satisfies the written criteria; if
83
86
  still ambiguous, fail the round and fix the criteria in the issue body before continuing.
@@ -12,13 +12,13 @@ description: Manage this repo's secrets — list/get/set/edit/rm/use the PROJECT
12
12
  Secrets in the org split by **blast radius + who manages them** (not by storage — both tiers are SSM
13
13
  SecureString + KMS, and **a value is never echoed to chat or logs**):
14
14
 
15
- - **PROJECT tier** — `/mmi-future/<slug>/dev/*`. Lower-blast dev/throwaway working secrets (a scraper key,
16
- a third-party API key, a throwaway SaaS account). The repo's **project-admin self-serves** these via
17
- `/secrets`, on their **GitHub role alone** no AWS, no waiting on the master.
18
- - **ORG tier** — everything else under the slug (`rc/*`, `main/*` prod secrets) plus shared/infra
19
- (`/mmi-future/{shared,cloudflare,docs,mmi-hub}/*`). **Crown jewels, master-gated.** A project-admin
20
- reaches an org-tier secret only via a master **grant**; the master is unrestricted (and **is** a
21
- project-admin of every repo — master ⊇ project-admin).
15
+ - **YOUR REPO** — `/mmi-future/<slug>/{dev,rc,main}/*` for a repo you are project-admin of. You
16
+ **self-serve your own repo's full tree** — dev, rc, AND main prod secrets via `/secrets`, on your
17
+ **GitHub role alone**, no AWS, no waiting on the master (#2032).
18
+ - **ORG-INFRA** — the shared/infra namespaces (`/mmi-future/{shared,cloudflare,docs,mmi-hub}/*`), at
19
+ **every** tier (their `dev/` holds Hetzner/AWS/CF tokens + Hub tooling). **Crown jewels, master-only.**
20
+ A project-admin reaches one of these only via a master **grant**; the master is unrestricted (master
21
+ project-admin).
22
22
 
23
23
  A bare `<KEY>` defaults into the **project tier** (`dev/`). To touch the org tier you name the env
24
24
  explicitly: `main/GOOGLE_CLIENT_SECRET`, `rc/DB_URL`.
@@ -80,17 +80,18 @@ first, then write every canonical vault tier that still needs that key. For keys
80
80
  <KEY>` repeats the same probe later without printing the value. If the verifier fails, treat the rotation as
81
81
  incomplete even if the vault write itself succeeded.
82
82
 
83
- ## Step 2 — org-tier elevation (master-only)
83
+ ## Step 2 — org-infra elevation (master-only)
84
84
 
85
- A project-admin who needs a specific **org-tier** secret asks the master. The master grants a **scoped,
86
- auditable** standing access to that one key (or revokes it). These verbs are **master-only** the backend
87
- 403s anyone else.
85
+ Your own repo's full tree (dev/rc/main) is already self-serve (#2032). The **org-infra** namespaces
86
+ (`shared`/`cloudflare`/`docs`/`mmi-hub`, every tier) stay master-only. A project-admin who needs one of
87
+ those keys asks the master, who grants a **scoped, auditable** standing access to that one key (or revokes
88
+ it). These verbs are **master-only** — the backend 403s anyone else.
88
89
 
89
90
  ```bash
90
- # MASTER: let @oguz-mut manage one org-tier secret in Pulse
91
- mmi-cli secrets grant mutmutco/Pulse oguz-mut main/GOOGLE_CLIENT_SECRET
91
+ # MASTER: let @oguz-mut manage one org-infra (Hub-tier) secret
92
+ mmi-cli secrets grant mutmutco/MMI-Hub oguz-mut main/SOME_SHARED_KEY
92
93
  # MASTER: withdraw it
93
- mmi-cli secrets revoke mutmutco/Pulse oguz-mut main/GOOGLE_CLIENT_SECRET
94
+ mmi-cli secrets revoke mutmutco/MMI-Hub oguz-mut main/SOME_SHARED_KEY
94
95
  ```
95
96
 
96
97
  The master can also just operate the org-tier op directly while guiding (master ⊇ project-admin). Org-tier