@patronage/software-factory 0.30.0-alpha.1 → 0.30.0-beta.1

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/index.d.ts CHANGED
@@ -371,8 +371,8 @@ interface DemandWaiver {
371
371
  operator: string;
372
372
  rationale: string;
373
373
  recordedAt: string;
374
- /** The operator session the waiver was recorded in. */
375
- session: string;
374
+ /** Optional audit metadata; never waiver authority. */
375
+ session?: string;
376
376
  }
377
377
  interface DemandWaiverStore {
378
378
  command: "patronage-factory demand:waive";
@@ -392,7 +392,7 @@ interface WaivedDemand {
392
392
  operator: string;
393
393
  rationale: string;
394
394
  recordedAt: string;
395
- session: string;
395
+ session?: string;
396
396
  /** The demand's refusals at evaluation time, preserved verbatim. */
397
397
  unmetReasons: string[];
398
398
  }
@@ -431,7 +431,7 @@ declare const applyDemandWaiver: ({
431
431
  declare const waivedDemandNotice: (waived: WaivedDemand) => string;
432
432
  interface DemandWaiverAuthorization {
433
433
  operator: string;
434
- session: string;
434
+ session?: string;
435
435
  }
436
436
  type AuthorizeDemandWaiverResult = {
437
437
  authorization: DemandWaiverAuthorization;
@@ -442,16 +442,15 @@ type AuthorizeDemandWaiverResult = {
442
442
  };
443
443
  /**
444
444
  * Operator identity, `declaredBy`-style: a named human account, recorded on
445
- * the waiver and enforced here plus session distinctness from the candidate
446
- * the waiver applies to. Every refusal is named; nothing falls open.
445
+ * the waiver and enforced here. Session is optional audit metadata only: it is
446
+ * not credential-backed, so its absence or equality never authorizes or
447
+ * refuses an operator act.
447
448
  */
448
449
  declare const authorizeDemandWaiver: ({
449
450
  authenticatedLogin,
450
- authoringSession,
451
451
  session
452
452
  }: {
453
453
  authenticatedLogin: string | undefined;
454
- authoringSession: string | undefined;
455
454
  session: string | undefined;
456
455
  }) => AuthorizeDemandWaiverResult;
457
456
  //#endregion
@@ -519,27 +518,6 @@ declare const followUpFromArgv: (argv: string[]) => FollowUpAction;
519
518
  /** Canonical zod schema for the optional follow-up field on JSON outputs. */
520
519
  declare const FollowUpActionSchema: z.ZodType<FollowUpAction>;
521
520
  //#endregion
522
- //#region src/pr-readiness/handled-human-comments.d.ts
523
- declare const HANDLED_COMMENTS_PAYLOAD_KIND: "handled-human-comments";
524
- /**
525
- * Authenticated producer of the durable handled set. Recorded on the readiness
526
- * ledger; unverifiable producers are ignored on read (fail closed).
527
- */
528
- type HandledCommentsProducerMode = "app" | "commit-status";
529
- interface HandledCommentsProducer {
530
- /** App id (stringified) or GitHub login, depending on mode. */
531
- identity: string;
532
- mode: HandledCommentsProducerMode;
533
- }
534
- interface HandledCommentsCheckPayload {
535
- clearedAt?: string;
536
- handledCommentUrls: string[];
537
- kind: typeof HANDLED_COMMENTS_PAYLOAD_KIND;
538
- pr: number;
539
- schemaVersion: 1;
540
- sessionId?: string;
541
- }
542
- //#endregion
543
521
  //#region src/diff-classification.d.ts
544
522
  declare const DIFF_CLASSIFICATIONS: readonly ["docs/process-only", "trivial", "non-trivial"];
545
523
  type DiffClassification = (typeof DIFF_CLASSIFICATIONS)[number];
@@ -595,16 +573,10 @@ declare const factoryProjectProfileSchema: z.ZodObject<{
595
573
  paths: z.ZodArray<z.ZodString>;
596
574
  }, z.core.$strict>>>;
597
575
  defaultMaxCycles: z.ZodNumber;
598
- ladder: z.ZodOptional<z.ZodObject<{
599
- gate: z.ZodOptional<z.ZodObject<{
600
- cap: z.ZodNumber;
601
- }, z.core.$strict>>;
602
- }, z.core.$strict>>;
603
576
  modes: z.ZodArray<z.ZodEnum<{
604
577
  correctness: "correctness";
605
578
  security: "security";
606
579
  }>>;
607
- standingChecklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
608
580
  }, z.core.$strict>;
609
581
  schemaVersion: z.ZodLiteral<4>;
610
582
  verification: z.ZodObject<{
@@ -784,14 +756,6 @@ interface CheckRunDependencies {
784
756
  declare function ensureFactoryCheckRunPublished(input: PublishFactoryCheckInput, dependencies?: CheckRunDependencies & {
785
757
  onDiagnostic?: (message: string) => void;
786
758
  }): Promise<boolean>;
787
- interface PublishHandledCommentsCheckInput {
788
- cwd: string;
789
- owner: string;
790
- payload: HandledCommentsCheckPayload;
791
- pr: number;
792
- repo: string;
793
- sha: string;
794
- }
795
759
  //#endregion
796
760
  //#region src/merge-freeze.d.ts
797
761
  declare const MERGE_FREEZE_CHECK_NAME = "patronage-factory/merge-freeze";
@@ -835,10 +799,10 @@ interface MergeFreezeStore {
835
799
  read: (input: MergeFreezeStoreInput) => unknown;
836
800
  }
837
801
  /**
838
- * The freeze generation as an arming decision needs to see it (#477).
802
+ * The freeze generation as a readiness decision needs to see it (#477).
839
803
  *
840
804
  * `read` above collapses three different situations into one refusal, because
841
- * merge time treated all of them as "do not merge". Arming time distinguishes
805
+ * merge time treated all of them as "do not merge". Readiness distinguishes
842
806
  * them: a settled generation is the writer's verdict, a **settling** one is the
843
807
  * window between a merge landing and its main-push verify completing (a
844
808
  * running generation, or a missing generation proven by the immediately prior
@@ -878,7 +842,6 @@ interface ProofDescriptor<T> {
878
842
  declare const reviewPromptSectionSchema: z.ZodObject<{
879
843
  provenance: z.ZodEnum<{
880
844
  "prior-review-ledger": "prior-review-ledger";
881
- "profile-standing-checklist": "profile-standing-checklist";
882
845
  "issue-review-focus": "issue-review-focus";
883
846
  }>;
884
847
  source: z.ZodString;
@@ -889,7 +852,6 @@ type ReviewPromptSectionProvenance = ReviewPromptSection["provenance"];
889
852
  declare const reviewPromptSectionsSchema: z.ZodArray<z.ZodObject<{
890
853
  provenance: z.ZodEnum<{
891
854
  "prior-review-ledger": "prior-review-ledger";
892
- "profile-standing-checklist": "profile-standing-checklist";
893
855
  "issue-review-focus": "issue-review-focus";
894
856
  }>;
895
857
  source: z.ZodString;
@@ -1171,33 +1133,11 @@ interface PrReviewProof {
1171
1133
  //#endregion
1172
1134
  //#region src/pr-readiness/readiness-ledger.d.ts
1173
1135
  declare const SCHEMA_VERSION = 1;
1174
- declare const previewDeploySchema: z.ZodObject<{
1175
- adminUrl: z.ZodOptional<z.ZodString>;
1176
- apiHealthUrl: z.ZodOptional<z.ZodString>;
1177
- headSha: z.ZodOptional<z.ZodString>;
1178
- localPreviewProof: z.ZodOptional<z.ZodUnknown>;
1179
- localProofPath: z.ZodOptional<z.ZodString>;
1180
- proofSource: z.ZodOptional<z.ZodEnum<{
1181
- "github-actions": "github-actions";
1182
- "local-self-certified": "local-self-certified";
1183
- }>>;
1184
- publicUrl: z.ZodOptional<z.ZodString>;
1185
- seedStatus: z.ZodEnum<{
1186
- unknown: "unknown";
1187
- skipped: "skipped";
1188
- passed: "passed";
1189
- failed: "failed";
1190
- }>;
1191
- stage: z.ZodOptional<z.ZodString>;
1192
- timingsMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNumber>>>;
1193
- workflowRunUrl: z.ZodOptional<z.ZodString>;
1194
- }, z.core.$strip>;
1195
- declare const READINESS_REPAIR_CODES: readonly ["undraft-pr", "render-pr-body-sections", "await-post-undraft-checks"];
1136
+ declare const READINESS_REPAIR_CODES: readonly ["undraft-pr", "await-post-undraft-checks"];
1196
1137
  declare const readinessRepairSchema: z.ZodObject<{
1197
1138
  action: z.ZodString;
1198
1139
  code: z.ZodEnum<{
1199
1140
  "undraft-pr": "undraft-pr";
1200
- "render-pr-body-sections": "render-pr-body-sections";
1201
1141
  "await-post-undraft-checks": "await-post-undraft-checks";
1202
1142
  }>;
1203
1143
  command: z.ZodString;
@@ -1232,80 +1172,28 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
1232
1172
  "out-of-scope": "out-of-scope";
1233
1173
  }>;
1234
1174
  }, z.core.$strip>>>;
1235
- finalReviewPoint: z.ZodBoolean;
1236
1175
  github: z.ZodObject<{
1237
- currentWithBase: z.ZodBoolean;
1238
1176
  draft: z.ZodBoolean;
1239
1177
  mergeStateStatus: z.ZodString;
1240
1178
  mergeable: z.ZodString;
1241
1179
  requiredChecks: z.ZodEnum<{
1242
1180
  unknown: "unknown";
1243
- pending: "pending";
1244
1181
  passed: "passed";
1245
1182
  failed: "failed";
1183
+ pending: "pending";
1246
1184
  none: "none";
1247
1185
  }>;
1186
+ reviewDecision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1248
1187
  unresolvedReviewThreads: z.ZodNumber;
1249
1188
  }, z.core.$strip>;
1250
- handledCommentsProducer: z.ZodOptional<z.ZodObject<{
1251
- identity: z.ZodString;
1252
- mode: z.ZodEnum<{
1253
- app: "app";
1254
- "commit-status": "commit-status";
1255
- }>;
1256
- }, z.core.$strip>>;
1257
- handledHumanComments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1258
- clearedAt: z.ZodOptional<z.ZodString>;
1259
- sessionId: z.ZodOptional<z.ZodString>;
1260
- source: z.ZodEnum<{
1261
- "check-run": "check-run";
1262
- cli: "cli";
1263
- }>;
1264
- url: z.ZodString;
1265
- }, z.core.$strip>>>;
1266
1189
  headSha: z.ZodString;
1267
1190
  mergeBaseSha: z.ZodOptional<z.ZodString>;
1268
1191
  patchId: z.ZodString;
1269
- postReadinessHumanComments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1270
- author: z.ZodString;
1271
- createdAt: z.ZodString;
1272
- summary: z.ZodString;
1273
- url: z.ZodString;
1274
- }, z.core.$strip>>>;
1275
- postReadinessHumanReviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
1276
- author: z.ZodString;
1277
- createdAt: z.ZodString;
1278
- summary: z.ZodString;
1279
- url: z.ZodString;
1280
- }, z.core.$strip>>>;
1281
1192
  pr: z.ZodNumber;
1282
- previewDeploy: z.ZodOptional<z.ZodObject<{
1283
- adminUrl: z.ZodOptional<z.ZodString>;
1284
- apiHealthUrl: z.ZodOptional<z.ZodString>;
1285
- headSha: z.ZodOptional<z.ZodString>;
1286
- localPreviewProof: z.ZodOptional<z.ZodUnknown>;
1287
- localProofPath: z.ZodOptional<z.ZodString>;
1288
- proofSource: z.ZodOptional<z.ZodEnum<{
1289
- "github-actions": "github-actions";
1290
- "local-self-certified": "local-self-certified";
1291
- }>>;
1292
- publicUrl: z.ZodOptional<z.ZodString>;
1293
- seedStatus: z.ZodEnum<{
1294
- unknown: "unknown";
1295
- skipped: "skipped";
1296
- passed: "passed";
1297
- failed: "failed";
1298
- }>;
1299
- stage: z.ZodOptional<z.ZodString>;
1300
- timingsMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNumber>>>;
1301
- workflowRunUrl: z.ZodOptional<z.ZodString>;
1302
- }, z.core.$strip>>;
1303
- previewDeployRequired: z.ZodBoolean;
1304
1193
  repairs: z.ZodDefault<z.ZodArray<z.ZodObject<{
1305
1194
  action: z.ZodString;
1306
1195
  code: z.ZodEnum<{
1307
1196
  "undraft-pr": "undraft-pr";
1308
- "render-pr-body-sections": "render-pr-body-sections";
1309
1197
  "await-post-undraft-checks": "await-post-undraft-checks";
1310
1198
  }>;
1311
1199
  command: z.ZodString;
@@ -1371,39 +1259,31 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
1371
1259
  }>>;
1372
1260
  reviews: z.ZodObject<{
1373
1261
  correctness: z.ZodObject<{
1374
- docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
1375
1262
  required: z.ZodBoolean;
1376
1263
  reviewedHeadSha: z.ZodOptional<z.ZodString>;
1377
1264
  reviewedPatchId: z.ZodOptional<z.ZodString>;
1378
1265
  status: z.ZodEnum<{
1379
1266
  blocked: "blocked";
1380
- "not-required": "not-required";
1381
1267
  stale: "stale";
1268
+ "not-required": "not-required";
1382
1269
  current: "current";
1383
1270
  missing: "missing";
1384
1271
  }>;
1385
1272
  }, z.core.$strip>;
1386
1273
  security: z.ZodOptional<z.ZodObject<{
1387
- docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
1388
1274
  required: z.ZodBoolean;
1389
1275
  reviewedHeadSha: z.ZodOptional<z.ZodString>;
1390
1276
  reviewedPatchId: z.ZodOptional<z.ZodString>;
1391
1277
  status: z.ZodEnum<{
1392
1278
  blocked: "blocked";
1393
- "not-required": "not-required";
1394
1279
  stale: "stale";
1280
+ "not-required": "not-required";
1395
1281
  current: "current";
1396
1282
  missing: "missing";
1397
1283
  }>;
1398
1284
  }, z.core.$strip>>;
1399
1285
  }, z.core.$strip>;
1400
1286
  schemaVersion: z.ZodLiteral<1>;
1401
- stackRole: z.ZodEnum<{
1402
- slice: "slice";
1403
- single: "single";
1404
- rollup: "rollup";
1405
- "merge-gate prerequisite": "merge-gate prerequisite";
1406
- }>;
1407
1287
  verification: z.ZodObject<{
1408
1288
  command: z.ZodLiteral<"patronage-factory pr:verify">;
1409
1289
  docsOnlyDeltaAccepted: z.ZodOptional<z.ZodBoolean>;
@@ -1418,10 +1298,8 @@ declare const managedReadinessLedgerSchema: z.ZodObject<{
1418
1298
  verifiedHeadSha: z.ZodOptional<z.ZodString>;
1419
1299
  }, z.core.$strip>;
1420
1300
  }, z.core.$strip>;
1421
- type PreviewDeployProof = z.infer<typeof previewDeploySchema>;
1422
- type PreviewSeedStatus = PreviewDeployProof["seedStatus"];
1423
1301
  type ReadinessRepair = z.infer<typeof readinessRepairSchema>;
1424
- type ReadinessStatus = "ready" | "blocked" | "slice-ready/not-final";
1302
+ type ReadinessStatus = "ready" | "blocked";
1425
1303
  type ManagedReadinessLedger = z.infer<typeof managedReadinessLedgerSchema>;
1426
1304
  declare function validateManagedReadinessLedger(value: unknown): ManagedReadinessLedger;
1427
1305
  declare namespace status_check_rollup_d_exports {
@@ -1478,9 +1356,7 @@ declare const statusCheckState: (rollup: StatusCheckRollup[] | undefined, exclud
1478
1356
  interface PrReadyArgs extends LoadProjectProfileInput {
1479
1357
  authoringSessionIds?: string[];
1480
1358
  base: string;
1481
- bodyForEvaluation?: string;
1482
1359
  epic?: number;
1483
- handledCommentUrls?: string[];
1484
1360
  json?: boolean;
1485
1361
  output?: string;
1486
1362
  report?: boolean;
@@ -1508,31 +1384,12 @@ interface GitHubPullRequest {
1508
1384
  baseRefName: string;
1509
1385
  baseRefOid: string;
1510
1386
  body: string;
1511
- comments: {
1512
- author?: {
1513
- login?: string;
1514
- };
1515
- body: string;
1516
- createdAt?: string;
1517
- id?: string | number;
1518
- updatedAt?: string;
1519
- url?: string;
1520
- }[];
1521
1387
  headRefOid: string;
1522
1388
  isDraft: boolean;
1523
1389
  mergeStateStatus: string;
1524
1390
  mergeable: string;
1525
1391
  number: number;
1526
- reviews?: {
1527
- author?: {
1528
- login?: string;
1529
- };
1530
- body?: string;
1531
- lastEditedAt?: string;
1532
- state: string;
1533
- submittedAt?: string;
1534
- url?: string;
1535
- }[];
1392
+ reviewDecision: string | null;
1536
1393
  statusCheckRollup?: StatusCheckRollup[];
1537
1394
  title: string;
1538
1395
  unresolvedReviewThreads: number;
@@ -1542,8 +1399,8 @@ interface PrReadyProof {
1542
1399
  schemaVersion: 3;
1543
1400
  /**
1544
1401
  * What GitHub actually did when this run armed native auto-merge (#477).
1545
- * Present exactly when readiness passed and the arming ran; read back from
1546
- * the PR rather than inferred from the invocation, because `gh pr merge
1402
+ * Present exactly when a ready wave authorizes machine merge and arming ran;
1403
+ * read back from the PR rather than inferred from the invocation, because `gh pr merge
1547
1404
  * --auto` arms, merges, or does nothing with the same exit code and the same
1548
1405
  * empty output. `not-armed` means the candidate is admitted but nothing will
1549
1406
  * merge it, and `followUp` carries the re-dispatch.
@@ -1582,8 +1439,9 @@ interface PrReadyProof {
1582
1439
  ledger: ManagedReadinessLedger;
1583
1440
  /**
1584
1441
  * Actionable facts that did not block (#477): a settling merge-freeze
1585
- * generation that armed with a notice, and how each waived demand reads to a
1586
- * human. Absent when there are none.
1442
+ * generation that permitted readiness and any authorized arming with a
1443
+ * notice, an admitted-but-unscheduled false boundary wave, and how each
1444
+ * waived demand reads to a human. Absent when there are none.
1587
1445
  */
1588
1446
  notices?: string[];
1589
1447
  /** Committed profile blob evaluated by readiness. Required for merge. */
@@ -1598,16 +1456,15 @@ interface PrReadyProof {
1598
1456
  * Demands that were in force, were NOT met, and were waived by the operator
1599
1457
  * (#354, moved here from the merge-time proof by #477). Each entry carries
1600
1458
  * the demand's refusals verbatim, so a waived demand can never read as a met
1601
- * one; the arming proceeds on the recorded operator act, not on evidence.
1459
+ * one; readiness proceeds on the recorded operator act, not on evidence.
1602
1460
  */
1603
1461
  waivedDemands?: WaivedDemand[];
1604
1462
  }
1605
- type PublishHandledCommentsResult = HandledCommentsProducer | Promise<HandledCommentsProducer | undefined> | undefined;
1606
1463
  interface PrReadyDependencies {
1607
1464
  /**
1608
- * Arms GitHub native auto-merge for a passing candidate (#477). Defaults to
1609
- * the real `gh pr merge --auto` call plus the read-back that says what
1610
- * actually happened.
1465
+ * Arms GitHub native auto-merge only for a passing boundary wave that
1466
+ * authorizes machine merge (#477). Defaults to the real `gh pr merge --auto`
1467
+ * call plus the read-back that says what actually happened.
1611
1468
  */
1612
1469
  armAutoMerge?: (input: ArmAutoMergeInput) => ArmAutoMergeOutcome;
1613
1470
  github?: {
@@ -1623,25 +1480,11 @@ interface PrReadyDependencies {
1623
1480
  owner: string;
1624
1481
  repo: string;
1625
1482
  }) => string;
1626
- fetchHandledComments?: (input: {
1627
- owner: string;
1628
- pr: number;
1629
- repo: string;
1630
- }) => {
1631
- producer?: HandledCommentsProducer;
1632
- urls: string[];
1633
- }; /** @deprecated Prefer fetchHandledComments (includes producer identity). */
1634
- fetchHandledCommentUrls?: (input: {
1635
- owner: string;
1636
- pr: number;
1637
- repo: string;
1638
- }) => string[];
1639
1483
  fetchPullRequest: (input: {
1640
1484
  owner: string;
1641
1485
  repo: string;
1642
1486
  pr: number;
1643
1487
  }) => GitHubPullRequest;
1644
- publishHandledCommentsCheck?: (input: PublishHandledCommentsCheckInput) => PublishHandledCommentsResult;
1645
1488
  };
1646
1489
  git?: PrReadyGitDependencies;
1647
1490
  hq?: HqIngestDependencies;
@@ -1667,8 +1510,6 @@ interface PrReadyDependencies {
1667
1510
  }) => Promise<boolean> | boolean;
1668
1511
  /** Injectable delay for the UNKNOWN-mergeable brief poll (tests). */
1669
1512
  sleep?: (ms: number) => Promise<void>;
1670
- /** Injectable clock for CLI handled-comment provenance (tests). */
1671
- now?: () => Date;
1672
1513
  }
1673
1514
  interface PrReadyGitDependencies {
1674
1515
  canResolveCommit: (cwd: string, sha: string) => boolean;
@@ -1859,8 +1700,8 @@ declare const loadEvidenceEnvelopes: (cwd: string) => LoadedEvidenceEnvelope[];
1859
1700
  declare const REVIEW_STATUS_VALUES: readonly ["not-required", "current", "stale", "missing", "blocked"];
1860
1701
  declare const reviewStatusSchema: z.ZodEnum<{
1861
1702
  blocked: "blocked";
1862
- "not-required": "not-required";
1863
1703
  stale: "stale";
1704
+ "not-required": "not-required";
1864
1705
  current: "current";
1865
1706
  missing: "missing";
1866
1707
  }>;
@@ -2218,11 +2059,6 @@ declare const retroEnvelopeV1Schema: z.ZodObject<{
2218
2059
  }, z.core.$strict>;
2219
2060
  kind: z.ZodLiteral<"retro-envelope">;
2220
2061
  outcome: z.ZodOptional<z.ZodObject<{
2221
- mergeCheck: z.ZodOptional<z.ZodEnum<{
2222
- pass: "pass";
2223
- fail: "fail";
2224
- "not-run": "not-run";
2225
- }>>;
2226
2062
  status: z.ZodEnum<{
2227
2063
  success: "success";
2228
2064
  fail: "fail";
@@ -2581,7 +2417,8 @@ interface PrPublishHandoff {
2581
2417
  * An admitted candidate is not a handed-off one: `pr:ready` arms only when a
2582
2418
  * boundary wave authorized it, and the arming can fail to take effect. A
2583
2419
  * readiness status of `ready` says the candidate passed, never that anything
2584
- * will merge it — so publish reads this before claiming nothing is owed.
2420
+ * will merge it — only an auto-merge-authorized boundary wave can schedule
2421
+ * one — so publish reads this before claiming nothing is owed.
2585
2422
  */
2586
2423
  scheduled: boolean;
2587
2424
  status: PrReadyProof["status"];
@@ -2811,11 +2648,11 @@ declare const LegacyWorkerCloseoutStatusTraceEventSchema: z.ZodObject<{
2811
2648
  threadId: z.ZodOptional<z.ZodString>;
2812
2649
  workerId: z.ZodOptional<z.ZodString>;
2813
2650
  archiveStatus: z.ZodOptional<z.ZodEnum<{
2651
+ pending: "pending";
2814
2652
  unavailable: "unavailable";
2815
2653
  archived: "archived";
2816
2654
  skipped: "skipped";
2817
2655
  "not-applicable": "not-applicable";
2818
- pending: "pending";
2819
2656
  }>>;
2820
2657
  closeoutReason: z.ZodOptional<z.ZodString>;
2821
2658
  eventType: z.ZodLiteral<"worker-closeout-lessons">;
@@ -3206,11 +3043,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
3206
3043
  threadId: z.ZodOptional<z.ZodString>;
3207
3044
  workerId: z.ZodOptional<z.ZodString>;
3208
3045
  archiveStatus: z.ZodOptional<z.ZodEnum<{
3046
+ pending: "pending";
3209
3047
  unavailable: "unavailable";
3210
3048
  archived: "archived";
3211
3049
  skipped: "skipped";
3212
3050
  "not-applicable": "not-applicable";
3213
- pending: "pending";
3214
3051
  }>>;
3215
3052
  closeoutReason: z.ZodOptional<z.ZodString>;
3216
3053
  eventType: z.ZodLiteral<"worker-closeout-lessons">;
@@ -3247,11 +3084,11 @@ declare const FACTORY_TRACE_EVENT_DEFINITIONS: readonly [DefinedTraceEvent<"revi
3247
3084
  }, z.core.$strict>], "lessonStatus">;
3248
3085
  readonly 2: z.ZodObject<{
3249
3086
  archiveStatus: z.ZodOptional<z.ZodEnum<{
3087
+ pending: "pending";
3250
3088
  unavailable: "unavailable";
3251
3089
  archived: "archived";
3252
3090
  skipped: "skipped";
3253
3091
  "not-applicable": "not-applicable";
3254
- pending: "pending";
3255
3092
  }>>;
3256
3093
  closeoutReason: z.ZodOptional<z.ZodString>;
3257
3094
  lessonStatus: z.ZodOptional<z.ZodEnum<{
@@ -3927,115 +3764,6 @@ declare function checkWorktreeScratchFiles(worktreePath?: string, listRootEntrie
3927
3764
  * apart.
3928
3765
  */
3929
3766
  declare function formatScratchFileCheckSummary(check: WorktreeScratchFileCheck): string;
3930
- declare namespace pr_body_metadata_d_exports {
3931
- export { PrBodyMetadata, StackRole, readPrBodyMetadata };
3932
- }
3933
- type StackRole = "single" | "slice" | "rollup" | "merge-gate prerequisite";
3934
- interface PrBodyMetadata {
3935
- requiredSectionsPresent: boolean;
3936
- stackRole: StackRole;
3937
- finalReviewPoint: boolean;
3938
- trivialWaiverAccepted: boolean;
3939
- }
3940
- declare const readPrBodyMetadata: (body: string) => PrBodyMetadata;
3941
- declare namespace post_readiness_comments_d_exports {
3942
- export { BLOCKING_REVIEW_STATE, HandledCommentEntry, PostReadinessHumanComment, PrReadinessComment, PrReadinessReview, activePostReadinessHumanComments, activePostReadinessHumanReviews, isBotLogin, postReadinessHumanCommentReason, postReadinessHumanReviewReason, selectPostReadinessHumanComments };
3943
- }
3944
- interface PrReadinessComment {
3945
- author?: {
3946
- login?: string;
3947
- };
3948
- body: string;
3949
- createdAt?: string;
3950
- id?: string | number;
3951
- updatedAt?: string;
3952
- url?: string;
3953
- }
3954
- interface PrReadinessReview {
3955
- author?: {
3956
- login?: string;
3957
- };
3958
- body?: string;
3959
- /** GraphQL `PullRequestReview.lastEditedAt` — the body-edit signal used to re-arm a cleared review (#843). */
3960
- lastEditedAt?: string;
3961
- state: string;
3962
- submittedAt?: string;
3963
- url?: string;
3964
- }
3965
- interface PostReadinessHumanComment {
3966
- author: string;
3967
- createdAt: string;
3968
- summary: string;
3969
- url: string;
3970
- }
3971
- declare const BLOCKING_REVIEW_STATE = "CHANGES_REQUESTED";
3972
- interface HandledCommentEntry {
3973
- clearedAt?: string;
3974
- url: string;
3975
- }
3976
- /**
3977
- * Active human blocking comments: all non-bot human PR comments minus the
3978
- * explicitly-handled URL set. No review-timestamp recency gate — an unhandled
3979
- * blocker blocks regardless of later review runs (#819 cycle 3). A handled
3980
- * comment that is EDITED after it was cleared re-arms (#825a).
3981
- */
3982
- declare const selectPostReadinessHumanComments: ({
3983
- comments,
3984
- handledComments
3985
- }: {
3986
- comments: PrReadinessComment[];
3987
- handledComments?: HandledCommentEntry[];
3988
- }) => PostReadinessHumanComment[];
3989
- /**
3990
- * Active human blockers are recomputed from live GitHub comments each run
3991
- * (#819). The prior local readiness proof is not a carry source —
3992
- * `.factory-memory/` is gitignored and vanishes on clean checkout. Clearing
3993
- * persists only via the durable handled set (factory check-run
3994
- * `patronage-factory/handled-comments`) plus explicit `--handled-comment`.
3995
- */
3996
- declare const activePostReadinessHumanComments: ({
3997
- comments,
3998
- handledComments
3999
- }: {
4000
- comments: PrReadinessComment[];
4001
- handledComments?: HandledCommentEntry[];
4002
- }) => PostReadinessHumanComment[];
4003
- /**
4004
- * Active CHANGES_REQUESTED PR review submissions (#825b): a top-level review
4005
- * body carries no inline thread, so without this scan it is the only human
4006
- * channel auto-merge would sail over — unwatched by both the issue-comment
4007
- * scan and the unresolved-review-thread count. Shares the handled-set /
4008
- * re-arm rules with comments so an operator can clear a stale request the
4009
- * same way (`--handled-comment <review-url>`). The clear-comparison uses
4010
- * `lastEditedAt` when present so a body edit after a clear re-arms the
4011
- * blocker the same way an edited comment does — resubmission is not the
4012
- * only edit signal GitHub exposes (#843).
4013
- */
4014
- declare const activePostReadinessHumanReviews: ({
4015
- handledComments,
4016
- reviews
4017
- }: {
4018
- handledComments?: HandledCommentEntry[];
4019
- reviews: PrReadinessReview[];
4020
- }) => PostReadinessHumanComment[];
4021
- declare const postReadinessHumanCommentReason: ({
4022
- comment,
4023
- pr,
4024
- prTitle
4025
- }: {
4026
- comment: PostReadinessHumanComment;
4027
- pr: number;
4028
- prTitle?: string;
4029
- }) => string;
4030
- declare const postReadinessHumanReviewReason: ({
4031
- pr,
4032
- prTitle,
4033
- review
4034
- }: {
4035
- pr: number;
4036
- prTitle?: string;
4037
- review: PostReadinessHumanComment;
4038
- }) => string;
4039
3767
  //#endregion
4040
3768
  //#region src/pr-readiness/pr-body-sections.d.ts
4041
3769
  declare const MANAGED_SECTION_NAMES: readonly ["Verification", "Review proof", "How to review"];
@@ -4152,31 +3880,27 @@ interface WaveReviewDemand {
4152
3880
  wave: string;
4153
3881
  }
4154
3882
  declare namespace readiness_evaluation_d_exports {
4155
- export { CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON, DRAFT_BLOCKER_REASON, EvaluationInput, ManagedReadinessLedger, PENDING_CHECKS_BLOCKER_REASON_PREFIX, PreviewDeployProof, PreviewSeedStatus, READINESS_REPAIR_CODES, RENDER_PR_BODY_SECTIONS_BLOCKER_REASON, ReadinessRepair, ReadinessStatus, SCHEMA_VERSION, SECURITY_UNTYPED_REVIEW_BLOCKER_REASON, evaluateReadiness, managedReadinessLedgerSchema, readinessExitCode, readinessRepairSchema, validateManagedReadinessLedger };
3883
+ export { CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON, DRAFT_BLOCKER_REASON, EvaluationInput, ManagedReadinessLedger, PENDING_CHECKS_BLOCKER_REASON_PREFIX, READINESS_REPAIR_CODES, ReadinessRepair, ReadinessStatus, SCHEMA_VERSION, SECURITY_UNTYPED_REVIEW_BLOCKER_REASON, evaluateReadiness, managedReadinessLedgerSchema, readinessExitCode, readinessRepairSchema, validateManagedReadinessLedger };
4156
3884
  }
4157
3885
  declare const CORRECTNESS_UNTYPED_REVIEW_BLOCKER_REASON = "Correctness review proof is not a head-bound typed findings verdict; re-run pr:review with a valid findings file.";
4158
3886
  declare const SECURITY_UNTYPED_REVIEW_BLOCKER_REASON = "Security review proof is not a head-bound typed findings verdict; re-run pr:review with a valid findings file.";
4159
3887
  declare const DRAFT_BLOCKER_REASON = "PR is still marked draft.";
4160
- declare const RENDER_PR_BODY_SECTIONS_BLOCKER_REASON = "PR body must include Verification, Review proof, and How to review sections.";
4161
3888
  declare const PENDING_CHECKS_BLOCKER_REASON_PREFIX = "Required/current checks are";
4162
3889
  declare const readinessExitCode: (status: ReadinessStatus) => 1 | 0;
4163
3890
  interface EvaluationInput {
4164
3891
  pr: number;
4165
3892
  prTitle?: string;
4166
- body: string;
4167
3893
  headSha: string;
4168
3894
  localHeadSha?: string;
4169
3895
  baseSha: string;
4170
3896
  patchId: string;
4171
3897
  classification: DiffClassification;
4172
- comments?: PrReadinessComment[];
4173
- reviews?: PrReadinessReview[];
3898
+ reviewDecision: string | null;
4174
3899
  unresolvedReviewThreads: number;
4175
3900
  requiredChecks: CheckState;
4176
3901
  hostedVerifyCheck?: CheckState;
4177
3902
  autoMergeEnabled?: boolean;
4178
3903
  draft: boolean;
4179
- currentWithBase: boolean;
4180
3904
  mergeable: string;
4181
3905
  mergeStateStatus: string;
4182
3906
  ladderPolicy?: ReviewLadderPolicy;
@@ -4184,20 +3908,11 @@ interface EvaluationInput {
4184
3908
  reviewProof?: PrReviewProof;
4185
3909
  verificationProof?: VerificationProofState;
4186
3910
  docsOnlyVerifyBaselineHeadShas?: string[];
4187
- docsOnlySinceReviewProof?: boolean;
4188
3911
  externalRequiredChecks?: RequiredCheck[];
4189
3912
  evidenceEnvelopes?: LoadedEvidenceEnvelope[];
4190
3913
  mergeBaseSha?: string;
4191
3914
  authoringSessionIds?: string[];
4192
3915
  priorLedger?: Pick<ManagedReadinessLedger, "reviewRuns">;
4193
- handledCommentUrls?: string[];
4194
- checkRunHandledCommentUrls?: string[];
4195
- handledCommentsProducer?: {
4196
- identity: string;
4197
- mode: "app" | "commit-status";
4198
- };
4199
- handledCommentSessionId?: string;
4200
- handledCommentClearedAt?: string;
4201
3916
  waveReviewDemand?: Pick<WaveReviewDemand, "autoMerge" | "review" | "wave">;
4202
3917
  mergeFreeze?: {
4203
3918
  blockingReasons: string[];
@@ -4216,42 +3931,37 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
4216
3931
  baseSha: string;
4217
3932
  blockingReasons: string[];
4218
3933
  classification: "trivial" | "docs/process-only" | "non-trivial";
4219
- finalReviewPoint: boolean;
4220
3934
  github: {
4221
- currentWithBase: boolean;
4222
3935
  draft: boolean;
4223
3936
  mergeStateStatus: string;
4224
3937
  mergeable: string;
4225
- requiredChecks: "unknown" | "pending" | "passed" | "failed" | "none";
3938
+ requiredChecks: "unknown" | "passed" | "failed" | "pending" | "none";
4226
3939
  unresolvedReviewThreads: number;
3940
+ reviewDecision?: string | null | undefined;
4227
3941
  };
4228
3942
  headSha: string;
4229
3943
  patchId: string;
4230
3944
  pr: number;
4231
- previewDeployRequired: boolean;
4232
3945
  repairs: {
4233
3946
  action: string;
4234
- code: "undraft-pr" | "render-pr-body-sections" | "await-post-undraft-checks";
3947
+ code: "undraft-pr" | "await-post-undraft-checks";
4235
3948
  command: string;
4236
3949
  }[];
4237
3950
  reviews: {
4238
3951
  correctness: {
4239
3952
  required: boolean;
4240
- status: "blocked" | "not-required" | "stale" | "current" | "missing";
4241
- docsOnlyDeltaAccepted?: boolean | undefined;
3953
+ status: "blocked" | "stale" | "not-required" | "current" | "missing";
4242
3954
  reviewedHeadSha?: string | undefined;
4243
3955
  reviewedPatchId?: string | undefined;
4244
3956
  };
4245
3957
  security?: {
4246
3958
  required: boolean;
4247
- status: "blocked" | "not-required" | "stale" | "current" | "missing";
4248
- docsOnlyDeltaAccepted?: boolean | undefined;
3959
+ status: "blocked" | "stale" | "not-required" | "current" | "missing";
4249
3960
  reviewedHeadSha?: string | undefined;
4250
3961
  reviewedPatchId?: string | undefined;
4251
3962
  } | undefined;
4252
3963
  };
4253
3964
  schemaVersion: 1;
4254
- stackRole: "slice" | "single" | "rollup" | "merge-gate prerequisite";
4255
3965
  verification: {
4256
3966
  command: "patronage-factory pr:verify";
4257
3967
  prVerify: "stale" | "passed" | "missing";
@@ -4272,42 +3982,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
4272
3982
  classifications: ("trivial" | "docs/process-only" | "non-trivial")[];
4273
3983
  } | undefined;
4274
3984
  }[] | undefined;
4275
- handledCommentsProducer?: {
4276
- identity: string;
4277
- mode: "app" | "commit-status";
4278
- } | undefined;
4279
- handledHumanComments?: {
4280
- source: "check-run" | "cli";
4281
- url: string;
4282
- clearedAt?: string | undefined;
4283
- sessionId?: string | undefined;
4284
- }[] | undefined;
4285
3985
  mergeBaseSha?: string | undefined;
4286
- postReadinessHumanComments?: {
4287
- author: string;
4288
- createdAt: string;
4289
- summary: string;
4290
- url: string;
4291
- }[] | undefined;
4292
- postReadinessHumanReviews?: {
4293
- author: string;
4294
- createdAt: string;
4295
- summary: string;
4296
- url: string;
4297
- }[] | undefined;
4298
- previewDeploy?: {
4299
- seedStatus: "unknown" | "skipped" | "passed" | "failed";
4300
- adminUrl?: string | undefined;
4301
- apiHealthUrl?: string | undefined;
4302
- headSha?: string | undefined;
4303
- localPreviewProof?: unknown;
4304
- localProofPath?: string | undefined;
4305
- proofSource?: "github-actions" | "local-self-certified" | undefined;
4306
- publicUrl?: string | undefined;
4307
- stage?: string | undefined;
4308
- timingsMs?: Record<string, number | undefined> | undefined;
4309
- workflowRunUrl?: string | undefined;
4310
- } | undefined;
4311
3986
  reviewCycleState?: {
4312
3987
  autoBlockingFindings: number;
4313
3988
  countsBySeverity: {
@@ -4346,7 +4021,7 @@ declare const evaluateReadiness: (input: EvaluationInput) => {
4346
4021
  notices: string[];
4347
4022
  repairs: {
4348
4023
  action: string;
4349
- code: "undraft-pr" | "render-pr-body-sections" | "await-post-undraft-checks";
4024
+ code: "undraft-pr" | "await-post-undraft-checks";
4350
4025
  command: string;
4351
4026
  }[];
4352
4027
  status: ReadinessStatus; /** Demands that were in force, were NOT met, and the operator waived. */
@@ -4604,7 +4279,6 @@ interface AssembleReviewPromptInput {
4604
4279
  patchId: string;
4605
4280
  priorLedgerEntries?: FindingLedgerEntry[];
4606
4281
  profile: FactoryProjectProfile;
4607
- standingChecklist?: readonly string[];
4608
4282
  }
4609
4283
  interface AssembledReviewPrompt {
4610
4284
  prompt: string;
@@ -4618,8 +4292,7 @@ declare const assembleReviewPrompt: ({
4618
4292
  kind,
4619
4293
  patchId,
4620
4294
  priorLedgerEntries,
4621
- profile,
4622
- standingChecklist
4295
+ profile
4623
4296
  }: AssembleReviewPromptInput) => AssembledReviewPrompt;
4624
4297
  //#endregion
4625
4298
  //#region src/review-ladder-trace.d.ts
@@ -4701,4 +4374,4 @@ interface CreateProgramOptions {
4701
4374
  declare function createProgram(options?: CreateProgramOptions): Command;
4702
4375
  declare function run(argv?: string[]): Promise<void>;
4703
4376
  //#endregion
4704
- export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type BuildRetroEnvelopeInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type ParsedRetroEnvelope, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, REVIEW_FOCUS_SECTION, type RetroEnvelope, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationReuse, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildRetroEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, inferFixedInThreadDispositions, isProductionHqUrl, isRetroEnvelopeWireComplete, loadProjectProfile, normalizeIssueComments, openLadderFindings, parseRetroEnvelope, planPublishFollowUp, pr_body_metadata_d_exports as prReadinessBodyMetadata, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, post_readiness_comments_d_exports as prReadinessPostComments, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, publishEpicStructure, readDemandWaivers, readPrReadyProof, readPrReviewProof, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, retroEnvelopeSchemaVersionOf, retroEnvelopeV1Schema, retroEpicReference, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };
4377
+ export { type AppendFactoryTraceEventResult, type AssembledReviewPrompt, type BoundaryCheckArgs, type BoundaryCheckDependencies, type BoundaryCheckProofRecord, type BuildEpicStructureEventInput, type BuildRetroEnvelopeInput, type CloudflareAccessServiceToken, CreateProgramOptions, DEFAULT_DEMAND_WAIVER_PATH, DEFAULT_FACTORY_REPOSITORY, type DagDocument, type DemandWaiveArgs, type DemandWaiveDependencies, DemandWaiveRefusalError, type DemandWaiver, type DemandWaiverStore, EPIC_STRUCTURE_NODE_STATUSES, EPIC_STRUCTURE_SCHEMA_VERSION, type EpicStructureEvent, type EpicStructureGraphPayload, type EpicStructureNodeStatus, EpicStructureValidationError, type EvidenceEmitArgs, type EvidenceEmitDependencies, type EvidenceEmitResult, type FactoryCliInvocation, FactoryCliInvocationSchema, type FactoryProjectProfile, type FactoryTraceDiagnostic, type FactoryTraceEnvelope, type FactoryTraceEvent, type FindingDisposition, type FindingLedgerEntry, type FollowUpAction, FollowUpActionSchema, type IssueReviewFocus, type LadderDispositionDeclaration, MERGE_FREEZE_APP_SLUG, MERGE_FREEZE_CHECK_NAME, type MergeFreezeState, type ParsedRetroEnvelope, type PrPublishArgs, type PrPublishDependencies, PrPublishFollowUpError, type PrPublishFollowUpOutcome, type PrPublishHandoff, type PrPublishResult, type PrReadyArgs, type PrReadyProof, type PublishEpicStructureArgs, type PublishEpicStructureResult, type PublishFollowUpPlan, RETRO_ENVELOPE_SCHEMA_VERSION, RETRO_ENVELOPE_VALIDATORS, REVIEW_FOCUS_SECTION, type RetroEnvelope, type ReviewGateNotRequiredProof, type ReviewGateTraceIdentity, type ReviewLadderCycle, type ReviewLadderEvaluation, type ReviewLadderPolicy, type ReviewLadderStageEvent, type ReviewLadderTraceIdentity, type ReviewPromptSection, type ReviewPromptSectionProvenance, SUPPORTED_RETRO_ENVELOPE_SCHEMA_VERSIONS, type ScanFactoryTraceDiagnosticsOptions, type ScanFactoryTraceOptions, type ScanFactoryTraceResult, type TraceMirrorDiagnostic, type TraceSink, type TraceWriteResult, type TraceWriteSinks, type VerificationReuse, type WaivedDemand, WorkerCheckoutGuardError, type WorkerCloseoutLessonsTraceEvent, appendReviewLadderStageTraceEvent, appendWithTraceSinks, applyDemandWaiver, assembleReviewPrompt, assertWorkerCheckoutAllowed, authorizeDemandWaiver, blockingLadderFindings, boundary_manifest_d_exports as boundaryManifest, boundary_review_proof_d_exports as boundaryReviewProof, buildEpicStructureEvent, buildEpicStructurePayload, buildEvidenceEnvelope, buildRetroEnvelope, buildReviewGateNotRequiredTraceEvent, buildReviewLadderStageTraceEvent, comment_provenance_d_exports as commentProvenance, createLocalJsonlTraceSink, createProgram, doctorProjectProfile, epicStructureEventId, evaluateReviewLadder, evidenceEnvelopeFilename, findingKey, followUpFromArgv, inferFixedInThreadDispositions, isProductionHqUrl, isRetroEnvelopeWireComplete, loadProjectProfile, normalizeIssueComments, openLadderFindings, parseRetroEnvelope, planPublishFollowUp, readiness_evaluation_d_exports as prReadinessEvaluation, external_evidence_d_exports as prReadinessExternalEvidence, pr_body_renderer_d_exports as prReadinessPrBodyRenderer, proof_identity_d_exports as prReadinessProofIdentity, review_proof_d_exports as prReadinessReviewProof, status_check_rollup_d_exports as prReadinessStatusChecks, verification_proof_d_exports as prReadinessVerificationProof, publishEpicStructure, readDemandWaivers, readPrReadyProof, readPrReviewProof, resolveFactoryRepository, resolveFindingBlocking, resolveReviewFindingCategory, resolveReviewFindingSeverity, resolveReviewLadderPolicy, resolveTraceWriteSinks, retroEnvelopeSchemaVersionOf, retroEnvelopeV1Schema, retroEpicReference, reviewCycleStateFor, reviewFocusFromIssueBody, reviewPromptSectionSchema, reviewPromptSectionsSchema, run, runBoundaryCheck, runDemandWaive, runEvidenceEmit, runPrPublish, runPrReady, runPrReview, runPrVerify, scanFactoryTraceDiagnostics, scanFactoryTraceEvents, selectWaiversForCandidate, staleRepeatLadderFindings, toFactoryTraceEnvelope, tryAppendReviewGateNotRequiredTraceEvent, tryAppendReviewLadderStageTraceEvent, validateBoundaryCheckProof, validateDagDocument, validateDemandWaiverStore, validateFactoryTraceEvent, validateMergeFreezeState, validatePrReadyProof, validatePrReviewProof, validatePrVerifyProof, waivedDemandNotice, waivedDemandSchema, worktree_scratch_files_d_exports as worktreeScratchFiles };