0xray 3.5.5 → 4.0.1

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 (233) hide show
  1. package/.mcp.json +18 -14
  2. package/.opencode/skills/api-design/SKILL.md +1 -1
  3. package/.opencode/skills/architect-tools/SKILL.md +1 -1
  4. package/.opencode/skills/architecture-patterns/SKILL.md +1 -1
  5. package/.opencode/skills/auto-format/SKILL.md +1 -1
  6. package/.opencode/skills/boot-orchestrator/SKILL.md +2 -6
  7. package/.opencode/skills/bug-triage/SKILL.md +1 -1
  8. package/.opencode/skills/code-analyzer/SKILL.md +1 -1
  9. package/.opencode/skills/code-review/SKILL.md +1 -1
  10. package/.opencode/skills/enforcer/SKILL.md +1 -1
  11. package/.opencode/skills/framework-compliance-audit/SKILL.md +1 -1
  12. package/.opencode/skills/git-workflow/SKILL.md +1 -1
  13. package/.opencode/skills/hermes-agent/SKILL.md +36 -36
  14. package/.opencode/skills/inference-improve/SKILL.md +1 -1
  15. package/.opencode/skills/lint/SKILL.md +1 -1
  16. package/.opencode/skills/log-monitor/SKILL.md +1 -1
  17. package/.opencode/skills/model-health-check/SKILL.md +1 -1
  18. package/.opencode/skills/multimodal-looker/SKILL.md +1 -1
  19. package/.opencode/skills/orchestrator/SKILL.md +38 -14
  20. package/.opencode/skills/performance-analysis/SKILL.md +1 -1
  21. package/.opencode/skills/performance-optimization/SKILL.md +1 -1
  22. package/.opencode/skills/processor-pipeline/SKILL.md +1 -1
  23. package/.opencode/skills/project-analysis/SKILL.md +1 -1
  24. package/.opencode/skills/refactoring-strategies/SKILL.md +1 -1
  25. package/.opencode/skills/registry.json +65 -0
  26. package/.opencode/skills/researcher/SKILL.md +18 -5
  27. package/.opencode/skills/security-audit/SKILL.md +1 -1
  28. package/.opencode/skills/security-scan/SKILL.md +1 -1
  29. package/.opencode/skills/session-management/SKILL.md +1 -1
  30. package/.opencode/skills/state-manager/SKILL.md +1 -1
  31. package/.opencode/skills/storyteller/SKILL.md +1 -1
  32. package/.opencode/skills/strategist/SKILL.md +12 -0
  33. package/.opencode/skills/testing-best-practices/SKILL.md +37 -0
  34. package/.opencode/skills/testing-strategy/SKILL.md +14 -3
  35. package/.opencode/skills/ui-ux-design/SKILL.md +1 -1
  36. package/.opencode/skills/xray-orchestrator/index.ts +267 -0
  37. package/.xray/codex.json +12 -3
  38. package/.xray/features.json +28 -6
  39. package/.xray/features.schema.json +31 -0
  40. package/AGENTS-consumer.md +17 -7
  41. package/AGENTS.md +18 -10
  42. package/README.md +30 -27
  43. package/SKILLS.md +2 -2
  44. package/dist/AGENTS.md +18 -10
  45. package/dist/CHANGELOG.md +81 -11
  46. package/dist/README.md +30 -27
  47. package/dist/SKILLS.md +2 -2
  48. package/dist/cli/commands/hermes-install.js +3 -0
  49. package/dist/cli/commands/openclaw-install.js +14 -0
  50. package/dist/cli/index.js +10 -1
  51. package/dist/core/features-config.d.ts +15 -2
  52. package/dist/infrastructure/schemas/cloud-schemas.d.ts +1 -1
  53. package/dist/integrations/grok/grok-cli.d.ts +3 -0
  54. package/dist/integrations/grok/grok-cli.js +92 -4
  55. package/dist/integrations/grok/hooks/grok-hook-utils.js +53 -7
  56. package/dist/integrations/grok/hooks/post-tool-use.js +68 -46
  57. package/dist/integrations/grok/hooks/pre-tool-use.js +14 -31
  58. package/dist/integrations/grok/hooks/session-start.js +86 -4
  59. package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
  60. package/dist/integrations/hermes-agent/bridge.mjs +26 -1
  61. package/dist/integrations/hooks/delegation-gate-runtime.mjs +32 -3
  62. package/dist/integrations/hooks/pipeline-hook-runtime.mjs +1 -1
  63. package/dist/integrations/hooks/station-hook-runtime.cjs +421 -0
  64. package/dist/integrations/hooks/station-hook-runtime.mjs +24 -0
  65. package/dist/integrations/hooks/station-memory-ingest.mjs +45 -0
  66. package/dist/integrations/hooks/station-memory-match.mjs +47 -0
  67. package/dist/integrations/openclaw/client.d.ts +5 -1
  68. package/dist/integrations/openclaw/client.js +17 -9
  69. package/dist/integrations/openclaw/config.js +0 -1
  70. package/dist/integrations/openclaw/hooks/pre-tool-gate-runtime.mjs +102 -0
  71. package/dist/integrations/openclaw/index.js +17 -0
  72. package/dist/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
  73. package/dist/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
  74. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +12 -0
  75. package/dist/integrations/openclaw/pre-tool-gate.d.ts +19 -0
  76. package/dist/integrations/openclaw/pre-tool-gate.js +39 -0
  77. package/dist/mcps/orchestrator/handlers/complexity-handler.js +2 -2
  78. package/dist/memory-routing/index.d.ts +1 -1
  79. package/dist/memory-routing/index.js +1 -1
  80. package/dist/memory-routing/provider-loader.d.ts +4 -0
  81. package/dist/memory-routing/provider-loader.js +44 -2
  82. package/dist/memory-routing/provider-registry.js +3 -2
  83. package/dist/nucleus/autonomy-kernel.d.ts +2 -2
  84. package/dist/nucleus/autonomy-kernel.js +17 -6
  85. package/dist/nucleus/confer.js +17 -3
  86. package/dist/nucleus/delegation-gate.d.ts +14 -8
  87. package/dist/nucleus/delegation-gate.js +151 -16
  88. package/dist/nucleus/suit-temperament.d.ts +40 -0
  89. package/dist/nucleus/suit-temperament.js +157 -0
  90. package/dist/nucleus/user-aside.js +1 -1
  91. package/dist/plugin/xray-codex-injection.js +14 -3
  92. package/dist/postprocessor/triggers/GitHookTrigger.js +11 -5
  93. package/opencode.json +80 -0
  94. package/package.json +15 -5
  95. package/scripts/hooks/install-hooks.cjs +18 -3
  96. package/scripts/hooks/run-hook.js +67 -3
  97. package/scripts/mjs/run-repertoire-mcp.mjs +39 -0
  98. package/scripts/mjs/verify-confer-core.mjs +1 -1
  99. package/scripts/mjs/verify-delegation-gate-core.mjs +29 -2
  100. package/scripts/mjs/verify-four-floor-compact.mjs +524 -0
  101. package/scripts/mjs/verify-pipeline-facets.mjs +215 -0
  102. package/scripts/mjs/verify-temperament-live.mjs +261 -0
  103. package/scripts/node/bridge-mcp-wiring.cjs +277 -29
  104. package/scripts/node/consumer-install-smoke.mjs +55 -2
  105. package/scripts/node/install-bridges.cjs +195 -33
  106. package/scripts/node/postinstall.cjs +50 -27
  107. package/scripts/node/reconcile-version.mjs +0 -4
  108. package/scripts/node/release-gate.mjs +1 -1
  109. package/scripts/node/release.mjs +2 -2
  110. package/scripts/node/universal-version-manager.js +1 -1
  111. package/scripts/node/validate-release-docs.mjs +20 -33
  112. package/scripts/node/version-manager.mjs +63 -18
  113. package/src/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
  114. package/src/integrations/openclaw/README.md +134 -0
  115. package/src/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
  116. package/src/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
  117. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +12 -0
  118. package/src/mcps/orchestrator/handlers/complexity-handler.ts +2 -1
  119. package/vendor/@0xray/repertoire/AGENTS.md +163 -0
  120. package/vendor/@0xray/repertoire/LICENSE +21 -0
  121. package/vendor/@0xray/repertoire/README.md +120 -0
  122. package/vendor/@0xray/repertoire/data/curated_signals.json +208 -0
  123. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts +78 -0
  124. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +1 -0
  125. package/vendor/@0xray/repertoire/dist/RepertoireService.js +153 -0
  126. package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +1 -0
  127. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts +39 -0
  128. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts.map +1 -0
  129. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js +60 -0
  130. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js.map +1 -0
  131. package/vendor/@0xray/repertoire/dist/index.d.ts +14 -0
  132. package/vendor/@0xray/repertoire/dist/index.d.ts.map +1 -0
  133. package/vendor/@0xray/repertoire/dist/index.js +14 -0
  134. package/vendor/@0xray/repertoire/dist/index.js.map +1 -0
  135. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts +26 -0
  136. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts.map +1 -0
  137. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js +109 -0
  138. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js.map +1 -0
  139. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts +18 -0
  140. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts.map +1 -0
  141. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js +94 -0
  142. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js.map +1 -0
  143. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts +7 -0
  144. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts.map +1 -0
  145. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js +18 -0
  146. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js.map +1 -0
  147. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts +31 -0
  148. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +1 -0
  149. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js +83 -0
  150. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +1 -0
  151. package/vendor/@0xray/repertoire/dist/mcp/server.d.ts +6 -0
  152. package/vendor/@0xray/repertoire/dist/mcp/server.d.ts.map +1 -0
  153. package/vendor/@0xray/repertoire/dist/mcp/server.js +173 -0
  154. package/vendor/@0xray/repertoire/dist/mcp/server.js.map +1 -0
  155. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts +27 -0
  156. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts.map +1 -0
  157. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js +107 -0
  158. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js.map +1 -0
  159. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts +11 -0
  160. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts.map +1 -0
  161. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js +32 -0
  162. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js.map +1 -0
  163. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts +9 -0
  164. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +1 -0
  165. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js +72 -0
  166. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +1 -0
  167. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts +5 -0
  168. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts.map +1 -0
  169. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js +18 -0
  170. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js.map +1 -0
  171. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts +31 -0
  172. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +1 -0
  173. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js +218 -0
  174. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +1 -0
  175. package/vendor/@0xray/repertoire/dist/paths.d.ts +24 -0
  176. package/vendor/@0xray/repertoire/dist/paths.d.ts.map +1 -0
  177. package/vendor/@0xray/repertoire/dist/paths.js +74 -0
  178. package/vendor/@0xray/repertoire/dist/paths.js.map +1 -0
  179. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts +141 -0
  180. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +1 -0
  181. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js +210 -0
  182. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +1 -0
  183. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +48 -0
  184. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -0
  185. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +221 -0
  186. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -0
  187. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts +11 -0
  188. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts.map +1 -0
  189. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js +43 -0
  190. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js.map +1 -0
  191. package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts +15 -0
  192. package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts.map +1 -0
  193. package/vendor/@0xray/repertoire/dist/registry/signal-prune.js +35 -0
  194. package/vendor/@0xray/repertoire/dist/registry/signal-prune.js.map +1 -0
  195. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts +3 -0
  196. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts.map +1 -0
  197. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js +24 -0
  198. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js.map +1 -0
  199. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts +24 -0
  200. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts.map +1 -0
  201. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js +148 -0
  202. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js.map +1 -0
  203. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts +4 -0
  204. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts.map +1 -0
  205. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js +44 -0
  206. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js.map +1 -0
  207. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts +22 -0
  208. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts.map +1 -0
  209. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js +66 -0
  210. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js.map +1 -0
  211. package/vendor/@0xray/repertoire/dist/types.d.ts +210 -0
  212. package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -0
  213. package/vendor/@0xray/repertoire/dist/types.js +2 -0
  214. package/vendor/@0xray/repertoire/dist/types.js.map +1 -0
  215. package/vendor/@0xray/repertoire/docs/MEMORY-ROUTING-PROVIDER.md +54 -0
  216. package/vendor/@0xray/repertoire/hermes-mcp.example.json +20 -0
  217. package/vendor/@0xray/repertoire/mcp-config.example.json +11 -0
  218. package/vendor/@0xray/repertoire/package.json +124 -0
  219. package/vendor/@0xray/repertoire/schemas/curated-signal.schema.json +68 -0
  220. package/vendor/@0xray/repertoire/schemas/inference-log.schema.json +82 -0
  221. package/vendor/@0xray/repertoire/scripts/confirm-suit-all.mjs +253 -0
  222. package/vendor/@0xray/repertoire/scripts/confirm-suit-harness.mjs +220 -0
  223. package/vendor/@0xray/repertoire/scripts/run-live-synthesis-checkpoint.mjs +215 -0
  224. package/vendor/@0xray/repertoire/scripts/suit-bridge-shared.mjs +139 -0
  225. package/vendor/@0xray/repertoire/scripts/verify-grok-suit.mjs +304 -0
  226. package/vendor/@0xray/repertoire/scripts/verify-hermes-suit.mjs +163 -0
  227. package/vendor/@0xray/repertoire/scripts/verify-openclaw-suit.mjs +125 -0
  228. package/vendor/@0xray/repertoire/scripts/verify-opencode-suit.mjs +127 -0
  229. package/vendor/@0xray/repertoire/scripts/verify-synthesis-dogfood.mjs +207 -0
  230. package/vendor/@0xray/repertoire/skills/repertoire-trap-handling/SKILL.md +206 -0
  231. package/xray/codex.json +12 -3
  232. package/xray/features.json +28 -6
  233. package/xray/features.schema.json +31 -0
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: security-scan
4
4
  description: Security vulnerability scanning and assessment
