@telora/daemon 0.22.137 → 0.22.146

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 (78) hide show
  1. package/build-info.json +13 -3
  2. package/dist/audit/audit-phase.d.ts +34 -1
  3. package/dist/audit/audit-phase.d.ts.map +1 -1
  4. package/dist/audit/audit-phase.js +92 -9
  5. package/dist/audit/audit-phase.js.map +1 -1
  6. package/dist/audit/audit-prompt.d.ts +174 -0
  7. package/dist/audit/audit-prompt.d.ts.map +1 -1
  8. package/dist/audit/audit-prompt.js +365 -2
  9. package/dist/audit/audit-prompt.js.map +1 -1
  10. package/dist/completion/review-coverage-shas.d.ts +49 -0
  11. package/dist/completion/review-coverage-shas.d.ts.map +1 -0
  12. package/dist/completion/review-coverage-shas.js +128 -0
  13. package/dist/completion/review-coverage-shas.js.map +1 -0
  14. package/dist/completion/review-exit-deps.d.ts +15 -2
  15. package/dist/completion/review-exit-deps.d.ts.map +1 -1
  16. package/dist/completion/review-exit-deps.js +9 -3
  17. package/dist/completion/review-exit-deps.js.map +1 -1
  18. package/dist/delivery/delivery-review-coverage.d.ts +216 -0
  19. package/dist/delivery/delivery-review-coverage.d.ts.map +1 -0
  20. package/dist/delivery/delivery-review-coverage.js +208 -0
  21. package/dist/delivery/delivery-review-coverage.js.map +1 -0
  22. package/dist/queries/focus-branch-work-evidence.d.ts +55 -0
  23. package/dist/queries/focus-branch-work-evidence.d.ts.map +1 -0
  24. package/dist/queries/focus-branch-work-evidence.js +65 -0
  25. package/dist/queries/focus-branch-work-evidence.js.map +1 -0
  26. package/dist/queries/focus-criteria-standing.d.ts +138 -0
  27. package/dist/queries/focus-criteria-standing.d.ts.map +1 -0
  28. package/dist/queries/focus-criteria-standing.js +98 -0
  29. package/dist/queries/focus-criteria-standing.js.map +1 -0
  30. package/dist/queries/focus-review-watermark.d.ts +35 -0
  31. package/dist/queries/focus-review-watermark.d.ts.map +1 -0
  32. package/dist/queries/focus-review-watermark.js +47 -0
  33. package/dist/queries/focus-review-watermark.js.map +1 -0
  34. package/dist/queries/focuses.d.ts +0 -9
  35. package/dist/queries/focuses.d.ts.map +1 -1
  36. package/dist/queries/focuses.js +0 -14
  37. package/dist/queries/focuses.js.map +1 -1
  38. package/dist/queries/shared.js +1 -1
  39. package/dist/queries/verification.d.ts +23 -25
  40. package/dist/queries/verification.d.ts.map +1 -1
  41. package/dist/queries/verification.js +66 -45
  42. package/dist/queries/verification.js.map +1 -1
  43. package/dist/resolvers/assembly-engine.d.ts +51 -0
  44. package/dist/resolvers/assembly-engine.d.ts.map +1 -1
  45. package/dist/resolvers/assembly-engine.js +10 -20
  46. package/dist/resolvers/assembly-engine.js.map +1 -1
  47. package/dist/resolvers/branch-work-arming.d.ts +133 -0
  48. package/dist/resolvers/branch-work-arming.d.ts.map +1 -0
  49. package/dist/resolvers/branch-work-arming.js +67 -0
  50. package/dist/resolvers/branch-work-arming.js.map +1 -0
  51. package/dist/resolvers/focus-criteria-standing.d.ts +24 -0
  52. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -0
  53. package/dist/resolvers/focus-criteria-standing.js +234 -0
  54. package/dist/resolvers/focus-criteria-standing.js.map +1 -0
  55. package/dist/resolvers/focus-review-coverage.d.ts +189 -0
  56. package/dist/resolvers/focus-review-coverage.d.ts.map +1 -0
  57. package/dist/resolvers/focus-review-coverage.js +516 -0
  58. package/dist/resolvers/focus-review-coverage.js.map +1 -0
  59. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  60. package/dist/resolvers/git-diff-against-base.js +11 -0
  61. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  62. package/dist/resolvers/index.d.ts.map +1 -1
  63. package/dist/resolvers/index.js +7 -1
  64. package/dist/resolvers/index.js.map +1 -1
  65. package/dist/resolvers/reality-tree-snapshot.d.ts +9 -4
  66. package/dist/resolvers/reality-tree-snapshot.d.ts.map +1 -1
  67. package/dist/resolvers/reality-tree-snapshot.js +64 -17
  68. package/dist/resolvers/reality-tree-snapshot.js.map +1 -1
  69. package/dist/resolvers/shared/branch-fact-provenance.d.ts +258 -0
  70. package/dist/resolvers/shared/branch-fact-provenance.d.ts.map +1 -0
  71. package/dist/resolvers/shared/branch-fact-provenance.js +571 -0
  72. package/dist/resolvers/shared/branch-fact-provenance.js.map +1 -0
  73. package/dist/resolvers/shared/reality-tree-arrival.d.ts +71 -0
  74. package/dist/resolvers/shared/reality-tree-arrival.d.ts.map +1 -0
  75. package/dist/resolvers/shared/reality-tree-arrival.js +129 -0
  76. package/dist/resolvers/shared/reality-tree-arrival.js.map +1 -0
  77. package/dist/testing/fixtures/index.js +1 -1
  78. package/package.json +2 -2
