@mindrian_os/install 1.13.0-beta.17 → 1.13.0-beta.21

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 (199) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.mcp.json +6 -1
  3. package/CHANGELOG.md +31 -0
  4. package/README.md +51 -56
  5. package/bin/mindrian-brain-mcp-client.cjs +152 -0
  6. package/commands/act.md +1 -0
  7. package/commands/admin.md +1 -0
  8. package/commands/analyze-needs.md +2 -0
  9. package/commands/analyze-systems.md +2 -0
  10. package/commands/analyze-timing.md +2 -0
  11. package/commands/auto-explore.md +2 -0
  12. package/commands/beautiful-question.md +2 -0
  13. package/commands/brain-derive.md +2 -0
  14. package/commands/build-knowledge.md +2 -0
  15. package/commands/build-thesis.md +2 -0
  16. package/commands/causal.md +2 -0
  17. package/commands/challenge-assumptions.md +2 -0
  18. package/commands/compare-ventures.md +2 -0
  19. package/commands/dashboard.md +2 -1
  20. package/commands/deep-grade.md +2 -0
  21. package/commands/diagnose.md +21 -1
  22. package/commands/diagnostics.md +14 -3
  23. package/commands/doctor.md +6 -2
  24. package/commands/dogfood-flush.md +92 -0
  25. package/commands/dominant-designs.md +2 -0
  26. package/commands/explain-decision.md +2 -0
  27. package/commands/explore-domains.md +2 -0
  28. package/commands/explore-futures.md +2 -0
  29. package/commands/explore-trends.md +2 -0
  30. package/commands/export.md +1 -0
  31. package/commands/feynman-timeline-refresh.md +2 -0
  32. package/commands/file-meeting.md +2 -0
  33. package/commands/find-analogies.md +1 -0
  34. package/commands/find-bottlenecks.md +2 -0
  35. package/commands/find-connections.md +2 -0
  36. package/commands/funding.md +1 -0
  37. package/commands/grade.md +2 -0
  38. package/commands/graph.md +1 -0
  39. package/commands/hat-briefing.md +1 -0
  40. package/commands/heal.md +22 -170
  41. package/commands/help.md +54 -334
  42. package/commands/hmi-status.md +23 -144
  43. package/commands/jtbd.md +1 -0
  44. package/commands/leadership.md +2 -0
  45. package/commands/lean-canvas.md +2 -0
  46. package/commands/macro-trends.md +2 -0
  47. package/commands/map-unknowns.md +2 -0
  48. package/commands/memory.md +1 -0
  49. package/commands/models.md +1 -0
  50. package/commands/mos-reason.md +2 -0
  51. package/commands/mos.md +139 -0
  52. package/commands/mullins.md +2 -0
  53. package/commands/mva-brief.md +2 -0
  54. package/commands/mva-option.md +2 -0
  55. package/commands/new-project.md +2 -0
  56. package/commands/onboard.md +20 -7
  57. package/commands/operator.md +1 -0
  58. package/commands/opportunities.md +1 -0
  59. package/commands/organize.md +22 -469
  60. package/commands/persona.md +1 -0
  61. package/commands/pipeline.md +2 -0
  62. package/commands/present.md +1 -0
  63. package/commands/publish.md +2 -0
  64. package/commands/query.md +24 -102
  65. package/commands/radar.md +2 -0
  66. package/commands/reanalyze.md +1 -0
  67. package/commands/research.md +2 -0
  68. package/commands/room.md +2 -0
  69. package/commands/rooms.md +1 -0
  70. package/commands/root-cause.md +2 -0
  71. package/commands/rs-experts.md +1 -0
  72. package/commands/rs-explain.md +1 -0
  73. package/commands/rs-fetch.md +1 -0
  74. package/commands/rs-thesis.md +1 -0
  75. package/commands/scenario-plan.md +2 -0
  76. package/commands/scheduled-tasks.md +1 -0
  77. package/commands/score-innovation.md +2 -0
  78. package/commands/scout.md +1 -0
  79. package/commands/setup.md +2 -0
  80. package/commands/snapshot.md +2 -0
  81. package/commands/speakers.md +1 -0
  82. package/commands/splash.md +5 -2
  83. package/commands/status.md +1 -0
  84. package/commands/structure-argument.md +2 -0
  85. package/commands/suggest-next.md +2 -0
  86. package/commands/systems-thinking.md +2 -0
  87. package/commands/think-hats.md +2 -0
  88. package/commands/update.md +2 -0
  89. package/commands/user-needs.md +2 -0
  90. package/commands/validate.md +2 -0
  91. package/commands/value-proposition.md +2 -0
  92. package/commands/vault.md +2 -0
  93. package/commands/visualize.md +24 -29
  94. package/commands/whitespace.md +2 -1
  95. package/commands/wiki.md +1 -0
  96. package/hooks/hooks.json +22 -88
  97. package/lib/agents/auto-explore-agent.cjs +82 -0
  98. package/lib/core/breakthrough/canary.cjs +134 -0
  99. package/lib/core/breakthrough/canary.test.cjs +136 -0
  100. package/lib/core/breakthrough/detectors.cjs +359 -0
  101. package/lib/core/breakthrough/detectors.test.cjs +333 -0
  102. package/lib/core/breakthrough/ethics-fence.cjs +127 -0
  103. package/lib/core/breakthrough/ethics-fence.test.cjs +178 -0
  104. package/lib/core/breakthrough/resurfacing.cjs +150 -0
  105. package/lib/core/breakthrough/resurfacing.test.cjs +233 -0
  106. package/lib/core/breakthrough/review-queue.cjs +154 -0
  107. package/lib/core/breakthrough/review-queue.test.cjs +160 -0
  108. package/lib/core/breakthrough/scanner-d17-d18.test.cjs +229 -0
  109. package/lib/core/breakthrough/scanner.cjs +426 -0
  110. package/lib/core/breakthrough/scanner.test.cjs +267 -0
  111. package/lib/core/breakthrough/schema.cjs +164 -0
  112. package/lib/core/breakthrough/schema.test.cjs +256 -0
  113. package/lib/core/breakthrough/scoring.cjs +293 -0
  114. package/lib/core/breakthrough/scoring.test.cjs +423 -0
  115. package/lib/core/breakthrough/verb-dispatch.cjs +221 -0
  116. package/lib/core/breakthrough/verb-dispatch.test.cjs +185 -0
  117. package/lib/core/breakthrough/voice-scaffold.cjs +247 -0
  118. package/lib/core/breakthrough/voice-scaffold.test.cjs +251 -0
  119. package/lib/core/directive-envelope.cjs +175 -0
  120. package/lib/core/directive-envelope.test.cjs +225 -0
  121. package/lib/core/doctor/class-m-brain-smoke.cjs +278 -0
  122. package/lib/core/doctor/class-m-brain-smoke.test.cjs +310 -0
  123. package/lib/core/first-touch-version-stamper.cjs +113 -0
  124. package/lib/core/larry-thinness-acknowledgment.cjs +64 -0
  125. package/lib/core/larry-thinness-acknowledgment.test.cjs +97 -0
  126. package/lib/core/llm-name-suggester.cjs +194 -0
  127. package/lib/core/llm-name-suggester.test.cjs +132 -0
  128. package/lib/core/mcp-profiles.cjs +1 -1
  129. package/lib/core/migration-snapshot.cjs +172 -0
  130. package/lib/core/migration-snapshot.test.cjs +174 -0
  131. package/lib/core/mindrian-brain-shim.test.cjs +214 -0
  132. package/lib/core/mva-orchestrator.cjs +41 -0
  133. package/lib/core/mva-telemetry.cjs +31 -143
  134. package/lib/core/navigation/edges.cjs +35 -0
  135. package/lib/core/navigation/memory-events.cjs +126 -0
  136. package/lib/core/room-auto-create.cjs +318 -0
  137. package/lib/core/room-auto-create.test.cjs +198 -0
  138. package/lib/core/room-discard-cascade.cjs +225 -0
  139. package/lib/core/room-discard-cascade.test.cjs +135 -0
  140. package/lib/core/room-name-validator.cjs +132 -0
  141. package/lib/core/room-name-validator.test.cjs +156 -0
  142. package/lib/core/room-naming-selector.cjs +357 -0
  143. package/lib/core/room-naming-selector.test.cjs +277 -0
  144. package/lib/core/room-receipt-emit.cjs +63 -0
  145. package/lib/core/room-skeleton-scaffold.cjs +315 -0
  146. package/lib/core/room-skeleton-scaffold.test.cjs +291 -0
  147. package/lib/core/rs-nl-to-query.cjs +1 -1
  148. package/lib/core/stale-copy-scanner.cjs +190 -0
  149. package/lib/core/state-aware-router.cjs +78 -0
  150. package/lib/core/telemetry/schema.cjs +168 -0
  151. package/lib/core/telemetry/schema.test.cjs +124 -0
  152. package/lib/core/telemetry/validator.cjs +200 -0
  153. package/lib/core/telemetry/validator.test.cjs +188 -0
  154. package/lib/core/telemetry/writer.cjs +141 -0
  155. package/lib/core/telemetry/writer.test.cjs +331 -0
  156. package/lib/core/terminal-capability.cjs +88 -0
  157. package/lib/core/tier0-messaging.cjs +109 -0
  158. package/lib/core/tier0-messaging.test.cjs +218 -0
  159. package/lib/core/venture-shape-nudge.cjs +163 -0
  160. package/lib/core/venture-shape-nudge.test.cjs +161 -0
  161. package/lib/core/visual-ops.cjs +70 -2
  162. package/lib/hmi/selector-dispatcher.cjs +90 -1
  163. package/lib/hmi/shape-f7-breakthrough-renderer.cjs +222 -0
  164. package/lib/hmi/shape-f7-breakthrough-renderer.test.cjs +233 -0
  165. package/lib/memory/body-shape-coverage.test.cjs +268 -0
  166. package/lib/memory/brain-derivation-graceful-degradation.test.cjs +2 -2
  167. package/lib/memory/doctor-deprecation-surface.test.cjs +185 -0
  168. package/lib/memory/first-touch-version.test.cjs +198 -0
  169. package/lib/memory/help-coverage.test.cjs +108 -0
  170. package/lib/memory/help-renderer.test.cjs +145 -0
  171. package/lib/memory/mos-status-renderer.test.cjs +2 -2
  172. package/lib/memory/navigation-engine-core.test.cjs +1 -1
  173. package/lib/memory/palette-consistency.test.cjs +127 -0
  174. package/lib/memory/pending-tension-store.cjs +80 -0
  175. package/lib/memory/render-v2-disposition.test.cjs +199 -0
  176. package/lib/memory/run-feynman-tests.cjs +223 -0
  177. package/lib/memory/sessionstart-coordinator.test.cjs +446 -0
  178. package/lib/memory/skill-vs-code-drift.test.cjs +257 -0
  179. package/lib/memory/soft-alias.test.cjs +144 -0
  180. package/lib/memory/stale-copy-scanner.test.cjs +291 -0
  181. package/lib/memory/state-aware-router.test.cjs +90 -0
  182. package/lib/memory/statusline-two-row.test.cjs +338 -0
  183. package/lib/memory/terminal-capability.test.cjs +155 -0
  184. package/lib/render/ROOM.md +74 -22
  185. package/lib/sessionstart/budget-compressor.cjs +130 -0
  186. package/lib/sessionstart/contributor-interface.cjs +134 -0
  187. package/lib/sessionstart/contributor-isolator.cjs +128 -0
  188. package/lib/sessionstart/precedence-ladder.cjs +47 -0
  189. package/lib/statusline/governing-thought-truncator.cjs +45 -0
  190. package/lib/statusline/two-row-renderer.cjs +186 -0
  191. package/lib/statusline/version-resolver.cjs +81 -0
  192. package/package.json +1 -1
  193. package/references/visual/ROOM.md +55 -0
  194. package/references/visual/palette.json +54 -0
  195. package/skills/larry-personality/SKILL.md +34 -0
  196. package/skills/ui-system/SKILL.md +109 -1
  197. package/skills/ui-system/rules/dual-palette.md +156 -0
  198. package/skills/ui-system/rules/glyph-disambiguation.md +171 -0
  199. package/skills/ui-system/rules/shape-f-zero-and-six.md +169 -0
