0xray 4.0.23 → 4.0.25

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 (66) hide show
  1. package/.grok-plugin/plugin.json +1 -1
  2. package/.xray/features.json +11 -1
  3. package/.xray/features.schema.json +17 -0
  4. package/AGENTS-consumer.md +1 -1
  5. package/AGENTS.md +1 -1
  6. package/README.md +2 -2
  7. package/SKILLS.md +1 -1
  8. package/dist/AGENTS.md +1 -1
  9. package/dist/CHANGELOG.md +43 -0
  10. package/dist/README.md +2 -2
  11. package/dist/SKILLS.md +1 -1
  12. package/dist/cli/commands/validate.js +3 -0
  13. package/dist/cli/index.js +131 -100
  14. package/dist/core/features-config.d.ts +4 -0
  15. package/dist/core/features-config.js +10 -0
  16. package/dist/inference/inference-accumulator.d.ts +2 -0
  17. package/dist/inference/inference-accumulator.js +74 -2
  18. package/dist/inference/inference-cycle.js +1 -0
  19. package/dist/inference/inference-proposal-generator.js +65 -7
  20. package/dist/inference/inference-run-gate.d.ts +8 -0
  21. package/dist/inference/inference-run-gate.js +10 -0
  22. package/dist/inference/session-capture.d.ts +27 -0
  23. package/dist/inference/session-capture.js +277 -1
  24. package/dist/integrations/cursor/hooks/pre-compact.js +89 -1
  25. package/dist/integrations/hooks/plates.cjs +165 -0
  26. package/dist/integrations/hooks/station-hook-runtime.cjs +29 -11
  27. package/dist/integrations/hooks/station-memory-ingest.mjs +109 -42
  28. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  29. package/dist/mcps/researcher-confidence.d.ts +5 -1
  30. package/dist/mcps/researcher-confidence.js +37 -0
  31. package/dist/mcps/researcher.server.js +2 -2
  32. package/dist/memory-routing/plates.d.ts +16 -0
  33. package/dist/memory-routing/plates.js +71 -0
  34. package/dist/memory-routing/types.d.ts +2 -0
  35. package/dist/memory-routing/types.js +2 -1
  36. package/dist/processors/implementations/inference-improvement-processor.d.ts +5 -0
  37. package/dist/processors/implementations/inference-improvement-processor.js +101 -2
  38. package/dist/processors/implementations/storytelling-trigger-processor.js +1 -11
  39. package/dist/processors/processor-manager.d.ts +1 -1
  40. package/dist/processors/processor-manager.js +52 -20
  41. package/docs-site/docs/plates/boot.md +52 -0
  42. package/docs-site/docs/plates/governance.md +50 -0
  43. package/docs-site/docs/plates/index.md +16 -0
  44. package/docs-site/docs/plates/memory-recall.md +49 -0
  45. package/docs-site/docs/plates/orchestration.md +55 -0
  46. package/docs-site/docs/plates/processor.md +46 -0
  47. package/docs-site/docs/plates/reporting.md +42 -0
  48. package/docs-site/docs/plates/routing.md +49 -0
  49. package/llms.txt +1 -1
  50. package/package.json +2 -1
  51. package/scripts/foundry/assert-packed-dist-cli.mjs +3 -0
  52. package/scripts/foundry/plant/skills/mill/SKILL.md +1 -1
  53. package/scripts/node/consumer-install-smoke.mjs +7 -4
  54. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  55. package/src/mcps/researcher-confidence.ts +56 -3
  56. package/src/mcps/researcher.server.ts +4 -5
  57. package/vendor/@0xray/repertoire/README.md +3 -1
  58. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts +23 -3
  59. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.d.ts.map +1 -1
  60. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js +119 -16
  61. package/vendor/@0xray/repertoire/dist/registry/CuratedSignalsManager.js.map +1 -1
  62. package/vendor/@0xray/repertoire/dist/types.d.ts +1 -1
  63. package/vendor/@0xray/repertoire/dist/types.d.ts.map +1 -1
  64. package/vendor/@0xray/repertoire/package.json +1 -1
  65. package/xray/features.json +11 -1
  66. package/xray/features.schema.json +17 -0
