0xray 3.5.4 → 4.0.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 (266) hide show
  1. package/.mcp.json +51 -7
  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 +32 -6
  39. package/.xray/features.schema.json +87 -0
  40. package/AGENTS-consumer.md +16 -6
  41. package/AGENTS.md +21 -3
  42. package/README.md +13 -10
  43. package/SKILLS.md +1 -1
  44. package/dist/AGENTS.md +21 -3
  45. package/dist/CHANGELOG.md +98 -0
  46. package/dist/README.md +13 -10
  47. package/dist/SKILLS.md +1 -1
  48. package/dist/cli/commands/hermes-install.js +6 -1
  49. package/dist/cli/commands/openclaw-install.js +14 -0
  50. package/dist/cli/index.js +0 -0
  51. package/dist/core/features-config.d.ts +30 -2
  52. package/dist/governance/governance-service.d.ts +1 -0
  53. package/dist/governance/governance-service.js +81 -6
  54. package/dist/infrastructure/schemas/cloud-schemas.d.ts +1 -1
  55. package/dist/integrations/enforcement-gate.js +15 -5
  56. package/dist/integrations/grok/grok-cli.d.ts +3 -0
  57. package/dist/integrations/grok/grok-cli.js +92 -13
  58. package/dist/integrations/grok/hooks/grok-hook-utils.js +99 -9
  59. package/dist/integrations/grok/hooks/post-tool-use.js +68 -25
  60. package/dist/integrations/grok/hooks/pre-tool-use.js +17 -14
  61. package/dist/integrations/grok/hooks/session-start.js +114 -4
  62. package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
  63. package/dist/integrations/hermes-agent/__init__.py +11 -1
  64. package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
  65. package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
  66. package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
  67. package/dist/integrations/hermes-agent/bridge.mjs +92 -11
  68. package/dist/integrations/hooks/confer-hook-runtime.mjs +49 -0
  69. package/dist/integrations/hooks/delegation-gate-runtime.mjs +32 -3
  70. package/dist/integrations/hooks/pipeline-hook-runtime.mjs +211 -0
  71. package/dist/integrations/hooks/plan-hook-runtime.mjs +68 -0
  72. package/dist/integrations/hooks/station-hook-runtime.cjs +421 -0
  73. package/dist/integrations/hooks/station-hook-runtime.mjs +24 -0
  74. package/dist/integrations/hooks/station-memory-ingest.mjs +45 -0
  75. package/dist/integrations/hooks/station-memory-match.mjs +47 -0
  76. package/dist/integrations/hooks/user-aside-hook-runtime.mjs +49 -0
  77. package/dist/integrations/openclaw/client.d.ts +5 -1
  78. package/dist/integrations/openclaw/client.js +17 -9
  79. package/dist/integrations/openclaw/config.js +0 -1
  80. package/dist/integrations/openclaw/hooks/pre-tool-gate-runtime.mjs +102 -0
  81. package/dist/integrations/openclaw/index.js +17 -0
  82. package/dist/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
  83. package/dist/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
  84. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +10 -0
  85. package/dist/integrations/openclaw/pre-tool-gate.d.ts +19 -0
  86. package/dist/integrations/openclaw/pre-tool-gate.js +39 -0
  87. package/dist/mcps/architect-tools.server.js +6 -1
  88. package/dist/mcps/orchestrator/handlers/complexity-handler.d.ts +7 -0
  89. package/dist/mcps/orchestrator/handlers/complexity-handler.js +107 -8
  90. package/dist/mcps/orchestrator/handlers/task-handler.d.ts +6 -0
  91. package/dist/mcps/orchestrator/handlers/task-handler.js +75 -0
  92. package/dist/mcps/orchestrator/server.js +54 -5
  93. package/dist/memory-routing/index.d.ts +1 -1
  94. package/dist/memory-routing/index.js +1 -1
  95. package/dist/memory-routing/provider-loader.d.ts +4 -0
  96. package/dist/memory-routing/provider-loader.js +74 -4
  97. package/dist/memory-routing/provider-registry.js +3 -2
  98. package/dist/nucleus/aside-worktree.d.ts +41 -0
  99. package/dist/nucleus/aside-worktree.js +164 -0
  100. package/dist/nucleus/autonomy-kernel.d.ts +2 -2
  101. package/dist/nucleus/autonomy-kernel.js +17 -6
  102. package/dist/nucleus/confer.d.ts +57 -0
  103. package/dist/nucleus/confer.js +322 -0
  104. package/dist/nucleus/delegation-gate.d.ts +18 -8
  105. package/dist/nucleus/delegation-gate.js +234 -20
  106. package/dist/nucleus/lead-dev-plan-persistence.d.ts +27 -3
  107. package/dist/nucleus/lead-dev-plan-persistence.js +201 -19
  108. package/dist/nucleus/spawn-plan-resolution.d.ts +20 -0
  109. package/dist/nucleus/spawn-plan-resolution.js +42 -0
  110. package/dist/nucleus/suit-temperament.d.ts +40 -0
  111. package/dist/nucleus/suit-temperament.js +157 -0
  112. package/dist/nucleus/synthesis-consult-receipt.js +18 -2
  113. package/dist/nucleus/synthesis-context.js +1 -1
  114. package/dist/nucleus/user-aside.d.ts +70 -0
  115. package/dist/nucleus/user-aside.js +393 -0
  116. package/dist/plugin/xray-codex-injection.js +14 -3
  117. package/dist/postprocessor/PostProcessor.d.ts +1 -0
  118. package/dist/postprocessor/PostProcessor.js +11 -0
  119. package/dist/postprocessor/triggers/GitHookTrigger.js +11 -5
  120. package/dist/processors/implementations/session-summary-processor.d.ts +1 -1
  121. package/dist/processors/implementations/session-summary-processor.js +9 -6
  122. package/opencode.json +88 -0
  123. package/package.json +25 -6
  124. package/scripts/hooks/install-hooks.cjs +21 -6
  125. package/scripts/hooks/run-hook.js +237 -88
  126. package/scripts/mjs/run-repertoire-mcp.mjs +39 -0
  127. package/scripts/mjs/verify-confer-core.mjs +103 -0
  128. package/scripts/mjs/verify-delegation-gate-core.mjs +76 -3
  129. package/scripts/mjs/verify-four-floor-compact.mjs +524 -0
  130. package/scripts/mjs/verify-hermes-session-start.mjs +137 -0
  131. package/scripts/mjs/verify-pipeline-facets.mjs +215 -0
  132. package/scripts/mjs/verify-pre-push-diff-core.mjs +87 -0
  133. package/scripts/mjs/verify-temperament-live.mjs +261 -0
  134. package/scripts/mjs/verify-user-aside-core.mjs +137 -0
  135. package/scripts/node/bridge-mcp-wiring.cjs +287 -29
  136. package/scripts/node/install-bridges.cjs +198 -44
  137. package/scripts/node/load-reflection-config.mjs +2 -2
  138. package/scripts/node/postinstall.cjs +50 -27
  139. package/scripts/node/release-gate.mjs +8 -4
  140. package/scripts/node/release.mjs +2 -2
  141. package/scripts/node/validate-release-docs.mjs +20 -33
  142. package/scripts/node/version-manager.mjs +25 -10
  143. package/src/integrations/grok/plugin/0xray/hooks/hooks.json +31 -24
  144. package/src/integrations/openclaw/README.md +134 -0
  145. package/src/integrations/openclaw/plugin/xray-pre-tool/index.js +75 -0
  146. package/src/integrations/openclaw/plugin/xray-pre-tool/openclaw.plugin.json +10 -0
  147. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +10 -0
  148. package/src/mcps/architect-tools.server.ts +6 -1
  149. package/src/mcps/orchestrator/handlers/complexity-handler.ts +180 -21
  150. package/src/mcps/orchestrator/handlers/task-handler.ts +99 -0
  151. package/src/mcps/orchestrator/server.ts +56 -5
  152. package/vendor/@0xray/repertoire/AGENTS.md +163 -0
  153. package/vendor/@0xray/repertoire/LICENSE +21 -0
  154. package/vendor/@0xray/repertoire/README.md +120 -0
  155. package/vendor/@0xray/repertoire/data/curated_signals.json +208 -0
  156. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts +78 -0
  157. package/vendor/@0xray/repertoire/dist/RepertoireService.d.ts.map +1 -0
  158. package/vendor/@0xray/repertoire/dist/RepertoireService.js +153 -0
  159. package/vendor/@0xray/repertoire/dist/RepertoireService.js.map +1 -0
  160. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts +39 -0
  161. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.d.ts.map +1 -0
  162. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js +60 -0
  163. package/vendor/@0xray/repertoire/dist/governance/ontological-trap-enforcer.js.map +1 -0
  164. package/vendor/@0xray/repertoire/dist/index.d.ts +14 -0
  165. package/vendor/@0xray/repertoire/dist/index.d.ts.map +1 -0
  166. package/vendor/@0xray/repertoire/dist/index.js +14 -0
  167. package/vendor/@0xray/repertoire/dist/index.js.map +1 -0
  168. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts +26 -0
  169. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.d.ts.map +1 -0
  170. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js +109 -0
  171. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-ingester.js.map +1 -0
  172. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts +18 -0
  173. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.d.ts.map +1 -0
  174. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js +94 -0
  175. package/vendor/@0xray/repertoire/dist/ingestion/groover-log-parser.js.map +1 -0
  176. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts +7 -0
  177. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.d.ts.map +1 -0
  178. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js +18 -0
  179. package/vendor/@0xray/repertoire/dist/ingestion/orchestrator-feedback-ingester.js.map +1 -0
  180. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts +31 -0
  181. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.d.ts.map +1 -0
  182. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js +83 -0
  183. package/vendor/@0xray/repertoire/dist/ingestion/xray-session-ingester.js.map +1 -0
  184. package/vendor/@0xray/repertoire/dist/mcp/server.d.ts +6 -0
  185. package/vendor/@0xray/repertoire/dist/mcp/server.d.ts.map +1 -0
  186. package/vendor/@0xray/repertoire/dist/mcp/server.js +173 -0
  187. package/vendor/@0xray/repertoire/dist/mcp/server.js.map +1 -0
  188. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts +27 -0
  189. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.d.ts.map +1 -0
  190. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js +107 -0
  191. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/RepertoireOrchestratorBridge.js.map +1 -0
  192. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts +11 -0
  193. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.d.ts.map +1 -0
  194. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js +32 -0
  195. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/capability-enhancer.js.map +1 -0
  196. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts +9 -0
  197. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.d.ts.map +1 -0
  198. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js +72 -0
  199. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/confidence-gate.js.map +1 -0
  200. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts +5 -0
  201. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.d.ts.map +1 -0
  202. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js +18 -0
  203. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-agent-affinity.js.map +1 -0
  204. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts +31 -0
  205. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.d.ts.map +1 -0
  206. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js +218 -0
  207. package/vendor/@0xray/repertoire/dist/orchestrator-bridge/signal-injector.js.map +1 -0
  208. package/vendor/@0xray/repertoire/dist/paths.d.ts +24 -0
  209. package/vendor/@0xray/repertoire/dist/paths.d.ts.map +1 -0
  210. package/vendor/@0xray/repertoire/dist/paths.js +74 -0
  211. package/vendor/@0xray/repertoire/dist/paths.js.map +1 -0
  212. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts +141 -0
  213. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.d.ts.map +1 -0
  214. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js +210 -0
  215. package/vendor/@0xray/repertoire/dist/provider/memory-routing-provider.js.map +1 -0
  216. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +48 -0
  217. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -0
  218. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +221 -0
  219. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -0
  220. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts +11 -0
  221. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.d.ts.map +1 -0
  222. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js +43 -0
  223. package/vendor/@0xray/repertoire/dist/registry/InferenceStateManager.js.map +1 -0
  224. package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts +15 -0
  225. package/vendor/@0xray/repertoire/dist/registry/signal-prune.d.ts.map +1 -0
  226. package/vendor/@0xray/repertoire/dist/registry/signal-prune.js +35 -0
  227. package/vendor/@0xray/repertoire/dist/registry/signal-prune.js.map +1 -0
  228. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts +3 -0
  229. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.d.ts.map +1 -0
  230. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js +24 -0
  231. package/vendor/@0xray/repertoire/dist/synthesis/concrete-sections.js.map +1 -0
  232. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts +24 -0
  233. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.d.ts.map +1 -0
  234. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js +148 -0
  235. package/vendor/@0xray/repertoire/dist/synthesis/meta-inference-engine.js.map +1 -0
  236. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts +4 -0
  237. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.d.ts.map +1 -0
  238. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js +44 -0
  239. package/vendor/@0xray/repertoire/dist/synthesis/primitive-confidence-aggregator.js.map +1 -0
  240. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts +22 -0
  241. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.d.ts.map +1 -0
  242. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js +66 -0
  243. package/vendor/@0xray/repertoire/dist/synthesis/synthesis-prompt-builder.js.map +1 -0
  244. package/vendor/@0xray/repertoire/dist/types.d.ts +210 -0
  245. package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -0
  246. package/vendor/@0xray/repertoire/dist/types.js +2 -0
  247. package/vendor/@0xray/repertoire/dist/types.js.map +1 -0
  248. package/vendor/@0xray/repertoire/docs/MEMORY-ROUTING-PROVIDER.md +54 -0
  249. package/vendor/@0xray/repertoire/hermes-mcp.example.json +20 -0
  250. package/vendor/@0xray/repertoire/mcp-config.example.json +11 -0
  251. package/vendor/@0xray/repertoire/package.json +124 -0
  252. package/vendor/@0xray/repertoire/schemas/curated-signal.schema.json +68 -0
  253. package/vendor/@0xray/repertoire/schemas/inference-log.schema.json +82 -0
  254. package/vendor/@0xray/repertoire/scripts/confirm-suit-all.mjs +253 -0
  255. package/vendor/@0xray/repertoire/scripts/confirm-suit-harness.mjs +220 -0
  256. package/vendor/@0xray/repertoire/scripts/run-live-synthesis-checkpoint.mjs +215 -0
  257. package/vendor/@0xray/repertoire/scripts/suit-bridge-shared.mjs +139 -0
  258. package/vendor/@0xray/repertoire/scripts/verify-grok-suit.mjs +304 -0
  259. package/vendor/@0xray/repertoire/scripts/verify-hermes-suit.mjs +163 -0
  260. package/vendor/@0xray/repertoire/scripts/verify-openclaw-suit.mjs +125 -0
  261. package/vendor/@0xray/repertoire/scripts/verify-opencode-suit.mjs +127 -0
  262. package/vendor/@0xray/repertoire/scripts/verify-synthesis-dogfood.mjs +207 -0
  263. package/vendor/@0xray/repertoire/skills/repertoire-trap-handling/SKILL.md +206 -0
  264. package/xray/codex.json +12 -3
  265. package/xray/features.json +32 -6
  266. package/xray/features.schema.json +87 -0
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: researcher
4
4
  description: Multi-repo analysis, documentation lookup, and implementation examples