@@ -0,0 +1,199 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ /*
5
+ * Copyright (c) 2026 Mindrian. BSL 1.1.
6
+ *
7
+ * Phase 121.5-04 (Sub-plan E) -- render-v2 disposition CI gate.
8
+ *
9
+ * Pairs with scripts/disposition-render-v2.cjs. The script is the
10
+ * operator-facing audit surface; this test is the CI wall that fails
11
+ * the build when a prose-path module silently starts importing
12
+ * lib/render/render-v2.cjs.
13
+ *
14
+ * What this test asserts (the disposition contract):
15
+ *
16
+ * 1. The audit script's verdict is HOLDS -- no prose-path module
17
+ * currently imports render-v2.
18
+ * 2. The allowlist matches the canonical set documented in
19
+ * lib/render/ROOM.md: { lib/render/render.cjs (v1 shim),
20
+ * lib/hmi/selector-dispatcher.cjs (agent-surface dispatcher) }.
21
+ * Any addition to the allowlist requires updating ROOM.md in
22
+ * the same commit -- this test catches drift between the two.
23
+ * 3. lib/render/ROOM.md exists and documents the disposition with
24
+ * the "current" linguistic discipline (NEVER "final", "complete",
25
+ * or "closed set" framing on rankable input signal types --
26
+ * verdict locked 2026-05-16 per the dual-graph review).
27
+ * 4. The Phase 102 VALIDATION.md is no longer status: draft (the
28
+ * Sub-plan E precondition for v1.13.0 final release gate).
29
+ *
30
+ * Registered in lib/memory/run-feynman-tests.cjs alongside the existing
31
+ * Phase 102 fences (test-render-v2-signature.cjs etc.).
32
+ *
33
+ * Constraints (Phase 87 invariant):
34
+ * - Node built-ins only (node:assert/strict, node:fs, node:path).
35
+ * - CJS only.
36
+ * - Zero new runtime dependencies.
37
+ *
38
+ * Canon parts: 3 (the v2 entry is reserved for Shape F.x decision-gate
39
+ * output surfaces), 6 (Product-as-Venture: the plugin honors its own
40
+ * disposition decisions via a CI gate, not a promise), 7 (Reuse Before
41
+ * Build: the v1 shim wraps v2 so we ship one renderer, two entry
42
+ * points -- not two parallel implementations).
43
+ */
44
+
45
+ const assert = require('node:assert/strict');
46
+ const fs = require('node:fs');
47
+ const path = require('node:path');
48
+
49
+ const REPO_ROOT = path.resolve(__dirname, '..', '..');
50
+
51
+ let passed = 0;
52
+ let failed = 0;
53
+
54
+ function ok(name) {
55
+ passed += 1;
56
+ process.stdout.write(' ok ' + name + '\n');
57
+ }
58
+
59
+ function fail(name, err) {
60
+ failed += 1;
61
+ process.stdout.write(' FAIL ' + name + '\n');
62
+ if (err) process.stdout.write(' ' + (err.message || String(err)) + '\n');
63
+ }
64
+
65
+ // ---------------------------------------------------------------------------
66
+ // Scenario 1: the audit script's verdict is HOLDS.
67
+ // ---------------------------------------------------------------------------
68
+ (function test1_auditVerdictHolds() {
69
+ const label = 'audit script verdict HOLDS (no prose-path consumer)';
70
+ try {
71
+ const audit = require(path.join(REPO_ROOT, 'scripts', 'disposition-render-v2.cjs'));
72
+ const report = audit.audit();
73
+ assert.equal(report.verdict, 'HOLDS',
74
+ 'verdict must be HOLDS; got ' + report.verdict
75
+ + ' with violations: ' + JSON.stringify(report.violations));
76
+ assert.equal(report.disposition, 'agent-surface-only',
77
+ 'disposition must be agent-surface-only');
78
+ assert.equal(report.summary.violation_count, 0,
79
+ 'violation_count must be 0');
80
+ ok(label);
81
+ } catch (e) { fail(label, e); }
82
+ })();
83
+
84
+ // ---------------------------------------------------------------------------
85
+ // Scenario 2: allowlist matches canonical set.
86
+ // ---------------------------------------------------------------------------
87
+ (function test2_allowlistMatches() {
88
+ const label = 'allowlist matches canonical agent-surface set';
89
+ try {
90
+ const audit = require(path.join(REPO_ROOT, 'scripts', 'disposition-render-v2.cjs'));
91
+ const expected = [
92
+ path.join('lib', 'render', 'render.cjs'),
93
+ path.join('lib', 'hmi', 'selector-dispatcher.cjs'),
94
+ ];
95
+ assert.deepEqual(
96
+ audit.ALLOWED_CONSUMERS.slice().sort(),
97
+ expected.slice().sort(),
98
+ 'allowlist must equal canonical set; changes require ROOM.md update in same commit'
99
+ );
100
+ ok(label);
101
+ } catch (e) { fail(label, e); }
102
+ })();
103
+
104
+ // ---------------------------------------------------------------------------
105
+ // Scenario 3: ROOM.md documents the disposition with "current" language.
106
+ //
107
+ // Per the 2026-05-16 dual-graph review (logged in 121.5-CONTEXT.md):
108
+ // render-v2's rankable input signal types is one of FOUR
109
+ // ultrareview-adjacent surfaces. The dual-graph proposal (future
110
+ // ASSOCIATION_LENS + TRANSITION_LENS lens classes) may add lens-derived
111
+ // signals. The disposition is "current," NOT "final/complete/closed."
112
+ // ---------------------------------------------------------------------------
113
+ (function test3_roomMdLinguisticDiscipline() {
114
+ const label = 'ROOM.md uses "current" linguistic discipline (no final/closed/complete framing)';
115
+ try {
116
+ const roomMdPath = path.join(REPO_ROOT, 'lib', 'render', 'ROOM.md');
117
+ assert.ok(fs.existsSync(roomMdPath), 'lib/render/ROOM.md must exist');
118
+ const body = fs.readFileSync(roomMdPath, 'utf8');
119
+
120
+ // Disposition must be present + carry the agent-surface-only marker.
121
+ assert.ok(/121\.5-04/.test(body) || /Sub-plan E/.test(body) || /Disposition/i.test(body),
122
+ 'ROOM.md must reference the Sub-plan E disposition');
123
+ assert.ok(/agent-surface-only/i.test(body),
124
+ 'ROOM.md must use the phrase "agent-surface-only"');
125
+
126
+ // Forbidden framing on rankable input signal types. The check is
127
+ // scoped to specific phrases that imply closure -- we do NOT forbid
128
+ // the words "final" or "complete" in unrelated context (e.g. "final
129
+ // release gate", "compose 4 zones" -- both legitimate). The patterns
130
+ // below are the closure-implying phrases we explicitly disallow on
131
+ // the signal-types section.
132
+ const forbidden = [
133
+ { pattern: /\bcomplete set of rankable\b/i, label: '"complete set of rankable"' },
134
+ { pattern: /\bclosed signal vocabulary\b/i, label: '"closed signal vocabulary"' },
135
+ { pattern: /\ball input signal types\b/i, label: '"all input signal types"' },
136
+ { pattern: /\bfinal set of rankable\b/i, label: '"final set of rankable"' },
137
+ ];
138
+ for (const f of forbidden) {
139
+ assert.ok(!f.pattern.test(body),
140
+ 'ROOM.md must NOT contain ' + f.label + ' (use "current"/"today"/"as of" framing)');
141
+ }
142
+ ok(label);
143
+ } catch (e) { fail(label, e); }
144
+ })();
145
+
146
+ // ---------------------------------------------------------------------------
147
+ // Scenario 4: Phase 102 VALIDATION.md is no longer status: draft.
148
+ // ---------------------------------------------------------------------------
149
+ (function test4_validation102OutOfDraft() {
150
+ const label = 'Phase 102 VALIDATION.md is out of status: draft';
151
+ try {
152
+ const valPath = path.join(REPO_ROOT,
153
+ '.planning', 'phases', '102-context-aware-rendering', '102-VALIDATION.md');
154
+ if (!fs.existsSync(valPath)) {
155
+ // The worktree may not carry the .planning tree; treat absence as
156
+ // a soft-pass at unit-test time. The Phase 102 VERIFICATION.md
157
+ // existence check (scenario 5) is the harder gate.
158
+ ok(label + ' (skipped: 102-VALIDATION.md absent in this worktree)');
159
+ return;
160
+ }
161
+ const body = fs.readFileSync(valPath, 'utf8');
162
+ // The frontmatter `status:` field MUST NOT read "draft".
163
+ const m = body.match(/^status:\s*(\S+)\s*$/m);
164
+ if (m) {
165
+ assert.notEqual(m[1].toLowerCase(), 'draft',
166
+ '102-VALIDATION.md status field must not be "draft"; got "' + m[1] + '"');
167
+ }
168
+ ok(label);
169
+ } catch (e) { fail(label, e); }
170
+ })();
171
+
172
+ // ---------------------------------------------------------------------------
173
+ // Scenario 5: Phase 102 VERIFICATION.md exists.
174
+ // ---------------------------------------------------------------------------
175
+ (function test5_verification102Exists() {
176
+ const label = 'Phase 102 VERIFICATION.md exists (Sub-plan E closure)';
177
+ try {
178
+ const verPath = path.join(REPO_ROOT,
179
+ '.planning', 'phases', '102-context-aware-rendering', '102-VERIFICATION.md');
180
+ if (!fs.existsSync(path.dirname(verPath))) {
181
+ // Worktree may not carry the phase tree; soft-pass.
182
+ ok(label + ' (skipped: phase 102 dir absent in this worktree)');
183
+ return;
184
+ }
185
+ assert.ok(fs.existsSync(verPath),
186
+ '102-VERIFICATION.md must exist at ' + path.relative(REPO_ROOT, verPath));
187
+ const body = fs.readFileSync(verPath, 'utf8');
188
+ assert.ok(body.length > 200,
189
+ '102-VERIFICATION.md must be substantive (>200 bytes)');
190
+ ok(label);
191
+ } catch (e) { fail(label, e); }
192
+ })();
193
+
194
+ process.stdout.write('\n');
195
+ process.stdout.write(
196
+ 'Phase 121.5-04 render-v2 disposition gate: ' +
197
+ passed + ' passed, ' + failed + ' failed\n'
198
+ );
199
+ process.exit(failed === 0 ? 0 : 1);
@@ -1119,6 +1119,12 @@ const TEST_FILES = [
1119
1119
  path.join(REPO_ROOT, 'tests', 'test-render-v2-jtbd-zone4.cjs'),
1120
1120
  path.join(REPO_ROOT, 'tests', 'test-render-v2-provenance.cjs'),
1121
1121
  path.join(REPO_ROOT, 'tests', 'test-render-v2-color-overlay.cjs'),
1122
+ // Phase 121.5-04 Sub-plan E: render-v2 disposition CI gate. Asserts the
1123
+ // audit verdict HOLDS, the allowlist matches the canonical agent-surface
1124
+ // set, ROOM.md uses "current" linguistic discipline, and the Phase 102
1125
+ // VALIDATION/VERIFICATION pair has closed (out of draft + record exists).
1126
+ // Pairs with the operator-facing audit at scripts/disposition-render-v2.cjs.
1127
+ path.join(REPO_ROOT, 'lib', 'memory', 'render-v2-disposition.test.cjs'),
1122
1128
  // Phase 103 — Memory Continuity Layer (within-session + across-session + cross-room)
1123
1129
  path.join(REPO_ROOT, 'tests', 'test-across-session-memory.cjs'),
1124
1130
  path.join(REPO_ROOT, 'tests', 'test-cross-room-memory.cjs'),
@@ -1319,6 +1325,13 @@ const TEST_FILES = [
1319
1325
  path.join(REPO_ROOT, 'tests', 'test-feynman-timeline-empty-state.cjs'),
1320
1326
  path.join(REPO_ROOT, 'tests', 'test-feynman-timeline-runner.cjs'),
1321
1327
  path.join(REPO_ROOT, 'tests', 'test-feynman-timeline-canon-part-9-invariant.cjs'),
1328
+ // Phase 121.5 terminal-coherence-capstone (multi-plan; SessionStart Coordinator is Plan 00).
1329
+ // sessionstart-coordinator.test.cjs -> Plan 121.5-00 (D-13..D-16 coordinator + 9 injector refactor)
1330
+ // Aggregator: tests/run-all-121.5.sh. Additional 121.5-* test suites are
1331
+ // already registered above this block (palette-consistency / statusline-two-row /
1332
+ // terminal-capability / help-renderer / help-coverage); the SessionStart
1333
+ // Coordinator suite lands here per the Plan 121.5-00 Task 3 contract.
1334
+ path.join(REPO_ROOT, 'lib', 'memory', 'sessionstart-coordinator.test.cjs'),
1322
1335
  // Phase 125 F-Selector Ranker (8 plans: Plan 00 writeEdge through Plan 07 miss).
1323
1336
  // navigation-write-edge.test.cjs -> Plan 125-00 (writeEdge primitive)
1324
1337
  // navigation-projections.test.cjs -> Plan 125-01 (projection helpers)
@@ -1373,6 +1386,216 @@ const TEST_FILES = [
1373
1386
  // Plan 118-06 (rule-linter + Dror 2.0 acceptance harness):
1374
1387
  path.join(REPO_ROOT, 'lib', 'core', 'mva-rule-linter.test.cjs'),
1375
1388
  path.join(REPO_ROOT, 'tests', 'test-mva-dror-harness.cjs'),
1389
+ // Phase 119-00 Wave 1 (Room-as-Receipt Invariant; D-01 + D-04 + D-06 telemetry mirror).
1390
+ // test-room-auto-create-event-types.cjs -> 119-00 Task 1 (EVENT_TYPES floor + 3 new strings)
1391
+ // venture-shape-nudge.test.cjs -> 119-00 Task 1 (D-02 nudge detector + D-01 invariant)
1392
+ // room-auto-create.test.cjs -> 119-00 Task 2 (slug + scaffold + registry + memory_event)
1393
+ // test-room-auto-create-fingerprint-integration.cjs -> 119-00 Task 3 (sibling hook + nudge shim)
1394
+ // Mirrors the Phase 117-00 + Phase 124-02 additive-tail-append registration precedent.
1395
+ path.join(REPO_ROOT, 'tests', 'test-room-auto-create-event-types.cjs'),
1396
+ path.join(REPO_ROOT, 'lib', 'core', 'venture-shape-nudge.test.cjs'),
1397
+ path.join(REPO_ROOT, 'lib', 'core', 'room-auto-create.test.cjs'),
1398
+ path.join(REPO_ROOT, 'tests', 'test-room-auto-create-fingerprint-integration.cjs'),
1399
+ // Phase 119-02 Wave 1 extension (Room-as-Receipt Invariant; D-05 skeleton scaffold +
1400
+ // Larry thinness-acknowledgment voice line + Canon decision 15 ICM Layer 0 everywhere).
1401
+ // larry-thinness-acknowledgment.test.cjs -> 119-02 Task 1 (THINNESS_VOICE_LINE verbatim + detector)
1402
+ // room-skeleton-scaffold.test.cjs -> 119-02 Task 2 (scaffold unit tests; reentrancy + Part 8/9 invariants)
1403
+ // test-room-skeleton-scaffold-integration.cjs -> 119-02 Task 2 (end-to-end placeholder-room scaffold scenarios)
1404
+ // test-119-02-auto-explore-fire-wiring.cjs -> 119-02 Task 3 (REVISION 2026-05-16: scaffoldRoomSkeleton call
1405
+ // site wired into scripts/auto-explore-fire.cjs;
1406
+ // closes Blocker 1+4 phantom wiring)
1407
+ // Aggregator: tests/test-119-02-scaffold.sh (the 6-gate shell harness).
1408
+ path.join(REPO_ROOT, 'lib', 'core', 'larry-thinness-acknowledgment.test.cjs'),
1409
+ path.join(REPO_ROOT, 'lib', 'core', 'room-skeleton-scaffold.test.cjs'),
1410
+ path.join(REPO_ROOT, 'tests', 'test-room-skeleton-scaffold-integration.cjs'),
1411
+ path.join(REPO_ROOT, 'tests', 'test-119-02-auto-explore-fire-wiring.cjs'),
1412
+ // Phase 119-01 Wave 2 extension (Room-as-Receipt Invariant; D-03 + D-06 retroactive-naming
1413
+ // F.1 selector + discard cascade + LLM-name-suggester + tri-surface adaptation):
1414
+ // llm-name-suggester.test.cjs -> 119-01 Task 1 (HAIKU_MODEL_ID + FALLBACK +
1415
+ // suggest happy/sad + Canon Part 8 grep tripwire +
1416
+ // EVENT_TYPES floor with +1 room_discard_partial_failure)
1417
+ // room-name-validator.test.cjs -> 119-01 Task 2 (four rejection classes +
1418
+ // Windows-reserved defense-in-depth)
1419
+ // room-discard-cascade.test.cjs -> 119-01 Task 2 (transactional discard +
1420
+ // partial-failure recovery via rooms-meta.db)
1421
+ // room-naming-selector.test.cjs -> 119-01 Task 3 (orchestrator + F1_OPTION_LABELS
1422
+ // + DECISION_PATHS + tri-surface envelope)
1423
+ // test-room-naming-selector-integration.cjs -> 119-01 Task 4 (mva-orchestrator hook + e2e shim spawn)
1424
+ // Aggregator: tests/test-119-01-scaffold.sh (the 7-gate shell harness).
1425
+ path.join(REPO_ROOT, 'lib', 'core', 'llm-name-suggester.test.cjs'),
1426
+ path.join(REPO_ROOT, 'lib', 'core', 'room-name-validator.test.cjs'),
1427
+ path.join(REPO_ROOT, 'lib', 'core', 'room-discard-cascade.test.cjs'),
1428
+ path.join(REPO_ROOT, 'lib', 'core', 'room-naming-selector.test.cjs'),
1429
+ path.join(REPO_ROOT, 'tests', 'test-room-naming-selector-integration.cjs'),
1430
+ // Phase 120-00 Wave 1: 4 breakthrough pattern detectors + Breakthrough graph schema.
1431
+ // test-breakthrough-event-types.cjs -> 120-00 Task 1 (EVENT_TYPES floor + 6 new strings;
1432
+ // round-trip via navigation.logMemoryEvent)
1433
+ // test-breakthrough-edge-types.cjs -> 120-00 Task 1 (ALLOWED_EDGE_TYPES floor + DERIVED_FROM;
1434
+ // round-trip via navigation.writeEdge)
1435
+ // lib/core/breakthrough/detectors.test.cjs -> 120-00 Task 2 (DETECTOR_THRESHOLDS verbatim + 4
1436
+ // detectors + classifyFireTier + Canon Part 8 invariant)
1437
+ // lib/core/breakthrough/schema.test.cjs -> 120-00 Task 3 (writeBreakthrough + validateProvenance;
1438
+ // D-20 HARD FLOOR atomic-transaction invariant)
1439
+ // Aggregator: tests/test-120-00-scaffold.sh (the 9-gate shell harness).
1440
+ path.join(REPO_ROOT, 'tests', 'test-breakthrough-event-types.cjs'),
1441
+ path.join(REPO_ROOT, 'tests', 'test-breakthrough-edge-types.cjs'),
1442
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'detectors.test.cjs'),
1443
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'schema.test.cjs'),
1444
+ // Phase 120-01 Wave 2: F.7 Breakthrough Surface selector + 5-component scoring formula.
1445
+ // shape-f7-breakthrough-renderer.test.cjs -> 120-01 Task 1 (closed-vocab 5 verbs verbatim
1446
+ // + D-10 mandatory-dismiss invariant +
1447
+ // D-20 HARD FLOOR provenance refusal)
1448
+ // scoring.test.cjs -> 120-01 Task 3 (SCORING_WEIGHTS verbatim
1449
+ // + RECENCY_HALF_LIFE_DAYS verbatim + the
1450
+ // 5-component formula + Laplace prior +
1451
+ // D-19 dismissal-rate canary + Canon Part 8
1452
+ // source-grep + em-dash HARD RULE)
1453
+ // selector-dispatcher additive F.7 branch is verified by tests/test-120-01-scaffold.sh
1454
+ // Gates 1 + 2 (already on disk; no separate
1455
+ // dispatcher unit-test file landed in Plan 120-01).
1456
+ // Aggregator: tests/test-120-01-scaffold.sh (the 8-gate shell harness).
1457
+ path.join(REPO_ROOT, 'lib', 'hmi', 'shape-f7-breakthrough-renderer.test.cjs'),
1458
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'scoring.test.cjs'),
1459
+ // Phase 120-02 Wave 2: session-start scanner + resurfacing + canary +
1460
+ // verb-dispatch consumer. Wires Plan 120-00 detectors + Plan 120-01 F.7 +
1461
+ // D-13..D-15 resurfacing rules + D-19 canary + 5-verb dispatch.
1462
+ // resurfacing.test.cjs -> 120-02 Task 1 (D-13..D-15 predicates;
1463
+ // SEVEN_DAY_COOLDOWN_MS verbatim; D-13 BOTH-
1464
+ // condition lock; Canon Part 8 source-grep)
1465
+ // canary.test.cjs -> 120-02 Task 1 (D-19 constants verbatim;
1466
+ // computeDismissalRate + isThrottled +
1467
+ // emitThrottleEvent; D19_MIN_SAMPLE floor;
1468
+ // per-kind isolation)
1469
+ // verb-dispatch.test.cjs -> 120-02 Task 2 (5-verb to 3-event lock;
1470
+ // Confirm/Dismiss/File-as-decision emitters;
1471
+ // D-09 FILED_AS_DECISION edge bridge;
1472
+ // D-13 artifact_ids_at_dismiss baseline)
1473
+ // scanner.test.cjs -> 120-02 Task 3 (scanForBreakthroughs +
1474
+ // surfaceBreakthrough; D-16 silence; D-13..
1475
+ // D-15 resurfacing filter; D-19 throttle
1476
+ // filter; D-20 writeBreakthrough contract;
1477
+ // D-20 third structural enforcement point)
1478
+ // check-pending-breakthrough.test.cjs -> 120-02 Task 3 session-start hook
1479
+ // (no-active-room / D-16 silence / happy-path
1480
+ // F.7 surfaced / corrupt-room degrade / hooks
1481
+ // .json wiring)
1482
+ // tests/test-breakthrough-d20-end-to-end.cjs -> 120-02 Task 3 LOAD-BEARING
1483
+ // D-20 invariant: every breakthrough_surfaced
1484
+ // pairs with >= 1 DERIVED_FROM edge; batch
1485
+ // invariant returns zero orphan-provenance
1486
+ // Breakthroughs; surface refusal emits
1487
+ // breakthrough_surface_blocked telemetry.
1488
+ // Aggregator: tests/test-120-02-scaffold.sh (the 8-gate shell harness).
1489
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'resurfacing.test.cjs'),
1490
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'canary.test.cjs'),
1491
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'verb-dispatch.test.cjs'),
1492
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'scanner.test.cjs'),
1493
+ path.join(REPO_ROOT, 'scripts', 'check-pending-breakthrough.test.cjs'),
1494
+ path.join(REPO_ROOT, 'tests', 'test-breakthrough-d20-end-to-end.cjs'),
1495
+ // Phase 120-03 Wave 2: D-17 voice scaffold + D-18 4-tier ethics fence + SOFT_BAND
1496
+ // review queue + Larry skill update. The conversational + ethical-enforcement
1497
+ // layer that converts the math-detected breakthrough into honest, evidence-backed
1498
+ // Larry voice. Aggregator: tests/test-120-03-scaffold.sh (the 9-gate harness).
1499
+ // voice-scaffold.test.cjs -> 120-03 Task 1 (composeBreakthrough
1500
+ // VoiceLine + auditVoiceLine + the
1501
+ // 4 D-17 rule predicates + frozen
1502
+ // constants verbatim)
1503
+ // ethics-fence.test.cjs -> 120-03 Task 2 (classifyEthicsBand
1504
+ // + 4 frozen threshold constants +
1505
+ // queueForReview happy path +
1506
+ // memory_event mirror)
1507
+ // review-queue.test.cjs -> 120-03 Task 2 (openReviewQueue +
1508
+ // .rooms/breakthrough-review-queue.db
1509
+ // schema + insertReviewCandidate +
1510
+ // listPendingReviews + graceful EACCES
1511
+ // fallback)
1512
+ // scanner-d17-d18.test.cjs -> 120-03 Task 3 (scanner integration
1513
+ // of voice-scaffold + ethics-fence;
1514
+ // F.7 renderer voice_line slot; D-17
1515
+ // violator -> structural default)
1516
+ // tests/test-breakthrough-d17-voice-audit.cjs -> 120-03 Task 1 (D-17 audit catalog
1517
+ // end-to-end: 8-candidate matrix +
1518
+ // per-rule violator/valid pairs)
1519
+ // tests/test-breakthrough-d18-ethics-fence.cjs -> 120-03 Task 2 (D-18 4-band end-to-end:
1520
+ // SOFT_BAND queue + memory_event; no
1521
+ // breakthrough_surfaced from SOFT_BAND)
1522
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'voice-scaffold.test.cjs'),
1523
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'ethics-fence.test.cjs'),
1524
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'review-queue.test.cjs'),
1525
+ path.join(REPO_ROOT, 'lib', 'core', 'breakthrough', 'scanner-d17-d18.test.cjs'),
1526
+ path.join(REPO_ROOT, 'tests', 'test-breakthrough-d17-voice-audit.cjs'),
1527
+ path.join(REPO_ROOT, 'tests', 'test-breakthrough-d18-ethics-fence.cjs'),
1528
+ // Phase 121-00 (Wave 1, Foundation): unified trajectory-telemetry writer
1529
+ // chokepoint + frozen v1 schema + Canon Part 8 emit-time validator. The
1530
+ // architectural ancestor is lib/core/mva-telemetry.cjs (Phase 118); this
1531
+ // module consolidates the 4 piecemeal writers (mva, query-efficiency,
1532
+ // selector, navigation-bypass) into ONE emit() entry point with
1533
+ // ISO-week rotation (events-YYYY-WNN.jsonl) and a per-row schema_version
1534
+ // (Number 1). schema.test.cjs (2 cases) asserts EVENT_TYPES frozen at 15
1535
+ // + ALLOWED_FIELDS shape. validator.test.cjs (7 cases) asserts the
1536
+ // Canon Part 8 constitutional gate: unknown_event + unknown_field + 7
1537
+ // adversarial forbidden-pattern rejections (Cypher / email / phone /
1538
+ // brain host URL / absolute path / raw hex / free-text prose). The
1539
+ // sha256-in-dedicated-field sanity case confirms hash-class fields are
1540
+ // NOT false-flagged. writer.test.cjs (10 cases) asserts the chokepoint
1541
+ // contract end-to-end: export surface, telemetryDir under HOME,
1542
+ // isoWeekFilename zero-padding, telemetryFile composition, emit() JSONL
1543
+ // shape (schema_version=1 Number + ISO-8601 timestamp + session_id +
1544
+ // payload), throws on unknown event, throws on Part 8 forbidden pattern,
1545
+ // recursive mkdir + silent fs-error swallow, two emits 5ms apart in
1546
+ // same ISO-week file, all lines JSON.parseable with no BOM.
1547
+ path.join(REPO_ROOT, 'lib', 'core', 'telemetry', 'schema.test.cjs'),
1548
+ path.join(REPO_ROOT, 'lib', 'core', 'telemetry', 'validator.test.cjs'),
1549
+ path.join(REPO_ROOT, 'lib', 'core', 'telemetry', 'writer.test.cjs'),
1550
+ // Phase 121-01 Task 1 (Wave 1, atomic cutover): the one-time idempotent
1551
+ // migration script that merges the 4 piecemeal telemetry sources
1552
+ // (mva.jsonl, selector.jsonl, navigation-bypass.jsonl,
1553
+ // query-efficiency.jsonl) into the unified events-YYYY-WNN.jsonl stream
1554
+ // produced by writer.cjs. 8 fixture tests cover: empty source dir
1555
+ // no-op, legacy-shape normalization to command_invocation, mva
1556
+ // timestamp-order + schema_version=1 (Number), source rename to
1557
+ // *.pre-v121.bak, sha256-fingerprint idempotence on re-run, mixed-week
1558
+ // ISO split (W19/W20), Canon Part 8 forbidden-pattern quarantine
1559
+ // without abort, stdout summary JSON shape. Hermetic per-test
1560
+ // tmpdir + HOME swap; mirrors writer.test.cjs scaffolding.
1561
+ path.join(REPO_ROOT, 'scripts', 'migrate-telemetry-v1.test.cjs'),
1562
+ // Phase 121-02 Task 1..4 (Wave 2, capture-point wire-ins): 4 integration
1563
+ // test files each verify that a high-signal capture point routes its
1564
+ // emit through lib/core/telemetry/writer.cjs into the unified
1565
+ // events-YYYY-WNN.jsonl stream. D-04 selector_pick (88.2/125 ranker) +
1566
+ // D-05 tension_engagement (Phase 116) + D-06 auto_explore_decision
1567
+ // (Phase 117) + D-07 breakthrough_dismissed (Phase 120 + ethics_tier +
1568
+ // voice_audit_pass). 4 tests per file (16 total); each asserts the
1569
+ // event lands with correct ALLOWED_FIELDS shape, non-blocking semantics
1570
+ // (telemetry validation failure does NOT crash the shipping behavior),
1571
+ // and that user-initiated state transitions are captured while
1572
+ // system-driven transitions (decay, throttle, skip) are excluded.
1573
+ path.join(REPO_ROOT, 'tests', 'test-121-02-selector-pick-capture.cjs'),
1574
+ path.join(REPO_ROOT, 'tests', 'test-121-02-tension-engagement-capture.cjs'),
1575
+ path.join(REPO_ROOT, 'tests', 'test-121-02-auto-explore-capture.cjs'),
1576
+ path.join(REPO_ROOT, 'tests', 'test-121-02-breakthrough-dismissed-capture.cjs'),
1577
+ // Phase 121-03 Task 1..4 (Wave 2, secondary D-09 capture points): 3 integration
1578
+ // tests + 1 drowning-protection fixture. D-09 ships three lower-signal but
1579
+ // broader-sweep emit surfaces: empathy audit observation CLI harness +
1580
+ // Phase 119 room-as-receipt helper module + PostToolUse /mos:* broad sweep
1581
+ // (100% sampling, type-discriminator-isolated bucket). The drowning-protection
1582
+ // fixture proves the type discriminator works: 100 command_invocation events
1583
+ // + 10 selector_pick events to a tmpdir, type-filter isolates them so SEED-002
1584
+ // consumers can drop the bucket without losing the high-signal stream.
1585
+ path.join(REPO_ROOT, 'tests', 'test-121-03-empathy-observation.cjs'),
1586
+ path.join(REPO_ROOT, 'tests', 'test-121-03-room-receipt-emit.cjs'),
1587
+ path.join(REPO_ROOT, 'tests', 'test-121-03-command-invocation-hook.cjs'),
1588
+ path.join(REPO_ROOT, 'tests', 'test-121-03-drowning-protection.cjs'),
1589
+ // Phase 127.1 brain-graphrag-collapse-pinecone-neo4j-hnsw (Wave 0 harness scaffold + Wave 1/2/3 outputs)
1590
+ // Surface 1 -> Plan 127.1-01 produces embedding-manifest.fixture.json (12,401 byte-identical SHA256 pairs).
1591
+ // Surface 2 -> Plan 127.1-02 produces index-config.fixture.json (SHOW INDEXES dim=1024 cosine ONLINE).
1592
+ // query-embedder -> Plan 127.1-03 produces mcp-server-brain/lib/query-embedder.cjs (server-side e5-large query embedding; hermetic, mocked transport).
1593
+ // Surface 3 -> Plan 127.1-04 produces overlap-baseline + overlap-neo4j fixtures (BLOCKING gate >= 0.80).
1594
+ // Aggregator: tests/run-all-127.sh. RED-by-design until consumer plans land the fixtures.
1595
+ path.join(REPO_ROOT, 'tests', '127.1-embedding-integrity.test.cjs'),
1596
+ path.join(REPO_ROOT, 'tests', '127.1-index-config.test.cjs'),
1597
+ path.join(REPO_ROOT, 'tests', '127.1-query-embedder.test.cjs'),
1598
+ path.join(REPO_ROOT, 'tests', '127.1-graphrag-overlap.test.cjs'),
1376
1599
  ];
1377
1600
 
1378
1601
  // Exit code convention for child tests: