ruvnet-brain 4.5.16 โ†’ 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +15 -19
  2. package/bin/developer-update.mjs +3 -0
  3. package/bin/install.mjs +15 -3
  4. package/bin/nightly-refresh.mjs +17 -1
  5. package/config/practical-rule-catalog.json +111 -0
  6. package/console/CONTRACT.md +47 -3
  7. package/console/app.js +112 -20
  8. package/package.json +5 -2
  9. package/plugin/.claude-plugin/plugin.json +1 -1
  10. package/plugin/.codex-plugin/plugin.json +1 -1
  11. package/plugin/commands/brain-console.md +13 -1
  12. package/plugin/commands/configure.md +2 -2
  13. package/plugin/commands/rnb.md +13 -1
  14. package/plugin/commands/rnbc.md +13 -1
  15. package/plugin/commands/rvbc.md +13 -1
  16. package/plugin/commands/rvcb.md +13 -1
  17. package/plugin/hooks/codex-hooks.json +13 -1
  18. package/plugin/hooks/hook-contracts.json +20 -4
  19. package/plugin/scripts/adr-currency-gate.mjs +75 -31
  20. package/plugin/scripts/advocacy-outcomes.mjs +18 -4
  21. package/plugin/scripts/agentdb-recall.mjs +161 -26
  22. package/plugin/scripts/automatic-update.mjs +11 -2
  23. package/plugin/scripts/capability-inventory-receipt.mjs +16 -7
  24. package/plugin/scripts/capability-registry.mjs +55 -114
  25. package/plugin/scripts/capacity-aware-parallel-work.mjs +1 -1
  26. package/plugin/scripts/codex-hook-adapter.mjs +33 -6
  27. package/plugin/scripts/codex-hook-wrapper.mjs +23 -3
  28. package/plugin/scripts/continuation-gate.mjs +2 -1
  29. package/plugin/scripts/continuity-brief.mjs +55 -22
  30. package/plugin/scripts/continuity-events.mjs +93 -17
  31. package/plugin/scripts/continuity-hook-policy.mjs +1 -1
  32. package/plugin/scripts/continuity-journal.mjs +77 -29
  33. package/plugin/scripts/decision-gate.mjs +62 -37
  34. package/plugin/scripts/decision-outcomes.mjs +192 -199
  35. package/plugin/scripts/detach.mjs +53 -13
  36. package/plugin/scripts/developer-update-cleanup.mjs +38 -0
  37. package/plugin/scripts/developer-update-lock.mjs +30 -0
  38. package/plugin/scripts/developer-update-maintenance.mjs +178 -0
  39. package/plugin/scripts/developer-update-owner.mjs +24 -0
  40. package/plugin/scripts/developer-update-policy.mjs +48 -0
  41. package/plugin/scripts/developer-update.mjs +435 -0
  42. package/plugin/scripts/doc-currency.mjs +993 -0
  43. package/plugin/scripts/ground-ruvnet.sh +16 -3
  44. package/plugin/scripts/grounding-answer.mjs +18 -16
  45. package/plugin/scripts/grounding-stamp.sh +3 -0
  46. package/plugin/scripts/grounding-turn-evidence.mjs +60 -65
  47. package/plugin/scripts/grounding-turn-gate.mjs +34 -29
  48. package/plugin/scripts/grounding-turn-mark.mjs +101 -17
  49. package/plugin/scripts/hook-context-budget.mjs +90 -0
  50. package/plugin/scripts/hook-registry.mjs +129 -1
  51. package/plugin/scripts/hook-shim.mjs +20 -2
  52. package/plugin/scripts/host-update.mjs +6 -3
  53. package/plugin/scripts/lesson-gate.mjs +1 -1
  54. package/plugin/scripts/nightly-scheduler.mjs +55 -16
  55. package/plugin/scripts/plugin-artifact-proof.mjs +135 -0
  56. package/plugin/scripts/project-capture-queue.mjs +22 -15
  57. package/plugin/scripts/project-progression-producer.mjs +15 -8
  58. package/plugin/scripts/project-progression-reader.mjs +14 -4
  59. package/plugin/scripts/project-progression-session-start.mjs +29 -17
  60. package/plugin/scripts/project-progression-sources.mjs +24 -10
  61. package/plugin/scripts/project-progression-store.mjs +7 -2
  62. package/plugin/scripts/project-store-resolver.mjs +10 -7
  63. package/plugin/scripts/project-transition-hook.mjs +20 -12
  64. package/plugin/scripts/session-snapshot-hook.mjs +20 -9
  65. package/plugin/scripts/session-start-budget.mjs +18 -0
  66. package/plugin/scripts/session-start-core.mjs +32 -6
  67. package/plugin/scripts/session-start-trace.mjs +2 -1
  68. package/plugin/scripts/turn-outcome-capture.mjs +7 -5
  69. package/plugin/scripts/unprompted-runtime.mjs +36 -10
  70. package/plugin/scripts/user-settings.mjs +7 -1
  71. package/plugin/skills/ruvnet-brain/SKILL.md +2 -2
  72. package/scripts/codex-managed-terminal.mjs +1 -1
  73. package/scripts/console-runtime-identity.mjs +2 -0
  74. package/scripts/console-suite-update.mjs +117 -0
  75. package/scripts/doc-currency.mjs +6 -990
  76. package/scripts/hook-qualify-core.mjs +30 -1
  77. package/scripts/model-managed-prompt.mjs +1 -1
  78. package/scripts/model-managed-workflow-service.mjs +113 -14
  79. package/scripts/model-routing-controller.mjs +112 -21
  80. package/scripts/onboarding-console.mjs +41 -12
  81. package/scripts/practical-rule-selector.mjs +51 -0
  82. package/scripts/product-integrity-contract.mjs +11 -4
  83. package/scripts/release-qualification-contract.mjs +14 -0
  84. package/scripts/remedy-registry.mjs +1 -0
  85. package/scripts/source-scope-receipt.mjs +9 -4
  86. package/scripts/stack-sync.mjs +19 -132
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Updated: 2026-09-11 08:00:00 EDT | Version 4.3.21
1
+ Updated: 2026-10-10 05:06:39 EDT | Version 4.6.0
2
2
  Created: 2026-06-29 22:36:38 EDT
