@encore-os/eos-spec 0.4.0 → 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.
Files changed (52) hide show
  1. package/dist/commands/audit.js +11 -3
  2. package/dist/commands/audit.js.map +1 -1
  3. package/dist/commands/complete.js +38 -13
  4. package/dist/commands/complete.js.map +1 -1
  5. package/dist/commands/conformance.js +27 -0
  6. package/dist/commands/conformance.js.map +1 -1
  7. package/dist/commands/next.d.ts +20 -4
  8. package/dist/commands/next.js +48 -13
  9. package/dist/commands/next.js.map +1 -1
  10. package/dist/commands/reconcile.d.ts +3 -10
  11. package/dist/commands/reconcile.js +6 -37
  12. package/dist/commands/reconcile.js.map +1 -1
  13. package/dist/commands/signoff.js +33 -5
  14. package/dist/commands/signoff.js.map +1 -1
  15. package/dist/index.d.ts +2 -1
  16. package/dist/index.js +14 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/lib/config.d.ts +0 -2
  19. package/dist/lib/config.js +0 -4
  20. package/dist/lib/config.js.map +1 -1
  21. package/dist/lib/embedding-store.d.ts +0 -2
  22. package/dist/lib/embedding-store.js +1 -1
  23. package/dist/lib/embedding-store.js.map +1 -1
  24. package/dist/lib/exec.d.ts +0 -2
  25. package/dist/lib/exec.js +1 -12
  26. package/dist/lib/exec.js.map +1 -1
  27. package/dist/lib/frontmatter.d.ts +5 -1
  28. package/dist/lib/frontmatter.js.map +1 -1
  29. package/dist/lib/next-action.d.ts +19 -2
  30. package/dist/lib/next-action.js +28 -6
  31. package/dist/lib/next-action.js.map +1 -1
  32. package/dist/lib/ollama-embed.d.ts +0 -9
  33. package/dist/lib/ollama-embed.js +0 -35
  34. package/dist/lib/ollama-embed.js.map +1 -1
  35. package/dist/lib/pipeline-config.js +40 -2
  36. package/dist/lib/pipeline-config.js.map +1 -1
  37. package/dist/lib/pipeline-map.d.ts +30 -0
  38. package/dist/lib/pipeline-map.js +86 -5
  39. package/dist/lib/pipeline-map.js.map +1 -1
  40. package/dist/lib/pipeline-schema.d.ts +25 -1
  41. package/dist/lib/pipeline-schema.js +3 -0
  42. package/dist/lib/pipeline-schema.js.map +1 -1
  43. package/dist/lib/predicate-registry.js +28 -1
  44. package/dist/lib/predicate-registry.js.map +1 -1
  45. package/dist/lib/reconcile-core.d.ts +26 -0
  46. package/dist/lib/reconcile-core.js +43 -0
  47. package/dist/lib/reconcile-core.js.map +1 -0
  48. package/dist/lib/spec-pure.js +44 -1
  49. package/dist/lib/spec-pure.js.map +1 -1
  50. package/dist/lib/specs.d.ts +17 -0
  51. package/dist/lib/specs.js.map +1 -1
  52. package/package.json +4 -4