@@ -0,0 +1,16 @@
1
+ export declare const PLATE_IDS: readonly ["routing", "governance", "boot", "orchestration", "processor", "reporting", "memory-recall"];
2
+ export type PlateId = (typeof PLATE_IDS)[number];
3
+ export interface PlateStamp {
4
+ id: PlateId;
5
+ body: string;
6
+ sourcePath: string;
7
+ }
8
+ export interface PlateStampResult {
9
+ id: PlateId;
10
+ path: string;
11
+ written: boolean;
12
+ }
13
+ export declare function loadPlate(id: PlateId): PlateStamp;
14
+ export declare function recallPlate(intent: string | null | undefined): PlateStamp | null;
15
+ export declare function stampPlateIfMissing(projectRoot: string, id: PlateId): PlateStampResult;
16
+ export declare function plateStockLine(intent: string | null | undefined): string | null;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Typed plate API. The runtime reader is plates.cjs so Station and the
3
+ * Cursor preCompact hook share one implementation.
4
+ */
5
+ import { createRequire } from 'node:module';
6
+ import { dirname, join } from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+ export const PLATE_IDS = [
9
+ 'routing',
10
+ 'governance',
11
+ 'boot',
12
+ 'orchestration',
13
+ 'processor',
14
+ 'reporting',
15
+ 'memory-recall',
16
+ ];
17
+ function isPlateId(value) {
18
+ return PLATE_IDS.includes(value);
19
+ }
20
+ function isRuntime(value) {
21
+ if (!value || typeof value !== 'object')
22
+ return false;
23
+ const row = value;
24
+ return (typeof row.loadPlate === 'function'
25
+ && typeof row.recallPlate === 'function'
26
+ && typeof row.stampPlateIfMissing === 'function'
27
+ && typeof row.plateStockLine === 'function'
28
+ && Array.isArray(row.PLATE_IDS));
29
+ }
30
+ function loadRuntime() {
31
+ const require = createRequire(import.meta.url);
32
+ const runtimePath = join(dirname(fileURLToPath(import.meta.url)), '../integrations/hooks/plates.cjs');
33
+ const loaded = require(runtimePath);
34
+ if (!isRuntime(loaded)) {
35
+ throw new Error('plate runtime missing');
36
+ }
37
+ return loaded;
38
+ }
39
+ const runtime = loadRuntime();
40
+ function asStamp(value) {
41
+ if (!value)
42
+ return null;
43
+ if (!isPlateId(value.id) || typeof value.body !== 'string') {
44
+ throw new Error('plate runtime returned an unknown stamp');
45
+ }
46
+ return value;
47
+ }
48
+ export function loadPlate(id) {
49
+ const stamp = asStamp(runtime.loadPlate(id));
50
+ if (!stamp)
51
+ throw new Error(`plate missing: ${id}`);
52
+ return stamp;
53
+ }
54
+ export function recallPlate(intent) {
55
+ return asStamp(runtime.recallPlate(intent));
56
+ }
57
+ export function stampPlateIfMissing(projectRoot, id) {
58
+ const result = runtime.stampPlateIfMissing(projectRoot, id);
59
+ if (!isPlateId(result.id) || typeof result.path !== 'string' || typeof result.written !== 'boolean') {
60
+ throw new Error('plate runtime returned an unknown stamp result');
61
+ }
62
+ return result;
63
+ }
64
+ export function plateStockLine(intent) {
65
+ const line = runtime.plateStockLine(intent);
66
+ if (line === null || line === undefined)
67
+ return null;
68
+ if (typeof line !== 'string')
69
+ throw new Error('plate stock line was not text');
70
+ return line;
71
+ }
@@ -33,6 +33,8 @@ export interface MemoryTaskConfidence {
33
33
  complexityBoost: number;
34
34
  recommendedAgent: string | null;
35
35
  }