3
3
 
4
4
  <div align="center">
@@ -7,25 +7,23 @@ Created: 2026-06-29 22:36:38 EDT
7
7
 
8
8
  # ๐Ÿง  RuvNet Brain
9
9
 
10
- ### ๐Ÿง  RuvNet Brain โ€” [![RuvNet Brain version 4.5.16 โ€” updated 2026-07-30 03:24 EDT](https://img.shields.io/badge/version_4.5.16-updated_2026--07--30_03:24_EDT-1E90FF?style=for-the-badge&labelColor=0757BA)](https://github.com/stuinfla/ruvnet-brain/blob/main/plugin/.claude-plugin/plugin.json)
10
+ ### ๐Ÿง  RuvNet Brain โ€” [![RuvNet Brain version 4.6.0 โ€” updated 2026-07-30 03:24 EDT](https://img.shields.io/badge/version_4.6.0-updated_2026--07--30_03:24_EDT-1E90FF?style=for-the-badge&labelColor=0757BA)](https://github.com/stuinfla/ruvnet-brain/blob/main/plugin/.claude-plugin/plugin.json)
11
11
 
12
12
  **A portable, source-grounded brain over Reuven Cohen's (rUv's) RuvNet stack โ€” delivered as a Claude Code plugin that makes Claude _use_ the stack instead of fighting it.**
13
13
 
14
14
  </div>
15
15
 
16
- ## Recovery milestone and proof boundaries
16
+ ## 4.6.0 coordinated updates and proof boundaries
17
17
 