package/build-info.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "commitSha": "2121c24f4",
3
- "builtAt": "2026-09-19T00:06:45.021Z",
2
+ "commitSha": "aa3dff377",
3
+ "builtAt": "2026-09-19T15:06:51.256Z",
4
4
  "expectedMigrations": [
5
5
  "20250829113330_create_org_nodes_table.sql",
6
6
  "20250829113402_fix_function_security_search_path.sql",
@@ -797,6 +797,16 @@
797
797
  "20260918164504_add_delivery_duplicate_anchor_attribution.sql",
798
798
  "20260918172201_add_reality_tree_duplicate_tree_attribution.sql",
799
799
  "20260918182209_enforce_single_undeclared_anchor_and_tree.sql",
800
- "20260918192344_bind_duplicate_declaration_to_its_target.sql"
800
+ "20260918192344_bind_duplicate_declaration_to_its_target.sql",
801
+ "20260919001339_add_delivery_unreviewed_residue_attribution.sql",
802
+ "20260919004644_add_focus_arm_baseline.sql",
803
+ "20260919021207_add_focus_arm_baseline_provenance.sql",
804
+ "20260919021847_add_focus_reviewed_through_shas.sql",
805
+ "20260919035205_lock_focus_arm_baseline_backfill_execute.sql",
806
+ "20260919041638_add_focus_branch_work_delivery_ids.sql",
807
+ "20260919051558_branch_work_evidence_is_three_valued.sql",
808
+ "20260919055846_branch_work_reading_carries_when_it_was_taken.sql",
809
+ "20260919064346_add_injection_unearned_promotion_attribution.sql",
810
+ "20260919081939_branch_work_reading_is_positive_only.sql"
801
811
  ]
802
812
  }
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Autonomous reality-tree audit phase.
3
+ *
4
+ * Replaces the runAuditPhase scaffold with a one-shot LLM assessor session
5
+ * that compares the focus's observable state against the CRT/FRT and mutates
6
+ * the graph via reality_tree_* MCP tools. The session's narrated summary
7
+ * is captured to an `audit_runs` row for human review.
8
+ *
9
+ * Failure modes never throw -- each path returns outcome='continue' with
10
+ * an explanatory rationale and metadata.errors entries. This keeps the
11
+ * focus loop running so a transient audit failure does not stall execution.
12
+ */
13
+ import { type AssemblySignals } from '../resolvers/assembly-engine.js';
1
14
  import { type FocusPhaseOutcome } from '../queries/focus-cycle-evaluations.js';
