@maycombhq/sdk 2.0.0-beta.3 → 2.0.0-beta.30

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 (88) hide show
  1. package/npm/core/ai-decisions.d.ts +373 -0
  2. package/npm/core/api.d.ts +15888 -3797
  3. package/npm/core/app-memory.d.ts +69 -0
  4. package/npm/core/assistant-actor.d.ts +28 -7
  5. package/npm/core/audit.d.ts +174 -0
  6. package/npm/core/canary.d.ts +369 -0
  7. package/npm/core/cancel.d.ts +20 -0
  8. package/npm/core/catalog.d.ts +220 -66
  9. package/npm/core/change-types-migrate.d.ts +14 -0
  10. package/npm/core/cite.d.ts +88 -6
  11. package/npm/core/contract-check.d.ts +276 -0
  12. package/npm/core/curated.d.ts +10 -0
  13. package/npm/core/decision-batches.d.ts +29 -0
  14. package/npm/core/declarable-routes.d.ts +52 -0
  15. package/npm/core/declared-links.d.ts +210 -0
  16. package/npm/core/eol.d.ts +5 -0
  17. package/npm/core/fact-paths.d.ts +14 -0
  18. package/npm/core/facts-callers.d.ts +23 -1
  19. package/npm/core/facts-carry.d.ts +8 -2
  20. package/npm/core/facts-deps.d.ts +85 -0
  21. package/npm/core/facts-join-prototype.d.ts +66 -4
  22. package/npm/core/facts-join-vendor.d.ts +67 -7
  23. package/npm/core/facts-join.d.ts +476 -2
  24. package/npm/core/facts-terms.d.ts +108 -0
  25. package/npm/core/facts.d.ts +155 -1
  26. package/npm/core/field-places.d.ts +109 -0
  27. package/npm/core/file-pool.d.ts +84 -0
  28. package/npm/core/fs.d.ts +205 -7
  29. package/npm/core/glob-plain.d.ts +34 -0
  30. package/npm/core/glob.d.ts +14 -0
  31. package/npm/core/hash-cache.d.ts +53 -0
  32. package/npm/core/host-questions.d.ts +273 -1
  33. package/npm/core/identity.d.ts +20 -8
  34. package/npm/core/index.d.ts +38 -0
  35. package/npm/core/initialisms.d.ts +62 -0
  36. package/npm/core/kept-files.d.ts +17 -0
  37. package/npm/core/light.d.ts +5 -0
  38. package/npm/core/link-candidates.d.ts +224 -0
  39. package/npm/core/link-evidence.d.ts +212 -0
  40. package/npm/core/log.d.ts +2 -0
  41. package/npm/core/manifest-edit.d.ts +83 -6
  42. package/npm/core/merge.d.ts +28 -0
  43. package/npm/core/metarepo.d.ts +26 -1
  44. package/npm/core/migrate.d.ts +3 -2
  45. package/npm/core/org-notes.d.ts +180 -0
  46. package/npm/core/orgpack-defaults.d.ts +30 -6
  47. package/npm/core/orgpack-load.d.ts +24 -0
  48. package/npm/core/paths.d.ts +23 -0
  49. package/npm/core/printer.d.ts +18 -0
  50. package/npm/core/process-trees.d.ts +109 -0
  51. package/npm/core/profile-migrate.d.ts +13 -0
  52. package/npm/core/question-order.d.ts +23 -0
  53. package/npm/core/question-owners.d.ts +57 -0
  54. package/npm/core/question-proposals.d.ts +77 -0
  55. package/npm/core/question-roles.d.ts +84 -0
  56. package/npm/core/questions.d.ts +123 -6
  57. package/npm/core/record-cache.d.ts +122 -2
  58. package/npm/core/repo-files.d.ts +66 -0
  59. package/npm/core/repo-reads.d.ts +44 -0
  60. package/npm/core/roles-migrate.d.ts +10 -0
  61. package/npm/core/run-log.d.ts +341 -0
  62. package/npm/core/runtime-migrate.d.ts +18 -0
  63. package/npm/core/schema/ai.d.ts +61 -13
  64. package/npm/core/schema/common.d.ts +32 -8
  65. package/npm/core/schema/component-type.d.ts +193 -0
  66. package/npm/core/schema/conventions.d.ts +80 -0
  67. package/npm/core/schema/dialect.d.ts +12 -12
  68. package/npm/core/schema/fact-corrections.d.ts +112 -2
  69. package/npm/core/schema/facts.d.ts +743 -23
  70. package/npm/core/schema/frameworks.d.ts +12 -12
  71. package/npm/core/schema/kinds.d.ts +230 -66
  72. package/npm/core/schema/orgpack.d.ts +248 -24
  73. package/npm/core/schema/question.d.ts +281 -5
  74. package/npm/core/schema/reading-rules.d.ts +51 -0
  75. package/npm/core/schema/repo-type.d.ts +20 -2
  76. package/npm/core/schema/review.d.ts +30 -9
  77. package/npm/core/schema/scan-verify.d.ts +77 -0
  78. package/npm/core/schema/version.d.ts +4 -1
  79. package/npm/core/schema/workspace.d.ts +29 -11
  80. package/npm/core/setup-edit.d.ts +107 -0
  81. package/npm/core/shared-maps.d.ts +146 -0
  82. package/npm/core/stack-helpers.d.ts +32 -0
  83. package/npm/core/version-order.d.ts +14 -0
  84. package/npm/fs-repo.d.ts +2 -1
  85. package/npm/index.js +14248 -6710
  86. package/npm/listing.d.ts +14 -0
  87. package/npm/sandbox.d.ts +2 -1
  88. package/package.json +1 -1