18
- The 4.3.10 candidate is an incremental reliability repair, not a completed North Star or a new
19
- 95-point certification. Publication is established by the protected release transaction and
20
- public installation receipt, not this source version. Historical release narratives and dated
21
- scores below are not measurements of the current candidate.
18
+ The 4.6.0 source introduces one coordinated updater for installed tools, host plugins and the
19
+ Brain's signed knowledge bundle. RNBC presents **Keep all tools updated** with **Latest
20
+ (recommended)** or **Alpha**. The public default covers the RuvNet suite; wider developer-tool
21
+ maintenance requires an explicit choice. See the update policy in `CONTRIBUTING.md` and the
22
+ 4.6.0 release notes in `docs/RELEASE-NOTES-4.6.0.md`.
22
23
 
23
- The recovery covers shared QA producers, explicit continuation objectives, safer private-data
24
- handling, and exact-artifact release verification. Full native nightly two-run proof, complete
25
- codebase review, and all twelve whole-product obligations remain separate work. An unavailable
26
- safe inverse must not be advertised as a one-click undo. See the
27
- [QA execution contract](docs/qa-execution-contract.md) and
28
- [ADR-072 stabilization boundary](docs/adr/0072-whole-product-integrity-conformance.md).
24
+ A saved choice or registered schedule proves configuration. Completed runs, installed versions
25
+ and the protected release's public installation receipt prove different things. This source
26
+ version alone does not establish publication, all-tool freshness or a new product score.
29
27
 
30
28
  > ## ๐Ÿงญ North Star
31
29
  >
@@ -53,12 +51,10 @@ safe inverse must not be advertised as a one-click undo. See the
53
51
  > - **`plugin`** (badge above) โ€” the Claude Code plugin itself: SKILL.md, the grounding hooks, the MCP server. Read live from [`plugin/.claude-plugin/plugin.json`](plugin/.claude-plugin/plugin.json). Updates often โ€” this is where behavior fixes land.
54
52
  > - **`installer (npm)`** (badge above) โ€” the setup script's published version, read live from the [npm registry](https://www.npmjs.com/package/ruvnet-brain). It is a release surface of the same product, not an independent version track.
