0xray 3.3.1 → 3.4.2

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 (70) hide show
  1. package/.opencode/enforcer-config.json +1 -4
  2. package/.xray/codex.json +598 -0
  3. package/.xray/config.json +25 -0
  4. package/.xray/features.json +146 -0
  5. package/.xray/features.schema.json +33 -0
  6. package/AGENTS-consumer.md +127 -10
  7. package/AGENTS.md +172 -56
  8. package/README.md +159 -82
  9. package/SKILLS.md +79 -53
  10. package/dist/AGENTS.md +172 -56
  11. package/dist/CHANGELOG.md +90 -51
  12. package/dist/README.md +159 -82
  13. package/dist/SKILLS.md +79 -53
  14. package/dist/analytics/routing-refiner.js +0 -2
  15. package/dist/core/boot-orchestrator.js +9 -1
  16. package/dist/core/features-config.js +5 -1
  17. package/dist/integrations/grok/grok-cli.js +47 -25
  18. package/dist/integrations/grok/hooks/grok-hook-activity.js +53 -0
  19. package/dist/integrations/grok/hooks/grok-hook-utils.js +261 -0
  20. package/dist/integrations/grok/hooks/pre-tool-use.js +85 -115
  21. package/dist/integrations/grok/hooks/session-start.js +52 -0
  22. package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +20 -3
  23. package/dist/integrations/hermes-agent/bridge.mjs +11 -1
  24. package/dist/mcps/config/server-config-registry.js +4 -3
  25. package/dist/mcps/orchestrator/handlers/complexity-handler.js +33 -3
  26. package/dist/mcps/orchestrator/server.js +1 -1
  27. package/dist/mcps/registry.json +0 -1
  28. package/dist/mcps/researcher.server.js +3 -0
  29. package/dist/nucleus/autonomy-kernel.js +176 -0
  30. package/dist/nucleus/index.js +1 -0
  31. package/dist/orchestrator/universal-registry-bridge.js +1 -1
  32. package/dist/skills/boot-orchestrator/SKILL.md +1 -5
  33. package/dist/skills/orchestrator/SKILL.md +35 -12
  34. package/dist/skills/registry.json +0 -1
  35. package/dist/skills/researcher/SKILL.md +17 -4
  36. package/dist/skills/strategist/SKILL.md +12 -0
  37. package/dist/skills/testing-strategy/SKILL.md +13 -2
  38. package/package.json +23 -8
  39. package/scripts/node/consumer-install-smoke.mjs +163 -0
  40. package/scripts/node/enforce-agents-md.mjs +0 -26
  41. package/scripts/node/enforce-version-compliance.sh +0 -1
  42. package/scripts/node/enforce-version-compliance.ts +0 -10
  43. package/scripts/node/install-bridges.cjs +154 -39
  44. package/scripts/node/pre-publish-guard.js +108 -165
  45. package/scripts/node/reconcile-version.mjs +147 -0
  46. package/scripts/node/release-gate.mjs +66 -0
  47. package/scripts/node/release.js +5 -147
  48. package/scripts/node/release.mjs +106 -181
  49. package/scripts/node/setup.cjs +21 -26
  50. package/scripts/node/sync-versions.mjs +12 -134
  51. package/scripts/node/universal-version-manager.js +22 -4
  52. package/scripts/node/validate-release-docs.mjs +299 -0
  53. package/scripts/node/version-manager.mjs +225 -49
  54. package/src/integrations/grok/plugin/0xray/hooks/hooks.json +20 -3
  55. package/src/mcps/config/__tests__/server-config-registry.test.ts +9 -0
  56. package/src/mcps/config/server-config-registry.ts +5 -3
  57. package/src/mcps/orchestrator/handlers/complexity-handler.ts +54 -3
  58. package/src/mcps/orchestrator/server.ts +1 -1
  59. package/src/mcps/registry.json +0 -1
  60. package/src/mcps/researcher.server.ts +4 -0
  61. package/src/opencode/enforcer-config.json +1 -4
  62. package/src/skills/boot-orchestrator/SKILL.md +1 -5
  63. package/src/skills/orchestrator/SKILL.md +35 -12
  64. package/src/skills/registry.json +0 -1
  65. package/src/skills/researcher/SKILL.md +17 -4
  66. package/src/skills/strategist/SKILL.md +12 -0
  67. package/src/skills/testing-strategy/SKILL.md +13 -2
  68. package/xray/config.json +25 -0
  69. package/xray/features.json +146 -0
  70. package/xray/features.schema.json +33 -0