36
+ /** Characters kept on one graded lesson line. lessonTrace stores with this cap. */
37
+ export declare const LESSON_TEXT_CAP = 400;
36
38
  export interface MemoryLessonLine {
37
39
  taskId: string;
38
40
  decision: 'success' | 'failure';
@@ -4,4 +4,5 @@
4
4
  * Repertoire is one implementation. Any provider exposing createMemoryRoutingProvider()
5
5
  * can be loaded via features.json memory_routing.module_path.
6
6
  */
7
- export {};
7
+ /** Characters kept on one graded lesson line. lessonTrace stores with this cap. */
8
+ export const LESSON_TEXT_CAP = 400;
@@ -33,4 +33,9 @@ export declare class InferenceImprovementProcessor extends PostProcessor {
33
33
  private generateCodeReviewerPrompt;
34
34
  private generateEnforcerPrompt;
35
35
  private triggerAgentWorkflow;
36
+ /**
37
+ * The operation is finished once its prompt result text is on disk.
38
+ * One session per operation id. Empty speech writes nothing.
39
+ */
40
+ private captureFinishedOperationSpeech;
36
41
  }
@@ -13,6 +13,9 @@ import { PostProcessor } from "../processor-interfaces.js";
13
13
  import { frameworkLogger } from "../../core/framework-logger.js";
14
14
  import { getConfigDir } from "../../core/config-paths.js";
15
15
  import { featuresConfigLoader } from "../../core/features-config.js";
16
+ import { captureCompletedInferenceOperation, saveReflectionSession } from "../../inference/session-capture.js";
17
+ import { loadReflectionInferences } from "../../inference/inference-accumulator.js";
18
+ import { InferenceCycle } from "../../inference/inference-cycle.js";
16
19
  export class InferenceImprovementProcessor extends PostProcessor {
17
20
  name = "inferenceImprovement";
18
21
  priority = 5;
@@ -55,7 +58,8 @@ export class InferenceImprovementProcessor extends PostProcessor {
55
58
  try {
56
59
  const workflowContext = await this.prepareWorkflowContext(directory);
57
60
  await this.saveWorkflowContext(directory, workflowContext);
58
- await this.triggerAgentWorkflow(workflowContext);
61
+ const workflowId = await this.triggerAgentWorkflow(workflowContext);
62
+ await this.captureFinishedOperationSpeech(directory, workflowId);
59
63
  await frameworkLogger.log("inference-improvement", "workflow_triggered", "info", {
60
64
  dataFiles: workflowContext.dataLocations.reflections.length +
61
65
  workflowContext.dataLocations.logs.length +
@@ -251,12 +255,107 @@ Final validation and application of approved changes:
251
255
  });
252
256
  const workflowBase = path.isAbsolute(this.workflowDir) ? this.workflowDir : path.join(process.cwd(), this.workflowDir);
253
257
  const outputPath = path.join(workflowBase, "workflow-status.json");
258
+ const workflowId = `inference-${Date.now()}`;
254
259
  fs.writeFileSync(outputPath, JSON.stringify({
255
260
  status: "in_progress",
256
261
  phase: "data_gathering",
257
262
  nextAgent: "researcher",
258
263
  message: "Invoke @researcher to begin data gathering phase",
259
- workflowId: `inference-${Date.now()}`
264
+ workflowId
260
265
  }, null, 2));
266
+ return workflowId;
267
+ }
268
+ /**
269
+ * The operation is finished once its prompt result text is on disk.
270
+ * One session per operation id. Empty speech writes nothing.
271
+ */
272
+ async captureFinishedOperationSpeech(directory, currentOperationId) {
273
+ const workflowBase = path.isAbsolute(this.workflowDir)
274
+ ? this.workflowDir
275
+ : path.join(directory, this.workflowDir);
276
+ const promptsDir = path.join(workflowBase, "prompts");
277
+ const inferenceDir = path.join(directory, "docs", "inference");
278
+ const signalNames = readStoredSignalNames(directory);
279
+ const ids = operationIdsToCapture(promptsDir, currentOperationId);
280
+ let captured = 0;
281
+ for (const operationId of ids) {
282
+ const saved = captureCompletedInferenceOperation({
283
+ operationId,
284
+ promptsDir,
285
+ inferenceDir,
286
+ signalNames,
287
+ });
288
+ if (!saved)
289
+ continue;
290
+ captured += 1;
291
+ await frameworkLogger.log("inference-improvement", "operation_session_captured", "info", { operationId, saved });
292
+ }
293
+ let reflectionSaved = 0;
294
+ for (const session of loadReflectionInferences(inferenceDir)) {
295
+ const saved = saveReflectionSession(session, inferenceDir);
296
+ if (!saved)
297
+ continue;
298
+ reflectionSaved += 1;
299
+ await frameworkLogger.log("inference-improvement", "reflection_session_written", "info", {
300
+ sessionId: session.sessionId,
301
+ saved,
302
+ });
303
+ }
304
+ if (captured === 0 && reflectionSaved === 0)
305
+ return;
306
+ const cycle = new InferenceCycle(directory, undefined, {
307
+ force: true,
308
+ skipApply: true,
309
+ skipDeployVerify: true,
310
+ });
311
+ await cycle.maybeRunCycle();
312
+ }
313
+ }
314
+ function operationIdsToCapture(promptsDir, currentOperationId) {
315
+ const ids = new Set();
316
+ if (currentOperationId.trim().length > 0)
317
+ ids.add(currentOperationId);
318
+ if (!fs.existsSync(promptsDir))
319
+ return [...ids];
320
+ for (const name of fs.readdirSync(promptsDir)) {
321
+ const stem = /^(inference-\d+)\.result\.(md|txt)$/i.exec(name);
322
+ if (stem?.[1])
323
+ ids.add(stem[1]);
324
+ const full = path.join(promptsDir, name);
325
+ if (!name.endsWith(".md") && !name.endsWith(".txt"))
326
+ continue;
327
+ let text = "";
328
+ try {
329
+ text = fs.readFileSync(full, "utf8");
330
+ }
331
+ catch {
332
+ continue;
333
+ }
334
+ const declared = /^operation:\s*(\S+)\s*$/im.exec(text);
335
+ if (declared?.[1])
336
+ ids.add(declared[1]);
337
+ }
338
+ return [...ids];
339
+ }
340
+ function readStoredSignalNames(directory) {
341
+ const dest = path.join(directory, ".xray", "state", "repertoire", "curated_signals.json");
342
+ if (!fs.existsSync(dest))
343
+ return [];
344
+ try {
345
+ const parsed = JSON.parse(fs.readFileSync(dest, "utf8"));
346
+ if (!Array.isArray(parsed.signals))
347
+ return [];
348
+ const names = [];
349
+ for (const signal of parsed.signals) {
350
+ if (!signal || typeof signal !== "object")
351
+ continue;
352
+ const name = signal.name;
353
+ if (typeof name === "string" && name.trim().length > 0)
354
+ names.push(name.trim());
355
+ }
356
+ return names;
357
+ }
358
+ catch {
359
+ return [];
261
360
  }
262
361
  }
@@ -5,7 +5,6 @@ import { PostProcessor } from "../processor-interfaces.js";
5
5
  import { frameworkLogger } from "../../core/framework-logger.js";
6
6
  import { featuresConfigLoader } from "../../core/features-config.js";
7
7
  import { analyzeStructuralPatterns, } from "../../inference/semantic-patterns.js";
8
- import { captureSessionInference, saveSessionInference, } from "../../inference/session-capture.js";
9
8
  export class StorytellingTriggerProcessor extends PostProcessor {
10
9
  name = "storytelling-trigger";
11
10
  priority = 5;
@@ -327,16 +326,7 @@ export class StorytellingTriggerProcessor extends PostProcessor {
327
326
  inferences.push(`${p.name} pattern detected [${Math.round(p.confidence * 100)}%]: ${p.description}${evidence}`);
328
327
  }
329
328
  if (semanticPatterns.length > 0) {
330
- try {
331
- const session = captureSessionInference(sinceRef, untilRef);
332
- if (session) {
333
- const savedPath = saveSessionInference(session);
334
- inferences.push(`Structured inference captured → ${path.basename(savedPath)}`);
335
- }
336
- }
337
- catch {
338
- // session capture is best-effort
339
- }
329
+ inferences.push("Semantic patterns stay on the reflection. A graded session comes from finished operation speech, not from commit subjects.");
340
330
  }
341
331
  }
342
332
  if (diff.filesAdded.some(f => f.includes("implementations/") && f.endsWith(".ts"))) {
@@ -68,7 +68,7 @@ export declare class ProcessorManager {
68
68
  success: boolean;
69
69
  results: ProcessorResult[];
70
70
  }>;
71
- executePostProcessors(operation: string, data: any, preResults: ProcessorResult[]): Promise<ProcessorResult[]>;
71
+ executePostProcessors(operation: string, data: unknown, preResults: ProcessorResult[]): Promise<ProcessorResult[]>;
72
72
  private executeProcessor;
73
73
  private updateMetrics;
74
74
  getProcessorHealth(): ProcessorHealth[];
@@ -1,6 +1,24 @@
1
1
  import { frameworkLogger } from "../core/framework-logger.js";
2
2
  import { readdir } from "fs/promises";
3
- import { join, basename } from "path";
3
+ import { join, basename, dirname } from "path";
4
+ import { fileURLToPath } from "url";
5
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
6
+ function asProcessorContext(ctx) {
7
+ return ctx;
8
+ }
9
+ function readContextString(ctx, key) {
10
+ const direct = ctx[key];
11
+ if (typeof direct === "string" && direct.length > 0)
12
+ return direct;
13
+ const toolInput = ctx.toolInput;
14
+ if (!toolInput || typeof toolInput !== "object")
15
+ return undefined;
16
+ const args = toolInput.args;
17
+ if (!args || typeof args !== "object")
18
+ return undefined;
19
+ const value = args[key];
20
+ return typeof value === "string" && value.length > 0 ? value : undefined;
21
+ }
4
22
  export class ProcessorManager {
5
23
  processors = new Map();
6
24
  metrics = new Map();
@@ -13,24 +31,34 @@ export class ProcessorManager {
13
31
  this.registerBuiltInFactories();
14
32
  }
15
33
  registerProcessorInstance(processor) {
16
- if (this.factories.has(processor.name)) {
17
- return false;
34
+ const factoryExisted = this.factories.has(processor.name);
35
+ if (!factoryExisted) {
36
+ this.factories.set(processor.name, {
37
+ execute: async (ctx) => {
38
+ const result = await processor.execute(asProcessorContext(ctx));
39
+ return result.data;
40
+ },
41
+ });
42
+ }
43
+ const processorExisted = this.processors.has(processor.name);
44
+ if (!processorExisted) {
45
+ this.registerProcessor({
46
+ name: processor.name,
47
+ type: processor.type,
48
+ priority: processor.priority,
49
+ enabled: processor.enabled,
50
+ });
18
51
  }
19
- this.factories.set(processor.name, {
20
- execute: async (ctx) => {
21
- const result = await processor.execute(ctx);
22
- return result.data;
23
- },
24
- });
25
52
  frameworkLogger.log("processor-manager", "auto-discovered-processor", "info", {
26
53
  name: processor.name,
27
54
  type: processor.type,
28
55
  priority: processor.priority,
56
+ registered: !processorExisted,
29
57
  });
30
- return true;
58
+ return !factoryExisted || !processorExisted;
31
59
  }
32
60
  async discoverProcessors(directory) {
33
- const dir = directory || join(__dirname, "implementations");
61
+ const dir = directory || join(moduleDir, "implementations");
34
62
  const discovered = [];
35
63
  let files;
36
64
  try {
@@ -130,8 +158,8 @@ export class ProcessorManager {
130
158
  execute: async (ctx) => {
131
159
  const { LogProtectionProcessor } = await import("./implementations/log-protection-processor.js");
132
160
  const p = new LogProtectionProcessor();
133
- const filePath = ctx.filePath || ctx.toolInput?.args?.filePath;
134
- const operation = ctx.operation || ctx.toolInput?.args?.operation;
161
+ const filePath = readContextString(ctx, "filePath");
162
+ const operation = readContextString(ctx, "operation");
135
163
  const result = await p.execute({ filePath, operation });
136
164
  return result.data;
137
165
  },
@@ -229,7 +257,7 @@ export class ProcessorManager {
229
257
  f.set("testAutoCreation", {
230
258
  execute: async (ctx) => {
231
259
  const { testAutoCreationProcessor } = await import("./implementations/test-auto-creation-processor.js");
232
- const result = await testAutoCreationProcessor.execute(ctx);
260
+ const result = await testAutoCreationProcessor.execute(asProcessorContext(ctx));
233
261
  return { success: result.success, message: result.message, data: result.data };
234
262
  },
235
263
  init: async () => {
@@ -249,8 +277,8 @@ export class ProcessorManager {
249
277
  const { AgentsMdValidationProcessor } = await import("./implementations/agents-md-validation-processor.js");
250
278
  const p = new AgentsMdValidationProcessor(process.cwd());
251
279
  const result = await p.execute({
252
- tool: ctx.tool || "validate",
253
- operation: ctx.operation || "pre-commit",
280
+ tool: readContextString(ctx, "tool") ?? "validate",
281
+ operation: readContextString(ctx, "operation") ?? "pre-commit",
254
282
  });
255
283
  return {
256
284
  success: result.success,
@@ -283,7 +311,7 @@ export class ProcessorManager {
283
311
  f.set("typescriptCompilation", {
284
312
  execute: async (ctx) => {
285
313
  const { runTypeScriptCompilation } = await import("./implementations/typescript-compilation-processor.js");
286
- const cwd = ctx.directory || process.cwd();
314
+ const cwd = readContextString(ctx, "directory") ?? process.cwd();
287
315
  return runTypeScriptCompilation(cwd);
288
316
  },
289
317
  init: async () => {
@@ -762,10 +790,14 @@ export class ProcessorManager {
762
790
  if (Array.isArray(context)) {
763
791
  return { valid: true, errors: [] };
764
792
  }
765
- const contextData = context.data;
793
+ const record = context;
794
+ const contextData = record.data;
766
795
  if (contextData && typeof contextData !== "object") {
767
796
  return { valid: true, errors: [] };
768
797
  }
798
+ const dataRecord = contextData && typeof contextData === "object"
799
+ ? contextData
800
+ : {};
769
801
  const requiredFields = {
770
802
  preValidate: ["operation"],
771
803
  codexCompliance: ["operation"],
@@ -779,7 +811,7 @@ export class ProcessorManager {
779
811
  };
780
812
  const required = requiredFields[processorName] || [];
781
813
  for (const field of required) {
782
- if (!(field in context) && !(field in (context.data || {}))) {
814
+ if (!(field in record) && !(field in dataRecord)) {
783
815
  errors.push(`Missing required field: ${field}`);
784
816
  }
785
817
  }
@@ -787,7 +819,7 @@ export class ProcessorManager {
787
819
  frameworkLogger.log("processor-manager", "context-validation-warnings", "info", {
788
820
  processor: processorName,
789
821
  errors,
790
- contextKeys: Object.keys(context),
822
+ contextKeys: Object.keys(record),
791
823
  });
792
824
  }
793
825
  return { valid: errors.length === 0, errors };
@@ -0,0 +1,52 @@
1
+ ---
2
+ title: Boot
3
+ sidebar_label: Boot
4
+ ---
5
+
6
+ # Boot
7
+
8
+ `BootOrchestrator.executeBootSequence` brings the framework up. Processor registration here is the legacy boot list. The live tool gate is the suit pipeline, drawn on the processor plate.
9
+
10
+ ```
11
+ ┌────────────────────────────────────────────────────────────┐
12
+ │ INPUT LAYER │
13
+ │ │
14
+ │ ┌─────────────────────┐ ┌────────────────────────┐ │
15
+ │ │ process start │ │ SIGINT / SIGTERM │ │
16
+ │ └──────────┬──────────┘ └───────────┬────────────┘ │
17
+ │ └──────────────┬──────────────┘ │
18
+ └─────────────────────────────┼──────────────────────────────┘
19
+ v
20
+ ┌─────────────────────────────┼──────────────────────────────┐
21
+ │ PROCESSING LAYER v │
22
+ │ ┌────────────────────────────────────────────────────┐ │
23
+ │ │ load .xray config │ │
24
+ │ └──────────────────────────┬─────────────────────────┘ │
25
+ │ v │
26
+ │ ┌────────────────────────────────────────────────────┐ │
27
+ │ │ orchestrator + delegation session │ │
28
+ │ └──────────────────────────┬─────────────────────────┘ │
29
+ │ v │
30
+ │ ┌────────────────────────────────────────────────────┐ │
31
+ │ │ session management · activity log │ │
32
+ │ └──────────────────────────┬─────────────────────────┘ │
33
+ │ v │
34
+ │ ┌────────────────────────────────────────────────────┐ │
35
+ │ │ activateProcessors (PROCESSOR_DEFS) │ │
36
+ │ │ legacy boot list, then agents and plugins │ │
37
+ │ └──────────────────────────┬─────────────────────────┘ │
38
+ │ v │
39
+ │ ┌────────────────────────────────────────────────────┐ │
40
+ │ │ enforcement · codex compliance │ │
41
+ │ │ Dynamo governance integration │ │
42
+ │ └──────────────────────────┬─────────────────────────┘ │
43
+ └──────────────────────────────┼────────────────────────────┘
44
+ v
45
+ ┌──────────────────────────────┼────────────────────────────┐
46
+ │ OUTPUT LAYER v │
47
+ │ ┌────────────────────────────────────────────────────┐ │
48
+ │ │ BootResult │ │
49
+ │ │ success · agents loaded · errors │ │
50
+ │ └────────────────────────────────────────────────────┘ │
51
+ └────────────────────────────────────────────────────────────┘
52
+ ```
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: Governance
3
+ sidebar_label: Governance
4
+ ---
5
+
6
+ # Governance
7
+
8
+ A proposal is deliberated inside the suit, filtered by Dynamo Solar, then merged. The PreToolUse codex gate stands beside the vote.
9
+
10
+ ```
11
+ ┌────────────────────────────────────────────────────────────┐
12
+ │ INPUT LAYER │
13
+ │ │
14
+ │ ┌────────────────────────────────────────────────────┐ │
15
+ │ │ proposal │ │
16
+ │ │ title · description · type │ │
17
+ │ └──────────────────────────┬─────────────────────────┘ │
18
+ └──────────────────────────────┼────────────────────────────┘
19
+ v
20
+ ┌──────────────────────────────┼────────────────────────────┐
21
+ │ PROCESSING LAYER v │
22
+ │ ┌────────────────────────────────────────────────────┐ │
23
+ │ │ internal deliberation │ │
24
+ │ │ code-review · security-audit · researcher │ │
25
+ │ └──────────────────────────┬─────────────────────────┘ │
26
+ │ v │
27
+ │ ┌────────────────────────────────────────────────────┐ │
28
+ │ │ external filter │ │
29
+ │ │ Dynamo Solar SSOT │ │
30
+ │ └──────────────────────────┬─────────────────────────┘ │
31
+ │ v │
32
+ │ ┌────────────────────────────────────────────────────┐ │
33
+ │ │ merge │ │
34
+ │ │ governance-core weighted vote · decision matrix │ │
35
+ │ └──────────────────────────┬─────────────────────────┘ │
36
+ │ │ │
37
+ │ ┌──────────────────────────┼─────────────────────────┐ │
38
+ │ │ PreToolUse gate │ │ │
39
+ │ │ Codex 11 · 29 · 69 │ beside the vote │ │
40
+ │ └──────────────────────────┼─────────────────────────┘ │
41
+ └──────────────────────────────┼────────────────────────────┘
42
+ v
43
+ ┌──────────────────────────────┼────────────────────────────┐
44
+ │ OUTPUT LAYER v │
45
+ │ ┌──────────────────────┐ ┌──────────────────────┐ │
46
+ │ │ vote │ │ codex decision │ │
47
+ │ │ approve / reject │ │ allow / deny │ │
48
+ │ └──────────────────────┘ └──────────────────────┘ │
49
+ └────────────────────────────────────────────────────────────┘
50
+ ```
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: Plates
3
+ sidebar_label: Overview
4
+ ---
5
+
6
+ # Plates
7
+
8
+ A plate is one pipeline, drawn as a stamp. The drawing is the thing a person reads: an input layer, a processing layer, an output layer, and the arrows between them.
9
+
10
+ These files are the canonical stamps. The Docusaurus sidebar publishes them, and the npm package ships this directory. The worn reader walks up from `dist/integrations/hooks/plates.cjs` to `docs-site/docs/plates/`. One plate, one file.
11
+
12
+ The station card stays the short subsystem table. That table is the index still on disk after compaction. When the current intent names one pipeline, the card adds a single stock line, `Plate: <id> — .xray/state/plates/<id>.md`. Recall returns that one plate, and a compact can carry its schematic. Lessons stay episodes on signals. A plate is the machine. A lesson is what happened.
13
+
14
+ The markdown file is the source of truth for that stamp. When the pipeline changes, edit the plate. A worn project may hold a copy at `.xray/state/plates/<id>.md`. The copy is written only when that file is missing, so a local edit stays.
15
+
16
+ [Routing](./routing.md) · [Governance](./governance.md) · [Boot](./boot.md) · [Orchestration](./orchestration.md) · [Processor](./processor.md) · [Reporting](./reporting.md) · [Memory recall](./memory-recall.md)
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Memory recall
3
+ sidebar_label: Memory recall
4
+ ---
5
+
6
+ # Memory recall
7
+
8
+ Speech becomes a lesson. Intent names one plate. Compact points at the station card. The card names the stamp. The stamp file is the schematic.
9
+
10
+ ```
11
+ ┌──────────────────────────────────────────────────────────────┐
12
+ │ INPUT LAYER │
13
+ │ │
14
+ │ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │
15
+ │ │ speech │ │ intent │ │ compact cut │ │
16
+ │ └──────┬───────┘ └──────┬───────┘ └───────┬────────┘ │
17
+ └──────────┼──────────────────┼───────────────────┼───────────┘
18
+ v v v
19
+ ┌──────────┼──────────────────┼───────────────────┼───────────┐
20
+ │ PROCESSING LAYER │ │ │
21
+ │ v v v │
22
+ │ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │
23
+ │ │ speech grades│ │ intent │ │ compact says │ │
24
+ │ │ to a lesson │ │ recalls one │ │ Read STATION.md│ │
25
+ │ │ on a signal │ │ plate │ │ │ │
26
+ │ └──────┬───────┘ └──────┬───────┘ └───────┬────────┘ │
27
+ │ │ │ │ │
28
+ │ │ v │ │
29
+ │ │ ┌────────────────────────────┐ │ │
30
+ │ │ │ card keeps the short │ │ │
31
+ │ │ │ subsystem table │ │ │
32
+ │ │ │ card names Plate: <id> │ │ │
33
+ │ │ └─────────────┬──────────────┘ │ │
34
+ └──────────┼───────────────────┼──────────────────┼──────────┘
35
+ v v v
36
+ ┌──────────┴───────────────────┴──────────────────┴──────────┐
37
+ │ OUTPUT LAYER │
38
+ │ │
39
+ │ ┌────────────────────────────┐ ┌─────────────────────┐ │
40
+ │ │ lesson on the signal │ │ stamp file │ │
41
+ │ │ an episode of what happened│ │ the schematic │ │
42
+ │ └────────────────────────────┘ │ docs-site/docs/ │ │
43
+ │ │ plates/<id>.md │ │
44
+ │ │ worn copy only when │ │
45
+ │ │ .xray/state/plates/ │ │
46
+ │ │ <id>.md is missing │ │
47
+ │ └─────────────────────┘ │
48
+ └──────────────────────────────────────────────────────────────┘
49
+ ```