@encore-os/eos-spec 0.3.1 → 0.5.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/commands/audit.js +11 -3
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/complete.js +41 -14
- package/dist/commands/complete.js.map +1 -1
- package/dist/commands/conformance.js +27 -0
- package/dist/commands/conformance.js.map +1 -1
- package/dist/commands/gen-tests.js +5 -2
- package/dist/commands/gen-tests.js.map +1 -1
- package/dist/commands/init.js +96 -22
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/next.d.ts +20 -4
- package/dist/commands/next.js +53 -15
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/precedent.d.ts +2 -0
- package/dist/commands/precedent.js +12 -3
- package/dist/commands/precedent.js.map +1 -1
- package/dist/commands/reconcile.d.ts +3 -10
- package/dist/commands/reconcile.js +6 -37
- package/dist/commands/reconcile.js.map +1 -1
- package/dist/commands/signoff.js +33 -5
- package/dist/commands/signoff.js.map +1 -1
- package/dist/commands/verify-acs.js +7 -4
- package/dist/commands/verify-acs.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/code-evidence.js +2 -1
- package/dist/lib/code-evidence.js.map +1 -1
- package/dist/lib/coherence.d.ts +2 -2
- package/dist/lib/coherence.js +7 -6
- package/dist/lib/coherence.js.map +1 -1
- package/dist/lib/config.d.ts +34 -2
- package/dist/lib/config.js +45 -3
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/discovery-defaults.d.ts +20 -0
- package/dist/lib/discovery-defaults.js +21 -0
- package/dist/lib/discovery-defaults.js.map +1 -0
- package/dist/lib/embedding-store.d.ts +0 -2
- package/dist/lib/embedding-store.js +1 -1
- package/dist/lib/embedding-store.js.map +1 -1
- package/dist/lib/exec.d.ts +0 -2
- package/dist/lib/exec.js +1 -12
- package/dist/lib/exec.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +5 -1
- package/dist/lib/frontmatter.js.map +1 -1
- package/dist/lib/migration-collision.d.ts +5 -4
- package/dist/lib/migration-collision.js +8 -6
- package/dist/lib/migration-collision.js.map +1 -1
- package/dist/lib/next-action.d.ts +19 -2
- package/dist/lib/next-action.js +28 -6
- package/dist/lib/next-action.js.map +1 -1
- package/dist/lib/ollama-embed.d.ts +0 -9
- package/dist/lib/ollama-embed.js +0 -35
- package/dist/lib/ollama-embed.js.map +1 -1
- package/dist/lib/pipeline-config.js +40 -2
- package/dist/lib/pipeline-config.js.map +1 -1
- package/dist/lib/pipeline-map.d.ts +30 -0
- package/dist/lib/pipeline-map.js +86 -5
- package/dist/lib/pipeline-map.js.map +1 -1
- package/dist/lib/pipeline-schema.d.ts +25 -1
- package/dist/lib/pipeline-schema.js +3 -0
- package/dist/lib/pipeline-schema.js.map +1 -1
- package/dist/lib/predicate-registry.js +28 -1
- package/dist/lib/predicate-registry.js.map +1 -1
- package/dist/lib/reconcile-core.d.ts +26 -0
- package/dist/lib/reconcile-core.js +43 -0
- package/dist/lib/reconcile-core.js.map +1 -0
- package/dist/lib/scaffold-templates.d.ts +30 -0
- package/dist/lib/scaffold-templates.js +203 -0
- package/dist/lib/scaffold-templates.js.map +1 -0
- package/dist/lib/spec-pure.js +44 -1
- package/dist/lib/spec-pure.js.map +1 -1
- package/dist/lib/specs.d.ts +17 -0
- package/dist/lib/specs.js.map +1 -1
- package/dist/lib/test-generator.d.ts +1 -1
- package/dist/lib/test-generator.js +3 -2
- package/dist/lib/test-generator.js.map +1 -1
- package/dist/lib/verifies-scan.d.ts +5 -1
- package/dist/lib/verifies-scan.js +9 -3
- package/dist/lib/verifies-scan.js.map +1 -1
- package/package.json +4 -4
|
@@ -2,11 +2,12 @@ export type Collision = {
|
|
|
2
2
|
table: string;
|
|
3
3
|
migration: string;
|
|
4
4
|
};
|
|
5
|
-
/** Map of every CREATE TABLE name across
|
|
6
|
-
* Lowercased; tolerant of IF NOT EXISTS, optional schema prefix, and quoting. One pass over all files.
|
|
7
|
-
|
|
5
|
+
/** Map of every CREATE TABLE name across the migrations dir -> first migration file declaring it.
|
|
6
|
+
* Lowercased; tolerant of IF NOT EXISTS, optional schema prefix, and quoting. One pass over all files.
|
|
7
|
+
* `migrationsRelDir` is config-resolved by the caller (TOOL-03); defaults to the fork layout. */
|
|
8
|
+
export declare function migrationTables(repoRoot: string, migrationsRelDir?: string): Map<string, string>;
|
|
8
9
|
/** Collisions between the given identifiers and existing migration tables. */
|
|
9
|
-
export declare function findMigrationCollisions(repoRoot: string, identifiers: string[]): Collision[];
|
|
10
|
+
export declare function findMigrationCollisions(repoRoot: string, identifiers: string[], migrationsRelDir?: string): Collision[];
|
|
10
11
|
/** Does the spec body declare it CREATES this table (vs merely referencing / reusing it)?
|
|
11
12
|
* Two accepted declaration forms:
|
|
12
13
|
* 1. Literal DDL: `CREATE TABLE [IF NOT EXISTS] [schema.]<table>` (tolerant of quoting).
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// Self-contained copy to avoid deep cross-package relative imports (no-restricted-imports).
|
|
3
3
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { DEFAULT_MIGRATIONS_DIR } from './discovery-defaults.js';
|
|
6
|
+
/** Map of every CREATE TABLE name across the migrations dir -> first migration file declaring it.
|
|
7
|
+
* Lowercased; tolerant of IF NOT EXISTS, optional schema prefix, and quoting. One pass over all files.
|
|
8
|
+
* `migrationsRelDir` is config-resolved by the caller (TOOL-03); defaults to the fork layout. */
|
|
9
|
+
export function migrationTables(repoRoot, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
10
|
+
const dir = join(repoRoot, migrationsRelDir);
|
|
9
11
|
const map = new Map();
|
|
10
12
|
if (!existsSync(dir))
|
|
11
13
|
return map;
|
|
@@ -24,8 +26,8 @@ export function migrationTables(repoRoot) {
|
|
|
24
26
|
return map;
|
|
25
27
|
}
|
|
26
28
|
/** Collisions between the given identifiers and existing migration tables. */
|
|
27
|
-
export function findMigrationCollisions(repoRoot, identifiers) {
|
|
28
|
-
const tables = migrationTables(repoRoot);
|
|
29
|
+
export function findMigrationCollisions(repoRoot, identifiers, migrationsRelDir = DEFAULT_MIGRATIONS_DIR) {
|
|
30
|
+
const tables = migrationTables(repoRoot, migrationsRelDir);
|
|
29
31
|
const out = [];
|
|
30
32
|
const seen = new Set();
|
|
31
33
|
for (const id of identifiers) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-collision.js","sourceRoot":"","sources":["../../src/lib/migration-collision.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,4FAA4F;AAE5F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"migration-collision.js","sourceRoot":"","sources":["../../src/lib/migration-collision.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,4FAA4F;AAE5F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAIjE;;kGAEkG;AAClG,MAAM,UAAU,eAAe,CAC7B,QAAgB,EAChB,mBAA2B,sBAAsB;IAEjD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAC7C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACjC,MAAM,EAAE,GAAG,sFAAsF,CAAC;IAClG,KAAK,MAAM,CAAC,IAAI,WAAW,CAAC,GA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CAAC;AACb,CAAC;AAED;;;;;;;mEAOmE;AACnE,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,KAAa;IAC1D,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,uEAAuE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAC7G,kFAAkF;IAClF,qFAAqF;IACrF,uDAAuD;IACvD,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,yBAAyB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACvE,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,WAAqB;IAC/D,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -26,6 +26,12 @@ export type NextAction = {
|
|
|
26
26
|
/** Set for the implement/complete tail. */
|
|
27
27
|
taskHint?: string;
|
|
28
28
|
};
|
|
29
|
+
/** A shipped (status:complete/implemented) spec needs no pre-implementation
|
|
30
|
+
* navigator action. Its skipped pipeline gates are historical (the spec was
|
|
31
|
+
* often authored post-hoc), so surface them as advisory, never as a TODO.
|
|
32
|
+
* Exported so the fs-bound CLI `recommendAction` short-circuits a shipped spec
|
|
33
|
+
* IDENTICALLY to this pure navigator (pure↔CLI parity). */
|
|
34
|
+
export declare function shippedAction(spec: SpecFile, pipeline?: readonly Transition[]): NextAction;
|
|
29
35
|
/** True when TASKS.md carries at least one status marker we know how to read —
|
|
30
36
|
* a GitHub checkbox (`[ ]`/`[x]`) or a ballot-box glyph (☐/☑/☒). Used to
|
|
31
37
|
* distinguish "genuinely all complete" from "format we cannot parse". */
|
|
@@ -35,10 +41,21 @@ export declare function findIncompleteTaskHint(text: string): string | null;
|
|
|
35
41
|
* complete. `tasksText` is the already-fetched TASKS content (null when the
|
|
36
42
|
* caller could not read it — equivalent to the CLI's failed read). */
|
|
37
43
|
export declare function implementOrCompletePure(spec: SpecFile, tasksText: string | null): NextAction;
|
|
44
|
+
/** Opt-in supersession context (#1593): when a consumer drives a layout whose
|
|
45
|
+
* schema sets `supersedeSoftGates`, it passes the same layout's `computeStage`/
|
|
46
|
+
* `rank` so the pure walk can skip a soft early gate already superseded by a
|
|
47
|
+
* higher computed stage — keeping this byte-for-byte equivalent to the CLI
|
|
48
|
+
* `recommendAction`. Omitted (the builder/Spec-Studio default) ⇒ no supersession. */
|
|
49
|
+
export type SupersedeContext = {
|
|
50
|
+
supersedeSoftGates?: boolean;
|
|
51
|
+
computeStage?: (spec: SpecFile) => string;
|
|
52
|
+
rank?: (status?: string) => number;
|
|
53
|
+
};
|
|
38
54
|
/** Walk the SSOT pipeline; return the first applicable, not-done transition, else
|
|
39
55
|
* the implement/complete tail. PURE: no fs. `tasksText` is the already-fetched
|
|
40
56
|
* TASKS content (null when unavailable). `pipeline` selects the layout — defaults
|
|
41
57
|
* to the engine's (encore1) PIPELINE; a consumer driving a different layout (e.g.
|
|
42
58
|
* Spec Studio over the builder layout) passes `buildPipeline(schema, registry).PIPELINE`
|
|
43
|
-
* so the next-action matches the same layout its `computeStage` uses.
|
|
44
|
-
|
|
59
|
+
* so the next-action matches the same layout its `computeStage` uses. `superseded`
|
|
60
|
+
* opts the encore1 #1593 supersession rule into the walk (see {@link SupersedeContext}). */
|
|
61
|
+
export declare function recommendActionPure(spec: SpecFile, tasksText: string | null, pipeline?: readonly Transition[], superseded?: SupersedeContext): NextAction;
|
package/dist/lib/next-action.js
CHANGED
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
* the CLI would have read (or null when the read fails) — the existing
|
|
12
12
|
* next.test.ts is the regression gate.
|
|
13
13
|
*/
|
|
14
|
-
import { PIPELINE } from './pipeline-map.js';
|
|
14
|
+
import { isComplianceGated, PIPELINE, stageApplies } from './pipeline-map.js';
|
|
15
15
|
import { isCompleteStatus } from './blockers.js';
|
|
16
16
|
/** A shipped (status:complete/implemented) spec needs no pre-implementation
|
|
17
17
|
* navigator action. Its skipped pipeline gates are historical (the spec was
|
|
18
|
-
* often authored post-hoc), so surface them as advisory, never as a TODO.
|
|
19
|
-
|
|
18
|
+
* often authored post-hoc), so surface them as advisory, never as a TODO.
|
|
19
|
+
* Exported so the fs-bound CLI `recommendAction` short-circuits a shipped spec
|
|
20
|
+
* IDENTICALLY to this pure navigator (pure↔CLI parity). */
|
|
21
|
+
export function shippedAction(spec, pipeline = PIPELINE) {
|
|
20
22
|
const skipped = pipeline.filter((t) => !t.optional && !t.isDone(spec)).map((t) => t.id);
|
|
21
23
|
return {
|
|
22
24
|
type: 'shipped',
|
|
@@ -99,15 +101,21 @@ export function implementOrCompletePure(spec, tasksText) {
|
|
|
99
101
|
* TASKS content (null when unavailable). `pipeline` selects the layout — defaults
|
|
100
102
|
* to the engine's (encore1) PIPELINE; a consumer driving a different layout (e.g.
|
|
101
103
|
* Spec Studio over the builder layout) passes `buildPipeline(schema, registry).PIPELINE`
|
|
102
|
-
* so the next-action matches the same layout its `computeStage` uses.
|
|
103
|
-
|
|
104
|
+
* so the next-action matches the same layout its `computeStage` uses. `superseded`
|
|
105
|
+
* opts the encore1 #1593 supersession rule into the walk (see {@link SupersedeContext}). */
|
|
106
|
+
export function recommendActionPure(spec, tasksText, pipeline = PIPELINE, superseded = {}) {
|
|
104
107
|
// A shipped spec is terminal: status (lifecycle) overrides the artifact pipeline
|
|
105
108
|
// for the explicit `--spec` query so the navigator never nags about gates an
|
|
106
109
|
// already-merged feature skipped. (Corpus `next` already filters these out.)
|
|
107
110
|
if (isCompleteStatus(spec.status))
|
|
108
111
|
return shippedAction(spec, pipeline);
|
|
109
112
|
// Derived from artifacts only — mirror the same predicates the PIPELINE uses for isDone.
|
|
110
|
-
|
|
113
|
+
// A compliance-gated spec (regulated OR PHI-bearing, #1372) clears its review stage
|
|
114
|
+
// with a compliance sign-off, not a bare spec-review — keep this in lockstep with the
|
|
115
|
+
// CLI `recommendAction` so the pure↔CLI gate walk stays identical (the corpus parity
|
|
116
|
+
// gate asserts it; only the CLI's richer verification tail intentionally diverges).
|
|
117
|
+
const reviewStagesDone = isComplianceGated(spec) ? spec.signals.hasComplianceSignoff : spec.signals.hasSpecReview;
|
|
118
|
+
if (reviewStagesDone && !spec.signals.hasUserStories && !spec.signals.hasAcceptanceCriteria) {
|
|
111
119
|
return {
|
|
112
120
|
type: 'backfill-frontmatter',
|
|
113
121
|
specId: spec.id,
|
|
@@ -120,10 +128,24 @@ export function recommendActionPure(spec, tasksText, pipeline = PIPELINE) {
|
|
|
120
128
|
for (const t of pipeline) {
|
|
121
129
|
if (t.optional)
|
|
122
130
|
continue; // advisories never block; surfaced separately
|
|
131
|
+
// strictOnly parity gates participate only under `next --strict` (a CLI-only
|
|
132
|
+
// mode); the pure navigator is the default, non-strict path, so it skips them —
|
|
133
|
+
// matching the CLI's default `recommendAction`. (The builder layout has none.)
|
|
134
|
+
if (t.strictOnly)
|
|
135
|
+
continue;
|
|
136
|
+
if (!stageApplies(t, spec))
|
|
137
|
+
continue;
|
|
123
138
|
// Artifacts are the single source of truth. `pipeline_status` is derived/cached
|
|
124
139
|
// (see eos-spec reconcile) and is intentionally NOT consulted here.
|
|
125
140
|
if (t.isDone(spec))
|
|
126
141
|
continue;
|
|
142
|
+
// #1593 supersession (opt-in via `superseded`): skip a soft early gate whose
|
|
143
|
+
// completesStatus already ranks below the computed stage (a later artifact exists).
|
|
144
|
+
if (superseded.supersedeSoftGates && t.completesStatus && superseded.computeStage && superseded.rank) {
|
|
145
|
+
const tRank = superseded.rank(t.completesStatus);
|
|
146
|
+
if (tRank >= 0 && tRank < superseded.rank(superseded.computeStage(spec)))
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
127
149
|
return {
|
|
128
150
|
type: t.id,
|
|
129
151
|
specId: spec.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-action.js","sourceRoot":"","sources":["../../src/lib/next-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAkB,QAAQ,EAAmB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"next-action.js","sourceRoot":"","sources":["../../src/lib/next-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAkB,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAiBjD;;;;4DAI4D;AAC5D,MAAM,UAAU,aAAa,CAAC,IAAc,EAAE,WAAkC,QAAQ;IACtF,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACxF,OAAO;QACL,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,IAAI,CAAC,EAAE;QACf,MAAM,EAAE,eAAe,IAAI,CAAC,MAAM,mEAAmE;QACrG,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,6CAA6C,IAAI,CAAC,MAAM,8CAA8C;QAClH,IAAI,EACF,OAAO,CAAC,MAAM,GAAG,CAAC;YAChB,CAAC,CAAC,4CAA4C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAmC;YACnG,CAAC,CAAC,SAAS;KAChB,CAAC;AACJ,CAAC;AAED;;0EAE0E;AAC1E,MAAM,UAAU,wBAAwB,CAA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,CAAC,YAAY,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;YACrG,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;YACjD,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBAAE,SAAS;QACrF,CAAC;QAED,OAAO;YACL,IAAI,EAAE,CAAC,CAAC,EAAE;YACV,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;SAClC,CAAC;IACJ,CAAC;IACD,OAAO,uBAAuB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -7,15 +7,6 @@
|
|
|
7
7
|
* manifest so the committed vectors stay reproducible.
|
|
8
8
|
*/
|
|
9
9
|
export declare const EMBED_MODEL = "qwen3-embedding:0.6b";
|
|
10
|
-
export declare const EMBED_DIMS = 1024;
|
|
11
10
|
export declare const QUERY_INSTRUCTION = "Instruct: Given a feature or capability search query, retrieve the most relevant product specification.\nQuery:";
|
|
12
11
|
/** Low-level batch embed (no instruction applied). Throws on transport/HTTP error. */
|
|
13
12
|
export declare function ollamaEmbed(inputs: string[], model?: string): Promise<number[][]>;
|
|
14
|
-
/** Embed a search query (instruction prefix applied) → normalized vector. */
|
|
15
|
-
export declare function embedQueryOllama(query: string, model?: string): Promise<Float32Array>;
|
|
16
|
-
/**
|
|
17
|
-
* Graceful query embedder for runtime use: returns the normalized query vector,
|
|
18
|
-
* or null when Ollama is unreachable (callers fall back to lexical search). A
|
|
19
|
-
* short timeout keeps `eos-spec next`/`create` snappy when no embedder is present.
|
|
20
|
-
*/
|
|
21
|
-
export declare function tryEmbedQueryOllama(query: string, timeoutMs?: number): Promise<Float32Array | null>;
|
package/dist/lib/ollama-embed.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { normalize } from './embedding-store.js';
|
|
2
1
|
/**
|
|
3
2
|
* Ollama embedding adapter for semantic precedent search. Documents are embedded
|
|
4
3
|
* WITHOUT the instruction; queries WITH it — qwen3-embedding requires the
|
|
@@ -8,7 +7,6 @@ import { normalize } from './embedding-store.js';
|
|
|
8
7
|
* manifest so the committed vectors stay reproducible.
|
|
9
8
|
*/
|
|
10
9
|
export const EMBED_MODEL = 'qwen3-embedding:0.6b';
|
|
11
|
-
export const EMBED_DIMS = 1024;
|
|
12
10
|
export const QUERY_INSTRUCTION = 'Instruct: Given a feature or capability search query, retrieve the most relevant product specification.\nQuery:';
|
|
13
11
|
function ollamaUrl() {
|
|
14
12
|
const host = process.env.OLLAMA_HOST ?? 'http://localhost:11434';
|
|
@@ -29,37 +27,4 @@ export async function ollamaEmbed(inputs, model = EMBED_MODEL) {
|
|
|
29
27
|
}
|
|
30
28
|
return json.embeddings;
|
|
31
29
|
}
|
|
32
|
-
/** Embed a search query (instruction prefix applied) → normalized vector. */
|
|
33
|
-
export async function embedQueryOllama(query, model = EMBED_MODEL) {
|
|
34
|
-
const [vec] = await ollamaEmbed([`${QUERY_INSTRUCTION}${query}`], model);
|
|
35
|
-
return normalize(Float32Array.from(vec));
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Graceful query embedder for runtime use: returns the normalized query vector,
|
|
39
|
-
* or null when Ollama is unreachable (callers fall back to lexical search). A
|
|
40
|
-
* short timeout keeps `eos-spec next`/`create` snappy when no embedder is present.
|
|
41
|
-
*/
|
|
42
|
-
export async function tryEmbedQueryOllama(query, timeoutMs = 4000) {
|
|
43
|
-
const ctrl = new AbortController();
|
|
44
|
-
const timer = setTimeout(() => ctrl.abort(), timeoutMs);
|
|
45
|
-
try {
|
|
46
|
-
const res = await fetch(ollamaUrl(), {
|
|
47
|
-
method: 'POST',
|
|
48
|
-
headers: { 'content-type': 'application/json' },
|
|
49
|
-
body: JSON.stringify({ model: EMBED_MODEL, input: [`${QUERY_INSTRUCTION}${query}`] }),
|
|
50
|
-
signal: ctrl.signal,
|
|
51
|
-
});
|
|
52
|
-
if (!res.ok)
|
|
53
|
-
return null;
|
|
54
|
-
const json = (await res.json());
|
|
55
|
-
const vec = json.embeddings?.[0];
|
|
56
|
-
return vec ? normalize(Float32Array.from(vec)) : null;
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
finally {
|
|
62
|
-
clearTimeout(timer);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
30
|
//# sourceMappingURL=ollama-embed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ollama-embed.js","sourceRoot":"","sources":["../../src/lib/ollama-embed.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ollama-embed.js","sourceRoot":"","sources":["../../src/lib/ollama-embed.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,iHAAiH,CAAC;AAEpH,SAAS,SAAS;IAChB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,wBAAwB,CAAC;IACjE,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC;AAChD,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAgB,EAAE,KAAK,GAAG,WAAW;IACrE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;KAC/C,CAAC,CAAC;IACH,IAAI,CAAC,GAAG,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IACrF,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAgC,CAAC;IAC/D,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;QACjE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC;AACzB,CAAC"}
|
|
@@ -60,14 +60,47 @@ export const ENCORE1_PIPELINE_SCHEMA = {
|
|
|
60
60
|
reason: 'Spec is grounded — run the implementability/landscape review.',
|
|
61
61
|
completesStatus: 'reviewed',
|
|
62
62
|
},
|
|
63
|
+
// ── Phase 1 strictOnly parity gates (Finding A). Each is BYTE-IDENTICAL to the
|
|
64
|
+
// matching LEGACY_PIPELINE stage in pipeline-map.ts (the parity gate proves
|
|
65
|
+
// the config-driven build ≡ LEGACY). NO `completesStatus` ⇒ never moves
|
|
66
|
+
// computeStage; `strictOnly` ⇒ only walked under `next --strict`.
|
|
67
|
+
{
|
|
68
|
+
id: 'research-before-review',
|
|
69
|
+
gate: 'hasResearchBeforeReview',
|
|
70
|
+
actor: 'encore-spec-research skill',
|
|
71
|
+
actorType: 'skill',
|
|
72
|
+
invocation: 'the encore-spec-research skill on ${id} (research must precede review on the non-regulated path)',
|
|
73
|
+
reason: 'Spec was reviewed without a research appendix — ground it before relying on the review.',
|
|
74
|
+
strictOnly: true,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'revalidate-after-review',
|
|
78
|
+
gate: 'hasReValidationAfterReview',
|
|
79
|
+
actor: 'validate-spec command',
|
|
80
|
+
actorType: 'command',
|
|
81
|
+
invocation: "re-run the /validate-spec command on ${id} after spec-review's auto-applied edits, then `eos-spec signoff --type revalidated-after-review --spec ${id}`",
|
|
82
|
+
reason: 'Spec-review auto-applies edits — re-validate to catch what they broke before advancing.',
|
|
83
|
+
strictOnly: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'compliance-for-sensitive',
|
|
87
|
+
gate: 'hasComplianceForSensitive',
|
|
88
|
+
actor: 'compliance-reviewer agent',
|
|
89
|
+
actorType: 'agent',
|
|
90
|
+
invocation: 'the compliance-reviewer agent on ${id} (PHI/PII/billing/credentialing), then `eos-spec signoff --type compliance --spec ${id}`',
|
|
91
|
+
reason: 'Spec carries a PHI/PII/billing/credentialing signal but has no compliance sign-off.',
|
|
92
|
+
strictOnly: true,
|
|
93
|
+
},
|
|
63
94
|
{
|
|
64
95
|
id: 'compliance-review',
|
|
65
96
|
gate: 'hasComplianceSignoff',
|
|
66
97
|
actor: 'compliance-reviewer agent',
|
|
67
98
|
actorType: 'agent',
|
|
68
99
|
invocation: 'the compliance-reviewer agent on ${id}, then merge its review PR',
|
|
69
|
-
reason: 'Regulated spec needs compliance sign-off (human-gated PR).',
|
|
70
|
-
|
|
100
|
+
reason: 'Regulated or PHI-bearing spec needs compliance sign-off (human-gated PR).',
|
|
101
|
+
// #1372 PHI-widening: applies to regulated cores AND PHI/PII-bearing specs in
|
|
102
|
+
// any core (via the `complianceGating` predicate), not `regulatedOnly`.
|
|
103
|
+
appliesWhen: 'complianceGating',
|
|
71
104
|
completesStatus: 'compliance_reviewed',
|
|
72
105
|
},
|
|
73
106
|
{
|
|
@@ -124,6 +157,11 @@ export const ENCORE1_PIPELINE_SCHEMA = {
|
|
|
124
157
|
// which has opposite polarity). Cap applies when `unless` returns FALSE.
|
|
125
158
|
{ unless: 'hasAcceptanceCriteria', capBelow: 'tasks_generated' },
|
|
126
159
|
],
|
|
160
|
+
// #1593 supersession: once later artifacts have lifted the computed stage past a
|
|
161
|
+
// soft early gate, the navigator stops re-surfacing that gate (e.g. a missing
|
|
162
|
+
// `<!-- validated: -->` on an already-reviewed/planned/tasked spec). encore1
|
|
163
|
+
// opts in; the builder layout does not (its omission keeps builder unchanged).
|
|
164
|
+
supersedeSoftGates: true,
|
|
127
165
|
};
|
|
128
166
|
/** The builder (encoreos-switchboard) 7-stage / 6-status layout as config-driven
|
|
129
167
|
* data — a faithful transcription of the imperative PIPELINE/STATUS_ORDER in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-config.js","sourceRoot":"","sources":["../../src/lib/pipeline-config.ts"],"names":[],"mappings":"AAEA;;;;;;;uFAOuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAmB;IACrD,WAAW,EAAE;QACX,MAAM;QACN,WAAW;QACX,WAAW;QACX,qBAAqB;QACrB,UAAU;QACV,qBAAqB;QACrB,aAAa;QACb,SAAS;QACT,iBAAiB;KAClB;IACD,MAAM,EAAE;QACN;YACE,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,sBAAsB;YAC7B,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,2BAA2B;YACvC,MAAM,EAAE,+DAA+D;YACvE,eAAe,EAAE,WAAW;YAC5B,8EAA8E;YAC9E,QAAQ,EAAE,IAAI;SACf;QACD;YACE,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,uBAAuB;YAC9B,SAAS,EAAE,SAAS;YACpB,8EAA8E;YAC9E,sDAAsD;YACtD,UAAU,EACR,oIAAoI;YACtI,MAAM,EAAE,6DAA6D;YACrE,eAAe,EAAE,WAAW;SAC7B;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,4BAA4B;YACnC,SAAS,EAAE,OAAO;YAClB,UAAU,EAAE,yCAAyC;YACrD,MAAM,EAAE,yDAAyD;YACjE,aAAa,EAAE,IAAI;YACnB,eAAe,EAAE,qBAAqB;SACvC;QACD;YACE,EAAE,EAAE,aAAa;YACjB,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,mBAAmB;YAC1B,SAAS,EAAE,OAAO;YAClB,UAAU,EAAE,gCAAgC;YAC5C,MAAM,EAAE,+DAA+D;YACvE,eAAe,EAAE,UAAU;SAC5B;QACD;YACE,EAAE,EAAE,mBAAmB;YACvB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,2BAA2B;YAClC,SAAS,EAAE,OAAO;YAClB,UAAU,EAAE,kEAAkE;YAC9E,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"pipeline-config.js","sourceRoot":"","sources":["../../src/lib/pipeline-config.ts"],"names":[],"mappings":"AAEA;;;;;;;uFAOuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAmB;IACrD,WAAW,EAAE;QACX,MAAM;QACN,WAAW;QACX,WAAW;QACX,qBAAqB;QACrB,UAAU;QACV,qBAAqB;QACrB,aAAa;QACb,SAAS;QACT,iBAAiB;KAClB;IACD,MAAM,EAAE;QACN;YACE,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,sBAAsB;YAC7B,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,2BAA2B;YACvC,MAAM,EAAE,+DAA+D;YACvE,eAAe,EAAE,WAAW;YAC5B,8EAA8E;YAC9E,QAAQ,EAAE,IAAI;SACf;QACD;YACE,EAAE,EAAE,eAAe;YACnB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,uBAAuB;YAC9B,SAAS,EAAE,SAAS;YACpB,8EAA8E;YAC9E,sDAAsD;YACtD,UAAU,EACR,oIAAoI;YACtI,MAAM,EAAE,6DAA6D;YACrE,eAAe,EAAE,WAAW;SAC7B;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB,IAAI,EAAE,aAAa;YACnB,KAAK,E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KAAK,EAAE,aAAa;YACpB,SAAS,EAAE,YAAY;YACvB,UAAU,EAAE,mGAAmG;YAC/G,MAAM,EAAE,6BAA6B;YACrC,eAAe,EAAE,SAAS;SAC3B;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,cAAc;YACrB,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,sBAAsB;YAClC,MAAM,EAAE,oCAAoC;YAC5C,eAAe,EAAE,iBAAiB;SACnC;KACF;IACD,IAAI,EAAE,EAAE;CACT,CAAC"}
|
|
@@ -13,8 +13,15 @@ export type Transition = {
|
|
|
13
13
|
reason: string;
|
|
14
14
|
/** Only applies to regulated cores (cl/pm/hr/rh/gr). */
|
|
15
15
|
regulatedOnly?: boolean;
|
|
16
|
+
/** Resolved applicability predicate (from a schema stage's `appliesWhen`). When
|
|
17
|
+
* present it supersedes `regulatedOnly`: the stage applies to a spec iff this
|
|
18
|
+
* returns true. Lets the compliance gate widen to PHI-bearing specs (#1372). */
|
|
19
|
+
appliesTo?: (spec: SpecFile) => boolean;
|
|
16
20
|
/** Advisory — surfaced as a hint but never blocks progression. */
|
|
17
21
|
optional?: boolean;
|
|
22
|
+
/** Phase 1 parity gate: walked by the navigator ONLY under `next --strict`; no
|
|
23
|
+
* `completesStatus`, so it never moves computeStage. */
|
|
24
|
+
strictOnly?: boolean;
|
|
18
25
|
/** The pipeline_status enum value this transition completes (for schema-coverage + reconciliation). */
|
|
19
26
|
completesStatus?: string;
|
|
20
27
|
/** True when this transition's output already exists for the spec. */
|
|
@@ -22,6 +29,13 @@ export type Transition = {
|
|
|
22
29
|
};
|
|
23
30
|
/** Numeric rank of a pipeline_status value; unknown/undefined ranks below everything. */
|
|
24
31
|
export declare function rank(status?: string): number;
|
|
32
|
+
/** Whether a pipeline transition applies to a given spec. The general
|
|
33
|
+
* applicability test shared by `computeStage` and the navigator: a resolved
|
|
34
|
+
* `appliesTo` predicate (from a schema `appliesWhen`) wins; otherwise
|
|
35
|
+
* `regulatedOnly` falls back to the regulated-core check; otherwise the stage
|
|
36
|
+
* applies to everyone. Centralizing it keeps the widened compliance gate (#1372)
|
|
37
|
+
* consistent across both the stage walk and the cumulative stage derivation. */
|
|
38
|
+
export declare function stageApplies(t: Pick<Transition, 'appliesTo' | 'regulatedOnly'>, spec: SpecFile): boolean;
|
|
25
39
|
/** Legacy hand-written pipeline, preserved verbatim for parity + rollback. The
|
|
26
40
|
* active {@link PIPELINE} export is the config-driven {@link buildPipeline} output
|
|
27
41
|
* (selectable back to this via `EOS_PIPELINE=legacy`). */
|
|
@@ -59,6 +73,7 @@ export declare function buildPipeline(schema: PipelineSchema, registry: Predicat
|
|
|
59
73
|
PIPELINE: Transition[];
|
|
60
74
|
rank: (status?: string) => number;
|
|
61
75
|
computeStage: (spec: SpecFile) => string;
|
|
76
|
+
supersedeSoftGates: boolean;
|
|
62
77
|
};
|
|
63
78
|
/** Canonical, ordered spec/test pipeline. First not-done applicable transition is
|
|
64
79
|
* the next step. Config-driven by default; `EOS_PIPELINE=legacy` selects {@link LEGACY_PIPELINE}. */
|
|
@@ -66,3 +81,18 @@ export declare const PIPELINE: Transition[];
|
|
|
66
81
|
/** Derive a spec's furthest-reached pipeline stage from artifacts only.
|
|
67
82
|
* Config-driven by default; `EOS_PIPELINE=legacy` selects {@link legacyComputeStage}. */
|
|
68
83
|
export declare const computeStage: (spec: SpecFile) => string;
|
|
84
|
+
/** Whether the active layout supersedes soft early gates once a later artifact has
|
|
85
|
+
* lifted the computed stage past them (#1593). True for the config-driven encore1
|
|
86
|
+
* build; the legacy hand-written engine never superseded, so `EOS_PIPELINE=legacy`
|
|
87
|
+
* is false. The navigator consults this; `computeStage` is unaffected either way. */
|
|
88
|
+
export declare const SUPERSEDE_SOFT_GATES: boolean;
|
|
89
|
+
/** True when a not-done transition `t` is SUPERSEDED for `spec` under the active
|
|
90
|
+
* layout: it carries a `completesStatus` that ranks strictly below the spec's
|
|
91
|
+
* computed stage, so a later stage's artifact already exists and the navigator
|
|
92
|
+
* should not route back to this (soft) gate. Stages with no `completesStatus`
|
|
93
|
+
* (the strictOnly parity gates, draft-acs, generate-tests) are never superseded. */
|
|
94
|
+
export declare function isSupersededGate(t: Transition, spec: SpecFile): boolean;
|
|
95
|
+
/** Whether a spec is gated on compliance review under the active (encore1) layout —
|
|
96
|
+
* regulated cores OR PHI/PII-bearing specs (#1372). The navigator's review-stage
|
|
97
|
+
* heuristic keys on this so the widened gate stays in one place. */
|
|
98
|
+
export declare function isComplianceGated(spec: SpecFile): boolean;
|
package/dist/lib/pipeline-map.js
CHANGED
|
@@ -19,6 +19,19 @@ export function rank(status) {
|
|
|
19
19
|
const i = STATUS_ORDER.indexOf(status);
|
|
20
20
|
return i === -1 ? -1 : i;
|
|
21
21
|
}
|
|
22
|
+
/** Whether a pipeline transition applies to a given spec. The general
|
|
23
|
+
* applicability test shared by `computeStage` and the navigator: a resolved
|
|
24
|
+
* `appliesTo` predicate (from a schema `appliesWhen`) wins; otherwise
|
|
25
|
+
* `regulatedOnly` falls back to the regulated-core check; otherwise the stage
|
|
26
|
+
* applies to everyone. Centralizing it keeps the widened compliance gate (#1372)
|
|
27
|
+
* consistent across both the stage walk and the cumulative stage derivation. */
|
|
28
|
+
export function stageApplies(t, spec) {
|
|
29
|
+
if (t.appliesTo)
|
|
30
|
+
return t.appliesTo(spec);
|
|
31
|
+
if (t.regulatedOnly)
|
|
32
|
+
return spec.signals.isRegulated;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
22
35
|
// TODO(post-cutover): once the schema pipeline bakes, delete LEGACY_PIPELINE,
|
|
23
36
|
// legacyComputeStage, and the EOS_PIPELINE ternary selector below.
|
|
24
37
|
/** Legacy hand-written pipeline, preserved verbatim for parity + rollback. The
|
|
@@ -69,13 +82,49 @@ export const LEGACY_PIPELINE = [
|
|
|
69
82
|
completesStatus: 'reviewed',
|
|
70
83
|
isDone: (s) => s.signals.hasSpecReview,
|
|
71
84
|
},
|
|
85
|
+
// ── Phase 1 strictOnly parity gates (Finding A). Kept BYTE-IDENTICAL to the
|
|
86
|
+
// matching ENCORE1_PIPELINE_SCHEMA stages so the config-driven build ≡ LEGACY
|
|
87
|
+
// (pipeline-parity.test.ts test 4). No `completesStatus` ⇒ computeStage is
|
|
88
|
+
// unchanged on every fixture (tests 2/3). `strictOnly` ⇒ ignored by default
|
|
89
|
+
// `next`; surfaced as BLOCKING only under `next --strict`.
|
|
90
|
+
{
|
|
91
|
+
id: 'research-before-review',
|
|
92
|
+
actor: 'encore-spec-research skill',
|
|
93
|
+
actorType: 'skill',
|
|
94
|
+
invocation: (id) => `the encore-spec-research skill on ${id} (research must precede review on the non-regulated path)`,
|
|
95
|
+
reason: 'Spec was reviewed without a research appendix — ground it before relying on the review.',
|
|
96
|
+
strictOnly: true,
|
|
97
|
+
isDone: (s) => !s.signals.hasSpecReview || s.signals.hasResearch,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'revalidate-after-review',
|
|
101
|
+
actor: 'validate-spec command',
|
|
102
|
+
actorType: 'command',
|
|
103
|
+
invocation: (id) => `re-run the /validate-spec command on ${id} after spec-review's auto-applied edits, then \`eos-spec signoff --type revalidated-after-review --spec ${id}\``,
|
|
104
|
+
reason: 'Spec-review auto-applies edits — re-validate to catch what they broke before advancing.',
|
|
105
|
+
strictOnly: true,
|
|
106
|
+
isDone: (s) => !s.signals.hasSpecReview || Boolean(s.signals.hasReValidationAfterReview),
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: 'compliance-for-sensitive',
|
|
110
|
+
actor: 'compliance-reviewer agent',
|
|
111
|
+
actorType: 'agent',
|
|
112
|
+
invocation: (id) => `the compliance-reviewer agent on ${id} (PHI/PII/billing/credentialing), then \`eos-spec signoff --type compliance --spec ${id}\``,
|
|
113
|
+
reason: 'Spec carries a PHI/PII/billing/credentialing signal but has no compliance sign-off.',
|
|
114
|
+
strictOnly: true,
|
|
115
|
+
isDone: (s) => !s.signals.isSensitive || s.signals.hasComplianceSignoff,
|
|
116
|
+
},
|
|
72
117
|
{
|
|
73
118
|
id: 'compliance-review',
|
|
74
119
|
actor: 'compliance-reviewer agent',
|
|
75
120
|
actorType: 'agent',
|
|
76
121
|
invocation: (id) => `the compliance-reviewer agent on ${id}, then merge its review PR`,
|
|
77
|
-
reason: 'Regulated spec needs compliance sign-off (human-gated PR).',
|
|
78
|
-
|
|
122
|
+
reason: 'Regulated or PHI-bearing spec needs compliance sign-off (human-gated PR).',
|
|
123
|
+
// #1372 PHI-widening (kept in lockstep with ENCORE1_PIPELINE_SCHEMA's
|
|
124
|
+
// `appliesWhen: 'complianceGating'`): applies to regulated cores AND
|
|
125
|
+
// PHI/PII-bearing specs in any core. On the captured baseline `isSensitive` is
|
|
126
|
+
// uniformly false, so this reduces to `isRegulated` and parity is preserved.
|
|
127
|
+
appliesTo: (s) => s.signals.isRegulated || Boolean(s.signals.isSensitive),
|
|
79
128
|
completesStatus: 'compliance_reviewed',
|
|
80
129
|
isDone: (s) => s.signals.hasComplianceSignoff,
|
|
81
130
|
},
|
|
@@ -175,7 +224,7 @@ export function legacyComputeStage(spec) {
|
|
|
175
224
|
const capRank = caps.length ? Math.min(...caps) : Number.POSITIVE_INFINITY;
|
|
176
225
|
let best;
|
|
177
226
|
for (const t of LEGACY_PIPELINE) {
|
|
178
|
-
if (t
|
|
227
|
+
if (!stageApplies(t, spec))
|
|
179
228
|
continue;
|
|
180
229
|
if (!t.isDone(spec) || !t.completesStatus)
|
|
181
230
|
continue;
|
|
@@ -214,7 +263,11 @@ export function buildPipeline(schema, registry) {
|
|
|
214
263
|
invocation: (id) => st.invocation.replaceAll('${id}', id),
|
|
215
264
|
reason: st.reason,
|
|
216
265
|
regulatedOnly: st.regulatedOnly,
|
|
266
|
+
// Resolve the named applicability predicate (if any) into a closure. Wins over
|
|
267
|
+
// `regulatedOnly` in `stageApplies` — the seam the #1372 compliance widening rides.
|
|
268
|
+
appliesTo: st.appliesWhen ? registry[st.appliesWhen] : undefined,
|
|
217
269
|
optional: st.optional,
|
|
270
|
+
strictOnly: st.strictOnly,
|
|
218
271
|
completesStatus: st.completesStatus,
|
|
219
272
|
isDone: registry[st.gate],
|
|
220
273
|
}));
|
|
@@ -229,7 +282,7 @@ export function buildPipeline(schema, registry) {
|
|
|
229
282
|
const capRank = caps.length ? Math.min(...caps) : Number.POSITIVE_INFINITY;
|
|
230
283
|
let best;
|
|
231
284
|
for (const t of pipeline) {
|
|
232
|
-
if (t
|
|
285
|
+
if (!stageApplies(t, spec))
|
|
233
286
|
continue;
|
|
234
287
|
if (!t.isDone(spec) || !t.completesStatus)
|
|
235
288
|
continue;
|
|
@@ -240,7 +293,13 @@ export function buildPipeline(schema, registry) {
|
|
|
240
293
|
}
|
|
241
294
|
return best ?? 'stub';
|
|
242
295
|
};
|
|
243
|
-
return {
|
|
296
|
+
return {
|
|
297
|
+
STATUS_ORDER: order,
|
|
298
|
+
PIPELINE: pipeline,
|
|
299
|
+
rank: rankFn,
|
|
300
|
+
computeStage: computeStageFn,
|
|
301
|
+
supersedeSoftGates: Boolean(schema.supersedeSoftGates),
|
|
302
|
+
};
|
|
244
303
|
}
|
|
245
304
|
// Active selection — config-driven by default; `EOS_PIPELINE=legacy` rolls back
|
|
246
305
|
// to the hand-written engine. STATUS_ORDER/rank are identical in both
|
|
@@ -253,4 +312,26 @@ export const PIPELINE = process.env.EOS_PIPELINE === 'legacy' ? LEGACY_PIPELINE
|
|
|
253
312
|
/** Derive a spec's furthest-reached pipeline stage from artifacts only.
|
|
254
313
|
* Config-driven by default; `EOS_PIPELINE=legacy` selects {@link legacyComputeStage}. */
|
|
255
314
|
export const computeStage = process.env.EOS_PIPELINE === 'legacy' ? legacyComputeStage : _built.computeStage;
|
|
315
|
+
/** Whether the active layout supersedes soft early gates once a later artifact has
|
|
316
|
+
* lifted the computed stage past them (#1593). True for the config-driven encore1
|
|
317
|
+
* build; the legacy hand-written engine never superseded, so `EOS_PIPELINE=legacy`
|
|
318
|
+
* is false. The navigator consults this; `computeStage` is unaffected either way. */
|
|
319
|
+
export const SUPERSEDE_SOFT_GATES = process.env.EOS_PIPELINE === 'legacy' ? false : _built.supersedeSoftGates;
|
|
320
|
+
/** True when a not-done transition `t` is SUPERSEDED for `spec` under the active
|
|
321
|
+
* layout: it carries a `completesStatus` that ranks strictly below the spec's
|
|
322
|
+
* computed stage, so a later stage's artifact already exists and the navigator
|
|
323
|
+
* should not route back to this (soft) gate. Stages with no `completesStatus`
|
|
324
|
+
* (the strictOnly parity gates, draft-acs, generate-tests) are never superseded. */
|
|
325
|
+
export function isSupersededGate(t, spec) {
|
|
326
|
+
if (!SUPERSEDE_SOFT_GATES || !t.completesStatus)
|
|
327
|
+
return false;
|
|
328
|
+
const tRank = rank(t.completesStatus);
|
|
329
|
+
return tRank >= 0 && tRank < rank(computeStage(spec));
|
|
330
|
+
}
|
|
331
|
+
/** Whether a spec is gated on compliance review under the active (encore1) layout —
|
|
332
|
+
* regulated cores OR PHI/PII-bearing specs (#1372). The navigator's review-stage
|
|
333
|
+
* heuristic keys on this so the widened gate stays in one place. */
|
|
334
|
+
export function isComplianceGated(spec) {
|
|
335
|
+
return DEFAULT_PREDICATES.complianceGating(spec);
|
|
336
|
+
}
|
|
256
337
|
//# sourceMappingURL=pipeline-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-map.js","sourceRoot":"","sources":["../../src/lib/pipeline-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"pipeline-map.js","sourceRoot":"","sources":["../../src/lib/pipeline-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAA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