@@ -0,0 +1,146 @@
1
+ {
2
+ "$schema": "./features.schema.json",
3
+ "description": "0xRay Framework - Unified Feature Configuration",
4
+ "token_optimization": {
5
+ "enabled": true,
6
+ "max_context_tokens": 20000,
7
+ "prune_after_task": true,
8
+ "summarize_tool_outputs": true,
9
+ "context_compression": {
10
+ "enabled": true,
11
+ "threshold_tokens": 15000,
12
+ "compression_ratio": 0.4
13
+ }
14
+ },
15
+ "model_routing": {
16
+ "enabled": true
17
+ },
18
+ "batch_operations": {
19
+ "enabled": true,
20
+ "prefer_sed_for_replacements": true,
21
+ "parallel_file_updates": true,
22
+ "max_concurrent_edits": 10,
23
+ "auto_batch_threshold": 5
24
+ },
25
+ "multi_agent_orchestration": {
26
+ "enabled": true,
27
+ "coordination_model": "async-multi-agent",
28
+ "max_concurrent_agents": 3,
29
+ "task_distribution_strategy": "capability-based",
30
+ "conflict_resolution": "expert-priority",
31
+ "progress_tracking": true,
32
+ "session_persistence": true,
33
+ "lead_dev_mode": true,
34
+ "per_suite_test_triage": true,
35
+ "phased_plan_threshold": 25,
36
+ "auto_consult_major_work": true,
37
+ "no_new_surface": true
38
+ },
39
+ "autonomous_reporting": {
40
+ "enabled": true,
41
+ "interval_minutes": 60,
42
+ "auto_schedule": true,
43
+ "include_health_assessment": true,
44
+ "include_agent_activities": true,
45
+ "include_pipeline_operations": true,
46
+ "include_critical_issues": true,
47
+ "include_recommendations": true,
48
+ "report_retention_days": 30,
49
+ "notification_channels": [
50
+ "console"
51
+ ]
52
+ },
53
+ "agent_management": {
54
+ "disabled_agents": [],
55
+ "agent_models": {},
56
+ "performance_limits": {
57
+ "max_task_duration_ms": 30000,
58
+ "max_memory_usage_mb": 512,
59
+ "max_tokens_per_request": 16000
60
+ }
61
+ },
62
+ "refactoring": {
63
+ "enabled": true,
64
+ "automatic_detection": true,
65
+ "require_user_approval": false,
66
+ "max_complexity_threshold": 80,
67
+ "safe_mode": true,
68
+ "batch_mode": true
69
+ },
70
+ "activity_logging": {
71
+ "enabled": true,
72
+ "level": "info",
73
+ "include_performance_metrics": true,
74
+ "include_agent_states": false,
75
+ "include_token_usage": true,
76
+ "retention_days": 3,
77
+ "log_to_file": true,
78
+ "log_path": ".opencode/logs"
79
+ },
80
+ "security": {
81
+ "enabled": true,
82
+ "prompt_sanitization": true,
83
+ "vulnerability_scanning": true,
84
+ "code_review_enforcement": true,
85
+ "security_score_threshold": 70
86
+ },
87
+ "performance_monitoring": {
88
+ "enabled": true,
89
+ "real_time_metrics": true,
90
+ "benchmark_tracking": true,
91
+ "token_tracking": true,
92
+ "cost_tracking": true,
93
+ "alerting": {
94
+ "enabled": true,
95
+ "performance_degradation_threshold": 20,
96
+ "error_rate_threshold": 5,
97
+ "cost_threshold_daily": 10
98
+ }
99
+ },
100
+ "caching": {
101
+ "enabled": true,
102
+ "file_content_cache": true,
103
+ "search_result_cache": true,
104
+ "cache_ttl_seconds": 60,
105
+ "max_cache_size_mb": 25
106
+ },
107
+ "agent_spawn": {
108
+ "max_concurrent": 8,
109
+ "max_per_type": 3,
110
+ "spawn_cooldown_ms": 500,
111
+ "rate_limit_per_minute": 20
112
+ },
113
+ "delegation": {
114
+ "confidence_threshold": 0.5,
115
+ "enable_intelligent_routing": true
116
+ },
117
+ "complexity_thresholds": {
118
+ "simple": 15,
119
+ "moderate": 25,
120
+ "complex": 50,
121
+ "enterprise": 100
122
+ },
123
+ "analytics": {
124
+ "enabled": true,
125
+ "default_limit": 500,
126
+ "min_samples_for_calibration": 3,
127
+ "track_complexity_accuracy": true,
128
+ "track_agent_performance": true
129
+ },
130
+ "pattern_learning": {
131
+ "enabled": true,
132
+ "learning_interval_ms": 300000,
133
+ "auto_apply_threshold": 0.9,
134
+ "min_success_rate": 0.7
135
+ },
136
+ "memory_routing": {
137
+ "enabled": true,
138
+ "provider": "repertoire",
139
+ "module_path": "../repertoire/dist/provider/memory-routing-provider.js",
140
+ "config": {
141
+ "dataDir": "../repertoire/data",
142
+ "signalsPath": "../repertoire/data/curated_signals.json",
143
+ "logDir": "../repertoire/logs/groover-inference"
144
+ }
145
+ }
146
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://0xray.ai/schemas/features.schema.json",
4
+ "title": "0xRay Features Configuration",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": { "type": "string" },
8
+ "description": { "type": "string" },
9
+ "memory_routing": {
10
+ "type": "object",
11
+ "properties": {
12
+ "enabled": { "type": "boolean" },
13
+ "provider": {
14
+ "type": "string",
15
+ "enum": ["null", "repertoire", "custom"]
16
+ },
17
+ "module_path": { "type": "string" },
18
+ "config": { "type": "object" }
19
+ },
20
+ "required": ["enabled", "provider"],
21
+ "if": {
22
+ "properties": {
23
+ "enabled": { "const": true },
24
+ "provider": { "enum": ["repertoire", "custom"] }
25
+ }
26
+ },
27
+ "then": {
28
+ "required": ["module_path"]
29
+ }
30
+ }
31
+ },
32
+ "additionalProperties": true
33
+ }
@@ -1,31 +1,59 @@
1
1
  # 0xRay AI Agents