5
- author: StrRay Framework
5
+ author: Xray Framework
6
6
  version: 1.0.0
7
7
  schema_version: "1.0"
8
8
  tags: [research, researcher]
@@ -28,10 +28,23 @@ Multi-repo analysis, documentation lookup, and implementation examples.
28
28
  - **find_implementations**: Find implementations
29
29
  - **analyze_documentation**: Analyze documentation
30
30
 
31
- ## Usage
31
+ ## When to invoke (autonomy-command)
32
32
 
33
- This skill provides research capabilities for researcher functionality.
33
+ Lead dev dispatches researcher **before** major planning, refactors, or cross-repo work — not only when user says "research."
34
34
 
35
- ## Integration
35
+ | Trigger | Action |
36
+ |---------|--------|
37
+ | Major refactor / new phase | `search_codebase`, `get_documentation`, `find_implementation` |
38
+ | Prior art / patterns | Search sibling repos (xray, groover, repertoire) |
39
+ | Proposal analysis | `analyze_proposal` via xray-researcher MCP |
36
40
 
37
- Activated when research capabilities are requested through the skills system.
41
+ ## MCP tools (xray-researcher)
42
+
43
+ - `get_documentation` — module/class docs (`target` required)
44
+ - `search_codebase` — text search in workspace
45
+ - `find_implementation` — locate implementations
46
+ - `analyze_proposal` — governance-aware proposal review
47
+
48
+ ## Return shape for lead
49
+
50
+ Summarize: findings (3–5 bullets), file paths, recommended next todos. Do not defer work back to lead without concrete patches or todos.
@@ -2,7 +2,7 @@
2
2
  source: framework