@@ -11,7 +11,126 @@ import { z } from "zod";
11
11
  * narrower than) and a draft's `sameAs`. Both are optional, so version-1 files are read as they
12
12
  * are and come back as version 2 in memory; writers write version 2.
13
13
  */
14
- export declare const QUESTION_SCHEMA_VERSION: 2;
14
+ /**
15
+ * Version 3 (ADR 0153) adds two optional fields to an answer: `match`, the rule a target or host
16
+ * answer covers (a host pattern or a path prefix, Q2), and `proposal`, the assistant's proposal a
17
+ * person accepted as their answer (Q5). Version-1 and version-2 files read as before.
18
+ */
19
+ /**
20
+ * Version 4 (ADR 0162) adds `reopened`: a targets answer the code later disagreed with (the repo
21
+ * it named was read, and no route of it serves the call), so the question is open again, with
22
+ * why and the answer it had. Optional; version-1 to version-3 files read as before and come back
23
+ * as version 4 in memory.
24
+ */
25
+ /**
26
+ * Version 5 (one version with role-owned questions' optional `role`, ADR 0181 part 4; merged as
27
+ * one bump) also lets an answer be the AI's: `by` is a person's Git user, or
28
+ * `{ kind: ai, runtime, run }` for a decision Atticus applied from an AI run (never written as the
29
+ * person's); `batch` names the batch that applied an answer (by AI, or by a person's rule), so
30
+ * Undo removes exactly it; `rule` says a person's rule applied it, from which correction. All
31
+ * optional; version-1 to version-4 files read as before and come back as version 5 in memory.
32
+ * Version 5 also (ninth UX walk, before it was released) carries a critic knowledge gap's owner
33
+ * question: `askedOf` (the team or person a person's Ask routed it to) and `finding` (the gap it
34
+ * asks about, by change, gate, round and id). Both optional.
35
+ */
36
+ /**
37
+ * Version 6 (ADR 0191, routing by what a question asks) adds two optional fields: `asks`, what the
38
+ * question asks (business, design or delivery), which the AI tags when it raises it and which
39
+ * decides the role that owns it (business → the product owner, or the business analyst from the
40
+ * stories on; design → the architect; delivery → the tech lead); and `routed`, a person's
41
+ * re-routing of it to another role (from which, by whom, when), with `role` holding the new one.
42
+ * Version-1 to version-5 files read as before and come back as version 6 in memory.
43
+ */
44
+ export declare const QUESTION_SCHEMA_VERSION: 6;
45
+ /**
46
+ * ADR 0181 part 4: who owns a question on a change, by the phase that raised it. The product owner
47
+ * (Define), the architect (Design), the business analyst (Plan's stories) and the tech lead (Plan's
48
+ * tasks and Build). Words, not permissions: anyone can still read and answer any question.
49
+ */
50
+ export declare const QUESTION_ROLES: readonly ["product", "architecture", "analysis", "delivery"];
51
+ export declare const QuestionRole: z.ZodEnum<{
52
+ product: "product";
53
+ architecture: "architecture";
54
+ delivery: "delivery";
55
+ analysis: "analysis";
56
+ }>;
57
+ export type QuestionRole = z.infer<typeof QuestionRole>;
58
+ /**
59
+ * ADR 0191: what a question asks, by its level. `business`: what the change must do for whom (a
60
+ * rule, a limit, what happens when money is short); `design`: how the estate does it (a call, a
61
+ * timeout, a topic, a circuit breaker); `delivery`: how and when it is built and shipped (a repo, a
62
+ * migration's order, a test). The AI tags each question it raises; a person can re-route it.
63
+ */
64
+ export declare const QUESTION_ASKS: readonly ["business", "design", "delivery"];
65
+ export declare const QuestionAsks: z.ZodEnum<{
66
+ business: "business";
67
+ delivery: "delivery";
68
+ design: "design";
69
+ }>;
70
+ export type QuestionAsks = z.infer<typeof QuestionAsks>;
71
+ /** ADR 0191: a person moved a question to another role: from which, by whom, when. */
72
+ export declare const QuestionRouted: z.ZodObject<{
73
+ from: z.ZodOptional<z.ZodEnum<{
74
+ product: "product";
75
+ architecture: "architecture";
76
+ delivery: "delivery";
77
+ analysis: "analysis";
78
+ }>>;
79
+ by: z.ZodString;
80
+ at: z.ZodISODateTime;
81
+ }, z.core.$strict>;
82
+ export type QuestionRouted = z.infer<typeof QuestionRouted>;
83
+ /**
84
+ * ADR 0181: the runtimes whose runs Atticus records, so a decision can name its run: a Copilot
85
+ * session Atticus started (`copilot-acp`), or a hand-off run Atticus prepared for the person's
86
+ * assistant and read back when it was marked done (`hand-off`, ninth UX walk; additive, the
87
+ * question file stays at version 5). An answer pasted with no Atticus run behind it is no AI
88
+ * decision: it stays a proposal.
89
+ */
90
+ export declare const AI_RUNTIMES: readonly ["copilot-acp", "hand-off"];
91
+ export type AiRuntime = (typeof AI_RUNTIMES)[number];
92
+ /**
93
+ * ADR 0181: the bar an AI decision met to be applied without a person. `confident`: the shapes
94
+ * score the same pair 0.85 or more and 0.2 ahead (ADR 0178); `agrees-with-shapes`: the AI picked
95
+ * what the shapes rank first; `person-rule`: a person's rule covers it and says the same.
96
+ */
97
+ export declare const DECIDE_BARS: readonly ["confident", "agrees-with-shapes", "person-rule"];
98
+ export declare const DecideBar: z.ZodEnum<{
99
+ confident: "confident";
100
+ "agrees-with-shapes": "agrees-with-shapes";
101
+ "person-rule": "person-rule";
102
+ }>;
103
+ export type DecideBar = z.infer<typeof DecideBar>;
104
+ /** ADR 0181: who decided, when it was the AI: the runtime and the run that made it. */
105
+ export declare const AiBy: z.ZodObject<{
106
+ kind: z.ZodLiteral<"ai">;
107
+ runtime: z.ZodEnum<{
108
+ "hand-off": "hand-off";
109
+ "copilot-acp": "copilot-acp";
110
+ }>;
111
+ run: z.ZodString;
112
+ bar: z.ZodOptional<z.ZodEnum<{
113
+ confident: "confident";
114
+ "agrees-with-shapes": "agrees-with-shapes";
115
+ "person-rule": "person-rule";
116
+ }>>;
117
+ }, z.core.$strict>;
118
+ export type AiBy = z.infer<typeof AiBy>;
119
+ /** Whether an answer's or a line's `by` is the AI's. */
120
+ export declare const isAiBy: (by: unknown) => by is AiBy;
121
+ /** Who decided, in words: a person's handle, or "AI (copilot-acp, run <id>)"; never a person for the AI. */
122
+ export declare const answerByWords: (by: string | AiBy) => string;
123
+ /** ADR 0181: a batch of decisions applied at once (by AI, or by a person's rule). */
124
+ export declare const BatchId: z.ZodString;
125
+ /**
126
+ * ADR 0181: an answer or line a person's rule applied: the correction it came from (a question id,
127
+ * or `link:<repo>:<call fact id>`) and the rule (a path prefix, host or topic pattern).
128
+ */
129
+ export declare const AppliedRule: z.ZodObject<{
130
+ from: z.ZodString;
131
+ match: z.ZodString;
132
+ }, z.core.$strict>;
133
+ export type AppliedRule = z.infer<typeof AppliedRule>;
15
134
  /** A question's id: q- and 12 hex characters of the fingerprint of what it asks about. */