@@ -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
- regulatedOnly: true,
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,qB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B;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"}
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;YA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S;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;
@@ -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
- regulatedOnly: true,
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.regulatedOnly && !spec.signals.isRegulated)
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.regulatedOnly && !spec.signals.isRegulated)
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 { STATUS_ORDER: order, PIPELINE: pipeline, rank: rankFn, computeStage: computeStageFn };
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;AAyB7D,MAAM,YAAY,GAAG;IACnB,MAAM;IACN,WAAW;IACX,WAAW;IACX,qBAAqB;IACrB,UAAU;IACV,qBAAqB;IACrB,aAAa;IACb,SAAS;IACT,iBAAiB;CAClB,CAAC;AAEF,yFAAyF;AACzF,MAAM,UAAU,IAAI,CAAC,MAAe;IAClC,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC,CAAC;IACvB,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AAED,8EAA8E;AAC9E,mE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AC,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC;AAEvH;;;;qFAIqF;AACrF,MAAM,UAAU,gBAAgB,CAAC,CAAa,EAAE,IAAc;IAC5D,IAAI,CAAC,oBAAoB,IAAI,CAAC,CAAC,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IACtC,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;qEAEqE;AACrE,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC9C,OAAO,kBAAkB,CAAC,gBAAiB,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -19,10 +19,24 @@ export type StageDef = {
19
19
  invocation: string;
20
20
  /** Human-readable reason shown when this is the next step. */
21
21
  reason: string;
22
- /** Only applies to regulated cores (cl/pm/hr/rh/gr). */
22
+ /** Only applies to regulated cores (cl/pm/hr/rh/gr). Shorthand for an
23
+ * applicability predicate keyed on `isRegulated`. */
23
24
  regulatedOnly?: boolean;
25
+ /** Name of a registry predicate that decides whether this stage applies to a
26
+ * given spec — the general form of `regulatedOnly`. When set, the stage is
27
+ * walked (and contributes to `computeStage`) ONLY for specs the predicate
28
+ * accepts, regardless of core. Used to widen the compliance gate beyond the
29
+ * regulated cores to PHI/PII-bearing specs (encore1 `complianceGating`, #1372)
30
+ * without hardcoding that logic into the engine — the builder layout, which has
31
+ * no compliance stage, never references it. Takes precedence over `regulatedOnly`. */
32
+ appliesWhen?: string;
24
33
  /** Advisory — surfaced as a hint but never blocks progression. */
25
34
  optional?: boolean;
35
+ /** Phase 1 parity gate: this stage participates in the navigator walk ONLY under
36
+ * `next --strict`. It carries no `completesStatus` (never moves computeStage), so
37
+ * default `next`/`computeStage`/`reconcile` are unaffected; under `--strict` it
38
+ * surfaces as a BLOCKING action when its gate is unmet. */
39
+ strictOnly?: boolean;
26
40
  /** The pipeline_status enum value this transition completes (for schema-coverage + reconciliation). */
27
41
  completesStatus?: string;
28
42
  };
@@ -41,6 +55,16 @@ export type PipelineSchema = {
41
55
  statusOrder: string[];
42
56
  stages: StageDef[];
43
57
  caps: CapDef[];
58
+ /** When true, the NAVIGATOR treats a not-done stage as satisfied if its
59
+ * `completesStatus` ranks strictly BELOW the spec's computed stage — i.e. a
60
+ * later stage's artifact already exists, so a missing earlier (soft) marker is
61
+ * superseded rather than re-surfaced. Models encoreos's #1593 behavior: a spec
62
+ * reviewed + compliance-signed + planned + tasked but missing the early
63
+ * `<!-- validated: -->` marker routes to the implement/complete tail, not back
64
+ * to validate-spec. `computeStage` is unaffected (it already reports the
65
+ * furthest-reached stage); only `recommendAction`'s walk honors this. Opt-in
66
+ * per layout — the builder layout omits it (default false) and is unchanged. */
67
+ supersedeSoftGates?: boolean;
44
68
  };
