audit-tools 0.35.6 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/audit/clarification/blastRadius.d.ts +5 -6
  2. package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
  3. package/dist/audit/clarification/blastRadius.js +18 -5
  4. package/dist/audit/clarification/blastRadius.js.map +1 -1
  5. package/dist/audit/clarification/partition.d.ts.map +1 -1
  6. package/dist/audit/clarification/partition.js +5 -4
  7. package/dist/audit/clarification/partition.js.map +1 -1
  8. package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
  9. package/dist/audit/cli/charterClarificationPrompt.js +34 -11
  10. package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
  11. package/dist/audit/cli/charterDeltaPrompt.d.ts +10 -7
  12. package/dist/audit/cli/charterDeltaPrompt.d.ts.map +1 -1
  13. package/dist/audit/cli/charterDeltaPrompt.js +75 -19
  14. package/dist/audit/cli/charterDeltaPrompt.js.map +1 -1
  15. package/dist/audit/cli/charterExtractionPrompt.d.ts +24 -15
  16. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  17. package/dist/audit/cli/charterExtractionPrompt.js +80 -87
  18. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  19. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  20. package/dist/audit/cli/conceptualDispatch.js +5 -1
  21. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  22. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  23. package/dist/audit/cli/confirmIntentStep.js +38 -0
  24. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  25. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  26. package/dist/audit/cli/nextStepCommand.js +17 -7
  27. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  28. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  29. package/dist/audit/cli/nextStepHelpers.js +39 -21
  30. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  31. package/dist/audit/extractors/commentDecomposition.d.ts +8 -6
  32. package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
  33. package/dist/audit/extractors/commentDecomposition.js +56 -10
  34. package/dist/audit/extractors/commentDecomposition.js.map +1 -1
  35. package/dist/audit/extractors/docsDigest.d.ts +13 -0
  36. package/dist/audit/extractors/docsDigest.d.ts.map +1 -0
  37. package/dist/audit/extractors/docsDigest.js +112 -0
  38. package/dist/audit/extractors/docsDigest.js.map +1 -0
  39. package/dist/audit/io/artifacts.d.ts +3 -0
  40. package/dist/audit/io/artifacts.d.ts.map +1 -1
  41. package/dist/audit/io/artifacts.js +16 -1
  42. package/dist/audit/io/artifacts.js.map +1 -1
  43. package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +1 -1
  44. package/dist/audit/orchestrator/charterDeltaExecutor.js +19 -2
  45. package/dist/audit/orchestrator/charterDeltaExecutor.js.map +1 -1
  46. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
  47. package/dist/audit/orchestrator/charterExtractionExecutor.js +19 -4
  48. package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
  49. package/dist/audit/orchestrator/charterPackets.d.ts +44 -0
  50. package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -0
  51. package/dist/audit/orchestrator/charterPackets.js +217 -0
  52. package/dist/audit/orchestrator/charterPackets.js.map +1 -0
  53. package/dist/audit/orchestrator/dependencyMap.d.ts +1 -0
  54. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  55. package/dist/audit/orchestrator/dependencyMap.js +18 -4
  56. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  57. package/dist/audit/orchestrator/dependencySlices.d.ts +0 -15
  58. package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
  59. package/dist/audit/orchestrator/dependencySlices.js +32 -23
  60. package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
  61. package/dist/audit/orchestrator/designReviewPrompt.js +1 -1
  62. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  63. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  64. package/dist/audit/orchestrator/executorRunners.js +2 -1
  65. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  66. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  67. package/dist/audit/orchestrator/executors.js +5 -0
  68. package/dist/audit/orchestrator/executors.js.map +1 -1
  69. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +8 -0
  70. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  71. package/dist/audit/orchestrator/intentCheckpointExecutor.js +53 -6
  72. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  73. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  74. package/dist/audit/orchestrator/nextStep.js +5 -0
  75. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  76. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  77. package/dist/audit/orchestrator/state.js +4 -0
  78. package/dist/audit/orchestrator/state.js.map +1 -1
  79. package/dist/audit/orchestrator/structureExecutors.d.ts +7 -0
  80. package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
  81. package/dist/audit/orchestrator/structureExecutors.js +26 -0
  82. package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
  83. package/dist/audit/types/charterRegister.d.ts +46 -14
  84. package/dist/audit/types/charterRegister.d.ts.map +1 -1
  85. package/dist/audit/types/charterRegister.js +11 -1
  86. package/dist/audit/types/charterRegister.js.map +1 -1
  87. package/dist/audit/types/docsDigest.d.ts +32 -0
  88. package/dist/audit/types/docsDigest.d.ts.map +1 -0
  89. package/dist/audit/types/docsDigest.js +2 -0
  90. package/dist/audit/types/docsDigest.js.map +1 -0
  91. package/dist/audit/validation/artifacts.d.ts.map +1 -1
  92. package/dist/audit/validation/artifacts.js +1 -19
  93. package/dist/audit/validation/artifacts.js.map +1 -1
  94. package/dist/shared/decompose/charterExtraction.d.ts +285 -143
  95. package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
  96. package/dist/shared/decompose/charterExtraction.js +340 -99
  97. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  98. package/dist/shared/index.d.ts +2 -2
  99. package/dist/shared/index.d.ts.map +1 -1
  100. package/dist/shared/index.js +1 -1
  101. package/dist/shared/index.js.map +1 -1
  102. package/dist/shared/types/charter.d.ts +109 -34
  103. package/dist/shared/types/charter.d.ts.map +1 -1
  104. package/dist/shared/types/charter.js +87 -22
  105. package/dist/shared/types/charter.js.map +1 -1
  106. package/dist/shared/types/intentCheckpoint.d.ts +9 -196
  107. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  108. package/dist/shared/types/intentCheckpoint.js +10 -13
  109. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  110. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { GoalGraph } from "audit-tools/shared";