2
15
  import { type AuditRunRow, type AuditRunStatus, type RecentAuditRun } from '../queries/audit-runs.js';
3
16
  import { type AuditSpawnOptions, type AuditSpawnResult } from '../spawn/index.js';
@@ -59,6 +72,26 @@ export interface AuditGateDelivery {
59
72
  executionStatus: string | null;
60
73
  updatedAt?: string | null;
61
74
  }
75
+ /**
76
+ * One assembly run's output as the phase consumes it: the prompt text AND the
77
+ * out-of-band findings the resolvers raised on the SAME run.
78
+ *
79
+ * The pair travels together deliberately. The arming gate below is a decision
80
+ * about a fact only the review-coverage resolver can establish, and the first
81
+ * cut of that gate read the fact back out of `text` -- which most of the time
82
+ * is content other parties authored, so a delivery NAME could assert it (and,
83
+ * being stored, assert it on every tick thereafter: a freeze rather than a
84
+ * one-cycle hold). `signals` is set by resolver code and never derived from
85
+ * resolved text, so nothing a human or an agent writes into a row can reach
86
+ * it. Required, not optional, so a future producer of this shape has to decide
87
+ * what it is reporting rather than dropping the channel by omission.
88
+ */
89
+ export interface AssembledAuditContext {
90
+ /** The composed prompt. Read as prose; never parsed for a control decision. */
91
+ text: string;
92
+ /** What the resolvers reported mechanically on this run. */
93
+ signals: AssemblySignals;
94
+ }
62
95
  export interface AuditSummary {
63
96
  summaryMd: string | null;
64
97
  nodesTouched: number;
@@ -70,7 +103,7 @@ export type { AuditSpawnOptions, AuditSpawnResult } from '../spawn/index.js';
70
103
  * spawning processes or hitting Supabase.
71
104
  */
72
105
  export interface AuditPhaseDeps {
73
- assembleContext: (focusId: string, recipe: readonly string[]) => Promise<string>;
106
+ assembleContext: (focusId: string, recipe: readonly string[]) => Promise<AssembledAuditContext>;
74
107
  insertAuditRun: (input: {
75
108
  focusId: string;
76
109
  cycleNumber: number;
@@ -1 +1 @@
1
- {"version":3,"file":"audit-phase.d.ts","sourceRoot":"","sources":["../../src/audit/audit-phase.ts"],"names":[],"mappings":"AAwBA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAQlD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAM5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,QAAiB,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC;;;;;;GAMG;AACH,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,KAAK,YAAY,GAClB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QA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@@ -1,5 +1,6 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
2
  // Pinned by: packages/daemon/src/audit/audit-phase.test.ts,
3
+ // packages/daemon/src/completion/review-coverage-seam.test.ts,
3
4
  // packages/daemon/src/queries/focus-deliveries-wire-parity.test.ts,
4
5
  // packages/daemon/src/spawn/audit-spawn-stream-json.test.ts,
5
6
  // packages/daemon/src/spawn/audit-spawn-telemetry-config.test.ts
@@ -16,7 +17,8 @@
16
17
  * an explanatory rationale and metadata.errors entries. This keeps the
17
18
  * focus loop running so a transient audit failure does not stall execution.
18
19
  */
19
- import { resolveAssemblyRecipe } from '../resolvers/assembly-engine.js';
20
+ import { resolveAssemblyRecipeWithManifest, } from '../resolvers/assembly-engine.js';
21
+ import { readUnrecordedBranchWorkHold, } from '../resolvers/branch-work-arming.js';
20
22
  // Register resolvers used by the audit recipe at module load (side effect).
21
23
  import { initResolvers } from '../resolvers/index.js';
22
24
  initResolvers();
@@ -44,6 +46,21 @@ export const AUDIT_ASSEMBLY_RECIPE = [
44
46
  'git.diff_against_base',
45
47
  'agent_session_summaries',
46
48
  'agent_escalations',
49
+ // The focus's OWN declared criteria before either of the two sections that
50
+ // follow. This is the stopping condition: it answers "is there anything left
51
+ // that this focus said it was for?" -- a question about the focus's whole
52
+ // contract, which is an altitude above "is this particular fact residue of
53
+ // unreviewed work?" and above the tree the pass anchors into. Read in the
54
+ // other order, the pass would already be reasoning about WHAT to anchor
55
+ // before it knows WHETHER anything is still owed, and an elaboration loop
56
+ // that never asks the second question does not stop.
57
+ 'focus.criteria_standing',
58
+ // Review state BEFORE the tree it is about to anchor into: the pass must know,
59
+ // for every fact it just read in the diff and the session summaries, whether
60
+ // the delivery that produced it has been through focus review. Reading it
61
+ // after the snapshot would put the anchoring decision ahead of its own
62
+ // precondition.
63
+ 'focus.review_coverage',
47
64
  'reality_tree.snapshot',
48
65
  ];
49
66
  /**
@@ -193,7 +210,13 @@ async function defaultAssembleContext(focusId, recipe) {
193
210
  organizationId: config.organizationId,
194
211
  productId: config.productId,
195
212
  };
196
- return await resolveAssemblyRecipe([...recipe], ctx);
213
+ // The manifest-bearing entry point rather than the bare-string one, because
214
+ // it is the only thing that MINTS the signals sink and hands it to the
215
+ // resolvers. Taking the string form here would leave the arming gate below
216
+ // permanently un-fed -- and silently, since an empty sink is a legal "no
217
+ // finding". That is the wiring hop worth stating out loud.
218
+ const { content, signals } = await resolveAssemblyRecipeWithManifest([...recipe], ctx);
219
+ return { text: content, signals };
197
220
  }
198
221
  async function defaultGetCurrentCycleNumber(focusId) {
199
222
  const prev = await getRecentFocusCycleEvaluation(focusId);
@@ -234,6 +257,67 @@ export const defaultAuditDeps = {
234
257
  // ---------------------------------------------------------------------------
235
258
  // Core phase
236
259
  // ---------------------------------------------------------------------------
260
+ /**
261
+ * Resolve the assessor's context, recording an assembly failure as an error
262
+ * rather than aborting the phase: an assessor with no context is worth less
263
+ * than one with it, but a cycle that cannot assemble is not a cycle that must
264
+ * not run. Extracted so the arming gate below reads as its own step next to
265
+ * the three gates above it, and so runAuditPhase does not grow.
266
+ */
267
+ async function assembleAuditContext(focusId, deps, errors) {
268
+ try {
269
+ return await deps.assembleContext(focusId, AUDIT_ASSEMBLY_RECIPE);
270
+ }
271
+ catch (err) {
272
+ errors.push(`assembly: ${err.message}`);
273
+ // No text and no findings. An assembly that threw PROVED nothing, so it
274
+ // withholds nothing from the create gate and must not disarm the pass --
275
+ // the same rule the resolver applies to a failed write that found no
276
+ // residue. Treating an unreadable assembly as a hold would freeze the
277
+ // focus for the duration of any assembly outage.
278
+ return { text: '', signals: {} };
279
+ }
280
+ }
281
+ /**
282
+ * The gate for the one failure the delivery-create gate cannot cover for
283
+ * itself: `focus.review_coverage` PROVED that a delivery whose own columns say
284
+ * it produced nothing has commits on the focus branch, and could not hand that
285
+ * fact to the gate.
286
+ *
287
+ * WHY THE REFUSAL IS HERE AND NOT AT THE GATE. At that point the focus row and
288
+ * the delivery row are byte-identical to a focus whose branch is genuinely
289
+ * clean -- a commit moves no row, and the write that would have recorded it is
290
+ * the one that failed -- so no rule the gate could be given refuses this focus
291
+ * without also refusing every declared-but-unstarted delivery everywhere. The
292
+ * daemon is the only party that holds the reading, and the only lever it still
293
+ * has without a write is whether a create-capable pass exists at all. Full
294
+ * argument: `packages/daemon/src/resolvers/branch-work-arming.ts`.
295
+ *
296
+ * Shaped exactly like the three gates above (skip the spawn, 'continue', a
297
+ * named gateReason) because it IS one: it rations the assessor on a
298
+ * precondition, and the next tick retries. It is the only one of the four that
299
+ * rations for correctness rather than for cost, which is why it sits last --
300
+ * after the cheap gates have already declined most cycles.
301
+ */
302
+ function gateUnrecordedBranchWorkHold(cycleNumber, hold, metadata, errors) {
303
+ metadata.gated = true;
304
+ metadata.gateReason = 'branch_work_hold_unrecorded';
305
+ // The ids come off the SIGNAL, not off the prompt: the rationale is a report
306
+ // of the decision, and re-reading the text to describe it would put authored
307
+ // content back into the record of a machine decision.
308
+ metadata.branchWorkProvedDeliveryIds = [...hold.provedDeliveryIds];
309
+ metadata.branchWorkHoldCause = hold.cause;
310
+ if (errors.length > 0)
311
+ metadata.errors = errors;
312
+ return {
313
+ outcome: 'continue',
314
+ rationale: `audit cycle ${cycleNumber} skipped -- the review-coverage read proved committed work on ` +
315
+ `the focus branch for delivery ${hold.provedDeliveryIds.join(', ')}, which the create gate ` +
316
+ `reads as unstarted, and could not record it (${hold.cause}); no create-capable pass is ` +
317
+ 'armed while the gate is blind to that residue',
318
+ metadata,
319
+ };
320
+ }
237
321
  /**
238
322
  * Run the audit phase for a focus. Spawns a one-shot assessor, captures
239
323
  * the audit-summary tail block, and writes an audit_runs row. Always
@@ -338,13 +422,12 @@ export async function runAuditPhase(focusId, deps = defaultAuditDeps, posture =
338
422
  metadata,
339
423
  };
340
424
  }
341
- let assembled = '';
342
- try {
343
- assembled = await deps.assembleContext(focusId, AUDIT_ASSEMBLY_RECIPE);
344
- }
345
- catch (err) {
346
- errors.push(`assembly: ${err.message}`);
347
- }
425
+ const { text: assembled, signals } = await assembleAuditContext(focusId, deps, errors);
426
+ // The arming gate (see gateUnrecordedBranchWorkHold). Its input is the typed
427
+ // signal and NOTHING else: `assembled` is prose from here on.
428
+ const hold = readUnrecordedBranchWorkHold(signals);
429
+ if (hold)
430
+ return gateUnrecordedBranchWorkHold(cycleNumber, hold, metadata, errors);
348
431
  const config = deps.getConfig();
349
432
  const auditPrompt = buildAuditPrompt(posture);
350
433
  const prompt = assembled
@@ -1 +1 @@
1
- {"version":3,"file":"audit-phase.js","sourceRoot":"","sources":["../../src/audit/audit-phase.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4DAA4D;AAC5D,sEAAsE;AACtE,+DAA+D;AAC/D,mEAAmE;AACnE,gBAAgB;AAEhB;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,qBAAqB,EAAwB,MAAM,iCAAiC,CAAC;AAC9F,4EAA4E;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,aAAa,EAAE,CAAC;AAChB,OAAO,EACL,6BAA6B,GAE9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,GAIlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EACL,eAAe,IAAI,sBAAsB,GAG1C,MAAM,mBAAmB,CAAC;AAG3B,8EAA8E;AAC9E,0CAA0C;AAC1C,8EAA8E;AAE9E;;;;;GAKG;AACH,M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Q,KAAK,CAAC,CAAC,CAAC;IAChE,MAAM,SAAS,GAAmB,SAAS;QACzC,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,SAAS,KAAK,IAAI;YAC1B,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,WAAW,CAAC;IAClB,QAAQ,CAAC,cAAc,GAAG,SAAS,CAAC;IAEpC,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,cAAc,CAAC;gBACxB,UAAU;gBACV,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,MAAM,EAAE,SAAS;aAClB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,qBAAsB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QACzB,OAAO;YACL,OAAO,EAAE,UAAU;YACnB,SAAS,EAAE,eAAe,WAAW,mBAAmB,MAAM,CAAC,MAAM,WAAW;YAChF,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,eAAe,WAAW,OAAO,OAAO,CAAC,YAAY,mBAAmB,OAAO,CAAC,YAAY,gBAAgB;QACvH,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -23,6 +23,180 @@
23
23
  * manufactures a human-review hold that does not exist (Bell CSN 2026-07-27).
24
24
  */
25
25
  export type AuditPosture = 'read_only' | 'live';
26
+ /**
27
+ * Round-5 pre-condition: the focus's own declared floor.
28
+ *
29
+ * Deliberately OUTSIDE the SHARED-AUDIT-GUIDE sentinels, for the same reason
30
+ * the residue hold below is: it states a precondition that only a pass holding
31
+ * the daemon's `focus.criteria_standing` section can satisfy, and the MCP
32
+ * guide's readers have no such section.
33
+ *
34
+ * WHY IT EXISTS. Round 5 anchors one remediation delivery per injection, and
35
+ * nothing in that loop ever asked what the focus SAID IT WAS FOR. An
36
+ * elaboration loop with no stated stopping condition does not stop -- it runs
37
+ * until someone gets tired -- so a focus grows deliveries while its declared
38
+ * criteria sit close to met. The standing section is the stated condition; this
39
+ * text is what makes the pass CONSULT it before it anchors, rather than after.
40
+ *
41
+ * The bases are given distinct instructions on purpose. The one that must not
42
+ * collapse into the others is `no_criteria_declared`: an empty criteria set is
43
+ * UNMEASURED, not arrived, and a pass that read it as a floor would stop
44
+ * hardest on exactly the focuses that declared nothing to be measured against.
45
+ *
46
+ * WHAT THE FLOOR IS NOT (round-5 correction, 2026-09-18). An earlier wording
47
+ * made CRITERION COVERAGE the test for whether a new root cause could be
48
+ * anchored, which converts the floor into the freeze the request rules out: a
49
+ * genuinely new root cause is perfectly capable of sitting inside an
50
+ * already-addressed criterion, and suppressing it there loses real signal to a
51
+ * bookkeeping fact about which criteria have deliveries pointing at them. The
52
+ * floor turns on RESIDUE (or restatement) vs GENUINELY NEW ROOT CAUSE, which
53
+ * is orthogonal to coverage: coverage answers "is there open declared work?",
54
+ * never "is this cause new?".
55
+ *
56
+ * WHY THE FLOOR IS DATA (rounds 6-7, 2026-09-19). Two earlier guards READ the
57
+ * hand-written floor prose looking for a restriction -- one sentence at a time,
58
+ * then across a wider window -- and both lost the same way: the restriction
59
+ * moved to a sentence the reading missed, or a wording its vocabulary lacked.
60
+ * So the normative content became the structure below, the prose became its
61
+ * rendering, and no rule carries a sentence of its own. The normative sentence
62
+ * is COMPOSED from the rule's typed fields against a CLOSED lexicon
63
+ * (`CANDIDATE_SUBJECT`, `DISPOSITION_VERB`, `UNCONDITIONAL_SCOPE`): subject
64
+ * from `candidate`, verb from `disposition`, scope from `conditions`, where an
65
+ * empty `conditions` renders an explicit "in every case this basis can present"
66
+ * rather than a silence a reader fills with the old freeze. Keep that: it makes
67
+ * a CONDITION countable instead of something to read prose for.
68
+ *
69
+ * WHY THE REMAINING PROSE IS PINNED BY EQUALITY (round-8 correction,
70
+ * 2026-09-19). Round 7 left the context prose -- leads, situations, caveats,
71
+ * obligations, and the two paragraphs `renderFloorSection` writes directly --
72
+ * guarded by `findFloorProseViolations`, and the commit that shipped it called
73
+ * that "a whitelist of CHANNEL, not an enumeration of wording". THAT CLAIM WAS
74
+ * FALSE, and review demonstrated it. `CANDIDATE_NOUN` and
75
+ * `DISPOSITION_VERB_IN_PROSE` are finite regex vocabularies, so the guard only
76
+ * recognised a normative claim written in words it already knew: appending
77
+ * "Fresh findings wait for review." or "A genuinely new root cause proceeds
78
+ * after every existing delivery is reviewed." draws NO violation and renders a
79
+ * contradictory restriction. Fourth iteration of one lesson, now unmistakable:
80
+ * ANY guard asking "does this text MEAN something normative?" loses, because
81
+ * meaning is open-ended.
82
+ *
83
+ * So the floor stops asking. This policy is a static constant, so the strings
84
+ * it can put in front of an assessor are a fixed, finite set, and the PRIMARY
85
+ * GUARANTEE is an equality pin on the whole rendered section:
86
+ * `FLOOR_SECTION_PIN` in audit-phase.test.ts holds an independent copy and the
87
+ * suite asserts `renderFloorSection()` equals it line for line. A synonym, an
88
+ * unlisted vocabulary and a wording nobody imagined then fail identically --
89
+ * not because a rule recognises them, but because none of them are the pinned
90
+ * string. It covers EVERY string the assessor reads here, the two paragraphs
91
+ * `renderFloorSection` writes among them, which no field-level guard ever saw.
92
+ *
93
+ * The cost is the intended one: editing floor prose is a TWO-PLACE, VISIBLE act
94
+ * -- the author updates the pin in the same change and a reviewer reads both
95
+ * halves. The pin is literal text rather than a checksum precisely so that
96
+ * second half stays readable. Its LIMIT, plainly: the pin is scoped to this
97
+ * floor section. It does not cover `AUDIT_UNREVIEWED_RESIDUE`, the posture
98
+ * sections, or `AUDIT_GUIDE_SHARED` (which carries its own byte pin against the
99
+ * MCP copy, in audit-guide-sync.test.ts).
100
+ */
101
+ /** A candidate for anchoring, in the floor's own terms. */
102
+ export type AnchorCandidate = 'residue_or_restatement' | 'new_root_cause';
103
+ /** What the floor does with a candidate. */
104
+ export type AnchorDisposition = 'withhold' | 'anchor';
105
+ /**
106
+ * A fact a pass could mistake for the test. A factor named here is rendered as
107
+ * explicitly NOT deciding; it may never appear as a condition (tests pin that).
108
+ */
109
+ export type NonDecidingFactor = 'criterion_coverage';
110
+ /**
111
+ * One normative rule of the floor: what happens to a candidate, and on what.
112
+ *
113
+ * Every field is a typed enum or a DECLARED list. There is deliberately no
114
+ * sentence field: the rule's sentence is composed from these fields, because a
115
+ * hand-written sentence is the one place a restriction can sit where no
116
+ * structural channel sees it.
117
+ */
118
+ export interface AnchoringRule {
119
+ readonly candidate: AnchorCandidate;
120
+ readonly disposition: AnchorDisposition;
121
+ /**
122
+ * Conditions the disposition genuinely depends on. EMPTY means
123
+ * UNCONDITIONAL. This is the ONLY door through which a condition on
124
+ * anchoring can reach the rendered prompt.
125
+ */
126
+ readonly conditions: readonly string[];
127
+ /** Facts that never decide this disposition; rendered as "not the test". */
128
+ readonly nonDeciding: readonly NonDecidingFactor[];
129
+ /** What is OWED when the disposition is exercised. An obligation is not a gate. */
130
+ readonly obligations: readonly string[];
131
+ }
132
+ /** One basis the criteria-standing section can report, with its own rules. */
133
+ export interface FloorBasis {
134
+ /** Machine token the standing section reports (or `read_failed`). */
135
+ readonly basis: string;
136
+ /** Whether this basis IS a floor. `no_criteria_declared` is NOT one. */
137
+ readonly isFloor: boolean;
138
+ /** Bolded opening of the rendered bullet. Context, never a disposition. */
139
+ readonly lead: string;
140
+ /** What the basis means, before any rule applies. Context, never a disposition. */
141
+ readonly situation: string;
142
+ readonly rules: readonly AnchoringRule[];
143
+ /** Closing clarification for the basis. Context, never a disposition. */
144
+ readonly caveat?: string;
145
+ }
146
+ /** The floor's whole normative content, in one declarable structure. */
147
+ export interface FloorPolicy {
148
+ /** Bolded opening of the universal paragraph. */
149
+ readonly universalLead: string;
150
+ /** Rules that hold at EVERY basis. */
151
+ readonly universal: readonly AnchoringRule[];
152
+ /** Closing prose of the universal paragraph. Context, never a disposition. */
153
+ readonly universalClosing: readonly string[];
154
+ readonly bases: readonly FloorBasis[];
155
+ }
156
+ /**
157
+ * The declared floor. Everything normative the floor says about what may be
158
+ * anchored is in the TYPED fields here; the prose below is generated from
159
+ * them, and the free-text fields carry context only.
160
+ */
161
+ export declare const AUDIT_FLOOR_POLICY: FloorPolicy;
162
+ /** Where a rule is being stated: the universal paragraph, or one basis. */
163
+ export type RuleScope = 'universal' | 'basis';
164
+ /** A free-text field of the policy, with the path it sits at. */
165
+ export interface ProseField {
166
+ readonly path: string;
167
+ readonly text: string;
168
+ }
169
+ /** A prose field that has strayed into stating the floor's normative content. */
170
+ export interface FloorProseViolation {
171
+ readonly path: string;
172
+ readonly text: string;
173
+ readonly reason: string;
174
+ }
175
+ /**
176
+ * Every free-text field of the policy. `conditions` is deliberately absent: it
177
+ * IS the declared channel for a scope, and it is counted rather than banned.
178
+ *
179
+ * Exported so the suite can prove the equality pin COVERS this set (every
180
+ * field's exact text appears verbatim inside the pinned render) rather than
181
+ * trusting a hand-maintained field list that goes stale on the next addition.
182
+ */
183
+ export declare function floorProseFields(policy?: FloorPolicy): readonly ProseField[];
184
+ /**
185
+ * Prose fields that state normative content IN A WORDING THESE LISTS KNOW. An
186
+ * empty result means "nothing recognised", NEVER "nothing normative" -- see the
187
+ * BACKSTOP note above for why no wording list can mean the latter. The
188
+ * completeness guarantee is the equality pin in audit-phase.test.ts; this only
189
+ * makes the recognised cases fail earlier, at load, with a named path. Exported
190
+ * so a test can demonstrate rejection on a mutated policy.
191
+ */
192
+ export declare function findFloorProseViolations(policy?: FloorPolicy): readonly FloorProseViolation[];
193
+ /** Render the policy: the universal paragraph, then one bullet per basis. */
194
+ export declare function renderFloorPolicy(policy?: FloorPolicy): readonly string[];
195
+ /**
196
+ * The composed floor section: the pointer at the standing section (which
197
+ * states no rule about what may be anchored), then the rendered policy.
198
+ */
199
+ export declare function renderFloorSection(policy?: FloorPolicy): readonly string[];
26
200
  /**
27
201
  * Compose the audit assessor prompt for a given posture. The read-only and live
28
202
  * postures differ ONLY in the posture section; the discipline (AUDIT_GUIDE_SHARED)
@@ -1 +1 @@
1
- {"version":3,"file":"audit-prompt.d.ts","sourceRoot":"","sources":["../../src/audit/audit-prompt.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;AAiLhD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAQ9D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,QAAgC,CAAC"}
1
+ {"version":3,"file":"audit-prompt.d.ts","sourceRoot":"","sources":["../../src/audit/audit-prompt.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;AAiLhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAEH,2DAA2D;AAC3D,MAAM,MAAM,eAAe,GAAG,wBAAwB,GAAG,gBAAgB,CAAC;AAE1E,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,4EAA4E;IAC5E,QAAQ,CAAC,W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