45
69
  /** Validate a {@link PipelineSchema} against its {@link PredicateRegistry}: every
46
70
  * stage gate and cap predicate must be registered, and every `completesStatus`/
@@ -6,6 +6,9 @@ export function validateSchema(schema, registry) {
6
6
  if (!registry[st.gate]) {
7
7
  throw new Error(`pipeline schema: unknown gate predicate '${st.gate}' for stage '${st.id}'`);
8
8
  }
9
+ if (st.appliesWhen && !registry[st.appliesWhen]) {
10
+ throw new Error(`pipeline schema: unknown appliesWhen predicate '${st.appliesWhen}' for stage '${st.id}'`);
11
+ }
9
12
  if (st.completesStatus && !schema.statusOrder.includes(st.completesStatus)) {
10
13
  throw new Error(`pipeline schema: stage '${st.id}' completesStatus '${st.completesStatus}' not in statusOrder`);
11
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline-schema.js","sourceRoot":"","sources":["../../src/lib/pipeline-schema.ts"],"names":[],"mappings":"AAmDA;;wEAEwE;AACxE,MAAM,UAAU,cAAc,CAAC,MAAsB,EAAE,QAA2B;IAChF,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,MAAM,EAAE,CAA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/F,CAAC;QACD,IAAI,EAAE,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CAAC,mDAAmD,EAAE,CAAC,WAAW,gBAAgB,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;QAC7G,CAAC;QACD,IAAI,EAAE,CAAC,eAAe,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;YAC3E,MAAM,IAAI,KAAK,CAAC,2BAA2B,EAAE,CAAC,EAAE,sBAAsB,EAAE,CAAC,eAAe,sBAAsB,CAAC,CAAC;QAClH,CAAC;IACH,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5E,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,kCAAkC,GAAG,CAAC,QAAQ,sBAAsB,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -11,8 +11,16 @@ export const DEFAULT_PREDICATES = {
11
11
  hasResearch: (s) => s.signals.hasResearch,
12
12
  // spec-review.
13
13
  hasSpecReview: (s) => s.signals.hasSpecReview,
14
- // compliance-review (regulatedOnly).
14
+ // compliance-review (gate predicate).
15
15
  hasComplianceSignoff: (s) => s.signals.hasComplianceSignoff,
16
+ // compliance-review APPLICABILITY (encore1 `appliesWhen`, #1372 PHI-widening):
17
+ // the compliance gate applies to regulated cores AND to PHI/PII/billing/
18
+ // credentialing-bearing specs in ANY core. Reuses the existing `isSensitive`
19
+ // signal (the engine's PHI-bearing detector) rather than a parallel
20
+ // `isPhiBearing`, so there is a single source of the compliance-gating
21
+ // condition. The builder layout has no compliance stage and never references
22
+ // this, so widening it here cannot affect builder.
23
+ complianceGating: (s) => s.signals.isRegulated || Boolean(s.signals.isSensitive),
16
24
  // draft-acs: done when there are no user stories, or ACs are drafted.
17
25
  acsDraftedOrNoStories: (s) => !s.signals.hasUserStories || s.signals.hasAcceptanceCriteria,
18
26
  // generate-tests: ACs absent, OR an active generated suite / verified ACs / linked local test exists (B5 + C1).
@@ -36,5 +44,24 @@ export const DEFAULT_PREDICATES = {
36
44
  hasTasks: (s) => s.hasTasks,
37
45
  // AC cap predicate (computeStage): caps below tasks_generated when ACs are absent.
38
46
  hasAcceptanceCriteria: (s) => s.signals.hasAcceptanceCriteria,
47
+ // ── Phase 1 parity gates (Finding A) — wired as strictOnly schema stages with NO
48
+ // completesStatus, so they NEVER move computeStage (the parity gate is over a
49
+ // fixture corpus that predates these signals). Each is SATISFIED-by-default and
50
+ // only fails once the genuinely-missing condition is present, so the bare CLI's
51
+ // default `next` is unchanged and only `next --strict` surfaces them as BLOCKING.
52
+ // research-before-review: research grounding must precede spec-review on the
53
+ // non-regulated path. Nothing to order until the spec is reviewed; once reviewed,
54
+ // a research appendix must exist. (Regulated cores already hard-order research via
55
+ // the regulatedOnly `ground-research` stage + the research honest-cap.)
56
+ hasResearchBeforeReview: (s) => !s.signals.hasSpecReview || s.signals.hasResearch,
57
+ // revalidate-after-review: spec-review auto-applies edits; the pipeline re-runs
58
+ // validate-spec to catch what they broke. Satisfied until the spec is reviewed;
59
+ // once reviewed, a `<!-- revalidated-after-review: -->` marker must be present.
60
+ hasReValidationAfterReview: (s) => !s.signals.hasSpecReview || Boolean(s.signals.hasReValidationAfterReview),
61
+ // compliance-for-sensitive: a spec carrying a PHI/PII/billing/credentialing signal
62
+ // (ANY core, not just regulated) needs a compliance sign-off. Non-sensitive specs
63
+ // pass. This ADDS the sensitive-non-regulated path; it does NOT replace the
64
+ // regulated-core `compliance-review` stage (which still gates on `hasComplianceSignoff`).
65
+ hasComplianceForSensitive: (s) => !s.signals.isSensitive || s.signals.hasComplianceSignoff,
39
66
  };
40
67
  //# sourceMappingURL=predicate-registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"predicate-registry.js","sourceRoot":"","sources":["../../src/lib/predicate-registry.ts"],"names":[],"mappings":"AAEA;;;sFAGsF;AACtF,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,kFAAkF;IAClF,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU;IAC/B,6CAA6C;IAC7C,oBAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,oBAAoB;IAC3D,+EAA+E;IAC/E,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW;IACzC,eAAe;IACf,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa;IAC7C,qCAAqC;IACrC,oBAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,oBAAoB;IAC3D,sEAAsE;IACtE,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,qBAAqB;IAC1F,gHAAgH;IAChH,sBAAsB,EAAE,CAAC,CAAC,EAAE,EAAE,CAC5B,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB;QAChC,CAAC,CAAC,OAAO,CAAC,uBAAuB;QACjC,CAAC,CAAC,OAAO,CAAC,6BAA6B;QACvC,CAAC,CAAC,OAAO,CAAC,kBAAkB;IAC9B,gFAAgF;IAChF,6EAA6E;IAC7E,+EAA+E;IAC/E,6DAA6D;IAC7D,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE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IAClF,mFAAmF;IACnF,wEAAwE;IACxE,uBAAuB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW;IAEjF,gFAAgF;IAChF,gFAAgF;IAChF,gFAAgF;IAChF,0BAA0B,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAE5G,mFAAmF;IACnF,kFAAkF;IAClF,4EAA4E;IAC5E,0FAA0F;IAC1F,yBAAyB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,OAAO,CAAC,oBAAoB;CAC3F,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { SpecFile } from './specs.js';
2
+ /**
3
+ * The per-spec reconcile core, extracted so the `reconcile` command AND the
4
+ * `signoff --reconcile` post-step share ONE implementation and cannot drift
5
+ * (Finding A item 4: `reconcile` was never auto-invoked, so `pipeline_status`
6
+ * silently lagged the artifacts a sign-off had just produced). fs-bound (reads +
7
+ * writes the spec markdown) — stays behind the package main entry, never `/pure`.
8
+ */
9
+ export type ReconcileDirection = 'ok' | 'lagging' | 'overstated';
10
+ /** Classify frontmatter status vs the artifact-derived stage. */
11
+ export declare function classify(written: string | undefined, computed: string | undefined): ReconcileDirection;
12
+ export type ReconcileRow = {
13
+ id: string;
14
+ core: string;
15
+ written?: string;
16
+ computed?: string;
17
+ direction: ReconcileDirection;
18
+ };
19
+ /**
20
+ * Recompute one spec's pipeline_status from its on-disk artifacts and, when
21
+ * `write` is set, surgically materialize the computed status (plus a healed
22
+ * `artifacts.tasks` pointer) into the spec frontmatter. Returns the divergence
23
+ * row regardless of whether anything was written. Mirrors the inner loop body of
24
+ * the `reconcile` command exactly (the command now delegates here).
25
+ */
26
+ export declare function reconcileSpec(repoRoot: string, spec: SpecFile, write: boolean): ReconcileRow;
@@ -0,0 +1,43 @@
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { isAbsolute, join } from 'node:path';
3
+ import { resolveTasksArtifact, setPipelineStatus, setTasksArtifact } from './frontmatter.js';
4
+ import { computeStage, rank } from './pipeline-map.js';
5
+ /** Classify frontmatter status vs the artifact-derived stage. */
6
+ export function classify(written, computed) {
7
+ if (written === computed)
8
+ return 'ok';
9
+ return rank(computed) > rank(written) ? 'lagging' : 'overstated';
10
+ }
11
+ /**
12
+ * Recompute one spec's pipeline_status from its on-disk artifacts and, when
13
+ * `write` is set, surgically materialize the computed status (plus a healed
14
+ * `artifacts.tasks` pointer) into the spec frontmatter. Returns the divergence
15
+ * row regardless of whether anything was written. Mirrors the inner loop body of
16
+ * the `reconcile` command exactly (the command now delegates here).
17
+ */
18
+ export function reconcileSpec(repoRoot, spec, write) {
19
+ const computed = computeStage(spec);
20
+ const written = spec.signals.pipelineStatus;
21
+ const direction = classify(written, computed);
22
+ if (write && computed) {
23
+ const original = readFileSync(spec.path, 'utf8');
24
+ let text = original;
25
+ if (direction !== 'ok')
26
+ text = setPipelineStatus(text, computed);
27
+ // Materialize artifacts.tasks alongside pipeline_status so a spec that reaches
28
+ // tasks_generated satisfies the pipeline-status validator (pipeline/missing-
29
+ // tasks-artifact) without hand-editing (#997 Bug 2). Non-destructive: a VALID
30
+ // existing pointer is preserved; only an absent or stale pointer is set to the
31
+ // canonical path, and only when that canonical file actually exists (#16).
32
+ if (spec.hasTasks) {
33
+ const fileExists = (rel) => existsSync(isAbsolute(rel) ? rel : join(repoRoot, rel));
34
+ const next = resolveTasksArtifact(text, `specs/${spec.core}/tasks/${spec.id}-TASKS.md`, fileExists);
35
+ if (next)
36
+ text = setTasksArtifact(text, next);
37
+ }
38
+ if (text !== original)
39
+ writeFileSync(spec.path, text, 'utf8');
40
+ }
41
+ return { id: spec.id, core: spec.core, written, computed, direction };
42
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AC9E,+EAA+E;QAC/E,2EAA2E;QAC3E,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;YAC5F,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,SAAS,IAAI,CAAC,IAAI,UAAU,IAAI,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;YACpG,IAAI,IAAI;gBAAE,IAAI,GAAG,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,IAAI,KAAK,QAAQ;YAAE,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AACxE,CAAC"}
@@ -20,6 +20,28 @@ import { acStatusCounts, allAcceptanceCriteriaTerminal } from './requirements.js
20
20
  export const REGULATED_CORES = new Set(['cl', 'pm', 'hr', 'rh', 'gr']);
21
21
  /** The marker the generator emits for an AC-less spec. */
22
22
  const GENERATED_NO_AC_MARKER = 'no acceptance_criteria — run encore-spec-ac-draft first';
23
+ /** Keywords that mark a spec as carrying sensitive data — PHI/PII/billing/
24
+ * credentialing. The `/spec-pipeline` step-3b compliance gate fires on these
25
+ * mentions in ANY core (not just the regulated `cl/pm/hr/rh/gr` set), so the
26
+ * engine must detect them to gate `hasComplianceForSensitive` at parity with the
27
+ * command prose. Matched at word boundaries, case-insensitively, over frontmatter
28
+ * + body. Kept to high-signal regime tokens so an incidental mention never trips
29
+ * it; a spec can also opt in explicitly via a `<!-- sensitive -->`/`<!-- sensitive: -->`
30
+ * marker or a `sensitive`/`phi`/`pii`/`billing`/`credentialing` tag. */
31
+ const SENSITIVE_KEYWORD_RE = /\b(PHI|PII|protected health information|personally identifiable information|billing|claims?|reimbursement|remittance advice|credentialing|payer enrollment|HIPAA|42 CFR Part 2)\b/i;
32
+ /** True when the spec text (frontmatter + body) signals sensitive data: a
33
+ * high-signal regime keyword, an explicit `<!-- sensitive -->` marker, or a
34
+ * `sensitive`/`phi`/`pii`/`billing`/`credentialing` tag. Pure (operates on the raw
35
+ * spec text + the parsed `tags` array). Independent of `isRegulated` — a non-
36
+ * regulated FA billing or PF credentialing spec is `isSensitive` without being a
37
+ * regulated core, which is exactly the parity gap Finding A item 2 names. */
38
+ function detectSensitive(text, tags) {
39
+ if (/<!--\s*sensitive\s*(?::[^>]*)?-->/i.test(text))
40
+ return true;
41
+ if (tags.some((t) => /^(sensitive|phi|pii|billing|credentialing)$/i.test(String(t).trim())))
42
+ return true;
43
+ return SENSITIVE_KEYWORD_RE.test(text);
44
+ }
23
45
  /** True when a generated test source has ≥1 ACTIVE `test(` block (not `test.fixme`/
24
46
  * `test.describe`) and is not an AC-less placeholder. Pure (operates on source text). */
25
47
  export function hasActiveGeneratedTestSource(source) {
@@ -41,6 +63,7 @@ export function deriveSignalsFromText(core, text, flags = {}) {
41
63
  const hasUserStoriesSection = /^#{1,3}\s+User Stories\b/im.test(text);
42
64
  const affectedFiles = Array.isArray(fm.affected_files) ? fm.affected_files.map(String) : [];
43
65
  const uiAffectedFiles = affectedFiles.some((f) => /\/(components|pages|wizards)\//.test(f) || f.endsWith('.tsx'));
66
+ const tags = Array.isArray(fm.tags) ? fm.tags.map(String) : [];
44
67
  return {
45
68
  isRegulated: REGULATED_CORES.has(core.toLowerCase()),
46
69
  pipelineStatus: typeof fm.pipeline_status === 'string' ? fm.pipeline_status : undefined,
@@ -60,11 +83,22 @@ export function deriveSignalsFromText(core, text, flags = {}) {
60
83
  hasDocshots: docshotImageExists || /-docs-shots\.spec\.ts/.test(text) || /<!--\s*docshots:/i.test(text),
61
84
  hasHealSignoff: /<!--\s*heal-verified:/i.test(text),
62
85
  hasUiGateWaiver: /<!--\s*ui-gate-waived:/i.test(text),
86
+ // PHI/PII/billing/credentialing signal — drives the `hasComplianceForSensitive`
87
+ // gate for NON-regulated cores too (Finding A item 2). Content-derived, so it
88
+ // needs no fs flag; stays in this pure helper.
89
+ isSensitive: detectSensitive(text, tags),
90
+ // Re-validation after spec-review (Finding A item 1): the `/spec-pipeline` step-5
91
+ // re-run of validate-spec, recorded as a `<!-- revalidated-after-review: <date> -->`
92
+ // marker parallel to the other sign-off markers.
93
+ hasReValidationAfterReview: /<!--\s*revalidated-after-review:/i.test(text),
63
94
  isCreateWizardSpec,
64
95
  hasSubmitE2e: submitE2eProvesPersist || /<!--\s*submit-e2e-waived:/i.test(text),
65
96
  blockedBy: collectSpecIds(fm.blocked_by),
66
97
  hasVerificationSection: /^#{1,3}\s+Verification\b/im.test(text),
67
98
  acStatus: acStatusCounts(fm.acceptance_criteria),
99
+ // WEB-51: a recorded demo-proof artifact pointer. Content-derived (no fs flag),
100
+ // so it stays in this pure helper alongside the other frontmatter signals.
101
+ hasProofArtifact: typeof fm.proof === 'string' && fm.proof.trim() !== '',
68
102
  };
69
103
  }
70
104
  // ── pure path classification (the fs-free half of specs.ts's directory walk) ──
@@ -112,7 +146,16 @@ function specBasename(path) {
112
146
  * (epic #300, Wave-1 G3).
113
147
  */
114
148
  export function extractSpecId(filename, core) {
115
- const re = new RegExp(`^(${escapeForRegExp(core)}(?:-[A-Z]{1,4})?-\\d+(?:\\.\\d+)?(?:-(?:EN-\\d+|E\\d+|P\\d+(?:\\.\\d+)?(?:-EN-\\d+)?))?)`, 'i');
149
+ // The enhancement suffix carries a trailing `(?![A-Za-z0-9])` boundary so the
150
+ // `E\d+` / `P\d+` alternatives only fire on a COMPLETE id segment, never the leading
151
+ // fragment of an ordinary slug word that happens to begin with `e`/`p`. Without it,
152
+ // `WEB-05-e2e-walking-skeleton` parsed as `WEB-05-e2` (the `E\d+` branch ate `-e2` of
153
+ // `e2e`), so the file counted in `listSpecs` but `findSpec`'s id-equality filter never
154
+ // matched it — the spec silently escaped every per-spec gate (issue #14). In every valid
155
+ // id the enhancement is followed by `-slug` or end-of-name, so the boundary is a no-op
156
+ // for real suffixes (`CE-03-E1`, `HR-09-P5`, `PM-15-P2-EN-01`, `LO-01-EN-1`) and only
157
+ // rejects the prefix-of-a-longer-alnum-run over-match.
158
+ const re = new RegExp(`^(${escapeForRegExp(core)}(?:-[A-Z]{1,4})?-\\d+(?:\\.\\d+)?(?:-(?:EN-\\d+|E\\d+|P\\d+(?:\\.\\d+)?(?:-EN-\\d+)?)(?![A-Za-z0-9]))?)`, 'i');
116
159
  const match = re.exec(specBasename(filename));
117
160
  return match ? match[1] : null;
118
161
  }