planpong 0.2.1 → 0.4.2
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/dist/src/core/convergence.d.ts +46 -2
- package/dist/src/core/convergence.js +278 -6
- package/dist/src/core/convergence.js.map +1 -1
- package/dist/src/core/loop.d.ts +3 -3
- package/dist/src/core/loop.js +20 -8
- package/dist/src/core/loop.js.map +1 -1
- package/dist/src/core/operations.d.ts +14 -4
- package/dist/src/core/operations.js +140 -48
- package/dist/src/core/operations.js.map +1 -1
- package/dist/src/core/session.d.ts +3 -3
- package/dist/src/core/session.js.map +1 -1
- package/dist/src/mcp/server.js +25 -1
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools/get-feedback.js +32 -6
- package/dist/src/mcp/tools/get-feedback.js.map +1 -1
- package/dist/src/mcp/tools/get-report.d.ts +2 -0
- package/dist/src/mcp/tools/get-report.js +152 -0
- package/dist/src/mcp/tools/get-report.js.map +1 -0
- package/dist/src/prompts/planner.d.ts +1 -1
- package/dist/src/prompts/planner.js +39 -19
- package/dist/src/prompts/planner.js.map +1 -1
- package/dist/src/prompts/reviewer.d.ts +1 -1
- package/dist/src/prompts/reviewer.js +120 -15
- package/dist/src/prompts/reviewer.js.map +1 -1
- package/dist/src/providers/claude.d.ts +3 -0
- package/dist/src/providers/claude.js +134 -12
- package/dist/src/providers/claude.js.map +1 -1
- package/dist/src/providers/codex.d.ts +3 -0
- package/dist/src/providers/codex.js +101 -12
- package/dist/src/providers/codex.js.map +1 -1
- package/dist/src/providers/types.d.ts +49 -3
- package/dist/src/schemas/feedback.d.ts +236 -5
- package/dist/src/schemas/feedback.js +52 -1
- package/dist/src/schemas/feedback.js.map +1 -1
- package/dist/src/schemas/json-schema.d.ts +9 -0
- package/dist/src/schemas/json-schema.js +153 -0
- package/dist/src/schemas/json-schema.js.map +1 -0
- package/dist/src/schemas/session.d.ts +3 -3
- package/dist/src/schemas/session.js +1 -1
- package/dist/src/schemas/session.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
import { randomBytes } from "node:crypto";
|
|
2
|
-
import { readFileSync, unlinkSync } from "node:fs";
|
|
2
|
+
import { readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { execa } from "execa";
|
|
6
6
|
const MODELS = ["gpt-5.3-codex", "o3-pro", "o3", "o4-mini"];
|
|
7
7
|
const EFFORT_LEVELS = ["low", "medium", "high", "xhigh"];
|
|
8
|
+
/**
|
|
9
|
+
* Classify a CLI invocation failure as `capability` (downgrade-eligible) or
|
|
10
|
+
* `fatal` (terminal). Capability errors indicate the CLI doesn't support the
|
|
11
|
+
* requested structured output flag; fatal errors are everything else.
|
|
12
|
+
*
|
|
13
|
+
* Patterns must be narrow — codex's normal session header includes flag
|
|
14
|
+
* names like "output-schema:" in its info output, so substring matches on
|
|
15
|
+
* the flag name alone produce false positives.
|
|
16
|
+
*/
|
|
17
|
+
function classifyError(stderr, exitCode) {
|
|
18
|
+
const lower = stderr.toLowerCase();
|
|
19
|
+
const capabilityPatterns = [
|
|
20
|
+
/\bunknown (?:flag|option|argument)\b/,
|
|
21
|
+
/\bunrecognized (?:flag|option|argument)\b/,
|
|
22
|
+
/\binvalid_json_schema\b/,
|
|
23
|
+
/\binvalid schema\b/,
|
|
24
|
+
/\bschema is not supported\b/,
|
|
25
|
+
/\bstructured output (?:not|isn't) supported\b/,
|
|
26
|
+
];
|
|
27
|
+
const isCapability = capabilityPatterns.some((pattern) => pattern.test(lower));
|
|
28
|
+
return {
|
|
29
|
+
kind: isCapability ? "capability" : "fatal",
|
|
30
|
+
message: stderr.slice(0, 500) || `codex exited with code ${exitCode}`,
|
|
31
|
+
exitCode,
|
|
32
|
+
stderr,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
8
35
|
export class CodexProvider {
|
|
9
36
|
name = "codex";
|
|
37
|
+
capabilityCache = null;
|
|
10
38
|
async invoke(prompt, options) {
|
|
11
39
|
const args = ["exec"];
|
|
12
40
|
if (options.model) {
|
|
@@ -18,6 +46,19 @@ export class CodexProvider {
|
|
|
18
46
|
// Write clean output to a temp file to avoid parsing header/footer
|
|
19
47
|
const outFile = join(tmpdir(), `planpong-codex-${randomBytes(6).toString("hex")}.txt`);
|
|
20
48
|
args.push("-o", outFile);
|
|
49
|
+
// Optional structured output schema
|
|
50
|
+
let schemaFile = null;
|
|
51
|
+
if (options.jsonSchema) {
|
|
52
|
+
schemaFile = join(tmpdir(), `planpong-codex-schema-${randomBytes(6).toString("hex")}.json`);
|
|
53
|
+
try {
|
|
54
|
+
writeFileSync(schemaFile, JSON.stringify(options.jsonSchema));
|
|
55
|
+
args.push("--output-schema", schemaFile);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
// If we can't write the schema file, fall through without structured output
|
|
59
|
+
schemaFile = null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
21
62
|
// Use stdin for prompt (CLI arg has length limits)
|
|
22
63
|
args.push("-");
|
|
23
64
|
const start = Date.now();
|
|
@@ -29,34 +70,56 @@ export class CodexProvider {
|
|
|
29
70
|
reject: false,
|
|
30
71
|
input: prompt,
|
|
31
72
|
});
|
|
32
|
-
|
|
73
|
+
const duration = Date.now() - start;
|
|
74
|
+
const exitCode = result.exitCode ?? 1;
|
|
75
|
+
let content = "";
|
|
33
76
|
try {
|
|
34
77
|
content = readFileSync(outFile, "utf-8");
|
|
35
78
|
}
|
|
36
79
|
catch {
|
|
37
80
|
// Fall back to stdout if output file wasn't created
|
|
38
|
-
content = result.stdout;
|
|
81
|
+
content = result.stdout ?? "";
|
|
39
82
|
}
|
|
40
|
-
// Clean up temp
|
|
83
|
+
// Clean up temp files
|
|
41
84
|
try {
|
|
42
85
|
unlinkSync(outFile);
|
|
43
86
|
}
|
|
44
87
|
catch {
|
|
45
88
|
// ignore
|
|
46
89
|
}
|
|
90
|
+
if (schemaFile) {
|
|
91
|
+
try {
|
|
92
|
+
unlinkSync(schemaFile);
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
// ignore
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (content && content.trim().length > 0) {
|
|
99
|
+
return { ok: true, output: content, duration };
|
|
100
|
+
}
|
|
47
101
|
return {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
duration
|
|
102
|
+
ok: false,
|
|
103
|
+
error: classifyError(result.stderr ?? "", exitCode),
|
|
104
|
+
duration,
|
|
51
105
|
};
|
|
52
106
|
}
|
|
53
107
|
catch (error) {
|
|
108
|
+
const duration = Date.now() - start;
|
|
109
|
+
// Cleanup on error path
|
|
110
|
+
if (schemaFile) {
|
|
111
|
+
try {
|
|
112
|
+
unlinkSync(schemaFile);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
// ignore
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const message = error instanceof Error ? error.message : "Unknown error invoking codex";
|
|
54
119
|
return {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
exitCode: 1,
|
|
59
|
-
duration: Date.now() - start,
|
|
120
|
+
ok: false,
|
|
121
|
+
error: { kind: "fatal", message, exitCode: 1 },
|
|
122
|
+
duration,
|
|
60
123
|
};
|
|
61
124
|
}
|
|
62
125
|
}
|
|
@@ -73,6 +136,32 @@ export class CodexProvider {
|
|
|
73
136
|
return false;
|
|
74
137
|
}
|
|
75
138
|
}
|
|
139
|
+
async checkStructuredOutputSupport() {
|
|
140
|
+
if (this.capabilityCache !== null) {
|
|
141
|
+
return this.capabilityCache;
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
const result = await execa("codex", ["exec", "--help"], {
|
|
145
|
+
preferLocal: true,
|
|
146
|
+
timeout: 5_000,
|
|
147
|
+
reject: false,
|
|
148
|
+
});
|
|
149
|
+
const helpText = `${result.stdout ?? ""}\n${result.stderr ?? ""}`;
|
|
150
|
+
const supported = helpText.includes("--output-schema");
|
|
151
|
+
this.capabilityCache = supported;
|
|
152
|
+
if (!supported) {
|
|
153
|
+
process.stderr.write(`[planpong] Structured output not supported by codex — using legacy parsing\n`);
|
|
154
|
+
}
|
|
155
|
+
return supported;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
this.capabilityCache = false;
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
markNonCapable() {
|
|
163
|
+
this.capabilityCache = false;
|
|
164
|
+
}
|
|
76
165
|
getModels() {
|
|
77
166
|
return MODELS;
|
|
78
167
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/providers/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/providers/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAQ9B,MAAM,MAAM,GAAG,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AAC5D,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD;;;;;;;;GAQG;AACH,SAAS,aAAa,CAAC,MAAc,EAAE,QAAgB;IACrD,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACnC,MAAM,k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|
|
7
|
+
* JSON Schema to constrain model output. When set, providers pass this to
|
|
8
|
+
* their respective structured-output flags (`--json-schema` for claude,
|
|
9
|
+
* `--output-schema` for codex).
|
|
10
|
+
*/
|
|
11
|
+
jsonSchema?: Record<string, unknown>;
|
|
6
12
|
}
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Provider invocation error categories. Used by the operations-layer state
|
|
15
|
+
* machine to decide whether to downgrade or fail terminally.
|
|
16
|
+
*
|
|
17
|
+
* - `capability`: schema rejected, flag unrecognized at runtime, structured
|
|
18
|
+
* output format error. Indicates the CLI doesn't support the requested
|
|
19
|
+
* structured output mode. Downgrade-eligible.
|
|
20
|
+
* - `fatal`: auth failure, timeout, network/transport error, non-zero exit
|
|
21
|
+
* with no output. Unrelated to structured output capability. Terminal.
|
|
22
|
+
*/
|
|
23
|
+
export type ProviderErrorKind = "capability" | "fatal";
|
|
24
|
+
export interface ProviderError {
|
|
25
|
+
kind: ProviderErrorKind;
|
|
26
|
+
message: string;
|
|
9
27
|
exitCode: number;
|
|
10
|
-
|
|
28
|
+
stderr?: string;
|
|
11
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Discriminated result of a single provider invocation. Providers are
|
|
32
|
+
* single-shot — they perform one invocation and return either the output
|
|
33
|
+
* or a typed error. They do NOT retry or downgrade internally; that is
|
|
34
|
+
* the operations-layer state machine's job.
|
|
35
|
+
*/
|
|
36
|
+
export type ProviderResponse = {
|
|
37
|
+
ok: true;
|
|
38
|
+
output: string;
|
|
39
|
+
duration: number;
|
|
40
|
+
} | {
|
|
41
|
+
ok: false;
|
|
42
|
+
error: ProviderError;
|
|
43
|
+
duration: number;
|
|
44
|
+
};
|
|
12
45
|
export interface Provider {
|
|
13
46
|
name: string;
|
|
14
47
|
invoke(prompt: string, options: InvokeOptions): Promise<ProviderResponse>;
|
|
15
48
|
isAvailable(): Promise<boolean>;
|
|
16
49
|
getModels(): string[];
|
|
17
50
|
getEffortLevels(): string[];
|
|
51
|
+
/**
|
|
52
|
+
* Probe the underlying CLI to determine whether structured output is
|
|
53
|
+
* supported. Result is cached for the session lifetime. If the probe
|
|
54
|
+
* fails or times out, returns false (use legacy path).
|
|
55
|
+
*/
|
|
56
|
+
checkStructuredOutputSupport(): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Mark this provider as non-capable for the remainder of the session.
|
|
59
|
+
* Called by the state machine after a runtime structured-output failure
|
|
60
|
+
* (capability error or JSON.parse failure) to prevent re-attempting
|
|
61
|
+
* structured output on subsequent rounds.
|
|
62
|
+
*/
|
|
63
|
+
markNonCapable(): void;
|
|
18
64
|
}
|
|
@@ -22,7 +22,7 @@ export declare const FeedbackIssueSchema: z.ZodObject<{
|
|
|
22
22
|
suggestion: string;
|
|
23
23
|
}>;
|
|
24
24
|
export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
25
|
-
verdict: z.ZodEnum<["needs_revision", "approved", "approved_with_notes"]>;
|
|
25
|
+
verdict: z.ZodEnum<["needs_revision", "approved", "approved_with_notes", "blocked"]>;
|
|
26
26
|
summary: z.ZodString;
|
|
27
27
|
issues: z.ZodArray<z.ZodObject<{
|
|
28
28
|
id: z.ZodString;
|
|
@@ -46,6 +46,8 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
46
46
|
description: string;
|
|
47
47
|
suggestion: string;
|
|
48
48
|
}>, "many">;
|
|
49
|
+
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
missing_phase_fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
49
51
|
}, "strip", z.ZodTypeAny, {
|
|
50
52
|
issues: {
|
|
51
53
|
id: string;
|
|
@@ -55,8 +57,10 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
55
57
|
description: string;
|
|
56
58
|
suggestion: string;
|
|
57
59
|
}[];
|
|
58
|
-
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
60
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
59
61
|
summary: string;
|
|
62
|
+
fallback_used?: boolean | undefined;
|
|
63
|
+
missing_phase_fields?: string[] | undefined;
|
|
60
64
|
}, {
|
|
61
65
|
issues: {
|
|
62
66
|
id: string;
|
|
@@ -66,8 +70,10 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
66
70
|
description: string;
|
|
67
71
|
suggestion: string;
|
|
68
72
|
}[];
|
|
69
|
-
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
73
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
70
74
|
summary: string;
|
|
75
|
+
fallback_used?: boolean | undefined;
|
|
76
|
+
missing_phase_fields?: string[] | undefined;
|
|
71
77
|
}>, {
|
|
72
78
|
issues: {
|
|
73
79
|
id: string;
|
|
@@ -77,8 +83,10 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
77
83
|
description: string;
|
|
78
84
|
suggestion: string;
|
|
79
85
|
}[];
|
|
80
|
-
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
86
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
81
87
|
summary: string;
|
|
88
|
+
fallback_used?: boolean | undefined;
|
|
89
|
+
missing_phase_fields?: string[] | undefined;
|
|
82
90
|
}, {
|
|
83
91
|
issues: {
|
|
84
92
|
id: string;
|
|
@@ -88,8 +96,231 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
88
96
|
description: string;
|
|
89
97
|
suggestion: string;
|
|
90
98
|
}[];
|
|
91
|
-
verdict: "needs_revision" | "approved" | "approved_with_notes";
|
|
99
|
+
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
92
100
|
summary: string;
|
|
101
|
+
fallback_used?: boolean | undefined;
|
|
102
|
+
missing_phase_fields?: string[] | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export declare const AlternativeSchema: z.ZodObject<{
|
|
105
|
+
approach: z.ZodString;
|
|
106
|
+
tradeoff: z.ZodString;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
approach: string;
|
|
109
|
+
tradeoff: string;
|
|
110
|
+
}, {
|
|
111
|
+
approach: string;
|
|
112
|
+
tradeoff: string;
|
|
113
|
+
}>;
|
|
114
|
+
export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
115
|
+
verdict: z.ZodEnum<["needs_revision", "blocked"]>;
|
|
116
|
+
summary: z.ZodString;
|
|
117
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
severity: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
120
|
+
section: z.ZodString;
|
|
121
|
+
title: z.ZodString;
|
|
122
|
+
description: z.ZodString;
|
|
123
|
+
suggestion: z.ZodString;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
id: string;
|
|
126
|
+
severity: "P1" | "P2" | "P3";
|
|
127
|
+
section: string;
|
|
128
|
+
title: string;
|
|
129
|
+
description: string;
|
|
130
|
+
suggestion: string;
|
|
131
|
+
}, {
|
|
132
|
+
id: string;
|
|
133
|
+
severity: "P1" | "P2" | "P3";
|
|
134
|
+
section: string;
|
|
135
|
+
title: string;
|
|
136
|
+
description: string;
|
|
137
|
+
suggestion: string;
|
|
138
|
+
}>, "many">;
|
|
139
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
140
|
+
approach_assessment: z.ZodString;
|
|
141
|
+
alternatives: z.ZodArray<z.ZodObject<{
|
|
142
|
+
approach: z.ZodString;
|
|
143
|
+
tradeoff: z.ZodString;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
approach: string;
|
|
146
|
+
tradeoff: string;
|
|
147
|
+
}, {
|
|
148
|
+
approach: string;
|
|
149
|
+
tradeoff: string;
|
|
150
|
+
}>, "many">;
|
|
151
|
+
assumptions: z.ZodArray<z.ZodString, "many">;
|
|
152
|
+
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
missing_phase_fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
issues: {
|
|
156
|
+
id: string;
|
|
157
|
+
severity: "P1" | "P2" | "P3";
|
|
158
|
+
section: string;
|
|
159
|
+
title: string;
|
|
160
|
+
description: string;
|
|
161
|
+
suggestion: string;
|
|
162
|
+
}[];
|
|
163
|
+
verdict: "needs_revision" | "blocked";
|
|
164
|
+
summary: string;
|
|
165
|
+
confidence: "high" | "medium" | "low";
|
|
166
|
+
approach_assessment: string;
|
|
167
|
+
alternatives: {
|
|
168
|
+
approach: string;
|
|
169
|
+
tradeoff: string;
|
|
170
|
+
}[];
|
|
171
|
+
assumptions: string[];
|
|
172
|
+
fallback_used?: boolean | undefined;
|
|
173
|
+
missing_phase_fields?: string[] | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
issues: {
|
|
176
|
+
id: string;
|
|
177
|
+
severity: "P1" | "P2" | "P3";
|
|
178
|
+
section: string;
|
|
179
|
+
title: string;
|
|
180
|
+
description: string;
|
|
181
|
+
suggestion: string;
|
|
182
|
+
}[];
|
|
183
|
+
verdict: "needs_revision" | "blocked";
|
|
184
|
+
summary: string;
|
|
185
|
+
confidence: "high" | "medium" | "low";
|
|
186
|
+
approach_assessment: string;
|
|
187
|
+
alternatives: {
|
|
188
|
+
approach: string;
|
|
189
|
+
tradeoff: string;
|
|
190
|
+
}[];
|
|
191
|
+
assumptions: string[];
|
|
192
|
+
fallback_used?: boolean | undefined;
|
|
193
|
+
missing_phase_fields?: string[] | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
export declare const RiskEntrySchema: z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
category: z.ZodEnum<["dependency", "integration", "operational", "assumption", "external"]>;
|
|
198
|
+
likelihood: z.ZodEnum<["high", "medium", "low"]>;
|
|
199
|
+
impact: z.ZodEnum<["high", "medium", "low"]>;
|
|
200
|
+
title: z.ZodString;
|
|
201
|
+
description: z.ZodString;
|
|
202
|
+
mitigation: z.ZodString;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
id: string;
|
|
205
|
+
title: string;
|
|
206
|
+
description: string;
|
|
207
|
+
category: "dependency" | "integration" | "operational" | "assumption" | "external";
|
|
208
|
+
likelihood: "high" | "medium" | "low";
|
|
209
|
+
impact: "high" | "medium" | "low";
|
|
210
|
+
mitigation: string;
|
|
211
|
+
}, {
|
|
212
|
+
id: string;
|
|
213
|
+
title: string;
|
|
214
|
+
description: string;
|
|
215
|
+
category: "dependency" | "integration" | "operational" | "assumption" | "external";
|
|
216
|
+
likelihood: "high" | "medium" | "low";
|
|
217
|
+
impact: "high" | "medium" | "low";
|
|
218
|
+
mitigation: string;
|
|
219
|
+
}>;
|
|
220
|
+
export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
221
|
+
verdict: z.ZodEnum<["needs_revision", "blocked"]>;
|
|
222
|
+
summary: z.ZodString;
|
|
223
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
severity: z.ZodEnum<["P1", "P2", "P3"]>;
|
|
226
|
+
section: z.ZodString;
|
|
227
|
+
title: z.ZodString;
|
|
228
|
+
description: z.ZodString;
|
|
229
|
+
suggestion: z.ZodString;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
id: string;
|
|
232
|
+
severity: "P1" | "P2" | "P3";
|
|
233
|
+
section: string;
|
|
234
|
+
title: string;
|
|
235
|
+
description: string;
|
|
236
|
+
suggestion: string;
|
|
237
|
+
}, {
|
|
238
|
+
id: string;
|
|
239
|
+
severity: "P1" | "P2" | "P3";
|
|
240
|
+
section: string;
|
|
241
|
+
title: string;
|
|
242
|
+
description: string;
|
|
243
|
+
suggestion: string;
|
|
244
|
+
}>, "many">;
|
|
245
|
+
risk_level: z.ZodEnum<["high", "medium", "low"]>;
|
|
246
|
+
risks: z.ZodArray<z.ZodObject<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
category: z.ZodEnum<["dependency", "integration", "operational", "assumption", "external"]>;
|
|
249
|
+
likelihood: z.ZodEnum<["high", "medium", "low"]>;
|
|
250
|
+
impact: z.ZodEnum<["high", "medium", "low"]>;
|
|
251
|
+
title: z.ZodString;
|
|
252
|
+
description: z.ZodString;
|
|
253
|
+
mitigation: z.ZodString;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
id: string;
|
|
256
|
+
title: string;
|
|
257
|
+
description: string;
|
|
258
|
+
category: "dependency" | "integration" | "operational" | "assumption" | "external";
|
|
259
|
+
likelihood: "high" | "medium" | "low";
|
|
260
|
+
impact: "high" | "medium" | "low";
|
|
261
|
+
mitigation: string;
|
|
262
|
+
}, {
|
|
263
|
+
id: string;
|
|
264
|
+
title: string;
|
|
265
|
+
description: string;
|
|
266
|
+
category: "dependency" | "integration" | "operational" | "assumption" | "external";
|
|
267
|
+
likelihood: "high" | "medium" | "low";
|
|
268
|
+
impact: "high" | "medium" | "low";
|
|
269
|
+
mitigation: string;
|
|
270
|
+
}>, "many">;
|
|
271
|
+
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
+
missing_phase_fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
issues: {
|
|
275
|
+
id: string;
|
|
276
|
+
severity: "P1" | "P2" | "P3";
|
|
277
|
+
section: string;
|
|
278
|
+
title: string;
|
|
279
|
+
description: string;
|
|
280
|
+
suggestion: string;
|
|
281
|
+
}[];
|
|
282
|
+
verdict: "needs_revision" | "blocked";
|
|
283
|
+
summary: string;
|
|
284
|
+
risk_level: "high" | "medium" | "low";
|
|
285
|
+
risks: {
|
|
286
|
+
id: string;
|
|
287
|
+
title: string;
|
|
288
|
+
description: string;
|
|
289
|
+
category: "dependency" | "integration" | "operational" | "assumption" | "external";
|
|
290
|
+
likelihood: "high" | "medium" | "low";
|
|
291
|
+
impact: "high" | "medium" | "low";
|
|
292
|
+
mitigation: string;
|
|
293
|
+
}[];
|
|
294
|
+
fallback_used?: boolean | undefined;
|
|
295
|
+
missing_phase_fields?: string[] | undefined;
|
|
296
|
+
}, {
|
|
297
|
+
issues: {
|
|
298
|
+
id: string;
|
|
299
|
+
severity: "P1" | "P2" | "P3";
|
|
300
|
+
section: string;
|
|
301
|
+
title: string;
|
|
302
|
+
description: string;
|
|
303
|
+
suggestion: string;
|
|
304
|
+
}[];
|
|
305
|
+
verdict: "needs_revision" | "blocked";
|
|
306
|
+
summary: string;
|
|
307
|
+
risk_level: "high" | "medium" | "low";
|
|
308
|
+
risks: {
|
|
309
|
+
id: string;
|
|
310
|
+
title: string;
|
|
311
|
+
description: string;
|
|
312
|
+
category: "dependency" | "integration" | "operational" | "assumption" | "external";
|
|
313
|
+
likelihood: "high" | "medium" | "low";
|
|
314
|
+
impact: "high" | "medium" | "low";
|
|
315
|
+
mitigation: string;
|
|
316
|
+
}[];
|
|
317
|
+
fallback_used?: boolean | undefined;
|
|
318
|
+
missing_phase_fields?: string[] | undefined;
|
|
93
319
|
}>;
|
|
94
320
|
export type FeedbackIssue = z.infer<typeof FeedbackIssueSchema>;
|
|
95
321
|
export type ReviewFeedback = z.infer<typeof ReviewFeedbackSchema>;
|
|
322
|
+
export type DirectionFeedback = z.infer<typeof DirectionFeedbackSchema>;
|
|
323
|
+
export type RiskFeedback = z.infer<typeof RiskFeedbackSchema>;
|
|
324
|
+
export type RiskEntry = z.infer<typeof RiskEntrySchema>;
|
|
325
|
+
export type Alternative = z.infer<typeof AlternativeSchema>;
|
|
326
|
+
export type PhaseFeedback = DirectionFeedback | RiskFeedback | ReviewFeedback;
|
|
@@ -7,11 +7,21 @@ export const FeedbackIssueSchema = z.object({
|
|
|
7
7
|
description: z.string(),
|
|
8
8
|
suggestion: z.string(),
|
|
9
9
|
});
|
|
10
|
+
// Base verdict enum includes `blocked` so fallback parsing can accept it
|
|
11
|
+
// from direction/risk phases when phase-specific parsing fails.
|
|
10
12
|
export const ReviewFeedbackSchema = z
|
|
11
13
|
.object({
|
|
12
|
-
verdict: z.enum([
|
|
14
|
+
verdict: z.enum([
|
|
15
|
+
"needs_revision",
|
|
16
|
+
"approved",
|
|
17
|
+
"approved_with_notes",
|
|
18
|
+
"blocked",
|
|
19
|
+
]),
|
|
13
20
|
summary: z.string(),
|
|
14
21
|
issues: z.array(FeedbackIssueSchema),
|
|
22
|
+
// Fallback observability — set by parseFeedbackForPhase when fallback is used
|
|
23
|
+
fallback_used: z.boolean().optional(),
|
|
24
|
+
missing_phase_fields: z.array(z.string()).optional(),
|
|
15
25
|
})
|
|
16
26
|
.refine((data) => {
|
|
17
27
|
if (data.verdict === "approved_with_notes") {
|
|
@@ -21,4 +31,45 @@ export const ReviewFeedbackSchema = z
|
|
|
21
31
|
}, {
|
|
22
32
|
message: "approved_with_notes is only valid when all issues are P3. Either downgrade issues to P3 or change verdict to needs_revision.",
|
|
23
33
|
});
|
|
34
|
+
// --- Direction phase schema ---
|
|
35
|
+
export const AlternativeSchema = z.object({
|
|
36
|
+
approach: z.string(),
|
|
37
|
+
tradeoff: z.string(),
|
|
38
|
+
});
|
|
39
|
+
export const DirectionFeedbackSchema = z.object({
|
|
40
|
+
verdict: z.enum(["needs_revision", "blocked"]),
|
|
41
|
+
summary: z.string(),
|
|
42
|
+
issues: z.array(FeedbackIssueSchema),
|
|
43
|
+
confidence: z.enum(["high", "medium", "low"]),
|
|
44
|
+
approach_assessment: z.string(),
|
|
45
|
+
alternatives: z.array(AlternativeSchema),
|
|
46
|
+
assumptions: z.array(z.string()),
|
|
47
|
+
fallback_used: z.boolean().optional(),
|
|
48
|
+
missing_phase_fields: z.array(z.string()).optional(),
|
|
49
|
+
});
|
|
50
|
+
// --- Risk phase schema ---
|
|
51
|
+
export const RiskEntrySchema = z.object({
|
|
52
|
+
id: z.string(),
|
|
53
|
+
category: z.enum([
|
|
54
|
+
"dependency",
|
|
55
|
+
"integration",
|
|
56
|
+
"operational",
|
|
57
|
+
"assumption",
|
|
58
|
+
"external",
|
|
59
|
+
]),
|
|
60
|
+
likelihood: z.enum(["high", "medium", "low"]),
|
|
61
|
+
impact: z.enum(["high", "medium", "low"]),
|
|
62
|
+
title: z.string(),
|
|
63
|
+
description: z.string(),
|
|
64
|
+
mitigation: z.string(),
|
|
65
|
+
});
|
|
66
|
+
export const RiskFeedbackSchema = z.object({
|
|
67
|
+
verdict: z.enum(["needs_revision", "blocked"]),
|
|
68
|
+
summary: z.string(),
|
|
69
|
+
issues: z.array(FeedbackIssueSchema),
|
|
70
|
+
risk_level: z.enum(["high", "medium", "low"]),
|
|
71
|
+
risks: z.array(RiskEntrySchema),
|
|
72
|
+
fallback_used: z.boolean().optional(),
|
|
73
|
+
missing_phase_fields: z.array(z.string()).optional(),
|
|
74
|
+
});
|
|
24
75
|
//# sourceMappingURL=feedback.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../../src/schemas/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,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AAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IAC/B,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReviewPhase } from "../prompts/reviewer.js";
|
|
2
|
+
export declare const DirectionFeedbackJsonSchema: Record<string, unknown>;
|
|
3
|
+
export declare const RiskFeedbackJsonSchema: Record<string, unknown>;
|
|
4
|
+
export declare const ReviewFeedbackJsonSchema: Record<string, unknown>;
|
|
5
|
+
export declare const PlannerRevisionJsonSchema: Record<string, unknown>;
|
|
6
|
+
/**
|
|
7
|
+
* Get the JSON Schema appropriate for a given review phase.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getFeedbackJsonSchemaForPhase(phase: ReviewPhase): Record<string, unknown>;
|