16
135
  export declare const QuestionId: z.ZodString;
17
136
  /** Where the question comes from in the repo: path:line. */
@@ -41,10 +160,38 @@ export declare const QuestionOption: z.ZodObject<{
41
160
  changes: z.ZodString;
42
161
  }, z.core.$strict>;
43
162
  export type QuestionOption = z.infer<typeof QuestionOption>;
163
+ /**
164
+ * The rule an answer covers (ADR 0153, Q2): a host pattern as a manifest takes it
165
+ * (`*.payments.forge.internal`, `*` for any part of a label) or a path prefix
166
+ * (`/forge/limits/**`, or `/forge/limits`: the path and everything under it). One answer then
167
+ * covers every call that matches, found now or later, in each repo the answer's scope allows.
168
+ */
169
+ export declare const AnswerMatch: z.ZodString;
170
+ /** Whether a match is a path prefix (else it is a host pattern). */
171
+ export declare const isPathMatch: (m: string) => boolean;
172
+ /** A line a proposal rests on (ADR 0144): the repo (the question's own when left out), file, line, quote. */
173
+ export declare const QuestionProposalCite: z.ZodObject<{
174
+ repo: z.ZodOptional<z.ZodString>;
175
+ file: z.ZodString;
176
+ line: z.ZodNumber;
177
+ quote: z.ZodString;
178
+ }, z.core.$strict>;
44
179
  export declare const QuestionAnswer: z.ZodObject<{
45
180
  option: z.ZodOptional<z.ZodNumber>;
46
181
  text: z.ZodOptional<z.ZodString>;
47
- by: z.ZodString;
182
+ by: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
183
+ kind: z.ZodLiteral<"ai">;
184
+ runtime: z.ZodEnum<{
185
+ "hand-off": "hand-off";
186
+ "copilot-acp": "copilot-acp";
187
+ }>;
188
+ run: z.ZodString;
189
+ bar: z.ZodOptional<z.ZodEnum<{
190
+ confident: "confident";
191
+ "agrees-with-shapes": "agrees-with-shapes";
192
+ "person-rule": "person-rule";
193
+ }>>;
194
+ }, z.core.$strict>]>;
48
195
  at: z.ZodISODateTime;