3
3
  name: security-audit
4
4
  description: Security auditing and compliance validation
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, audit]
@@ -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.0",
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,
@@ -36,7 +46,19 @@
36
46
  "phased_plan_threshold": 25,
37
47
  "auto_consult_major_work": true,
38
48
  "no_new_surface": true,
39
- "auto_chain_delegations": true
49
+ "auto_chain_delegations": true,
50
+ "plan_stale_hours": 8,
51
+ "plan_archive_marker_hours": 24,
52
+ "user_asides": {
53
+ "enabled": true,
54
+ "auto_provision_worktree": false
55
+ }
56
+ },
57
+ "grok_postprocessor_light": true,
58
+ "inference_session_capture": {
59
+ "enabled": true,
60
+ "min_commits": 3,
61
+ "lookback_commits": 20
40
62
  },
41
63
  "autonomous_reporting": {
42
64
  "enabled": true,
@@ -136,10 +158,14 @@
136
158
  "min_success_rate": 0.7
137
159
  },
138
160
  "memory_routing": {
139
- "enabled": false,
140
- "provider": "null",
141
- "module_path": "",
142
- "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
+ }
143
169
  },
144
170
  "synthesis": {
145
171
  "enabled": false,
@@ -28,6 +28,93 @@
28
28
  "required": ["module_path"]
29
29
  }
