sneakoscope 8.3.2 → 8.4.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 (105) hide show
  1. package/README.md +1 -1
  2. package/config/architecture-map-policy.v1.json +168 -0
  3. package/crates/sks-core/Cargo.lock +1 -1
  4. package/crates/sks-core/Cargo.toml +1 -1
  5. package/dist/commands/bridge.js +19 -1
  6. package/dist/commands/doctor-profile.js +1 -1
  7. package/dist/commands/doctor.js +33 -1
  8. package/dist/config/skills-manifest.json +1 -1
  9. package/dist/core/align/align-route.js +8 -2
  10. package/dist/core/align/code-navigation-align.js +88 -32
  11. package/dist/core/architecture-map-pipeline.js +172 -0
  12. package/dist/core/architecture-map-review.js +180 -0
  13. package/dist/core/codex-app/codex-app-fast-ui-repair.js +2 -1
  14. package/dist/core/codex-app/menubar/constants.js +1 -0
  15. package/dist/core/codex-lb/codex-lb-env.js +25 -3
  16. package/dist/core/codex-lb/combined-catalog/builder.js +7 -2
  17. package/dist/core/codex-lb/combined-catalog/model-selection.js +71 -0
  18. package/dist/core/codex-lb/combined-catalog/normalize.js +20 -3
  19. package/dist/core/codex-lb/desktop-controller-v3/catalog.js +75 -4
  20. package/dist/core/codex-lb/desktop-controller-v3.js +5 -1
  21. package/dist/core/commands/triwiki-atlas-command.js +372 -0
  22. package/dist/core/commands/triwiki-command.js +12 -1
  23. package/dist/core/fsx.js +14 -0
  24. package/dist/core/git-hygiene/git-policy.js +4 -0
  25. package/dist/core/git-hygiene/gitignore-writer.js +2 -0
  26. package/dist/core/gx-renderer.js +2 -1
  27. package/dist/core/managed-paths.js +1 -0
  28. package/dist/core/perf/release-latency-slo.js +57 -11
  29. package/dist/core/pipeline-internals/pipeline-stage-builder.js +181 -0
  30. package/dist/core/pipeline-internals/runtime-core.js +13 -172
  31. package/dist/core/pipeline-internals/runtime-gates.js +12 -1
  32. package/dist/core/release/content-digest-cache.js +70 -0
  33. package/dist/core/release/gate-manifest.js +9 -0
  34. package/dist/core/release/main-push-guard.js +4 -3
  35. package/dist/core/release/package-dist-snapshot.js +18 -2
  36. package/dist/core/release/physical-release-gates.js +26 -3
  37. package/dist/core/release/release-authorization-snapshot.js +4 -0
  38. package/dist/core/release/release-gate-cache-v2.js +27 -3
  39. package/dist/core/release/release-gate-contract.js +2 -0
  40. package/dist/core/release/release-gate-dag.js +3 -0
  41. package/dist/core/release/release-inspection-memo.js +69 -0
  42. package/dist/core/release/release-pack-content-scanner.js +5 -0
  43. package/dist/core/release/release-pack-receipt.js +28 -18
  44. package/dist/core/release/release-pack-tarball.js +10 -0
  45. package/dist/core/release/release-upgrade-baseline.js +4 -0
  46. package/dist/core/routes.js +1 -1
  47. package/dist/core/safety/ssot-authority-inventory.js +114 -0
  48. package/dist/core/safety/ssot-guard.js +2 -44
  49. package/dist/core/triwiki/context-graph/architecture/baseline.js +81 -0
  50. package/dist/core/triwiki/context-graph/architecture/capsule.js +34 -0
  51. package/dist/core/triwiki/context-graph/architecture/contracts.js +67 -0
  52. package/dist/core/triwiki/context-graph/architecture/delta.js +149 -0
  53. package/dist/core/triwiki/context-graph/architecture/finding-factory.js +28 -0
  54. package/dist/core/triwiki/context-graph/architecture/findings.js +173 -0
  55. package/dist/core/triwiki/context-graph/architecture/fingerprint.js +75 -0
  56. package/dist/core/triwiki/context-graph/architecture/index.js +15 -0
  57. package/dist/core/triwiki/context-graph/architecture/input-bundle.js +66 -0
  58. package/dist/core/triwiki/context-graph/architecture/metrics.js +137 -0
  59. package/dist/core/triwiki/context-graph/architecture/policy.js +321 -0
  60. package/dist/core/triwiki/context-graph/architecture/slice.js +100 -0
  61. package/dist/core/triwiki/context-graph/architecture/ssot-analysis.js +59 -0
  62. package/dist/core/triwiki/context-graph/architecture/topology-overlay.js +106 -0
  63. package/dist/core/triwiki/context-graph/architecture/validation.js +145 -0
  64. package/dist/core/triwiki/context-graph/architecture/voxel-context.js +39 -0
  65. package/dist/core/triwiki/context-graph/extractors/index.js +4 -0
  66. package/dist/core/triwiki/context-graph/projections/index.js +2 -0
  67. package/dist/core/triwiki/context-graph/projections/mermaid/architecture-delta.js +68 -0
  68. package/dist/core/triwiki/context-graph/projections/mermaid/ast.js +49 -0
  69. package/dist/core/triwiki/context-graph/projections/mermaid/change-impact.js +43 -0
  70. package/dist/core/triwiki/context-graph/projections/mermaid/contracts.js +5 -0
  71. package/dist/core/triwiki/context-graph/projections/mermaid/escape.js +45 -0
  72. package/dist/core/triwiki/context-graph/projections/mermaid/ids.js +73 -0
  73. package/dist/core/triwiki/context-graph/projections/mermaid/index.js +113 -0
  74. package/dist/core/triwiki/context-graph/projections/mermaid/manifest.js +37 -0
  75. package/dist/core/triwiki/context-graph/projections/mermaid/module-dependency.js +21 -0
  76. package/dist/core/triwiki/context-graph/projections/mermaid/ownership-workstream.js +21 -0
  77. package/dist/core/triwiki/context-graph/projections/mermaid/project-topology.js +13 -0
  78. package/dist/core/triwiki/context-graph/projections/mermaid/public-surface.js +17 -0
  79. package/dist/core/triwiki/context-graph/projections/mermaid/reduce.js +44 -0
  80. package/dist/core/triwiki/context-graph/projections/mermaid/risk-domains.js +23 -0
  81. package/dist/core/triwiki/context-graph/projections/mermaid/runtime-control.js +20 -0
  82. package/dist/core/triwiki/context-graph/projections/mermaid/selection-ledger.js +94 -0
  83. package/dist/core/triwiki/context-graph/projections/mermaid/serializer.js +81 -0
  84. package/dist/core/triwiki/context-graph/projections/mermaid/ssot-provenance.js +17 -0
  85. package/dist/core/triwiki/context-graph/projections/mermaid/verification-coverage.js +17 -0
  86. package/dist/core/triwiki/context-graph/projections/mermaid/view-builder-common.js +1 -0
  87. package/dist/core/triwiki/context-graph/projections/mermaid/view-builder.js +173 -0
  88. package/dist/core/triwiki/context-graph/projections/mermaid/view-specs.js +33 -0
  89. package/dist/core/triwiki/context-graph/store/architecture-map-store.js +71 -0
  90. package/dist/core/triwiki/triwiki-proof-bank-index.js +26 -1
  91. package/dist/core/triwiki/triwiki-proof-bank.js +82 -2
  92. package/dist/core/version.js +1 -1
  93. package/dist/native/sks-menubar/Sources/OverviewViewController.swift +2 -2
  94. package/dist/native/sks-menubar/Sources/ProvidersModelExposure.swift +178 -0
  95. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +10 -1
  96. package/dist/scripts/architecture-map-check.js +299 -0
  97. package/dist/scripts/lib/ensure-dist-fresh.js +48 -1
  98. package/dist/scripts/release-metadata-check.js +2 -0
  99. package/package.json +6 -3
  100. package/release-gates.v2.json +204 -0
  101. package/schemas/architecture-baseline.v1.schema.json +47 -0
  102. package/schemas/architecture-map-manifest.v1.schema.json +40 -0
  103. package/schemas/architecture-map-policy.v1.schema.json +147 -0
  104. package/schemas/architecture-review.v1.schema.json +46 -0
  105. package/schemas/mermaid-projection.v1.schema.json +47 -0
