@mindrian_os/cli 2.0.0-beta.13 → 2.0.0-beta.17

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 (2) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,201 @@
1
+ ## [2.0.0-beta.17] - 2026-09-04
2
+
3
+ ### Added
4
+ - `scripts/check-tool-honesty.cjs`: a standing, advisory MCP tool-honesty gate that
5
+ statically scans every `server.tool()` registration and command branch across
6
+ `lib/mcp/tool-router.cjs`, `lib/mcp/tools/*.cjs` and `lib/mcp/contract-version.cjs`
7
+ for a description-vs-behavior mismatch (a tool description claiming it writes/files/
8
+ persists something its handler never actually reaches a write primitive for) - the
9
+ broader sweep `.planning/debug/meeting-file-meeting-false-success.md`'s Non-Code
10
+ Follow-ups section named as unscoped work once the `meeting` tool itself was fixed
11
+ (quick 260903-kwl). Wired advisory (`--check` WARNs and exits 0, `--strict` restores
12
+ hard-fail, `--report` prints the full per-branch table) at pre-commit (path-scoped to
13
+ the MCP tool surface), `doctor --acceptance` (new `tool-honesty` coverage-gate entry),
14
+ and `release.sh` (outside the SHAPE-GATE sentinel pair) - the same advisory-on-
15
+ introduction posture `check-shape-declaration.cjs` established at Phase 210. First live
16
+ run against the current tree (36 tools, 130 command branches scanned): 1 HIGH RISK
17
+ finding, 8 MEDIUM, 1 UNKNOWN, 0 fixed by this change. Every finding is untriaged;
18
+ human review is the named next step before any finding is fixed or the gate is
19
+ hardened to `--strict`.
20
+
21
+ ### Fixed
22
+ - The `meeting` MCP tool's `file-meeting` command returned a completion-shaped response
23
+ ("## File Meeting", room state, a filing-protocol section, the echoed transcript, a
24
+ "Meeting filed" footer) while writing nothing - no `writeClaimNode`, no `artifact_file`
25
+ call, no room.db mutation anywhere in the handler. Worse, the one thing the branch did
26
+ try to do (hand back `references/meeting/filing-protocol.md`) also returned nothing
27
+ usable, because that reference file did not exist on disk and the branch silently
28
+ dropped the section on a missed read. Fixed: an honest tool description naming
29
+ `artifact_file` as the real write path and `/mos:file-meeting` as the fuller CLI path;
30
+ a leading, machine-checkable `**filed: false**` marker on all three meeting branches
31
+ (`file-meeting`, `pipeline`, `speakers`); an explicit missing-reference signal instead
32
+ of silent omission; and a real `references/meeting/filing-protocol.md` carrying the
33
+ Phase 150.8 Claimify four-pass protocol in surface-neutral form, pinned by
34
+ `tests/test-kwl-meeting-mcp-honesty.cjs` (registered in `tests/run-all-266.sh`).
35
+ What did NOT change: the MCP surface still does not call `writeClaimNode` itself, and
36
+ the Tri-Polar parity gap this defect surfaced - the CLI (`/mos:file-meeting`) has had
37
+ real DIKW-typed meeting filing since 2026-06-12, Desktop and Cowork never have - remains
38
+ open, tracked in `.planning/debug/meeting-file-meeting-false-success.md`.
39
+ - Bare `scripts/<name>` invocations (`bash scripts/foo`, `node scripts/foo.cjs`) are now
40
+ anchored with `CLAUDE_PLUGIN_ROOT` (or the fail-closed `MINDRIAN_OS_ROOT` form for
41
+ hand-authored skills), so a Bash tool invocation resolves against the plugin install
42
+ directory instead of the user's own session cwd. The real security finding, not just a
43
+ reliability improvement: a bare invocation previously executed whatever file happened to
44
+ exist at that relative path inside the user's own Data Room -- a local code-execution
45
+ shadowing vector, not only a portability bug, since a same-named file at `scripts/<name>`
46
+ in a user's room would silently substitute for the plugin's own script. Phase 274 (the
47
+ sibling of Phase 271's `references/` citation fix, and the fourth pass at this disease
48
+ class in this repo): 30 command-surface sites, 3 hand-authored skill sites, and 1 agent
49
+ site anchored; a fresh full-tree scan confirms zero unanchored sites remain (`sites=156
50
+ anchored=154 allowlisted=2 violations=0`, script tier). `scripts/verify-release` gains
51
+ gate 10f, cloning gate 10c's exact fail-closed shape, so this class cannot silently
52
+ return in a future command.
53
+ - **MCP tool honesty, close of the triage phase (Phase 276).** The `check-tool-honesty.cjs`
54
+ gate's own `switch (command)` branch splitter was dead code (a masked-text regex
55
+ swallowed every case label), so `room_state`/`room_content`/`room_graph` were graded
56
+ against their whole handler body instead of per command; fixing the one-line bug took the
57
+ live sweep from 10 findings to a corrected 24 (5 HIGH RISK, 18 MEDIUM, 1 UNKNOWN) with
58
+ discovery totals unchanged (36 tools / 130 branches both before and after). Every one of
59
+ those 24 now carries a written disposition in a checked-in ledger a test diffs against the
60
+ live scan in both directions; global HIGH RISK is 0. Corrected the `orchestration`,
61
+ `export`, `room_content`, `gate_render` and `graph_write` descriptions so none claims a
62
+ write, a render, or a persisted mint its handler cannot perform, and removed every false
63
+ completion assertion ("Snapshot generated", "Dashboard generated", "Export complete",
64
+ "Scout intelligence gathered"). Propagated the Node >=22.16.0 busy-timeout option to every
65
+ room.db (and sibling-db) opener that can genuinely contend (proven under a held write lock:
66
+ elapsed time moved from ~0.3ms instant failure to a genuine ~5s bounded wait), and
67
+ `spine-events.cjs` now reports typed `room_db_busy`/`room_db_broken` reasons instead of
68
+ claiming there is no database about one it just proved exists. Shipped a new `claim_write`
69
+ MCP tool (the first Desktop/Cowork-reachable real DIKW claim write) and wired the `meeting`
70
+ tool's `file-meeting` command through the governed `gate_render`/`gate_answer` confirmation
71
+ gate, with promotion to `confirmed` proven against `room.db` independently of the tool's own
72
+ response text. Full record: `.planning/phases/276-mcp-tool-honesty-triage-and-close-the-
73
+ check-tool-honesty-cjs/`.
74
+ - **The phase's one true silent failure: a Theo readiness miss vanishing with nothing written
75
+ anywhere (Phase 339, plan 339-05, D-03 consumer 3).** `lib/core/enrichment-queue.cjs`'s
76
+ `captureReadinessMiss` gains two additive capture arms recognizing Theo's own
77
+ `orchestration_readiness` payload shapes, a scored RESOLVED miss and a REFUSAL miss, each
78
+ guarded so an incumbent-shaped payload cannot reach either new branch;
79
+ `tests/test-339-enrichment-theo-shapes.cjs` went from 3 of 7 fixtures green to 7 of 7.
80
+ Operational expectation for the soak window, named so nobody reads it as a leak: post-flip
81
+ nearly every `orchestration_readiness` call will capture, because Theo's own header reports
82
+ 148 of 149 Frameworks with zero technique linkage, the queue is bounded (`SOFT_CAP`/
83
+ `HARD_CAP`) and deduped by framework name, and that is canon thinness correctly measured,
84
+ not a defect. What did NOT change: the incumbent's own two capture shapes (`grounded`,
85
+ `readiness_score`) are untouched, proven by `tests/test-249-enrichment-queue.cjs` staying
86
+ 13 of 13 green.
87
+
88
+ ### Changed
89
+ - **RS pipeline spine-wiring + expert-graph reconciliation (Phase 296, SEED-030).** `lib/core/rs_cache.py`'s remote `rs-external` Pinecone index/namespace path (one namespace per topic, 1024-dim `multilingual-e5-large` integrated embeddings) is retired and replaced by a per-room local sidecar cache at `<room>/research/<topic-slug>/.rs-signal-cache/{vectors.jsonl,manifest.json}`, embedded through the one shipped local encoder (`embedding-spine.cjs::embedTexts`) via the new `scripts/rs-vector-bridge.cjs` JSON-stdio bridge (the D-02 answer). `scripts/rs-engine.py` Mode B/C, `lib/core/rs_hybrid.py`, `lib/core/rs-pinecone-bridge.cjs` and `lib/core/rs-differential-scorer.cjs` all thread an explicit room scope end to end.
90
+ - **SEED-029 F8 consequence:** the signal corpus is now per room, so a topic cached in one room is never served into another. This is a real Cowork behavior change, named rather than buried: two rooms working the same topic now each fetch and embed once, independently, rather than sharing one cache entry -- a real duplicated-work cost paid to close a cross-room data-bleed bug.
91
+ - **Dimensional consequence:** the external/hybrid corpus now lives in the same 384-dimensional local encoder space as every other vector in the room, so the 384-vs-1024-dim mixed-space cosine hazard documented in `scripts/rs-engine.py` and `lib/core/rs-engine.cjs` is removed by construction rather than guarded at runtime (`tests/296-dim-invariant.sh` now asserts, no longer SKIPs).
92
+ - **`rs-experts` degrade split:** the old Tier-0 message conflated three distinct causes (no transport ships / transport unreachable / topic genuinely has zero experts) into one hand-rolled string, with the third case -- a correct answer -- mis-dressed as a fault. Now routes through the already-shipped `lib/core/refusal-messaging.cjs` (`REFUSAL_KINDS.unreachable`), producing three pairwise-distinguishable outcomes; a genuinely empty expert list renders as a success, not a refusal.
93
+ - **Deliberately NOT done, and why:** `PINECONE_API_KEY` and the `pinecone` package stay (D-06) -- still load-bearing for `scripts/compute-hsi.py` Tier 2 and `lib/core/pinecone-inference.cjs` (Phase 272, out of scope here); `scripts/auto-explore-fire.cjs`'s direct `rs-engine.py --mode hybrid` spawn was not moved onto the `rs-backend-dispatch.cjs` chokepoint, only named in source and fenced by an argv-contract test (Phase 272-10 remains its own open item); `scripts/rs-engine.py` and `lib/core/rs_corpus.py` stay Python (D-04, Phase 283 is the eventual home for eliminating that runtime).
94
+ - **Three corrected premises**, recorded so the record is not lost: `embedding-spine.cjs` never wrote to `room.db` (F-1, `vector-store.cjs` owns persistence); RS internal and cross-room modes were already Pinecone-free before this phase (F-3); `rs-experts` has had no remote Brain-Cypher coupling since 2026-05-22 (F-6) -- the seed's original Option A/B Aura framing did not apply.
95
+ - **Phase 228** is this same seed's orphaned earlier registration in the closed v1.15.0 milestone (directory holds only a `.gitkeep`, no CONTEXT/RESEARCH/PLAN/SUMMARY ever landed); Phase 296 is its live successor in v2.1.0.
96
+ - `tests/296-pinecone-residue.sh` is the two-sided boundary gate for this change: it asserts PRESENCE of the surfaces D-06 kept (`requirements-hsi.txt`'s `pinecone` declaration, `compute-hsi.py`'s `PINECONE_API_KEY` read, `pinecone-inference.cjs`'s `api.pinecone.io` egress) and ABSENCE of the retired surface, since an over-eager cleanup silently breaking `compute-hsi.py` Tier 2 was judged the likelier failure mode here, not a missed removal.
97
+ - **Usher-division doctrine corrected (navigator-directed, 2026-08-28).** `skills/larry-personality/SKILL.md`'s Hierarchical Navigator section previously divided authority by step ownership: the tool owned Usher steps 1-2, the human owned steps 3-4, and Larry "NEVER crosses into step 3." Product evidence falsified that rule -- in December 2025 Mindrian produced a non-obvious cross-framework synthesis (how McKinsey's Seven Steps, Usher's own cumulative-synthesis model, and Abbie's three pathways relate) that the navigator had not already seen, which the old text would have forbidden it from ever producing. The division is now per-step and shared at generation: step 1 either party may surface an incomplete pattern; step 2 is Mindrian's strongest lane; step 3 either the human or Mindrian may generate a candidate synthesis; **step 4 the navigator retains final authority**, with Mindrian helping challenge, test and refine. Human-in-Command is preserved and made more explicit, not weakened -- only the flat step-3 prohibition changed. The navigator's framing: "Insight generation is not insight authority." New pull-quote replaces the old Aronhime line: "Mindrian may propose the leap. The navigator decides whether the leap is real." `tests/test-posture-ids-drift.cjs` re-pinned to the new quote in the same commit; its exactly-three posture-id assertion (`push_forward` / `hold` / `pull_back`) and the "restraint is the product working correctly" pin are byte-untouched, since this correction concerns the step-3 authority split and not the posture-dial mechanism. The Phase 141 CHANGELOG entry that records the original doctrine is deliberately left as-is; history is not retconned.
98
+ - **The Brain problem-type alias table is now origin-selected (Phase 339, plan 339-04,
99
+ FLIP-02, D-03 consumer 1).** `lib/core/brain-client.cjs`'s single
100
+ `BRAIN_PROBLEM_TYPE_ALIASES` table is replaced by two frozen tables,
101
+ `BRAIN_PROBLEM_TYPE_ALIASES_INCUMBENT` and `BRAIN_PROBLEM_TYPE_ALIASES_THEO`, selected by
102
+ a new `_brainProblemTypeAliases()` function reading the resolved origin against a new
103
+ exported `THEO_ORIGINS` set, so a future `MINDRIAN_BRAIN_URL` change moves vocabulary and
104
+ URL together instead of the two drifting apart. What did NOT change: today's wire traffic
105
+ is byte-identical, because the incumbent origin still selects the incumbent table
106
+ (`tests/test-254-normalize-roundtrip-probe.cjs` Arms 4-5 green).
107
+ - **The `brain_schema` memo is now keyed by origin, as defense in depth (Phase 339, plan
108
+ 339-04, FLIP-05, D-13 as corrected).** The original D-13 ask was a flush mechanism;
109
+ research corrected the premise, recorded here plainly: no flush exists to perform, because
110
+ `BRAIN_URL` is a module-scope const resolved once at require time and the memo is
111
+ process-local, so no running process can ever observe an origin change during its own
112
+ lifetime. The origin-keyed guard ships anyway, becoming load-bearing the day anything
113
+ makes the origin mutable per process. What did NOT change: the 30-minute cache TTL and
114
+ the existing sentinel guard are untouched; `tests/test-339-schema-memo-origin-keyed.cjs`
115
+ (all 7 arms) is green.
116
+ - **A fourth silent-degrade consumer, now disclosed rather than shipped unnamed (Phase 339,
117
+ plan 339-05, D-03b).** `lib/mcp/brain-router.cjs`'s Tier-3 `brainRoute()` previously fell
118
+ back to the Tier-2 local heuristic with no trace whenever a Brain response arrived without
119
+ a usable `next_gate`. `recommend()` now attaches an additive `brain_router_note:
120
+ 'answered_no_next_gate'` field when that happens, carried through a module-scope variable
121
+ that never changes `brainRoute()`'s own return contract. What did NOT change: an
122
+ incumbent-shaped payload with `next_gate` present produces a byte-identical return object,
123
+ with no new field.
124
+ - **The update path is now named in the `unreachable` and `no_key` refusal copy, from a
125
+ single frozen source (Phase 339, plan 339-06, FLIP-04, D-08).** `lib/core/update-path.cjs`
126
+ is the one place the two-command update path (`/plugin marketplace update`, then
127
+ `claude plugin update mos@mindrian-marketplace`) is spelled out; both refusal shapes in
128
+ `lib/core/refusal-messaging.cjs` now name it, and `unreachable`'s old bare-retry promise is
129
+ replaced with copy that does not promise what a suspended origin cannot deliver. The
130
+ honest limit, carried verbatim from this plan's own code comment: "This copy ships in
131
+ bytes. An install that has not updated prints the OLD string, because a main commit is not
132
+ live until released AND picked up. This change is the durable fix for the next origin move
133
+ and for honesty; the levers that reach today's stale population are the soak window and
134
+ the tester note."
135
+ - **The origin literal sweep (Phase 339, plan 339-07, FLIP-01, D-12).**
136
+ `scripts/probe-brain-contract.cjs` and `scripts/build-brain-census.cjs`, the two remaining
137
+ runtime sites that declared their own Brain origin literal, now resolve it through
138
+ `getBrainUrl()` like every other call site; `tests/test-339-origin-single-source.cjs` is
139
+ fully green (0 violations, was 6). The generated census artifacts
140
+ (`data/brain-census.generated.json`, `docs/BRAIN-GRAPH-CENSUS.generated.md`) are left
141
+ unchanged, for three recorded reasons: the generator carries no `--check` release gate by
142
+ design, because a release gate must never depend on live network; Lane B requires an
143
+ operator-supplied admin key and Theo has none, so `brain_write` refuses unconditionally;
144
+ and re-running Lane A against Theo today would silently discard the census record the
145
+ 2026-08 phases were measured against, replacing a census of the incumbent's 29,200-node
146
+ graph with one of Theo's own (measured live at 1,253 nodes). Re-census against Theo is
147
+ registered as a deferred item, not addressed by any plan in this phase.
148
+ - **Desktop and Cowork connector docs now point at Theo (Phase 339, plan 339-08, FLIP-06,
149
+ D-09).** Six hand-authored sources and their generated mirrors now name
150
+ `https://theo-mcp.onrender.com/mcp`, WITH the `/mcp` path, as the connector URL, under the
151
+ unchanged connector key `mindrian-brain`, with the `Authorization` header dropped, because
152
+ Theo returns byte-identical payloads for a real key, a garbage key, and no header at all.
153
+ What did NOT change: `BRAIN_TOOL_MATCHER` and `hooks/hooks.json` were not touched.
154
+ - **The reciprocal cross-repo record and the 269-05 readiness-gate rewrite (Phase 339, plan
155
+ 339-09, FLIP-07, FLIP-08, D-10, D-14).** `docs/339-NOTE-theo-desktop-connector-key.md` now
156
+ exists at the path Theo's own shipped README already cites, naming `mindrian-brain` as the
157
+ sole prescribed connector key; a third alternation token for `BRAIN_TOOL_MATCHER` was
158
+ deliberately not added. Phase 269-05's Task 1 checklist, which read PASS from facts that
159
+ were never in question, is rewritten to three legs sourced from live, dated Theo records;
160
+ the three retired items are kept in place with a dated reason rather than deleted.
161
+
162
+ **The flip-day content fact, verbatim from Session T (D-06a):** `/mos:leadership` and
163
+ due-diligence consults answer thinner through Theo until the 30 names are ingested (Theo
164
+ holds the `/mos:leadership` command node with zero framework links); this is an
165
+ honest-empty coverage block, not an error. The 30 uncovered names bind Theo's own
166
+ decommission task, NOT this flip, per the coverage ruling. The named-Frameworks ratio is
167
+ RETIRED as a coverage measure: coverage is a set question, `Covered: 228 of 258, 88.4%`,
168
+ `Uncovered: 30 of 258`.
169
+
170
+ **What this release does NOT reach.** Two populations are unreachable by any release code
171
+ can touch. Every install that has not run the two-command update prints the OLD refusal
172
+ copy, because a main commit is not live until released AND picked up. Every hand-registered
173
+ Claude Desktop or Cowork connector lives in a config file that is not in any git repo.
174
+ Neither is reachable by code; the soak window and the tester note (`docs/testers/outbox/
175
+ 2026-09-03-theo-cutover.md`) are the only levers that reach them.
176
+
177
+ Also worth naming so nobody compresses it: decommission of the incumbent Brain waits for the
178
+ soak window; the incumbent is SUSPENDED and never deleted; the two Render services are
179
+ stopped compute-before-data (`pws-brain-mcp` then `pws-brain-db`); and the per-install
180
+ `MINDRIAN_BRAIN_URL` rollback lever is valid ONLY while the incumbent still runs.
181
+
182
+ ## [2.0.0-beta.15] - 2026-08-28
183
+
184
+ ### Added
185
+ - `scripts/verify-release` gains gate 10e (Phase 267.3, close-out): the whole-tree
186
+ `commands/*.md` `interactive_first_reward` audit (`node
187
+ scripts/check-reward-before-investment.cjs`, the CLI's full-audit default mode, no flag) is
188
+ now a fail-closed release gate, sited alongside gate 10d's registry audit. Proven against a
189
+ stripped-fixture A/B test before being wired (a `commands/` copy with one declaration
190
+ stripped exits 1, the real tree exits 0), matching the Phase 271-05 gate-proof discipline.
191
+ This closes the debt-ratchet gap `DEFERRED-271-D1` documented: a `--staged`-scoped commit
192
+ gate cannot measure a repo-wide declaration debt, which is how 67 of 113 commands went
193
+ undeclared for three months invisibly. The `--staged` commit gate itself is unchanged.
194
+ 67 commands backfilled with a ruled `interactive_first_reward` declaration across this
195
+ phase (17 blocking Phase 271, plus 25 + 25 in the two backfill waves), and the
196
+ `data/first-reward-surfaces.json` registry (introduced earlier this phase) now declares
197
+ the first reward for 4 non-frontmatter surfaces inside `scripts/session-start`.
198
+
1
199
  ## [2.0.0-beta.13] - 2026-08-28
2
200
 
3
201
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindrian_os/cli",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.17",
4
4
  "description": "Install MindrianOS into Claude Code with one command -- `npx @mindrian_os/cli`. Ships the MindrianOS plugin (Larry + PWS methodology + Data Room) plus a setup/diagnostics CLI (install/doctor/update).",
5
5
  "scripts": {
6
6
  "mcp": "node bin/mindrian-mcp-server.cjs",