1
+ import type { CharterDelta, GoalGraph } from "audit-tools/shared";
2
2
  /**
3
3
  * Blast radius of a goal node = the size of its transitive PARENT closure — every
4
4
  * goal it (transitively) serves. A fix at this node ripples up to all of them, so
@@ -14,10 +14,9 @@ export declare function goalBlastRadius(graph: GoalGraph, nodeId: string): numbe
14
14
  * Resolve the blast radius for a delta whose subsystem maps to a goal node. When a
15
15
  * delta's node is not present in the goal graph (the host supplied no DAG, or the
16
16
  * subsystem was never linked to a goal), fall back to the delta KIND's intrinsic
17
- * blast tier a `wrong_goal` provocation is intrinsically the highest-blast (it
18
- * challenges the telos), `spec_drift` is mid, an `unstated_assumption` the lowest.
19
- * This keeps ranking meaningful even before a goal graph exists (the common
20
- * conversation-first default), and lets a real graph refine it when present.
17
+ * blast tier. This keeps ranking meaningful even before a goal graph exists (the
18
+ * common conversation-first default), and lets a real graph refine it when
19
+ * present.
21
20
  */
22
- export declare function deltaBlastRadius(graph: GoalGraph, goalNodeId: string | undefined, deltaKind: "unstated_assumption" | "spec_drift" | "wrong_goal"): number;
21
+ export declare function deltaBlastRadius(graph: GoalGraph, goalNodeId: string | undefined, deltaKind: CharterDelta["kind"]): number;
23
22
  //# sourceMappingURL=blastRadius.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blastRadius.d.ts","sourceRoot":"","sources":["../../../src/audit/clarification/blastRadius.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAmBxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,qBAAqB,GAAG,YAAY,GAAG,YAAY,GAC7D,MAAM,CAQR"}
1
+ {"version":3,"file":"blastRadius.d.ts","sourceRoot":"","sources":["../../../src/audit/clarification/blastRadius.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAElE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAmBxE;AAiBD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,GAC9B,MAAM,CAOR"}
@@ -44,17 +44,30 @@ export function goalBlastRadius(graph, nodeId) {
44
44
  }
45
45
  return seen.size;
46
46
  }
47
+ /**
48
+ * The declared intrinsic blast tier per delta kind (design-check resolution-4
49
+ * constraint 3: the tier table rides the taxonomy, single-sourced here). A
50
+ * `wrong_goal` provocation is intrinsically the highest-blast (it challenges the
51
+ * telos); `says_does_drift` and `architecture_betrayal` challenge a channel's
52
+ * account of the subsystem (mid); `doc_rot` is testimony-vs-naming housekeeping
53
+ * (lowest).
54
+ */
55
+ const INTRINSIC_BLAST_TIER = {
56
+ wrong_goal: 3,
57
+ architecture_betrayal: 2,
58
+ says_does_drift: 2,
59
+ doc_rot: 1,
60
+ };
47
61
  /**
48
62
  * Resolve the blast radius for a delta whose subsystem maps to a goal node. When a
49
63
  * delta's node is not present in the goal graph (the host supplied no DAG, or the
50
64
  * subsystem was never linked to a goal), fall back to the delta KIND's intrinsic
51
- * blast tier a `wrong_goal` provocation is intrinsically the highest-blast (it
52
- * challenges the telos), `spec_drift` is mid, an `unstated_assumption` the lowest.
53
- * This keeps ranking meaningful even before a goal graph exists (the common
54
- * conversation-first default), and lets a real graph refine it when present.
65
+ * blast tier. This keeps ranking meaningful even before a goal graph exists (the
66
+ * common conversation-first default), and lets a real graph refine it when
67
+ * present.
55
68
  */