@@ -0,0 +1,299 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { spawnSync } from 'node:child_process';
5
+ import { assertGate, emitGate, exists, importDist, readJson, readText, root } from './gate-lib.js';
6
+ const MODES = [
7
+ 'contract',
8
+ 'quality',
9
+ 'performance',
10
+ 'regression-fixtures',
11
+ 'legacy-closure',
12
+ 'freshness'
13
+ ];
14
+ const modeArg = process.argv.indexOf('--mode') >= 0 ? String(process.argv[process.argv.indexOf('--mode') + 1] || '') : '';
15
+ assertGate(MODES.includes(modeArg), 'architecture_map_check_unknown_mode', {
16
+ mode: modeArg,
17
+ modes: [...MODES]
18
+ });
19
+ const mode = modeArg;
20
+ const GATE_ID = `architecture-map:${mode}`;
21
+ const SELF = 'src/scripts/architecture-map-check.ts';
22
+ const POLICY_FILE = 'config/architecture-map-policy.v1.json';
23
+ const MAP_DIR = '.sneakoscope/wiki/architecture-map';
24
+ const SERIALIZER_TEST = 'test/architecture-map/serializer.test.mjs';
25
+ const PROJECTION_TEST = 'dist/core/triwiki/context-graph/projections/mermaid/__tests__/mermaid-projection.test.js';
26
+ function gitGrep(pattern, pathspecs) {
27
+ const result = spawnSync('git', ['grep', '-n', '-I', '-E', pattern, '--', ...pathspecs], {
28
+ cwd: root,
29
+ encoding: 'utf8'
30
+ });
31
+ if (result.status !== 0 && result.status !== 1) {
32
+ assertGate(false, 'architecture_map_git_grep_failed', {
33
+ pattern,
34
+ stderr: String(result.stderr || '').slice(0, 400)
35
+ });
36
+ }
37
+ return String(result.stdout || '')
38
+ .split('\n')
39
+ .filter(Boolean);
40
+ }
41
+ function walkTs(relDir) {
42
+ const abs = path.join(root, relDir);
43
+ if (!fs.existsSync(abs))
44
+ return [];
45
+ const out = [];
46
+ const walk = (dir) => {
47
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
48
+ const file = path.join(dir, entry.name);
49
+ if (entry.isDirectory()) {
50
+ if (entry.name !== '__tests__')
51
+ walk(file);
52
+ continue;
53
+ }
54
+ if (entry.isFile() && entry.name.endsWith('.ts'))
55
+ out.push(file);
56
+ }
57
+ };
58
+ walk(abs);
59
+ return out;
60
+ }
61
+ function mermaidImportHits() {
62
+ const re = /(?:from\s+|import\s*\(\s*)['"]mermaid['"]/;
63
+ return walkTs('src/core/triwiki/context-graph/architecture')
64
+ .concat(walkTs('src/core/triwiki/context-graph/projections/mermaid'))
65
+ .filter((file) => re.test(fs.readFileSync(file, 'utf8')))
66
+ .map((file) => path.relative(root, file).split(path.sep).join('/'));
67
+ }
68
+ function runNodeTest(testRel, failCode) {
69
+ const absolute = path.join(root, testRel);
70
+ assertGate(fs.existsSync(absolute), 'architecture_map_test_missing', {
71
+ path: testRel,
72
+ hint: 'run npm run build first when targeting dist/'
73
+ });
74
+ const result = spawnSync(process.execPath, ['--test', absolute], {
75
+ cwd: root,
76
+ encoding: 'utf8',
77
+ env: process.env
78
+ });
79
+ assertGate(result.status === 0, failCode, {
80
+ path: testRel,
81
+ status: result.status,
82
+ stdout: String(result.stdout || '').slice(-1200),
83
+ stderr: String(result.stderr || '').slice(-1200)
84
+ });
85
+ }
86
+ function minimalSnapshot() {
87
+ const module = (id, modulePath) => ({
88
+ id,
89
+ kind: 'module',
90
+ label: modulePath,
91
+ trust: 0.9,
92
+ freshness: 'fresh',
93
+ risk: 'low',
94
+ tokenCost: 8,
95
+ metadata: {},
96
+ path: modulePath
97
+ });
98
+ return {
99
+ schema: 'sks.context-graph.v1',
100
+ schemaRevision: '1.0.0',
101
+ snapshotHash: 'a'.repeat(64),
102
+ nodes: [module('module:src/core/triwiki', 'src/core/triwiki'), module('module:src/core/errors', 'src/core/errors')],
103
+ edges: [
104
+ {
105
+ id: 'edge:module:src/core/triwiki->module:src/core/errors:imports',
106
+ from: 'module:src/core/triwiki',
107
+ to: 'module:src/core/errors',
108
+ type: 'imports',
109
+ confidence: 'exact',
110
+ provenance: { path: 'src/core/triwiki/x.ts', hash: 'abcd', extractor: 'test' },
111
+ observedAt: '2026-01-01T00:00:00.000Z'
112
+ }
113
+ ],
114
+ cycles: [],
115
+ extractors: [],
116
+ nodeCount: 2,
117
+ edgeCount: 1
118
+ };
119
+ }
120
+ async function loadCore() {
121
+ const policyMod = await importDist('core/triwiki/context-graph/architecture/policy.js');
122
+ const contracts = await importDist('core/triwiki/context-graph/architecture/contracts.js');
123
+ const mermaid = await importDist('core/triwiki/context-graph/projections/mermaid/index.js');
124
+ return { policyMod, contracts, mermaid };
125
+ }
126
+ async function runContract() {
127
+ const { policyMod, contracts } = await loadCore();
128
+ const allowlist = await importDist('core/triwiki/context-graph/optimizer/allowlist.js');
129
+ const align = await importDist('core/align/align-route.js');
130
+ const store = await importDist('core/triwiki/context-graph/store/architecture-map-store.js');
131
+ let policy;
132
+ try {
133
+ policy = policyMod.loadArchitectureMapPolicy(root);
134
+ }
135
+ catch (error) {
136
+ assertGate(false, 'architecture_map_policy_load_failed', {
137
+ error: error instanceof Error ? error.message : String(error)
138
+ });
139
+ throw new Error('unreachable');
140
+ }
141
+ assertGate(policy.schema === contracts.ARCHITECTURE_MAP_POLICY_SCHEMA, 'architecture_map_policy_schema_mismatch');
142
+ assertGate(policy.layers.length > 0, 'architecture_map_policy_empty_layers');
143
+ assertGate(contracts.ARCHITECTURE_MAP_POLICY_FILE === POLICY_FILE, 'architecture_map_policy_file_path_drift');
144
+ for (const schemaRel of [
145
+ 'schemas/architecture-map-policy.v1.schema.json',
146
+ 'schemas/architecture-map-manifest.v1.schema.json',
147
+ 'schemas/architecture-baseline.v1.schema.json',
148
+ 'schemas/architecture-review.v1.schema.json',
149
+ 'schemas/mermaid-projection.v1.schema.json'
150
+ ]) {
151
+ assertGate(exists(schemaRel), 'architecture_map_schema_missing', { path: schemaRel });
152
+ }
153
+ const classification = allowlist.classifyContextGraphPatchTarget(POLICY_FILE);
154
+ assertGate(classification === 'forbidden', 'architecture_map_policy_patch_target_not_forbidden', {
155
+ path: POLICY_FILE,
156
+ classification
157
+ });
158
+ assertGate(readText('src/scripts/check-architecture.ts').includes('imports 5+ unrelated route domains'), 'architecture_map_check_architecture_missing_domain_fan_in');
159
+ assertGate(mermaidImportHits().length === 0, 'architecture_map_mermaid_runtime_import', {
160
+ hits: mermaidImportHits()
161
+ });
162
+ const pkg = readJson('package.json');
163
+ assertGate(!pkg.dependencies?.mermaid, 'architecture_map_mermaid_in_runtime_deps');
164
+ assertGate(Boolean(pkg.devDependencies?.mermaid), 'architecture_map_mermaid_devdependency_missing');
165
+ for (const rel of store.ARCHITECTURE_MAP_ARTIFACT_RELS) {
166
+ assertGate(align.ALIGN_OUTPUT_ARTIFACTS.includes(rel), 'architecture_map_align_output_list_parity', {
167
+ missing: rel
168
+ });
169
+ }
170
+ assertGate(store.ARCHITECTURE_MAP_DIR_REL === MAP_DIR, 'architecture_map_dir_drift');
171
+ assertGate(contracts.GLOBAL_ARCHITECTURE_MAP_VIEW_IDS.length === 7, 'architecture_map_global_view_count');
172
+ emitGate(GATE_ID, {
173
+ mode,
174
+ policy_file: POLICY_FILE,
175
+ layers: policy.layers.length,
176
+ patch_target: classification,
177
+ align_artifacts: store.ARCHITECTURE_MAP_ARTIFACT_RELS.length
178
+ });
179
+ }
180
+ async function runQuality() {
181
+ const { policyMod, contracts, mermaid } = await loadCore();
182
+ const policy = policyMod.loadArchitectureMapPolicy(root);
183
+ const built = mermaid.buildArchitectureMapViews(minimalSnapshot(), policy, { rootId: 'fixture' });
184
+ assertGate(built.views.length === contracts.GLOBAL_ARCHITECTURE_MAP_VIEW_IDS.length, 'architecture_map_quality_view_count', { observed: built.views.length });
185
+ assertGate(built.manifest.schema === contracts.ARCHITECTURE_MAP_MANIFEST_SCHEMA, 'architecture_map_quality_manifest_schema');
186
+ const absPathHits = [];
187
+ for (const view of built.views) {
188
+ assertGate(view.text.startsWith('%% GENERATED BY SKS'), 'architecture_map_quality_missing_header', {
189
+ viewId: view.viewId
190
+ });
191
+ assertGate(/\bflowchart (TD|LR)\b/.test(view.text), 'architecture_map_quality_missing_flowchart', {
192
+ viewId: view.viewId
193
+ });
194
+ if (/\/Users\/|\/home\/|C:\\\\/.test(view.text))
195
+ absPathHits.push(view.viewId);
196
+ }
197
+ assertGate(absPathHits.length === 0, 'architecture_map_quality_absolute_path_leak', { hits: absPathHits });
198
+ const runs = Math.max(1, policy.accuracyFloors.deterministicHashRuns);
199
+ const hashes = new Set();
200
+ for (let index = 0; index < runs; index += 1) {
201
+ hashes.add(mermaid.buildArchitectureMapViews(minimalSnapshot(), policy, { rootId: 'fixture' }).manifest.canonicalHash);
202
+ }
203
+ assertGate(hashes.size === 1, 'architecture_map_quality_nondeterministic', { hashes: [...hashes] });
204
+ emitGate(GATE_ID, {
205
+ mode,
206
+ views: built.views.length,
207
+ findings: built.findings.length,
208
+ deterministic_hash_runs: runs,
209
+ canonical_hash: built.manifest.canonicalHash
210
+ });
211
+ }
212
+ async function runPerformance() {
213
+ const { policyMod, mermaid } = await loadCore();
214
+ const policy = policyMod.loadArchitectureMapPolicy(root);
215
+ const snapshot = minimalSnapshot();
216
+ const coldStart = performance.now();
217
+ const first = mermaid.buildArchitectureMapViews(snapshot, policy, { rootId: 'fixture' });
218
+ const coldMs = performance.now() - coldStart;
219
+ const warmStart = performance.now();
220
+ const second = mermaid.buildArchitectureMapViews(snapshot, policy, { rootId: 'fixture' });
221
+ const warmMs = performance.now() - warmStart;
222
+ const totalBytes = first.views.reduce((sum, view) => sum + view.projection.byteLength, 0);
223
+ assertGate(coldMs <= 1500, 'architecture_map_performance_cold_over_budget', { coldMs });
224
+ assertGate(warmMs <= 1500, 'architecture_map_performance_warm_over_budget', { warmMs });
225
+ assertGate(totalBytes <= policy.globalAtlasMaxBytes, 'architecture_map_performance_bytes_over_budget', {
226
+ totalBytes,
227
+ limit: policy.globalAtlasMaxBytes
228
+ });
229
+ assertGate(first.manifest.canonicalHash === second.manifest.canonicalHash, 'architecture_map_performance_hash_drift');
230
+ emitGate(GATE_ID, {
231
+ mode,
232
+ cold_ms: Math.round(coldMs * 1000) / 1000,
233
+ warm_ms: Math.round(warmMs * 1000) / 1000,
234
+ total_bytes: totalBytes,
235
+ budget_bytes: policy.globalAtlasMaxBytes
236
+ });
237
+ }
238
+ function runRegressionFixtures() {
239
+ const suites = ['serializer'];
240
+ runNodeTest(SERIALIZER_TEST, 'architecture_map_regression_serializer_failed');
241
+ if (fs.existsSync(path.join(root, PROJECTION_TEST))) {
242
+ runNodeTest(PROJECTION_TEST, 'architecture_map_regression_projection_failed');
243
+ suites.push('mermaid-projection');
244
+ }
245
+ emitGate(GATE_ID, { mode, suites });
246
+ }
247
+ function runLegacyClosure() {
248
+ const excluded = [':!CHANGELOG.md', ':!docs/work-orders', ':!docs/architecture', ':!.sneakoscope', `:!${SELF}`];
249
+ assertGate(!exists('src/scripts/atlas-check.ts'), 'architecture_map_legacy_atlas_check_present');
250
+ assertGate(!exists('config/architecture-atlas.v1.json'), 'architecture_map_legacy_atlas_policy_present');
251
+ assertGate(!exists('src/core/architecture-atlas-review.ts'), 'architecture_map_legacy_atlas_review_present');
252
+ assertGate(!exists('sks.architecture.json'), 'architecture_map_legacy_root_policy_present');
253
+ const production = walkTs('src/core/triwiki/atlas');
254
+ assertGate(production.length === 0, 'architecture_map_legacy_atlas_sources_present', {
255
+ hits: production.slice(0, 8).map((file) => path.relative(root, file).split(path.sep).join('/'))
256
+ });
257
+ assertGate(gitGrep('"id":\\s*"atlas:', ['release-gates.v2.json']).length === 0, 'architecture_map_legacy_atlas_gate_ids_present');
258
+ assertGate(gitGrep("'atlas:", ['src/core/release/release-gate-contract.ts', 'src/scripts/release-metadata-check.ts'])
259
+ .length === 0, 'architecture_map_legacy_atlas_contract_ids_present');
260
+ assertGate(gitGrep('\\batlas-(build|repair|refresh)\\b', ['src', ...excluded]).length === 0, 'architecture_map_legacy_write_cli_present');
261
+ assertGate(gitGrep('\\.sneakoscope/wiki/architecture-atlas/', ['src', ...excluded]).length === 0, 'architecture_map_legacy_wiki_path_survives');
262
+ emitGate(GATE_ID, { mode, checks: ['atlas_sources', 'atlas_check', 'atlas_gates', 'write_cli', 'wiki_path'] });
263
+ }
264
+ async function runFreshness() {
265
+ const { contracts } = await loadCore();
266
+ const manifestRel = `${MAP_DIR}/manifest.json`;
267
+ assertGate(exists(manifestRel), 'architecture_map_freshness_missing', {
268
+ path: manifestRel,
269
+ next_action: 'sks align run'
270
+ });
271
+ const manifest = readJson(manifestRel);
272
+ assertGate(manifest.schema === contracts.ARCHITECTURE_MAP_MANIFEST_SCHEMA, 'architecture_map_freshness_schema');
273
+ const graphRel = '.sneakoscope/wiki/context-graph.json';
274
+ assertGate(exists(graphRel), 'architecture_map_freshness_graph_missing', {
275
+ path: graphRel,
276
+ next_action: 'sks align run'
277
+ });
278
+ const graph = readJson(graphRel);
279
+ const expected = String(graph.snapshotHash || '');
280
+ const observed = String(manifest.graphHash || manifest.sourceBinding?.graphHash || '');
281
+ assertGate(Boolean(expected) && expected === observed, 'architecture_map_freshness_stale', {
282
+ expected,
283
+ observed,
284
+ next_action: 'sks align run'
285
+ });
286
+ emitGate(GATE_ID, { mode, graph_hash: observed.slice(0, 16), next_action: null });
287
+ }
288
+ if (mode === 'contract')
289
+ await runContract();
290
+ else if (mode === 'quality')
291
+ await runQuality();
292
+ else if (mode === 'performance')
293
+ await runPerformance();
294
+ else if (mode === 'regression-fixtures')
295
+ runRegressionFixtures();
296
+ else if (mode === 'legacy-closure')
297
+ runLegacyClosure();
298
+ else
299
+ await runFreshness();
@@ -8,8 +8,22 @@ export const root = path.resolve(process.env.SKS_BUILD_SOURCE_ROOT
8
8
  const distRoot = path.resolve(process.env.SKS_BUILD_OUTPUT_DIR || path.join(root, 'dist'));
9
9
  export const distStampPath = path.join(distRoot, '.sks-build-stamp.json');
10
10
  export const reportStampPath = path.join(root, '.sneakoscope', 'reports', 'dist-build-stamp.json');
11
+ const SOURCE_SNAPSHOT_CACHE = path.join(root, '.sneakoscope', 'cache', 'source-snapshot.json');
12
+ const SOURCE_SNAPSHOT_CACHE_SCHEMA = 'sks.source-snapshot-cache.v1';
13
+ let sourceSnapshotMemo = null;
11
14
  export function sourceSnapshot() {
12
15
  const files = releaseRelevantFiles();
16
+ const fingerprint = sourceFingerprint(files);
17
+ if (sourceSnapshotMemo?.fingerprint === fingerprint) {
18
+ return { digest: sourceSnapshotMemo.digest, file_count: files.length, files };
19
+ }
20
+ const cached = readJson(SOURCE_SNAPSHOT_CACHE);
21
+ if (cached?.schema === SOURCE_SNAPSHOT_CACHE_SCHEMA
22
+ && cached.fingerprint === fingerprint
23
+ && /^[a-f0-9]{64}$/.test(String(cached.digest || ''))) {
24
+ sourceSnapshotMemo = { fingerprint, digest: cached.digest };
25
+ return { digest: cached.digest, file_count: files.length, files };
26
+ }
13
27
  const hash = crypto.createHash('sha256');
14
28
  for (const file of files) {
15
29
  const full = path.join(root, file);
@@ -23,7 +37,40 @@ export function sourceSnapshot() {
23
37
  hash.update(sha256(buf));
24
38
  hash.update('\0');
25
39
  }
26
- return { digest: hash.digest('hex'), file_count: files.length, files };
40
+ const digest = hash.digest('hex');
41
+ sourceSnapshotMemo = { fingerprint, digest };
42
+ writeSourceSnapshotCache(fingerprint, digest, files.length);
43
+ return { digest, file_count: files.length, files };
44
+ }
45
+ function sourceFingerprint(files) {
46
+ const hash = crypto.createHash('sha256');
47
+ for (const file of files) {
48
+ let stat = null;
49
+ try {
50
+ stat = fs.statSync(path.join(root, file));
51
+ }
52
+ catch { }
53
+ if (!stat?.isFile())
54
+ continue;
55
+ hash.update(`${file}\0${stat.size}\0${stat.mtimeMs}\0${stat.ino}\0`);
56
+ }
57
+ return hash.digest('hex');
58
+ }
59
+ function writeSourceSnapshotCache(fingerprint, digest, fileCount) {
60
+ try {
61
+ fs.mkdirSync(path.dirname(SOURCE_SNAPSHOT_CACHE), { recursive: true });
62
+ const temp = `${SOURCE_SNAPSHOT_CACHE}.${process.pid}.tmp`;
63
+ fs.writeFileSync(temp, `${JSON.stringify({
64
+ schema: SOURCE_SNAPSHOT_CACHE_SCHEMA,
65
+ fingerprint,
66
+ digest,
67
+ file_count: fileCount,
68
+ recorded_at: new Date().toISOString()
69
+ })}\n`);
70
+ fs.renameSync(temp, SOURCE_SNAPSHOT_CACHE);
71
+ }
72
+ catch {
73
+ }
27
74
  }
28
75
  export function currentDistFreshness() {
29
76
  const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
@@ -62,6 +62,8 @@ const requiredPackageScripts = [
62
62
  ];
63
63
  const requiredReleaseGates = [
64
64
  'architecture:guard',
65
+ 'architecture-map:contract',
66
+ 'architecture-map:legacy-closure',
65
67
  'codex:current:dependency-graph',
66
68
  'codex:current:binary-identity',
67
69
  'codex:current:policy',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "8.3.2",
4
+ "version": "8.4.0",
5
5
  "description": "Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
@@ -41,7 +41,7 @@
41
41
  "dist/scripts/canonical-test-runner.js",
42
42
  "dist/scripts/desktop-bridge-transport-client.js",
43
43
  "dist/scripts/release-version-truth-check.js",
44
- "dist/scripts/{agent-guidance-dedup-check.js,agent-message-bus-reader-check.js,all-feature-deep-completion-check.js,appshots-thread-attachment-discovery-check.js,architecture-guard-check.js,certificate-sla-check.js,check-runtime-schemas.js,cli-output-consistency-check.js,codex-current-app-server-v2-check.js,codex-current-binary-identity-check.js,codex-current-capability-check.js,codex-current-core-real-probes-check.js,codex-current-dependency-check.js,codex-current-policy-check.js,codex-current-thread-store-check.js,codex-agent-role-rich-content-check.js,codex-agent-role-sync-check.js,codex-agent-type-routing-check.js,codex-app-execution-profile-check.js,codex-app-fast-ui-preservation-check.js,codex-app-handoff-check.js,codex-app-handoff-launch-check.js,codex-config-load-probe.js,context-graph-check.js,codex-control-all-pipelines-check.js,codex-control-event-stream-ledger-check.js,codex-control-tool-output-continuity-audit-check.js,desktop-bridge-transport-check.js,desktop-bridge-latency-check.js,desktop-bridge-capabilities-check.js,desktop-bridge-real-evidence-check.js,codex-native-agent-role-content-check.js,codex-native-feature-broker-blackbox.js,codex-native-feature-broker-check.js,codex-native-harness-compat-check.js,codex-native-hook-lifecycle-proof-check.js,codex-native-runtime-e2e-fixture.js,codex-plugin-app-template-policy-check.js,codex-sdk-all-pipelines-check.js,codex-sdk-backend-router-check.js,codex-sdk-capability-check.js,codex-sdk-event-stream-ledger-check.js,codex-sdk-real-smoke-check.js,concurrent-session-collision-check.js,context7-evidence-dedupe-check.js,core-skill-card-schema-check.js,core-skill-deployment-snapshot-check.js,core-skill-heldout-validation-check.js,core-skill-no-inference-optimizer-check.js,core-skill-patch-check.js,core-skill-route-runtime-integration-check.js,current-command-surface-check.js,current-surface-update-e2e-check.js,current-upgrade-matrix-check.js,desktop-bridge-unification-check.js,dfix-fixture-check.js,dfix-patch-handoff-check.js,dfix-verification-check.js,dfix-verification-recommendation-check.js,docs-truthfulness-check.js,doctor-codex-app-harness-check.js,doctor-fix-proves-codex-read-check.js,doctor-fixes-codex-app-fast-ui-check.js,evidence-flagship-coverage-check.js,fast-codex-service-tier-proof-check.js,fixtures/fake-codex-config-loader.js,gate-policy-audit-check.js,geo-claim-evidence-check.js,geo-cli-blackbox-check.js,geo-crawler-policy-check.js,git-worktree-checkpoint-check.js,git-worktree-cross-rebase-check.js,git-worktree-diff-envelope-check.js,git-worktree-dirty-lock-check.js,git-worktree-dirty-main-detection-check.js,git-worktree-integration-primary-check.js,git-worktree-manifest-append-check.js,git-worktree-untracked-diff-check.js,goal-artifact-compat-check.js,harness-benchmark-check.js,helper-dedup-check.js,hook-latency-budget-check.js,image-artifact-path-contract-check.js,imagegen-real-smoke-check.js,init-deep-backup-retention-check.js,installed-package-smoke-check.js,lib/codex-sdk-gate-lib.js,lib/ensure-dist-fresh.js,lib/git-worktree-fixture.js,lib/valid-png-fixture.js,local-collab-all-pipelines-final-gpt-check.js,loop-directive-check-lib.js,loop-integration-finalizer-check.js,loop-worker-fixture-child.js,mad-preflight-blocks-unreadable-config-check.js,mad-sks-app-ui-no-mutation-check.js}",
44
+ "dist/scripts/{agent-guidance-dedup-check.js,agent-message-bus-reader-check.js,all-feature-deep-completion-check.js,appshots-thread-attachment-discovery-check.js,architecture-guard-check.js,architecture-map-check.js,certificate-sla-check.js,check-runtime-schemas.js,cli-output-consistency-check.js,codex-current-app-server-v2-check.js,codex-current-binary-identity-check.js,codex-current-capability-check.js,codex-current-core-real-probes-check.js,codex-current-dependency-check.js,codex-current-policy-check.js,codex-current-thread-store-check.js,codex-agent-role-rich-content-check.js,codex-agent-role-sync-check.js,codex-agent-type-routing-check.js,codex-app-execution-profile-check.js,codex-app-fast-ui-preservation-check.js,codex-app-handoff-check.js,codex-app-handoff-launch-check.js,codex-config-load-probe.js,context-graph-check.js,codex-control-all-pipelines-check.js,codex-control-event-stream-ledger-check.js,codex-control-tool-output-continuity-audit-check.js,desktop-bridge-transport-check.js,desktop-bridge-latency-check.js,desktop-bridge-capabilities-check.js,desktop-bridge-real-evidence-check.js,codex-native-agent-role-content-check.js,codex-native-feature-broker-blackbox.js,codex-native-feature-broker-check.js,codex-native-harness-compat-check.js,codex-native-hook-lifecycle-proof-check.js,codex-native-runtime-e2e-fixture.js,codex-plugin-app-template-policy-check.js,codex-sdk-all-pipelines-check.js,codex-sdk-backend-router-check.js,codex-sdk-capability-check.js,codex-sdk-event-stream-ledger-check.js,codex-sdk-real-smoke-check.js,concurrent-session-collision-check.js,context7-evidence-dedupe-check.js,core-skill-card-schema-check.js,core-skill-deployment-snapshot-check.js,core-skill-heldout-validation-check.js,core-skill-no-inference-optimizer-check.js,core-skill-patch-check.js,core-skill-route-runtime-integration-check.js,current-command-surface-check.js,current-surface-update-e2e-check.js,current-upgrade-matrix-check.js,desktop-bridge-unification-check.js,dfix-fixture-check.js,dfix-patch-handoff-check.js,dfix-verification-check.js,dfix-verification-recommendation-check.js,docs-truthfulness-check.js,doctor-codex-app-harness-check.js,doctor-fix-proves-codex-read-check.js,doctor-fixes-codex-app-fast-ui-check.js,evidence-flagship-coverage-check.js,fast-codex-service-tier-proof-check.js,fixtures/fake-codex-config-loader.js,gate-policy-audit-check.js,geo-claim-evidence-check.js,geo-cli-blackbox-check.js,geo-crawler-policy-check.js,git-worktree-checkpoint-check.js,git-worktree-cross-rebase-check.js,git-worktree-diff-envelope-check.js,git-worktree-dirty-lock-check.js,git-worktree-dirty-main-detection-check.js,git-worktree-integration-primary-check.js,git-worktree-manifest-append-check.js,git-worktree-untracked-diff-check.js,goal-artifact-compat-check.js,harness-benchmark-check.js,helper-dedup-check.js,hook-latency-budget-check.js,image-artifact-path-contract-check.js,imagegen-real-smoke-check.js,init-deep-backup-retention-check.js,installed-package-smoke-check.js,lib/codex-sdk-gate-lib.js,lib/ensure-dist-fresh.js,lib/git-worktree-fixture.js,lib/valid-png-fixture.js,local-collab-all-pipelines-final-gpt-check.js,loop-directive-check-lib.js,loop-integration-finalizer-check.js,loop-worker-fixture-child.js,mad-preflight-blocks-unreadable-config-check.js,mad-sks-app-ui-no-mutation-check.js}",
45
45
  "dist/scripts/{latest-version-guidance-check.js,mad-sks-launch-sql-plane-boundary-check.js,mad-sks-sql-plane-capability-check.js,mad-sks-sql-plane-lifecycle-hook-decision-check.js,mad-sks-sql-plane-result-lifecycle-check.js,managed-config-merge-check.js,mcp-plugin-inventory-check.js,model-call-concurrency-check.js,mutation-callsite-analysis.js,mutation-callsite-coverage-check.js,naruto-ssot-gate-aliases-check.js,naruto-ssot-pipeline-default-check.js,naruto-ssot-route-normalization-check.js,naruto-ssot-routing-check.js,naruto-worktree-coding-blackbox.js,native-capability-repair-matrix-check.js,native-image-generation-repair-check.js,official-subagent-workflow-check.js,package-published-contract-check.js,packlist-performance-check.js,pipeline-codex-native-doctor-mad-routing-check.js,pipeline-codex-native-doctor-mad-routing-real-blackbox.js,pipeline-codex-native-image-routing-check.js,pipeline-codex-native-image-routing-real-blackbox.js,pipeline-codex-native-loop-routing-check.js,pipeline-codex-native-loop-routing-real-blackbox.js,pipeline-codex-native-qa-routing-check.js,pipeline-codex-native-qa-routing-real-blackbox.js,pipeline-codex-native-research-routing-check.js,pipeline-codex-native-research-routing-real-blackbox.js,ppt-full-e2e-blackbox-check.js,ppt-real-export-adapter-check.js,ppt-real-imagegen-smoke-check.js,ppt-real-imagegen-wiring-check.js,ppt-reexport-rereview-check.js,prepublish-fast-check.js,publish-preflight.js,prepublish-release-check-or-fast.js,probe-memoization-check.js,product-design-plugin-routing-check.js,prompt-placeholder-guard-check.js,proof-root-cause-policy-check.js,provider-badge-context-check.js,python-codex-sdk-all-pipelines-check.js,qa-loop-app-handoff-capability-check.js,qa-loop-app-handoff-check.js,qa-loop-app-handoff-cli-check.js,qa-loop-app-handoff-confirmation-check.js,qa-loop-app-handoff-gate-lifecycle-check.js,qa-loop-app-handoff-launch-check.js,qa-loop-app-handoff-status-lifecycle-check.js,qa-loop-budget-policy-check.js,qa-loop-effort-escalation-check.js,qa-loop-execution-profile-routing-check.js,qa-loop-image-path-exposure-check.js,qa-loop-image-path-prompt-injection-check.js,release-affected-selector-check.js,release-aggressive-resource-governor-check.js,release-cache-glob-hashing-check.js,release-cache-input-classifier-check.js,release-cache-neutralization-report-check.js,release-cache-version-neutral-fixture-check.js,release-check-stamp.js,release-dynamic-presets-check.js,release-full-parallelism-blackbox.js,release-gate-batch-runner-check.js,release-gate-budget-check.js,release-gate-dag-runner-check.js,release-gate-dag-runner.js,release-latency-slo-check.js,release-metadata-check.js,release-pack-receipt.js,release-parallel-speed-budget-check.js,release-physical-gates-check.js,release-proof-truth-check.js,release-provenance-check.js,release-real-check.js,release-runtime-truth-matrix-check.js,release-speed-summary.js,research-blueprint-densifier-check.js,research-claim-builder-check.js,research-complete-package-fixture-check.js,research-execution-profile-routing-check.js,research-final-reviewer-blackbox.js,responses-retry-policy-centralized-check.js,runtime-proof-summary-check.js,runtime-script-pack-closure-check.js,scheduler-batch-dispatch-check.js,scheduler-parallel-proof-consistency-check.js,scheduler-utilization-integral-check.js,search-visibility-gate-lib.js,secret-preservation-check.js,seo-audit-fixture-check.js,seo-cli-blackbox-check.js,seo-geo-geo-disambiguation-check.js,seo-geo-route-identity-check.js,seo-geo-skill-rich-content-check.js,seo-no-mutation-by-default-check.js,shared-memory-fixture-check.js,side-effect-runtime-report-check.js,skill-name-canonicalizer-check.js,skill-surface-modernization-check.js,skills-manifest-continuity-check.js,sks-cli-gate-lib.js}",
46
46
  "dist/scripts/{real-execution-check-lib.js,gate-lib.js,runtime-domain-gate-lib.js,typed-routing-gate-lib.js,codex-native-gate-lib.js,skill-fixture-check-lib.js,sks-uninstall-regression-check.js,sksd-daemon-check.js,super-search-provider-interface-check.js,triwiki-cache-key-check.js,triwiki-proof-bank-blackbox.js,triwiki-proof-bank-check.js,triwiki-proof-card-check.js,trust-fixture-check.js,type-surface-codex-app-check.js,ultra-router-auto-router-check.js,uninstall-inventory-check.js,install-surface-ssot-check.js,ux-review-extract-wires-real-extractor-check.js,ux-review-imagegen-blackbox-check.js,ux-review-patch-diff-recheck-check.js,ux-review-real-imagegen-smoke-check.js,ux-review-run-wires-imagegen-check.js,wrongness-fixture-check.js}",
47
47
  "dist/scripts/check-publish-tag.js",
@@ -58,6 +58,7 @@
58
58
  "config/installed-public-surface-closure.v1.json",
59
59
  "config/competitor-scorecard-baseline.json",
60
60
  "config/architecture-budgets.v1.json",
61
+ "config/architecture-map-policy.v1.json",
61
62
  "config/perf-budgets.v1.json",
62
63
  "config/skills-hash-ledger.v1.json",
63
64
  "release-gates.v2.json",
@@ -204,6 +205,8 @@
204
205
  "typescript": "^5.9.3"
205
206
  },
206
207
  "devDependencies": {
207
- "@types/node": "^24.0.0"
208
+ "@types/node": "^24.0.0",
209
+ "jsdom": "30.0.1",
210
+ "mermaid": "11.12.1"
208
211
  }
209
212
  }
@@ -67,6 +67,210 @@
67
67
  ],
68
68
  "output_contract": "sks.gate-result.v2"
69
69
  },
70
+ {
71
+ "id": "architecture-map:contract",
72
+ "command": "node ./dist/scripts/architecture-map-check.js --mode contract",
73
+ "deps": [],
74
+ "resource": [
75
+ "cpu-light",
76
+ "fs-read"
77
+ ],
78
+ "side_effect": "hermetic",
79
+ "timeout_ms": 120000,
80
+ "cache": {
81
+ "enabled": true,
82
+ "inputs": [
83
+ "package.json",
84
+ "release-gates.v2.json",
85
+ "config/architecture-map-policy.v1.json",
86
+ "src/core/triwiki/context-graph/architecture/**",
87
+ "src/core/triwiki/context-graph/projections/mermaid/**",
88
+ "src/core/triwiki/context-graph/store/architecture-map-store.ts",
89
+ "src/scripts/architecture-map-check.ts"
90
+ ]
91
+ },
92
+ "isolation": {
93
+ "home": "temp",
94
+ "codex_home": "temp",
95
+ "report_dir": "per-gate"
96
+ },
97
+ "preset": [
98
+ "release"
99
+ ],
100
+ "output_contract": "sks.gate-result.v2"
101
+ },
102
+ {
103
+ "id": "architecture-map:legacy-closure",
104
+ "command": "node ./dist/scripts/architecture-map-check.js --mode legacy-closure",
105
+ "deps": [
106
+ "architecture-map:contract"
107
+ ],
108
+ "resource": [
109
+ "cpu-light",
110
+ "fs-read"
111
+ ],
112
+ "side_effect": "hermetic",
113
+ "timeout_ms": 120000,
114
+ "cache": {
115
+ "enabled": true,
116
+ "inputs": [
117
+ "package.json",
118
+ "release-gates.v2.json",
119
+ "config/architecture-map-policy.v1.json",
120
+ "src/core/triwiki/context-graph/architecture/**",
121
+ "src/core/triwiki/context-graph/projections/mermaid/**",
122
+ "src/core/triwiki/context-graph/store/architecture-map-store.ts",
123
+ "src/scripts/architecture-map-check.ts"
124
+ ]
125
+ },
126
+ "isolation": {
127
+ "home": "temp",
128
+ "codex_home": "temp",
129
+ "report_dir": "per-gate"
130
+ },
131
+ "preset": [
132
+ "release"
133
+ ],
134
+ "output_contract": "sks.gate-result.v2"
135
+ },
136
+ {
137
+ "id": "architecture-map:quality",
138
+ "command": "node ./dist/scripts/architecture-map-check.js --mode quality",
139
+ "deps": [
140
+ "architecture-map:contract"
141
+ ],
142
+ "resource": [
143
+ "cpu-light",
144
+ "fs-read"
145
+ ],
146
+ "side_effect": "hermetic",
147
+ "timeout_ms": 300000,
148
+ "cache": {
149
+ "enabled": true,
150
+ "inputs": [
151
+ "package.json",
152
+ "release-gates.v2.json",
153
+ "config/architecture-map-policy.v1.json",
154
+ "src/core/triwiki/context-graph/architecture/**",
155
+ "src/core/triwiki/context-graph/projections/mermaid/**",
156
+ "src/core/triwiki/context-graph/store/architecture-map-store.ts",
157
+ "src/scripts/architecture-map-check.ts"
158
+ ]
159
+ },
160
+ "isolation": {
161
+ "home": "temp",
162
+ "codex_home": "temp",
163
+ "report_dir": "per-gate"
164
+ },
165
+ "preset": [
166
+ "confidence"
167
+ ],
168
+ "output_contract": "sks.gate-result.v2"
169
+ },
170
+ {
171
+ "id": "architecture-map:performance",
172
+ "command": "node ./dist/scripts/architecture-map-check.js --mode performance",
173
+ "deps": [
174
+ "architecture-map:contract"
175
+ ],
176
+ "resource": [
177
+ "cpu-light",
178
+ "fs-read"
179
+ ],
180
+ "side_effect": "hermetic",
181
+ "timeout_ms": 300000,
182
+ "cache": {
183
+ "enabled": true,
184
+ "inputs": [
185
+ "package.json",
186
+ "release-gates.v2.json",
187
+ "config/architecture-map-policy.v1.json",
188
+ "src/core/triwiki/context-graph/architecture/**",
189
+ "src/core/triwiki/context-graph/projections/mermaid/**",
190
+ "src/core/triwiki/context-graph/store/architecture-map-store.ts",
191
+ "src/scripts/architecture-map-check.ts"
192
+ ]
193
+ },
194
+ "isolation": {
195
+ "home": "temp",
196
+ "codex_home": "temp",
197
+ "report_dir": "per-gate"
198
+ },
199
+ "preset": [
200
+ "confidence"
201
+ ],
202
+ "output_contract": "sks.gate-result.v2"
203
+ },
204
+ {
205
+ "id": "architecture-map:regression-fixtures",
206
+ "command": "node ./dist/scripts/architecture-map-check.js --mode regression-fixtures",
207
+ "deps": [
208
+ "architecture-map:contract"
209
+ ],
210
+ "resource": [
211
+ "cpu-light",
212
+ "fs-read"
213
+ ],
214
+ "side_effect": "hermetic",
215
+ "timeout_ms": 300000,
216
+ "cache": {
217
+ "enabled": true,
218
+ "inputs": [
219
+ "package.json",
220
+ "release-gates.v2.json",
221
+ "config/architecture-map-policy.v1.json",
222
+ "src/core/triwiki/context-graph/architecture/**",
223
+ "src/core/triwiki/context-graph/projections/mermaid/**",
224
+ "src/core/triwiki/context-graph/store/architecture-map-store.ts",
225
+ "src/scripts/architecture-map-check.ts",
226
+ "test/architecture-map/**",
227
+ "test/fixtures/architecture-map/**"
228
+ ]
229
+ },
230
+ "isolation": {
231
+ "home": "temp",
232
+ "codex_home": "temp",
233
+ "report_dir": "per-gate"
234
+ },
235
+ "preset": [
236
+ "confidence"
237
+ ],
238
+ "output_contract": "sks.gate-result.v2"
239
+ },
240
+ {
241
+ "id": "architecture-map:freshness",
242
+ "command": "node ./dist/scripts/architecture-map-check.js --mode freshness",
243
+ "deps": [
244
+ "architecture-map:contract"
245
+ ],
246
+ "resource": [
247
+ "cpu-light",
248
+ "fs-read"
249
+ ],
250
+ "side_effect": "hermetic",
251
+ "timeout_ms": 120000,
252
+ "cache": {
253
+ "enabled": true,
254
+ "inputs": [
255
+ "package.json",
256
+ "release-gates.v2.json",
257
+ "config/architecture-map-policy.v1.json",
258
+ "src/core/triwiki/context-graph/architecture/**",
259
+ "src/core/triwiki/context-graph/projections/mermaid/**",
260
+ "src/core/triwiki/context-graph/store/architecture-map-store.ts",
261
+ "src/scripts/architecture-map-check.ts"
262
+ ]
263
+ },
264
+ "isolation": {
265
+ "home": "temp",
266
+ "codex_home": "temp",
267
+ "report_dir": "per-gate"
268
+ },
269
+ "preset": [
270
+ "confidence"
271
+ ],
272
+ "output_contract": "sks.gate-result.v2"
273
+ },
70
274
  {
71
275
  "id": "agent:message-bus-reader",
72
276
  "command": "node ./dist/scripts/agent-message-bus-reader-check.js",