5
- author: StrRay Framework
5
+ author: Xray Framework
6
6
  version: 1.0.0
7
7
  schema_version: "1.0"
8
8
  tags: [security, security, scan]
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: session-management
4
4
  description: Manage user sessions and persistent state
5
- author: StrRay Framework
5
+ author: Xray Framework
6
6
  version: 1.0.0
7
7
  schema_version: "1.0"
8
8
  tags: [infrastructure, session, management]
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: state-manager
4
4
  description: Application state management and persistence
5
- author: StrRay Framework
5
+ author: Xray Framework
6
6
  version: 1.0.0
7
7
  schema_version: "1.0"
8
8
  tags: [infrastructure, state, manager]
@@ -96,7 +96,7 @@ codex_terms: [5, 7, 32] # Related Codex term numbers
96
96
  ```markdown
97
97
  ## What Next?
98
98
 
99
- - Related Codex terms: [codex.json](../../.opencode/xray/codex.json)
99
+ - Related Codex terms: [codex.json](../../../../.xray/codex.json)
100
100
  - Next story to write: [suggestion]
101
101
  ```
102
102
 
@@ -30,3 +30,15 @@ Think deeply before recommending. Consider trade-offs and long-term implications
30
30
  - Risk analysis and mitigation planning
31
31
  - High-level system design and framework evolution
32
32
  - Technical debt identification and prioritization
33
+
34
+ ## When to invoke (autonomy-command)
35
+
36
+ Lead dev dispatches strategist when `analyze-complexity` score **>25** or work spans multiple repos/phases.
37
+
38
+ | Output required | Format |
39
+ |-----------------|--------|
40
+ | Phased plan | Phase N + goal + definition of done |
41
+ | Todo breakdown | ID, task, subagent assignment |
42
+ | Risks | Top 3 with mitigations |
43
+
44
+ Use `orchestrate-task` or Task subagent. Return actionable todos — not essays.
@@ -0,0 +1,37 @@
1
+ ---
2
+ source: framework
3
+ name: testing-best-practices
4
+ description: Testing best practices and quality assurance
5
+ author: Xray Framework
6
+ version: 1.0.0
7
+ schema_version: "1.0"
8
+ tags: [testing, testing, best, practices]
9
+ capabilities:
10
+ - write_unit_tests
11
+ - write_integration_tests
12
+ - analyze_coverage
13
+ dependencies: []
14
+
15
+ mcp:
16
+ testing-best-practices:
17
+ command: node
18
+ args: [node_modules/0xray/dist/mcps/knowledge-skills/testing-best-practices.server.js]
19
+ ---
20
+
21
+ # Testing Best Practices Skill
22
+
23
+ Testing best practices and quality assurance.
24
+
25
+ ## Tools Available
26
+
27
+ - **testing_practices**: Testing practices
28
+ - **quality_assurance**: Quality assurance
29
+ - **best_practices**: Best practices
30
+
31
+ ## Usage
32
+
33
+ This skill provides testing capabilities for testing best practices functionality.
34
+
35
+ ## Integration
36
+
37
+ Activated when testing capabilities are requested through the skills system.
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: testing-strategy
4
4
  description: Design comprehensive testing strategies and optimize test coverage
5
- author: StrRay Framework
5
+ author: Xray Framework
6
6
  version: 1.0.0
7
7
  schema_version: "1.0"
8
8
  tags: [testing, strategy, coverage, quality]
@@ -38,6 +38,17 @@ This skill helps design and optimize testing strategies for:
38
38
  - Test coverage optimization
39
39
  - Testing best practices implementation
40
40
 
41
- ## Integration
41
+ ## Per-suite triage (autonomy-command rule 3)
42
42
 
43
- Provides testing expertise and coverage analysis when requested through the skills system.
43
+ After major changes, **do not** run the full test suite first.
44
+
45
+ ```text
46
+ 1. Identify affected test file(s) from the diff
47
+ 2. Run ONE suite: npm test -- path/to/focused.test.ts
48
+ 3. Read ALL failure output — triage root cause
49
+ 4. Fix → rerun that suite until green
50
+ 5. Repeat for each affected suite
51
+ 6. Only then: npm test (full suite gate)
52
+ ```
53
+
54
+ Lead dev owns every failure. No "pre-existing" deferrals.
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: ui-ux-design
4
4
  description: User interface and user experience design with mobile-first approach, cognitive simplicity, and accessibility-first principles
5
- author: StrRay Framework
5
+ author: Xray Framework
6
6
  version: 2.1.0
7
7
  schema_version: "1.0"
8
8
  tags: [design, ui, ux, accessibility, mobile-first, visual-hierarchy, wcag, contrast, color-theory, dont-make-me-think]
@@ -0,0 +1,267 @@
1
+ /**
2
+ * xray Orchestrator Skill
3
+ *
4
+ * OpenClaw skill that provides xray orchestration commands.
5
+ *
6
+ * @since 2026-03-14
7
+ */
8
+
9
+ const API_BASE = process.env.XRAY_API_URL || 'http://localhost:18431';
10
+ const API_KEY = process.env.XRAY_API_KEY;
11
+
12
+ interface ParsedArgs extends Record<string, unknown> {
13
+ _?: string[];
14
+ }
15
+
16
+ function parseArgs(input: string): { command: string; args: ParsedArgs } {
17
+ const parts = input.trim().split(/\s+/);
18
+ const command = parts[0] || '';
19
+ const args: ParsedArgs = {};
20
+
21
+ for (const part of parts.slice(1)) {
22
+ if (part.startsWith('--')) {
23
+ const key = part.slice(2);
24
+ args[key] = true;
25
+ } else if (part.includes(':')) {
26
+ const colonIdx = part.indexOf(':');
27
+ const key = part.slice(0, colonIdx);
28
+ const value = part.slice(colonIdx + 1);
29
+ if (key && value) args[key] = value;
30
+ } else if (!args._) {
31
+ args._ = [];
32
+ args._.push(part);
33
+ } else {
34
+ args._.push(part);
35
+ }
36
+ }
37
+
38
+ return { command, args };
39
+ }
40
+
41
+ async function callAPI(endpoint: string, data?: Record<string, unknown>): Promise<Record<string, unknown>> {
42
+ const headers: Record<string, string> = {
43
+ 'Content-Type': 'application/json',
44
+ };
45
+
46
+ if (API_KEY) {
47
+ headers['Authorization'] = `Bearer ${API_KEY}`;
48
+ }
49
+
50
+ const response = await fetch(`${API_BASE}${endpoint}`, {
51
+ method: data ? 'POST' : 'GET',
52
+ headers,
53
+ body: data ? JSON.stringify(data) : null,
54
+ });
55
+
56
+ if (!response.ok) {
57
+ const error = await response.json().catch(() => ({ error: 'Unknown error' }));
58
+ throw new Error(error.error || `HTTP ${response.status}`);
59
+ }
60
+
61
+ return response.json();
62
+ }
63
+
64
+ export async function handleSkill(input: string): Promise<string> {
65
+ const { command, args } = parseArgs(input);
66
+
67
+ try {
68
+ switch (command.toLowerCase()) {
69
+ // xray primary
70
+ case 'xray':
71
+ case 'xray-status':
72
+ return await handleStatus();
73
+
74
+ case 'xray-analyze':
75
+ return await handleAnalyze(args);
76
+
77
+ case 'xray-code':
78
+ return await handleCodeReview(args);
79
+
80
+ case 'xray-file':
81
+ return await handleFileRead(args);
82
+
83
+ case 'xray-exec':
84
+ return await handleExec(args);
85
+
86
+ case 'xray-help':
87
+ return handleHelp(args._ as string | undefined);
88
+
89
+ default:
90
+ return formatHelp();
91
+ }
92
+ } catch (error) {
93
+ const message = error instanceof Error ? error.message : String(error);
94
+ return `❌ Error: ${message}`;
95
+ }
96
+ }
97
+
98
+ async function handleStatus(): Promise<string> {
99
+ const health = await callAPI('/health') as { status: string; version: string; uptime: number };
100
+
101
+ return `🤖 xray Status
102
+
103
+ • Status: ${health.status}
104
+ • Version: ${health.version}
105
+ • Uptime: ${formatUptime(health.uptime)}
106
+
107
+ Use /xray-help for available commands.`;
108
+ }
109
+
110
+ async function handleAnalyze(args: Record<string, unknown>): Promise<string> {
111
+ const filePath = (args._ as string[])?.[0];
112
+
113
+ if (!filePath) {
114
+ return '❌ Usage: /xray-analyze <file-path>';
115
+ }
116
+
117
+ const result = await callAPI('/api/agent/invoke', {
118
+ command: 'analyze',
119
+ args: { filePath },
120
+ }) as { success: boolean; result?: unknown; error?: string };
121
+
122
+ if (!result.success) {
123
+ return `❌ Analysis failed: ${result.error}`;
124
+ }
125
+
126
+ return `✅ Analysis complete for ${filePath}\n\n${JSON.stringify(result.result, null, 2)}`;
127
+ }
128
+
129
+ async function handleCodeReview(args: Record<string, unknown>): Promise<string> {
130
+ const filePath = (args._ as string[])?.[0];
131
+ const fix = args.fix === true;
132
+
133
+ if (!filePath) {
134
+ return '❌ Usage: /xray-code <file-path> [--fix]';
135
+ }
136
+
137
+ const result = await callAPI('/api/agent/invoke', {
138
+ command: 'code-review',
139
+ args: { filePath, fix },
140
+ }) as { success: boolean; result?: unknown; error?: string };
141
+
142
+ if (!result.success) {
143
+ return `❌ Code review failed: ${result.error}`;
144
+ }
145
+
146
+ return `✅ Code review complete for ${filePath}\n\n${JSON.stringify(result.result, null, 2)}`;
147
+ }
148
+
149
+ async function handleFileRead(args: Record<string, unknown>): Promise<string> {
150
+ const rest = args._ as string[] | undefined;
151
+ const filePath = rest?.[0];
152
+ const range = rest?.[1];
153
+
154
+ if (!filePath) {
155
+ return '❌ Usage: /xray-file <file-path> [line-start:line-end]';
156
+ }
157
+
158
+ let lineRange: { start?: number; end?: number } | undefined;
159
+ if (range?.includes(':')) {
160
+ const [rawStart, rawEnd] = range.split(':');
161
+ lineRange = {};
162
+ if (rawStart) lineRange.start = Number(rawStart);
163
+ if (rawEnd) lineRange.end = Number(rawEnd);
164
+ }
165
+
166
+ const result = await callAPI('/api/agent/invoke', {
167
+ command: 'read',
168
+ args: { filePath, ...lineRange },
169
+ }) as { success: boolean; result?: unknown; error?: string };
170
+
171
+ if (!result.success) {
172
+ return `❌ File read failed: ${result.error}`;
173
+ }
174
+
175
+ return `📄 ${filePath}\n\`\`\`\n${result.result}\n\`\`\``;
176
+ }
177
+
178
+ async function handleExec(args: Record<string, unknown>): Promise<string> {
179
+ const command = (args._ as string[])?.[0];
180
+
181
+ if (!command) {
182
+ return '❌ Usage: /xray-exec <command>';
183
+ }
184
+
185
+ const result = await callAPI('/api/agent/invoke', {
186
+ command: 'exec',
187
+ args: { command },
188
+ }) as { success: boolean; result?: unknown; error?: string };
189
+
190
+ if (!result.success) {
191
+ return `❌ Execution failed: ${result.error}`;
192
+ }
193
+
194
+ return `✅ Command executed\n\n${JSON.stringify(result.result, null, 2)}`;
195
+ }
196
+
197
+ function handleHelp(command?: string): string {
198
+ if (command) {
199
+ switch (command) {
200
+ case 'xray-analyze':
201
+ return `📖 /xray-analyze <file-path>
202
+
203
+ Analyze code in a file.
204
+
205
+ Example: /xray-analyze src/index.ts`;
206
+
207
+ case 'xray-code':
208
+ return `📖 /xray-code <file-path> [--fix]
209
+
210
+ Perform code review on a file.
211
+ Use --fix to attempt automatic fixes.
212
+
213
+ Example: /xray-code src/utils/helper.ts
214
+ Example: /xray-code src/utils/helper.ts --fix`;
215
+
216
+ case 'xray-file':
217
+ return `📖 /xray-file <file-path> [line-start:line-end]
218
+
219
+ Read a file.
220
+ Optionally specify line range.
221
+
222
+ Example: /xray-file src/index.ts
223
+ Example: /xray-file src/index.ts 1:50`;
224
+
225
+ case 'xray-exec':
226
+ return `📖 /xray-exec <command>
227
+
228
+ Execute an arbitrary command.
229
+
230
+ Example: /xray-exec list files src/`;
231
+
232
+ default:
233
+ return `Unknown command: ${command}`;
234
+ }
235
+ }
236
+
237
+ return formatHelp();
238
+ }
239
+
240
+ function formatHelp(): string {
241
+ return `🤖 xray Orchestrator
242
+
243
+ Available Commands:
244
+ • /xray - Show status
245
+ • /xray-analyze <file> - Analyze code
246
+ • /xray-code <file> [--fix] - Code review
247
+ • /xray-file <file> [lines] - Read file
248
+ • /xray-exec <command> - Execute command
249
+ • /xray-help [command] - Show help
250
+
251
+ Use /xray-help <command> for detailed usage.`;
252
+ }
253
+
254
+ function formatUptime(ms: number): string {
255
+ const seconds = Math.floor(ms / 1000);
256
+ const minutes = Math.floor(seconds / 60);
257
+ const hours = Math.floor(minutes / 60);
258
+ const days = Math.floor(hours / 24);
259
+
260
+ if (days > 0) return `${days}d ${hours % 24}h`;
261
+ if (hours > 0) return `${hours}h ${minutes % 60}m`;
262
+ if (minutes > 0) return `${minutes}m`;
263
+ return `${seconds}s`;
264
+ }
265
+
266
+ // Export for OpenClaw
267
+ export default { handleSkill };
package/.xray/codex.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "3.1.0",
3
- "lastUpdated": "2026-06-05",
3
+ "lastUpdated": "2026-08-24",
4
4
  "errorPreventionTarget": 0.998,
5
5
  "terms": {
6
6
  "1": {
@@ -546,6 +546,14 @@
546
546
  "category": "process",
547
547
  "zeroTolerance": false,
548
548
  "enforcementLevel": "high"
549
+ },
550
+ "69": {
551
+ "number": 69,
552
+ "title": "No New MCP, Skill, or Handler Surface",
553
+ "description": "Do not add parallel APIs. Rewire existing MCP servers, skills, and orchestrator handlers. PreToolUse denies creating new src/mcps/*.server.ts, src/skills/*/SKILL.md, or orchestrator *-handler files. Existing files may be rewritten.",
554
+ "category": "process",
555
+ "zeroTolerance": true,
556
+ "enforcementLevel": "blocking"
549
557
  }
550
558
  },
551
559
  "interweaves": [
@@ -589,10 +597,11 @@
589
597
  "No type errors or any usage": true,
590
598
  "Agent spawns go through governor": true,
591
599
  "Subagent spawning prevented": true,
592
- "PostProcessor validation passes": true
600
+ "PostProcessor validation passes": true,
601
+ "No new MCP/skill/handler surface": true
593
602
  },
594
603
  "frameworkAlignment": {
595
604
  "OpenCode": "v1.1.1",
596
- "0xRay": "v2.0.0"
605
+ "0xRay": "v4.0.0"
597
606
  }
598
607
  }
@@ -1,7 +1,17 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "3.4.3",
3
+ "version": "4.0.1",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
+ "suit_temperament": {
6
+ "profile": "auto",
7
+ "host_defaults": {
8
+ "grok": "frontier",
9
+ "hermes": "guided",
10
+ "opencode": "guided",
11
+ "openclaw": "guided",
12
+ "generic": "guided"
13
+ }
14
+ },
5
15
  "token_optimization": {
6
16
  "enabled": true,
7
17
  "max_context_tokens": 20000,
@@ -37,11 +47,19 @@
37
47
  "auto_consult_major_work": true,
38
48
  "no_new_surface": true,
39
49
  "auto_chain_delegations": true,
50
+ "plan_stale_hours": 8,
51
+ "plan_archive_marker_hours": 24,
40
52
  "user_asides": {
41
53
  "enabled": true,
42
54
  "auto_provision_worktree": false
43
55
  }
44
56
  },
57
+ "grok_postprocessor_light": true,
58
+ "inference_session_capture": {
59
+ "enabled": true,
60
+ "min_commits": 3,
61
+ "lookback_commits": 20
62
+ },
45
63
  "autonomous_reporting": {
46
64
  "enabled": true,
47
65
  "interval_minutes": 60,
@@ -140,10 +158,14 @@
140
158
  "min_success_rate": 0.7
141
159
  },
142
160
  "memory_routing": {
143
- "enabled": false,
144
- "provider": "null",
145
- "module_path": "",
146
- "config": {}
161
+ "enabled": true,
162
+ "provider": "repertoire",
163
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
164
+ "config": {
165
+ "signalsPath": "node_modules/@0xray/repertoire/data/curated_signals.json",
166
+ "statePath": ".xray/state/repertoire/inference-state.json",
167
+ "feedbackDir": ".xray/state/repertoire/feedback"
168
+ }
147
169
  },
