arkgate 4.8.2 → 4.8.3

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 (51) hide show
  1. package/CHANGELOG.md +15 -3
  2. package/README.md +39 -8
  3. package/bin/lib/analysis-engine.mjs +6 -6
  4. package/bin/lib/ark-order-facts.mjs +59 -0
  5. package/bin/lib/ark-order-sensors.mjs +31 -2
  6. package/bin/lib/arkrule-file-hints.mjs +6 -2
  7. package/bin/lib/arkrules-contract.mjs +1 -0
  8. package/bin/lib/arkrules-sensors.mjs +22 -2
  9. package/bin/lib/config-extras.mjs +2 -0
  10. package/bin/lib/diagnostic-catalog.mjs +2 -1
  11. package/bin/lib/remediation.mjs +9 -1
  12. package/bin/lib/resolved-candidate-facts.mjs +31 -0
  13. package/dist/{configTypes-BdCe_gvv.d.ts → configTypes-dNJ2C0yx.d.ts} +5 -0
  14. package/dist/{diagnosticCatalog-CPzH-MLN.d.ts → diagnosticCatalog-C5GgeyEE.d.ts} +97 -7
  15. package/dist/eslint/index.cjs +6 -6
  16. package/dist/eslint/index.d.ts +1 -1
  17. package/dist/eslint/index.js +6 -6
  18. package/dist/index.cjs +34 -34
  19. package/dist/index.d.ts +24 -7
  20. package/dist/index.js +34 -34
  21. package/dist/nestjs/index.cjs +5 -5
  22. package/dist/nestjs/index.d.ts +3 -3
  23. package/dist/nestjs/index.js +5 -5
  24. package/dist/runtime/index.cjs +15 -15
  25. package/dist/runtime/index.d.ts +6 -6
  26. package/dist/runtime/index.js +15 -15
  27. package/dist/{types-C9KApBzX.d.ts → types-DeK7SYGC.d.ts} +1 -1
  28. package/dist/{types-DCSlrRnV.d.ts → types-dK24fDZa.d.ts} +1 -1
  29. package/docs/README.md +4 -4
  30. package/docs/configuration.md +12 -8
  31. package/docs/develop.md +23 -2
  32. package/docs/diagnostics.md +9 -0
  33. package/docs/enthusiast/README.md +6 -4
  34. package/docs/package-surface.md +4 -2
  35. package/docs/product-voice.md +15 -5
  36. package/docs/use.md +8 -5
  37. package/package.json +1 -1
  38. package/schemas/ark.arkrules.schema.json +1 -0
  39. package/schemas/ark.config.schema.json +9 -0
  40. package/schemas/ark.resolved-candidate-facts.schema.json +1 -1
  41. package/server.json +2 -2
  42. package/templates/agent-skills/README.md +1 -1
  43. package/templates/agent-skills/ark-adopt/SKILL.md +8 -3
  44. package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
  45. package/templates/agent-skills/ark-contract/SKILL.md +4 -0
  46. package/templates/agent-skills/ark-place/SKILL.md +6 -2
  47. package/templates/arkrules/ApplicationOrchestration.json +6 -0
  48. package/templates/skills/ark-adopt.md +8 -3
  49. package/templates/skills/ark-autopilot.md +1 -1
  50. package/templates/skills/ark-contract.md +4 -0
  51. package/templates/skills/ark-place.md +6 -2
@@ -10,6 +10,11 @@
10
10
 
11
11
  export const ARKORDER_PLANE_FACTORY = 'createOrderPlane';
12
12
  export const ARKORDER_FORBIDDEN_METHODS = ['update', 'patch', 'set', 'mutate'];
13
+ const IO_IMPORT_HINT_RE = /\bfrom\s+['"](?:@?prisma\/client|@supabase\/|drizzle-orm|typeorm|knex|mongodb|pg|mysql2|mongoose|better-sqlite3|ioredis|redis|kysely|sequelize)['"]|require\(\s*['"](?:@?prisma\/client|pg|knex|typeorm|mongoose)/;
14
+ const PERSISTENCE_WRITE_HINT_RE = /\.(?:insert(?:One|Many)?|update(?:One|Many)?|upsert|delete(?:One|Many)?|createMany|create|replaceOne|findOneAnd(?:Update|Delete|Replace))\s*\(|\bINSERT\s+INTO\b|\bUPDATE\s+[A-Za-z_][\w.]*\s+SET\b|\bDELETE\s+FROM\b/i;
15
+ function escapeRegExp(value) {
16
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
17
+ }
13
18
  export function isArkOrderModuleSpecifier(specifier) {
14
19
  return specifier === 'arkgate/order' || specifier.startsWith('arkgate/order/');
15
20
  }
@@ -51,3 +56,57 @@ export function extractArkOrderGenericUpdatesFromSource(file, content) {
51
56
  }
52
57
  return facts;
53
58
  }
