@principles/core 1.284.9 → 1.284.10

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 (93) hide show
  1. package/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js +18 -1
  2. package/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js.map +1 -1
  3. package/dist/runtime-v2/__tests__/internalization-state-machine.test.js +4 -0
  4. package/dist/runtime-v2/__tests__/internalization-state-machine.test.js.map +1 -1
  5. package/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js +3 -3
  6. package/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js.map +1 -1
  7. package/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  8. package/dist/runtime-v2/feature-flags/feature-flag-contract.js +10 -0
  9. package/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  10. package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  11. package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +8 -0
  12. package/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
  13. package/dist/runtime-v2/index.d.ts +1 -1
  14. package/dist/runtime-v2/index.d.ts.map +1 -1
  15. package/dist/runtime-v2/index.js +1 -1
  16. package/dist/runtime-v2/index.js.map +1 -1
  17. package/dist/runtime-v2/internalization/__tests__/a-liveness-reconciliation.test.js +2 -1
  18. package/dist/runtime-v2/internalization/__tests__/a-liveness-reconciliation.test.js.map +1 -1
  19. package/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js +109 -20
  20. package/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js.map +1 -1
  21. package/dist/runtime-v2/internalization/__tests__/intake-bridge-channel-admission.test.d.ts +2 -0
  22. package/dist/runtime-v2/internalization/__tests__/intake-bridge-channel-admission.test.d.ts.map +1 -0
  23. package/dist/runtime-v2/internalization/__tests__/intake-bridge-channel-admission.test.js +128 -0
  24. package/dist/runtime-v2/internalization/__tests__/intake-bridge-channel-admission.test.js.map +1 -0
  25. package/dist/runtime-v2/internalization/__tests__/internalization-transition-decision.test.js +2 -0
  26. package/dist/runtime-v2/internalization/__tests__/internalization-transition-decision.test.js.map +1 -1
  27. package/dist/runtime-v2/internalization/__tests__/mvp-core-loop-journeys.test.js +6 -0
  28. package/dist/runtime-v2/internalization/__tests__/mvp-core-loop-journeys.test.js.map +1 -1
  29. package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-principle-semantic.test.d.ts +2 -0
  30. package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-principle-semantic.test.d.ts.map +1 -0
  31. package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-principle-semantic.test.js +328 -0
  32. package/dist/runtime-v2/internalization/__tests__/rollout-reviewer-principle-semantic.test.js.map +1 -0
  33. package/dist/runtime-v2/internalization/__tests__/verdict-drift-regressions.test.js +2 -1
  34. package/dist/runtime-v2/internalization/__tests__/verdict-drift-regressions.test.js.map +1 -1
  35. package/dist/runtime-v2/internalization/evaluator-runner.d.ts +3 -1
  36. package/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
  37. package/dist/runtime-v2/internalization/evaluator-runner.js +3 -0
  38. package/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
  39. package/dist/runtime-v2/internalization/index.d.ts +1 -1
  40. package/dist/runtime-v2/internalization/index.d.ts.map +1 -1
  41. package/dist/runtime-v2/internalization/index.js +1 -1
  42. package/dist/runtime-v2/internalization/index.js.map +1 -1
  43. package/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts +44 -1
  44. package/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts.map +1 -1
  45. package/dist/runtime-v2/internalization/intake-to-internalization-bridge.js +104 -9
  46. package/dist/runtime-v2/internalization/intake-to-internalization-bridge.js.map +1 -1
  47. package/dist/runtime-v2/internalization/internalization-job-graph.d.ts +49 -10
  48. package/dist/runtime-v2/internalization/internalization-job-graph.d.ts.map +1 -1
  49. package/dist/runtime-v2/internalization/internalization-job-graph.js +71 -13
  50. package/dist/runtime-v2/internalization/internalization-job-graph.js.map +1 -1
  51. package/dist/runtime-v2/internalization/internalization-orchestrator.d.ts.map +1 -1
  52. package/dist/runtime-v2/internalization/internalization-orchestrator.js +1 -0
  53. package/dist/runtime-v2/internalization/internalization-orchestrator.js.map +1 -1
  54. package/dist/runtime-v2/internalization/internalization-state-machine.d.ts +13 -10
  55. package/dist/runtime-v2/internalization/internalization-state-machine.d.ts.map +1 -1
  56. package/dist/runtime-v2/internalization/internalization-state-machine.js +20 -15
  57. package/dist/runtime-v2/internalization/internalization-state-machine.js.map +1 -1
  58. package/dist/runtime-v2/internalization/peer-runner-contracts.d.ts +24 -0
  59. package/dist/runtime-v2/internalization/peer-runner-contracts.d.ts.map +1 -1
  60. package/dist/runtime-v2/internalization/peer-runner-contracts.js +17 -0
  61. package/dist/runtime-v2/internalization/peer-runner-contracts.js.map +1 -1
  62. package/dist/runtime-v2/internalization/pitask-metadata.d.ts +8 -1
  63. package/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -1
  64. package/dist/runtime-v2/internalization/pitask-metadata.js +10 -1
  65. package/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -1
  66. package/dist/runtime-v2/internalization/revision-reopen.d.ts +2 -1
  67. package/dist/runtime-v2/internalization/revision-reopen.d.ts.map +1 -1
  68. package/dist/runtime-v2/internalization/revision-reopen.js +14 -2
  69. package/dist/runtime-v2/internalization/revision-reopen.js.map +1 -1
  70. package/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts +32 -7
  71. package/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts.map +1 -1
  72. package/dist/runtime-v2/internalization/rollout-reviewer-output.js +58 -16
  73. package/dist/runtime-v2/internalization/rollout-reviewer-output.js.map +1 -1
  74. package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts +29 -4
  75. package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -1
  76. package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js +80 -0
  77. package/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js.map +1 -1
  78. package/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts +43 -9
  79. package/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts.map +1 -1
  80. package/dist/runtime-v2/internalization/rollout-reviewer-runner.js +213 -51
  81. package/dist/runtime-v2/internalization/rollout-reviewer-runner.js.map +1 -1
  82. package/dist/runtime-v2/pain-signal-bridge.d.ts +9 -0
  83. package/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
  84. package/dist/runtime-v2/pain-signal-bridge.js +23 -4
  85. package/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
  86. package/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
  87. package/dist/runtime-v2/pain-signal-runtime-factory.js +15 -3
  88. package/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
  89. package/dist/telemetry-event.d.ts +2 -2
  90. package/dist/telemetry-event.d.ts.map +1 -1
  91. package/dist/telemetry-event.js +6 -0
  92. package/dist/telemetry-event.js.map +1 -1
  93. package/package.json +1 -1