2
2
 
3
- Quick reference for the 0xRay AI orchestration framework (v16 MCPs-centric three-subsystem).
3
+ Quick reference for the 0xRay AI orchestration framework (shipped to your project on `npm install 0xray`).
4
+
5
+ **v3.4.2** — 7 MCP servers · 45 skills · 68 codex terms · 4 platform bridges
6
+
7
+ ## Postinstall (automatic)
8
+
9
+ `npm install 0xray` runs `install-bridges.cjs` and:
10
+
11
+ - Copies this file → **`AGENTS.md`** in your project root
12
+ - Ships root **`SKILLS.md`** and syncs **45 skills** to platform skill directories
13
+ - Seeds **`.gitignore`** (from template, if absent)
14
+ - Deploys **`.xray/`** (`codex.json`, `features.json`, `config.json`)
15
+ - Writes **`.mcp.json`** with 7 MCPs servers (`npx -y 0xray mcp …`)
16
+ - Installs bridges: **OpenCode**, **Grok**, **Hermes**, **OpenClaw**
17
+
18
+ Optional extras: `npx 0xray setup`
4
19
 
5
20
  ## Available MCP Servers
6
21
 
22
+ All seven servers use `npx -y 0xray mcp <cmd>` — configured in your project `.mcp.json`:
23
+
7
24
  | Server | Role |
8
25
  |--------|------|
9
26
  | `xray-governance` | Proposal governance, codex snapshot, quality gates |
10
- | `xray-skills` | Skill invocation, agent-specific knowledge servers |
27
+ | `xray-skills` | Skill invocation, 45 knowledge skills |
28
+ | `xray-orchestrator` | thinDispatch routing, AsideContext, confidence gate |
11
29
  | `xray-enforcer` | Codex compliance enforcement, rule validation |
12
- | `xray-orchestrator` | Multi-agent workflow coordination, task delegation |
30
+ | `xray-researcher` | Codebase exploration, memory-routing enrichment |
31
+ | `xray-code-review` | Proposal quality, code review deliberation |
32
+ | `xray-architect-tools` | System design, architecture decisions |
33
+
34
+ Governance deliberation uses **code-review**, **security-audit** (via enforcer/skills), and **researcher** within this 7-server surface.
13
35
 
14
36
  ## CLI Commands
15
37
 
16
38
  | Command | Description |
17
39
  |---------|-------------|