49
196
  scope: z.ZodObject<{
50
197
  level: z.ZodEnum<{
@@ -54,10 +201,26 @@ export declare const QuestionAnswer: z.ZodObject<{
54
201
  id: z.ZodString;
55
202
  }, z.core.$strict>;
56
203
  skill: z.ZodOptional<z.ZodString>;
204
+ match: z.ZodOptional<z.ZodString>;
205
+ proposal: z.ZodOptional<z.ZodObject<{
206
+ by: z.ZodString;
207
+ at: z.ZodISODateTime;
208
+ cites: z.ZodArray<z.ZodObject<{
209
+ repo: z.ZodOptional<z.ZodString>;
210
+ file: z.ZodString;
211
+ line: z.ZodNumber;
212
+ quote: z.ZodString;
213
+ }, z.core.$strict>>;
214
+ }, z.core.$strict>>;
215
+ batch: z.ZodOptional<z.ZodString>;
216
+ rule: z.ZodOptional<z.ZodObject<{
217
+ from: z.ZodString;
218
+ match: z.ZodString;
219
+ }, z.core.$strict>>;
57
220
  }, z.core.$strict>;
58
221
  export type QuestionAnswer = z.infer<typeof QuestionAnswer>;
59
222
  export declare const Question: z.ZodObject<{
60
- schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
223
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
61
224
  id: z.ZodString;
62
225
  askedBy: z.ZodObject<{
63
226
  step: z.ZodString;
@@ -87,6 +250,34 @@ export declare const Question: z.ZodObject<{
87
250
  }>;
88
251
  id: z.ZodString;
89
252
  }, z.core.$strict>;
253
+ role: z.ZodOptional<z.ZodEnum<{
254
+ product: "product";
255
+ architecture: "architecture";
256
+ delivery: "delivery";
257
+ analysis: "analysis";
258
+ }>>;
259
+ asks: z.ZodOptional<z.ZodEnum<{
260
+ business: "business";
261
+ delivery: "delivery";
262
+ design: "design";
263
+ }>>;
264
+ routed: z.ZodOptional<z.ZodObject<{
265
+ from: z.ZodOptional<z.ZodEnum<{
266
+ product: "product";
267
+ architecture: "architecture";
268
+ delivery: "delivery";
269
+ analysis: "analysis";
270
+ }>>;
271
+ by: z.ZodString;
272
+ at: z.ZodISODateTime;
273
+ }, z.core.$strict>>;
274
+ askedOf: z.ZodOptional<z.ZodString>;
275
+ finding: z.ZodOptional<z.ZodObject<{
276
+ change: z.ZodString;
277
+ gate: z.ZodString;
278
+ round: z.ZodNumber;
279
+ id: z.ZodString;
280
+ }, z.core.$strict>>;
90
281
  state: z.ZodEnum<{
91
282
  retired: "retired";
92
283
  open: "open";
@@ -96,7 +287,19 @@ export declare const Question: z.ZodObject<{
96
287
  answer: z.ZodOptional<z.ZodObject<{
97
288
  option: z.ZodOptional<z.ZodNumber>;
98
289
  text: z.ZodOptional<z.ZodString>;
99
- by: z.ZodString;
290
+ by: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
291
+ kind: z.ZodLiteral<"ai">;
292
+ runtime: z.ZodEnum<{
293
+ "hand-off": "hand-off";
294
+ "copilot-acp": "copilot-acp";
295
+ }>;
296
+ run: z.ZodString;
297
+ bar: z.ZodOptional<z.ZodEnum<{
298
+ confident: "confident";
299
+ "agrees-with-shapes": "agrees-with-shapes";
300
+ "person-rule": "person-rule";
301
+ }>>;
302
+ }, z.core.$strict>]>;
100
303
  at: z.ZodISODateTime;
101
304
  scope: z.ZodObject<{
102
305
  level: z.ZodEnum<{
@@ -106,17 +309,79 @@ export declare const Question: z.ZodObject<{
106
309
  id: z.ZodString;
107
310
  }, z.core.$strict>;
108
311
  skill: z.ZodOptional<z.ZodString>;
312
+ match: z.ZodOptional<z.ZodString>;
313
+ proposal: z.ZodOptional<z.ZodObject<{
314
+ by: z.ZodString;
315
+ at: z.ZodISODateTime;
316
+ cites: z.ZodArray<z.ZodObject<{
317
+ repo: z.ZodOptional<z.ZodString>;
318
+ file: z.ZodString;
319
+ line: z.ZodNumber;
320
+ quote: z.ZodString;
321
+ }, z.core.$strict>>;
322
+ }, z.core.$strict>>;
323
+ batch: z.ZodOptional<z.ZodString>;
324
+ rule: z.ZodOptional<z.ZodObject<{
325
+ from: z.ZodString;
326
+ match: z.ZodString;
327
+ }, z.core.$strict>>;
109
328
  }, z.core.$strict>>;
110
329
  retired: z.ZodOptional<z.ZodObject<{
111
330
  at: z.ZodISODateTime;
112
331
  why: z.ZodString;
113
332
  replacedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
333
  }, z.core.$strict>>;
334
+ reopened: z.ZodOptional<z.ZodObject<{
335
+ at: z.ZodISODateTime;
336
+ why: z.ZodString;
337
+ answer: z.ZodObject<{
338
+ option: z.ZodOptional<z.ZodNumber>;
339
+ text: z.ZodOptional<z.ZodString>;
340
+ by: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
341
+ kind: z.ZodLiteral<"ai">;
342
+ runtime: z.ZodEnum<{
343
+ "hand-off": "hand-off";
344
+ "copilot-acp": "copilot-acp";
345
+ }>;
346
+ run: z.ZodString;
347
+ bar: z.ZodOptional<z.ZodEnum<{
348
+ confident: "confident";
349
+ "agrees-with-shapes": "agrees-with-shapes";
350
+ "person-rule": "person-rule";
351
+ }>>;
352
+ }, z.core.$strict>]>;
353
+ at: z.ZodISODateTime;
354
+ scope: z.ZodObject<{
355
+ level: z.ZodEnum<{
356
+ repo: "repo";
357
+ "repo-type": "repo-type";
358
+ }>;
359
+ id: z.ZodString;
360
+ }, z.core.$strict>;
361
+ skill: z.ZodOptional<z.ZodString>;
362
+ match: z.ZodOptional<z.ZodString>;
363
+ proposal: z.ZodOptional<z.ZodObject<{
364
+ by: z.ZodString;
365
+ at: z.ZodISODateTime;
366
+ cites: z.ZodArray<z.ZodObject<{
367
+ repo: z.ZodOptional<z.ZodString>;
368
+ file: z.ZodString;
369
+ line: z.ZodNumber;
370
+ quote: z.ZodString;
371
+ }, z.core.$strict>>;
372
+ }, z.core.$strict>>;
373
+ batch: z.ZodOptional<z.ZodString>;
374
+ rule: z.ZodOptional<z.ZodObject<{
375
+ from: z.ZodString;
376
+ match: z.ZodString;
377
+ }, z.core.$strict>>;
378
+ }, z.core.$strict>;
379
+ }, z.core.$strict>>;
115
380
  related: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
381
  id: z.ZodString;
117
382
  verdict: z.ZodEnum<{
118
- narrower: "narrower";
119
383
  unsure: "unsure";
384
+ narrower: "narrower";
120
385
  }>;
121
386
  judgment: z.ZodOptional<z.ZodString>;
122
387
  }, z.core.$strict>>>;
@@ -139,6 +404,17 @@ export declare const QuestionDraft: z.ZodObject<{
139
404
  "repo-type": "repo-type";
140
405
  }>>;
141
406
  repoType: z.ZodOptional<z.ZodString>;
407
+ role: z.ZodOptional<z.ZodEnum<{
408
+ product: "product";
409
+ architecture: "architecture";
410
+ delivery: "delivery";
411
+ analysis: "analysis";
412
+ }>>;
413
+ asks: z.ZodOptional<z.ZodEnum<{
414
+ business: "business";
415
+ delivery: "delivery";
416
+ design: "design";
417
+ }>>;
142
418
  sameAs: z.ZodOptional<z.ZodObject<{
143
419
  id: z.ZodString;
144
420
  verdict: z.ZodEnum<{
@@ -0,0 +1,51 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * G4 (ADR 0176): reading rules the organisation owns, in the org pack, in layers: `org.yaml` for
4
+ * every repo, `types/<type>.yaml` for every repo of a type, `repos/<repo>.yaml` for one repo, and
5
+ * `imported/<team>/<type>.yaml`, a pinned copy of another product team's type rules. Each rule
6
+ * adds to what Atticus's built-in rules tell a reader; a later layer may switch an earlier one off
7
+ * for its scope (a built-in rule set by `builtin:<set>`), saying why. A person or Copilot writes
8
+ * them; every change is reviewed like code. They never change the facts file's format or the
9
+ * verifier: every fact still cites its line.
10
+ */
11
+ export declare const READING_RULES_SCHEMA_VERSION: 1;
12
+ export declare const ReadingRule: z.ZodObject<{
13
+ key: z.ZodString;
14
+ status: z.ZodDefault<z.ZodEnum<{
15
+ active: "active";
16
+ draft: "draft";
17
+ }>>;
18
+ rule: z.ZodString;
19
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ example: z.ZodOptional<z.ZodString>;
21
+ by: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strict>;
23
+ export type ReadingRule = z.infer<typeof ReadingRule>;
24
+ export declare const ReadingRulesOff: z.ZodObject<{
25
+ key: z.ZodString;
26
+ reason: z.ZodString;
27
+ }, z.core.$strict>;
28
+ export declare const ReadingRulesFile: z.ZodObject<{
29
+ schemaVersion: z.ZodLiteral<1>;
30
+ source: z.ZodOptional<z.ZodObject<{
31
+ from: z.ZodString;
32
+ at: z.ZodString;
33
+ team: z.ZodString;
34
+ }, z.core.$strict>>;
35
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
36
+ key: z.ZodString;
37
+ status: z.ZodDefault<z.ZodEnum<{
38
+ active: "active";
39
+ draft: "draft";
40
+ }>>;
41
+ rule: z.ZodString;
42
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
+ example: z.ZodOptional<z.ZodString>;
44
+ by: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strict>>>;
46
+ off: z.ZodDefault<z.ZodArray<z.ZodObject<{
47
+ key: z.ZodString;
48
+ reason: z.ZodString;
49
+ }, z.core.$strict>>>;
50
+ }, z.core.$strict>;
51
+ export type ReadingRulesFile = z.infer<typeof ReadingRulesFile>;
@@ -7,7 +7,24 @@ import { z } from "zod";
7
7
  * so what was learned on one repo of a type is reused on the next. Distinct from the platform
8
8
  * profiles in profiles/<platform>/.
9
9
  */
10
- export declare const REPO_TYPE_SCHEMA_VERSION: 1;
10
+ /**
11
+ * Version 2 (ADR 0163) adds `notes`: what the organisation's own terms mean in repos of the type,
12
+ * and what must hold in them, in its own words. Optional, so a version-1 file reads as it is and
13
+ * comes back as version 2 in memory; writers write version 2.
14
+ */
15
+ export declare const REPO_TYPE_SCHEMA_VERSION: 2;
16
+ /**
17
+ * A note in the organisation's own words (ADR 0163): plain text, read by the assistant as data
18
+ * when it reads a repo of the type, never parsed by Atticus. One may say what a term means
19
+ * ("`cmdb` in userAccess.json lists the apps let in to the API") or what must hold ("every call to
20
+ * a vendor uses mTLS"); a note that reads as a rule is offered as a checklist rule draft.
21
+ *
22
+ * One line: a note is handed to the assistant as one quoted line of a data block, so a line break
23
+ * is refused (the edges are trimmed first, so a folded YAML scalar's last break is fine).
24
+ * `atticus repo-type note --add` and a term answer's offered note put a break as a space.
25
+ */
26
+ export declare const OrgNote: z.ZodString;
27
+ export declare const OrgNotes: z.ZodArray<z.ZodString>;
11
28
  /** The build files a dependency is looked for in when a signal doesn't say. */
12
29
  export declare const DEFAULT_BUILD_FILES: string[];
13
30
  export declare const FingerprintSignal: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -63,7 +80,7 @@ export declare const SettingsTemplate: z.ZodObject<{
63
80
  }, z.core.$strict>;
64
81
  export type SettingsTemplate = z.infer<typeof SettingsTemplate>;
65
82
  export declare const RepoType: z.ZodObject<{
66
- schemaVersion: z.ZodLiteral<1>;
83
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
67
84
  id: z.ZodString;
68
85
  name: z.ZodString;
69
86
  description: z.ZodString;
@@ -105,5 +122,6 @@ export declare const RepoType: z.ZodObject<{
105
122
  }, z.core.$strict>>>;
106
123
  }, z.core.$strict>>;
107
124
  skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
125
+ notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
108
126
  }, z.core.$strict>;
109
127
  export type RepoType = z.infer<typeof RepoType>;
@@ -28,6 +28,7 @@ export type LegacyLens = (typeof LEGACY_LENSES)[number];
28
28
  * question it maps to). C3, widened additively; no schema version bump.
29
29
  */
30
30
  export declare const Lens: z.ZodEnum<{
31
+ release: "release";
31
32
  true: "true";
32
33
  complete: "complete";
33
34
  safe: "safe";
@@ -38,7 +39,6 @@ export declare const Lens: z.ZodEnum<{
38
39
  ux: "ux";
39
40
  delivery: "delivery";
40
41
  "code-and-test": "code-and-test";
41
- release: "release";
42
42
  }>;
43
43
  export type Lens = z.infer<typeof Lens>;
44
44
  export declare const isCriticQuestion: (l: string) => l is CriticQuestion;
@@ -49,6 +49,25 @@ export declare function questionOfLens(l: Lens): CriticQuestion;
49
49
  * lens covers what it used to review (the architecture lens also reviewed what is now safe).
50
50
  */
51
51
  export declare function lensCovers(l: Lens): CriticQuestion[];
52
+ /**
53
+ * A finding's lens: a rule's lens, or `persona` for a persona's naysayer run as a lens of the
54
+ * critic (ADR 0203 C.3, C3 additive, no bump). Rules' lenses stay as they are.
55
+ */
56
+ export declare const FindingLens: z.ZodEnum<{
57
+ release: "release";
58
+ true: "true";
59
+ complete: "complete";
60
+ safe: "safe";
61
+ ship: "ship";
62
+ business: "business";
63
+ architecture: "architecture";
64
+ story: "story";
65
+ ux: "ux";
66
+ delivery: "delivery";
67
+ "code-and-test": "code-and-test";
68
+ persona: "persona";
69
+ }>;
70
+ export type FindingLens = z.infer<typeof FindingLens>;
52
71
  /** Where a rule comes from. Constitution rules can never be waived. */
53
72
  export declare const Layer: z.ZodEnum<{
54
73
  team: "team";
@@ -72,8 +91,8 @@ export declare const ReviewArtifact: z.ZodEnum<{
72
91
  code: "code";
73
92
  interfaces: "interfaces";
74
93
  data: "data";
75
- ux: "ux";
76
94
  release: "release";
95
+ ux: "ux";
77
96
  brief: "brief";
78
97
  proposal: "proposal";
79
98
  specs: "specs";
@@ -154,6 +173,7 @@ export declare const ChecklistRule: z.ZodObject<{
154
173
  org: "org";
155
174
  }>;
156
175
  lens: z.ZodEnum<{
176
+ release: "release";
157
177
  true: "true";
158
178
  complete: "complete";
159
179
  safe: "safe";
@@ -164,7 +184,6 @@ export declare const ChecklistRule: z.ZodObject<{
164
184
  ux: "ux";
165
185
  delivery: "delivery";
166
186
  "code-and-test": "code-and-test";
167
- release: "release";
168
187
  }>;
169
188
  question: z.ZodOptional<z.ZodEnum<{
170
189
  true: "true";
@@ -177,8 +196,8 @@ export declare const ChecklistRule: z.ZodObject<{
177
196
  code: "code";
178
197
  interfaces: "interfaces";
179
198
  data: "data";
180
- ux: "ux";
181
199
  release: "release";
200
+ ux: "ux";
182
201
  brief: "brief";
183
202
  proposal: "proposal";
184
203
  specs: "specs";
@@ -279,6 +298,7 @@ export declare const ChecklistPack: z.ZodObject<{
279
298
  org: "org";
280
299
  }>;
281
300
  lens: z.ZodEnum<{
301
+ release: "release";
282
302
  true: "true";
283
303
  complete: "complete";
284
304
  safe: "safe";
@@ -289,7 +309,6 @@ export declare const ChecklistPack: z.ZodObject<{
289
309
  ux: "ux";
290
310
  delivery: "delivery";
291
311
  "code-and-test": "code-and-test";
292
- release: "release";
293
312
  }>;
294
313
  question: z.ZodOptional<z.ZodEnum<{
295
314
  true: "true";
@@ -302,8 +321,8 @@ export declare const ChecklistPack: z.ZodObject<{
302
321
  code: "code";
303
322
  interfaces: "interfaces";
304
323
  data: "data";
305
- ux: "ux";
306
324
  release: "release";
325
+ ux: "ux";
307
326
  brief: "brief";
308
327
  proposal: "proposal";
309
328
  specs: "specs";
@@ -404,8 +423,8 @@ export declare const FindingEvidence: z.ZodObject<{
404
423
  export: "export";
405
424
  manual: "manual";
406
425
  }>, z.ZodEnum<{
407
- catalog: "catalog";
408
426
  artifact: "artifact";
427
+ catalog: "catalog";
409
428
  rule: "rule";
410
429
  }>]>;
411
430
  record: z.ZodOptional<z.ZodString>;
@@ -464,6 +483,7 @@ export declare const Finding: z.ZodObject<{
464
483
  org: "org";
465
484
  }>;
466
485
  lens: z.ZodEnum<{
486
+ release: "release";
467
487
  true: "true";
468
488
  complete: "complete";
469
489
  safe: "safe";
@@ -474,8 +494,9 @@ export declare const Finding: z.ZodObject<{
474
494
  ux: "ux";
475
495
  delivery: "delivery";
476
496
  "code-and-test": "code-and-test";
477
- release: "release";
497
+ persona: "persona";
478
498
  }>;
499
+ persona: z.ZodOptional<z.ZodString>;
479
500
  severity: z.ZodEnum<{
480
501
  blocking: "blocking";
481
502
  gap: "gap";
@@ -510,8 +531,8 @@ export declare const Finding: z.ZodObject<{
510
531
  export: "export";
511
532
  manual: "manual";
512
533
  }>, z.ZodEnum<{
513
- catalog: "catalog";
514
534
  artifact: "artifact";
535
+ catalog: "catalog";
515
536
  rule: "rule";
516
537
  }>]>;
517
538
  record: z.ZodOptional<z.ZodString>;