@maycombhq/sdk 2.0.0-beta.18 → 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.
- package/npm/core/ai-decisions.d.ts +360 -0
- package/npm/core/api.d.ts +2811 -122
- package/npm/core/audit.d.ts +16 -4
- package/npm/core/catalog.d.ts +218 -66
- package/npm/core/decision-batches.d.ts +29 -0
- package/npm/core/declared-links.d.ts +62 -0
- package/npm/core/eol.d.ts +5 -0
- package/npm/core/facts-join.d.ts +66 -1
- package/npm/core/fs.d.ts +22 -3
- package/npm/core/host-questions.d.ts +5 -0
- package/npm/core/index.d.ts +7 -0
- package/npm/core/link-candidates.d.ts +103 -0
- package/npm/core/manifest-edit.d.ts +40 -0
- package/npm/core/merge.d.ts +19 -0
- package/npm/core/metarepo.d.ts +9 -0
- package/npm/core/orgpack-defaults.d.ts +7 -2
- package/npm/core/orgpack-load.d.ts +3 -0
- package/npm/core/question-roles.d.ts +24 -0
- package/npm/core/questions.d.ts +25 -2
- package/npm/core/runtime-migrate.d.ts +9 -0
- package/npm/core/schema/ai.d.ts +28 -7
- package/npm/core/schema/common.d.ts +32 -8
- package/npm/core/schema/component-type.d.ts +193 -0
- package/npm/core/schema/fact-corrections.d.ts +95 -2
- package/npm/core/schema/facts.d.ts +114 -2
- package/npm/core/schema/kinds.d.ts +228 -66
- package/npm/core/schema/orgpack.d.ts +43 -5
- package/npm/core/schema/question.d.ts +151 -6
- package/npm/core/schema/reading-rules.d.ts +51 -0
- package/npm/core/schema/review.d.ts +7 -7
- package/npm/core/schema/scan-verify.d.ts +42 -0
- package/npm/core/schema/version.d.ts +3 -1
- package/npm/index.js +4679 -2672
- package/package.json +1 -1
|
@@ -186,6 +186,7 @@ export declare const ChangeType: z.ZodObject<{
|
|
|
186
186
|
snow: "snow";
|
|
187
187
|
}>>;
|
|
188
188
|
lenses: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
189
|
+
release: "release";
|
|
189
190
|
true: "true";
|
|
190
191
|
complete: "complete";
|
|
191
192
|
safe: "safe";
|
|
@@ -196,7 +197,6 @@ export declare const ChangeType: z.ZodObject<{
|
|
|
196
197
|
ux: "ux";
|
|
197
198
|
delivery: "delivery";
|
|
198
199
|
"code-and-test": "code-and-test";
|
|
199
|
-
release: "release";
|
|
200
200
|
}>>>;
|
|
201
201
|
approvals: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
202
202
|
release: "release";
|
|
@@ -249,6 +249,7 @@ export declare const ChangeTypes: z.ZodObject<{
|
|
|
249
249
|
snow: "snow";
|
|
250
250
|
}>>;
|
|
251
251
|
lenses: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
252
|
+
release: "release";
|
|
252
253
|
true: "true";
|
|
253
254
|
complete: "complete";
|
|
254
255
|
safe: "safe";
|
|
@@ -259,7 +260,6 @@ export declare const ChangeTypes: z.ZodObject<{
|
|
|
259
260
|
ux: "ux";
|
|
260
261
|
delivery: "delivery";
|
|
261
262
|
"code-and-test": "code-and-test";
|
|
262
|
-
release: "release";
|
|
263
263
|
}>>>;
|
|
264
264
|
approvals: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
265
265
|
release: "release";
|
|
@@ -767,7 +767,34 @@ export type StepClass = z.infer<typeof StepClass>;
|
|
|
767
767
|
* step on the one model; `atticus upgrade` moves it to version 2 (`runtime-v2`), changing nothing
|
|
768
768
|
* else.
|
|
769
769
|
*/
|
|
770
|
-
export declare const RUNTIME_SCHEMA_VERSION:
|
|
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;
|
|
771
798
|
/**
|
|
772
799
|
* runtime.yaml version 3 (ADR 0171): how Atticus starts the GitHub Copilot language server in its
|
|
773
800
|
* Agent Client Protocol mode, for `copilot-acp`. Only how to start it, which model to ask for and
|
|
@@ -800,7 +827,7 @@ export declare function copilotAcpOf(runtime: {
|
|
|
800
827
|
timeoutMs: number;
|
|
801
828
|
};
|
|
802
829
|
export declare const Runtime: z.ZodObject<{
|
|
803
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
830
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
|
|
804
831
|
assistants: z.ZodObject<{
|
|
805
832
|
allowed: z.ZodArray<z.ZodEnum<{
|
|
806
833
|
copilot: "copilot";
|
|
@@ -888,6 +915,17 @@ export declare const Runtime: z.ZodObject<{
|
|
|
888
915
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
889
916
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
890
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>>;
|
|
891
929
|
telemetry: z.ZodDefault<z.ZodObject<{
|
|
892
930
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
893
931
|
}, z.core.$strict>>;
|
|
@@ -980,9 +1018,9 @@ export declare const SkillMeta: z.ZodObject<{
|
|
|
980
1018
|
source: z.ZodString;
|
|
981
1019
|
status: z.ZodDefault<z.ZodEnum<{
|
|
982
1020
|
retired: "retired";
|
|
1021
|
+
stale: "stale";
|
|
983
1022
|
active: "active";
|
|
984
1023
|
draft: "draft";
|
|
985
|
-
stale: "stale";
|
|
986
1024
|
}>>;
|
|
987
1025
|
reviewedAt: z.ZodOptional<z.ZodISODate>;
|
|
988
1026
|
}, z.core.$strict>;
|
|
@@ -22,7 +22,82 @@ import { z } from "zod";
|
|
|
22
22
|
* why and the answer it had. Optional; version-1 to version-3 files read as before and come back
|
|
23
23
|
* as version 4 in memory.
|
|
24
24
|
*/
|
|
25
|
-
|
|
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>;
|
|
26
101
|
/** A question's id: q- and 12 hex characters of the fingerprint of what it asks about. */
|
|
27
102
|
export declare const QuestionId: z.ZodString;
|
|
28
103
|
/** Where the question comes from in the repo: path:line. */
|
|
@@ -71,7 +146,19 @@ export declare const QuestionProposalCite: z.ZodObject<{
|
|
|
71
146
|
export declare const QuestionAnswer: z.ZodObject<{
|
|
72
147
|
option: z.ZodOptional<z.ZodNumber>;
|
|
73
148
|
text: z.ZodOptional<z.ZodString>;
|
|
74
|
-
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>]>;
|
|
75
162
|
at: z.ZodISODateTime;
|
|
76
163
|
scope: z.ZodObject<{
|
|
77
164
|
level: z.ZodEnum<{
|
|
@@ -92,10 +179,15 @@ export declare const QuestionAnswer: z.ZodObject<{
|
|
|
92
179
|
quote: z.ZodString;
|
|
93
180
|
}, z.core.$strict>>;
|
|
94
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>>;
|
|
95
187
|
}, z.core.$strict>;
|
|
96
188
|
export type QuestionAnswer = z.infer<typeof QuestionAnswer>;
|
|
97
189
|
export declare const Question: z.ZodObject<{
|
|
98
|
-
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
|
|
190
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
|
|
99
191
|
id: z.ZodString;
|
|
100
192
|
askedBy: z.ZodObject<{
|
|
101
193
|
step: z.ZodString;
|
|
@@ -125,6 +217,19 @@ export declare const Question: z.ZodObject<{
|
|
|
125
217
|
}>;
|
|
126
218
|
id: z.ZodString;
|
|
127
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>>;
|
|
128
233
|
state: z.ZodEnum<{
|
|
129
234
|
retired: "retired";
|
|
130
235
|
open: "open";
|
|
@@ -134,7 +239,19 @@ export declare const Question: z.ZodObject<{
|
|
|
134
239
|
answer: z.ZodOptional<z.ZodObject<{
|
|
135
240
|
option: z.ZodOptional<z.ZodNumber>;
|
|
136
241
|
text: z.ZodOptional<z.ZodString>;
|
|
137
|
-
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>]>;
|
|
138
255
|
at: z.ZodISODateTime;
|
|
139
256
|
scope: z.ZodObject<{
|
|
140
257
|
level: z.ZodEnum<{
|
|
@@ -155,6 +272,11 @@ export declare const Question: z.ZodObject<{
|
|
|
155
272
|
quote: z.ZodString;
|
|
156
273
|
}, z.core.$strict>>;
|
|
157
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>>;
|
|
158
280
|
}, z.core.$strict>>;
|
|
159
281
|
retired: z.ZodOptional<z.ZodObject<{
|
|
160
282
|
at: z.ZodISODateTime;
|
|
@@ -167,7 +289,19 @@ export declare const Question: z.ZodObject<{
|
|
|
167
289
|
answer: z.ZodObject<{
|
|
168
290
|
option: z.ZodOptional<z.ZodNumber>;
|
|
169
291
|
text: z.ZodOptional<z.ZodString>;
|
|
170
|
-
by: 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>]>;
|
|
171
305
|
at: z.ZodISODateTime;
|
|
172
306
|
scope: z.ZodObject<{
|
|
173
307
|
level: z.ZodEnum<{
|
|
@@ -188,13 +322,18 @@ export declare const Question: z.ZodObject<{
|
|
|
188
322
|
quote: z.ZodString;
|
|
189
323
|
}, z.core.$strict>>;
|
|
190
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>>;
|
|
191
330
|
}, z.core.$strict>;
|
|
192
331
|
}, z.core.$strict>>;
|
|
193
332
|
related: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
194
333
|
id: z.ZodString;
|
|
195
334
|
verdict: z.ZodEnum<{
|
|
196
|
-
narrower: "narrower";
|
|
197
335
|
unsure: "unsure";
|
|
336
|
+
narrower: "narrower";
|
|
198
337
|
}>;
|
|
199
338
|
judgment: z.ZodOptional<z.ZodString>;
|
|
200
339
|
}, z.core.$strict>>>;
|
|
@@ -217,6 +356,12 @@ export declare const QuestionDraft: z.ZodObject<{
|
|
|
217
356
|
"repo-type": "repo-type";
|
|
218
357
|
}>>;
|
|
219
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
|
+
}>>;
|
|
220
365
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
221
366
|
id: z.ZodString;
|
|
222
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>;
|
|
@@ -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";
|
|
@@ -79,6 +79,12 @@ export declare const VerifyFix: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
79
79
|
"repo-type": "repo-type";
|
|
80
80
|
}>>;
|
|
81
81
|
repoType: z.ZodOptional<z.ZodString>;
|
|
82
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
product: "product";
|
|
84
|
+
architecture: "architecture";
|
|
85
|
+
delivery: "delivery";
|
|
86
|
+
analysis: "analysis";
|
|
87
|
+
}>>;
|
|
82
88
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
83
89
|
id: z.ZodString;
|
|
84
90
|
verdict: z.ZodEnum<{
|
|
@@ -135,6 +141,12 @@ export declare const VerifyMissed: z.ZodObject<{
|
|
|
135
141
|
"repo-type": "repo-type";
|
|
136
142
|
}>>;
|
|
137
143
|
repoType: z.ZodOptional<z.ZodString>;
|
|
144
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
product: "product";
|
|
146
|
+
architecture: "architecture";
|
|
147
|
+
delivery: "delivery";
|
|
148
|
+
analysis: "analysis";
|
|
149
|
+
}>>;
|
|
138
150
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
139
151
|
id: z.ZodString;
|
|
140
152
|
verdict: z.ZodEnum<{
|
|
@@ -201,6 +213,12 @@ export declare const VerifyWrong: z.ZodObject<{
|
|
|
201
213
|
"repo-type": "repo-type";
|
|
202
214
|
}>>;
|
|
203
215
|
repoType: z.ZodOptional<z.ZodString>;
|
|
216
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
217
|
+
product: "product";
|
|
218
|
+
architecture: "architecture";
|
|
219
|
+
delivery: "delivery";
|
|
220
|
+
analysis: "analysis";
|
|
221
|
+
}>>;
|
|
204
222
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
205
223
|
id: z.ZodString;
|
|
206
224
|
verdict: z.ZodEnum<{
|
|
@@ -270,6 +288,12 @@ export declare const VerifyAnswer: z.ZodObject<{
|
|
|
270
288
|
"repo-type": "repo-type";
|
|
271
289
|
}>>;
|
|
272
290
|
repoType: z.ZodOptional<z.ZodString>;
|
|
291
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
292
|
+
product: "product";
|
|
293
|
+
architecture: "architecture";
|
|
294
|
+
delivery: "delivery";
|
|
295
|
+
analysis: "analysis";
|
|
296
|
+
}>>;
|
|
273
297
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
274
298
|
id: z.ZodString;
|
|
275
299
|
verdict: z.ZodEnum<{
|
|
@@ -334,6 +358,12 @@ export declare const VerifyAnswer: z.ZodObject<{
|
|
|
334
358
|
"repo-type": "repo-type";
|
|
335
359
|
}>>;
|
|
336
360
|
repoType: z.ZodOptional<z.ZodString>;
|
|
361
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
362
|
+
product: "product";
|
|
363
|
+
architecture: "architecture";
|
|
364
|
+
delivery: "delivery";
|
|
365
|
+
analysis: "analysis";
|
|
366
|
+
}>>;
|
|
337
367
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
338
368
|
id: z.ZodString;
|
|
339
369
|
verdict: z.ZodEnum<{
|
|
@@ -432,6 +462,12 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
432
462
|
"repo-type": "repo-type";
|
|
433
463
|
}>>;
|
|
434
464
|
repoType: z.ZodOptional<z.ZodString>;
|
|
465
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
product: "product";
|
|
467
|
+
architecture: "architecture";
|
|
468
|
+
delivery: "delivery";
|
|
469
|
+
analysis: "analysis";
|
|
470
|
+
}>>;
|
|
435
471
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
436
472
|
id: z.ZodString;
|
|
437
473
|
verdict: z.ZodEnum<{
|
|
@@ -496,6 +532,12 @@ export declare const ScanVerifyProposal: z.ZodObject<{
|
|
|
496
532
|
"repo-type": "repo-type";
|
|
497
533
|
}>>;
|
|
498
534
|
repoType: z.ZodOptional<z.ZodString>;
|
|
535
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
536
|
+
product: "product";
|
|
537
|
+
architecture: "architecture";
|
|
538
|
+
delivery: "delivery";
|
|
539
|
+
analysis: "analysis";
|
|
540
|
+
}>>;
|
|
499
541
|
sameAs: z.ZodOptional<z.ZodObject<{
|
|
500
542
|
id: z.ZodString;
|
|
501
543
|
verdict: z.ZodEnum<{
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Version 2 (ADR 0031) added the Capability kind and changed no existing field.
|
|
4
4
|
* Version 3 (ADR 0125) added `required` on a Schema field, optional, and changed no other field.
|
|
5
5
|
* Version 4 (ADR 0164) added `protobuf` to a Schema's `format`, and changed no other field.
|
|
6
|
+
* Version 5 (ADR 0181) added the evidence source `ai` and an evidence's `run` (a link the AI
|
|
7
|
+
* decided, flagged `joined-by-ai`), and changed no other field.
|
|
6
8
|
*
|
|
7
9
|
* It lives in its own file, with no schema beside it, so the command line can print it in its
|
|
8
10
|
* help without loading zod (`@maycombhq/core/light`); `./common.js` exports it with C1.
|
|
9
11
|
*/
|
|
10
|
-
export declare const SCHEMA_VERSION:
|
|
12
|
+
export declare const SCHEMA_VERSION: 5;
|