18
- | `xray setup` | Full framework setup (hooks, Hermes, symlinks) |
19
- | `xray validate` | Validate codex compliance |
20
- | `xray codex check` | Check codex rules |
21
- | `xray health` | Framework health check |
22
- | `xray hooks` | Manage lifecycle hooks |
40
+ | `npx 0xray setup` | Symlinks, hook extras, Hermes skill sync |
41
+ | `npx 0xray status` | Verify installation |
42
+ | `npx 0xray opencode install` | OpenCode bridge (also runs on postinstall) |
43
+ | `npx 0xray grok install` | Grok plugin + 7 MCPs servers + skill sync |
44
+ | `npx 0xray hermes install` | Hermes plugin bridge |
45
+ | `npx 0xray openclaw install` | OpenClaw config + skills |
46
+ | `npx 0xray skill:install` | Install starter skills |
47
+ | `npx 0xray validate` | Validate codex compliance |
48
+ | `npx 0xray codex check` | Check codex rules |
49
+ | `npx 0xray health` | Framework health check |
50
+ | `npx 0xray mcp <server>` | Start an MCP server (stdio) |
23
51
 
24
52
  ## Governance
25
53
 
26
- 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.
54
+ 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.
27
55
 
28
- **Codex**: The codex lives in `.xray/codex.json` and enforces 60 terms across all agent interactions.
56
+ **Codex**: `.xray/codex.json` — **68 terms** across all agent interactions.
29
57
 
30
58
  ## thinDispatch Routing
31
59
 