55
53
  > - **Brain Release** โ€” [`releases/latest`](https://github.com/stuinfla/ruvnet-brain/releases/latest) exposes the published knowledge bundle. It must agree with that release's npm, plugin, and signed artifact identities. A moving source badge does not establish publication.
56
- > - **Request a verified update, with optional scheduled updates:**
57
- > ```
58
- > npx ruvnet-brain@latest --update --auto
59
- > ```
60
- > `--update` requests the published plugin and knowledge. Adding `--auto` requests **Evergreen** scheduling; successful registration alone is not proof a scheduled run completed. Drop `--auto` for a one-time update: `npx ruvnet-brain@latest --update`.
61
- > - **Disable scheduled updates:** `npx ruvnet-brain --disable-nightly`. Platform behavior is owned by the native scheduler adapter, not a hand-maintained cron recipe.
54
+ > - **Update an existing Brain installation:** invoke its existing `ruvnet-brain --update` command. For an explicit developer checkout, use `node bin/install.mjs --update`. Initial installation may use `npx ruvnet-brain@latest`; routine updates preserve the installed owner instead of creating a second tool installation.
55
+ > - **Check installed tools:** `ruvnet-brain-update --check`. Apply the saved policy with `ruvnet-brain-update --apply`; inspect the receipt for exclusions and failures.
56
+ > - **Coordinate installed tools:** open RNBC and use **Keep all tools updated**. Choose **Latest (recommended)** or **Alpha**, and explicitly choose wider tool maintenance when wanted. The schedule runs at **03:30 in the user's local time** through the same coordinator as a manual run.
57
+ > - **Disable scheduled updates:** use the existing `ruvnet-brain --disable-nightly` command. Registration and run health are reported separately.
62
58
  > - **Publication, local activation, and loaded session version are distinct observations.** An unchanged release does not by itself prove local health, freshness, or a successful update.
63
59
 
64
60
  <sub>Built by **[Stuart Kerr](https://isovision.ai)** at [Isovision.ai](https://isovision.ai) ยท free & fair use, to help everyone leverage the high end of agentic coding.</sub>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { developerUpdateCli } from '../plugin/scripts/developer-update.mjs';
3
+ developerUpdateCli().catch(error => { console.error(error.message); process.exitCode = 1; });
package/bin/install.mjs CHANGED
@@ -27,6 +27,7 @@ import { acquireRefreshLock, finishRefreshReceipt, openRefreshReceipt, physicalP
27
27
  import { assessLifecycleEvidence, pruneLifecycleEvidence } from '../kb/lifecycle-evidence-retention.mjs';
28
28
  import { checkDiskSpace, recoverIncompleteStorageTransactions } from '../kb/update-storage-transaction.mjs';
29
29
  import { saveUpdateSource, stableNode } from '../plugin/scripts/automatic-update.mjs';
30
+ import { acquireDeveloperLock } from '../plugin/scripts/developer-update-lock.mjs';
30
31
  import { footprintRoots, inventoryFootprint, sweepFootprint } from '../plugin/scripts/brain-footprint.mjs';
31
32
  import { kbCopyProof } from '../plugin/scripts/kb-copy-proof.mjs';
32
33
  import { assessMoveLeftovers, isVolumeMetadata } from '../plugin/scripts/footprint-io.mjs';
@@ -2191,7 +2192,7 @@ export function codexSessionSafety(status) {
2191
2192
  };
2192
2193
  }
2193
2194
 
2194
- function codexAdministrativeProbeBinary() {
2195
+ export function codexAdministrativeProbeBinary() {
2195
2196
  if (process.env.CODEX_BIN) return process.env.CODEX_BIN;
2196
2197
  try {
2197
2198
  const brainHome = process.env.RUVNET_BRAIN_HOME || path.join(os.homedir(), '.cache', 'ruvnet-brain');
@@ -4435,7 +4436,7 @@ function enableNightly() {
4435
4436
  testMode: TEST_MODE });
4436
4437
  if (status.state !== 'on') throw new Error(status.evidence);
4437
4438
  ok(`nightly updates enabled โ€” ${status.evidence}`);
4438
- info(c.dim(`identity ${NIGHTLY_LABEL}; immutable runner ${registration.runnerSha256.slice(0, 16)}โ€ฆ; 03:47 local`));
4439
+ info(c.dim(`identity ${NIGHTLY_LABEL}; immutable runner ${registration.runnerSha256.slice(0, 16)}โ€ฆ; 03:30 local`));
4439
4440
  if (TEST_MODE) warn('RUVNET_BRAIN_TEST=1 โ€” scheduler registration was written but OS activation was safely simulated');
4440
4441
  } catch (error) {
4441
4442
  console.error(`\n${c.red('โœ— nightly updates were NOT enabled:')} ${error.message}`);
@@ -6331,7 +6332,18 @@ the installer reports that boot-level declarations changed.
6331
6332
  }
6332
6333
  if (FLAG_DEMO) return runDemo();
6333
6334
  if (FLAG_FEEDBACK) return runFeedback();
6334
- if (FLAG_UPDATE) return refuseOverSetAsideBrain() || runUpdate();
6335
+ if (FLAG_UPDATE) {
6336
+ if (refuseOverSetAsideBrain()) return;
6337
+ const developerLock = acquireDeveloperLock({ brainHome: process.env.RUVNET_BRAIN_HOME || path.dirname(resolvedKbDir()) });
6338
+ const previousToken = process.env.RUVNET_DEVELOPER_UPDATE_TOKEN;
6339
+ process.env.RUVNET_DEVELOPER_UPDATE_TOKEN = developerLock.token;
6340
+ try { return await runUpdate(); }
6341
+ finally {
6342
+ if (previousToken === undefined) delete process.env.RUVNET_DEVELOPER_UPDATE_TOKEN;
6343
+ else process.env.RUVNET_DEVELOPER_UPDATE_TOKEN = previousToken;
6344
+ developerLock.release();
6345
+ }
6346
+ }
6335
6347
  if (FLAG_ENABLE_NIGHTLY) return enableNightly();
6336
6348
  if (FLAG_DISABLE_NIGHTLY) return disableNightly();
6337
6349
  // Standalone, like the nightly pair above. Without these, the flags existed only as a way to
@@ -61,13 +61,29 @@ Object.assign(process.env, registration.environment || {});
61
61
  let invocation;
62
62
  try {
63
63
  const modules = registration.updateModules;
64
- if (!modules || Object.keys(modules).sort().join(',') !== 'automatic-update.mjs,ruvnet-gate1-pattern.mjs,user-settings.mjs') throw new Error('registered update module closure is missing');
64
+ const legacy = ['automatic-update.mjs', 'ruvnet-gate1-pattern.mjs', 'user-settings.mjs'];
65
+ const bridged = [...legacy, 'developer-update-owner.mjs'];
66
+ const currentLegacy = [...bridged, 'developer-update-policy.mjs'];
67
+ if (!modules?.['developer-update-policy.mjs'] && registration.mode === 'developer-suite') throw new Error('suite policy closure is missing');
68
+ if (registration.mode === 'developer-suite' && (!path.isAbsolute(modules['developer-update-policy.mjs'].path) || path.basename(modules['developer-update-policy.mjs'].path) !== 'developer-update-policy.mjs' || path.dirname(modules['developer-update-policy.mjs'].path) !== path.dirname(modules['automatic-update.mjs'].path) || !fs.lstatSync(modules['developer-update-policy.mjs'].path).isFile())) throw new Error('suite policy path identity mismatch');
69
+ if (registration.mode === 'developer-suite' && crypto.createHash('sha256').update(fs.readFileSync(modules['developer-update-policy.mjs'].path)).digest('hex') !== modules['developer-update-policy.mjs'].sha256) throw new Error('suite policy digest mismatch');
70
+ const executionPolicy = registration.mode === 'developer-suite' ? await import(pathToFileURL(modules['developer-update-policy.mjs'].path).href) : null;
71
+ const suite = executionPolicy ? [...new Set([...currentLegacy, ...executionPolicy.EXECUTION_MODULES])] : [];
72
+ const expected = registration.mode === 'developer-suite' ? [suite] : [legacy, bridged, currentLegacy];
73
+ if (!modules || !expected.some(names => Object.keys(modules).sort().join(',') === names.sort().join(','))) throw new Error('registered update module closure is missing');
65
74
  for (const [name, item] of Object.entries(modules)) {
66
75
  if (!path.isAbsolute(item.path) || path.basename(item.path) !== name
67
76
  || path.dirname(item.path) !== path.dirname(modules['automatic-update.mjs'].path)
68
77
  || !fs.lstatSync(item.path).isFile()
69
78
  || crypto.createHash('sha256').update(fs.readFileSync(item.path)).digest('hex') !== item.sha256) throw new Error('update module digest mismatch');
70
79
  }
80
+ if (registration.mode === 'developer-suite') {
81
+ const coordinator = await import(pathToFileURL(modules['developer-update.mjs'].path).href);
82
+ const receipt = await coordinator.runDeveloperUpdate({ mode: 'apply', env: { ...process.env,
83
+ RUVNET_NIGHTLY_IDENTITY: registration.identity, RUVNET_NIGHTLY: '1' } });
84
+ console.log(JSON.stringify(receipt));
85
+ process.exit(0);
86
+ }
71
87
  const policy = await import(pathToFileURL(modules['automatic-update.mjs'].path).href);
72
88
  process.env.PATH = policy.automaticPath({ nodePath: registration.nodePath });
73
89
  invocation = policy.automaticInvocation(['--update', '--no-nightly-prompt'], {