@@ -8,7 +8,15 @@ export interface RolloutReviewerReview {
8
8
  readonly safetyChecks: readonly string[];
9
9
  }
10
10
  export interface RolloutReviewerSourceTrace {
11
- readonly evaluatorArtifactId: string;
11
+ /**
12
+ * Code-chain reviews only (PRI-720): the reviewed evaluator artifact.
13
+ * Optional at the schema/contract level — which trace id is REQUIRED is
14
+ * enforced per review mode by DefaultRolloutReviewerValidator (code_chain
15
+ * ⇔ evaluatorArtifactId, principle_semantic ⇔ scribeArtifactId), so the
16
+ * real LLM output path (tool-call/JSON-mode validation against the
17
+ * registered `rollout-reviewer-output-v1` schema) accepts both modes.
18
+ */
19
+ readonly evaluatorArtifactId?: string;
12
20
  readonly artificerArtifactId?: string;
13
21
  readonly scribeArtifactId?: string;
14
22
  readonly philosopherArtifactId?: string;
@@ -16,12 +24,22 @@ export interface RolloutReviewerSourceTrace {
16
24
  }
17
25
  export interface RolloutReviewerOutputV1 {
18
26
  readonly taskId: string;
19
- readonly sourceEvaluatorArtifactId: string;
27
+ /** Code-chain reviews: the reviewed evaluator artifact (validator-enforced). */
28
+ readonly sourceEvaluatorArtifactId?: string;
29
+ /**
30
+ * PRI-720 principle semantic mode: the reviewed source is the SCRIBE
31
+ * principle artifact. Required (and validated against the runner-owned
32
+ * authority) when the review runs in principle semantic mode; absent on
33
+ * code-chain reviews.
34
+ */
35
+ readonly sourceScribeArtifactId?: string;
20
36
  readonly review: RolloutReviewerReview;
21
37
  readonly sourceTrace: RolloutReviewerSourceTrace;
22
38
  readonly risks: readonly string[];
23
39
  readonly generatedAt: string;
24
40
  }
41
+ /** PRI-720: which contract the rollout review runs under. */
42
+ export type RolloutReviewMode = 'principle_semantic' | 'code_chain';
25
43
  export declare const ROLLOUT_REVIEWER_DECISIONS: readonly ['approve_rollout', 'needs_revision', 'reject'];
26
44
  export declare const RolloutReviewerReviewSchema: import("@sinclair/typebox").TObject<{
27
45
  decision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"approve_rollout">, import("@sinclair/typebox").TLiteral<"needs_revision">, import("@sinclair/typebox").TLiteral<"reject">]>;
@@ -32,7 +50,7 @@ export declare const RolloutReviewerReviewSchema: import("@sinclair/typebox").TO
32
50
  safetyChecks: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
33
51
  }>;