59
+ /**
60
+ * Direct evidence: persistence driver import + write token + a declared slow key
61
+ * written as a property. Absence of xiKeys is the caller's problem (sensor stays silent).
62
+ */
63
+ export function extractArkOrderXiFieldWritesFromSource(file, content, xiKeys) {
64
+ if (xiKeys.length === 0)
65
+ return [];
66
+ const source = stripCommentsPreservingLines(content);
67
+ if (!IO_IMPORT_HINT_RE.test(source) || !PERSISTENCE_WRITE_HINT_RE.test(source))
68
+ return [];
69
+ const facts = [];
70
+ const seen = new Set();
71
+ for (const key of xiKeys) {
72
+ if (!key)
73
+ continue;
74
+ const re = new RegExp(`(?:\\b${escapeRegExp(key)}\\s*:\\s*(?!string\\b|number\\b|boolean\\b|null\\b|[A-Z])|['"]${escapeRegExp(key)}['"]\\s*:|[{\\,]\\s*${escapeRegExp(key)}\\s*[\\,}]|\\.${escapeRegExp(key)}\\s*=)`, 'g');
75
+ let match;
76
+ while ((match = re.exec(source)) !== null) {
77
+ const stamp = `${key}:${match.index}`;
78
+ if (seen.has(stamp))
79
+ continue;
80
+ seen.add(stamp);
81
+ facts.push({ file, line: lineAt(content, match.index), key });
82
+ break;
83
+ }
84
+ }
85
+ return facts;
86
+ }
87
+ /** ingest() assigned into a release / ξ / current / pattern store. */
88
+ export function extractArkOrderIngestWritesXiFromSource(file, content) {
89
+ const source = stripCommentsPreservingLines(content);
90
+ const facts = [];
91
+ const re = /(?:\b(?:xi|release|current|pattern|house)\w*|\.xi)\s*=\s*[^\n;]{0,160}?\bingest\s*\(/gi;
92
+ let match;
93
+ while ((match = re.exec(source)) !== null) {
94
+ facts.push({ file, line: lineAt(content, match.index) });
95
+ }
96
+ return facts;
97
+ }
98
+ /** Count primitive keys in `.release({ ... })` object literals (no nested ξ). */
99
+ export function extractArkOrderReleaseKeyCountsFromSource(file, content) {
100
+ const source = stripCommentsPreservingLines(content);
101
+ const facts = [];
102
+ const re = /\.release\s*\(\s*\{([^}]*)\}/g;
103
+ let match;
104
+ while ((match = re.exec(source)) !== null) {
105
+ const body = match[1] ?? '';
106
+ const keys = body.match(/\b[A-Za-z_][\w]*\s*:/g) ?? [];
107
+ if (keys.length === 0)
108
+ continue;
109
+ facts.push({ file, line: lineAt(content, match.index), keyCount: keys.length });
110
+ }
111
+ return facts;
112
+ }
@@ -8,7 +8,7 @@
8
8
  * Pure CLI helper (bin/lib/ark-order-sensors.mjs). Zero Node I/O.
9
9
  */
10
10
 
11
- import { extractArkOrderGenericUpdatesFromSource, extractArkOrderPlaneCallsFromSource, isArkOrderModuleSpecifier, } from './ark-order-facts.mjs';
11
+ import { extractArkOrderGenericUpdatesFromSource, extractArkOrderIngestWritesXiFromSource, extractArkOrderPlaneCallsFromSource, extractArkOrderReleaseKeyCountsFromSource, extractArkOrderXiFieldWritesFromSource, isArkOrderModuleSpecifier, } from './ark-order-facts.mjs';
12
12
  import { extraMergeTeethAllowed, } from './extra-merge-teeth.mjs';
13
13
  import { deterministicNextAction } from './remediation.mjs';
14
14
  export const ARKORDER_TIER1_SENSOR_IDS = [
@@ -17,6 +17,7 @@ export const ARKORDER_TIER1_SENSOR_IDS = [
17
17
  'arkorder-generic-update',
18
18
  'arkorder-too-many-params',
19
19
  'arkorder-ingest-writes-xi',
20
+ 'arkorder-xi-field-write',
20
21
  ];
21
22
  export const ARKORDER_RULE_IDS = {
22
23
  'arkorder-missing-plane': 'ARKORDER_MISSING_PLANE',
@@ -24,6 +25,7 @@ export const ARKORDER_RULE_IDS = {
24
25
  'arkorder-generic-update': 'ARKORDER_GENERIC_UPDATE',
25
26
  'arkorder-too-many-params': 'ARKORDER_TOO_MANY_PARAMS',
26
27
  'arkorder-ingest-writes-xi': 'ARKORDER_INGEST_WRITES_XI',
28
+ 'arkorder-xi-field-write': 'ARKORDER_XI_FIELD_WRITE',
27
29
  };
28
30
  function isDomainRoleLayer(layer, intentPrefixes = []) {
29
31
  const name = layer.trim();
@@ -96,6 +98,25 @@ export function evaluateArkOrderSensors(input) {
96
98
  for (const update of input.genericUpdates) {
97
99
  findings.push(finding(extra, 'arkorder-generic-update', update.file, update.line, `Generic ${update.method}() on the order plane rewrites ξ; Haken forbids it.`, { target: update.method }, teethAllowed));
98
100
  }
101
+ const xiKeys = extra.xiKeys ?? [];
102
+ if (xiKeys.length > extra.maxXiKeys) {
103
+ findings.push(finding(extra, 'arkorder-too-many-params', 'ark.config.json', 1, `arkOrder.xiKeys has ${xiKeys.length} keys; maxXiKeys is ${extra.maxXiKeys} (few slow modes).`, { target: String(xiKeys.length) }, teethAllowed));
104
+ }
105
+ for (const release of input.releaseKeyCounts ?? []) {
106
+ if (release.keyCount <= extra.maxXiKeys)
107
+ continue;
108
+ findings.push(finding(extra, 'arkorder-too-many-params', release.file, release.line, `release() freezes ${release.keyCount} keys; maxXiKeys is ${extra.maxXiKeys} (few slow modes).`, { target: String(release.keyCount) }, teethAllowed));
109
+ }
110
+ for (const ingest of input.ingestWritesXi ?? []) {
111
+ findings.push(finding(extra, 'arkorder-ingest-writes-xi', ingest.file, ingest.line, 'ingest() result is assigned into a Release or ξ store; ingest may absorb or escalate, never mint a pattern.', undefined, teethAllowed));
112
+ }
113
+ const managed = new Set(extra.managedLayers);
114
+ for (const write of xiKeys.length === 0 ? [] : input.xiFieldWrites ?? []) {
115
+ const fromLayer = input.layerForFile(write.file);
116
+ if (!fromLayer || !managed.has(fromLayer))
117
+ continue;
118
+ findings.push(finding(extra, 'arkorder-xi-field-write', write.file, write.line, `File writes slow key ${JSON.stringify(write.key)} through a persistence driver; route the field through ingest or a pattern change through proposeRelease.`, { fromLayer, target: write.key }, teethAllowed));
119
+ }
99
120
  findings.sort((left, right) => left.file.localeCompare(right.file) ||
100
121
  left.ruleId.localeCompare(right.ruleId) ||
101
122
  left.line - right.line);
@@ -106,13 +127,21 @@ export function evaluateArkOrderEditorSensors(input) {
106
127
  return [];
107
128
  const planeCalls = extractArkOrderPlaneCallsFromSource(input.file, input.source);
108
129
  const genericUpdates = extractArkOrderGenericUpdatesFromSource(input.file, input.source);
130
+ const xiKeys = input.arkOrder.xiKeys ?? [];
109
131
  return evaluateArkOrderSensors({
110
132
  arkOrder: input.arkOrder,
111
133
  layers: [],
112
134
  planeCalls,
113
135
  genericUpdates,
114
136
  planeRootHits: [],
137
+ xiFieldWrites: extractArkOrderXiFieldWritesFromSource(input.file, input.source, xiKeys),
138
+ ingestWritesXi: extractArkOrderIngestWritesXiFromSource(input.file, input.source),
139
+ releaseKeyCounts: extractArkOrderReleaseKeyCountsFromSource(input.file, input.source),
115
140
  dependencies: [],
116
141
  layerForFile: () => input.fromLayer,
117
- }).findings.filter((item) => item.sensor === 'arkorder-generic-update' || item.sensor === 'arkorder-kernel-in-domain');
142
+ }).findings.filter((item) => item.sensor === 'arkorder-generic-update' ||
143
+ item.sensor === 'arkorder-kernel-in-domain' ||
144
+ item.sensor === 'arkorder-xi-field-write' ||
145
+ item.sensor === 'arkorder-ingest-writes-xi' ||
146
+ item.sensor === 'arkorder-too-many-params');
118
147
  }
@@ -10,7 +10,11 @@ import { buildArkRuleFileHints } from './arkrules-sensors.mjs';
10
10
  const MAX_HINT_FILES = 400;
11
11
  const MAX_FILE_BYTES = 256 * 1024;
12
12
 
13
- const HINT_SENSORS = new Set(['orchestration-only', 'thin-adapter']);
13
+ const HINT_SENSORS = new Set([
14
+ 'orchestration-only',
15
+ 'thin-adapter',
16
+ 'writes-via-aggregate',
17
+ ]);
14
18
 
15
19
  /**
16
20
  * @param {{ structure?: Array<{ sensor?: string }> } | null | undefined} arkRules
@@ -26,7 +30,7 @@ export function needsArkRuleFileHints(arkRules) {
26
30
  * @param {{ files?: Array<{ path: string }> }} facts
27
31
  * @param {{ structure?: Array<{ sensor?: string }> } | null | undefined} arkRules
28
32
  * @param {Readonly<Record<string, string>>} [preloadedContents] optional reuse from coverage I/O
29
- * @returns {Record<string, { orchestrationHeavy?: boolean, adapterThick?: boolean }> | undefined}
33
+ * @returns {Record<string, { orchestrationHeavy?: boolean, adapterThick?: boolean, persistenceWrite?: boolean }> | undefined}
30
34
  */
31
35
  export function loadArkRuleFileHints(root, facts, arkRules, preloadedContents) {
32
36
  if (!needsArkRuleFileHints(arkRules)) return undefined;
@@ -17,6 +17,7 @@ export const ARK_RULE_SENSORS = [
17
17
  'domain-event-on-mutation',
18
18
  'orchestration-only',
19
19
  'thin-adapter',
20
+ 'writes-via-aggregate',
20
21
  'no-anemic-model',
21
22
  'invariant-coverage',
22
23
  ];
@@ -187,6 +187,19 @@ function evaluateThinAdapter(rule, input) {
187
187
  }
188
188
  return out;
189
189
  }
190
+ function evaluateWritesViaAggregate(rule, input) {
191
+ const out = [];
192
+ for (const file of input.files) {
193
+ if (!matchesAppliesTo(file, rule.appliesTo))
194
+ continue;
195
+ if (!isInRuleLayer(file, rule, input.layerForFile))
196
+ continue;
197
+ if (input.fileHints?.[file]?.persistenceWrite) {
198
+ out.push(baseViolation(rule, file, `File imports a persistence driver and issues a write; route the write through a Domain aggregate and a persistence adapter (sensor writes-via-aggregate).`));
199
+ }
200
+ }
201
+ return out;
202
+ }
190
203
  function evaluateNoAnemicModel(rule, shapes, layerForFile) {
191
204
  // Tier-2: always advisory.
192
205
  const out = [];
@@ -223,6 +236,9 @@ export function evaluateArkRuleSensors(input) {
223
236
  case 'thin-adapter':
224
237
  violations.push(...evaluateThinAdapter(rule, input));
225
238
  break;
239
+ case 'writes-via-aggregate':
240
+ violations.push(...evaluateWritesViaAggregate(rule, input));
241
+ break;
226
242
  case 'no-anemic-model':
227
243
  violations.push(...evaluateNoAnemicModel(rule, input.classShapes, input.layerForFile));
228
244
  break;
@@ -292,7 +308,9 @@ export function collectEmptyAppliesToFindings(arkRules, files) {
292
308
  a.message.localeCompare(b.message));
293
309
  }
294
310
  /** IO / ORM import evidence (mirrors design-smells; kept local for Domain purity). */
295
- const IO_IMPORT_HINT_RE = /\bfrom\s+['"](?:@?prisma\/client|@supabase\/|drizzle-orm|typeorm|knex|mongodb|pg|mysql2|better-sqlite3|ioredis|redis)['"]|require\(\s*['"](?:@?prisma\/client|pg|knex|typeorm)/;
311
+ const IO_IMPORT_HINT_RE = /\bfrom\s+['"](?:@?prisma\/client|@supabase\/|drizzle-orm|typeorm|knex|mongodb|pg|mysql2|mongoose|better-sqlite3|ioredis|redis|kysely|sequelize)['"]|require\(\s*['"](?:@?prisma\/client|pg|knex|typeorm|mongoose)/;
312
+ /** Write tokens that skip the aggregate when paired with a persistence driver import. */
313
+ const PERSISTENCE_WRITE_HINT_RE = /\.(?:insert(?:One|Many)?|update(?:One|Many)?|upsert|delete(?:One|Many)?|createMany|create|replaceOne|findOneAnd(?:Update|Delete|Replace))\s*\(|\bINSERT\s+INTO\b|\bUPDATE\s+[A-Za-z_][\w.]*\s+SET\b|\bDELETE\s+FROM\b/i;
296
314
  const HANDLER_SHAPE_HINT_RE = /\b(?:@Controller|@Get|@Post|@Put|@Delete|Router\(\)|createRouter|express\.Router|fastify\.(?:get|post)|export\s+(?:async\s+)?function\s+(?:GET|POST|PUT|DELETE|PATCH)\b|export\s+const\s+(?:GET|POST|PUT|DELETE|PATCH)\s*=)/;
297
315
  const FRAMEWORK_HTTP_HINT_RE = /(?:^|[;\n])\s*(?:import\s+(?:type\s+)?(?:[^;]{0,512}?\s+from\s+)?|export\s+(?:type\s+)?[^;]{0,512}?\s+from\s+)['"]next\/server(?:\.js)?['"]/;
298
316
  /** Business-predicate / domain branching signals (conservative). */
@@ -324,11 +342,13 @@ export function deriveArkRuleFileHints(_file, content) {
324
342
  (hasHandler && hasDomainSignal) ||
325
343
  (hasIo && hasMapping && (ifCount >= 4 || domainPredicates.length >= 1)) ||
326
344
  (hasHandler && hasIo); // hollow-persistence style: HTTP + persistence together
327
- if (!orchestrationHeavy && !adapterThick)
345
+ const persistenceWrite = hasIo && PERSISTENCE_WRITE_HINT_RE.test(content);
346
+ if (!orchestrationHeavy && !adapterThick && !persistenceWrite)
328
347
  return null;
329
348
  return {
330
349
  ...(orchestrationHeavy ? { orchestrationHeavy: true } : {}),
331
350
  ...(adapterThick ? { adapterThick: true } : {}),
351
+ ...(persistenceWrite ? { persistenceWrite: true } : {}),
332
352
  };
333
353
  }
334
354
  /**
@@ -41,6 +41,7 @@ export const ARK_ORDER_SCHEMA_DEF = {
41
41
  planeRoots: { ...stringArraySchema, default: [] },
42
42
  managedLayers: { ...stringArraySchema, default: [] },
43
43
  maxXiKeys: { type: 'integer', minimum: 1, default: 7 },
44
+ xiKeys: { ...stringArraySchema, default: [] },
44
45
  },
45
46
  };
46
47
  function isObject(value) {
@@ -83,6 +84,7 @@ export function defaultedArkOrder(value) {
83
84
  planeRoots: value.planeRoots === undefined ? [] : value.planeRoots,
84
85
  managedLayers: value.managedLayers === undefined ? [] : value.managedLayers,
85
86
  maxXiKeys: max,
87
+ xiKeys: value.xiKeys === undefined ? [] : value.xiKeys,
86
88
  };
87
89
  }
88
90
  export function validateArkRunExtra(config, issues) {
@@ -52,7 +52,7 @@ export const DIAGNOSTIC_CATALOG = Object.freeze([
52
52
  entry('IN_MEMORY_STORE_IN_PRODUCTION_SOURCE', 'safety', 'In-memory store in production source', 'Governed production source references an Ark InMemory* store without safety.allowInMemory — durable systems should not ship ephemeral stores by accident.', 'Provide a durable store implementation, or set safety.allowInMemory only for an explicitly ephemeral service.'),
53
53
  entry('PEER_ISOLATION_DISABLED', 'safety', 'peerIsolation disabled on a rule', 'A same-layer or peer rule disables peerIsolation (or omits it where required), which allows cross-slice coupling the contract otherwise blocks.', 'Restore peerIsolation: true, or set safety.allowDisabledPeerIsolation only with a documented production exception.'),
54
54
  // ── ArkRules ─────────────────────────────────────────────────────────────
55
- entry('ARKRULE_STRUCTURE', 'arkrules', 'ArkRule structure sensor failed', 'An opt-in ArkRules structure sensor (private state, factory shape, event publish, …) failed on a governed file for a declared arkruleId.', 'Restore the declared structure for the ArkRule (see arkruleSource), then preflight again. Do not demote the rule without a hash-bound policy acknowledgement.'),
55
+ entry('ARKRULE_STRUCTURE', 'arkrules', 'ArkRule structure sensor failed', 'An opt-in ArkRules structure sensor (private state, factory shape, event publish, persistence write outside an aggregate, …) failed on a governed file for a declared arkruleId.', 'Restore the declared structure for the ArkRule (see arkruleSource), then preflight again. Do not demote the rule without a hash-bound policy acknowledgement.'),
56
56
  entry('ARKRULE_INVARIANT', 'arkrules', 'ArkRule invariant failed', 'Reserved / remediation-recognized code for invariant-plane failures bound to an ArkRule id (coverage path also emits INVARIANT_UNCOVERED).', 'Fix the invariant for the ArkRule declared in arkrules/<Layer>.json, then preflight again. Do not demote without acknowledgement.'),
57
57
  entry('ARKRULE_SCOPE_EMPTY', 'arkrules', 'ArkRule appliesTo matched zero files', 'An ArkRule’s appliesTo globs matched no governed files — the rule cannot observe what it claims to protect.', 'Fix appliesTo globs so they match governed files, or remove the rule. Enforced empty scope fails; advisory empty scope warns.', { oftenAdvisory: true }),
58
58
  entry('INVARIANT_UNCOVERED', 'arkrules', 'Invariant without coverage evidence', 'An ArkRules invariant is under contract but no covering test title or declared symbol evidence was found (or coverage is partial). Kind is never-had-tests (adopt residual) vs tests-disappeared (suite exists).', 'Add a test title or declared symbol covering the arkruleId, then preflight again. Treat never-had-tests as adopt residual; treat tests-disappeared as a regression. Missing test globs report partial — never fake green.'),
@@ -69,6 +69,7 @@ export const DIAGNOSTIC_CATALOG = Object.freeze([
69
69
  entry('ARKORDER_GENERIC_UPDATE', 'arkorder', 'Generic update of ξ', 'A call to update/patch/set on the order plane rewrites the slow pattern. Haken slaving forbids generic ξ mutation.', 'Use release() to freeze ξ or proposeRelease() for a pattern change with blast radius, then preflight again. Never mechanical-safe.'),
70
70
  entry('ARKORDER_TOO_MANY_PARAMS', 'arkorder', 'Too many slow keys', 'ξ has more keys than arkOrder.maxXiKeys. Haken requires a few slow modes, not a dump of microstate.', 'Cut ξ to the slow keys that actually slave the rest, then preflight again. Never mechanical-safe.'),
71
71
  entry('ARKORDER_INGEST_WRITES_XI', 'arkorder', 'ingest assigned into ξ', 'An ingest() result is written into a Release or ξ store. ingest may absorb or escalate; it never mints a pattern.', 'Keep ingest results as absorb/escalate only. Change ξ with proposeRelease + release. Never mechanical-safe.'),
72
+ entry('ARKORDER_XI_FIELD_WRITE', 'arkorder', 'Slow key written around the order plane', 'A managed-layer file imports a persistence driver and writes a declared arkOrder.xiKeys name. Field events absorb or escalate; they do not PATCH the slow pattern.', 'Keep invoices, seats, hours, and logs on ingest. Change the slow key with proposeRelease + release, then preflight again. Never mechanical-safe.'),
72
73
  // ── atomic preflight / change set ────────────────────────────────────────
73
74
  entry('INVALID_CHANGE_PATH', 'preflight', 'Unsafe change path', 'A change set entry is not a safe, non-empty project-relative path (absolute, escape, empty, or NUL).', 'Use canonical project-relative paths only in the atomic change set, then preflight again.'),
74
75
  entry('DUPLICATE_CHANGE_PATH', 'preflight', 'Duplicate path in change set', 'The atomic change set lists more than one operation for the same path.', 'Collapse to one create/update/delete per path, then preflight again.'),
@@ -106,6 +106,7 @@ const ARKORDER_JUDGMENT_RULE_IDS = new Set([
106
106
  'ARKORDER_GENERIC_UPDATE',
107
107
  'ARKORDER_TOO_MANY_PARAMS',
108
108
  'ARKORDER_INGEST_WRITES_XI',
109
+ 'ARKORDER_XI_FIELD_WRITE',
109
110
  ]);
110
111
  function arkRunCallSiteName(violation) {
111
112
  return typeof violation.target === 'string' && violation.target.trim().length > 0
@@ -234,6 +235,10 @@ export function deterministicNextAction(violation) {
234
235
  return 'Cut ξ to the slow keys that actually slave the rest, then preflight again. Never mechanical-safe.';
235
236
  case 'ARKORDER_INGEST_WRITES_XI':
236
237
  return 'Keep ingest results as absorb/escalate only. Change ξ with proposeRelease + release. Never mechanical-safe.';
238
+ case 'ARKORDER_XI_FIELD_WRITE':
239
+ return typeof violation.target === 'string' && violation.target.length > 0
240
+ ? `Do not persist slow key ${violation.target} from a use-case. Absorb the field with ingest() or change the pattern with proposeRelease(), then preflight again.`
241
+ : 'Do not persist a declared slow key from a use-case. Absorb the field with ingest() or change the pattern with proposeRelease(), then preflight again. Never mechanical-safe.';
237
242
  default:
238
243
  if (typeof violation.ruleId === 'string' && violation.ruleId.startsWith('ARKRULE_')) {
239
244
  return `Fix the ArkRule ${typeof violation.arkruleId === 'string' ? violation.arkruleId : violation.ruleId}, then preflight again.`;
@@ -496,6 +501,7 @@ export function enrichViolationWithFixClass(violation) {
496
501
  case 'ARKORDER_GENERIC_UPDATE':
497
502
  case 'ARKORDER_TOO_MANY_PARAMS':
498
503
  case 'ARKORDER_INGEST_WRITES_XI':
504
+ case 'ARKORDER_XI_FIELD_WRITE':
499
505
  enriched.fixClass = 'arkorder-usage';
500
506
  enriched.effort = 'medium';
501
507
  enriched.enthusiastHint =
@@ -507,7 +513,9 @@ export function enrichViolationWithFixClass(violation) {
507
513
  ? 'Too many slow keys. Keep ξ small — the rest is derived noise.'
508
514
  : violation.ruleId === 'ARKORDER_INGEST_WRITES_XI'
509
515
  ? 'ingest can absorb or escalate. It never writes a new house.'
510
- : 'Call createOrderPlane from arkgate/order in a listed plane root so the app actually freezes a pattern.';
516
+ : violation.ruleId === 'ARKORDER_XI_FIELD_WRITE'
517
+ ? 'Name the slow keys in arkOrder.xiKeys. Invoices and seats still flow; changing the plan is a new release, not prisma.update.'
518
+ : 'Call createOrderPlane from arkgate/order in a listed plane root so the app actually freezes a pattern.';
511
519
  break;
512
520
  default:
513
521
  enriched.fixClass = 'review-contract';
@@ -42,7 +42,10 @@ import {
42
42
  } from './ark-run-facts.mjs';
43
43
  import {
44
44
  extractArkOrderGenericUpdatesFromSource,
45
+ extractArkOrderIngestWritesXiFromSource,
45
46
  extractArkOrderPlaneCallsFromSource,
47
+ extractArkOrderReleaseKeyCountsFromSource,
48
+ extractArkOrderXiFieldWritesFromSource,
46
49
  } from './ark-order-facts.mjs';
47
50
  import {
48
51
  collectGovernedFiles,
@@ -1015,6 +1018,10 @@ export function resolveCandidateFacts({
1015
1018
  const arkOrderPlaneCalls = [];
1016
1019
  const arkOrderGenericUpdates = [];
1017
1020
  const arkOrderRootHits = [];
1021
+ const arkOrderXiFieldWrites = [];
1022
+ const arkOrderIngestWritesXi = [];
1023
+ const arkOrderReleaseKeyCounts = [];
1024
+ const xiKeys = [...(config.arkOrder?.xiKeys ?? [])];
1018
1025
  const compositionRootPatterns = [...(config.arkRun?.compositionRoots ?? [])];
1019
1026
  const planeRootPatterns = [...(config.arkOrder?.planeRoots ?? [])];
1020
1027
 
@@ -1134,6 +1141,27 @@ export function resolveCandidateFacts({
1134
1141
  } catch {
1135
1142
  // Never fail the resolver for ArkOrder generic-update extraction.
1136
1143
  }
1144
+ try {
1145
+ arkOrderXiFieldWrites.push(
1146
+ ...extractArkOrderXiFieldWritesFromSource(candidate.path, candidate.content, xiKeys)
1147
+ );
1148
+ } catch {
1149
+ // Never fail the resolver for ArkOrder xi-field-write extraction.
1150
+ }
1151
+ try {
1152
+ arkOrderIngestWritesXi.push(
1153
+ ...extractArkOrderIngestWritesXiFromSource(candidate.path, candidate.content)
1154
+ );
1155
+ } catch {
1156
+ // Never fail the resolver for ArkOrder ingest-writes-ξ extraction.
1157
+ }
1158
+ try {
1159
+ arkOrderReleaseKeyCounts.push(
1160
+ ...extractArkOrderReleaseKeyCountsFromSource(candidate.path, candidate.content)
1161
+ );
1162
+ } catch {
1163
+ // Never fail the resolver for ArkOrder release key-count extraction.
1164
+ }
1137
1165
  }
1138
1166
  }
1139
1167
 
@@ -1277,5 +1305,8 @@ export function resolveCandidateFacts({
1277
1305
  arkOrderPlaneCalls,
1278
1306
  arkOrderGenericUpdates,
1279
1307
  arkOrderRootHits,
1308
+ arkOrderXiFieldWrites,
1309
+ arkOrderIngestWritesXi,
1310
+ arkOrderReleaseKeyCounts,
1280
1311
  });
1281
1312
  }
@@ -76,6 +76,11 @@ type ArkConfigArkOrder = {
76
76
  planeRoots: string[];
77
77
  managedLayers: string[];
78
78
  maxXiKeys: number;
79
+ /**
80
+ * Slow product keys the team can already name (plan, cost code, protocol).
81
+ * Optional. Empty → `ARKORDER_XI_FIELD_WRITE` stays silent.
82
+ */
83
+ xiKeys: string[];
79
84
  };
80
85
  type ArkConfig = {
81
86
  $schema: string;
@@ -1,5 +1,5 @@
1
- import { e as CreateArchitectureProfileOptions, b as ArchitectureProfile, d as ArkCheckConfig, C as CreateArchitectureProfileFromArkConfigOptions, f as CreateElevenLayerArkConfigOptions, i as Policy, j as IntentCreator, I as IntentName } from './types-DCSlrRnV.js';
2
- import { A as ArkConfig, c as ArkConfigLoadResult } from './configTypes-BdCe_gvv.js';
1
+ import { e as CreateArchitectureProfileOptions, b as ArchitectureProfile, d as ArkCheckConfig, C as CreateArchitectureProfileFromArkConfigOptions, f as CreateElevenLayerArkConfigOptions, i as Policy, j as IntentCreator, I as IntentName } from './types-dK24fDZa.js';
2
+ import { A as ArkConfig, c as ArkConfigLoadResult } from './configTypes-dNJ2C0yx.js';
3
3
 
4
4
  /** Versioned public result contract shared by every ArkGate enforcement adapter. */
5
5
  /**
@@ -409,7 +409,7 @@ declare const ARK_ANALYSIS_RESULT_SCHEMA: {
409
409
  };
410
410
 
411
411
  /** ArkGate library version — single source of truth. */
412
- declare const version = "4.8.2";
412
+ declare const version = "4.8.3";
413
413
 
414
414
  /**
415
415
  * AI Code Gate (basic).
@@ -573,6 +573,20 @@ type ResolvedArkOrderRootHitFact = {
573
573
  matchedRoot: string;
574
574
  hasPlaneFactory: boolean;
575
575
  };
576
+ type ResolvedArkOrderXiFieldWriteFact = {
577
+ file: string;
578
+ line: number;
579
+ key: string;
580
+ };
581
+ type ResolvedArkOrderIngestWriteFact = {
582
+ file: string;
583
+ line: number;
584
+ };
585
+ type ResolvedArkOrderReleaseKeyCountFact = {
586
+ file: string;
587
+ line: number;
588
+ keyCount: number;
589
+ };
576
590
 
577
591
  /**
578
592
  * Versioned type vocabulary for resolved candidate facts (schema 1.0).
@@ -724,8 +738,11 @@ type ResolvedCandidateFactsInput = {
724
738
  arkOrderPlaneCalls?: readonly ResolvedArkOrderPlaneCallFact[];
725
739
  arkOrderGenericUpdates?: readonly ResolvedArkOrderGenericUpdateFact[];
726
740
  arkOrderRootHits?: readonly ResolvedArkOrderRootHitFact[];
741
+ arkOrderXiFieldWrites?: readonly ResolvedArkOrderXiFieldWriteFact[];
742
+ arkOrderIngestWritesXi?: readonly ResolvedArkOrderIngestWriteFact[];
743
+ arkOrderReleaseKeyCounts?: readonly ResolvedArkOrderReleaseKeyCountFact[];
727
744
  };
728
- type ResolvedCandidateFacts = Omit<ResolvedCandidateFactsInput, 'candidateTreeHash' | 'classShapes' | 'arkRunKernelCalls' | 'arkOrderPlaneCalls' | 'arkOrderGenericUpdates' | 'arkOrderRootHits' | 'arkRunManagedNews' | 'arkRunCompositionRootHits' | 'arkRunDeclarations'> & {
745
+ type ResolvedCandidateFacts = Omit<ResolvedCandidateFactsInput, 'candidateTreeHash' | 'classShapes' | 'arkRunKernelCalls' | 'arkOrderPlaneCalls' | 'arkOrderGenericUpdates' | 'arkOrderXiFieldWrites' | 'arkOrderIngestWritesXi' | 'arkOrderReleaseKeyCounts' | 'arkOrderRootHits' | 'arkRunManagedNews' | 'arkRunCompositionRootHits' | 'arkRunDeclarations'> & {
729
746
  schemaVersion: typeof RESOLVED_CANDIDATE_FACTS_SCHEMA_VERSION;
730
747
  completenessReasons: ResolvedFactsReason[];
731
748
  candidateTreeHash: string;
@@ -744,6 +761,9 @@ type ResolvedCandidateFacts = Omit<ResolvedCandidateFactsInput, 'candidateTreeHa
744
761
  arkOrderPlaneCalls: ResolvedArkOrderPlaneCallFact[];
745
762
  arkOrderGenericUpdates: ResolvedArkOrderGenericUpdateFact[];
746
763
  arkOrderRootHits: ResolvedArkOrderRootHitFact[];
764
+ arkOrderXiFieldWrites: ResolvedArkOrderXiFieldWriteFact[];
765
+ arkOrderIngestWritesXi: ResolvedArkOrderIngestWriteFact[];
766
+ arkOrderReleaseKeyCounts: ResolvedArkOrderReleaseKeyCountFact[];
747
767
  factsHash: string;
748
768
  };
749
769
 
@@ -1388,6 +1408,71 @@ declare const RESOLVED_CANDIDATE_FACTS_SCHEMA: {
1388
1408
  };
1389
1409
  };
1390
1410
  };
1411
+ readonly arkOrderXiFieldWrites: {
1412
+ readonly type: "array";
1413
+ readonly items: {
1414
+ readonly type: "object";
1415
+ readonly additionalProperties: false;
1416
+ readonly required: readonly ["file", "line", "key"];
1417
+ readonly properties: {
1418
+ readonly file: {
1419
+ readonly type: "string";
1420
+ readonly minLength: 1;
1421
+ readonly pattern: "^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$";
1422
+ };
1423
+ readonly line: {
1424
+ readonly type: "integer";
1425
+ readonly minimum: 1;
1426
+ };
1427
+ readonly key: {
1428
+ readonly type: "string";
1429
+ readonly minLength: 1;
1430
+ };
1431
+ };
1432
+ };
1433
+ };
1434
+ readonly arkOrderIngestWritesXi: {
1435
+ readonly type: "array";
1436
+ readonly items: {
1437
+ readonly type: "object";
1438
+ readonly additionalProperties: false;
1439
+ readonly required: readonly ["file", "line"];
1440
+ readonly properties: {
1441
+ readonly file: {
1442
+ readonly type: "string";
1443
+ readonly minLength: 1;
1444
+ readonly pattern: "^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$";
1445
+ };
1446
+ readonly line: {
1447
+ readonly type: "integer";
1448
+ readonly minimum: 1;
1449
+ };
1450
+ };
1451
+ };
1452
+ };
1453
+ readonly arkOrderReleaseKeyCounts: {
1454
+ readonly type: "array";
1455
+ readonly items: {
1456
+ readonly type: "object";
1457
+ readonly additionalProperties: false;
1458
+ readonly required: readonly ["file", "line", "keyCount"];
1459
+ readonly properties: {
1460
+ readonly file: {
1461
+ readonly type: "string";
1462
+ readonly minLength: 1;
1463
+ readonly pattern: "^(?!/)(?![A-Za-z]:/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$";
1464
+ };
1465
+ readonly line: {
1466
+ readonly type: "integer";
1467
+ readonly minimum: 1;
1468
+ };
1469
+ readonly keyCount: {
1470
+ readonly type: "integer";
1471
+ readonly minimum: 1;
1472
+ };
1473
+ };
1474
+ };
1475
+ };
1391
1476
  readonly factsHash: {
1392
1477
  readonly type: "string";
1393
1478
  readonly minLength: 1;
@@ -1598,7 +1683,7 @@ declare function collectForbiddenCapabilityUses(ts: any, sourceFile: any, forbid
1598
1683
  * ./arkRulesContract.ts so generate:cli-pure can emit a self-contained artifact.
1599
1684
  */
1600
1685
  /** Closed sensor vocabulary (ADR 0013). Unknown sensors fail closed at load time. */
1601
- declare const ARK_RULE_SENSOR_IDS: readonly ["aggregate-private-state", "always-valid-factory", "domain-event-on-mutation", "orchestration-only", "thin-adapter", "no-anemic-model", "invariant-coverage"];
1686
+ declare const ARK_RULE_SENSOR_IDS: readonly ["aggregate-private-state", "always-valid-factory", "domain-event-on-mutation", "orchestration-only", "thin-adapter", "writes-via-aggregate", "no-anemic-model", "invariant-coverage"];
1602
1687
  type ArkRuleSensorId = (typeof ARK_RULE_SENSOR_IDS)[number];
1603
1688
  type ArkRuleMode = 'advisory' | 'enforced';
1604
1689
  type ArkRuleStructureEntry = {
@@ -1762,6 +1847,7 @@ type EvaluateArkRuleSensorsInput = {
1762
1847
  fileHints?: Readonly<Record<string, {
1763
1848
  orchestrationHeavy?: boolean;
1764
1849
  adapterThick?: boolean;
1850
+ persistenceWrite?: boolean;
1765
1851
  }>>;
1766
1852
  };
1767
1853
  /**
@@ -1782,6 +1868,7 @@ declare function collectEmptyAppliesToFindings(arkRules: EffectiveArkRules, file
1782
1868
  declare function deriveArkRuleFileHints(_file: string, content: string): {
1783
1869
  orchestrationHeavy?: boolean;
1784
1870
  adapterThick?: boolean;
1871
+ persistenceWrite?: boolean;
1785
1872
  } | null;
1786
1873
  /**
1787
1874
  * Build fileHints map from path→content. Omits paths with no flags (sparse map).
@@ -1789,6 +1876,7 @@ declare function deriveArkRuleFileHints(_file: string, content: string): {
1789
1876
  declare function buildArkRuleFileHints(fileContents: Readonly<Record<string, string>>): Record<string, {
1790
1877
  orchestrationHeavy?: boolean;
1791
1878
  adapterThick?: boolean;
1879
+ persistenceWrite?: boolean;
1792
1880
  }>;
1793
1881
  /**
1794
1882
  * Lightweight class-shape extraction from TypeScript source text (no compiler).
@@ -1888,11 +1976,13 @@ type AnalyzeResolvedProjectInput = {
1888
1976
  /**
1889
1977
  * AR07 — Tooling-supplied orchestration/thin-adapter heuristics per file.
1890
1978
  * Prefer deriveArkRuleFileHints / buildArkRuleFileHints (Domain pure).
1891
- * When omitted, orchestration-only and thin-adapter sensors stay silent.
1979
+ * When omitted, orchestration-only, thin-adapter, and writes-via-aggregate
1980
+ * sensors stay silent.
1892
1981
  */
1893
1982
  fileHints?: Readonly<Record<string, {
1894
1983
  orchestrationHeavy?: boolean;
1895
1984
  adapterThick?: boolean;
1985
+ persistenceWrite?: boolean;
1896
1986
  }>>;
1897
1987
  };
1898
1988
  type PreflightResolvedChangeInput = {
@@ -2310,4 +2400,4 @@ declare function catalogFixForRuleId(ruleId: string | null | undefined): string
2310
2400
  */
2311
2401
  declare function catalogWhyForRuleId(ruleId: string | null | undefined): string | undefined;
2312
2402
 
2313
- export { type ArchitectureConvergenceClassification as $, type ArkRulesFile as A, type AnalysisCapabilityUse as B, type AnalysisCompilerOptions as C, type AnalysisCompleteness as D, type EffectiveArkRules as E, type AnalysisContract as F, type AnalysisEvidence as G, type AnalysisFile as H, type AnalysisFileChange as I, type AnalysisFileInput as J, type AnalysisImportEdge as K, type AnalysisIr as L, type AnalysisMode as M, type AnalysisResult as N, type AnalysisViolation as O, type AnalyzeArchitectureConvergenceInput as P, type AnalyzeChangeInput as Q, type ResolvedArkRunKernelCallKind as R, type AnalyzePolicyDeltaInput as S, type AnalyzeProjectInput as T, type AnalyzeResolvedProjectInput as U, type ArchitectureActualChange as V, type ArchitectureChangeMap as W, type ArchitectureChangeMapContract as X, type ArchitectureChangeMapDependency as Y, type ArchitectureChangeMapFile as Z, type ArchitectureChangeOperation as _, type ResolvedArkRunDeclarationFact as a, adapterFindingOccurrenceTargetKeys as a$, type ArchitectureConvergenceFinding as a0, type ArchitectureConvergenceResult as a1, type ArchitectureDependency as a2, type ArchitectureEngineEdge as a3, type ArchitectureEngineResult as a4, type ArchitectureEngineViolation as a5, type ArkDesignDeltaResult as a6, type ArkEnforcementHost as a7, type ArkEnforcementState as a8, type ArkRuleSensorViolation as a9, type PolicyDeltaClassification as aA, type PolicyDeltaFinding as aB, type PreflightResolvedChangeInput as aC, type PreparedChangeFile as aD, RESOLVED_CANDIDATE_FACTS_SCHEMA as aE, RESOLVED_CANDIDATE_FACTS_SCHEMA_VERSION as aF, type ResolvedAmbientFact as aG, type ResolvedAnalysisFile as aH, type ResolvedAnalysisIr as aI, type ResolvedAnalysisResult as aJ, type ResolvedCandidateFacts as aK, type ResolvedCandidateFactsInput as aL, type ResolvedCapability as aM, type ResolvedCapabilityFact as aN, type ResolvedChangePreflightResult as aO, type ResolvedDependencyKind as aP, type ResolvedDependencyState as aQ, type ResolvedFactsCompleteness as aR, type ResolvedFileFact as aS, type ResolvedIntentReferenceFact as aT, type ResolvedPublishFact as aU, type ResolvedSafetyFact as aV, type ResolvedSafetyKind as aW, type ResolvedSafetyReport as aX, type SemanticDependency as aY, type SemanticDependencyKind as aZ, adapterDocsCodePath as a_, type ChangePreflightResult as aa, type ClassShapeFact as ab, type CollectAnalysisConfigWarningsInput as ac, DIAGNOSTIC_CATALOG as ad, DIAGNOSTIC_CATALOG_SCHEMA_VERSION as ae, DIAGNOSTIC_DOCS_RELATIVE_PATH as af, DIAGNOSTIC_RULE_IDS as ag, type DesignDeltaChange as ah, type DesignDeltaEnforcementScope as ai, type DesignDeltaIdentity as aj, type DesignSmellEvidence as ak, type DesignSmellFinding as al, type DesignSmellId as am, type DiagnosticCatalogEntry as an, type DiagnosticCategory as ao, type EnforcementBoundaryState as ap, type EnforcementEvidence as aq, type EnforcementEvidenceField as ar, type EnforcementVerification as as, type EvaluateArchitectureGraphInput as at, type ForbiddenCapabilityUse as au, type InvariantCoverageEvidence as av, POLICY_DELTA_SCHEMA_VERSION as aw, type PolicyDelta as ax, type PolicyDeltaAcknowledgement as ay, type PolicyDeltaAnalysis as az, type ResolvedArkRunKernelCallFact as b, adapterFindingRefFromTargetKey as b0, adapterFindingTargetKey as b1, analyzeArchitectureConvergence as b2, analyzeChange as b3, analyzePolicyDelta as b4, analyzeProject as b5, analyzeResolvedProject as b6, buildArkRuleFileHints as b7, canPromoteInvariant as b8, catalogFixForRuleId as b9, loadContract as bA, loadResolvedCandidateFacts as bB, policyDeltaAcknowledgementMatches as bC, preflightChange as bD, preflightResolvedChange as bE, resolvedFactsEvidenceRequirementsHash as bF, serializeDiagnosticCatalog as bG, stableSerialize as bH, toAdapterDiagnostic as bI, version as bJ, catalogWhyForRuleId as ba, classifyArkPolicyDelta as bb, collectAnalysisConfigWarnings as bc, collectEmptyAppliesToFindings as bd, collectForbiddenCapabilityUses as be, createAICodeGate as bf, createAdapterResult as bg, createArchitectureProfile as bh, createArchitectureProfileFromArkConfig as bi, createElevenLayerArkConfig as bj, createResolvedCandidateFacts as bk, deriveArkRuleFileHints as bl, detectArchitectureCycles as bm, deterministicHash as bn, diagnosticDocsFragment as bo, diagnosticDocsPath as bp, elevenLayerProfile as bq, evaluateArchitectureGraph as br, evaluateArkRuleSensors as bs, evaluateInvariantCoverage as bt, explainViolation as bu, extractClassShapesFromSource as bv, extractSemanticDependencies as bw, getDiagnosticCatalogEntry as bx, isCataloguedOrArkRuleFamily as by, isKnownDiagnosticCode as bz, type ResolvedArkRunManagedNewFact as c, type ResolvedDependencyFact as d, type ResolvedArkRunCompositionRootHitFact as e, type ResolvedFactsReason as f, type ResolvedArkOrderPlaneCallFact as g, type ResolvedArkOrderGenericUpdateFact as h, type ResolvedArkOrderRootHitFact as i, ADAPTER_DIAGNOSTIC_DOCS_RELATIVE_PATH as j, type AICodeGate as k, type AICodeGateContext as l, type AICodeGateOptions as m, type AICodeGateResult as n, type AICodeGateViolation as o, type AIGateExtension as p, ANALYSIS_IR_SCHEMA_VERSION as q, ARK_ANALYSIS_RESULT_SCHEMA as r, ARK_ANALYSIS_RESULT_SCHEMA_VERSION as s, ARK_DESIGN_DELTA_SCHEMA_VERSION as t, ARK_ENFORCEMENT_STATE_SCHEMA_VERSION as u, type AdapterCompletenessReason as v, type AdapterDiagnostic as w, type AdapterResult as x, type AdapterSeverity as y, type AdapterViolationInput as z };
2403
+ export { type ArchitectureChangeMapFile as $, type ArkRulesFile as A, type AdapterSeverity as B, type AdapterViolationInput as C, type AnalysisCapabilityUse as D, type EffectiveArkRules as E, type AnalysisCompilerOptions as F, type AnalysisCompleteness as G, type AnalysisContract as H, type AnalysisEvidence as I, type AnalysisFile as J, type AnalysisFileChange as K, type AnalysisFileInput as L, type AnalysisImportEdge as M, type AnalysisIr as N, type AnalysisMode as O, type AnalysisResult as P, type AnalysisViolation as Q, type ResolvedArkRunKernelCallKind as R, type AnalyzeArchitectureConvergenceInput as S, type AnalyzeChangeInput as T, type AnalyzePolicyDeltaInput as U, type AnalyzeProjectInput as V, type AnalyzeResolvedProjectInput as W, type ArchitectureActualChange as X, type ArchitectureChangeMap as Y, type ArchitectureChangeMapContract as Z, type ArchitectureChangeMapDependency as _, type ResolvedArkRunDeclarationFact as a, type SemanticDependencyKind as a$, type ArchitectureChangeOperation as a0, type ArchitectureConvergenceClassification as a1, type ArchitectureConvergenceFinding as a2, type ArchitectureConvergenceResult as a3, type ArchitectureDependency as a4, type ArchitectureEngineEdge as a5, type ArchitectureEngineResult as a6, type ArchitectureEngineViolation as a7, type ArkDesignDeltaResult as a8, type ArkEnforcementHost as a9, type PolicyDeltaAcknowledgement as aA, type PolicyDeltaAnalysis as aB, type PolicyDeltaClassification as aC, type PolicyDeltaFinding as aD, type PreflightResolvedChangeInput as aE, type PreparedChangeFile as aF, RESOLVED_CANDIDATE_FACTS_SCHEMA as aG, RESOLVED_CANDIDATE_FACTS_SCHEMA_VERSION as aH, type ResolvedAmbientFact as aI, type ResolvedAnalysisFile as aJ, type ResolvedAnalysisIr as aK, type ResolvedAnalysisResult as aL, type ResolvedCandidateFacts as aM, type ResolvedCandidateFactsInput as aN, type ResolvedCapability as aO, type ResolvedCapabilityFact as aP, type ResolvedChangePreflightResult as aQ, type ResolvedDependencyKind as aR, type ResolvedDependencyState as aS, type ResolvedFactsCompleteness as aT, type ResolvedFileFact as aU, type ResolvedIntentReferenceFact as aV, type ResolvedPublishFact as aW, type ResolvedSafetyFact as aX, type ResolvedSafetyKind as aY, type ResolvedSafetyReport as aZ, type SemanticDependency as a_, type ArkEnforcementState as aa, type ArkRuleSensorViolation as ab, type ChangePreflightResult as ac, type ClassShapeFact as ad, type CollectAnalysisConfigWarningsInput as ae, DIAGNOSTIC_CATALOG as af, DIAGNOSTIC_CATALOG_SCHEMA_VERSION as ag, DIAGNOSTIC_DOCS_RELATIVE_PATH as ah, DIAGNOSTIC_RULE_IDS as ai, type DesignDeltaChange as aj, type DesignDeltaEnforcementScope as ak, type DesignDeltaIdentity as al, type DesignSmellEvidence as am, type DesignSmellFinding as an, type DesignSmellId as ao, type DiagnosticCatalogEntry as ap, type DiagnosticCategory as aq, type EnforcementBoundaryState as ar, type EnforcementEvidence as as, type EnforcementEvidenceField as at, type EnforcementVerification as au, type EvaluateArchitectureGraphInput as av, type ForbiddenCapabilityUse as aw, type InvariantCoverageEvidence as ax, POLICY_DELTA_SCHEMA_VERSION as ay, type PolicyDelta as az, type ResolvedArkRunKernelCallFact as b, adapterDocsCodePath as b0, adapterFindingOccurrenceTargetKeys as b1, adapterFindingRefFromTargetKey as b2, adapterFindingTargetKey as b3, analyzeArchitectureConvergence as b4, analyzeChange as b5, analyzePolicyDelta as b6, analyzeProject as b7, analyzeResolvedProject as b8, buildArkRuleFileHints as b9, isCataloguedOrArkRuleFamily as bA, isKnownDiagnosticCode as bB, loadContract as bC, loadResolvedCandidateFacts as bD, policyDeltaAcknowledgementMatches as bE, preflightChange as bF, preflightResolvedChange as bG, resolvedFactsEvidenceRequirementsHash as bH, serializeDiagnosticCatalog as bI, stableSerialize as bJ, toAdapterDiagnostic as bK, version as bL, canPromoteInvariant as ba, catalogFixForRuleId as bb, catalogWhyForRuleId as bc, classifyArkPolicyDelta as bd, collectAnalysisConfigWarnings as be, collectEmptyAppliesToFindings as bf, collectForbiddenCapabilityUses as bg, createAICodeGate as bh, createAdapterResult as bi, createArchitectureProfile as bj, createArchitectureProfileFromArkConfig as bk, createElevenLayerArkConfig as bl, createResolvedCandidateFacts as bm, deriveArkRuleFileHints as bn, detectArchitectureCycles as bo, deterministicHash as bp, diagnosticDocsFragment as bq, diagnosticDocsPath as br, elevenLayerProfile as bs, evaluateArchitectureGraph as bt, evaluateArkRuleSensors as bu, evaluateInvariantCoverage as bv, explainViolation as bw, extractClassShapesFromSource as bx, extractSemanticDependencies as by, getDiagnosticCatalogEntry as bz, type ResolvedArkRunManagedNewFact as c, type ResolvedDependencyFact as d, type ResolvedArkRunCompositionRootHitFact as e, type ResolvedFactsReason as f, type ResolvedArkOrderPlaneCallFact as g, type ResolvedArkOrderGenericUpdateFact as h, type ResolvedArkOrderRootHitFact as i, type ResolvedArkOrderXiFieldWriteFact as j, type ResolvedArkOrderIngestWriteFact as k, ADAPTER_DIAGNOSTIC_DOCS_RELATIVE_PATH as l, type AICodeGate as m, type AICodeGateContext as n, type AICodeGateOptions as o, type AICodeGateResult as p, type AICodeGateViolation as q, type AIGateExtension as r, ANALYSIS_IR_SCHEMA_VERSION as s, ARK_ANALYSIS_RESULT_SCHEMA as t, ARK_ANALYSIS_RESULT_SCHEMA_VERSION as u, ARK_DESIGN_DELTA_SCHEMA_VERSION as v, ARK_ENFORCEMENT_STATE_SCHEMA_VERSION as w, type AdapterCompletenessReason as x, type AdapterDiagnostic as y, type AdapterResult as z };