148
170
  "synthesis": {
149
171
  "enabled": false,
@@ -160,4 +182,4 @@
160
182
  "onChain": false
161
183
  }
162
184
  }
163
- }
185
+ }
@@ -84,6 +84,37 @@
84
84
  }
85
85
  }
86
86
  },
87
+ "grok_postprocessor_light": {
88
+ "type": "boolean",
89
+ "description": "Opt-in lightweight postprocessor marker + activity.log on Grok write tools"
90
+ },
91
+ "inference_session_capture": {
92
+ "type": "object",
93
+ "description": "git post-commit → captureSessionInference when commit threshold is met",
94
+ "properties": {
95
+ "enabled": { "type": "boolean" },
96
+ "min_commits": { "type": "integer", "minimum": 1 },
97
+ "lookback_commits": { "type": "integer", "minimum": 1 }
98
+ }
99
+ },
100
+ "suit_temperament": {
101
+ "type": "object",
102
+ "description": "0xRay 4.0 — constitution always on; ceremony scales by host. Missing key = guided (existing consumers unchanged).",
103
+ "properties": {
104
+ "profile": {
105
+ "type": "string",
106
+ "enum": ["auto", "frontier", "guided", "strict"],
107
+ "description": "auto = host_defaults (grok→frontier, hermes/opencode/openclaw→guided)"
108
+ },
109
+ "host_defaults": {
110
+ "type": "object",
111
+ "additionalProperties": {
112
+ "type": "string",
113
+ "enum": ["frontier", "guided", "strict"]
114
+ }
115
+ }
116
+ }
117
+ },
87
118
  "synthesis": {
88
119
  "type": "object",
89
120
  "properties": {
@@ -4,7 +4,15 @@
4
4
 
5
5
  Quick reference for the 0xRay AI orchestration framework (shipped to your project on `npm install 0xray`).
6
6
 
7
- **v3.5.5** — 7 MCP servers · 45 skills · 68 codex terms · 4 platform bridges
7
+ **v4.0.1** — a suit that survives the context window
8
+
9
+ Same **three-subsystem OS** as v2 (Inference · External Governance · Autonomous Engine). Constitution always on. Temperament scales ceremony. Four platform bridges. Repertoire organ ships **on** (vendored 0.2); opt out with `"enabled": false, "provider": "repertoire"`. Trim fat, do not gut the design.
10
+
11
+ **Governance always on** (Codex PreToolUse, no new surface, no `eval`). **Engine ceremony** (analyze-complexity before spawn, confer) is **guided** by default so free-model OpenCode/Hermes stay in check. Frontier hosts (Grok 4.6 class) with `suit_temperament.profile: auto` **warn** on spawn-without-plan instead of deny — the engine is still there. Existing `.xray/features.json` without `suit_temperament` stays **guided**. Docs: v3 from v2 · Suit temperament.
12
+
13
+ ## Hot-swap
14
+
15
+ Before other work, Read `.xray/state/STATION.md`. Compaction and host change are the same cut. Continue the card. Do not restart the job. Grok does not inject the card (OpenCode does) — this Read is the Grok contract. Do not thicken the Grok exo.
8
16
 
9
17
  ## Postinstall (automatic)
10
18
 
@@ -55,7 +63,7 @@ Governance deliberation uses **code-review**, **security-audit** (via enforcer/s
55
63
 
56
64
  xray operates under the three-subsystem model: **Inference** + **External Governance** (Dynamo Solar SSOT) + **Autonomous Engine** (thinDispatch 7-flow in MCP orchestrator). All actions are validated against the Universal Development Codex before execution.
57
65
 
58
- **Codex**: `.xray/codex.json` — **68 terms** across all agent interactions.
66
+ **Codex**: `.xray/codex.json` — **69 terms** across all agent interactions.
59
67
 
60
68
  ## thinDispatch Routing
61
69
 
@@ -76,14 +84,16 @@ Configure in `.xray/features.json`:
76
84
  "memory_routing": {
77
85
  "enabled": true,
78
86
  "provider": "repertoire",
79
- "module_path": "../repertoire/dist/provider/memory-routing-provider.js",
87
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
80
88
  "config": {
81
- "signalsPath": "../repertoire/data/curated_signals.json"
89
+ "signalsPath": "node_modules/@0xray/repertoire/data/curated_signals.json",
90
+ "statePath": ".xray/state/repertoire/inference-state.json",
91
+ "feedbackDir": ".xray/state/repertoire/feedback"
82
92
  }
83
93
  }
84
94
  ```
85
95
 
86
- Without Repertoire: `{ "enabled": false, "provider": "null" }`.
96
+ Opt out: `{ "enabled": false, "provider": "repertoire" }`.
87
97
 
88
98
  **External MCP** (Hermes/Grok): add Repertoire alongside 0xRay servers:
89
99
 
@@ -104,7 +114,7 @@ The Universal Development Codex (`.xray/codex.json`, **69 terms**) is enforced b
104
114
  |------|------|-------------|
105
115
  | 11 | No `any`, `@ts-ignore`, `@ts-expect-error` | PreToolUse deny on edits |
106
116
  | 29 | Security by design — no `eval()` | PreToolUse deny |
107
- | 59 | Complex work → orchestrator intake | PreToolUse deny `spawn_subagent` without plan |
117
+ | 59 | Complex work → orchestrator intake | **guided/strict:** PreToolUse **deny** spawn without plan. **frontier:** **warn** (allow) — engine still available; leftover-plan todo mismatch also warns. Codex 11/29/69 still **deny**. |
108
118
  | 67–68 | Best subagents + lead dev ownership | `analyze-complexity` + orchestrator skill |
109
119
  | **69** | **No new MCP/skill/handler surface** | PreToolUse deny new `*.server.ts`, `SKILL.md` |
110
120
 
@@ -123,7 +133,7 @@ When the suit is worn, **lead dev mode** is ON via existing config + hooks:
123
133
  | Test triage | PreToolUse hook | Per-suite hint on full `npm test` |
124
134
  | Playbook | **`orchestrator`** skill | Codex 59, 67–69 rules |
125
135
 
126
- **First substantive task:** `analyze-complexity` with `tasks` array — **required before** `spawn_subagent`. You are the **lead developer**. Users speak in goals, not keywords.
136
+ **First substantive task (guided/strict):** `analyze-complexity` with `tasks` array — **required before** `spawn_subagent`. **Frontier:** intake is optional; spawn without a plan **warns**. You are the **lead developer**. Users speak in goals, not keywords.
127
137
 
128
138
  | # | Rule |
129
139
  |---|------|
package/AGENTS.md CHANGED
@@ -1,15 +1,23 @@
1
1
  # xray Agents
2
2
 
3
- Quick reference for the xray AI orchestration framework (**v3.5.5**).
3
+ Quick reference for the xray AI orchestration framework (**v4.0.1**).
4
4
 
5
- **42 agents** · **45 skills** · **7 consumer MCP servers** · **68 codex terms** · **3,226 tests**
5
+ **v4.0.1** — a suit that survives the context window.
6
+
7
+ **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · Repertoire when it resolves.
8
+
9
+ **Temperament:** ceremony (analyze-complexity before spawn, confer) is **guided** by default so free-model OpenCode/Hermes stay in check. Frontier hosts (Grok 4.6 class) with `suit_temperament.profile: auto` **warn** on spawn-without-plan; Codex 11/29/69 still **deny**. Missing `suit_temperament` stays guided. See `docs-site/docs/architecture/v3-from-v2.md`.
10
+
11
+ ## Hot-swap
12
+
13
+ Before other work, Read `.xray/state/STATION.md`. Compaction and host change are the same cut. Continue the card. Do not restart the job. Grok does not inject the card (OpenCode does) — this Read is the Grok contract. Do not thicken the Grok exo.
6
14
 
7
15
  ## What is xray?
8
16
 
9
17
  xray provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation under the pure v2 three-subsystem model:
10
18
 
11
- - **Inference** — proposals, reflection, memory routing (optional)
12
- - **External Governance** — Dynamo Solar SSOT, 68-term Codex
19
+ - **Inference** — proposals, reflection, memory routing (Repertoire organ on in 4.0)
20
+ - **External Governance** — Dynamo Solar SSOT, 69-term Codex
13
21
  - **Autonomous Engine** — thinDispatch 7-flow, AsideContext, confidence gate
14
22
 
15
23
  Agents are declared in `src/opencode/agents/*.yml` — the YML SSOT. Skills live in `src/skills/*/SKILL.md` — see [SKILLS.md](SKILLS.md). Consumer projects receive slimmed copies via postinstall (`AGENTS-consumer.md` → `AGENTS.md`, skills synced to platform dirs).
@@ -30,12 +38,12 @@ Registered in `.mcp.json`, invoked via `npx -y 0xray mcp <cmd>`:
30
38
 
31
39
  Governance deliberation: **code-review**, **security-audit**, **researcher** within the 7-server set.
32
40
 
33
- ## Postinstall (v3.4.1)
41
+ ## Postinstall (v4.0.1)
34
42
 
35
43
  `postinstall.cjs` → `installAllBridges()`:
36
44
 
37
45
  1. `AGENTS-consumer.md` → `AGENTS.md`
38
- 2. `SKILLS.md` + 46 skills → platform skill directories
46
+ 2. `SKILLS.md` + 45 skills → platform skill directories
39
47
  3. `.gitignore.default` → `.gitignore` (if absent)
40
48
  4. `.xray/` config (`codex.json`, `features.json`, `config.json`)
41
49
  5. `.mcp.json` (7 servers)
@@ -50,11 +58,11 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
50
58
  "memory_routing": {
51
59
  "enabled": true,
52
60
  "provider": "repertoire",
53
- "module_path": "../repertoire/dist/provider/memory-routing-provider.js",
61
+ "module_path": "node_modules/@0xray/repertoire/dist/provider/memory-routing-provider.js",
54
62
  "config": {
55
- "dataDir": "../repertoire/data",
56
- "signalsPath": "../repertoire/data/curated_signals.json",
57
- "logDir": "../repertoire/logs/groover-inference"
63
+ "signalsPath": "node_modules/@0xray/repertoire/data/curated_signals.json",
64
+ "statePath": ".xray/state/repertoire/inference-state.json",
65
+ "feedbackDir": ".xray/state/repertoire/feedback"
58
66
  }
59
67
  }
60
68
  ```