@@ -34,6 +62,83 @@ xray operates under the three-subsystem model: Inference + External Governance (
34
62
  - Complex (≤50): Multi-agent coordination
35
63
  - Enterprise (>50): Orchestrator-led team
36
64
 
65
+ ## AsideContext (v3.2+)
66
+
67
+ Bounded orchestrator subcontexts via `xray-orchestrator` MCP — `spawnAside` / `closeAside` on multi-step tasks. Repertoire memory routing (when enabled) flows through `inheritedContext.memoryRouting`.
68
+
69
+ ## Memory Routing + Repertoire (optional, v3.3+)
70
+
71
+ Configure in `.xray/features.json`:
72
+
73
+ ```json
74
+ "memory_routing": {
75
+ "enabled": true,
76
+ "provider": "repertoire",
77
+ "module_path": "../repertoire/dist/provider/memory-routing-provider.js",
78
+ "config": {
79
+ "signalsPath": "../repertoire/data/curated_signals.json"
80
+ }
81
+ }
82
+ ```
83
+
84
+ Without Repertoire: `{ "enabled": false, "provider": "null" }`.
85
+
86
+ **External MCP** (Hermes/Grok): add Repertoire alongside 0xRay servers:
87
+
88
+ ```json
89
+ "repertoire": {
90
+ "command": "npx",
91
+ "args": ["-y", "@0xray/repertoire", "mcp"]
92
+ }
93
+ ```
94
+
95
+ Tools: `repertoire__get_task_confidence`, `repertoire__get_high_confidence_signals`, `repertoire__search_primitives`, `repertoire__ingest_feedback`.
96
+
97
+ ## Codex OS (always on — not optional)
98
+
99
+ The Universal Development Codex (`.xray/codex.json`, **69 terms**) is enforced by **PreToolUse** (blocks) and this section (brain). MCP enforcer is audit — not the gate.
100
+
101
+ | Term | Rule | Enforcement |
102
+ |------|------|-------------|
103
+ | 11 | No `any`, `@ts-ignore`, `@ts-expect-error` | PreToolUse deny on edits |
104
+ | 29 | Security by design — no `eval()` | PreToolUse deny |
105
+ | 59 | Complex work → orchestrator intake | PreToolUse deny `spawn_subagent` without plan |
106
+ | 67–68 | Best subagents + lead dev ownership | `analyze-complexity` + orchestrator skill |
107
+ | **69** | **No new MCP/skill/handler surface** | PreToolUse deny new `*.server.ts`, `SKILL.md` |
108
+
109
+ `features.json` → `multi_agent_orchestration.no_new_surface` (default **true**). Rewire existing hooks/MCPs/skills — do not add parallel APIs.
110
+
111
+ ## Default operating mode: lead dev (rewired — no new MCP)
112
+
113
+ When the suit is worn, **lead dev mode** is ON via existing config + hooks:
114
+
115
+ | Layer | Existing piece | Rewire |
116
+ |-------|----------------|--------|
117
+ | Config | `features.json` → `multi_agent_orchestration.lead_dev_mode` | Extended, not new block |
118
+ | SessionStart + UserPromptSubmit | Grok hooks → `session-start.js` | Writes `.xray/state/session-boot.json` + `logs/framework/activity.log` |
119
+ | **OS gate** | **PreToolUse hook** | Codex patterns, surface area, spawn gate — `{"decision":"deny"}` + activity.log |
120
+ | Intake + plan | `xray-orchestrator` → **`analyze-complexity`** | Persists `.xray/state/lead-dev-plan.json` |
121
+ | Test triage | PreToolUse hook | Per-suite hint on full `npm test` |
122
+ | Playbook | **`orchestrator`** skill | Codex 59, 67–69 rules |
123
+
124
+ **First substantive task:** `analyze-complexity` with `tasks` array — **required before** `spawn_subagent`. You are the **lead developer**. Users speak in goals, not keywords.
125
+
126
+ | # | Rule |
127
+ |---|------|
128
+ | 1 | Phased plan + detailed todos; assign best subagent; monitor output |
129
+ | 2 | Take the helm — loop test fix until complete; no permission pings |
130
+ | 3 | Per-suite test triage after major changes; full suite last |
131
+ | 4 | Lead stays main thread; subagents execute; update todos continuously |
132
+ | 5 | Read all console and test output; triage fix rerun |
133
+ | 6 | Never defer errors as "pre-existing" — add todo and resolve |
134
+ | 7 | Resolve all errors before phase completion |
135
+
136
+ **Major work:** invoke `researcher` + `architect-tools` + `code-review` before planning/refactors — automatically.
137
+
138
+ ## Skills
139
+
140
+ Full catalog in root **`SKILLS.md`** (shipped on postinstall). **`orchestrator`** skill documents lead-dev mode. Invoke via `@orchestrator` or `xray-skills` MCP (`invoke-skill`, `list-skills`).
141
+
37
142
  ## File Organization
38
143
 
39
144
  | File Type | Save To |
@@ -44,3 +149,15 @@ xray operates under the three-subsystem model: Inference + External Governance (
44
149
  | Test Files | `src/__tests__/` |
45
150
  | Source Code | `src/` |
46
151
  | Config | `config/` or `.xray/` |
152
+
153
+ ## Documentation
154
+
155
+ | Topic | URL |
156
+ |-------|-----|
157
+ | Getting started | https://0xrayai.github.io/xray/docs/guides/getting-started |
158
+ | Platform integrations | https://0xrayai.github.io/xray/docs/guides/integrations |
159
+ | Features since 3.1 | https://0xrayai.github.io/xray/docs/guides/features-since-3.1 |
160
+ | AsideContext | https://0xrayai.github.io/xray/docs/guides/aside-context |
161
+ | Memory routing | https://0xrayai.github.io/xray/docs/guides/memory-routing |
162
+ | Repertoire | https://0xrayai.github.io/xray/docs/guides/repertoire |
163
+ | Autonomy command | https://0xrayai.github.io/xray/docs/guides/autonomy-command |
package/AGENTS.md CHANGED
@@ -1,87 +1,203 @@
1
1
  # xray Agents
2
2
 
3
- Quick reference for xray AI orchestration framework (v16 MCPs-centric three-subsystem).
3
+ Quick reference for the xray AI orchestration framework (**v3.4.2**).
4
+
5
+ **42 agents** · **45 skills** · **7 consumer MCP servers** · **68 codex terms** · **3,226 tests**
4
6
 
5
7
  ## What is xray?
6
8
 
7
- xray provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation under the pure v2 three-subsystem model (Inference + External Governance via Dynamo + Autonomous Engine via thinDispatch 7-flow in MCP orchestrator). Agents operate via `.opencode/agents/*.yml` YML surfaces and 3 dedicated MCP skill servers — no manual setup needed.
9
+ xray provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation under the pure v2 three-subsystem model:
8
10
 
9
- ## v16 MCPs-Centric Architecture
11
+ - **Inference** — proposals, reflection, memory routing (optional)
12
+ - **External Governance** — Dynamo Solar SSOT, 68-term Codex
13
+ - **Autonomous Engine** — thinDispatch 7-flow, AsideContext, confidence gate
10
14
 
11
- The v2 release centers on **MCP (Model Context Protocol)** as the primary surface for agent skills. Three agent MCP servers handle governance deliberation:
15
+ 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).
12
16
 
13
- - `code-review` — Proposal quality, code analysis, best practices
14
- - `security-audit` — Vulnerability detection, threat modeling
15
- - `researcher` — Codebase exploration, pattern discovery, implementation lookup
17
+ ## Consumer MCP surface (7 servers)
16
18
 
17
- These MCP servers integrate with the three-subsystem pipeline for governance-gated execution.
19
+ Registered in `.mcp.json`, invoked via `npx -y 0xray mcp <cmd>`:
18
20
 
19
- ## xray Three-Subsystem Operation
21
+ | Server | Role |
22
+ |--------|------|
23
+ | `xray-governance` | Proposal governance, codex snapshot, quality gates |
24
+ | `xray-skills` | 45 knowledge skills + `invoke-skill` |
25
+ | `xray-orchestrator` | thinDispatch, AsideContext, confidence gate |
26
+ | `xray-enforcer` | Codex compliance, rule validation |
27
+ | `xray-researcher` | Codebase exploration, memory-routing enrichment |
28
+ | `xray-code-review` | Proposal quality, code review deliberation |
29
+ | `xray-architect-tools` | System design, architecture decisions |
20
30
 
21
- xray operates under the pure three-subsystem model: Inference + External Governance (Dynamo Solar SSOT) + Autonomous Engine (thinDispatch 7-flow in MCP orchestrator). Agents are declared in `.opencode/agents/*.yml` YML surfaces with zero manual setup.
31
+ Governance deliberation: **code-review**, **security-audit**, **researcher** within the 7-server set.
22
32
 
23
- ### Core Tenets
24
- - YML declarations are the SSOT
25
- - Zero manual setup or registration
26
- - Governance precedes action via Dynamo
27
- - Automatic delegation via thinDispatch
28
- - MCP surfaces are the primary skill interface
29
- - fwLogger / frameworkLogger structured logging ONLY (never console.*) to logs/framework/activity.log + .opencode/logs/
33
+ ## Postinstall (v3.4.1)
30
34
 
31
- ### File Organization Guidelines
35
+ `postinstall.cjs` → `installAllBridges()`:
32
36
 
33
- **IMPORTANT**: Save all generated files to their proper directories. Do NOT save to root.
37
+ 1. `AGENTS-consumer.md` → `AGENTS.md`
38
+ 2. `SKILLS.md` + 46 skills → platform skill directories
39
+ 3. `.gitignore.default` → `.gitignore` (if absent)
40
+ 4. `.xray/` config (`codex.json`, `features.json`, `config.json`)
41
+ 5. `.mcp.json` (7 servers)
42
+ 6. Four bridges: OpenCode, Grok, Hermes, OpenClaw
43
+ 7. Optional git hooks
34
44
 
35
- | File Type | Save To | Example |
36
- |-----------|---------|---------|
37
- | **Reflections** | `docs/reflections/` | `docs/reflections/my-fix-reflection.md` |
38
- | **Logs** | `logs/` | `logs/framework/activity.log` |
39
- | **Scripts** | `scripts/` or `scripts/bash/` | `scripts/bash/my-script.sh` |
40
- | **Test Files** | `src/__tests__/` | `src/__tests__/unit/my-test.test.ts` |
41
- | **Source Code** | `src/` | `src/my-module.ts` |
42
- | **Config** | `config/` or `.xray/` | `.xray/config.json` |
45
+ ## Memory routing + Repertoire (v3.3+)
43
46
 
44
- **Never save to root** - Root directory is for essential files only:
45
- - `README.md`, `CHANGELOG.md`, `package.json`, `tsconfig.json`
47
+ `xray/features.json` → `memory_routing` (schema: `features.schema.json`):
46
48
 
47
- ## Available Agents
49
+ ```json
50
+ "memory_routing": {
51
+ "enabled": true,
52
+ "provider": "repertoire",
53
+ "module_path": "../repertoire/dist/provider/memory-routing-provider.js",
54
+ "config": {
55
+ "dataDir": "../repertoire/data",
56
+ "signalsPath": "../repertoire/data/curated_signals.json",
57
+ "logDir": "../repertoire/logs/groover-inference"
58
+ }
59
+ }
60
+ ```
48
61
 
49
- | Agent | Purpose | Invoke |
50
- |-------|---------|--------|
51
- | `@enforcer` | Codex compliance & error prevention | `@enforcer analyze this code` |
52
- | `@orchestrator` | Complex multi-step task coordination | `@orchestrator implement feature` |
53
- | `@architect` | System design & technical decisions | `@architect design API` |
54
- | `@security-auditor` | Vulnerability detection | `@security-auditor scan` |
55
- | `@code-reviewer` | Quality assessment | `@code-reviewer review PR` |
56
- | `@refactorer` | Technical debt elimination | `@refactorer optimize code` |
57
- | `@testing-lead` | Testing strategy | `@testing-lead plan tests` |
58
- | `@bug-triage-specialist` | Error investigation | `@bug-triage-specialist debug error` |
59
- | `@researcher` | Codebase exploration | `@researcher find implementation` |
62
+ | Integration | Surface |
63
+ |-------------|---------|
64
+ | ExecutionPlanner | `enrichTasks`, `getTaskConfidence`, `selectAgent` |
65
+ | thinDispatch | `resolveThinDispatch` |
66
+ | Researcher | `researcher-confidence.ts`, `MEMORY_ROUTING:` block |
67
+ | AsideContext | `buildInheritedContext` → `inheritedContext.memoryRouting` |
68
+ | Feedback | Per-task `ingestFeedback` |
60
69
 
61
- ## MCP Skill Servers
70
+ **External MCP:** `npx @0xray/repertoire mcp` — `repertoire__get_task_confidence`, etc.
62
71
 
63
- xray ships dedicated MCP servers that provide agent skills:
72
+ ## AsideContext (v3.2+)
64
73
 
65
- | Server | Role |
66
- |--------|------|
67
- | `code-review` | Proposal quality analysis, code review |
68
- | `security-audit` | Vulnerability scanning, threat assessment |
69
- | `researcher` | Codebase exploration, implementation lookup |
70
- | `orchestrator` | thinDispatch 7-flow delegation routing |
71
- | `enforcer-tools` | Codex compliance enforcement |
72
- | `governance` | Proposal governance, codex snapshot |
74
+ `src/mcps/orchestrator/aside-context.ts` — bounded subcontexts for orchestration:
75
+
76
+ - `spawnAside` / `closeAside` on `orchestrate-task`, `analyze-complexity`, `govern-and-apply`
77
+ - Observation extractors: governance, orchestration, complexity
78
+ - Repertoire context flows via `ExecutionPlan.memoryContext`
79
+
80
+ ## Confidence gate (v3.3.1)
81
+
82
+ `ExecutionPlanner.calculateTaskComplexity()` + `getTaskConfidence()` — complexity boost and ontological-trap routing.
83
+
84
+ ## Nucleus exports (v3.4.0)
73
85
 
74
- ## thinDispatch Routing
86
+ `0xray/nucleus` and `0xray/nucleus/*` — `handleGovernRequest`, plugin-registry, thinDispatch.
75
87
 
76
- The Autonomous Engine routes via complexity:
88
+ ## Changes since 3.1
89
+
90
+ | Version | Change |
91
+ |---------|--------|
92
+ | **3.4.1** | `install-bridges.cjs`, 7 MCPs `npx`, release pipeline + docs sync |
93
+ | **3.4.0** | Nucleus exports, governance closure, verify gate |
94
+ | **3.3.1** | Confidence gate, repertoire researcher wiring |
95
+ | **3.3.0** | Memory routing + Repertoire provider |
96
+ | **3.2.0** | AsideContext wired, SelfProposalEngine, pre-tool-use hook |
97
+ | **3.1.1** | 0xRay rename, marketplace, AGENTS/SKILLS consumer seeding |
98
+
99
+ **Removed:** `hermes bridge`, `.opencode/xray/` fallback, `advanced-features/` on consumer boot.
100
+
101
+ ## Default operating mode: autonomy-command
102
+
103
+ When the suit is worn, **autonomy-command** is ON by default (codex 67–68). Lead dev: phased todos, subagent dispatch, per-suite test triage, loop until green. Ships to consumers via `AGENTS-consumer.md`.
104
+
105
+ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Skill: `src/skills/autonomy-command/SKILL.md`
106
+
107
+ ## Core tenets
108
+
109
+ - YML agents + SKILL.md are the SSOT
110
+ - Zero manual registration
111
+ - Governance precedes action (Dynamo)
112
+ - MCP surfaces are the primary skill interface
113
+ - frameworkLogger only (never `console.*`)
114
+
115
+ ## File organization
116
+
117
+ | File Type | Save To |
118
+ |-----------|---------|
119
+ | Reflections | `docs/reflections/` |
120
+ | Logs | `logs/` |
121
+ | Scripts | `scripts/` or `scripts/bash/` |
122
+ | Tests | `src/__tests__/` |
123
+ | Source | `src/` |
124
+ | Config | `.xray/` or `config/` |
125
+
126
+ **Root essentials only:** `README.md`, `CHANGELOG.md`, `package.json`, `AGENTS.md`, `SKILLS.md`, `tsconfig.json`.
127
+
128
+ ## Available agents (42 YML surfaces)
129
+
130
+ Invoke via `@agent-name` in OpenCode:
131
+
132
+ | Agent | Purpose |
133
+ |-------|---------|
134
+ | `@enforcer` | Codex compliance & error prevention |
135
+ | `@orchestrator` | Multi-step task coordination |
136
+ | `@architect` | System design & technical decisions |
137
+ | `@security-auditor` | Vulnerability detection |
138
+ | `@code-reviewer` | Quality assessment |
139
+ | `@refactorer` | Technical debt elimination |
140
+ | `@testing-lead` | Testing strategy |
141
+ | `@bug-triage-specialist` | Error investigation |
142
+ | `@researcher` | Codebase exploration |
143
+ | `@frontend-engineer` | React, Vue, Angular, responsive design |
144
+ | `@backend-engineer` | REST/GraphQL APIs, microservices |
145
+ | `@database-engineer` | Schema design, query optimization |
146
+ | `@devops-engineer` | CI/CD, infrastructure, containers |
147
+ | `@mobile-developer` | iOS, Android, React Native, Flutter |
148
+ | `@storyteller` | Narrative reflections, technical stories |
149
+ | `@strategist` | Architecture decisions, risk analysis |
150
+ | `@performance-engineer` | Profiling, benchmarking |
151
+ | `@frontend-ui-ux-engineer` | Visual design, accessibility |
152
+ | `@multimodal-looker` | Media / screenshot analysis |
153
+ | `@log-monitor` | Log diagnostics |
154
+ | `@code-analyzer` | Code metrics, pattern detection |
155
+ | `@content-creator` | SEO copy, technical content |
156
+ | `@growth-strategist` | Marketing strategy |
157
+ | `@seo-consultant` | Technical SEO |
158
+ | `@tech-writer` | API docs, READMEs, changelogs |
159
+ | `@hermes-agent` | Hermes bridge operations |
160
+ | `@boot-orchestrator` | Framework boot orchestration |
161
+ | `@processor-pipeline` | Data processing pipelines |
162
+ | `@state-manager` | Session / state persistence |
163
+ | `@session-management` | Session lifecycle |
164
+ | `@inference-improve` | Autonomous inference improvement |
165
+ | `@model-health-check` | Model health diagnostics |
166
+ | `@framework-compliance-audit` | Framework compliance |
167
+ | `@lint` | Code linting |
168
+ | `@auto-format` | Automated formatting |
169
+ | `@git-workflow` | Git workflow management |
170
+ | `@api-design` | REST/GraphQL API design |
171
+ | `@architecture-patterns` | Architecture patterns |
172
+ | `@performance-analysis` | Performance analysis |
173
+ | `@performance-optimization` | Performance optimization |
174
+ | `@project-analysis` | Project health metrics |
175
+ | `@security-scan` | Security vulnerability scanning |
176
+ | `@testing-best-practices` | Testing QA |
177
+ | `@ui-ux-design` | UI/UX design |
178
+
179
+ Full skill mapping: [SKILLS.md](SKILLS.md).
180
+
181
+ ## thinDispatch routing
77
182
 
78
183
  - Simple (≤15): Single agent
79
184
  - Moderate (≤25): Single agent with tools
80
185
  - Complex (≤50): Multi-agent coordination
81
186
  - Enterprise (>50): Orchestrator-led team
82
187
 
83
- ## Codex
188
+ ## Documentation
189
+
190
+ | Topic | Path |
191
+ |-------|------|
192
+ | Features since 3.1 | `docs-site/docs/guides/features-since-3.1.md` |
193
+ | features.json | `docs-site/docs/guides/features-json.md` |
194
+ | Platform integrations | `docs-site/docs/guides/integrations.md` |
195
+ | Memory routing | `docs-site/docs/guides/memory-routing.md` |
196
+ | Repertoire | `docs-site/docs/guides/repertoire.md` |
197
+ | AsideContext | `docs-site/docs/guides/aside-context.md` |
198
+ | Consumer migration | `docs-site/docs/guides/consumer-migration.md` |
199
+ | Docusaurus site | https://0xrayai.github.io/xray/ |
84
200
 
85
- xray enforces the Universal Development Codex (60 terms) via Dynamo governance. The codex lives in `.xray/codex.json`.
201
+ ## Release artifacts
86
202
 
87
- Pure v16 MCPs. Clean. Complete.
203
+ `npm run release:patch` updates: `package.json`, `CHANGELOG.md`, `README.md`, `AGENTS.md`, `AGENTS-consumer.md`, `SKILLS.md`, Docusaurus guides.