0xray 4.0.21 → 4.0.23

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 (103) hide show
  1. package/.grok-plugin/plugin.json +1 -1
  2. package/.opencode/skills/hermes-agent/SKILL.md +1 -1
  3. package/.opencode/skills/orchestrator/SKILL.md +28 -6
  4. package/.xray/features.json +1 -1
  5. package/AGENTS-consumer.md +11 -11
  6. package/AGENTS.md +8 -8
  7. package/README.md +27 -27
  8. package/SKILLS.md +1 -1
  9. package/dist/AGENTS.md +8 -8
  10. package/dist/CHANGELOG.md +98 -0
  11. package/dist/README.md +27 -27
  12. package/dist/SKILLS.md +1 -1
  13. package/dist/governance/governance-core.d.ts +2 -1
  14. package/dist/governance/governance-core.js +20 -11
  15. package/dist/governance/governance-service.js +9 -7
  16. package/dist/inference/inference-accumulator.js +36 -4
  17. package/dist/inference/inference-cycle.d.ts +12 -0
  18. package/dist/inference/inference-cycle.js +180 -21
  19. package/dist/inference/inference-proposal-generator.js +148 -5
  20. package/dist/inference/session-capture.d.ts +4 -0
  21. package/dist/integrations/cursor/README.md +1 -1
  22. package/dist/integrations/cursor/hooks/cursor-hook-utils.js +19 -0
  23. package/dist/integrations/cursor/hooks/pre-tool-use.js +2 -1
  24. package/dist/integrations/governance/index.d.ts +5 -0
  25. package/dist/integrations/governance/index.js +22 -2
  26. package/dist/integrations/governance/types.d.ts +11 -0
  27. package/dist/integrations/governance/types.js +16 -0
  28. package/dist/integrations/hooks/station-hook-runtime.cjs +90 -30
  29. package/dist/integrations/hooks/station-hook-runtime.mjs +1 -0
  30. package/dist/integrations/hooks/station-memory-ingest.mjs +4 -2
  31. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  32. package/dist/mcps/governance.server.d.ts +2 -0
  33. package/dist/mcps/governance.server.js +12 -1
  34. package/dist/memory-routing/index.d.ts +1 -1
  35. package/dist/memory-routing/index.js +1 -1
  36. package/dist/memory-routing/lesson-pickup.d.ts +2 -0
  37. package/dist/memory-routing/lesson-pickup.js +57 -0
  38. package/dist/memory-routing/provider-loader.d.ts +8 -1
  39. package/dist/memory-routing/provider-loader.js +49 -1
  40. package/dist/memory-routing/provider-registry.d.ts +7 -2
  41. package/dist/memory-routing/provider-registry.js +26 -6
  42. package/dist/memory-routing/record-lesson.d.ts +16 -0
  43. package/dist/memory-routing/record-lesson.js +26 -0
  44. package/dist/memory-routing/types.d.ts +15 -0
  45. package/dist/nucleus/thin-dispatch.d.ts +2 -0
  46. package/dist/nucleus/thin-dispatch.js +14 -4
  47. package/dist/processors/implementations/agents-md-validation-processor.js +1 -1
  48. package/dist/skills/hermes-agent/SKILL.md +1 -1
  49. package/dist/skills/orchestrator/SKILL.md +28 -6
  50. package/package.json +2 -2
  51. package/scripts/foundry/CHANGELOG.md +2 -0
  52. package/scripts/foundry/README.md +2 -2
  53. package/scripts/foundry/cli.mjs +1 -1
  54. package/scripts/foundry/inspect.mjs +160 -5
  55. package/scripts/foundry/plant/skills/inspect/SKILL.md +2 -0
  56. package/scripts/foundry/reconcile-version.mjs +23 -1
  57. package/scripts/foundry/release.mjs +1 -1
  58. package/scripts/foundry/validate-release-docs.mjs +24 -20
  59. package/scripts/foundry/version-manager.mjs +180 -7
  60. package/scripts/mjs/test-consumer-readiness.mjs +10 -3
  61. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  62. package/src/mcps/governance.server.ts +12 -1
  63. package/src/skills/hermes-agent/SKILL.md +1 -1
  64. package/src/skills/orchestrator/SKILL.md +28 -6
  65. package/vendor/@0xray/repertoire/data/stack-overlay.json +156 -3
  66. package/vendor/@0xray/repertoire/data/subject-overlay.json +3 -3
  67. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts +4 -0
  68. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +1 -1
  69. package/vendor/@0xray/repertoire/dist/RepertoireService.js +7 -6
  70. package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +1 -1
  71. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +1 -1
  72. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js +10 -11
  73. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +1 -1
  74. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +1 -1
  75. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js +5 -0
  76. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +1 -1
  77. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +1 -1
  78. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js +16 -0
  79. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +1 -1
  80. package/vendor/@0xray/repertoire/dist/paths.d.ts +3 -3
  81. package/vendor/@0xray/repertoire/dist/paths.d.ts.map +1 -1
  82. package/vendor/@0xray/repertoire/dist/paths.js +66 -4
  83. package/vendor/@0xray/repertoire/dist/paths.js.map +1 -1
  84. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts +11 -0
  85. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +1 -1
  86. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js +2 -0
  87. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +1 -1
  88. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +54 -4
  89. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -1
  90. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +375 -20
  91. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -1
  92. package/vendor/@0xray/repertoire/dist/types.d.ts +21 -0
  93. package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -1
  94. package/xray/agents_template.md +10 -5
  95. package/xray/features.json +1 -1
  96. package/dist/mcps/shared/prompt-security-validator.d.ts +0 -44
  97. package/dist/mcps/shared/prompt-security-validator.js +0 -148
  98. package/dist/mcps/shared/security-scanner.d.ts +0 -119
  99. package/dist/mcps/shared/security-scanner.js +0 -429
  100. package/dist/scripts/activate-kernel-pipeline.d.ts +0 -7
  101. package/dist/scripts/activate-kernel-pipeline.js +0 -101
  102. package/src/mcps/shared/prompt-security-validator.ts +0 -199
  103. package/src/mcps/shared/security-scanner.ts +0 -599
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0xray",
3
- "version": "4.0.21",
3
+ "version": "4.0.23",
4
4
  "description": "0xRay suit for Grok, Hermes, OpenClaw, OpenCode: mill+inspect, Codex, 7 MCP servers. Costume 45/42 is opt-in foundry, not the default wear.",