30
30
  },
31
+ "multi_agent_orchestration": {
32
+ "type": "object",
33
+ "properties": {
34
+ "enabled": { "type": "boolean" },
35
+ "lead_dev_mode": { "type": "boolean" },
36
+ "plan_stale_hours": {
37
+ "type": "number",
38
+ "minimum": 1,
39
+ "description": "Archive lead-dev-plan when all todos still pending after N hours"
40
+ },
41
+ "plan_archive_marker_hours": {
42
+ "type": "number",
43
+ "minimum": 1,
44
+ "description": "How long spawn-plan-stale persists after a stale plan was archived (hours)"
45
+ },
46
+ "confer_on_synthesis": {
47
+ "type": "boolean",
48
+ "description": "Auto-run 3-agent confer quorum at synthesis checkpoint (default true)"
49
+ },
50
+ "confer": {
51
+ "type": "object",
52
+ "properties": {
53
+ "enabled": { "type": "boolean" },
54
+ "on_synthesis": { "type": "boolean" }
55
+ },
56
+ "description": "Mandatory researcher/architect-tools/code-review quorum"
57
+ },
58
+ "sibling_repos": {
59
+ "type": "array",
60
+ "items": {
61
+ "oneOf": [
62
+ { "type": "string" },
63
+ {
64
+ "type": "object",
65
+ "properties": {
66
+ "path": { "type": "string" },
67
+ "label": { "type": "string" }
68
+ },
69
+ "required": ["path"]
70
+ }
71
+ ]
72
+ },
73
+ "description": "Sibling workspace roots (e.g. UI repo when MCP host is cwd)"
74
+ },
75
+ "user_asides": {
76
+ "type": "object",
77
+ "properties": {
78
+ "enabled": { "type": "boolean" },
79
+ "auto_provision_worktree": {
80
+ "type": "boolean",
81
+ "description": "Run guarded git worktree add on analyze-complexity aside intake when worktree+branch set"
82
+ }
83
+ }
84
+ }
85
+ }
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
+ },
31
118
  "synthesis": {
32
119
  "type": "object",
33
120
  "properties": {