@ai-sdlc/orchestrator 0.10.0 → 0.13.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.
- package/dist/adapters.d.ts +42 -3
- package/dist/adapters.js +133 -3
- package/dist/admission-composite.d.ts +112 -1
- package/dist/admission-composite.js +85 -4
- package/dist/admission-enrichment.d.ts +12 -3
- package/dist/admission-enrichment.js +64 -13
- package/dist/admission-score.d.ts +30 -0
- package/dist/admission-score.js +4 -1
- package/dist/backlog-adapter.d.ts +45 -0
- package/dist/backlog-adapter.js +145 -1
- package/dist/calibration.d.ts +81 -0
- package/dist/calibration.js +76 -0
- package/dist/cli/commands/init-features.d.ts +301 -2
- package/dist/cli/commands/init-features.js +634 -7
- package/dist/cli/commands/init-templates.d.ts +198 -1
- package/dist/cli/commands/init-templates.js +943 -1
- package/dist/cli/commands/init.d.ts +45 -0
- package/dist/cli/commands/init.js +147 -5
- package/dist/cli/commands/run.js +9 -1
- package/dist/cli/index.d.ts +11 -0
- package/dist/cli/index.js +42 -8
- package/dist/compliance/composer.d.ts +79 -0
- package/dist/compliance/composer.js +258 -0
- package/dist/compliance/errors.d.ts +64 -0
- package/dist/compliance/errors.js +85 -0
- package/dist/compliance/loader.d.ts +52 -0
- package/dist/compliance/loader.js +124 -0
- package/dist/compliance/types.d.ts +184 -0
- package/dist/compliance/types.js +41 -0
- package/dist/compliance-clearance.d.ts +269 -0
- package/dist/compliance-clearance.js +269 -0
- package/dist/config.js +17 -0
- package/dist/cost-tracker.d.ts +22 -0
- package/dist/cost-tracker.js +41 -0
- package/dist/database/adapters/external.js +5 -1
- package/dist/embedding/adapters/openai-text-embedding-3-small.d.ts +71 -0
- package/dist/embedding/adapters/openai-text-embedding-3-small.js +190 -0
- package/dist/embedding/consumers/tessellation-drift.d.ts +74 -0
- package/dist/embedding/consumers/tessellation-drift.js +76 -0
- package/dist/embedding/cross-provider.d.ts +78 -0
- package/dist/embedding/cross-provider.js +75 -0
- package/dist/embedding/deprecation.d.ts +151 -0
- package/dist/embedding/deprecation.js +229 -0
- package/dist/embedding/errors.d.ts +90 -0
- package/dist/embedding/errors.js +150 -0
- package/dist/embedding/index.d.ts +29 -0
- package/dist/embedding/index.js +24 -0
- package/dist/embedding/pipeline-load.d.ts +146 -0
- package/dist/embedding/pipeline-load.js +178 -0
- package/dist/embedding/registry.d.ts +45 -0
- package/dist/embedding/registry.js +61 -0
- package/dist/embedding/stale-vector.d.ts +110 -0
- package/dist/embedding/stale-vector.js +92 -0
- package/dist/embedding/storage/index.d.ts +51 -0
- package/dist/embedding/storage/index.js +43 -0
- package/dist/embedding/storage/jsonl-backend.d.ts +150 -0
- package/dist/embedding/storage/jsonl-backend.js +332 -0
- package/dist/embedding/storage/types.d.ts +135 -0
- package/dist/embedding/storage/types.js +13 -0
- package/dist/embedding/types.d.ts +180 -0
- package/dist/embedding/types.js +10 -0
- package/dist/execute.d.ts +29 -2
- package/dist/execute.js +171 -30
- package/dist/index.d.ts +14 -2
- package/dist/index.js +19 -2
- package/dist/journey/inheritance-validator.d.ts +396 -0
- package/dist/journey/inheritance-validator.js +370 -0
- package/dist/journey/state-id-drift-rule.d.ts +137 -0
- package/dist/journey/state-id-drift-rule.js +245 -0
- package/dist/journey-sa2-router.d.ts +395 -0
- package/dist/journey-sa2-router.js +308 -0
- package/dist/runners/review-agent.js +6 -2
- package/dist/runners/runner-registry.d.ts +36 -0
- package/dist/runners/runner-registry.js +90 -0
- package/dist/runtime/attestations.d.ts +173 -13
- package/dist/runtime/attestations.js +252 -40
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/sa-scoring/layer3-llm.js +6 -1
- package/dist/sa-scoring/revision-proposal-config.d.ts +178 -0
- package/dist/sa-scoring/revision-proposal-config.js +198 -0
- package/dist/sa-scoring/revision-proposal.d.ts +285 -0
- package/dist/sa-scoring/revision-proposal.js +417 -0
- package/dist/signal-ingestion/adapters/community-thread.d.ts +43 -0
- package/dist/signal-ingestion/adapters/community-thread.js +55 -0
- package/dist/signal-ingestion/adapters/in-app-feedback.d.ts +67 -0
- package/dist/signal-ingestion/adapters/in-app-feedback.js +51 -0
- package/dist/signal-ingestion/adapters/manual.d.ts +78 -0
- package/dist/signal-ingestion/adapters/manual.js +112 -0
- package/dist/signal-ingestion/adapters/support-ticket.d.ts +47 -0
- package/dist/signal-ingestion/adapters/support-ticket.js +51 -0
- package/dist/signal-ingestion/classifier.d.ts +205 -0
- package/dist/signal-ingestion/classifier.js +494 -0
- package/dist/signal-ingestion/clustering-types.d.ts +36 -0
- package/dist/signal-ingestion/clustering-types.js +14 -0
- package/dist/signal-ingestion/clustering.d.ts +200 -0
- package/dist/signal-ingestion/clustering.js +413 -0
- package/dist/signal-ingestion/config.d.ts +351 -0
- package/dist/signal-ingestion/config.js +587 -0
- package/dist/signal-ingestion/d1.d.ts +252 -0
- package/dist/signal-ingestion/d1.js +235 -0
- package/dist/signal-ingestion/errors.d.ts +73 -0
- package/dist/signal-ingestion/errors.js +108 -0
- package/dist/signal-ingestion/governance-events.d.ts +181 -0
- package/dist/signal-ingestion/governance-events.js +189 -0
- package/dist/signal-ingestion/index.d.ts +35 -0
- package/dist/signal-ingestion/index.js +53 -0
- package/dist/signal-ingestion/manual-share-metric.d.ts +93 -0
- package/dist/signal-ingestion/manual-share-metric.js +106 -0
- package/dist/signal-ingestion/registry.d.ts +40 -0
- package/dist/signal-ingestion/registry.js +137 -0
- package/dist/signal-ingestion/residency.d.ts +227 -0
- package/dist/signal-ingestion/residency.js +238 -0
- package/dist/signal-ingestion/significance.d.ts +554 -0
- package/dist/signal-ingestion/significance.js +555 -0
- package/dist/signal-ingestion/types.d.ts +191 -0
- package/dist/signal-ingestion/types.js +8 -0
- package/dist/substrate/drift-composition.d.ts +270 -0
- package/dist/substrate/drift-composition.js +306 -0
- package/dist/substrate/drift-tui-surface.d.ts +61 -0
- package/dist/substrate/drift-tui-surface.js +102 -0
- package/dist/substrate/identity-class.d.ts +176 -0
- package/dist/substrate/identity-class.js +201 -0
- package/dist/tessellation/cross-soul-provenance-rule.d.ts +133 -0
- package/dist/tessellation/cross-soul-provenance-rule.js +171 -0
- package/dist/tessellation/inter-soul-embedding-distance-rule.d.ts +61 -0
- package/dist/tessellation/inter-soul-embedding-distance-rule.js +67 -0
- package/dist/tessellation/rule-registry.d.ts +269 -0
- package/dist/tessellation/rule-registry.js +92 -0
- package/dist/tessellation/soul-slug-ast-scan-rule.d.ts +90 -0
- package/dist/tessellation/soul-slug-ast-scan-rule.js +158 -0
- package/dist/tessellation-admission.d.ts +162 -0
- package/dist/tessellation-admission.js +146 -0
- package/dist/tessellation-drift.d.ts +246 -0
- package/dist/tessellation-drift.js +250 -0
- package/dist/validate-config.js +13 -0
- package/dist/validate-issue.js +2 -2
- package/dist/variant/cardinality-activation.d.ts +126 -0
- package/dist/variant/cardinality-activation.js +101 -0
- package/dist/variant/deprecation-lifecycle.d.ts +184 -0
- package/dist/variant/deprecation-lifecycle.js +208 -0
- package/dist/variant/drift-extension.d.ts +136 -0
- package/dist/variant/drift-extension.js +164 -0
- package/dist/variant/engineering-review.d.ts +185 -0
- package/dist/variant/engineering-review.js +142 -0
- package/dist/variant/index.d.ts +32 -0
- package/dist/variant/index.js +32 -0
- package/dist/variant/inheritance-validator.d.ts +165 -0
- package/dist/variant/inheritance-validator.js +139 -0
- package/dist/variant/internal-adopter/index.d.ts +11 -0
- package/dist/variant/internal-adopter/index.js +10 -0
- package/dist/variant/internal-adopter/products.d.ts +156 -0
- package/dist/variant/internal-adopter/products.js +366 -0
- package/dist/variant-admission.d.ts +316 -0
- package/dist/variant-admission.js +247 -0
- package/package.json +10 -8
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC-0017 Phase 2 — In-Soul Variant Pattern admission scorer composition.
|
|
3
|
+
*
|
|
4
|
+
* Implements the variant-scope routing algorithm described in RFC-0017 §5.4
|
|
5
|
+
* and §9 (Phase 2):
|
|
6
|
+
*
|
|
7
|
+
* resolveTargetedVariants(w) = set of (soulId, variantId) pairs declared on
|
|
8
|
+
* the work item via `targetedVariants[]` (URI shape `<soul-id>/<variant-id>`).
|
|
9
|
+
*
|
|
10
|
+
* If no `targetedVariants` declared:
|
|
11
|
+
* Scoring proceeds at soul-aggregate scope (backward-compatible — unchanged
|
|
12
|
+
* from RFC-0009 baseline).
|
|
13
|
+
*
|
|
14
|
+
* Else if |targeted| == 1 (single-variant):
|
|
15
|
+
* Sα₁(w) = scoreSα₁(variant.audienceCharacteristics)
|
|
16
|
+
* Sα₂(w) = scoreSα₂(variant.designOverrides ∪ variant.designImperatives)
|
|
17
|
+
*
|
|
18
|
+
* Else (multi-variant):
|
|
19
|
+
* Per-variant Sα₁ + Sα₂ are aggregated via the Soul's
|
|
20
|
+
* `crossVariantAggregation` rule (per-Soul override; default `min` per
|
|
21
|
+
* RFC-0017 OQ-4 / RFC-0009 §7.2 consistency).
|
|
22
|
+
*
|
|
23
|
+
* This module mirrors the surface shape of `tessellation-admission.ts` so the
|
|
24
|
+
* composite reader can compose the two layers cleanly: tessellation routing
|
|
25
|
+
* picks the Soul scope; variant routing refines that to a variant scope when
|
|
26
|
+
* the work item declares targeted variants of one of the affected souls.
|
|
27
|
+
*
|
|
28
|
+
* **Schema dependency note (Phase 1 not yet shipped):**
|
|
29
|
+
* Phase 1 (AISDLC-352) ships the JSON Schema additions for `variants[]` on
|
|
30
|
+
* Soul DID and `targetedVariants[]` on Work Item, plus the inheritance
|
|
31
|
+
* validator. Phase 2 (this file) defines the in-memory shapes the admission
|
|
32
|
+
* composite needs and the pure routing algorithm. Phase 1 loaders will
|
|
33
|
+
* populate `VariantContext` from on-disk Soul DIDs once they exist. The
|
|
34
|
+
* shapes here parallel the schema layout in RFC-0017 §6.1.
|
|
35
|
+
*
|
|
36
|
+
* @see spec/rfcs/RFC-0017-in-soul-variant-pattern.md §5.4 + §9 + §10
|
|
37
|
+
* @see orchestrator/src/tessellation-admission.ts — sibling Soul-scope router
|
|
38
|
+
*/
|
|
39
|
+
const SLUG_RE = /^[a-z][a-z0-9-]*$/;
|
|
40
|
+
/**
|
|
41
|
+
* Parse a targeted-variant reference. Accepts both the schema's accepted forms:
|
|
42
|
+
*
|
|
43
|
+
* 1. Slug-pair: `engage/small-utility` (RFC-0017 §6.1 Work Item schema pattern)
|
|
44
|
+
* 2. Full DID: `did:platform-x:soul:engage/variant:small-utility` (OQ-6)
|
|
45
|
+
*
|
|
46
|
+
* Returns `undefined` for any malformed input — caller's responsibility to
|
|
47
|
+
* surface diagnostics. The schema-side validator is Phase 1's responsibility;
|
|
48
|
+
* the router treats any malformed entry as ignorable (silent skip + caller can
|
|
49
|
+
* count them via the returned `parsedTargets`/`malformedTargets` split if
|
|
50
|
+
* desired).
|
|
51
|
+
*/
|
|
52
|
+
export function parseTargetedVariantRef(raw) {
|
|
53
|
+
// Form 2 (full DID, OQ-6): `did:<method>:soul:<soul-id>/variant:<variant-id>`
|
|
54
|
+
// - `<method>` = one OR more colon-separated segments (e.g. `platform-x`,
|
|
55
|
+
// `platform-x:tenant-1`). Any non-empty sequence of `[^:]+` segments is
|
|
56
|
+
// accepted; the schema validator (Phase 1) is the source-of-truth on
|
|
57
|
+
// well-formedness — Phase 2's router accepts any string that ends in
|
|
58
|
+
// `:soul:<soul-id>/variant:<variant-id>` with valid slug components.
|
|
59
|
+
const didMatch = /^did(?::[^:]+)+:soul:([a-z][a-z0-9-]*)\/variant:([a-z][a-z0-9-]*)$/.exec(raw);
|
|
60
|
+
if (didMatch) {
|
|
61
|
+
return { soulId: didMatch[1], variantId: didMatch[2], raw };
|
|
62
|
+
}
|
|
63
|
+
// Form 1 (slug-pair): `<soul-id>/<variant-id>` (RFC-0017 §6.1 pattern)
|
|
64
|
+
const slugMatch = /^([a-z][a-z0-9-]*)\/([a-z][a-z0-9-]*)$/.exec(raw);
|
|
65
|
+
if (slugMatch) {
|
|
66
|
+
const soulId = slugMatch[1];
|
|
67
|
+
const variantId = slugMatch[2];
|
|
68
|
+
if (SLUG_RE.test(soulId) && SLUG_RE.test(variantId)) {
|
|
69
|
+
return { soulId, variantId, raw };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
// ── resolveTargetedVariants ──────────────────────────────────────────────
|
|
75
|
+
/**
|
|
76
|
+
* Resolve the set of targeted (soulId, variantId) pairs for a given work item.
|
|
77
|
+
*
|
|
78
|
+
* Algorithm:
|
|
79
|
+
* 1. Find the work item by case-insensitive ID match in `workItemTargeting`.
|
|
80
|
+
* 2. Parse each entry of `targetedVariants[]` via `parseTargetedVariantRef`.
|
|
81
|
+
* 3. Filter parsed refs against `variantsBySoul` — a (soulId, variantId) pair
|
|
82
|
+
* only survives if the soul exists AND the variantId is declared on it.
|
|
83
|
+
* 4. Return the validated intersection (empty = backward-compat soul-scope).
|
|
84
|
+
*
|
|
85
|
+
* Returns an empty array (NOT undefined) in all "no variant routing" cases
|
|
86
|
+
* — the caller distinguishes single-variant / multi-variant / soul-scope
|
|
87
|
+
* paths by checking `.length`.
|
|
88
|
+
*/
|
|
89
|
+
export function resolveTargetedVariants(workItemId, variantCtx) {
|
|
90
|
+
if (!variantCtx || !variantCtx.workItemTargeting || variantCtx.workItemTargeting.length === 0) {
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
93
|
+
const normalizedId = workItemId.toLowerCase();
|
|
94
|
+
const entry = variantCtx.workItemTargeting.find((e) => e.id.toLowerCase() === normalizedId);
|
|
95
|
+
if (!entry || !entry.targetedVariants || entry.targetedVariants.length === 0) {
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
const out = [];
|
|
99
|
+
for (const raw of entry.targetedVariants) {
|
|
100
|
+
const parsed = parseTargetedVariantRef(raw);
|
|
101
|
+
if (!parsed)
|
|
102
|
+
continue;
|
|
103
|
+
const variants = variantCtx.variantsBySoul[parsed.soulId];
|
|
104
|
+
if (!variants)
|
|
105
|
+
continue;
|
|
106
|
+
if (!variants.some((v) => v.id === parsed.variantId))
|
|
107
|
+
continue;
|
|
108
|
+
out.push(parsed);
|
|
109
|
+
}
|
|
110
|
+
return out;
|
|
111
|
+
}
|
|
112
|
+
// ── applyCrossVariantRule ────────────────────────────────────────────────
|
|
113
|
+
/**
|
|
114
|
+
* Apply a per-Soul `crossVariantAggregation` rule over per-variant scores.
|
|
115
|
+
* Mirrors `applyCrossSoulRule` in `tessellation-admission.ts` but restricted
|
|
116
|
+
* to the three variant-scope-meaningful aggregations (`min` / `max` / `mean`).
|
|
117
|
+
*
|
|
118
|
+
* @param values - Per-variant score samples (one per targeted variant).
|
|
119
|
+
* @param rule - The aggregation rule (defaults to `min` per OQ-4).
|
|
120
|
+
* @param fallback - Returned when `values` is empty.
|
|
121
|
+
*/
|
|
122
|
+
export function applyCrossVariantRule(values, rule, fallback = 0.5) {
|
|
123
|
+
if (values.length === 0)
|
|
124
|
+
return fallback;
|
|
125
|
+
switch (rule ?? 'min') {
|
|
126
|
+
case 'min':
|
|
127
|
+
return Math.min(...values);
|
|
128
|
+
case 'max':
|
|
129
|
+
return Math.max(...values);
|
|
130
|
+
case 'mean':
|
|
131
|
+
return values.reduce((sum, v) => sum + v, 0) / values.length;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Compute the variant-scope-refined Sα₁ + Sα₂ for a work item.
|
|
136
|
+
*
|
|
137
|
+
* This runs AFTER tessellation soul-resolution: the caller has already routed
|
|
138
|
+
* the work item to its target Soul(s) and obtained the soul-aggregate Sα₁ /
|
|
139
|
+
* Sα₂ (the `fallbackSa1` / `fallbackSa2` arguments). Variant routing refines
|
|
140
|
+
* those values when the work item declares `targetedVariants` of one of the
|
|
141
|
+
* affected Souls (RFC-0017 §5.4).
|
|
142
|
+
*
|
|
143
|
+
* **Cross-soul + cross-variant interaction** (RFC-0017 §6.2 last bullet):
|
|
144
|
+
* "When a work item targets variants in MULTIPLE souls, the cross-soul
|
|
145
|
+
* aggregation rule applies at the soul level FIRST, then the cross-variant
|
|
146
|
+
* rule applies within each soul." Phase 2 implements the per-Soul-scope
|
|
147
|
+
* variant aggregation; the per-Soul `crossVariantAggregation` config picks
|
|
148
|
+
* which rule applies inside each Soul. When variants span multiple souls,
|
|
149
|
+
* each soul's per-variant scores are aggregated by THAT soul's config; the
|
|
150
|
+
* resulting per-soul scores are then aggregated by the cross-soul rule
|
|
151
|
+
* (handled by `tessellation-admission.ts`). At the variant-scope layer we
|
|
152
|
+
* therefore aggregate per-Soul, then aggregate per-Soul-results by `min`
|
|
153
|
+
* (the safest cross-soul aggregation default — matches RFC-0009 §7.2).
|
|
154
|
+
*
|
|
155
|
+
* @param workItemId - The canonical work item ID.
|
|
156
|
+
* @param fallbackSa1 - Soul-scope Sα₁ to use when no variant routing applies.
|
|
157
|
+
* @param fallbackSa2 - Soul-scope Sα₂ to use when no variant routing applies.
|
|
158
|
+
* @param variantCtx - Variant-scope context; undefined → backward-compat passthrough.
|
|
159
|
+
*/
|
|
160
|
+
export function computeVariantScopedScores(workItemId, fallbackSa1, fallbackSa2, variantCtx) {
|
|
161
|
+
const targetedVariants = resolveTargetedVariants(workItemId, variantCtx);
|
|
162
|
+
// ── Backward-compat: no targeted variants → soul-scope passthrough ──
|
|
163
|
+
if (targetedVariants.length === 0 || !variantCtx) {
|
|
164
|
+
return {
|
|
165
|
+
sa1: fallbackSa1,
|
|
166
|
+
sa2: fallbackSa2,
|
|
167
|
+
routingPath: 'no-variant-routing',
|
|
168
|
+
targetedVariants: [],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// ── Group targets by Soul (RFC-0017 §6.2 cross-soul layering) ──
|
|
172
|
+
const bySoul = new Map();
|
|
173
|
+
for (const ref of targetedVariants) {
|
|
174
|
+
const bucket = bySoul.get(ref.soulId);
|
|
175
|
+
if (bucket)
|
|
176
|
+
bucket.push(ref);
|
|
177
|
+
else
|
|
178
|
+
bySoul.set(ref.soulId, [ref]);
|
|
179
|
+
}
|
|
180
|
+
// ── Single-variant fast path ──
|
|
181
|
+
if (targetedVariants.length === 1) {
|
|
182
|
+
const ref = targetedVariants[0];
|
|
183
|
+
const scores = variantCtx.variantScores[ref.soulId]?.[ref.variantId];
|
|
184
|
+
return {
|
|
185
|
+
sa1: scores?.sa1 ?? fallbackSa1,
|
|
186
|
+
sa2: scores?.sa2 ?? fallbackSa2,
|
|
187
|
+
routingPath: 'single-variant',
|
|
188
|
+
targetedVariants,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
// ── Multi-variant: aggregate per-Soul, then aggregate cross-Soul ──
|
|
192
|
+
// Per-Soul aggregation uses the Soul's `crossVariantAggregation` config
|
|
193
|
+
// (default `min`). Cross-Soul aggregation between Souls (rare path) uses
|
|
194
|
+
// `min` as the safest default (RFC-0017 §6.2 layering + RFC-0009 §7.2).
|
|
195
|
+
const perSoulSa1 = [];
|
|
196
|
+
const perSoulSa2 = [];
|
|
197
|
+
// Track the rule used by the first (or only) Soul for auditability —
|
|
198
|
+
// in single-Soul multi-variant (the common case) this faithfully reports
|
|
199
|
+
// which rule shaped the aggregation. For cross-Soul multi-variant we
|
|
200
|
+
// surface the FIRST Soul's rule for transparency; downstream callers
|
|
201
|
+
// that need the full per-Soul rule map can inspect `configBySoul` directly.
|
|
202
|
+
let firstAggregationRule;
|
|
203
|
+
for (const [soulId, refs] of bySoul) {
|
|
204
|
+
const cfg = variantCtx.configBySoul?.[soulId];
|
|
205
|
+
const rule = cfg?.crossVariantAggregation ?? 'min';
|
|
206
|
+
if (firstAggregationRule === undefined)
|
|
207
|
+
firstAggregationRule = rule;
|
|
208
|
+
const sa1Samples = [];
|
|
209
|
+
const sa2Samples = [];
|
|
210
|
+
for (const ref of refs) {
|
|
211
|
+
const scores = variantCtx.variantScores[soulId]?.[ref.variantId];
|
|
212
|
+
sa1Samples.push(scores?.sa1 ?? fallbackSa1);
|
|
213
|
+
sa2Samples.push(scores?.sa2 ?? fallbackSa2);
|
|
214
|
+
}
|
|
215
|
+
perSoulSa1.push(applyCrossVariantRule(sa1Samples, rule, fallbackSa1));
|
|
216
|
+
perSoulSa2.push(applyCrossVariantRule(sa2Samples, rule, fallbackSa2));
|
|
217
|
+
}
|
|
218
|
+
// Cross-soul layering (§6.2): use `min` between Souls — safety-critical
|
|
219
|
+
// default consistent with RFC-0009 §7.2 cross-soul aggregation.
|
|
220
|
+
const sa1 = perSoulSa1.length === 1 ? perSoulSa1[0] : Math.min(...perSoulSa1);
|
|
221
|
+
const sa2 = perSoulSa2.length === 1 ? perSoulSa2[0] : Math.min(...perSoulSa2);
|
|
222
|
+
return {
|
|
223
|
+
sa1,
|
|
224
|
+
sa2,
|
|
225
|
+
routingPath: 'multi-variant',
|
|
226
|
+
targetedVariants,
|
|
227
|
+
aggregationRule: firstAggregationRule ?? 'min',
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
// ── Cross-soul + cross-variant compatibility note ────────────────────────
|
|
231
|
+
/**
|
|
232
|
+
* Helper for callers that already hold a `Tessellation` (sibling SoulScope router)
|
|
233
|
+
* and want to lift Soul-scope tessellation aggregation rule into the
|
|
234
|
+
* variant-scope cross-Soul layer. Currently the variant-scope cross-Soul
|
|
235
|
+
* layer always uses `min` (RFC-0017 §6.2 + RFC-0009 §7.2 safety-critical
|
|
236
|
+
* default). This helper is reserved for a future per-Soul override of the
|
|
237
|
+
* cross-Soul cross-variant layer; today it returns `min` unconditionally.
|
|
238
|
+
*
|
|
239
|
+
* Exported for documentation + so callers can `import` the boundary rather
|
|
240
|
+
* than hardcode `'min'` in two places.
|
|
241
|
+
*/
|
|
242
|
+
export function defaultCrossSoulVariantRule(_tessellation) {
|
|
243
|
+
// Phase 2 default: always `min` between souls when variants span multiple
|
|
244
|
+
// souls. Future Phase-3+ revisits per-tessellation override.
|
|
245
|
+
return 'min';
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=variant-admission.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdlc/orchestrator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "AI-SDLC Orchestrator — long-running runtime that drives issues through the complete SDLC with AI agents",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public",
|
|
13
|
-
"registry": "https://registry.npmjs.org/"
|
|
13
|
+
"registry": "https://registry.npmjs.org/",
|
|
14
|
+
"provenance": true
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"dist",
|
|
@@ -44,16 +45,17 @@
|
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"@inquirer/prompts": "^7.0.0",
|
|
46
47
|
"better-sqlite3": "^11.0.0",
|
|
47
|
-
"commander": "^
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"commander": "^15.0.0",
|
|
49
|
+
"franc": "^6.2.0",
|
|
50
|
+
"yaml": "^2.9.0",
|
|
51
|
+
"@ai-sdlc/reference": "0.13.0"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
54
|
"@types/better-sqlite3": "^7.6.0",
|
|
53
|
-
"@types/node": "^
|
|
55
|
+
"@types/node": "^25.9.2",
|
|
54
56
|
"@vitest/coverage-v8": "^3.2.4",
|
|
55
|
-
"tsx": "^4.
|
|
56
|
-
"typescript": "^
|
|
57
|
+
"tsx": "^4.22.4",
|
|
58
|
+
"typescript": "^6.0.3",
|
|
57
59
|
"vitest": "^3.0.0"
|
|
58
60
|
},
|
|
59
61
|
"scripts": {
|