34
52
  export declare const RolloutReviewerSourceTraceSchema: import("@sinclair/typebox").TObject<{
35
- evaluatorArtifactId: import("@sinclair/typebox").TString;
53
+ evaluatorArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
36
54
  artificerArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
37
55
  scribeArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
38
56
  philosopherArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -40,7 +58,8 @@ export declare const RolloutReviewerSourceTraceSchema: import("@sinclair/typebox
40
58
  }>;
41
59
  export declare const RolloutReviewerOutputV1Schema: import("@sinclair/typebox").TObject<{
42
60
  taskId: import("@sinclair/typebox").TString;
43
- sourceEvaluatorArtifactId: import("@sinclair/typebox").TString;
61
+ sourceEvaluatorArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
62
+ sourceScribeArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
44
63
  review: import("@sinclair/typebox").TObject<{
45
64
  decision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"approve_rollout">, import("@sinclair/typebox").TLiteral<"needs_revision">, import("@sinclair/typebox").TLiteral<"reject">]>;
46
65
  summary: import("@sinclair/typebox").TString;
@@ -50,7 +69,7 @@ export declare const RolloutReviewerOutputV1Schema: import("@sinclair/typebox").
50
69
  safetyChecks: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
51
70
  }>;
52
71
  sourceTrace: import("@sinclair/typebox").TObject<{
53
- evaluatorArtifactId: import("@sinclair/typebox").TString;
72
+ evaluatorArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
54
73
  artificerArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
55
74
  scribeArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
56
75
  philosopherArtifactId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -65,10 +84,16 @@ export interface RolloutReviewerValidationResult {
65
84
  readonly errors: readonly string[];
66
85
  readonly errorCategory?: string;
67
86
  }
87
+ export interface RolloutReviewerValidatorOptions {
88
+ /** Runner-owned source artifact id the output must echo exactly (rc-6). */
89
+ expectedSourceArtifactId?: string;
90
+ /** PRI-720: review contract mode; defaults to the legacy code_chain. */
91
+ reviewMode?: RolloutReviewMode;
92
+ }
68
93
  export interface RolloutReviewerValidator {
69
- validate(output: RolloutReviewerOutputV1, taskId: string, expectedSourceEvaluatorArtifactId?: string): Promise<RolloutReviewerValidationResult>;
94
+ validate(output: RolloutReviewerOutputV1, taskId: string, options?: RolloutReviewerValidatorOptions): Promise<RolloutReviewerValidationResult>;
70
95
  }
71
96
  export declare class DefaultRolloutReviewerValidator implements RolloutReviewerValidator {
72
- validate(output: RolloutReviewerOutputV1, taskId: string, expectedSourceEvaluatorArtifactId?: string): Promise<RolloutReviewerValidationResult>;
97
+ validate(output: RolloutReviewerOutputV1, taskId: string, options?: RolloutReviewerValidatorOptions): Promise<RolloutReviewerValidationResult>;
73
98
  }
74
99
  //# sourceMappingURL=rollout-reviewer-output.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rollout-reviewer-output.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC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AM,iBAAiB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAQpE,eAAO,MAAM,0BAA0B,YAAI,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,CAAU,CAAC;AAEnG,eAAO,MAAM,2BAA2B;;;;;;;EAWtC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;EAY3C,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;EAYxC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAErF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,+BAA+B;IAC9C,2EAA2E;IAC3E,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,wEAAwE;IACxE,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CACN,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC7C;AAED,qBAAa,+BAAgC,YAAW,wBAAwB;IAExE,QAAQ,CACZ,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,+BAA+B,CAAC,CAsG1C;CACF"}
@@ -1,4 +1,10 @@
1
1
  import { Type } from '@sinclair/typebox';
2
+ /** Reads one field off an untrusted record without `as` casts (rc-1/rc-2). */
3
+ function readTraceField(source, field) {
4
+ if (typeof source !== 'object' || source === null)
5
+ return undefined;
6
+ return Reflect.get(source, field);
7
+ }
2
8
  export const ROLLOUT_REVIEWER_DECISIONS = ['approve_rollout', 'needs_revision', 'reject'];
3
9
  export const RolloutReviewerReviewSchema = Type.Object({
4
10
  decision: Type.Union([
@@ -13,7 +19,13 @@ export const RolloutReviewerReviewSchema = Type.Object({
13
19
  safetyChecks: Type.Array(Type.String()),
14
20
  });
15
21
  export const RolloutReviewerSourceTraceSchema = Type.Object({
16
- evaluatorArtifactId: Type.String({ minLength: 1 }),
22
+ // PRI-720 P1 fix: optional here — the mode-aware DefaultRolloutReviewerValidator
23
+ // is the single authority for which trace id is required (evaluatorArtifactId
24
+ // on code_chain, scribeArtifactId on principle_semantic). A required entry in
25
+ // this schema made the registered `rollout-reviewer-output-v1` structured
26
+ // output gate reject every valid principle-semantic LLM output before the
27
+ // runner validator ever ran.
28
+ evaluatorArtifactId: Type.Optional(Type.String({ minLength: 1 })),
17
29
  artificerArtifactId: Type.Optional(Type.String()),
18
30
  scribeArtifactId: Type.Optional(Type.String()),
19
31
  philosopherArtifactId: Type.Optional(Type.String()),
@@ -21,7 +33,12 @@ export const RolloutReviewerSourceTraceSchema = Type.Object({
21
33
  });
22
34
  export const RolloutReviewerOutputV1Schema = Type.Object({
23
35
  taskId: Type.String({ minLength: 1 }),
24
- sourceEvaluatorArtifactId: Type.String({ minLength: 1 }),
36
+ // PRI-720: per-mode presence is enforced by DefaultRolloutReviewerValidator
37
+ // (code_chain requires sourceEvaluatorArtifactId, principle_semantic requires
38
+ // sourceScribeArtifactId) — the schema keeps both optional so one output
39
+ // contract serves both review modes.
40
+ sourceEvaluatorArtifactId: Type.Optional(Type.String({ minLength: 1 })),
41
+ sourceScribeArtifactId: Type.Optional(Type.String({ minLength: 1 })),
25
42
  review: RolloutReviewerReviewSchema,
26
43
  sourceTrace: RolloutReviewerSourceTraceSchema,
27
44
  risks: Type.Array(Type.String()),
@@ -29,7 +46,7 @@ export const RolloutReviewerOutputV1Schema = Type.Object({
29
46
  });
30
47
  export class DefaultRolloutReviewerValidator {
31
48
  // eslint-disable-next-line @typescript-eslint/class-methods-use-this
32
- async validate(output, taskId, expectedSourceEvaluatorArtifactId) {
49
+ async validate(output, taskId, options) {
33
50
  const errors = [];
34
51
  if (typeof output !== 'object' || output === null) {
35
52
  return { valid: false, errors: ['Output is not an object'], errorCategory: 'output_invalid' };
@@ -37,11 +54,21 @@ export class DefaultRolloutReviewerValidator {
37
54
  if (output.taskId !== taskId) {
38
55
  errors.push(`taskId mismatch: expected ${taskId}, got ${String(output.taskId)}`);
39
56
  }
40
- if (typeof output.sourceEvaluatorArtifactId !== 'string' || output.sourceEvaluatorArtifactId.trim() === '') {
41
- errors.push('sourceEvaluatorArtifactId must be non-empty string');
57
+ const expectedSourceArtifactId = options?.expectedSourceArtifactId;
58
+ const reviewMode = options?.reviewMode ?? 'code_chain';
59
+ // PRI-720: the lineage field under review depends on the review mode —
60
+ // code_chain reviews the evaluator artifact; principle_semantic reviews
61
+ // the exact SCRIBE principle artifact (reviewed = validated = approved =
62
+ // activated identity).
63
+ const sourceField = reviewMode === 'principle_semantic' ? 'sourceScribeArtifactId' : 'sourceEvaluatorArtifactId';
64
+ const traceField = reviewMode === 'principle_semantic' ? 'scribeArtifactId' : 'evaluatorArtifactId';
65
+ const sourceValue = reviewMode === 'principle_semantic' ? output.sourceScribeArtifactId : output.sourceEvaluatorArtifactId;
66
+ const traceValue = readTraceField(output.sourceTrace, traceField);
67
+ if (typeof sourceValue !== 'string' || sourceValue.trim() === '') {
68
+ errors.push(`${sourceField} must be non-empty string (${reviewMode} review)`);
42
69
  }
43
- else if (expectedSourceEvaluatorArtifactId && output.sourceEvaluatorArtifactId !== expectedSourceEvaluatorArtifactId) {
44
- errors.push(`sourceEvaluatorArtifactId mismatch: expected ${expectedSourceEvaluatorArtifactId}, got ${output.sourceEvaluatorArtifactId}`);
70
+ else if (expectedSourceArtifactId && sourceValue !== expectedSourceArtifactId) {
71
+ errors.push(`${sourceField} mismatch: expected ${expectedSourceArtifactId}, got ${sourceValue}`);
45
72
  }
46
73
  if (typeof output.review !== 'object' || output.review === null) {
47
74
  errors.push('review must be an object');
@@ -75,11 +102,24 @@ export class DefaultRolloutReviewerValidator {
75
102
  }
76
103
  else {
77
104
  const st = output.sourceTrace;
78
- if (typeof st.evaluatorArtifactId !== 'string' || (st.evaluatorArtifactId).trim() === '') {
79
- errors.push('sourceTrace.evaluatorArtifactId must be non-empty string');
105
+ if (reviewMode === 'code_chain') {
106
+ if (typeof st.evaluatorArtifactId !== 'string' || (st.evaluatorArtifactId).trim() === '') {
107
+ errors.push('sourceTrace.evaluatorArtifactId must be non-empty string');
108
+ }
109
+ else if (expectedSourceArtifactId && st.evaluatorArtifactId !== expectedSourceArtifactId) {
110
+ errors.push(`sourceTrace.evaluatorArtifactId mismatch: expected ${expectedSourceArtifactId}, got ${st.evaluatorArtifactId}`);
111
+ }
80
112
  }
81
- else if (expectedSourceEvaluatorArtifactId && st.evaluatorArtifactId !== expectedSourceEvaluatorArtifactId) {
82
- errors.push(`sourceTrace.evaluatorArtifactId mismatch: expected ${expectedSourceEvaluatorArtifactId}, got ${st.evaluatorArtifactId}`);
113
+ else {
114
+ if (typeof st.scribeArtifactId !== 'string' || (st.scribeArtifactId).trim() === '') {
115
+ errors.push('sourceTrace.scribeArtifactId must be non-empty string (principle semantic review)');
116
+ }
117
+ else if (expectedSourceArtifactId && st.scribeArtifactId !== expectedSourceArtifactId) {
118
+ errors.push(`sourceTrace.scribeArtifactId mismatch: expected ${expectedSourceArtifactId}, got ${st.scribeArtifactId}`);
119
+ }
120
+ if (st.evaluatorArtifactId !== undefined && typeof st.evaluatorArtifactId !== 'string') {
121
+ errors.push('sourceTrace.evaluatorArtifactId must be string if present');
122
+ }
83
123
  }
84
124
  if (st.artificerArtifactId !== undefined && typeof st.artificerArtifactId !== 'string') {
85
125
  errors.push('sourceTrace.artificerArtifactId must be string if present');
@@ -100,11 +140,13 @@ export class DefaultRolloutReviewerValidator {
100
140
  else if (!output.risks.every(e => typeof e === 'string')) {
101
141
  errors.push('risks must be an array of strings');
102
142
  }
103
- if (typeof output.sourceEvaluatorArtifactId === 'string' && output.sourceEvaluatorArtifactId.trim() !== ''
104
- && typeof output.sourceTrace === 'object' && output.sourceTrace !== null
105
- && typeof output.sourceTrace.evaluatorArtifactId === 'string'
106
- && output.sourceEvaluatorArtifactId !== output.sourceTrace.evaluatorArtifactId) {
107
- errors.push('sourceEvaluatorArtifactId and sourceTrace.evaluatorArtifactId must match');
143
+ if (typeof sourceValue === 'string' && sourceValue.trim() !== '' && traceValue !== undefined) {
144
+ if (typeof traceValue !== 'string' || traceValue.trim() === '') {
145
+ errors.push(`sourceTrace.${traceField} must be non-empty string when present`);
146
+ }
147
+ else if (sourceValue !== traceValue) {
148
+ errors.push(`${sourceField} and sourceTrace.${traceField} must match`);
149
+ }
108
150
  }
109
151
  if (typeof output.generatedAt !== 'string' || output.generatedAt.trim() === '') {
110
152
  errors.push('generatedAt must be non-empty string');
@@ -1 +1 @@
1
- {"version":3,"file":"rollout-reviewer-output.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AA4BtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,QAAQ,CAAU,CAAC;AAEnG,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAC9B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;KACvB,CAAC;IACF,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACtC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,C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,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAClC,CAAC;CACF"}
@@ -2,8 +2,15 @@ import type { OutputLanguage } from '../language-directive.js';
2
2
  export interface RolloutReviewerPromptBuilderInput {
3
3
  taskId: string;
4
4
  contextHash: string;
5
- sourceEvaluatorArtifactId: string;
6
- evaluatorArtifact: unknown;
5
+ /** Code-chain review source (PRI-720: required in code_chain mode). */
6
+ sourceEvaluatorArtifactId?: string;
7
+ evaluatorArtifact?: unknown;
8
+ /** PRI-720: defaults to the legacy code_chain review. */
9
+ reviewMode?: 'principle_semantic' | 'code_chain';
10
+ /** Principle semantic review source — the exact scribe principle artifact id. */
11
+ sourceScribeArtifactId?: string;
12
+ /** Principle semantic review payload: scribe artifact contentJson (parsed). */
13
+ scribeArtifact?: unknown;
7
14
  /**
8
15
  * Owner's preferred language for review fields (PRI-714). When provided,
9
16
  * the rollout reviewer instruction carries a language directive so summary /
@@ -15,8 +22,11 @@ export interface RolloutReviewerPromptBuilderInput {
15
22
  export interface RolloutReviewerPromptInput {
16
23
  taskId: string;
17
24
  contextHash: string;
18
- sourceEvaluatorArtifactId: string;
19
- evaluatorArtifact: unknown;
25
+ reviewMode?: 'principle_semantic' | 'code_chain';
26
+ sourceEvaluatorArtifactId?: string;
27
+ evaluatorArtifact?: unknown;
28
+ sourceScribeArtifactId?: string;
29
+ scribeArtifact?: unknown;
20
30
  promptContractVersion: string;
21
31
  }
22
32
  export interface RolloutReviewerPromptBuildResult {
@@ -31,6 +41,21 @@ export interface RolloutReviewerPromptBuildResult {
31
41
  }
32
42
  export declare const ROLLOUT_REVIEWER_PROTOCOL_INSTRUCTION = "You are a Rollout Reviewer agent in a principle internalization pipeline. Your role is to review the Evaluator's assessment and produce a rollout review decision with safety checks and risk analysis.\n\nPROTOCOL:\n1. Review the evaluatorArtifact to understand the evaluation decision, score, and feedback\n2. Assess whether the evaluated plan is safe to proceed with rollout\n3. Produce a decision: approve_rollout (safe to proceed), needs_revision (issues found but salvageable), or reject (fundamental safety or quality concerns)\n4. Provide a confidence score from 0.0 to 1.0 reflecting your assessment certainty\n5. List specific required changes if any\n6. Identify rollout-specific risks\n7. List safety checks that should be performed before/during rollout\n8. Preserve the lineage trace from evaluator, artificer, scribe, philosopher, and dreamer artifacts\n9. Identify risks associated with this review\n\nCRITICAL: Your ENTIRE response must be ONLY the JSON object below. Do NOT include any text before or after the JSON. Do NOT wrap the JSON in markdown code fences. Do NOT add explanatory prose. Output the raw JSON object and nothing else.\n\nCOMPLETE EXAMPLE OUTPUT (follow this exact structure):\n{\"taskId\":\"task-123\",\"sourceEvaluatorArtifactId\":\"pi-art-evaluator-001\",\"review\":{\"decision\":\"approve_rollout\",\"summary\":\"The evaluation is thorough and the plan is safe to proceed with rollout.\",\"confidence\":0.9,\"requiredChanges\":[],\"rolloutRisks\":[\"Feature flag configuration may need adjustment\"],\"safetyChecks\":[\"Verify feature flag is properly configured\",\"Monitor error rates for 24h post-deploy\"]},\"sourceTrace\":{\"evaluatorArtifactId\":\"pi-art-evaluator-001\"},\"risks\":[\"Rollback plan should be tested before deployment\"],\"generatedAt\":\"<current ISO-8601 timestamp>\"}\n\nCONSTRAINTS:\n- Output ONLY valid JSON \u2014 no markdown, no explanatory text, no code fences, no prose before or after\n- review.decision MUST be one of: approve_rollout, needs_revision, reject\n- review.summary MUST be a non-empty string\n- review.confidence MUST be a number between 0.0 and 1.0 (NOT a string, NOT a percentage)\n- review.requiredChanges MUST be an array of strings (can be empty)\n- review.rolloutRisks MUST be an array of strings (can be empty)\n- review.safetyChecks MUST be an array of strings (can be empty)\n- sourceEvaluatorArtifactId MUST be copied exactly from input.sourceEvaluatorArtifactId (non-empty string)\n- sourceTrace.evaluatorArtifactId MUST be copied exactly from input.sourceEvaluatorArtifactId\n- sourceTrace.artificerArtifactId is optional \u2014 include only if available from evaluator artifact\n- sourceTrace.scribeArtifactId is optional \u2014 include only if available from evaluator artifact\n- sourceTrace.philosopherArtifactId is optional \u2014 include only if available from evaluator artifact\n- sourceTrace.dreamerArtifactId is optional \u2014 include only if available from evaluator artifact\n- risks MUST be an array of strings (can be empty if no risks identified)\n- generatedAt MUST be the current ISO-8601 timestamp (use the actual current time, NOT a placeholder)\n";
33
43
  export declare const ROLLOUT_REVIEWER_PROMPT_CONTRACT_VERSION = "rollout-reviewer-output-v1.prompt.v1";
44
+ /**
45
+ * PRI-720 principle semantic mode (prompt/defer_archive standard topology):
46
+ * the review source is the SCRIBE principle artifact (principleDraft +
47
+ * intentContract + diagnosis evidence), NOT an evaluator/code contract.
48
+ * Governance exam split per PRI-720 SPEC:
49
+ * 审: causal fidelity to the pain/diagnosis, Owner-intent anchoring
50
+ * (intentContract), executability, scope honesty, over-generalization /
51
+ * negative-control risk.
52
+ * 不审: implementationCode, goldenTraceCases, affectedTools, sandbox
53
+ * bypass, RuleContext code behavior — the RuleCode contract does not
54
+ * exist on this channel.
55
+ * The reviewer ONLY judges; it never authors a second principle text.
56
+ */
57
+ export declare const ROLLOUT_REVIEWER_PRINCIPLE_SEMANTIC_INSTRUCTION = "You are a Rollout Reviewer agent running in PRINCIPLE SEMANTIC mode of a principle internalization pipeline (PRI-720). The candidate under review is a cognitive behavioral PRINCIPLE authored by the Scribe \u2014 not code, not a rule. No evaluator ran on this channel by design.\n\nREVIEW SCOPE (what you judge):\n1. Causal fidelity: does the principle faithfully reflect the pain/diagnosis evidence provided? Does it address the actual root cause?\n2. Owner intent consistency: does the principle honor the intentContract (targetBehavior / forbiddenBehavior) and the Owner's expressed intent?\n3. Executability: can an agent realistically follow this principle in future sessions? Is it observable in behavior?\n4. Scope honesty: are the applicability conditions and antiPatterns explicit and honest about boundaries?\n5. Over-generalization / negative-control risk: could this principle over-constrain legitimate behavior? Would it misfire on cases outside its evidence?\n\nDO NOT REVIEW (out of scope for this mode \u2014 these fields do not exist on this channel):\n- implementationCode, evaluate() functions, goldenTraceCases\n- affectedTools catalogs, sandbox behavior, RuleContext code semantics\n- evaluator scoring (no evaluator ran)\n\nHARD RULES:\n- You ONLY judge. NEVER author, rewrite, or append a second version of the principle text.\n- The reviewed source is the exact Scribe principle artifact \u2014 echo its id verbatim.\n\nPROTOCOL:\n1. Read the scribeArtifact (principleDraft: title/statement/rationale/applicability/antiPatterns, optional intentContract) and the diagnosis evidence summary.\n2. Judge it against the REVIEW SCOPE above.\n3. Produce a decision: approve_rollout (safe to activate as agent context), needs_revision (semantic issues the Scribe must fix), or reject (fundamental misalignment with evidence/Owner intent).\n4. Provide a confidence score from 0.0 to 1.0.\n5. needs_revision: requiredChanges MUST name concrete semantic fixes for the Scribe (never code changes).\n6. List rollout-specific risks and pre/during-rollout safety checks.\n\nCRITICAL: Your ENTIRE response must be ONLY the JSON object below. Do NOT include any text before or after the JSON. Do NOT wrap the JSON in markdown code fences. Do NOT add explanatory prose. Output the raw JSON object and nothing else.\n\nCOMPLETE EXAMPLE OUTPUT (follow this exact structure):\n{\"taskId\":\"task-123\",\"sourceScribeArtifactId\":\"pi-art-scribe-001\",\"review\":{\"decision\":\"approve_rollout\",\"summary\":\"The principle faithfully captures the diagnosed failure and is safely scoped.\",\"confidence\":0.88,\"requiredChanges\":[],\"rolloutRisks\":[\"May trigger on adjacent shell tooling beyond the original evidence\"],\"safetyChecks\":[\"Observe first activations for over-blocking\",\"Owner can deactivate via Console if over-constraining\"]},\"sourceTrace\":{\"scribeArtifactId\":\"pi-art-scribe-001\"},\"risks\":[\"Principle is derived from a single evidence session\"],\"generatedAt\":\"<current ISO-8601 timestamp>\"}\n\nCONSTRAINTS:\n- Output ONLY valid JSON \u2014 no markdown, no explanatory text, no code fences, no prose before or after\n- review.decision MUST be one of: approve_rollout, needs_revision, reject\n- review.summary MUST be a non-empty string\n- review.confidence MUST be a number between 0.0 and 1.0 (NOT a string, NOT a percentage)\n- review.requiredChanges MUST be an array of strings (can be empty)\n- review.rolloutRisks MUST be an array of strings (can be empty)\n- review.safetyChecks MUST be an array of strings (can be empty)\n- sourceScribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId (non-empty string)\n- sourceTrace.scribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId\n- sourceTrace.evaluatorArtifactId / sourceTrace.artificerArtifactId MUST be OMITTED \u2014 no evaluator or artificer exists on this channel\n- sourceTrace.philosopherArtifactId / sourceTrace.dreamerArtifactId are optional \u2014 include only if available from the scribe artifact lineage\n- risks MUST be an array of strings (can be empty if no risks identified)\n- generatedAt MUST be the current ISO-8601 timestamp (use the actual current time, NOT a placeholder)\n";
58
+ export declare const ROLLOUT_REVIEWER_PRINCIPLE_SEMANTIC_CONTRACT_VERSION = "rollout-reviewer-output-v1.prompt.v1.principle-semantic";
34
59
  export declare class RolloutReviewerPromptBuilder {
35
60
  buildPrompt(input: RolloutReviewerPromptBuilderInput): RolloutReviewerPromptBuildResult;
36
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rollout-reviewer-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,qCAAqC,+lGAkCjD,CAAC;AAEF,eAAO,MAAM,wCAAwC,yCAAyC,CAAC;AAE/F,qBAAa,4BAA4B;IAEvC,WAAW,CAAC,KAAK,EAAE,iCAAiC,GAAG,gCAAgC,CAmBtF;CACF"}
1
+ {"version":3,"file":"rollout-reviewer-prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yDAAyD;IACzD,UAAU,CAAC,EAAE,oBAAoB,GAAG,YAAY,CAAC;IACjD,iFAAiF;IACjF,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,GAAG,YAAY,CAAC;IACjD,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,qCAAqC,+lGAkCjD,CAAC;AAEF,eAAO,MAAM,wCAAwC,yCAAyC,CAAC;AAE/F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+CAA+C,soIA6C3D,CAAC;AAEF,eAAO,MAAM,oDAAoD,4DAA4D,CAAC;AAE9H,qBAAa,4BAA4B;IAEvC,WAAW,CAAC,KAAK,EAAE,iCAAiC,GAAG,gCAAgC,CAyCtF;CACF"}
@@ -35,6 +35,66 @@ CONSTRAINTS:
35
35
  - generatedAt MUST be the current ISO-8601 timestamp (use the actual current time, NOT a placeholder)
36
36
  `;
37
37
  export const ROLLOUT_REVIEWER_PROMPT_CONTRACT_VERSION = 'rollout-reviewer-output-v1.prompt.v1';
38
+ /**
39
+ * PRI-720 principle semantic mode (prompt/defer_archive standard topology):
40
+ * the review source is the SCRIBE principle artifact (principleDraft +
41
+ * intentContract + diagnosis evidence), NOT an evaluator/code contract.
42
+ * Governance exam split per PRI-720 SPEC:
43
+ * 审: causal fidelity to the pain/diagnosis, Owner-intent anchoring
44
+ * (intentContract), executability, scope honesty, over-generalization /
45
+ * negative-control risk.
46
+ * 不审: implementationCode, goldenTraceCases, affectedTools, sandbox
47
+ * bypass, RuleContext code behavior — the RuleCode contract does not
48
+ * exist on this channel.
49
+ * The reviewer ONLY judges; it never authors a second principle text.
50
+ */
51
+ export const ROLLOUT_REVIEWER_PRINCIPLE_SEMANTIC_INSTRUCTION = `You are a Rollout Reviewer agent running in PRINCIPLE SEMANTIC mode of a principle internalization pipeline (PRI-720). The candidate under review is a cognitive behavioral PRINCIPLE authored by the Scribe — not code, not a rule. No evaluator ran on this channel by design.
52
+
53
+ REVIEW SCOPE (what you judge):
54
+ 1. Causal fidelity: does the principle faithfully reflect the pain/diagnosis evidence provided? Does it address the actual root cause?
55
+ 2. Owner intent consistency: does the principle honor the intentContract (targetBehavior / forbiddenBehavior) and the Owner's expressed intent?
56
+ 3. Executability: can an agent realistically follow this principle in future sessions? Is it observable in behavior?
57
+ 4. Scope honesty: are the applicability conditions and antiPatterns explicit and honest about boundaries?
58
+ 5. Over-generalization / negative-control risk: could this principle over-constrain legitimate behavior? Would it misfire on cases outside its evidence?
59
+
60
+ DO NOT REVIEW (out of scope for this mode — these fields do not exist on this channel):
61
+ - implementationCode, evaluate() functions, goldenTraceCases
62
+ - affectedTools catalogs, sandbox behavior, RuleContext code semantics
63
+ - evaluator scoring (no evaluator ran)
64
+
65
+ HARD RULES:
66
+ - You ONLY judge. NEVER author, rewrite, or append a second version of the principle text.
67
+ - The reviewed source is the exact Scribe principle artifact — echo its id verbatim.
68
+
69
+ PROTOCOL:
70
+ 1. Read the scribeArtifact (principleDraft: title/statement/rationale/applicability/antiPatterns, optional intentContract) and the diagnosis evidence summary.
71
+ 2. Judge it against the REVIEW SCOPE above.
72
+ 3. Produce a decision: approve_rollout (safe to activate as agent context), needs_revision (semantic issues the Scribe must fix), or reject (fundamental misalignment with evidence/Owner intent).
73
+ 4. Provide a confidence score from 0.0 to 1.0.
74
+ 5. needs_revision: requiredChanges MUST name concrete semantic fixes for the Scribe (never code changes).
75
+ 6. List rollout-specific risks and pre/during-rollout safety checks.
76
+
77
+ CRITICAL: Your ENTIRE response must be ONLY the JSON object below. Do NOT include any text before or after the JSON. Do NOT wrap the JSON in markdown code fences. Do NOT add explanatory prose. Output the raw JSON object and nothing else.
78
+
79
+ COMPLETE EXAMPLE OUTPUT (follow this exact structure):
80
+ {"taskId":"task-123","sourceScribeArtifactId":"pi-art-scribe-001","review":{"decision":"approve_rollout","summary":"The principle faithfully captures the diagnosed failure and is safely scoped.","confidence":0.88,"requiredChanges":[],"rolloutRisks":["May trigger on adjacent shell tooling beyond the original evidence"],"safetyChecks":["Observe first activations for over-blocking","Owner can deactivate via Console if over-constraining"]},"sourceTrace":{"scribeArtifactId":"pi-art-scribe-001"},"risks":["Principle is derived from a single evidence session"],"generatedAt":"<current ISO-8601 timestamp>"}
81
+
82
+ CONSTRAINTS:
83
+ - Output ONLY valid JSON — no markdown, no explanatory text, no code fences, no prose before or after
84
+ - review.decision MUST be one of: approve_rollout, needs_revision, reject
85
+ - review.summary MUST be a non-empty string
86
+ - review.confidence MUST be a number between 0.0 and 1.0 (NOT a string, NOT a percentage)
87
+ - review.requiredChanges MUST be an array of strings (can be empty)
88
+ - review.rolloutRisks MUST be an array of strings (can be empty)
89
+ - review.safetyChecks MUST be an array of strings (can be empty)
90
+ - sourceScribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId (non-empty string)
91
+ - sourceTrace.scribeArtifactId MUST be copied exactly from input.sourceScribeArtifactId
92
+ - sourceTrace.evaluatorArtifactId / sourceTrace.artificerArtifactId MUST be OMITTED — no evaluator or artificer exists on this channel
93
+ - sourceTrace.philosopherArtifactId / sourceTrace.dreamerArtifactId are optional — include only if available from the scribe artifact lineage
94
+ - risks MUST be an array of strings (can be empty if no risks identified)
95
+ - generatedAt MUST be the current ISO-8601 timestamp (use the actual current time, NOT a placeholder)
96
+ `;
97
+ export const ROLLOUT_REVIEWER_PRINCIPLE_SEMANTIC_CONTRACT_VERSION = 'rollout-reviewer-output-v1.prompt.v1.principle-semantic';
38
98
  export class RolloutReviewerPromptBuilder {
39
99
  // eslint-disable-next-line @typescript-eslint/class-methods-use-this
40
100
  buildPrompt(input) {
@@ -43,6 +103,26 @@ export class RolloutReviewerPromptBuilder {
43
103
  // 'rollout-review' names the rollout reviewer's own schema (review.*),
44
104
  // not the evaluator's evaluation.*/codeReview.* fields.
45
105
  const languageDirective = buildLanguageDirective(input.outputLanguage, 'rollout-review');
106
+ // PRI-720 principle semantic mode: the reviewed source is the scribe
107
+ // principle artifact and the exam is the semantic governance split.
108
+ if (input.reviewMode === 'principle_semantic') {
109
+ if (input.sourceScribeArtifactId === undefined) {
110
+ throw new Error('principle_semantic review requires sourceScribeArtifactId');
111
+ }
112
+ const promptInput = {
113
+ taskId: input.taskId,
114
+ contextHash: input.contextHash,
115
+ reviewMode: 'principle_semantic',
116
+ sourceScribeArtifactId: input.sourceScribeArtifactId,
117
+ scribeArtifact: input.scribeArtifact,
118
+ promptContractVersion: ROLLOUT_REVIEWER_PRINCIPLE_SEMANTIC_CONTRACT_VERSION,
119
+ };
120
+ return {
121
+ message: JSON.stringify(promptInput),
122
+ promptInput,
123
+ systemPrompt: ROLLOUT_REVIEWER_PRINCIPLE_SEMANTIC_INSTRUCTION + languageDirective,
124
+ };
125
+ }
46
126
  const promptInput = {
47
127
  taskId: input.taskId,
48
128
  contextHash: input.contextHash,
@@ -1 +1 @@
1
- {"version":3,"file":"rollout-reviewer-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-prompt-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAmClE,MAAM,CAAC,MAAM,qCAAqC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCpD,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,sCAAsC,CAAC;AAE/F,MAAM,OAAO,4BAA4B;IACvC,qEAAqE;IACrE,WAAW,CAAC,KAAwC;QAClD,mEAAmE;QACnE,mEAAmE;QACnE,uEAAuE;QACvE,wDAAwD;QACxD,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,KAAK,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;QACzF,MAAM,WAAW,GAA+B;YAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,yBAAyB,EAAE,KAAK,CAAC,yBAAyB;YAC1D,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;YAC1C,qBAAqB,EAAE,wCAAwC;SAChE,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAE5C,sEAAsE;QACtE,iDAAiD;QACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,qCAAqC,GAAG,iBAAiB,EAAE,CAAC;IAC3G,CAAC;CACF"}
1
+ {"version":3,"file":"rollout-reviewer-prompt-builder.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-prompt-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA6ClE,MAAM,CAAC,MAAM,qCAAqC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCpD,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,sCAAsC,CAAC;AAE/F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C9D,CAAC;AAEF,MAAM,CAAC,MAAM,oDAAoD,GAAG,yDAAyD,CAAC;AAE9H,MAAM,OAAO,4BAA4B;IACvC,qEAAqE;IACrE,WAAW,CAAC,KAAwC;QAClD,mEAAmE;QACnE,mEAAmE;QACnE,uEAAuE;QACvE,wDAAwD;QACxD,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,KAAK,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;QAEzF,qEAAqE;QACrE,oEAAoE;QACpE,IAAI,KAAK,CAAC,UAAU,KAAK,oBAAoB,EAAE,CAAC;YAC9C,IAAI,KAAK,CAAC,sBAAsB,KAAK,SAAS,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;YAC/E,CAAC;YACD,MAAM,WAAW,GAA+B;gBAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,UAAU,EAAE,oBAAoB;gBAChC,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;gBACpD,cAAc,EAAE,KAAK,CAAC,cAAc;gBACpC,qBAAqB,EAAE,oDAAoD;aAC5E,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;gBACpC,WAAW;gBACX,YAAY,EAAE,+CAA+C,GAAG,iBAAiB;aAClF,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAA+B;YAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,yBAAyB,EAAE,KAAK,CAAC,yBAAyB;YAC1D,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;YAC1C,qBAAqB,EAAE,wCAAwC;SAChE,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAE5C,sEAAsE;QACtE,iDAAiD;QACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,qCAAqC,GAAG,iBAAiB,EAAE,CAAC;IAC3G,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { RuntimeStateManager } from '../store/runtime-state-manager.js';
2
2
  import type { PDRuntimeAdapter } from '../runtime-protocol.js';
3
3
  import type { StoreEventEmitter } from '../store/event-emitter.js';
4
- import type { RolloutReviewerOutputV1, RolloutReviewerValidator } from './rollout-reviewer-output.js';
4
+ import type { RolloutReviewerOutputV1, RolloutReviewerValidator, RolloutReviewMode } from './rollout-reviewer-output.js';
5
5
  import type { PIArtifactStore } from './pi-artifact.js';
6
6
  import { type PDErrorCategory } from '../error-categories.js';
7
7
  import { RunnerPhase } from '../runner/runner-phase.js';
@@ -91,6 +91,18 @@ export interface RolloutRevisionRoutingInput {
91
91
  readonly sourceRolloutTaskId: string;
92
92
  readonly sourceArtifactId: string;
93
93
  }
94
+ /**
95
+ * PRI-720: resolves the review contract mode for a rollout task.
96
+ *
97
+ * - code_tool_hook/skill channels and any explicit `full_chain` override run
98
+ * the legacy code-chain review (byte-compatible).
99
+ * - prompt/defer_archive chains in the STANDARD topology run the principle
100
+ * semantic review — recognized structurally by a scribe dependency and the
101
+ * ABSENCE of an evaluator dependency (the graph never creates one there).
102
+ * - A legacy (pre-PRI-720) prompt chain carries an evaluator dep; AC12 forbids
103
+ * reinterpreting in-flight chains, so it keeps the code-chain contract.
104
+ */
105
+ export declare function resolveRolloutReviewMode(channel?: string, pipelineMode?: string, dependencyTaskKinds?: readonly string[]): RolloutReviewMode;
94
106
  export declare class RolloutReviewerRunner {
95
107
  private phase;
96
108
  private readonly resolvedOptions;
@@ -112,13 +124,16 @@ export declare class RolloutReviewerRunner {
112
124
  * BasePeerRunner, so it calls the shared helper directly and emits its own
113
125
  * telemetry (no automatic runnerName prefix).
114
126
  *
115
- * The prompt asks the model to copy taskId / sourceEvaluatorArtifactId /
116
- * sourceTrace.evaluatorArtifactId verbatim, but long artifact IDs are
117
- * routinely truncated or altered on echo. Because a mismatch is classified
118
- * output_invalid (a permanent error — no retry), a bad echo permanently
119
- * blocks the candidate from reaching the approval queue. Lineage is
120
- * runner-owned metadata (rc-6): the authoritative values come from the
121
- * task record and the artifact store read in buildContext().
127
+ * The prompt asks the model to copy taskId / the mode-specific source
128
+ * artifact id / its sourceTrace counterpart verbatim, but long artifact IDs
129
+ * are routinely truncated or altered on echo. Because a mismatch is
130
+ * classified output_invalid (a permanent error — no retry), a bad echo
131
+ * permanently blocks the candidate from reaching the approval queue.
132
+ * Lineage is runner-owned metadata (rc-6): the authoritative values come
133
+ * from the task record and the artifact store read in buildContext().
134
+ * PRI-720: in principle semantic mode the reviewed source is the scribe
135
+ * artifact, so the reconciled fields are sourceScribeArtifactId /
136
+ * sourceTrace.scribeArtifactId.
122
137
  *
123
138
  * Whenever an echo differed (or sourceTrace was missing), a
124
139
  * rollout_reviewer_lineage_echo_corrected telemetry event is emitted so
@@ -163,6 +178,17 @@ export declare class RolloutReviewerRunner {
163
178
  /** 收集 lineage 上所有 source task id (BFS 沿 dependencyTaskIds, 有界深度)。 */
164
179
  private static readonly LINEAGE_MAX_DEPTH;
165
180
  private collectLineageSourceTaskIds;
181
+ /**
182
+ * PRI-720 C3: flip the exact reviewed scribe principle artifact to
183
+ * `validated` on semantic approve. Mirrors the evaluator's approved-path
184
+ * behavior (evaluator-runner.ts): idempotent updateValidationStatus;
185
+ * a `false` return is a deterministic store inconsistency surfaced via
186
+ * structured telemetry (the activation resolver then fails closed to
187
+ * needs_human_review); a store throw retries (the write is a required
188
+ * effect of the approve verdict — resume replays it, never a second LLM
189
+ * verdict).
190
+ */
191
+ private validateReviewedScribeArtifactOrThrow;
166
192
  /**
167
193
  * P0-2 (外部复核): dispatch + 结果分类。
168
194
  * 返回 true = governance transition 完成 (activated / already_activated /
@@ -186,7 +212,8 @@ export declare class RolloutReviewerRunner {
186
212
  private handleRevisionRouting;
187
213
  /**
188
214
  * 解析修订目标任务 (只读遍历 dep 链):
189
- * rollout → evaluator → artificer → scribe
215
+ * rollout → evaluator → artificer → scribe (code 链);
216
+ * rollout → scribe (PRI-720 principle 语义链: scribe 是直接依赖)。
190
217
  * code_tool_hook → artificer; 其他 → scribe (走到底)。
191
218
  */
192
219
  private resolveRevisionTarget;
@@ -224,6 +251,13 @@ export declare class RolloutReviewerRunner {
224
251
  private applyDecisionEffects;
225
252
  /** intent APPLIED 后才允许 terminal (P0 invariant 5)。写失败 fail loud。 */
226
253
  private markCompletionIntentAppliedOrThrow;
254
+ /**
255
+ * PRI-720: dep-aware review mode for a hydrated task (resume/owner-override
256
+ * paths, where buildContext did not run). Structural rule — see
257
+ * resolveRolloutReviewMode: a scribe dep without an evaluator dep is a
258
+ * principle semantic chain; anything else keeps the code-chain contract.
259
+ */
260
+ private resolveReviewModeForTask;
227
261
  /**
228
262
  * 入口恢复门: pending completion intent (同 epoch) 是 recovery authority。
229
263
  * 返回非 null = 本次 run 以 resume 完成 (LLM 未被调用);
@@ -1 +1 @@
1
- {"version":3,"file":"rollout-reviewer-runner.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/rollout-reviewer-runner.ts"],"names":[],"mappings":"AAAA,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