5
5
  "author": {
6
6
  "name": "0xRay AI",
@@ -64,7 +64,7 @@ Returns: pass/fail with per-file results and violations.
64
64
 
65
65
  ### xray_codex_check
66
66
 
67
- Validate code against the 60-term Universal Development Codex. Checks error-handling, type-safety, performance, security, architecture.
67
+ Validate code against the 69-term Universal Development Codex. Checks error-handling, type-safety, performance, security, architecture.
68
68
 
69
69
  ```
70
70
  xray_codex_check(code="const x: any = foo()", operation="create")
@@ -7,15 +7,15 @@ version: 1.0.0
7
7
  schema_version: "1.0"
8
8
  tags: [orchestration, orchestrator, lead-dev]
9
9
  capabilities:
10
- - coordinate_agents
11
- - delegate_tasks
12
- - manage_workflow
10
+ - coordinate_agents
11
+ - delegate_tasks
12
+ - manage_workflow
13
13
  dependencies: []
14
14
 
15
15
  mcp:
16
- orchestrator:
17
- command: node
18
- args: [node_modules/0xray/dist/mcps/orchestrator.server.js]
16
+ orchestrator:
17
+ command: node
18
+ args: [node_modules/0xray/dist/mcps/orchestrator.server.js]
19
19
  ---
20
20
 
21
21
  # Orchestrator Skill — includes lead-dev operating model
@@ -64,6 +64,10 @@ Config: `features.json` → `multi_agent_orchestration.lead_dev_mode`
64
64
 
65
65
  The seven rules are the engine. The cadence is the time signature. Disk SSOT: `grok-bot/ops/LEAD-CADENCE.md`.
66
66
 
67
+ Jargon is not the job. Review and cadence ask whether the change works. Do not spend the loop reciting dest names, mill liturgy, or host mantras.
68
+
69
+ - **Feat rebase:** when the mandated work turns into mantra, or the job has split across planes that no longer share one present, stop. Go up a level and answer the original message again from this seat. Do not continue the side thread and call that the job.
70
+
67
71
  - **Peer test:** another instance with only worn 0xRay continues the ticket. No command stream.
68
72
  - **Wear first:** Read `.xray/state/STATION.md`. Same cloud. Same critic (resume only). Dummy Reads Station.
69
73
  - **Dummy tests `SKILLS.md`:** a suited dummy proves the worn catalog. Same-sess bodies keep context and hold a Station card.
@@ -73,6 +77,24 @@ The seven rules are the engine. The cadence is the time signature. Disk SSOT: `g
73
77
  - **Live tick, not pacer:** `/loop` runs work now. Keep workstreams moving. Do not idle-wait 12 minutes. **Clean ticks every cycle** — unsubscribe then resubscribe so the prompt matches metal. Name-dedupe does not rewrite. A stale prompt (waiting URL after live, Hold after strip) is dirty: rewrite, do not act. **If the card and WAVEBOARD are idle, unsubscribe and do not resubscribe.**
74
78
  - **Board clock:** PR events + resume the same critic. Not two idle pacers. Merge after PASS+CI (gate A). Publish only after mill-gate D + `foundry gate`.
75
79
  - **Dispatch:** ticket + PR URLs + “Wear, then review.” The critic Reads `SEATS.md` Reviewer. Do not paste a command novel. When a law is spoken twice, encode it this wake.
80
+ - **Cascade:** Chat is not the brain. A cascade that must survive compaction is a named repertoire signal on the stack overlay, hydrated onto the project law list. NOTES holds the same cascade for the second Read. Station stays the ticket. A reflection is not this capture. Capture priority: a law is an invariant you would otherwise re-read the source to relearn. One law per subsystem bone. Heat touches last_seen and does not append a confidence sample, so more hits do not raise conviction. Heat touches last_seen when the diary contains that signal's name or a local clause of four definition content words; two definition words are not a hit; the same words scattered through a long diary are not a hit; a weak session score is not lifted to 0.55 and a sample below 0.55 is not recorded. Constructing the organ does not append workspace samples. Hero names: `heat-is-not-conviction`, `inference-cycle-invariant`, `governance-vote-invariant`, `thin-dispatch-invariant`. Repertoire mergeStackOverlay refreshes a changed stack definition and keeps observation stats. A floor observation count does not change a route. Feedback moves conviction by a tenth, and a failure can leave 0.55. learned-conviction.json beside dest restores that average when a wake flattens it to 0.55. It does not store the observation count.
81
+ - **Cold brief:** a new critic or any new subagent that does not already have this thread gets the latest commit SHA on the branch under review (fetch it; do not reuse an earlier SHA from a previous pass) and the Station card (`.xray/state/STATION.md`: intent, plan, git). If the card is missing, give branch + HEAD + what just changed. If the branch moves after you brief them, send the new SHA before they verdict.
82
+ - **Control:** The lead keeps control. Do not assume the subagent has the context. Give the duty, the latest SHA, the Station card, and the laws that apply. The subagent wears the applicable 0xRay suit before it works: the tree under review, built and installed. An older published package is not that suit. The lead checks the result.
83
+
84
+ ### Engine cadence
85
+
86
+ This suite is the engine that builds the engine. When a seat sees OP-PROC, write it onto these existing surfaces in the same wake. Do not open a new skill.
87
+
88
+ 1. Change the engine with precision.
89
+ 2. Ship it local: build and install the tree. A live npm version stays live. Once a version is live, the stamper strips every present-tense patch pin from shipped guides and shipped OP-PROC, or reconcile advances the next cut. The stamper does not edit Station, NOTES, dest, or node_modules. It does not publish.
90
+ 3. Test the change.
91
+ 4. Run another deep review of the diff you just made.
92
+ 5. Monitor long-term memory (dest name count and whether observations are the only growth) and short-term memory (Station: intent, plan, git).
93
+ 6. Ship the PR.
94
+
95
+ ### Planes
96
+
97
+ Operating planes: code, OP-PROC, model, suit, mill, host, and test/ship. Test/ship is the critical OP-PROC plane. Test then ship is the hero. Ship without that proof is the catastrophe. Long-term memory is the project law list. Each wake refreshes a changed stack definition and keeps observation stats. Heat writes the matched names onto Station, the short-term card that survives compaction. Reactive decisions move out of TypeScript into OP-PROC as the model improves. That move is why the mill and the suit exist. It is not fully proved. Once a version is live, the stamper strips every present-tense patch pin from shipped guides and shipped OP-PROC, or reconcile advances the next cut. The stamper does not edit Station, NOTES, dest, or node_modules. It does not publish. Do not freeze the live cut.
76
98
  - **Close:** loop until Station is done. Compact: Station survives the cut. Overlay dest names are OP-PROC — reload `repertoire-working.json` `opProcNames`, not Station.
77
99
  - **Board:** critic Strict comments; forge implements; lead stays main thread.
78
100
  - **Codex 69:** rewire this skill and existing ops. Do not add a new `SKILL.md` to hold the cadence.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "4.0.21",
3
+ "version": "4.0.23",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
5
  "suit_temperament": {
6
6
  "profile": "auto",
@@ -57,7 +57,7 @@ Governance deliberation uses **code-review**, **security-audit** (via enforcer/s
57
57
  | `npx 0xray hermes install` | Hermes plugin bridge |
58
58
  | `npx 0xray openclaw install` | OpenClaw config + skills |
59
59
  | `npx 0xray skill:install` | Install starter skills |
60
- | `npx 0xray validate` | Validate codex compliance |
60
+ | `npx 0xray validate` | Wear check (pack paths, Cursor hooks, mill, repertoire) — not leftover init.sh |
61
61
  | `npx 0xray codex check` | Check codex rules |
62
62
  | `npx 0xray health` | Framework health check |
63
63
  | `npx 0xray mcp <server>` | Start an MCP server (stdio) |
@@ -91,14 +91,14 @@ Configure in `.xray/features.json`:
91
91
 
92
92
  ```json
93
93
  "memory_routing": {
94
- "enabled": true,
95
- "provider": "repertoire",
96
- "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
97
- "config": {
98
- "signalsPath": ".xray/state/repertoire/curated_signals.json",
99
- "statePath": ".xray/state/repertoire/inference-state.json",
100
- "feedbackDir": ".xray/state/repertoire/feedback"
101
- }
94
+ "enabled": true,
95
+ "provider": "repertoire",
96
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
97
+ "config": {
98
+ "signalsPath": ".xray/state/repertoire/curated_signals.json",
99
+ "statePath": ".xray/state/repertoire/inference-state.json",
100
+ "feedbackDir": ".xray/state/repertoire/feedback"
101
+ }
102
102
  }
103
103
  ```
104
104
 
@@ -108,8 +108,8 @@ Configure in `.xray/features.json`:
108
108
 
109
109
  ```json
110
110
  "repertoire": {
111
- "command": "npx",
112
- "args": ["-y", "@0xray/repertoire", "mcp"]
111
+ "command": "npx",
112
+ "args": ["-y", "@0xray/repertoire", "mcp"]
113
113
  }
114
114
  ```
115
115
 
package/AGENTS.md CHANGED
@@ -67,14 +67,14 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
67
67
 
68
68
  ```json
69
69
  "memory_routing": {
70
- "enabled": true,
71
- "provider": "repertoire",
72
- "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
73
- "config": {
74
- "signalsPath": ".xray/state/repertoire/curated_signals.json",
75
- "statePath": ".xray/state/repertoire/inference-state.json",
76
- "feedbackDir": ".xray/state/repertoire/feedback"
77
- }
70
+ "enabled": true,
71
+ "provider": "repertoire",
72
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
73
+ "config": {
74
+ "signalsPath": ".xray/state/repertoire/curated_signals.json",
75
+ "statePath": ".xray/state/repertoire/inference-state.json",
76
+ "feedbackDir": ".xray/state/repertoire/feedback"
77
+ }
78
78
  }
79
79
  ```
80
80
 
package/README.md CHANGED
@@ -25,20 +25,20 @@ Consumer `npm install 0xray` auto-wires four chat bridges, Cursor project hooks,
25
25
  ## Quick Start
26
26
 
27
27
  ```bash
28
- npm install 0xray # postinstall: mill+inspect plant + 4 bridges + 7 MCPs + AGENTS.md + .mcp.json
29
- npx 0xray status # verify install
30
- npx 0xray setup # optional: symlinks, hook extras
31
- npx @0xray/foundry inspect --skip-live # mill receipt (chat is not a receipt)
28
+ npm install 0xray # postinstall: mill+inspect plant + 4 bridges + 7 MCPs + AGENTS.md + .mcp.json
29
+ npx 0xray status # verify install
30
+ npx 0xray setup # optional: symlinks, hook extras
31
+ npx @0xray/foundry inspect --skip-live # mill receipt (chat is not a receipt)
32
32
  ```
33
33
 
34
34
  Manual per-platform install (idempotent, same result as postinstall):
35
35
 
36
36
  ```bash
37
37
  npx 0xray opencode install
38
- npx 0xray grok install # 7 MCPs servers + project .grok/plugins/0xray (not machine last-wins)
38
+ npx 0xray grok install # 7 MCPs servers + project .grok/plugins/0xray (not machine last-wins)
39
39
  npx 0xray hermes install
40
40
  npx 0xray openclaw install
41
- npx 0xray skill:install # starter skills
41
+ npx 0xray skill:install # starter skills
42
42
  ```
43
43
 
44
44
  ## Autonomy command (default operating model)
@@ -81,16 +81,16 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
81
81
 
82
82
  ```
83
83
  ┌─────────────────────────────────────────────────┐
84
- │ Inference │
85
- │ Proposals · Reflection · Memory routing │
84
+ │ Inference │
85
+ │ Proposals · Reflection · Memory routing │
86
86
  ├─────────────────────────────────────────────────┤
87
- │ External Governance (Dynamo) │
88
- │ Codex enforcement · Resonance/Isotopic · SSOT │
89
- │ 3 deliberation MCPs: code-review, security, │
90
- │ researcher (within 7-server consumer surface) │
87
+ │ External Governance (Dynamo) │
88
+ │ Codex enforcement · Resonance/Isotopic · SSOT │
89
+ │ 3 deliberation MCPs: code-review, security, │
90
+ │ researcher (within 7-server consumer surface) │
91
91
  ├─────────────────────────────────────────────────┤
92
- │ Autonomous Engine (thinDispatch) │
93
- │ 7-flow · AsideContext · Confidence gate │
92
+ │ Autonomous Engine (thinDispatch) │
93
+ │ 7-flow · AsideContext · Confidence gate │
94
94
  └─────────────────────────────────────────────────┘
95
95
  ```
96
96
 
@@ -155,14 +155,14 @@ See [AGENTS.md](AGENTS.md) and [SKILLS.md](SKILLS.md) for the full agent and ski
155
155
 
156
156
  ```json
157
157
  "memory_routing": {
158
- "enabled": true,
159
- "provider": "repertoire",
160
- "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
161
- "config": {
162
- "signalsPath": ".xray/state/repertoire/curated_signals.json",
163
- "statePath": ".xray/state/repertoire/inference-state.json",
164
- "feedbackDir": ".xray/state/repertoire/feedback"
165
- }
158
+ "enabled": true,
159
+ "provider": "repertoire",
160
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
161
+ "config": {
162
+ "signalsPath": ".xray/state/repertoire/curated_signals.json",
163
+ "statePath": ".xray/state/repertoire/inference-state.json",
164
+ "feedbackDir": ".xray/state/repertoire/feedback"
165
+ }
166
166
  }
167
167
  ```
168
168
 
@@ -208,9 +208,9 @@ Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](
208
208
 
209
209
  ```bash
210
210
  npm test
211
- npm run pack:tmp-proof # pack → tmp fasten + hangar inspect
212
- npm run release:gate # full release gate (before upload)
213
- npm run release:npm # gate + prepare + npm publish --access public
211
+ npm run pack:tmp-proof # pack → tmp fasten + hangar inspect
212
+ npm run release:gate # full release gate (before upload)
213
+ npm run release:npm # gate + prepare + npm publish --access public
214
214
  ```
215
215
 
216
216
  ## Release
@@ -219,8 +219,8 @@ The **4.0** line is on npm. Do **not** run `release:major` to ship a 4.x fix (th
219
219
 
220
220
  ```bash
221
221
  npm run release:gate
222
- npm run release:npm # after gate is green; uses npm publish --access public
223
- npm run release:patch # version bump pipeline (not for an already-bumped package.json)
222
+ npm run release:npm # after gate is green; uses npm publish --access public
223
+ npm run release:patch # version bump pipeline (not for an already-bumped package.json)
224
224
  ```
225
225
 
226
226
  Pipeline: reconcile-version → release-gate (build + test + consumer smoke) → CHANGELOG/README/AGENTS artifacts → commit → tag → npm publish.
package/SKILLS.md CHANGED
@@ -129,7 +129,7 @@ xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume /
129
129
  Configured in project `.mcp.json` on postinstall:
130
130
 
131
131
  ```bash
132
- npx -y 0xray mcp skills # stdio server
132
+ npx -y 0xray mcp skills # stdio server
133
133
  ```
134
134
 
135
135
  MCP tools include: `invoke-skill`, `list-skills`, `skill-code-review`, `skill-security-audit`, `skill-api-design`, `skill-testing-strategy`, and more.
package/dist/AGENTS.md CHANGED
@@ -67,14 +67,14 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
67
67
 
68
68
  ```json
69
69
  "memory_routing": {
70
- "enabled": true,
71
- "provider": "repertoire",
72
- "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
73
- "config": {
74
- "signalsPath": ".xray/state/repertoire/curated_signals.json",
75
- "statePath": ".xray/state/repertoire/inference-state.json",
76
- "feedbackDir": ".xray/state/repertoire/feedback"
77
- }
70
+ "enabled": true,
71
+ "provider": "repertoire",
72
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
73
+ "config": {
74
+ "signalsPath": ".xray/state/repertoire/curated_signals.json",
75
+ "statePath": ".xray/state/repertoire/inference-state.json",
76
+ "feedbackDir": ".xray/state/repertoire/feedback"
77
+ }
78
78
  }
79
79
  ```
80
80
 
package/dist/CHANGELOG.md CHANGED
@@ -6,6 +6,104 @@ The format is based on [Conventional Commits](https://www.conventionalcommits.or
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ### Features
10
+ - **Feat rebase.** When the mandated work turns into mantra, or the job has split across planes that no longer share one present, stop and answer the original message again from this seat. On `LEAD-CADENCE.md`, the orchestrator skill, and the ship-ready mill gate. Project dest grows the name `feat-rebase` from the stack overlay. Not a new skill.
11
+
12
+ ### Fixed
13
+ - **A governed proposal teaches.** A route lookup does not write a lesson. When a vote finishes, the cycle grades the signals that proposal's sessions already named. A session that names a stored signal is graded even when that name appears once. Landed approaches and no wrong turn clear the solid band. A wrong turn stays below the cutoff. Earlier rejects of other codify proposals do not pull that grade down. Approve steps those signals up by a tenth. Reject steps them down by a tenth. Needs-revision, an abstain, a governance error, and a proposal whose sessions named nothing do not write. Proposal ids stay on the signal and the sessions not yet graded, so a later cycle does not teach those sessions again. A new session is a new id. Those ids remain after the history window of 50 fills, including with empty cycles. A proposal that carries an empty name list does not fall through to matching its text. A grade that passes appends one line — the task, the decision, and the approaches, solutions, or wrong turn from the sessions that named the law — on that signal and beside the average. The same task does not append again. The route for a law above 0.55 includes the law text and those lines, and Station's lessons section is refreshed from dest. Not a new skill.
14
+ - **Dynamo client on a required external call.** `govern_proposals` with external governance required starts `InferenceGovernanceIntegration` even when `inference_governance.enabled` is false. Boot still skips that client while the flag is off, and the inference cycle still uses the local matrix unless the flag is on or `XRAY_FORCE_MCP_GOVERNANCE=true`. An unreadable MCP payload is stored as the error text, not an abstain at 0.5. The MCP wait matches the governance budget (90s). Not a new skill.
15
+ - **Subsystem pass.** A session file with no `metrics.commits` is not a session, and a captured pattern with no `evidence` array is empty evidence, so the inference cycle no longer dies before it writes state. `scoreAndRoute` loads the memory organ on the first call with a synchronous require, before any dynamic import of that module. A cached null provider does not block that load, and a late null load does not replace an organ already in hand. Not a new skill.
16
+ - **Local governance pass.** When `inference_governance.enabled` is false, the inference cycle scores each proposal with the local decision matrix. That miss is not stored as a reject at confidence 0, and Dynamo is not called. The governance MCP path stays in place when the flag is on. Not a new skill.
17
+ - **Learned conviction.** A floor observation count does not change a route. Feedback moves conviction by a tenth, and a failure can leave 0.55. Retrieval hits a local clause of four definition content words. Two definition words are not a hit. The same words scattered through a long diary are not a hit. x402 prose alone is not a hit. `learned-conviction.json` beside dest restores the average when a wake flattens it to 0.55 and does not store the observation count. The vendored organ dist matches that behavior. Not a new skill.
18
+ - **Seeded conviction.** Load writes `learned-conviction.json` for dest averages already above 0.55, including historical averages with no evidence count. Evidence is the existing positive count, otherwise 1. Floor averages, including float dust at 0.55, stay out of the file. A later load restores those averages after a flatten. The vendored organ dist matches that behavior. Not a new skill.
19
+ - **Lock matches the cut.** `package-lock.json` root version and `packages[""].version` follow `package.json` on stamp. The 4.0.22 release left the lock at 4.0.21. Not a new skill.
20
+ - **Bumper writes the lock.** `reconcile --apply` updates `package.json` and the lock version fields together. `reconcile --check` (the docs mill in CI) fails when they differ. Not a new skill.
21
+ - **Cursor gate root.** The suit mill already has synthesis off. Cursor tools follow that mill when it is in the heat set, so a sibling repo's leftover synthesis checkpoint does not deny the host. Not a new skill.
22
+ - **Engine cadence.** Change the engine, ship it local (build and install the tree; a live cut stays live), test, review the diff, monitor dest and Station, then ship the PR. Missing moral fusion is not an isotopic reject; vote confidence is a clamped weighted mean; thinDispatch strategy follows the adjusted level; an empty inference cycle saves state and later getInstance options apply. On `LEAD-CADENCE.md`, the orchestrator skill, and the ship-ready mill gate. Not a new skill.
23
+ - **Operating planes.** Code, OP-PROC, model, suit, mill, host, and test/ship. Test then ship is the hero; ship without that proof is the catastrophe. Project long-term memory refreshes a changed stack definition and keeps observation stats. Heat writes the matched names onto Station. Name `operating-planes` on the stack overlay. Not a new skill.
24
+ - **Wake cascade.** Chat is not the brain. A cascade that must survive compaction is the repertoire name `wake-cascade` on the stack overlay, with the same text in NOTES for the second Read. A reflection is not this capture. Not a new skill.
25
+ - **Hero invariants.** Capture priority is an invariant you would otherwise re-read the source to relearn. Names: `heat-is-not-conviction`, `inference-cycle-invariant`, `governance-vote-invariant`, `thin-dispatch-invariant`. Heat touches last_seen and does not append a confidence sample. Heat touches last_seen when the diary contains that signal's name or a local clause of four definition content words; two definition words are not a hit; the same words scattered through a long diary are not a hit; a weak session score is not lifted to 0.55 and a sample below 0.55 is not recorded. Constructing the organ does not append workspace samples. Repertoire `mergeStackOverlay` refreshes a changed stack definition and keeps observation stats. Not a new skill.
26
+ - **Stamper strip set.** Once a version is live, the stamper strips every present-tense patch pin from shipped guides and shipped OP-PROC, or reconcile advances the next cut. The stamper does not edit Station, NOTES, dest, or node_modules. It does not publish. The release docs check uses that same strip set, including `grok-bot/skills/ship-ready-mill-gate/SKILL.md`. Proposal text stays a keyword map over session problem strings, and `generateProposals` also emits recurring-pattern titles. Not a new skill.
27
+ - **Heat + capture leftover** — module-missing resume is `Repertoire: module unresolved`, not “memory_routing stays off”. Session capture writes `matched_primitives` from existing dest laws in git. Grow receipt is post-prune dest count + heated length. Leftover `provider: null` still migrates old tarballs; explicit opt-out stays `enabled: false` + `provider: repertoire`. Does not republish.
28
+
29
+ ### 📚 Documentation
30
+ - **Cold brief.** A new critic or any new subagent that does not already have this thread gets the latest commit SHA on the branch under review (fetch it) and the Station card. If the branch moves, send the new SHA before they verdict. On `LEAD-CADENCE.md` + ship-ready mill gate + orchestrator cadence. Not a new skill.
31
+ - **Jargon is not the job.** Review and cadence ask whether the change works. Do not spend the loop reciting dest names, mill liturgy, or host mantras. On `LEAD-CADENCE.md` + ship-ready mill gate + orchestrator cadence. Not a new Codex term.
32
+ - **Leftover after #102** — `station-vs-repertoire.md` opt-out ASCII no longer teaches package-absence (`no @0xray/repertoire` / `memory_routing stays off`). Explicit opt-out is `enabled: false` + `provider: repertoire`. Dead integrate note is history. Compact seed drops leftover “optional MCP”. `validate-release-docs` now gates that guide. Does not republish.
33
+ - **Leftover after #101** — stamp `package-lock.json` and `.xray/features.json` to the live package version. Rewire `updateFeaturesJsonVersion` so both features files stamp together. Guides that still called Repertoire optional now say preferred + explicit opt-out; Station is the compact ticket.
34
+
35
+ ### 🧹 Cleanup
36
+ - Drop unused `src/mcps/shared/security-scanner.ts` and its unused validator twin. Live scanner stays `src/security/`.
37
+ - Archive root `integrations/` costume SKILL dump → `docs/archive/integrations-costume/`. Live wear is `src/integrations`.
38
+ - Archive root `commands/` stale copy → `docs/archive/commands-copy/`. Live wear is `src/opencode/commands`.
39
+
40
+ ## [4.0.23] - 2026-09-23
41
+
42
+ ### 🔄 Changes
43
+
44
+ ### 🐛 Bug Fixes
45
+ - fix: start the Dynamo client when external governance is required (d17b9cf19)
46
+ - fix: score proposals locally when inference governance is off (ae8075116)
47
+ - fix: finish the inference cycle and load the organ before routing (69522e6c3)
48
+ - fix: vendor the organ that seeds conviction above the floor (103961128)
49
+ - fix: vendor the organ that routes on conviction, not a floor count (24d215a5a)
50
+ - fix: reconcile writes the lock version when it bumps (434ddafef)
51
+ - fix: package-lock version follows package.json on stamp (026c36d55)
52
+
53
+ ---
54
+
55
+ ## [4.0.22] - 2026-09-23
56
+
57
+ ### 🔄 Changes
58
+
59
+ ### ✨ Features
60
+ - feat: rebase — answer the original message from this seat (a9a9e432b)
61
+
62
+ ### 🐛 Bug Fixes
63
+ - fix: cursor gate follows the suit mill, not a sibling synthesis checkpoint (7a21cd996)
64
+ - fix: stamper strips every present-tense patch pin from shipped prose (4962b353f)
65
+ - fix: docs check uses the stamper strip set (f46377822)
66
+ - fix: stamper strips shipped prose only and proposals name recurring patterns (2b98354f7)
67
+ - fix: worn heat matches the signal id and dest keeps that law (9952f6dc2)
68
+ - fix: wake does not append a floor sample on heat (fe0492c98)
69
+ - fix: heat law matches the organ that touches last_seen (35390de44)
70
+ - fix: stack law refresh stays on the wake hook (f4a0c5d82)
71
+ - fix: store hero invariants as repertoire laws (9deed910b)
72
+ - fix: store the wake cascade as a repertoire law (ebf5aed8a)
73
+ - fix: test/ship plane and law refresh onto Station (87ad30bc5)
74
+ - fix: encode six planes and the live-cut hand (2eb24387e)
75
+ - fix: engine cadence and the three-module defects (d11b796d9)
76
+ - fix: heat resume and session match leftover after #103 (#104) (664a2039b)
77
+ - fix: persist heated length on the working receipt (2e28d1dbe)
78
+ - fix: heat resume and session match leftover (0f8b5b4ab)
79
+ - fix: leftover opt-out teaching after #102 (#103) (b8fc6bef7)
80
+ - fix: leftover stamps and dest-as-laws docs after #101 (#102) (910a739c4)
81
+ - fix: stamp leftover lock and worn features to the live package version (41f648d43)
82
+ - fix: dest stays laws — compact boot holds (#101) (9b731441d)
83
+ - fix: cleanse stale 4.0.15 pins and leftover validate wording (5ea8e0dff)
84
+
85
+ ### 📚 Documentation
86
+ - docs: cold brief is latest SHA plus Station (55c2497e4)
87
+ - docs: jargon is not the job — results first on cadence (3699a56d0)
88
+ - docs: leftover opt-out ASCII after #102 (3974a2920)
89
+ - docs: leftover Repertoire optional language after #101 (5f64b68f3)
90
+ - docs: archive unused v2-refactor harness and fix migrate leftover URLs (23042fb7e)
91
+ - docs: archive StringRay leftover reports and update mill seed (eaa85fe5a)
92
+
93
+ ### 🧪 Tests
94
+ - test: gate station-vs-repertoire opt-out leftover (aef80e538)
95
+
96
+ ### 🔧 Maintenance
97
+ - chore: drop unused MCP scanner twin and archive costume dumps (49fc4c96c)
98
+ - chore: drop leftover root test toys and stamp live 4.0.19 (5997a5924)
99
+ - chore: archive leftover sync-docs script that wipes the live site (a23205b5b)
100
+ - chore: alias leftover consumer check and drop blaze pipeline paths (ef98637d9)
101
+ - chore: archive unused duplicate e2e runners (7806bd21e)
102
+ - chore: tidy leftover CI harnesses, kernel repro, and live npm pins (fe1f08ad0)
103
+ - chore: tidy leftover vote harnesses, debug repro, and shipped Unreleased pins (05587368e)
104
+
105
+ ---
106
+
9
107
  ## [4.0.21] - 2026-09-23
10
108
 
11
109
  ### ✨ Features
package/dist/README.md CHANGED
@@ -25,20 +25,20 @@ Consumer `npm install 0xray` auto-wires four chat bridges, Cursor project hooks,
25
25
  ## Quick Start
26
26
 
27
27
  ```bash
28
- npm install 0xray # postinstall: mill+inspect plant + 4 bridges + 7 MCPs + AGENTS.md + .mcp.json
29
- npx 0xray status # verify install
30
- npx 0xray setup # optional: symlinks, hook extras
31
- npx @0xray/foundry inspect --skip-live # mill receipt (chat is not a receipt)
28
+ npm install 0xray # postinstall: mill+inspect plant + 4 bridges + 7 MCPs + AGENTS.md + .mcp.json
29
+ npx 0xray status # verify install
30
+ npx 0xray setup # optional: symlinks, hook extras
31
+ npx @0xray/foundry inspect --skip-live # mill receipt (chat is not a receipt)
32
32
  ```
33
33
 
34
34
  Manual per-platform install (idempotent, same result as postinstall):
35
35
 
36
36
  ```bash
37
37
  npx 0xray opencode install
38
- npx 0xray grok install # 7 MCPs servers + project .grok/plugins/0xray (not machine last-wins)
38
+ npx 0xray grok install # 7 MCPs servers + project .grok/plugins/0xray (not machine last-wins)
39
39
  npx 0xray hermes install
40
40
  npx 0xray openclaw install
41
- npx 0xray skill:install # starter skills
41
+ npx 0xray skill:install # starter skills
42
42
  ```
43
43
 
44
44
  ## Autonomy command (default operating model)
@@ -81,16 +81,16 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
81
81
 
82
82
  ```
83
83
  ┌─────────────────────────────────────────────────┐
84
- │ Inference │
85
- │ Proposals · Reflection · Memory routing │
84
+ │ Inference │
85
+ │ Proposals · Reflection · Memory routing │
86
86
  ├─────────────────────────────────────────────────┤
87
- │ External Governance (Dynamo) │
88
- │ Codex enforcement · Resonance/Isotopic · SSOT │
89
- │ 3 deliberation MCPs: code-review, security, │
90
- │ researcher (within 7-server consumer surface) │
87
+ │ External Governance (Dynamo) │
88
+ │ Codex enforcement · Resonance/Isotopic · SSOT │
89
+ │ 3 deliberation MCPs: code-review, security, │
90
+ │ researcher (within 7-server consumer surface) │
91
91
  ├─────────────────────────────────────────────────┤
92
- │ Autonomous Engine (thinDispatch) │
93
- │ 7-flow · AsideContext · Confidence gate │
92
+ │ Autonomous Engine (thinDispatch) │
93
+ │ 7-flow · AsideContext · Confidence gate │
94
94
  └─────────────────────────────────────────────────┘
95
95
  ```
96
96
 
@@ -155,14 +155,14 @@ See [AGENTS.md](AGENTS.md) and [SKILLS.md](SKILLS.md) for the full agent and ski
155
155
 
156
156
  ```json
157
157
  "memory_routing": {
158
- "enabled": true,
159
- "provider": "repertoire",
160
- "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
161
- "config": {
162
- "signalsPath": ".xray/state/repertoire/curated_signals.json",
163
- "statePath": ".xray/state/repertoire/inference-state.json",
164
- "feedbackDir": ".xray/state/repertoire/feedback"
165
- }
158
+ "enabled": true,
159
+ "provider": "repertoire",
160
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
161
+ "config": {
162
+ "signalsPath": ".xray/state/repertoire/curated_signals.json",
163
+ "statePath": ".xray/state/repertoire/inference-state.json",
164
+ "feedbackDir": ".xray/state/repertoire/feedback"
165
+ }
166
166
  }
167
167
  ```
168
168
 
@@ -208,9 +208,9 @@ Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](
208
208
 
209
209
  ```bash
210
210
  npm test
211
- npm run pack:tmp-proof # pack → tmp fasten + hangar inspect
212
- npm run release:gate # full release gate (before upload)
213
- npm run release:npm # gate + prepare + npm publish --access public
211
+ npm run pack:tmp-proof # pack → tmp fasten + hangar inspect
212
+ npm run release:gate # full release gate (before upload)
213
+ npm run release:npm # gate + prepare + npm publish --access public
214
214
  ```
215
215
 
216
216
  ## Release
@@ -219,8 +219,8 @@ The **4.0** line is on npm. Do **not** run `release:major` to ship a 4.x fix (th
219
219
 
220
220
  ```bash
221
221
  npm run release:gate
222
- npm run release:npm # after gate is green; uses npm publish --access public
223
- npm run release:patch # version bump pipeline (not for an already-bumped package.json)
222
+ npm run release:npm # after gate is green; uses npm publish --access public
223
+ npm run release:patch # version bump pipeline (not for an already-bumped package.json)
224
224
  ```
225
225
 
226
226
  Pipeline: reconcile-version → release-gate (build + test + consumer smoke) → CHANGELOG/README/AGENTS artifacts → commit → tag → npm publish.
package/dist/SKILLS.md CHANGED
@@ -129,7 +129,7 @@ xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume /
129
129
  Configured in project `.mcp.json` on postinstall:
130
130
 
131
131
  ```bash
132
- npx -y 0xray mcp skills # stdio server
132
+ npx -y 0xray mcp skills # stdio server
133
133
  ```
134
134
 
135
135
  MCP tools include: `invoke-skill`, `list-skills`, `skill-code-review`, `skill-security-audit`, `skill-api-design`, `skill-testing-strategy`, and more.
@@ -9,7 +9,8 @@
9
9
  import type { GovernanceVote, GovernanceResult } from './governance-types.js';
10
10
  export interface DecisionMatrixInput {
11
11
  resonance: number;
12
- isotopicRatio: number;
12
+ /** Present only when a real moralFusion number was supplied. Absent is not 0.5. */
13
+ isotopicRatio?: number;
13
14
  vortexVolume?: number;
14
15
  historicalCoherence?: number;
15
16
  solarActivity?: 'quiet' | 'moderate' | 'active' | 'storm';
@@ -61,22 +61,28 @@ export function applyDecisionMatrix(input) {
61
61
  voteWeight *= 1.05;
62
62
  reasons.push(`Moral alignment confirmed (score: ${(moralScore * 100).toFixed(0)}%)`);
63
63
  }
64
- if (resonance >= 0.92 && isotopicRatio >= 0.95) {
64
+ // Cutoffs stay the literals the tests lock (0.92/0.95, 0.82/0.88, 0.75/0.80).
65
+ // PHI and TAU are not those cutoffs, so reasons do not claim them.
66
+ const ratio = typeof isotopicRatio === 'number' && Number.isFinite(isotopicRatio) ? isotopicRatio : undefined;
67
+ const highBand = resonance >= 0.92 && (ratio === undefined || ratio >= 0.95);
68
+ const solidBand = resonance >= 0.82 && (ratio === undefined || ratio >= 0.88);
69
+ const belowCutoff = resonance < 0.75 || (ratio !== undefined && ratio < 0.80);
70
+ if (highBand) {
65
71
  recommendation = 'PASS';
66
72
  confidence = 0.97;
67
73
  voteWeight = 1.4;
68
- reasons.push('High symbiotic resonance (PHI-aligned)');
74
+ reasons.push('High symbiotic resonance');
69
75
  }
70
- else if (resonance >= 0.82 && isotopicRatio >= 0.88) {
76
+ else if (solidBand) {
71
77
  recommendation = 'PASS';
72
78
  confidence = 0.89;
73
79
  voteWeight = 1.15;
74
- reasons.push('Solid alignment above TAU threshold');
80
+ reasons.push('Solid alignment above the resonance cutoff');
75
81
  }
76
- else if (resonance < 0.75 || isotopicRatio < 0.80) {
82
+ else if (belowCutoff) {
77
83
  recommendation = 'REJECT';
78
84
  confidence = 0.84;
79
- reasons.push('Signal below critical threshold (1 - TAU)');
85
+ reasons.push('Signal below the critical resonance or isotopic cutoff');
80
86
  }
81
87
  else {
82
88
  reasons.push('Moderate resonance - requires refinement');
@@ -124,14 +130,17 @@ export function mergeVotes(votes) {
124
130
  reasoningSummary: 'No votes received',
125
131
  };
126
132
  }
133
+ const weightOf = (vote) => vote.weight ?? 1;
127
134
  const approveWeight = votes
128
135
  .filter(v => v.decision === 'approve')
129
- .reduce((sum, v) => sum + (v.weight ?? 1) * v.confidence, 0);
130
- const totalWeight = votes.reduce((sum, v) => sum + (v.weight ?? 1) * v.confidence, 0);
131
- const avgConfidence = totalWeight > 0 ? totalWeight / votes.length : 0.5;
136
+ .reduce((sum, v) => sum + weightOf(v) * v.confidence, 0);
137
+ const weightedConfidenceSum = votes.reduce((sum, v) => sum + weightOf(v) * v.confidence, 0);
138
+ const weightSum = votes.reduce((sum, v) => sum + weightOf(v), 0);
139
+ const rawMean = weightSum > 0 ? weightedConfidenceSum / weightSum : 0.5;
140
+ const avgConfidence = Math.min(1, Math.max(0, rawMean));
132
141
  let finalDecision = 'needs_revision';
133
- if (totalWeight > 0) {
134
- const approveRatio = approveWeight / totalWeight;
142
+ if (weightedConfidenceSum > 0) {
143
+ const approveRatio = approveWeight / weightedConfidenceSum;
135
144
  if (approveRatio > 0.66) {
136
145
  finalDecision = 'approve';
137
146
  }
@@ -136,22 +136,24 @@ export class GovernanceService {
136
136
  let finalDecision = merged.finalDecision;
137
137
  let averageConfidence = merged.averageConfidence;
138
138
  let moralOverride = 'none';
139
- if (externalVote?.moralTension ||
140
- externalVote?.moralScore != null ||
141
- externalVote?.moralFusion != null) {
139
+ if (externalVote &&
140
+ (externalVote.moralTension ||
141
+ externalVote.moralScore != null ||
142
+ externalVote.moralFusion != null)) {
142
143
  const matrixInput = {
143
144
  resonance: averageConfidence,
144
- isotopicRatio: externalVote.moralFusion ?? 0.5,
145
145
  };
146
+ const fusion = externalVote.moralFusion;
147
+ if (typeof fusion === 'number' && Number.isFinite(fusion)) {
148
+ matrixInput.isotopicRatio = fusion;
149
+ matrixInput.moralFusion = fusion;
150
+ }
146
151
  if (externalVote.moralTension != null) {
147
152
  matrixInput.moralTension = externalVote.moralTension;
148
153
  }
149
154
  if (externalVote.moralScore != null) {
150
155
  matrixInput.moralScore = externalVote.moralScore;
151
156
  }
152
- if (externalVote.moralFusion != null) {
153
- matrixInput.moralFusion = externalVote.moralFusion;
154
- }
155
157
  const matrix = applyDecisionMatrix(matrixInput);
156
158
  moralOverride = matrix.moralOverride ?? 'none';
157
159
  if (matrix.recommendation === 'REJECT') {