@maycombhq/sdk 2.0.0-beta.2 → 2.0.0-beta.21

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 (54) hide show
  1. package/npm/core/ai-decisions.d.ts +360 -0
  2. package/npm/core/api.d.ts +5806 -1212
  3. package/npm/core/audit.d.ts +165 -0
  4. package/npm/core/catalog.d.ts +220 -66
  5. package/npm/core/contract-check.d.ts +261 -0
  6. package/npm/core/decision-batches.d.ts +29 -0
  7. package/npm/core/declared-links.d.ts +62 -0
  8. package/npm/core/eol.d.ts +5 -0
  9. package/npm/core/fact-paths.d.ts +14 -0
  10. package/npm/core/facts-callers.d.ts +2 -0
  11. package/npm/core/facts-join-prototype.d.ts +66 -4
  12. package/npm/core/facts-join-vendor.d.ts +20 -2
  13. package/npm/core/facts-join.d.ts +320 -1
  14. package/npm/core/facts-terms.d.ts +108 -0
  15. package/npm/core/fs.d.ts +23 -4
  16. package/npm/core/host-questions.d.ts +93 -1
  17. package/npm/core/index.d.ts +22 -0
  18. package/npm/core/link-candidates.d.ts +103 -0
  19. package/npm/core/link-evidence.d.ts +212 -0
  20. package/npm/core/manifest-edit.d.ts +53 -4
  21. package/npm/core/merge.d.ts +28 -0
  22. package/npm/core/metarepo.d.ts +18 -1
  23. package/npm/core/migrate.d.ts +3 -2
  24. package/npm/core/org-notes.d.ts +180 -0
  25. package/npm/core/orgpack-defaults.d.ts +22 -6
  26. package/npm/core/orgpack-load.d.ts +19 -0
  27. package/npm/core/profile-migrate.d.ts +11 -0
  28. package/npm/core/question-order.d.ts +23 -0
  29. package/npm/core/question-owners.d.ts +53 -0
  30. package/npm/core/question-proposals.d.ts +77 -0
  31. package/npm/core/question-roles.d.ts +24 -0
  32. package/npm/core/questions.d.ts +85 -6
  33. package/npm/core/repo-reads.d.ts +44 -0
  34. package/npm/core/roles-migrate.d.ts +9 -0
  35. package/npm/core/runtime-migrate.d.ts +18 -0
  36. package/npm/core/schema/ai.d.ts +57 -9
  37. package/npm/core/schema/common.d.ts +32 -8
  38. package/npm/core/schema/component-type.d.ts +193 -0
  39. package/npm/core/schema/conventions.d.ts +80 -0
  40. package/npm/core/schema/fact-corrections.d.ts +96 -2
  41. package/npm/core/schema/facts.d.ts +410 -1
  42. package/npm/core/schema/kinds.d.ts +230 -66
  43. package/npm/core/schema/orgpack.d.ts +110 -7
  44. package/npm/core/schema/question.d.ts +228 -5
  45. package/npm/core/schema/reading-rules.d.ts +51 -0
  46. package/npm/core/schema/repo-type.d.ts +20 -2
  47. package/npm/core/schema/review.d.ts +7 -7
  48. package/npm/core/schema/scan-verify.d.ts +87 -45
  49. package/npm/core/schema/version.d.ts +4 -1
  50. package/npm/core/schema/workspace.d.ts +29 -11
  51. package/npm/core/shared-maps.d.ts +146 -0
  52. package/npm/core/stack-helpers.d.ts +32 -0
  53. package/npm/index.js +5614 -2343
  54. package/package.json +1 -1
@@ -71,8 +71,26 @@ export declare const Approver: z.ZodObject<{
71
71
  groups: z.ZodDefault<z.ZodArray<z.ZodString>>;
72
72
  people: z.ZodDefault<z.ZodArray<z.ZodString>>;
73
73
  }, z.core.$strict>;
