peer-ai-workflow 1.0.0-next.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.
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/config.d.ts +750 -0
- package/dist/config.js +392 -0
- package/dist/ids.d.ts +67 -0
- package/dist/ids.js +199 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +51 -0
- package/dist/report.d.ts +108 -0
- package/dist/report.js +169 -0
- package/dist/state.d.ts +261 -0
- package/dist/state.js +132 -0
- package/package.json +40 -0
- package/schemas/config-layer.schema.json +997 -0
- package/schemas/config.schema.json +1002 -0
- package/schemas/map.schema.json +102 -0
- package/schemas/review-report.schema.json +312 -0
- package/schemas/work-item.schema.json +415 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import { ConfigLayerSchema, type PeerAiConfig } from "./config.ts";
|
|
3
|
+
import { type ReviewReport } from "./report.ts";
|
|
4
|
+
import { type ProjectMap, type WorkItem } from "./state.ts";
|
|
5
|
+
export * from "./ids.ts";
|
|
6
|
+
export { ConfigLayerSchema, ConfigSchema, mergeConfigs, resolveConfig, type PeerAiConfig } from "./config.ts";
|
|
7
|
+
export { ReviewReportSchema, SEVERITIES, deriveResult, type ReviewReport, type ReviewResult, type Severity, } from "./report.ts";
|
|
8
|
+
export { MapItemIdSchema, MapSchema, WorkItemIdSchema, WorkItemSchema, type ProjectMap, type WorkItem, } from "./state.ts";
|
|
9
|
+
export type Validation<T> = {
|
|
10
|
+
ok: true;
|
|
11
|
+
value: T;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
errors: string[];
|
|
15
|
+
};
|
|
16
|
+
/** Validates a resolved config: one with no `extends` left, or the result of `resolveConfig`. */
|
|
17
|
+
export declare const validateConfig: (input: unknown) => Validation<PeerAiConfig>;
|
|
18
|
+
export declare const CONFIG_FILE = "peer-ai.config.json";
|
|
19
|
+
/** Reads peer-ai.config.json, following a relative `extends`. Returns errors instead of throwing. */
|
|
20
|
+
export declare function readConfig(root: string): {
|
|
21
|
+
config?: PeerAiConfig;
|
|
22
|
+
errors?: string[];
|
|
23
|
+
};
|
|
24
|
+
export declare const validateConfigLayer: (input: unknown) => Validation<z.output<typeof ConfigLayerSchema>>;
|
|
25
|
+
export declare const validateMap: (input: unknown) => Validation<ProjectMap>;
|
|
26
|
+
export declare const validateWorkItem: (input: unknown) => Validation<WorkItem>;
|
|
27
|
+
export declare const validateReport: (input: unknown) => Validation<ReviewReport>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { ConfigLayerSchema, ConfigSchema, resolveConfig } from "./config.js";
|
|
4
|
+
import { ReviewReportSchema } from "./report.js";
|
|
5
|
+
import { MapSchema, WorkItemSchema } from "./state.js";
|
|
6
|
+
export * from "./ids.js";
|
|
7
|
+
export { ConfigLayerSchema, ConfigSchema, mergeConfigs, resolveConfig } from "./config.js";
|
|
8
|
+
export { ReviewReportSchema, SEVERITIES, deriveResult, } from "./report.js";
|
|
9
|
+
export { MapItemIdSchema, MapSchema, WorkItemIdSchema, WorkItemSchema, } from "./state.js";
|
|
10
|
+
function validate(schema, input) {
|
|
11
|
+
const result = schema.safeParse(input);
|
|
12
|
+
if (result.success)
|
|
13
|
+
return { ok: true, value: result.data };
|
|
14
|
+
return {
|
|
15
|
+
ok: false,
|
|
16
|
+
errors: result.error.issues.map((issue) => {
|
|
17
|
+
const where = issue.path.length === 0 ? "(root)" : issue.path.map(String).join(".");
|
|
18
|
+
return `${where}: ${issue.message}`;
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Validates a resolved config: one with no `extends` left, or the result of `resolveConfig`. */
|
|
23
|
+
export const validateConfig = (input) => validate(ConfigSchema, input);
|
|
24
|
+
export const CONFIG_FILE = "peer-ai.config.json";
|
|
25
|
+
/** Reads peer-ai.config.json, following a relative `extends`. Returns errors instead of throwing. */
|
|
26
|
+
export function readConfig(root) {
|
|
27
|
+
const path = join(root, CONFIG_FILE);
|
|
28
|
+
if (!existsSync(path))
|
|
29
|
+
return {};
|
|
30
|
+
const readLayer = (file) => JSON.parse(readFileSync(file, "utf8"));
|
|
31
|
+
try {
|
|
32
|
+
const own = readLayer(path);
|
|
33
|
+
const layers = [];
|
|
34
|
+
if (typeof own.extends === "string") {
|
|
35
|
+
if (!own.extends.startsWith(".")) {
|
|
36
|
+
return { errors: [`extends: only a relative path is supported so far, not "${own.extends}"`] };
|
|
37
|
+
}
|
|
38
|
+
layers.push(readLayer(join(dirname(path), own.extends)));
|
|
39
|
+
}
|
|
40
|
+
layers.push(own);
|
|
41
|
+
const result = validateConfig(resolveConfig(layers));
|
|
42
|
+
return result.ok ? { config: result.value } : { errors: result.errors };
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return { errors: [error.message] };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export const validateConfigLayer = (input) => validate(ConfigLayerSchema, input);
|
|
49
|
+
export const validateMap = (input) => validate(MapSchema, input);
|
|
50
|
+
export const validateWorkItem = (input) => validate(WorkItemSchema, input);
|
|
51
|
+
export const validateReport = (input) => validate(ReviewReportSchema, input);
|
package/dist/report.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** How serious a problem is, most serious first. A review may not invent its own levels. */
|
|
3
|
+
export declare const SEVERITIES: readonly ["critical", "high", "medium", "low"];
|
|
4
|
+
export type Severity = (typeof SEVERITIES)[number];
|
|
5
|
+
export type ReviewResult = "pass" | "fail" | "incomplete";
|
|
6
|
+
export declare const ReviewReportSchema: z.ZodObject<{
|
|
7
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
8
|
+
version: z.ZodLiteral<1>;
|
|
9
|
+
skill: z.ZodEnum<{
|
|
10
|
+
"requirements-analysis": "requirements-analysis";
|
|
11
|
+
"product-spec": "product-spec";
|
|
12
|
+
architecture: "architecture";
|
|
13
|
+
"system-design": "system-design";
|
|
14
|
+
"api-design": "api-design";
|
|
15
|
+
"data-modelling": "data-modelling";
|
|
16
|
+
"threat-model": "threat-model";
|
|
17
|
+
"design-system": "design-system";
|
|
18
|
+
"issue-planning": "issue-planning";
|
|
19
|
+
"implement-ticket": "implement-ticket";
|
|
20
|
+
"code-review": "code-review";
|
|
21
|
+
"security-review": "security-review";
|
|
22
|
+
"contract-check": "contract-check";
|
|
23
|
+
"accessibility-review": "accessibility-review";
|
|
24
|
+
"design-review": "design-review";
|
|
25
|
+
"performance-review": "performance-review";
|
|
26
|
+
"reliability-review": "reliability-review";
|
|
27
|
+
"data-migration-review": "data-migration-review";
|
|
28
|
+
"dependency-review": "dependency-review";
|
|
29
|
+
"compliance-review": "compliance-review";
|
|
30
|
+
"test-strategy": "test-strategy";
|
|
31
|
+
"qa-acceptance": "qa-acceptance";
|
|
32
|
+
"ai-feature-review": "ai-feature-review";
|
|
33
|
+
"release-readiness": "release-readiness";
|
|
34
|
+
"infrastructure-review": "infrastructure-review";
|
|
35
|
+
"observability-review": "observability-review";
|
|
36
|
+
"incident-response": "incident-response";
|
|
37
|
+
documentation: "documentation";
|
|
38
|
+
"tech-debt-triage": "tech-debt-triage";
|
|
39
|
+
}>;
|
|
40
|
+
workItem: z.ZodOptional<z.ZodString>;
|
|
41
|
+
at: z.ZodISODateTime;
|
|
42
|
+
scope: z.ZodObject<{
|
|
43
|
+
base: z.ZodOptional<z.ZodString>;
|
|
44
|
+
head: z.ZodOptional<z.ZodString>;
|
|
45
|
+
tracks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
inputs: z.ZodArray<z.ZodString>;
|
|
49
|
+
inventory: z.ZodArray<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
kind: z.ZodString;
|
|
52
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
file: z.ZodString;
|
|
54
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
}, z.core.$strict>>;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
coverage: z.ZodArray<z.ZodObject<{
|
|
59
|
+
rule: z.ZodString;
|
|
60
|
+
item: z.ZodOptional<z.ZodString>;
|
|
61
|
+
status: z.ZodEnum<{
|
|
62
|
+
pass: "pass";
|
|
63
|
+
fail: "fail";
|
|
64
|
+
"not-applicable": "not-applicable";
|
|
65
|
+
"not-checked": "not-checked";
|
|
66
|
+
}>;
|
|
67
|
+
evidence: z.ZodOptional<z.ZodString>;
|
|
68
|
+
finding: z.ZodOptional<z.ZodString>;
|
|
69
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strict>>;
|
|
71
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
rule: z.ZodString;
|
|
74
|
+
severity: z.ZodEnum<{
|
|
75
|
+
critical: "critical";
|
|
76
|
+
high: "high";
|
|
77
|
+
medium: "medium";
|
|
78
|
+
low: "low";
|
|
79
|
+
}>;
|
|
80
|
+
status: z.ZodEnum<{
|
|
81
|
+
fixed: "fixed";
|
|
82
|
+
open: "open";
|
|
83
|
+
accepted: "accepted";
|
|
84
|
+
}>;
|
|
85
|
+
title: z.ZodString;
|
|
86
|
+
location: z.ZodObject<{
|
|
87
|
+
file: z.ZodString;
|
|
88
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
evidence: z.ZodString;
|
|
92
|
+
fix: z.ZodOptional<z.ZodString>;
|
|
93
|
+
acceptedBy: z.ZodOptional<z.ZodString>;
|
|
94
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
result: z.ZodEnum<{
|
|
97
|
+
pass: "pass";
|
|
98
|
+
fail: "fail";
|
|
99
|
+
incomplete: "incomplete";
|
|
100
|
+
}>;
|
|
101
|
+
summary: z.ZodString;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
export type ReviewReport = z.output<typeof ReviewReportSchema>;
|
|
104
|
+
/**
|
|
105
|
+
* The result a report supports: fail when an open problem is at or above the blocking level,
|
|
106
|
+
* incomplete when a rule wasn't checked, pass otherwise. Fixed and accepted problems don't block.
|
|
107
|
+
*/
|
|
108
|
+
export declare function deriveResult(report: ReviewReport, blockOn?: Severity): ReviewResult;
|
package/dist/report.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { SKILL_IDS } from "./ids.js";
|
|
3
|
+
// A review report shows a review's work: what it looked at, what it read first, every rule it
|
|
4
|
+
// checked and how each went, and every problem it found. Peer AI works out the review's result
|
|
5
|
+
// from the report instead of taking the agent's word for it (RFC 0002).
|
|
6
|
+
/** How serious a problem is, most serious first. A review may not invent its own levels. */
|
|
7
|
+
export const SEVERITIES = ["critical", "high", "medium", "low"];
|
|
8
|
+
const Path = z.string().min(1);
|
|
9
|
+
const Timestamp = z.iso.datetime({ offset: true });
|
|
10
|
+
const Text = z.string().min(1);
|
|
11
|
+
const Location = z
|
|
12
|
+
.strictObject({
|
|
13
|
+
file: Path,
|
|
14
|
+
line: z.number().int().positive().optional(),
|
|
15
|
+
endLine: z.number().int().positive().optional(),
|
|
16
|
+
})
|
|
17
|
+
.superRefine((location, ctx) => {
|
|
18
|
+
if (location.endLine === undefined)
|
|
19
|
+
return;
|
|
20
|
+
if (location.line === undefined || location.endLine < location.line) {
|
|
21
|
+
ctx.addIssue({ code: "custom", path: ["endLine"], message: "endLine needs a line, and can't come before it" });
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const InventoryItem = z.strictObject({
|
|
25
|
+
id: Text.describe("A stable id for something under review, such as route:GET /orders/{id}."),
|
|
26
|
+
kind: Text.describe("What it is: a route, screen, migration, service, dependency, file and so on."),
|
|
27
|
+
location: Location.optional(),
|
|
28
|
+
});
|
|
29
|
+
const Coverage = z
|
|
30
|
+
.strictObject({
|
|
31
|
+
rule: Text.describe("The id of the rule checked."),
|
|
32
|
+
item: Text.optional().describe("The inventory id it was checked against. Omit it for the whole scope."),
|
|
33
|
+
status: z.enum(["pass", "fail", "not-applicable", "not-checked"]),
|
|
34
|
+
evidence: Text.optional().describe("For a pass: what was checked, and where."),
|
|
35
|
+
finding: Text.optional().describe("For a fail: the id of the problem found."),
|
|
36
|
+
reason: Text.optional().describe("For not-applicable or not-checked: why."),
|
|
37
|
+
})
|
|
38
|
+
.superRefine((entry, ctx) => {
|
|
39
|
+
const need = (field, why) => {
|
|
40
|
+
if (entry[field] === undefined)
|
|
41
|
+
ctx.addIssue({ code: "custom", path: [field], message: why });
|
|
42
|
+
};
|
|
43
|
+
if (entry.status === "pass")
|
|
44
|
+
need("evidence", "a pass says what was checked");
|
|
45
|
+
if (entry.status === "fail")
|
|
46
|
+
need("finding", "a fail names the problem it found");
|
|
47
|
+
if (entry.status === "not-applicable")
|
|
48
|
+
need("reason", "say why the rule doesn't apply");
|
|
49
|
+
if (entry.status === "not-checked")
|
|
50
|
+
need("reason", "say why the rule wasn't checked");
|
|
51
|
+
});
|
|
52
|
+
const Finding = z
|
|
53
|
+
.strictObject({
|
|
54
|
+
id: Text,
|
|
55
|
+
rule: Text,
|
|
56
|
+
severity: z.enum(SEVERITIES),
|
|
57
|
+
status: z.enum(["open", "fixed", "accepted"]),
|
|
58
|
+
title: Text,
|
|
59
|
+
location: Location,
|
|
60
|
+
evidence: Text.describe("What shows the problem is real."),
|
|
61
|
+
fix: Text.optional().describe("A suggested fix."),
|
|
62
|
+
acceptedBy: Text.optional().describe("For an accepted risk: who accepted it."),
|
|
63
|
+
reason: Text.optional().describe("For an accepted risk: why it was accepted."),
|
|
64
|
+
})
|
|
65
|
+
.superRefine((finding, ctx) => {
|
|
66
|
+
if (finding.status !== "accepted")
|
|
67
|
+
return;
|
|
68
|
+
if (finding.acceptedBy === undefined) {
|
|
69
|
+
ctx.addIssue({ code: "custom", path: ["acceptedBy"], message: "an accepted risk says who accepted it" });
|
|
70
|
+
}
|
|
71
|
+
if (finding.reason === undefined) {
|
|
72
|
+
ctx.addIssue({ code: "custom", path: ["reason"], message: "an accepted risk says why" });
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export const ReviewReportSchema = z
|
|
76
|
+
.strictObject({
|
|
77
|
+
$schema: z.string().optional(),
|
|
78
|
+
version: z.literal(1),
|
|
79
|
+
skill: z.enum(SKILL_IDS),
|
|
80
|
+
workItem: z
|
|
81
|
+
.string()
|
|
82
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/)
|
|
83
|
+
.optional()
|
|
84
|
+
.describe("The work item reviewed. Omit it for a review of the whole project."),
|
|
85
|
+
at: Timestamp,
|
|
86
|
+
scope: z
|
|
87
|
+
.strictObject({
|
|
88
|
+
base: Text.optional().describe("The commit the change starts from."),
|
|
89
|
+
head: Text.optional().describe("The commit reviewed."),
|
|
90
|
+
tracks: z.array(Text).optional(),
|
|
91
|
+
files: z.array(Path).optional(),
|
|
92
|
+
})
|
|
93
|
+
.describe("What was reviewed."),
|
|
94
|
+
inputs: z.array(Text).describe("Every document, profile, rule pack and decision the review read first."),
|
|
95
|
+
inventory: z.array(InventoryItem).describe("Everything under review."),
|
|
96
|
+
coverage: z.array(Coverage).min(1).describe("How each rule went. A rule is never left out silently."),
|
|
97
|
+
findings: z.array(Finding),
|
|
98
|
+
result: z.enum(["pass", "fail", "incomplete"]).describe("Must agree with the findings and coverage."),
|
|
99
|
+
summary: z.string().min(1).max(500).describe("A short summary for people."),
|
|
100
|
+
})
|
|
101
|
+
.superRefine((report, ctx) => {
|
|
102
|
+
const items = new Set();
|
|
103
|
+
report.inventory.forEach((item, i) => {
|
|
104
|
+
if (items.has(item.id))
|
|
105
|
+
ctx.addIssue({ code: "custom", path: ["inventory", i, "id"], message: `duplicate id "${item.id}"` });
|
|
106
|
+
items.add(item.id);
|
|
107
|
+
});
|
|
108
|
+
const findings = new Map();
|
|
109
|
+
report.findings.forEach((finding, i) => {
|
|
110
|
+
if (findings.has(finding.id)) {
|
|
111
|
+
ctx.addIssue({ code: "custom", path: ["findings", i, "id"], message: `duplicate id "${finding.id}"` });
|
|
112
|
+
}
|
|
113
|
+
findings.set(finding.id, finding.rule);
|
|
114
|
+
});
|
|
115
|
+
const failed = new Set();
|
|
116
|
+
report.coverage.forEach((entry, i) => {
|
|
117
|
+
if (entry.item !== undefined && !items.has(entry.item)) {
|
|
118
|
+
ctx.addIssue({
|
|
119
|
+
code: "custom",
|
|
120
|
+
path: ["coverage", i, "item"],
|
|
121
|
+
message: `"${entry.item}" is not in the inventory`,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (entry.finding === undefined)
|
|
125
|
+
return;
|
|
126
|
+
const rule = findings.get(entry.finding);
|
|
127
|
+
if (rule === undefined) {
|
|
128
|
+
ctx.addIssue({
|
|
129
|
+
code: "custom",
|
|
130
|
+
path: ["coverage", i, "finding"],
|
|
131
|
+
message: `"${entry.finding}" is not a finding`,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
else if (rule !== entry.rule) {
|
|
135
|
+
ctx.addIssue({
|
|
136
|
+
code: "custom",
|
|
137
|
+
path: ["coverage", i, "finding"],
|
|
138
|
+
message: `finding "${entry.finding}" is for rule ${rule}, not ${entry.rule}`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
failed.add(entry.finding);
|
|
142
|
+
});
|
|
143
|
+
report.findings.forEach((finding, i) => {
|
|
144
|
+
if (!failed.has(finding.id)) {
|
|
145
|
+
ctx.addIssue({
|
|
146
|
+
code: "custom",
|
|
147
|
+
path: ["findings", i, "id"],
|
|
148
|
+
message: `no coverage entry fails for "${finding.id}"; every problem found is a failed check`,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
})
|
|
153
|
+
.meta({
|
|
154
|
+
title: "Peer AI review report",
|
|
155
|
+
description: ".peer-ai/reports/<work item>/<skill>-<time>.json: what a review looked at, every rule it checked, and every problem it found.",
|
|
156
|
+
});
|
|
157
|
+
/**
|
|
158
|
+
* The result a report supports: fail when an open problem is at or above the blocking level,
|
|
159
|
+
* incomplete when a rule wasn't checked, pass otherwise. Fixed and accepted problems don't block.
|
|
160
|
+
*/
|
|
161
|
+
export function deriveResult(report, blockOn = "critical") {
|
|
162
|
+
const blocking = SEVERITIES.indexOf(blockOn);
|
|
163
|
+
if (report.findings.some((finding) => finding.status === "open" && SEVERITIES.indexOf(finding.severity) <= blocking)) {
|
|
164
|
+
return "fail";
|
|
165
|
+
}
|
|
166
|
+
if (report.coverage.some((entry) => entry.status === "not-checked"))
|
|
167
|
+
return "incomplete";
|
|
168
|
+
return "pass";
|
|
169
|
+
}
|
package/dist/state.d.ts
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MapItemIdSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
3
|
+
standards: "standards";
|
|
4
|
+
architecture: "architecture";
|
|
5
|
+
"threat-model": "threat-model";
|
|
6
|
+
requirements: "requirements";
|
|
7
|
+
specs: "specs";
|
|
8
|
+
"api-contract": "api-contract";
|
|
9
|
+
"data-model": "data-model";
|
|
10
|
+
"data-inventory": "data-inventory";
|
|
11
|
+
dpia: "dpia";
|
|
12
|
+
design: "design";
|
|
13
|
+
ci: "ci";
|
|
14
|
+
environments: "environments";
|
|
15
|
+
tests: "tests";
|
|
16
|
+
"load-testing": "load-testing";
|
|
17
|
+
infrastructure: "infrastructure";
|
|
18
|
+
observability: "observability";
|
|
19
|
+
slos: "slos";
|
|
20
|
+
runbooks: "runbooks";
|
|
21
|
+
docs: "docs";
|
|
22
|
+
}>, z.ZodString]>;
|
|
23
|
+
export declare const MapSchema: z.ZodObject<{
|
|
24
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
25
|
+
version: z.ZodLiteral<1>;
|
|
26
|
+
assessedAt: z.ZodISODateTime;
|
|
27
|
+
items: z.ZodRecord<z.ZodUnion<readonly [z.ZodEnum<{
|
|
28
|
+
standards: "standards";
|
|
29
|
+
architecture: "architecture";
|
|
30
|
+
"threat-model": "threat-model";
|
|
31
|
+
requirements: "requirements";
|
|
32
|
+
specs: "specs";
|
|
33
|
+
"api-contract": "api-contract";
|
|
34
|
+
"data-model": "data-model";
|
|
35
|
+
"data-inventory": "data-inventory";
|
|
36
|
+
dpia: "dpia";
|
|
37
|
+
design: "design";
|
|
38
|
+
ci: "ci";
|
|
39
|
+
environments: "environments";
|
|
40
|
+
tests: "tests";
|
|
41
|
+
"load-testing": "load-testing";
|
|
42
|
+
infrastructure: "infrastructure";
|
|
43
|
+
observability: "observability";
|
|
44
|
+
slos: "slos";
|
|
45
|
+
runbooks: "runbooks";
|
|
46
|
+
docs: "docs";
|
|
47
|
+
}>, z.ZodString]> & z.core.$partial, z.ZodObject<{
|
|
48
|
+
status: z.ZodEnum<{
|
|
49
|
+
"not-applicable": "not-applicable";
|
|
50
|
+
present: "present";
|
|
51
|
+
partial: "partial";
|
|
52
|
+
missing: "missing";
|
|
53
|
+
}>;
|
|
54
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
+
inferred: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
note: z.ZodOptional<z.ZodString>;
|
|
57
|
+
checkedAt: z.ZodISODateTime;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export declare const WorkItemIdSchema: z.ZodString;
|
|
61
|
+
export declare const WorkItemSchema: z.ZodObject<{
|
|
62
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
63
|
+
version: z.ZodLiteral<1>;
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
title: z.ZodString;
|
|
66
|
+
kind: z.ZodEnum<{
|
|
67
|
+
feature: "feature";
|
|
68
|
+
bug: "bug";
|
|
69
|
+
refactor: "refactor";
|
|
70
|
+
migration: "migration";
|
|
71
|
+
gap: "gap";
|
|
72
|
+
discovery: "discovery";
|
|
73
|
+
chore: "chore";
|
|
74
|
+
}>;
|
|
75
|
+
stage: z.ZodEnum<{
|
|
76
|
+
build: "build";
|
|
77
|
+
verify: "verify";
|
|
78
|
+
ship: "ship";
|
|
79
|
+
done: "done";
|
|
80
|
+
prepare: "prepare";
|
|
81
|
+
cancelled: "cancelled";
|
|
82
|
+
}>;
|
|
83
|
+
track: z.ZodOptional<z.ZodString>;
|
|
84
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
85
|
+
gap: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
86
|
+
standards: "standards";
|
|
87
|
+
architecture: "architecture";
|
|
88
|
+
"threat-model": "threat-model";
|
|
89
|
+
requirements: "requirements";
|
|
90
|
+
specs: "specs";
|
|
91
|
+
"api-contract": "api-contract";
|
|
92
|
+
"data-model": "data-model";
|
|
93
|
+
"data-inventory": "data-inventory";
|
|
94
|
+
dpia: "dpia";
|
|
95
|
+
design: "design";
|
|
96
|
+
ci: "ci";
|
|
97
|
+
environments: "environments";
|
|
98
|
+
tests: "tests";
|
|
99
|
+
"load-testing": "load-testing";
|
|
100
|
+
infrastructure: "infrastructure";
|
|
101
|
+
observability: "observability";
|
|
102
|
+
slos: "slos";
|
|
103
|
+
runbooks: "runbooks";
|
|
104
|
+
docs: "docs";
|
|
105
|
+
}>, z.ZodString]>>;
|
|
106
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
107
|
+
acceptance: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
activities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
id: z.ZodEnum<{
|
|
112
|
+
understand: "understand";
|
|
113
|
+
architect: "architect";
|
|
114
|
+
specify: "specify";
|
|
115
|
+
contract: "contract";
|
|
116
|
+
standards: "standards";
|
|
117
|
+
"delivery-setup": "delivery-setup";
|
|
118
|
+
plan: "plan";
|
|
119
|
+
build: "build";
|
|
120
|
+
verify: "verify";
|
|
121
|
+
test: "test";
|
|
122
|
+
ship: "ship";
|
|
123
|
+
operate: "operate";
|
|
124
|
+
document: "document";
|
|
125
|
+
retro: "retro";
|
|
126
|
+
}>;
|
|
127
|
+
status: z.ZodEnum<{
|
|
128
|
+
pending: "pending";
|
|
129
|
+
"in-progress": "in-progress";
|
|
130
|
+
done: "done";
|
|
131
|
+
skipped: "skipped";
|
|
132
|
+
}>;
|
|
133
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strict>>>;
|
|
135
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
activity: z.ZodEnum<{
|
|
137
|
+
understand: "understand";
|
|
138
|
+
architect: "architect";
|
|
139
|
+
specify: "specify";
|
|
140
|
+
contract: "contract";
|
|
141
|
+
standards: "standards";
|
|
142
|
+
"delivery-setup": "delivery-setup";
|
|
143
|
+
plan: "plan";
|
|
144
|
+
build: "build";
|
|
145
|
+
verify: "verify";
|
|
146
|
+
test: "test";
|
|
147
|
+
ship: "ship";
|
|
148
|
+
operate: "operate";
|
|
149
|
+
document: "document";
|
|
150
|
+
retro: "retro";
|
|
151
|
+
}>;
|
|
152
|
+
step: z.ZodNumber;
|
|
153
|
+
}, z.core.$strict>>;
|
|
154
|
+
lastVerify: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
result: z.ZodEnum<{
|
|
156
|
+
pass: "pass";
|
|
157
|
+
fail: "fail";
|
|
158
|
+
}>;
|
|
159
|
+
at: z.ZodISODateTime;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
reviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
+
skill: z.ZodEnum<{
|
|
163
|
+
"requirements-analysis": "requirements-analysis";
|
|
164
|
+
"product-spec": "product-spec";
|
|
165
|
+
architecture: "architecture";
|
|
166
|
+
"system-design": "system-design";
|
|
167
|
+
"api-design": "api-design";
|
|
168
|
+
"data-modelling": "data-modelling";
|
|
169
|
+
"threat-model": "threat-model";
|
|
170
|
+
"design-system": "design-system";
|
|
171
|
+
"issue-planning": "issue-planning";
|
|
172
|
+
"implement-ticket": "implement-ticket";
|
|
173
|
+
"code-review": "code-review";
|
|
174
|
+
"security-review": "security-review";
|
|
175
|
+
"contract-check": "contract-check";
|
|
176
|
+
"accessibility-review": "accessibility-review";
|
|
177
|
+
"design-review": "design-review";
|
|
178
|
+
"performance-review": "performance-review";
|
|
179
|
+
"reliability-review": "reliability-review";
|
|
180
|
+
"data-migration-review": "data-migration-review";
|
|
181
|
+
"dependency-review": "dependency-review";
|
|
182
|
+
"compliance-review": "compliance-review";
|
|
183
|
+
"test-strategy": "test-strategy";
|
|
184
|
+
"qa-acceptance": "qa-acceptance";
|
|
185
|
+
"ai-feature-review": "ai-feature-review";
|
|
186
|
+
"release-readiness": "release-readiness";
|
|
187
|
+
"infrastructure-review": "infrastructure-review";
|
|
188
|
+
"observability-review": "observability-review";
|
|
189
|
+
"incident-response": "incident-response";
|
|
190
|
+
documentation: "documentation";
|
|
191
|
+
"tech-debt-triage": "tech-debt-triage";
|
|
192
|
+
}>;
|
|
193
|
+
result: z.ZodEnum<{
|
|
194
|
+
pass: "pass";
|
|
195
|
+
fail: "fail";
|
|
196
|
+
incomplete: "incomplete";
|
|
197
|
+
}>;
|
|
198
|
+
report: z.ZodOptional<z.ZodString>;
|
|
199
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
200
|
+
unproven: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
at: z.ZodISODateTime;
|
|
202
|
+
}, z.core.$strict>>>;
|
|
203
|
+
requiredReviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
204
|
+
skill: z.ZodEnum<{
|
|
205
|
+
"requirements-analysis": "requirements-analysis";
|
|
206
|
+
"product-spec": "product-spec";
|
|
207
|
+
architecture: "architecture";
|
|
208
|
+
"system-design": "system-design";
|
|
209
|
+
"api-design": "api-design";
|
|
210
|
+
"data-modelling": "data-modelling";
|
|
211
|
+
"threat-model": "threat-model";
|
|
212
|
+
"design-system": "design-system";
|
|
213
|
+
"issue-planning": "issue-planning";
|
|
214
|
+
"implement-ticket": "implement-ticket";
|
|
215
|
+
"code-review": "code-review";
|
|
216
|
+
"security-review": "security-review";
|
|
217
|
+
"contract-check": "contract-check";
|
|
218
|
+
"accessibility-review": "accessibility-review";
|
|
219
|
+
"design-review": "design-review";
|
|
220
|
+
"performance-review": "performance-review";
|
|
221
|
+
"reliability-review": "reliability-review";
|
|
222
|
+
"data-migration-review": "data-migration-review";
|
|
223
|
+
"dependency-review": "dependency-review";
|
|
224
|
+
"compliance-review": "compliance-review";
|
|
225
|
+
"test-strategy": "test-strategy";
|
|
226
|
+
"qa-acceptance": "qa-acceptance";
|
|
227
|
+
"ai-feature-review": "ai-feature-review";
|
|
228
|
+
"release-readiness": "release-readiness";
|
|
229
|
+
"infrastructure-review": "infrastructure-review";
|
|
230
|
+
"observability-review": "observability-review";
|
|
231
|
+
"incident-response": "incident-response";
|
|
232
|
+
documentation: "documentation";
|
|
233
|
+
"tech-debt-triage": "tech-debt-triage";
|
|
234
|
+
}>;
|
|
235
|
+
reason: z.ZodString;
|
|
236
|
+
}, z.core.$strict>>>;
|
|
237
|
+
reopened: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
238
|
+
activity: z.ZodEnum<{
|
|
239
|
+
understand: "understand";
|
|
240
|
+
architect: "architect";
|
|
241
|
+
specify: "specify";
|
|
242
|
+
contract: "contract";
|
|
243
|
+
standards: "standards";
|
|
244
|
+
"delivery-setup": "delivery-setup";
|
|
245
|
+
plan: "plan";
|
|
246
|
+
build: "build";
|
|
247
|
+
verify: "verify";
|
|
248
|
+
test: "test";
|
|
249
|
+
ship: "ship";
|
|
250
|
+
operate: "operate";
|
|
251
|
+
document: "document";
|
|
252
|
+
retro: "retro";
|
|
253
|
+
}>;
|
|
254
|
+
reason: z.ZodString;
|
|
255
|
+
at: z.ZodISODateTime;
|
|
256
|
+
}, z.core.$strict>>>;
|
|
257
|
+
next: z.ZodString;
|
|
258
|
+
updatedAt: z.ZodISODateTime;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
export type ProjectMap = z.output<typeof MapSchema>;
|
|
261
|
+
export type WorkItem = z.output<typeof WorkItemSchema>;
|