56
69
  export function deltaBlastRadius(graph, goalNodeId, deltaKind) {
57
- const intrinsic = deltaKind === "wrong_goal" ? 3 : deltaKind === "spec_drift" ? 2 : 1;
70
+ const intrinsic = INTRINSIC_BLAST_TIER[deltaKind];
58
71
  if (!goalNodeId)
59
72
  return intrinsic;
60
73
  const graphed = goalBlastRadius(graph, goalNodeId);
@@ -1 +1 @@
1
- {"version":3,"file":"blastRadius.js","sourceRoot":"","sources":["../../../src/audit/clarification/blastRadius.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E;AAC5E,+EAA+E;AAC/E,iFAAiF;AACjF,kFAAkF;AAClF,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,6DAA6D;AAI7D;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,KAAgB,EAAE,MAAc;IAC9D,+DAA+D;IAC/D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC5C,KAAK,MAAM,IAAI,IAAI,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,GAAG,CAAC,OAAO,CAAC,CAAC;QAClB,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YAChD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAAyC;IACjE,UAAU,EAAE,CAAC;IACb,qBAAqB,EAAE,CAAC;IACxB,eAAe,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC;CACX,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAgB,EAChB,UAA8B,EAC9B,SAA+B;IAE/B,MAAM,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAClD,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACnD,uEAAuE;IACvE,gFAAgF;IAChF,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../src/audit/clarification/partition.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,YAAY,EACZ,2BAA2B,EAC3B,SAAS,EACV,MAAM,oBAAoB,CAAC;AAG5B,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,aAAa,EAAE,EACvB,SAAS,EAAE,SAAS,GACnB,2BAA2B,EAAE,CA0B/B"}
1
+ {"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../src/audit/clarification/partition.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,YAAY,EACZ,2BAA2B,EAC3B,SAAS,EACV,MAAM,oBAAoB,CAAC;AAG5B,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA6BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,aAAa,EAAE,EACvB,SAAS,EAAE,SAAS,GACnB,2BAA2B,EAAE,CA0B/B"}
@@ -15,10 +15,11 @@
15
15
  import { deltaBlastRadius } from "./blastRadius.js";
16
16
  /**
17
17
  * A delta is CLARIFICATION-SOURCING when it routes to `clarification` (an
18
- * inferred−stated unstated assumption) or `human` (a wrong-goal provocation, or a
19
- * low-confidence delta forced to the human channel). A `remediator`-routed
20
- * spec-drift delta is NOT a charter question it is a fix, handled by the
21
- * remediator, so it never enters the attention queue.
18
+ * architecture betrayed by its implementation which account governs?) or
19
+ * `human` (a wrong-goal provocation, or a low-confidence delta forced to the
20
+ * human channel). A `remediator`-routed delta (says/does drift, doc rot) is NOT
21
+ * a charter question — it is a fix, handled by the remediator, so it never
22
+ * enters the attention queue.
22
23
  */
23
24
  function sourcesQuestion(delta) {
24
25
  return delta.routed_to === "clarification" || delta.routed_to === "human";
@@ -1 +1 @@
1
- {"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../src/audit/clarification/partition.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,yEAAyE;AACzE,gFAAgF;AAChF,mFAAmF;AACnF,oFAAoF;AACpF,oFAAoF;AACpF,mFAAmF;AACnF,uEAAuE;AACvE,EAAE;AACF,iFAAiF;A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;gBACvE,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC;aACrC;YACD,WAAW,EAAE,aAAa;SAC3B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"charterClarificationPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAA+B,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACvE,MAAM,CAkDR"}
1
+ {"version":3,"file":"charterClarificationPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAA+B,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACvE,MAAM,CA2ER"}
@@ -11,24 +11,47 @@
11
11
  */
12
12
  export function renderCharterClarificationPrompt(bundle, opts) {
13
13
  const asked = bundle.charter_clarification?.asked ?? [];
14
+ // The miner's unified opinion per subsystem + the tool-counted disagreement
15
+ // density — context the user REACTS to when answering (the telos is a lead,
16
+ // never the verdict; the deltas under question are what carries authority).
17
+ const register = bundle.charter_register;
18
+ const telosByNode = new Map((register?.triangulated ?? []).map((t) => [t.node_id, t]));
19
+ const disagreementByNode = new Map();
20
+ for (const d of register?.disagreement ?? []) {
21
+ const list = disagreementByNode.get(d.node_id) ?? [];
22
+ list.push(`${d.pair[0]}↔${d.pair[1]}: ${d.count}`);
23
+ disagreementByNode.set(d.node_id, list);
24
+ }
14
25
  const questionBlocks = asked.length
15
- ? asked.flatMap((q, i) => [
16
- `### Q${i + 1} — subsystem \`${q.node_id}\` (${q.pair[0]} ↔ ${q.pair[1]})`,
17
- `- request_id: \`${q.request_id}\``,
18
- `- blast radius: ${q.value.blast_radius}; cascade: ${q.value.cascade_count}`,
19
- "",
20
- q.question,
21
- "",
22
- ])
26
+ ? asked.flatMap((q, i) => {
27
+ const telos = telosByNode.get(q.node_id);
28
+ const density = disagreementByNode.get(q.node_id);
29
+ return [
30
+ `### Q${i + 1} — subsystem \`${q.node_id}\` (${q.pair[0]} ↔ ${q.pair[1]})`,
31
+ `- request_id: \`${q.request_id}\``,
32
+ `- blast radius: ${q.value.blast_radius}; cascade: ${q.value.cascade_count}`,
33
+ ...(telos
34
+ ? [
35
+ `- unified opinion (triangulated telos, ${telos.confidence} confidence — REACT to it, it is not a verdict): ${telos.telos}`,
36
+ ]
37
+ : []),
38
+ ...(density ? [`- channel disagreement (deltas per pair): ${density.join("; ")}`] : []),
39
+ "",
40
+ q.question,
41
+ "",
42
+ ];
43
+ })
23
44
  : ["- (no interactive questions this round — nothing to ask)"];
24
45
  return [
25
46
  "# Design review — charter clarification (triangulation loop)",
26
47
  "",
27
48
  "The tool has mined the charter deltas into decidable, VOI-ranked questions and",
28
- "surfaces the highest-leverage ones below. Each is **symmetric**: any of the four",
29
- "charters may move — **including Stated** — so do NOT frame this as \"where does",
49
+ "surfaces the highest-leverage ones below. Each is **symmetric**: any charter",
50
+ "may move — **including Stated** — so do NOT frame this as \"where does",
30
51
  "your code violate your intent, shall we fix the code?\" That silently anoints",
31
- "Stated as ground truth and throws away the True-charter payload.",
52
+ "Stated as ground truth and throws away the True-charter payload. Where a",
53
+ "subsystem carries a **triangulated telos**, it is the miner's unified opinion",
54
+ "for the user to react to — useful context, never the answer.",
32
55
  "",
33
56
  "Relay each question to the user and record ONE answer per question:",
34
57
  "- `this_side_wins` — the FIRST charter in the pair governs.",
@@ -1 +1 @@
1
- {"version":3,"file":"charterClarificationPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gCAAgC,CAC9C,MAAsB,EACtB,IAAwE;IAExE,MAAM,KAAK,GACT,MAAM,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE,CAAC;IAE5C,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM;QACjC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG;YAC1E,mBAAmB,CAAC,CAAC,UAAU,IAAI;YACnC,mBAAmB,CAAC,CAAC,KAAK,CAAC,YAAY,cAAc,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE;YAC5E,EAAE;YACF,CAAC,CAAC,QAAQ;YACV,EAAE;SACH,CAAC;QACJ,CAAC,CAAC,CAAC,0DAA0D,CAAC,CAAC;IAEjE,OAAO;QACL,8DAA8D;QAC9D,EAAE;QACF,gFAAgF;QAChF,kFAAkF;QAClF,iFAAiF;QACjF,+EAA+E;QAC/E,kEAAkE;QAClE,EAAE;QACF,qEAAqE;QACrE,6DAA6D;QAC7D,8DAA8D;QAC9D,kEAAkE;QAClE,qFAAqF;QACrF,EAAE;QACF,mDAAmD;QACnD,GAAG,cAAc;QACjB,WAAW;QACX,kCAAkC,IAAI,CAAC,WAAW,qBAAqB;QACvE,EAAE;QACF,SAAS;QACT,GAAG;QACH,gBAAgB;QAChB,uDAAuD;QACvD,2EAA2E;QAC3E,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,kFAAkF;QAClF,6DAA6D;QAC7D,EAAE;QACF,KAAK,IAAI,CAAC,eAAe,EAAE;QAC3B,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"charterClarificationPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterClarificationPrompt.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gCAAgC,CAC9C,MAAsB,EACtB,IAAwE;IAExE,MAAM,KAAK,GACT,MAAM,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE,CAAC;IAC5C,4EAA4E;IAC5E,4EAA4E;IAC5E,4EAA4E;IAC5E,MAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACzC,MAAM,WAAW,GAAG,IAAI,GAAG,CACzB,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAC1D,CAAC;IACF,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAoB,CAAC;IACvD,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC;QAC7C,MAAM,IAAI,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACrD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC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wE;QACxE,+EAA+E;QAC/E,0EAA0E;QAC1E,+EAA+E;QAC/E,8DAA8D;QAC9D,EAAE;QACF,qEAAqE;QACrE,6DAA6D;QAC7D,8DAA8D;QAC9D,kEAAkE;QAClE,qFAAqF;QACrF,EAAE;QACF,mDAAmD;QACnD,GAAG,cAAc;QACjB,WAAW;QACX,kCAAkC,IAAI,CAAC,WAAW,qBAAqB;QACvE,EAAE;QACF,SAAS;QACT,GAAG;QACH,gBAAgB;QAChB,uDAAuD;QACvD,2EAA2E;QAC3E,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,kFAAkF;QAClF,6DAA6D;QAC7D,EAAE;QACF,KAAK,IAAI,CAAC,eAAe,EAAE;QAC3B,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1,13 +1,16 @@
1
1
  import type { ArtifactBundle } from "../io/artifacts.js";
2
2
  /**
3
3
  * Render the charter-DELTA host prompt (Phase C.2). The host here is the
4
- * INDEPENDENT delta-miner: it did NOT author the charters below (a different pass
5
- * did, blind to the deltas), so it reasons over the merged charter set as an
6
- * outside critic finding the real GAPS between charter kinds within each
7
- * subsystem and building the goal DAG across subsystems. The tool supplies the
8
- * ENFORCEMENT half at ingest (the routing table, the Phase-A low-confidence gate);
9
- * the miner never picks routing. Mirrors renderCharterKindLanePrompt's style
10
- * (design of record spec/conceptual-design-review-design.md).
4
+ * INDEPENDENT delta-miner — the triangulation engine: it did NOT author the
5
+ * charters below (three blind channel lanes did, each fed only its own
6
+ * evidence), so it is the first reader to see all channels together. It mines
7
+ * the real GAPS between channels within each subsystem, distills a TRIANGULATED
8
+ * TELOS per subsystem (a unified opinion the owner reacts to — a lead, never a
9
+ * reconciliation; the deltas stay the primary product), builds the goal DAG
10
+ * across subsystems, and — at the deepest ceiling only — may nominate a True
11
+ * charter. The tool supplies the ENFORCEMENT half at ingest (the routing table,
12
+ * the Phase-A gates, the deepest-rung consent check); the miner never picks
13
+ * routing.
11
14
  */
12
15
  export declare function renderCharterDeltaPrompt(bundle: ArtifactBundle, opts: {
13
16
  submissionPath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"charterDeltaPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterDeltaPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAC/B,MAAM,CAuFR"}
1
+ {"version":3,"file":"charterDeltaPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterDeltaPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,GAC/B,MAAM,CAkJR"}
@@ -1,15 +1,20 @@
1
1
  /**
2
2
  * Render the charter-DELTA host prompt (Phase C.2). The host here is the
3
- * INDEPENDENT delta-miner: it did NOT author the charters below (a different pass
4
- * did, blind to the deltas), so it reasons over the merged charter set as an
5
- * outside critic finding the real GAPS between charter kinds within each
6
- * subsystem and building the goal DAG across subsystems. The tool supplies the
7
- * ENFORCEMENT half at ingest (the routing table, the Phase-A low-confidence gate);
8
- * the miner never picks routing. Mirrors renderCharterKindLanePrompt's style
9
- * (design of record spec/conceptual-design-review-design.md).
3
+ * INDEPENDENT delta-miner — the triangulation engine: it did NOT author the
4
+ * charters below (three blind channel lanes did, each fed only its own
5
+ * evidence), so it is the first reader to see all channels together. It mines
6
+ * the real GAPS between channels within each subsystem, distills a TRIANGULATED
7
+ * TELOS per subsystem (a unified opinion the owner reacts to — a lead, never a
8
+ * reconciliation; the deltas stay the primary product), builds the goal DAG
9
+ * across subsystems, and — at the deepest ceiling only — may nominate a True
10
+ * charter. The tool supplies the ENFORCEMENT half at ingest (the routing table,
11
+ * the Phase-A gates, the deepest-rung consent check); the miner never picks
12
+ * routing.
10
13
  */
11
14
  export function renderCharterDeltaPrompt(bundle, opts) {
12
- const subsystems = bundle.charter_register?.subsystems ?? [];
15
+ const register = bundle.charter_register;
16
+ const subsystems = register?.subsystems ?? [];
17
+ const deepest = register?.ceiling.rung === "deepest";
13
18
  const subsystemBlocks = subsystems.length
14
19
  ? subsystems.flatMap((sub) => {
15
20
  const memberPreview = sub.members.slice(0, 12).join(", ");
@@ -19,36 +24,71 @@ export function renderCharterDeltaPrompt(bundle, opts) {
19
24
  const charterLines = sub.charters.length
20
25
  ? sub.charters.map((c) => ` - **${c.kind}** (confidence: ${c.confidence}) — ${c.purpose}`)
21
26
  : [" - (no surviving charters)"];
27
+ const teleologyLines = Object.entries(sub.teleologies ?? {}).flatMap(([kind, nodes]) => (nodes ?? []).map((n) => ` - teleology (${kind}, L${n.premise_height}, ${n.files.length} file(s)) — ${n.purpose}`));
22
28
  return [
23
29
  `- **${sub.node_id}** — ${sub.members.length} file(s): ${memberPreview}${more}`,
24
30
  ...charterLines,
31
+ ...teleologyLines,
25
32
  ];
26
33
  })
27
34
  : [
28
35
  "- (no subsystems carry charters — submit `{ \"subsystems\": [], \"no_deltas\": true }`)",
29
36
  ];
30
37
  return [
31
- "# Design review — charter delta-mining (conceptual, teleological)",
38
+ "# Design review — charter delta-mining + triangulation (conceptual, teleological)",
32
39
  "",
33
40
  "You are the **independent delta-miner**. You did NOT author the charters below",
34
- "— a separate pass extracted them, blind to the gaps you are about to find. Read",
35
- "them as an outside critic: for each subsystem, find the real **GAPS between its",
36
- "charter kinds** (a genuine gap, not every pair), and build the **goal_graph**",
37
- "(nodes/edges) linking the subsystems' purposes across the whole set.",
41
+ "— three blind lanes did, each fed ONLY its own evidence channel (stated =",
42
+ "testimony from docs/comments; structural = intent frozen into the code's",
43
+ "organization; revealed = behavior from comment-stripped bodies). You are the",
44
+ "first reader to hold all channels together. For each subsystem:",
38
45
  "",
39
- "Give each delta a `pair` (two charter kinds) + a `summary` of the gap. The tool",
40
- "ROUTES them (you do not): inferredstated a clarification; stated↔revealed →",
41
- "the remediator; anything↔true the human. A shaky charter downgrades its deltas",
42
- "to the human channel automatically.",
46
+ "1. Mine the real **GAPS between channels** (a genuine divergence, not every",
47
+ " pair). Each channel pair has one meaning: statedrevealed = the code does",
48
+ " not do what the testimony says; structural↔revealed = the implementation",
49
+ " betrays the organization's promise; stated↔structural = doc rot / naming",
50
+ " drift.",
51
+ "2. Distill a **triangulated telos** — your unified best estimate of what the",
52
+ " subsystem is FOR, weighing all channels. This is an OPINION the owner",
53
+ " reacts to, never a replacement for the channels: the deltas stay the",
54
+ " product, and where channels disagree, say so through deltas rather than",
55
+ " papering over the disagreement in the telos.",
43
56
  "",
57
+ "Across the whole set, build the **goal_graph** (nodes/edges) linking the",
58
+ "subsystems' purposes. Give each delta a `pair` (two charter kinds) + a",
59
+ "`summary` of the gap. The tool ROUTES deltas (you do not): doc rot → the",
60
+ "remediator; stated↔revealed drift → the remediator; structural↔revealed",
61
+ "betrayal → a clarification; anything↔true → the human. A shaky charter",
62
+ "downgrades its deltas to the human channel automatically.",
63
+ "",
64
+ ...(deepest
65
+ ? [
66
+ "## True nominations (deepest ceiling — authorized for this run)",
67
+ "",
68
+ "Downstream of your triangulation, you MAY nominate a **true** charter",
69
+ 'for a subsystem: the *shining city* ideal the user may be unaware of.',
70
+ "NOMINATABLE, NEVER ASSERTED — it MUST name a concrete alternative AND a",
71
+ 'concrete cost the user seems to pay unaware ("Quicken exists; you\'re',
72
+ 'rebuilding a worse one") or it is dropped as slop. Framed as a',
73
+ "provocation, never a verdict. Nominate only if certain.",
74
+ "",
75
+ ]
76
+ : [
77
+ "This run's ceiling does NOT authorize True nominations — do not emit",
78
+ "`true_nominations` (they would be refused at ingest).",
79
+ "",
80
+ ]),
44
81
  "## Anti-slop discipline (do NOT emit)",
45
82
  "- No **manufactured** deltas — a `pair` whose two charters genuinely agree is not",
46
83
  " a gap; skip it. Only surface a real divergence.",
47
84
  "- No delta against a charter kind a subsystem does not have below.",
85
+ "- No **averaged** teloses — a triangulated telos that just splices the three",
86
+ " purposes together is slop; commit to your best estimate and let the deltas",
87
+ " carry the disagreement.",
48
88
  "- Only mine the subsystems listed — they are the assembled charter set, nothing",
49
89
  " more. Do not add a `node_id` that is not below.",
50
90
  "",
51
- "## Assembled charters (from the charter-extraction pass)",
91
+ "## Assembled charters + teleologies (from the blind channel lanes)",
52
92
  ...subsystemBlocks,
53
93
  "",
54
94
  "## Output",
@@ -62,6 +102,16 @@ export function renderCharterDeltaPrompt(bundle, opts) {
62
102
  ' "deltas": [{ "pair": ["stated", "revealed"], "summary": "<the gap>" }]',
63
103
  " }",
64
104
  " ],",
105
+ ' "triangulated": [',
106
+ ' { "node_id": "<subsystem>", "telos": "<your unified best-estimate purpose>", "confidence": "high|medium|low" }',
107
+ " ],",
108
+ ...(deepest
109
+ ? [
110
+ ' "true_nominations": [',
111
+ ' { "node_id": "<subsystem>", "purpose": "<the nominated ideal>", "nominated_alternative": "...", "nominated_cost": "...", "confidence": "high|medium|low" }',
112
+ " ],",
113
+ ]
114
+ : []),
65
115
  ' "goal_graph": {',
66
116
  ' "nodes": [',
67
117
  ' { "node_id": "auth", "premise_height": 0, "statement": "keep sessions trustworthy" },',
@@ -72,10 +122,16 @@ export function renderCharterDeltaPrompt(bundle, opts) {
72
122
  "}",
73
123
  "```",
74
124
  "",
125
+ "Emit ONE `triangulated` entry per subsystem you examined (even a subsystem",
126
+ "with no deltas has a telos — agreement across channels is high-confidence",
127
+ "evidence for it).",
128
+ "",
75
129
  "**If you genuinely found NO deltas anywhere**, affirm it explicitly:",
76
130
  "`\"no_deltas\": true` on the submission (an empty submission WITHOUT the",
77
131
  "affirmation is refused — a silent empty result is indistinguishable from a",
78
- "miner that never ran). Never set `no_deltas` alongside deltas.",
132
+ "miner that never ran). Never set `no_deltas` alongside deltas; the",
133
+ "affirmation is about DELTAS only, so your `triangulated` entries still ride",
134
+ "a `no_deltas` submission.",
79
135
  "",
80
136
  "**goal_graph schema (validated — use these exact fields, no others):**",
81
137
  "- `nodes[]`: each is `{ node_id, premise_height, statement }`. `node_id` is a",
@@ -1 +1 @@
1
- {"version":3,"file":"charterDeltaPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterDeltaPrompt.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAsB,EACtB,IAAgC;IAEhC,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,UAAU,IAAI,EAAE,CAAC;IAE7D,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM;QACvC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACzB,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,IAAI,GACR,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE;gBACrB,CAAC,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,QAAQ;gBACvC,CAAC,CAAC,EAAE,CAAC;YACT,MAAM,YAAY,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM;gBACtC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CACd,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,UAAU,OAAO,CAAC,CAAC,OAAO,EAAE,CACxE;gBACH,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC;YACpC,OAAO;gBACL,OAAO,GAAG,CAAC,OAAO,QAAQ,GAAG,CAAC,OAAO,CAAC,MAAM,aAAa,aAAa,GAAG,IAAI,EAAE;gBAC/E,GAAG,YAAY;aAChB,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC;YACE,yFAAyF;SAC1F,CAAC;IAEN,OAAO;QACL,mEAAmE;QACnE,EAAE;QACF,gFAAgF;QAChF,iFAAiF;QACjF,iFAAiF;QACjF,+EAA+E;QAC/E,sEAAsE;QACtE,EAAE;QACF,iFAAiF;QACjF,gFAAgF;QAChF,kFAAkF;QAClF,qCAAqC;QACrC,EAAE;QACF,uCAAuC;QACvC,mFAAmF;QACnF,mDAAmD;QACnD,oEAAoE;QACpE,iFAAiF;QACjF,mDAAmD;QACnD,EAAE;QACF,0DAA0D;QAC1D,GAAG,eAAe;QAClB,EAAE;QACF,WAAW;QACX,sCAAsC,IAAI,CAAC,cAAc,qBAAqB;QAC9E,EAAE;QACF,SAAS;QACT,GAAG;QACH,mBAAmB;QACnB,OAAO;QACP,mDAAmD;QACnD,8EAA8E;QAC9E,OAAO;QACP,MAAM;QACN,mBAAmB;QACnB,gBAAgB;QAChB,6FAA6F;QAC7F,gGAAgG;QAChG,QAAQ;QACR,wDAAwD;QACxD,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,sEAAsE;QACtE,0EAA0E;QAC1E,4EAA4E;QAC5E,gEAAgE;QAChE,EAAE;QACF,wEAAwE;QACxE,+EAA+E;QAC/E,iFAAiF;QACjF,gFAAgF;QAChF,0EAA0E;QAC1E,uEAAuE;QACvE,2EAA2E;QAC3E,8EAA8E;QAC9E,6EAA6E;QAC7E,iFAAiF;QACjF,cAAc;QACd,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"charterDeltaPrompt.js","sourceRoot":"","sources":["../../../src/audit/cli/charterDeltaPrompt.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAsB,EACtB,IAAgC;IAEhC,MAAM,QAAQ,GAAG,MAAM,CAAC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;gBACE,yBAAyB;gBACzB,gKAAgK;gBAChK,MAAM;aACP;YACH,CAAC,CAAC,EAAE,CAAC;QACP,mBAAmB;QACnB,gBAAgB;QAChB,6FAA6F;QAC7F,gGAAgG;QAChG,QAAQ;QACR,wDAAwD;QACxD,KAAK;QACL,GAAG;QACH,KAAK;QACL,EAAE;QACF,4EAA4E;QAC5E,2EAA2E;QAC3E,mBAAmB;QACnB,EAAE;QACF,sEAAsE;QACtE,0EAA0E;QAC1E,4EAA4E;QAC5E,oEAAoE;QACpE,6EAA6E;QAC7E,2BAA2B;QAC3B,EAAE;QACF,wEAAwE;QACxE,+EAA+E;QAC/E,iFAAiF;QACjF,gFAAgF;QAChF,0EAA0E;QAC1E,uEAAuE;QACvE,2EAA2E;QAC3E,8EAA8E;QAC9E,6EAA6E;QAC7E,iFAAiF;QACjF,cAAc;QACd,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -2,27 +2,36 @@ import type { ArtifactBundle } from "../io/artifacts.js";
2
2
  import type { Ceiling, CharterKind } from "audit-tools/shared";
3
3
  /**
4
4
  * Per-kind charter-extraction LANE prompts (Phase C.1). The host supplies
5
- * JUDGMENT (the charter families per confident subsystem, in TELOS terms) while
6
- * the tool supplies ENFORCEMENT (id assignment, dedup, the Phase-A True gate,
7
- * per-lane kind purity) at ingest.
5
+ * JUDGMENT (a self-organized leveled teleology per lane, in TELOS terms) while
6
+ * the tool supplies ENFORCEMENT (packet feeding, universe grounding, the
7
+ * file-set-overlap join, id assignment, the Phase-A True gate, per-lane kind
8
+ * purity) at ingest.
8
9
  *
9
- * Always-materialized (design resolution 2, 2026-08-05): each kind is its own
10
- * LANE — one prompt file, one submission file, authored blind to the other
11
- * lanes so independence stops being a merge instruction the host must follow
12
- * and becomes the shape of the artifacts. The tool merges the per-kind
13
- * submissions at the ingest chokepoint (`assembleCharters` still receives ONE
14
- * merged submission). Content rules are the CURRENT ones channel-pure
15
- * scope-by-feeding packets and the kind rename ride design resolution 4, never
16
- * this mechanism change. Lane prompts are ADVANCE-FREE (no continue-command).
10
+ * Channel purity is a property of the INPUT (design resolution 4): each lane's
11
+ * prompt points at a tool-materialized evidence PACKET holding only that
12
+ * channel's material (stated docs + extracted comments; structural tree /
13
+ * edges / declarations; revealed comment-stripped bodies), so blindness never
14
+ * depends on an agent obeying a "do not read X" instruction. `true` is NOT a
15
+ * lane it is nominated by the independent delta miner at the deepest rung,
16
+ * downstream of triangulation. Lane prompts are ADVANCE-FREE (no
17
+ * continue-command).
17
18
  */
18
- /** The extraction kinds a run's ceiling requests, in canonical order. */
19
- export declare function charterExtractionKindsForCeiling(ceiling: Ceiling): CharterKind[];
19
+ /** The three estimator kinds every extraction lane; never `true`. */
20
+ export type EstimatorCharterKind = Exclude<CharterKind, "true">;
21
+ /**
22
+ * The extraction kinds a run's ceiling requests, in canonical order. The three
23
+ * estimator channels extract at every charter-authorizing ceiling; `deepest`
24
+ * changes what the MINER may do (True nominations), never the lane set.
25
+ */
26
+ export declare function charterExtractionKindsForCeiling(_ceiling: Ceiling): EstimatorCharterKind[];
20
27
  /**
21
28
  * Render ONE kind's lane prompt. The lane is blind by construction: it carries
22
- * only its own kind's definition, scope, and submission path.
29
+ * only its own kind's definition, its materialized evidence packet, and its
30
+ * submission path.
23
31
  */
24
32
  export declare function renderCharterKindLanePrompt(bundle: ArtifactBundle, opts: {
25
- kind: CharterKind;
33
+ kind: EstimatorCharterKind;
26
34
  submissionPath: string;
35
+ packetPath: string;
27
36
  }): string;
28
37
  //# sourceMappingURL=charterExtractionPrompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"charterExtractionPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterExtractionPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE/D;;;;;;;;;;;;;;GAcG;AAEH,yEAAyE;AACzE,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAIhF;AAkDD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAClD,MAAM,CA0ER"}
1
+ {"version":3,"file":"charterExtractionPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/charterExtractionPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AAEH,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,OAAO,GAChB,oBAAoB,EAAE,CAExB;AA2CD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IACJ,IAAI,EAAE,oBAAoB,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB,GACA,MAAM,CAsFR"}