74
+ /**
75
+ * roles.yaml version 2 (ADR 0140) adds `teams`: who is on each team a repo manifest's `owner`
76
+ * names, so a question goes to the team that owns its repo and a person can list their own.
77
+ * Words, not permissions: nothing is allowed or refused by team. The rest of the file stays
78
+ * deprecated (ADR 0073). A version-1 file is read as it is; `teams` needs version 2.
79
+ */
80
+ export declare const ROLES_SCHEMA_VERSION: 2;
81
+ export declare const Team: z.ZodObject<{
82
+ id: z.ZodString;
83
+ name: z.ZodOptional<z.ZodString>;
84
+ people: z.ZodDefault<z.ZodArray<z.ZodString>>;
85
+ }, z.core.$strict>;
86
+ export type Team = z.infer<typeof Team>;
74
87
  export declare const Roles: z.ZodObject<{
75
- schemaVersion: z.ZodLiteral<1>;
88
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
89
+ teams: z.ZodDefault<z.ZodArray<z.ZodObject<{
90
+ id: z.ZodString;
91
+ name: z.ZodOptional<z.ZodString>;
92
+ people: z.ZodDefault<z.ZodArray<z.ZodString>>;
93
+ }, z.core.$strict>>>;
76
94
  custom: z.ZodDefault<z.ZodArray<z.ZodObject<{
77
95
  id: z.ZodString;
78
96
  name: z.ZodString;
@@ -168,6 +186,7 @@ export declare const ChangeType: z.ZodObject<{
168
186
  snow: "snow";
169
187
  }>>;
170
188
  lenses: z.ZodDefault<z.ZodArray<z.ZodEnum<{
189
+ release: "release";
171
190
  true: "true";
172
191
  complete: "complete";
173
192
  safe: "safe";
@@ -178,7 +197,6 @@ export declare const ChangeType: z.ZodObject<{
178
197
  ux: "ux";
179
198
  delivery: "delivery";
180
199
  "code-and-test": "code-and-test";
181
- release: "release";
182
200
  }>>>;
183
201
  approvals: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
184
202
  release: "release";
@@ -231,6 +249,7 @@ export declare const ChangeTypes: z.ZodObject<{
231
249
  snow: "snow";
232
250
  }>>;
233
251
  lenses: z.ZodDefault<z.ZodArray<z.ZodEnum<{
252
+ release: "release";
234
253
  true: "true";
235
254
  complete: "complete";
236
255
  safe: "safe";
@@ -241,7 +260,6 @@ export declare const ChangeTypes: z.ZodObject<{
241
260
  ux: "ux";
242
261
  delivery: "delivery";
243
262
  "code-and-test": "code-and-test";
244
- release: "release";
245
263
  }>>>;
246
264
  approvals: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
247
265
  release: "release";
@@ -749,9 +767,67 @@ export type StepClass = z.infer<typeof StepClass>;
749
767
  * step on the one model; `atticus upgrade` moves it to version 2 (`runtime-v2`), changing nothing
750
768
  * else.
751
769
  */
752
- export declare const RUNTIME_SCHEMA_VERSION: 2;
770
+ export declare const RUNTIME_SCHEMA_VERSION: 4;
771
+ /**
772
+ * runtime.yaml version 4 (ADR 0181): whether the AI decides, itself, what it can (a loose call's
773
+ * pairing with an API, an option question about a target on file), shown as the AI's, or only
774
+ * proposes for a person, as before. `propose` until the organisation turns it on in a pull
775
+ * request. `minPrecision`: the share right of the AI's decisions a sample audit must show
776
+ * (ADR 0148); below it, deciding pauses back to propose and Home says why. Configuration, not a
777
+ * safety rule: a human still approves every write to shared systems, and the AI never decides a
778
+ * free-text question, a scope wider than the repo, an org-pack change, a gate or anything a
779
+ * person only may do.
780
+ */
781
+ export declare const DecideSettings: z.ZodObject<{
782
+ links: z.ZodDefault<z.ZodEnum<{
783
+ auto: "auto";
784
+ propose: "propose";
785
+ }>>;
786
+ questions: z.ZodDefault<z.ZodEnum<{
787
+ auto: "auto";
788
+ propose: "propose";
789
+ }>>;
790
+ minPrecision: z.ZodDefault<z.ZodNumber>;
791
+ }, z.core.$strict>;
792
+ export type DecideSettings = z.infer<typeof DecideSettings>;
793
+ export declare const DECIDE_DEFAULTS: DecideSettings;
794
+ /** runtime.yaml's decide section with its defaults (ADR 0181). */
795
+ export declare function decideOf(runtime: {
796
+ decide?: Partial<DecideSettings> | undefined;
797
+ } | undefined): DecideSettings;
798
+ /**
799
+ * runtime.yaml version 3 (ADR 0171): how Atticus starts the GitHub Copilot language server in its
800
+ * Agent Client Protocol mode, for `copilot-acp`. Only how to start it, which model to ask for and
801
+ * the caps: what the session may read, write and run is fixed in code (rule 6), never here.
802
+ * - command: the server's program and any words before `--acp` (no shell), as one line; a path
803
+ * with spaces in double quotes. Default `npx --yes @github/copilot-language-server`.
804
+ * - model: the model id to ask the server for, when it offers a choice.
805
+ * - maxTurns: the most tool calls one session may make before Atticus cancels it (default 200).
806
+ * - timeoutMs: the longest one session may take (default 30 minutes).
807
+ */
808
+ export declare const CopilotAcpSettings: z.ZodObject<{
809
+ command: z.ZodOptional<z.ZodString>;
810
+ model: z.ZodOptional<z.ZodString>;
811
+ maxTurns: z.ZodOptional<z.ZodNumber>;
812
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
813
+ }, z.core.$strict>;
814
+ export type CopilotAcpSettings = z.infer<typeof CopilotAcpSettings>;
815
+ export declare const COPILOT_ACP_DEFAULTS: {
816
+ readonly command: "npx --yes @github/copilot-language-server";
817
+ readonly maxTurns: 200;
818
+ readonly timeoutMs: number;
819
+ };
820
+ /** runtime.yaml's copilotAcp section with its defaults (ADR 0171). */
821
+ export declare function copilotAcpOf(runtime: {
822
+ copilotAcp?: CopilotAcpSettings | undefined;
823
+ } | undefined): {
824
+ command: string;
825
+ model?: string;
826
+ maxTurns: number;
827
+ timeoutMs: number;
828
+ };
753
829
  export declare const Runtime: z.ZodObject<{
754
- schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
830
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
755
831
  assistants: z.ZodObject<{
756
832
  allowed: z.ZodArray<z.ZodEnum<{
757
833
  copilot: "copilot";
@@ -784,11 +860,13 @@ export declare const Runtime: z.ZodObject<{
784
860
  model: "model";
785
861
  "hand-off": "hand-off";
786
862
  "headless-claude-code": "headless-claude-code";
863
+ "copilot-acp": "copilot-acp";
787
864
  }>>;
788
865
  default: z.ZodEnum<{
789
866
  model: "model";
790
867
  "hand-off": "hand-off";
791
868
  "headless-claude-code": "headless-claude-code";
869
+ "copilot-acp": "copilot-acp";
792
870
  }>;
793
871
  }, z.core.$strict>>;
794
872
  models: z.ZodDefault<z.ZodObject<{
@@ -831,6 +909,23 @@ export declare const Runtime: z.ZodObject<{
831
909
  expansion: z.ZodDefault<z.ZodBoolean>;
832
910
  rerank: z.ZodDefault<z.ZodBoolean>;
833
911
  }, z.core.$strict>>;
912
+ copilotAcp: z.ZodOptional<z.ZodObject<{
913
+ command: z.ZodOptional<z.ZodString>;
914
+ model: z.ZodOptional<z.ZodString>;
915
+ maxTurns: z.ZodOptional<z.ZodNumber>;
916
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
917
+ }, z.core.$strict>>;
918
+ decide: z.ZodOptional<z.ZodObject<{
919
+ links: z.ZodDefault<z.ZodEnum<{
920
+ auto: "auto";
921
+ propose: "propose";
922
+ }>>;
923
+ questions: z.ZodDefault<z.ZodEnum<{
924
+ auto: "auto";
925
+ propose: "propose";
926
+ }>>;
927
+ minPrecision: z.ZodDefault<z.ZodNumber>;
928
+ }, z.core.$strict>>;
834
929
  telemetry: z.ZodDefault<z.ZodObject<{
835
930
  enabled: z.ZodDefault<z.ZodBoolean>;
836
931
  }, z.core.$strict>>;
@@ -923,9 +1018,9 @@ export declare const SkillMeta: z.ZodObject<{
923
1018
  source: z.ZodString;
924
1019
  status: z.ZodDefault<z.ZodEnum<{
925
1020
  retired: "retired";
1021
+ stale: "stale";
926
1022
  active: "active";
927
1023
  draft: "draft";
928
- stale: "stale";
929
1024
  }>>;
930
1025
  reviewedAt: z.ZodOptional<z.ZodISODate>;
931
1026
  }, z.core.$strict>;
@@ -1130,8 +1225,15 @@ export declare const DeclaredCall: z.ZodObject<{
1130
1225
  route: z.ZodOptional<z.ZodString>;
1131
1226
  }, z.core.$strict>;
1132
1227
  export type DeclaredCall = z.infer<typeof DeclaredCall>;
1228
+ /**
1229
+ * profile.yaml's version. 2 (ADR 0162 amendment, review item 15) adds a system's `topics`. A
1230
+ * version-1 profile reads as it is and stays valid, so `atticus upgrade` moves nothing; a profile
1231
+ * that names topics is at 2 (`migrateProfileText`, the number only), as `addProfileSystem` writes
1232
+ * it when an answer puts a topic there.
1233
+ */
1234
+ export declare const PROFILE_SCHEMA_VERSION: 2;
1133
1235
  export declare const Profile: z.ZodObject<{
1134
- schemaVersion: z.ZodLiteral<1>;
1236
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1135
1237
  platform: z.ZodString;
1136
1238
  name: z.ZodString;
1137
1239
  systems: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -1144,6 +1246,7 @@ export declare const Profile: z.ZodObject<{
1144
1246
  }>;
1145
1247
  owner: z.ZodOptional<z.ZodString>;
1146
1248
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
1249
+ topics: z.ZodOptional<z.ZodArray<z.ZodString>>;
1147
1250
  tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
1148
1251
  calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1149
1252
  as: z.ZodOptional<z.ZodEnum<{
@@ -11,7 +11,93 @@ 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
+ export declare const QUESTION_SCHEMA_VERSION: 5;
37
+ /**
38
+ * ADR 0181 part 4: who owns a question on a change, by the phase that raised it. The product owner
39
+ * (Define), the architect (Design), the business analyst (Plan's stories) and the tech lead (Plan's
40
+ * tasks and Build). Words, not permissions: anyone can still read and answer any question.
41
+ */
42
+ export declare const QUESTION_ROLES: readonly ["product", "architecture", "analysis", "delivery"];
43
+ export declare const QuestionRole: z.ZodEnum<{
44
+ product: "product";
45
+ architecture: "architecture";
46
+ delivery: "delivery";
47
+ analysis: "analysis";
48
+ }>;
49
+ export type QuestionRole = z.infer<typeof QuestionRole>;
50
+ /**
51
+ * ADR 0181: the runtimes whose runs Atticus records, so a decision can name its run: a Copilot
52
+ * session Atticus started (`copilot-acp`), or a hand-off run Atticus prepared for the person's
53
+ * assistant and read back when it was marked done (`hand-off`, ninth UX walk; additive, the
54
+ * question file stays at version 5). An answer pasted with no Atticus run behind it is no AI
55
+ * decision: it stays a proposal.
56
+ */
57
+ export declare const AI_RUNTIMES: readonly ["copilot-acp", "hand-off"];
58
+ export type AiRuntime = (typeof AI_RUNTIMES)[number];
59
+ /**
60
+ * ADR 0181: the bar an AI decision met to be applied without a person. `confident`: the shapes
61
+ * score the same pair 0.85 or more and 0.2 ahead (ADR 0178); `agrees-with-shapes`: the AI picked
62
+ * what the shapes rank first; `person-rule`: a person's rule covers it and says the same.
63
+ */
64
+ export declare const DECIDE_BARS: readonly ["confident", "agrees-with-shapes", "person-rule"];
65
+ export declare const DecideBar: z.ZodEnum<{
66
+ confident: "confident";
67
+ "agrees-with-shapes": "agrees-with-shapes";
68
+ "person-rule": "person-rule";
69
+ }>;
70
+ export type DecideBar = z.infer<typeof DecideBar>;
71
+ /** ADR 0181: who decided, when it was the AI: the runtime and the run that made it. */
72
+ export declare const AiBy: z.ZodObject<{
73
+ kind: z.ZodLiteral<"ai">;
74
+ runtime: z.ZodEnum<{
75
+ "hand-off": "hand-off";
76
+ "copilot-acp": "copilot-acp";
77
+ }>;
78
+ run: z.ZodString;
79
+ bar: z.ZodOptional<z.ZodEnum<{
80
+ confident: "confident";
81
+ "agrees-with-shapes": "agrees-with-shapes";
82
+ "person-rule": "person-rule";
83
+ }>>;
84
+ }, z.core.$strict>;
85
+ export type AiBy = z.infer<typeof AiBy>;
86
+ /** Whether an answer's or a line's `by` is the AI's. */
87
+ export declare const isAiBy: (by: unknown) => by is AiBy;
88
+ /** Who decided, in words: a person's handle, or "AI (copilot-acp, run <id>)"; never a person for the AI. */
89
+ export declare const answerByWords: (by: string | AiBy) => string;
90
+ /** ADR 0181: a batch of decisions applied at once (by AI, or by a person's rule). */
91
+ export declare const BatchId: z.ZodString;
92
+ /**
93
+ * ADR 0181: an answer or line a person's rule applied: the correction it came from (a question id,
94
+ * or `link:<repo>:<call fact id>`) and the rule (a path prefix, host or topic pattern).
95
+ */
96
+ export declare const AppliedRule: z.ZodObject<{
97
+ from: z.ZodString;
98
+ match: z.ZodString;
99
+ }, z.core.$strict>;
100
+ export type AppliedRule = z.infer<typeof AppliedRule>;
15
101
  /** A question's id: q- and 12 hex characters of the fingerprint of what it asks about. */
16
102
  export declare const QuestionId: z.ZodString;
17
103
  /** Where the question comes from in the repo: path:line. */
@@ -41,10 +127,38 @@ export declare const QuestionOption: z.ZodObject<{
41
127
  changes: z.ZodString;
42
128
  }, z.core.$strict>;
43
129
  export type QuestionOption = z.infer<typeof QuestionOption>;
130
+ /**
131
+ * The rule an answer covers (ADR 0153, Q2): a host pattern as a manifest takes it
132
+ * (`*.payments.forge.internal`, `*` for any part of a label) or a path prefix
133
+ * (`/forge/limits/**`, or `/forge/limits`: the path and everything under it). One answer then
134
+ * covers every call that matches, found now or later, in each repo the answer's scope allows.
135
+ */
136
+ export declare const AnswerMatch: z.ZodString;
137
+ /** Whether a match is a path prefix (else it is a host pattern). */
138
+ export declare const isPathMatch: (m: string) => boolean;
139
+ /** A line a proposal rests on (ADR 0144): the repo (the question's own when left out), file, line, quote. */
140
+ export declare const QuestionProposalCite: z.ZodObject<{
141
+ repo: z.ZodOptional<z.ZodString>;
142
+ file: z.ZodString;
143
+ line: z.ZodNumber;
144
+ quote: z.ZodString;
145
+ }, z.core.$strict>;
44
146
  export declare const QuestionAnswer: z.ZodObject<{
45
147
  option: z.ZodOptional<z.ZodNumber>;
46
148
  text: z.ZodOptional<z.ZodString>;
47
- by: z.ZodString;
149
+ by: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
150
+ kind: z.ZodLiteral<"ai">;
151
+ runtime: z.ZodEnum<{
152
+ "hand-off": "hand-off";
153
+ "copilot-acp": "copilot-acp";
154
+ }>;
155
+ run: z.ZodString;
156
+ bar: z.ZodOptional<z.ZodEnum<{
157
+ confident: "confident";
158
+ "agrees-with-shapes": "agrees-with-shapes";
159
+ "person-rule": "person-rule";
160
+ }>>;
161
+ }, z.core.$strict>]>;
48
162
  at: z.ZodISODateTime;
49
163
  scope: z.ZodObject<{
50
164
  level: z.ZodEnum<{
@@ -54,10 +168,26 @@ export declare const QuestionAnswer: z.ZodObject<{
54
168
  id: z.ZodString;
55
169
  }, z.core.$strict>;
56
170
  skill: z.ZodOptional<z.ZodString>;
171
+ match: z.ZodOptional<z.ZodString>;
172
+ proposal: z.ZodOptional<z.ZodObject<{
173
+ by: z.ZodString;
174
+ at: z.ZodISODateTime;
175
+ cites: z.ZodArray<z.ZodObject<{
176
+ repo: z.ZodOptional<z.ZodString>;
177
+ file: z.ZodString;
178
+ line: z.ZodNumber;
179
+ quote: z.ZodString;
180
+ }, z.core.$strict>>;
181
+ }, z.core.$strict>>;
182
+ batch: z.ZodOptional<z.ZodString>;
183
+ rule: z.ZodOptional<z.ZodObject<{
184
+ from: z.ZodString;
185
+ match: z.ZodString;
186
+ }, z.core.$strict>>;
57
187
  }, z.core.$strict>;
58
188
  export type QuestionAnswer = z.infer<typeof QuestionAnswer>;
59
189
  export declare const Question: z.ZodObject<{
60
- schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
190
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
61
191
  id: z.ZodString;
62
192
  askedBy: z.ZodObject<{
63
193
  step: z.ZodString;
@@ -87,6 +217,19 @@ export declare const Question: z.ZodObject<{
87
217
  }>;
88
218
  id: z.ZodString;
89
219
  }, z.core.$strict>;
220
+ role: z.ZodOptional<z.ZodEnum<{
221
+ product: "product";
222
+ architecture: "architecture";
223
+ delivery: "delivery";
224
+ analysis: "analysis";
225
+ }>>;
226
+ askedOf: z.ZodOptional<z.ZodString>;
227
+ finding: z.ZodOptional<z.ZodObject<{
228
+ change: z.ZodString;
229
+ gate: z.ZodString;
230
+ round: z.ZodNumber;
231
+ id: z.ZodString;
232
+ }, z.core.$strict>>;
90
233
  state: z.ZodEnum<{
91
234
  retired: "retired";
92
235
  open: "open";
@@ -96,7 +239,19 @@ export declare const Question: z.ZodObject<{
96
239
  answer: z.ZodOptional<z.ZodObject<{
97
240
  option: z.ZodOptional<z.ZodNumber>;
98
241
  text: z.ZodOptional<z.ZodString>;
99
- by: z.ZodString;
242
+ by: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
243
+ kind: z.ZodLiteral<"ai">;
244
+ runtime: z.ZodEnum<{
245
+ "hand-off": "hand-off";
246
+ "copilot-acp": "copilot-acp";
247
+ }>;
248
+ run: z.ZodString;
249
+ bar: z.ZodOptional<z.ZodEnum<{
250
+ confident: "confident";
251
+ "agrees-with-shapes": "agrees-with-shapes";
252
+ "person-rule": "person-rule";
253
+ }>>;
254
+ }, z.core.$strict>]>;
100
255
  at: z.ZodISODateTime;
101
256
  scope: z.ZodObject<{
102
257
  level: z.ZodEnum<{
@@ -106,17 +261,79 @@ export declare const Question: z.ZodObject<{
106
261
  id: z.ZodString;
107
262
  }, z.core.$strict>;
108
263
  skill: z.ZodOptional<z.ZodString>;
264
+ match: z.ZodOptional<z.ZodString>;
265
+ proposal: z.ZodOptional<z.ZodObject<{
266
+ by: z.ZodString;
267
+ at: z.ZodISODateTime;
268
+ cites: z.ZodArray<z.ZodObject<{
269
+ repo: z.ZodOptional<z.ZodString>;
270
+ file: z.ZodString;
271
+ line: z.ZodNumber;
272
+ quote: z.ZodString;
273
+ }, z.core.$strict>>;
274
+ }, z.core.$strict>>;
275
+ batch: z.ZodOptional<z.ZodString>;
276
+ rule: z.ZodOptional<z.ZodObject<{
277
+ from: z.ZodString;
278
+ match: z.ZodString;
279
+ }, z.core.$strict>>;
109
280
  }, z.core.$strict>>;
110
281
  retired: z.ZodOptional<z.ZodObject<{
111
282
  at: z.ZodISODateTime;
112
283
  why: z.ZodString;
113
284
  replacedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
285
  }, z.core.$strict>>;
286
+ reopened: z.ZodOptional<z.ZodObject<{
287
+ at: z.ZodISODateTime;
288
+ why: z.ZodString;
289
+ answer: z.ZodObject<{
290
+ option: z.ZodOptional<z.ZodNumber>;
291
+ text: z.ZodOptional<z.ZodString>;
292
+ by: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
293
+ kind: z.ZodLiteral<"ai">;
294
+ runtime: z.ZodEnum<{
295
+ "hand-off": "hand-off";
296
+ "copilot-acp": "copilot-acp";
297
+ }>;
298
+ run: z.ZodString;
299
+ bar: z.ZodOptional<z.ZodEnum<{
300
+ confident: "confident";
301
+ "agrees-with-shapes": "agrees-with-shapes";
302
+ "person-rule": "person-rule";
303
+ }>>;
304
+ }, z.core.$strict>]>;
305
+ at: z.ZodISODateTime;
306
+ scope: z.ZodObject<{
307
+ level: z.ZodEnum<{
308
+ repo: "repo";
309
+ "repo-type": "repo-type";
310
+ }>;
311
+ id: z.ZodString;
312
+ }, z.core.$strict>;
313
+ skill: z.ZodOptional<z.ZodString>;
314
+ match: z.ZodOptional<z.ZodString>;
315
+ proposal: z.ZodOptional<z.ZodObject<{
316
+ by: z.ZodString;
317
+ at: z.ZodISODateTime;
318
+ cites: z.ZodArray<z.ZodObject<{
319
+ repo: z.ZodOptional<z.ZodString>;
320
+ file: z.ZodString;
321
+ line: z.ZodNumber;
322
+ quote: z.ZodString;
323
+ }, z.core.$strict>>;
324
+ }, z.core.$strict>>;
325
+ batch: z.ZodOptional<z.ZodString>;
326
+ rule: z.ZodOptional<z.ZodObject<{
327
+ from: z.ZodString;
328
+ match: z.ZodString;
329
+ }, z.core.$strict>>;
330
+ }, z.core.$strict>;
331
+ }, z.core.$strict>>;
115
332
  related: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
333
  id: z.ZodString;
117
334
  verdict: z.ZodEnum<{
118
- narrower: "narrower";
119
335
  unsure: "unsure";
336
+ narrower: "narrower";
120
337
  }>;
121
338
  judgment: z.ZodOptional<z.ZodString>;
122
339
  }, z.core.$strict>>>;
@@ -139,6 +356,12 @@ export declare const QuestionDraft: z.ZodObject<{
139
356
  "repo-type": "repo-type";
140
357
  }>>;
141
358
  repoType: z.ZodOptional<z.ZodString>;
359
+ role: z.ZodOptional<z.ZodEnum<{
360
+ product: "product";
361
+ architecture: "architecture";
362
+ delivery: "delivery";
363
+ analysis: "analysis";
364
+ }>>;
142
365
  sameAs: z.ZodOptional<z.ZodObject<{
143
366
  id: z.ZodString;
144
367
  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;
@@ -72,8 +72,8 @@ export declare const ReviewArtifact: z.ZodEnum<{
72
72
  code: "code";
73
73
  interfaces: "interfaces";
74
74
  data: "data";
75
- ux: "ux";
76
75
  release: "release";
76
+ ux: "ux";
77
77
  brief: "brief";
78
78
  proposal: "proposal";
79
79
  specs: "specs";
@@ -154,6 +154,7 @@ export declare const ChecklistRule: z.ZodObject<{
154
154
  org: "org";
155
155
  }>;
156
156
  lens: z.ZodEnum<{
157
+ release: "release";
157
158
  true: "true";
158
159
  complete: "complete";
159
160
  safe: "safe";
@@ -164,7 +165,6 @@ export declare const ChecklistRule: z.ZodObject<{
164
165
  ux: "ux";
165
166
  delivery: "delivery";
166
167
  "code-and-test": "code-and-test";
167
- release: "release";
168
168
  }>;
169
169
  question: z.ZodOptional<z.ZodEnum<{
170
170
  true: "true";
@@ -177,8 +177,8 @@ export declare const ChecklistRule: z.ZodObject<{
177
177
  code: "code";
178
178
  interfaces: "interfaces";
179
179
  data: "data";
180
- ux: "ux";
181
180
  release: "release";
181
+ ux: "ux";
182
182
  brief: "brief";
183
183
  proposal: "proposal";
184
184
  specs: "specs";
@@ -279,6 +279,7 @@ export declare const ChecklistPack: z.ZodObject<{
279
279
  org: "org";
280
280
  }>;
281
281
  lens: z.ZodEnum<{
282
+ release: "release";
282
283
  true: "true";
283
284
  complete: "complete";
284
285
  safe: "safe";
@@ -289,7 +290,6 @@ export declare const ChecklistPack: z.ZodObject<{
289
290
  ux: "ux";
290
291
  delivery: "delivery";
291
292
  "code-and-test": "code-and-test";
292
- release: "release";
293
293
  }>;
294
294
  question: z.ZodOptional<z.ZodEnum<{
295
295
  true: "true";
@@ -302,8 +302,8 @@ export declare const ChecklistPack: z.ZodObject<{
302
302
  code: "code";
303
303
  interfaces: "interfaces";
304
304
  data: "data";
305
- ux: "ux";
306
305
  release: "release";
306
+ ux: "ux";
307
307
  brief: "brief";
308
308
  proposal: "proposal";
309
309
  specs: "specs";
@@ -464,6 +464,7 @@ export declare const Finding: z.ZodObject<{
464
464
  org: "org";
465
465
  }>;
466
466
  lens: z.ZodEnum<{
467
+ release: "release";
467
468
  true: "true";
468
469
  complete: "complete";
469
470
  safe: "safe";
@@ -474,7 +475,6 @@ export declare const Finding: z.ZodObject<{
474
475
  ux: "ux";
475
476
  delivery: "delivery";
476
477
  "code-and-test": "code-and-test";
477
- release: "release";
478
478
  }>;
479
479
  severity: z.ZodEnum<{
480
480
  blocking: "blocking";