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,152 +1,185 @@
1
1
  import { z } from "zod";
2
- import { type Charter, type CharterDelta, type GoalGraph } from "../types/charter.js";
2
+ import { type Charter, type CharterKind, type CharterDelta, type ChannelDisagreement, type GoalGraph, type TeleologyNode, type TriangulatedTelos } from "../types/charter.js";
3
3
  import type { Finding } from "../types/finding.js";
4
4
  /**
5
- * The charter-EXTRACTION submission (Phase C.1): per consensus subsystem, its
6
- * charters. Deltas are NOT authored here — an independent delta-miner mines them in
7
- * a second pass over the assembled charters, so no author marks its own homework and
8
- * `revealed` can be extracted blind to `stated`. Multiple entries sharing a
9
- * `node_id` (one per independent per-kind extractor) are merged at assembly.
5
+ * The charter-EXTRACTION submission (Phase C.1): ONE blind lane's self-organized
6
+ * teleology. Deltas are NOT authored here — the independent delta miner mines
7
+ * them in a second pass over the joined charters, so no author marks its own
8
+ * homework. Lanes from every kind are merged (concatenated) before assembly;
9
+ * the join is by file-set overlap, so lanes never need to agree on node ids.
10
10
  */
11
11
  export declare const CharterSubmissionSchema: z.ZodObject<{
12
- subsystems: z.ZodDefault<z.ZodArray<z.ZodObject<{
13
- node_id: z.ZodString;
14
- charters: z.ZodArray<z.ZodObject<Omit<{
15
- charter_id: z.ZodString;
16
- kind: z.ZodEnum<["stated", "inferred", "revealed", "true"]>;
17
- purpose: z.ZodString;
18
- provenance: z.ZodArray<z.ZodObject<{
19
- kind: z.ZodEnum<["doc", "intent_checkpoint", "user_feedback", "code", "comment", "inferred"]>;
20
- ref: z.ZodString;
21
- quote: z.ZodOptional<z.ZodString>;
22
- }, "strict", z.ZodTypeAny, {
23
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
24
- ref: string;
25
- quote?: string | undefined;
26
- }, {
27
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
28
- ref: string;
29
- quote?: string | undefined;
30
- }>, "many">;
31
- confidence: z.ZodEnum<["high", "medium", "low"]>;
32
- nominated_alternative: z.ZodOptional<z.ZodString>;
33
- nominated_cost: z.ZodOptional<z.ZodString>;
34
- }, "charter_id">, "strict", z.ZodTypeAny, {
35
- confidence: "high" | "low" | "medium";
36
- kind: "stated" | "inferred" | "revealed" | "true";
37
- purpose: string;
38
- provenance: {
39
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
40
- ref: string;
41
- quote?: string | undefined;
42
- }[];
43
- nominated_alternative?: string | undefined;
44
- nominated_cost?: string | undefined;
12
+ nodes: z.ZodDefault<z.ZodArray<z.ZodObject<Omit<{
13
+ charter_id: z.ZodString;
14
+ kind: z.ZodEnum<["stated", "structural", "revealed", "true"]>;
15
+ purpose: z.ZodString;
16
+ provenance: z.ZodArray<z.ZodObject<{
17
+ kind: z.ZodEnum<["doc", "intent_checkpoint", "user_feedback", "code", "comment", "inferred"]>;
18
+ ref: z.ZodString;
19
+ quote: z.ZodOptional<z.ZodString>;
20
+ }, "strict", z.ZodTypeAny, {
21
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
22
+ ref: string;
23
+ quote?: string | undefined;
45
24
  }, {
46
- confidence: "high" | "low" | "medium";
47
- kind: "stated" | "inferred" | "revealed" | "true";
48
- purpose: string;
49
- provenance: {
50
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
51
- ref: string;
52
- quote?: string | undefined;
53
- }[];
54
- nominated_alternative?: string | undefined;
55
- nominated_cost?: string | undefined;
25
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
26
+ ref: string;
27
+ quote?: string | undefined;
56
28
  }>, "many">;
57
- }, "strict", z.ZodTypeAny, {
58
- node_id: string;
59
- charters: {
60
- confidence: "high" | "low" | "medium";
61
- kind: "stated" | "inferred" | "revealed" | "true";
62
- purpose: string;
63
- provenance: {
64
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
65
- ref: string;
66
- quote?: string | undefined;
67
- }[];
68
- nominated_alternative?: string | undefined;
69
- nominated_cost?: string | undefined;
29
+ confidence: z.ZodEnum<["high", "medium", "low"]>;
30
+ nominated_alternative: z.ZodOptional<z.ZodString>;
31
+ nominated_cost: z.ZodOptional<z.ZodString>;
32
+ }, "charter_id"> & Omit<{
33
+ purpose: z.ZodString;
34
+ premise_height: z.ZodNumber;
35
+ files: z.ZodArray<z.ZodString, "many">;
36
+ }, "purpose">, "strict", z.ZodTypeAny, {
37
+ files: string[];
38
+ confidence: "high" | "low" | "medium";
39
+ kind: "stated" | "structural" | "revealed" | "true";
40
+ purpose: string;
41
+ provenance: {
42
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
43
+ ref: string;
44
+ quote?: string | undefined;
70
45
  }[];
46
+ premise_height: number;
47
+ nominated_alternative?: string | undefined;
48
+ nominated_cost?: string | undefined;
71
49
  }, {
72
- node_id: string;
73
- charters: {
74
- confidence: "high" | "low" | "medium";
75
- kind: "stated" | "inferred" | "revealed" | "true";
76
- purpose: string;
77
- provenance: {
78
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
79
- ref: string;
80
- quote?: string | undefined;
81
- }[];
82
- nominated_alternative?: string | undefined;
83
- nominated_cost?: string | undefined;
50
+ files: string[];
51
+ confidence: "high" | "low" | "medium";
52
+ kind: "stated" | "structural" | "revealed" | "true";
53
+ purpose: string;
54
+ provenance: {
55
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
56
+ ref: string;
57
+ quote?: string | undefined;
84
58
  }[];
59
+ premise_height: number;
60
+ nominated_alternative?: string | undefined;
61
+ nominated_cost?: string | undefined;
85
62
  }>, "many">>;
86
63
  }, "strict", z.ZodTypeAny, {
87
- subsystems: {
88
- node_id: string;
89
- charters: {
90
- confidence: "high" | "low" | "medium";
91
- kind: "stated" | "inferred" | "revealed" | "true";
92
- purpose: string;
93
- provenance: {
94
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
95
- ref: string;
96
- quote?: string | undefined;
97
- }[];
98
- nominated_alternative?: string | undefined;
99
- nominated_cost?: string | undefined;
64
+ nodes: {
65
+ files: string[];
66
+ confidence: "high" | "low" | "medium";
67
+ kind: "stated" | "structural" | "revealed" | "true";
68
+ purpose: string;
69
+ provenance: {
70
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
71
+ ref: string;
72
+ quote?: string | undefined;
100
73
  }[];
74
+ premise_height: number;
75
+ nominated_alternative?: string | undefined;
76
+ nominated_cost?: string | undefined;
101
77
  }[];
102
78
  }, {
103
- subsystems?: {
104
- node_id: string;
105
- charters: {
106
- confidence: "high" | "low" | "medium";
107
- kind: "stated" | "inferred" | "revealed" | "true";
108
- purpose: string;
109
- provenance: {
110
- kind: "code" | "inferred" | "doc" | "intent_checkpoint" | "user_feedback" | "comment";
111
- ref: string;
112
- quote?: string | undefined;
113
- }[];
114
- nominated_alternative?: string | undefined;
115
- nominated_cost?: string | undefined;
79
+ nodes?: {
80
+ files: string[];
81
+ confidence: "high" | "low" | "medium";
82
+ kind: "stated" | "structural" | "revealed" | "true";
83
+ purpose: string;
84
+ provenance: {
85
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
86
+ ref: string;
87
+ quote?: string | undefined;
116
88
  }[];
89
+ premise_height: number;
90
+ nominated_alternative?: string | undefined;
91
+ nominated_cost?: string | undefined;
117
92
  }[] | undefined;
118
93
  }>;
119
94
  export type CharterSubmission = z.infer<typeof CharterSubmissionSchema>;
120
95
  /**
121
- * The charter-DELTA submission (Phase C.2): the independent delta-miner's pairwise
122
- * gaps across the already-assembled charters, plus the goal DAG it reads off all
123
- * subsystems (it is the only pass that sees every merged subsystem, so it owns
124
- * `goal_graph`).
96
+ * The charter-DELTA submission (Phase C.2): the independent miner's channel-pair
97
+ * gaps across the already-joined charters, its TRIANGULATED TELOS per subsystem
98
+ * (a unified opinion the owner reacts to a lead, never a reconciliation), any
99
+ * True nominations (deepest only), plus the goal DAG it reads off all subsystems
100
+ * (it is the only pass that sees every joined unit, so it owns `goal_graph`).
125
101
  */
126
102
  export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
127
103
  subsystems: z.ZodDefault<z.ZodArray<z.ZodObject<{
128
104
  node_id: z.ZodString;
129
105
  deltas: z.ZodDefault<z.ZodArray<z.ZodObject<{
130
- pair: z.ZodTuple<[z.ZodEnum<["stated", "inferred", "revealed", "true"]>, z.ZodEnum<["stated", "inferred", "revealed", "true"]>], null>;
106
+ pair: z.ZodTuple<[z.ZodEnum<["stated", "structural", "revealed", "true"]>, z.ZodEnum<["stated", "structural", "revealed", "true"]>], null>;
131
107
  summary: z.ZodString;
132
108
  }, "strict", z.ZodTypeAny, {
133
109
  summary: string;
134
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
110
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
135
111
  }, {
136
112
  summary: string;
137
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
113
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
138
114
  }>, "many">>;
139
115
  }, "strict", z.ZodTypeAny, {
140
116
  node_id: string;
141
117
  deltas: {
142
118
  summary: string;
143
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
119
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
144
120
  }[];
145
121
  }, {
146
122
  node_id: string;
147
123
  deltas?: {
148
124
  summary: string;
149
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
125
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
126
+ }[] | undefined;
127
+ }>, "many">>;
128
+ triangulated: z.ZodDefault<z.ZodArray<z.ZodObject<{
129
+ node_id: z.ZodString;
130
+ telos: z.ZodString;
131
+ confidence: z.ZodEnum<["high", "medium", "low"]>;
132
+ }, "strict", z.ZodTypeAny, {
133
+ confidence: "high" | "low" | "medium";
134
+ node_id: string;
135
+ telos: string;
136
+ }, {
137
+ confidence: "high" | "low" | "medium";
138
+ node_id: string;
139
+ telos: string;
140
+ }>, "many">>;
141
+ true_nominations: z.ZodDefault<z.ZodArray<z.ZodObject<{
142
+ node_id: z.ZodString;
143
+ /** The nominated ideal, in telos terms. */
144
+ purpose: z.ZodString;
145
+ nominated_alternative: z.ZodString;
146
+ nominated_cost: z.ZodString;
147
+ confidence: z.ZodEnum<["high", "medium", "low"]>;
148
+ /** May be empty — the ideal cites no source. */
149
+ provenance: z.ZodDefault<z.ZodArray<z.ZodObject<{
150
+ kind: z.ZodEnum<["doc", "intent_checkpoint", "user_feedback", "code", "comment", "inferred"]>;
151
+ ref: z.ZodString;
152
+ quote: z.ZodOptional<z.ZodString>;
153
+ }, "strict", z.ZodTypeAny, {
154
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
155
+ ref: string;
156
+ quote?: string | undefined;
157
+ }, {
158
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
159
+ ref: string;
160
+ quote?: string | undefined;
161
+ }>, "many">>;
162
+ }, "strict", z.ZodTypeAny, {
163
+ confidence: "high" | "low" | "medium";
164
+ purpose: string;
165
+ provenance: {
166
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
167
+ ref: string;
168
+ quote?: string | undefined;
169
+ }[];
170
+ nominated_alternative: string;
171
+ nominated_cost: string;
172
+ node_id: string;
173
+ }, {
174
+ confidence: "high" | "low" | "medium";
175
+ purpose: string;
176
+ nominated_alternative: string;
177
+ nominated_cost: string;
178
+ node_id: string;
179
+ provenance?: {
180
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
181
+ ref: string;
182
+ quote?: string | undefined;
150
183
  }[] | undefined;
151
184
  }>, "many">>;
152
185
  goal_graph: z.ZodOptional<z.ZodObject<{
@@ -199,6 +232,7 @@ export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
199
232
  * REQUIRED when the submission carries zero deltas, and REFUSED alongside any
200
233
  * delta, so a dead miner (which submits nothing) can never be mistaken for a
201
234
  * clean one (same contract as `reviewed_clean` on a zero-finding AuditResult).
235
+ * Keyed to DELTAS only: a clean mine may still carry triangulated teloses.
202
236
  */
203
237
  no_deltas: z.ZodOptional<z.ZodBoolean>;
204
238
  }, "strict", z.ZodTypeAny, {
@@ -206,8 +240,25 @@ export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
206
240
  node_id: string;
207
241
  deltas: {
208
242
  summary: string;
209
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
243
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
244
+ }[];
245
+ }[];
246
+ triangulated: {
247
+ confidence: "high" | "low" | "medium";
248
+ node_id: string;
249
+ telos: string;
250
+ }[];
251
+ true_nominations: {
252
+ confidence: "high" | "low" | "medium";
253
+ purpose: string;
254
+ provenance: {
255
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
256
+ ref: string;
257
+ quote?: string | undefined;
210
258
  }[];
259
+ nominated_alternative: string;
260
+ nominated_cost: string;
261
+ node_id: string;
211
262
  }[];
212
263
  goal_graph?: {
213
264
  nodes: {
@@ -222,6 +273,30 @@ export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
222
273
  } | undefined;
223
274
  no_deltas?: boolean | undefined;
224
275
  }, {
276
+ subsystems?: {
277
+ node_id: string;
278
+ deltas?: {
279
+ summary: string;
280
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
281
+ }[] | undefined;
282
+ }[] | undefined;
283
+ triangulated?: {
284
+ confidence: "high" | "low" | "medium";
285
+ node_id: string;
286
+ telos: string;
287
+ }[] | undefined;
288
+ true_nominations?: {
289
+ confidence: "high" | "low" | "medium";
290
+ purpose: string;
291
+ nominated_alternative: string;
292
+ nominated_cost: string;
293
+ node_id: string;
294
+ provenance?: {
295
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
296
+ ref: string;
297
+ quote?: string | undefined;
298
+ }[] | undefined;
299
+ }[] | undefined;
225
300
  goal_graph?: {
226
301
  nodes: {
227
302
  node_id: string;
@@ -233,22 +308,32 @@ export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
233
308
  to: string;
234
309
  }[];
235
310
  } | undefined;
236
- subsystems?: {
237
- node_id: string;
238
- deltas?: {
239
- summary: string;
240
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
241
- }[] | undefined;
242
- }[] | undefined;
243
311
  no_deltas?: boolean | undefined;
244
312
  }>, {
245
313
  subsystems: {
246
314
  node_id: string;
247
315
  deltas: {
248
316
  summary: string;
249
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
317
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
250
318
  }[];
251
319
  }[];
320
+ triangulated: {
321
+ confidence: "high" | "low" | "medium";
322
+ node_id: string;
323
+ telos: string;
324
+ }[];
325
+ true_nominations: {
326
+ confidence: "high" | "low" | "medium";
327
+ purpose: string;
328
+ provenance: {
329
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
330
+ ref: string;
331
+ quote?: string | undefined;
332
+ }[];
333
+ nominated_alternative: string;
334
+ nominated_cost: string;
335
+ node_id: string;
336
+ }[];
252
337
  goal_graph?: {
253
338
  nodes: {
254
339
  node_id: string;
@@ -262,6 +347,30 @@ export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
262
347
  } | undefined;
263
348
  no_deltas?: boolean | undefined;
264
349
  }, {
350
+ subsystems?: {
351
+ node_id: string;
352
+ deltas?: {
353
+ summary: string;
354
+ pair: ["stated" | "structural" | "revealed" | "true", "stated" | "structural" | "revealed" | "true"];
355
+ }[] | undefined;
356
+ }[] | undefined;
357
+ triangulated?: {
358
+ confidence: "high" | "low" | "medium";
359
+ node_id: string;
360
+ telos: string;
361
+ }[] | undefined;
362
+ true_nominations?: {
363
+ confidence: "high" | "low" | "medium";
364
+ purpose: string;
365
+ nominated_alternative: string;
366
+ nominated_cost: string;
367
+ node_id: string;
368
+ provenance?: {
369
+ kind: "code" | "doc" | "intent_checkpoint" | "user_feedback" | "comment" | "inferred";
370
+ ref: string;
371
+ quote?: string | undefined;
372
+ }[] | undefined;
373
+ }[] | undefined;
265
374
  goal_graph?: {
266
375
  nodes: {
267
376
  node_id: string;
@@ -273,24 +382,23 @@ export declare const CharterDeltaSubmissionSchema: z.ZodEffects<z.ZodObject<{
273
382
  to: string;
274
383
  }[];
275
384
  } | undefined;
276
- subsystems?: {
277
- node_id: string;
278
- deltas?: {
279
- summary: string;
280
- pair: ["stated" | "inferred" | "revealed" | "true", "stated" | "inferred" | "revealed" | "true"];
281
- }[] | undefined;
282
- }[] | undefined;
283
385
  no_deltas?: boolean | undefined;
284
386
  }>;
285
387
  export type CharterDeltaSubmission = z.infer<typeof CharterDeltaSubmissionSchema>;
286
- /** One subsystem's surviving charters, joined to its consensus-scaffold members. */
388
+ /**
389
+ * One joined subsystem UNIT: its file members, the tool-selected per-kind
390
+ * charters, and every lane's full teleology slice that joined into it (levels
391
+ * preserved — the self-organized structure is the product, the charter is the
392
+ * unit's best-overlap representative of it).
393
+ */
287
394
  export interface CharterSubsystem {
288
395
  node_id: string;
289
396
  members: string[];
290
397
  charters: Charter[];
398
+ teleologies: Partial<Record<CharterKind, TeleologyNode[]>>;
291
399
  }
292
400
  /**
293
- * The assembled charter layer (Phase C.1): gated per-subsystem charters + a record
401
+ * The assembled charter layer (Phase C.1): joined per-unit charters + a record
294
402
  * of everything the gates dropped (surfaced, never silently discarded).
295
403
  */
296
404
  export interface AssembledCharters {
@@ -299,32 +407,66 @@ export interface AssembledCharters {
299
407
  }
300
408
  /**
301
409
  * The assembled delta layer (Phase C.2): the routed+gated deltas across all
302
- * subsystems, the deltas surfaced as Finding leads, the goal DAG, and the gate
303
- * drops.
410
+ * units, the deltas surfaced as Finding leads, the triangulated teloses, the
411
+ * tool-computed disagreement density, the (possibly True-augmented) subsystems,
412
+ * the goal DAG, and the gate drops.
304
413
  */
305
414
  export interface AssembledDeltas {
415
+ subsystems: CharterSubsystem[];
306
416
  deltas: CharterDelta[];
307
417
  findings: Finding[];
418
+ triangulated: TriangulatedTelos[];
419
+ disagreement: ChannelDisagreement[];
308
420
  goal_graph: GoalGraph;
309
421
  validation_issues: string[];
310
422
  }
423
+ export interface AssembleChartersParams {
424
+ /**
425
+ * The decomposition HINT: consensus `node_id → members`. A scaffold
426
+ * suggestion the join prefers when a node's scope overlaps it — never a
427
+ * forced node list (a lane may organize boundaries the decomposition missed).
428
+ */
429
+ hint: Map<string, string[]>;
430
+ /**
431
+ * The repo file universe. Every teleology node's scope must ground here —
432
+ * a node citing files outside the universe is dropped with an issue (the
433
+ * host cannot conjure files the repo does not contain). The ingest
434
+ * chokepoint additionally REFUSES such lanes loudly before assembly.
435
+ */
436
+ universe: ReadonlySet<string>;
437
+ }
311
438
  /**
312
- * Assemble the gated charters (Phase C.1) from a validated extraction submission.
439
+ * Assemble the joined charter layer (Phase C.1) from the merged per-lane
440
+ * submissions. Deterministic: same nodes + same hint + same universe always
441
+ * yield the same units, ids, and charter selection.
313
442
  *
314
- * `membersByNode` grounds each submitted subsystem against the Phase-B consensus
315
- * scaffold: a `node_id` the structure decomposition never surfaced is an invented
316
- * subsystem dropped with an issue (the host cannot conjure boundaries the
317
- * deterministic layer didn't find). Entries sharing a `node_id` one per
318
- * independent per-kind extractor are merged before assembly. Deterministic: same
319
- * submission + same scaffold always yields the same charters.
443
+ * Join: each grounded node maps to the hint unit with the largest file overlap
444
+ * (ties lexicographically first hint id); nodes overlapping NO hint unit are
445
+ * union-found into residual units on any shared file, across kinds. A unit's id
446
+ * is its hint `node_id` when hinted, else the lexicographically first file of
447
+ * its scope union (provably collision-free: a residual scope contains no hint
448
+ * member, so its first file can never equal a hint id, which IS a hint member).
449
+ * Per unit per kind, the best-overlap node becomes the kind's charter
450
+ * (`charter_id = unit:kind`); every joined node persists in the unit's
451
+ * teleology, levels intact.
320
452
  */
321
- export declare function assembleCharters(submission: CharterSubmission, membersByNode: Map<string, string[]>): AssembledCharters;
453
+ export declare function assembleCharters(submission: CharterSubmission, params: AssembleChartersParams): AssembledCharters;
454
+ export interface AssembleDeltasParams {
455
+ /**
456
+ * Whether True nominations are admissible — true ONLY at the `deepest`
457
+ * ceiling (the consent gate that used to live on the extraction lane set;
458
+ * the executor derives this from the confirmed checkpoint's ceiling).
459
+ */
460
+ allowTrueNominations: boolean;
461
+ }
322
462
  /**
323
- * Assemble the routed+gated deltas (Phase C.2) from the independent delta-miner's
324
- * submission, given the already-assembled charters. The miner never picks routing —
325
- * `kind`/`routed_to` derive from the charter pair (the design's fixed table). A
326
- * delta whose `node_id` has no assembled charters, or that references a
327
- * missing/dropped charter kind, is dropped with an issue.
463
+ * Assemble the routed+gated deltas, triangulated teloses, and disagreement
464
+ * density (Phase C.2) from the independent miner's submission, given the
465
+ * already-joined charters. The miner never picks routing `kind`/`routed_to`
466
+ * derive from the channel pair (the design's fixed table). A delta whose
467
+ * `node_id` has no joined charters, or that references a missing/dropped
468
+ * charter kind, is dropped with an issue; so is a triangulated telos or True
469
+ * nomination naming an unknown unit.
328
470
  */
329
- export declare function assembleDeltas(submission: CharterDeltaSubmission, subsystems: CharterSubsystem[]): AssembledDeltas;
471
+ export declare function assembleDeltas(submission: CharterDeltaSubmission, subsystems: CharterSubsystem[], params: AssembleDeltasParams): AssembledDeltas;
330
472
  //# sourceMappingURL=charterExtraction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"charterExtraction.d.ts","sourceRoot":"","sources":["../../../src/shared/decompose/charterExtraction.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,OAAO,EAEZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAgCnD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAUxE;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIrC;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBH,CAAC;AACL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF,oFAAoF;AACpF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,EAAE,SAAS,CAAC;IACtB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AA2DD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACnC,iBAAiB,CA2DnB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,sBAAsB,EAClC,UAAU,EAAE,gBAAgB,EAAE,GAC7B,eAAe,CAgFjB"}
1
+ {"version":3,"file":"charterExtraction.d.ts","sourceRoot":"","sources":["../../../src/shared/decompose/charterExtraction.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAQL,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAgBnD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AA0CxE;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAjBrC,2CAA2C;;;;;QAK3C,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBhD;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBH,CAAC;AACL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;CAC5D;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,UAAU,EAAE,SAAS,CAAC;IACtB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAyFD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,iBAAiB,EAC7B,MAAM,EAAE,sBAAsB,GAC7B,iBAAiB,CAqKnB;AAID,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,sBAAsB,EAClC,UAAU,EAAE,gBAAgB,EAAE,EAC9B,MAAM,EAAE,oBAAoB,GAC3B,eAAe,CA8KjB"}