planpong 0.5.2 → 0.5.4
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/config/defaults.js +1 -0
- package/dist/src/config/defaults.js.map +1 -1
- package/dist/src/config/loader.d.ts +1 -0
- package/dist/src/config/loader.js +3 -0
- package/dist/src/config/loader.js.map +1 -1
- package/dist/src/core/convergence.d.ts +2 -2
- package/dist/src/core/convergence.js +55 -17
- package/dist/src/core/convergence.js.map +1 -1
- package/dist/src/core/operations.d.ts +48 -0
- package/dist/src/core/operations.js +83 -21
- package/dist/src/core/operations.js.map +1 -1
- package/dist/src/core/session.d.ts +1 -1
- package/dist/src/core/session.js +11 -2
- package/dist/src/core/session.js.map +1 -1
- package/dist/src/core/verify-evidence.d.ts +64 -0
- package/dist/src/core/verify-evidence.js +110 -0
- package/dist/src/core/verify-evidence.js.map +1 -0
- package/dist/src/mcp/server.js +6 -2
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools/get-feedback.js +9 -0
- package/dist/src/mcp/tools/get-feedback.js.map +1 -1
- package/dist/src/mcp/tools/record-revision.d.ts +20 -0
- package/dist/src/mcp/tools/record-revision.js +158 -0
- package/dist/src/mcp/tools/record-revision.js.map +1 -0
- package/dist/src/mcp/tools/revise.js +22 -0
- package/dist/src/mcp/tools/revise.js.map +1 -1
- package/dist/src/mcp/tools/start-review.js +7 -0
- package/dist/src/mcp/tools/start-review.js.map +1 -1
- package/dist/src/prompts/planner.js +27 -3
- package/dist/src/prompts/planner.js.map +1 -1
- package/dist/src/prompts/reviewer.d.ts +15 -7
- package/dist/src/prompts/reviewer.js +77 -16
- package/dist/src/prompts/reviewer.js.map +1 -1
- package/dist/src/schemas/config.d.ts +3 -0
- package/dist/src/schemas/config.js +8 -0
- package/dist/src/schemas/config.js.map +1 -1
- package/dist/src/schemas/feedback.d.ts +68 -27
- package/dist/src/schemas/feedback.js +34 -12
- package/dist/src/schemas/feedback.js.map +1 -1
- package/dist/src/schemas/json-schema.js +6 -0
- package/dist/src/schemas/json-schema.js.map +1 -1
- package/dist/src/schemas/metrics.d.ts +3 -0
- package/dist/src/schemas/metrics.js +6 -0
- package/dist/src/schemas/metrics.js.map +1 -1
- package/dist/src/schemas/session.d.ts +3 -0
- package/dist/src/schemas/session.js +12 -0
- package/dist/src/schemas/session.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-review.js","sourceRoot":"","sources":["../../../../src/mcp/tools/start-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAEL,qBAAqB,EACrB,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,+CAA+C,CAAC;IAC5D,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,EAAE;SACV,QAAQ,CAAC,uBAAuB,CAAC;IACpC,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,QAAQ,EA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IAAI,CAAC,SAAS,CAAC;wBACnB,UAAU,EAAE,OAAO,CAAC,EAAE;wBACtB,SAAS,EAAE,QAAQ;wBACnB,YAAY,EAAE,WAAW;wBACzB,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,KAAK;wBACvC,YAAY,EAAE,OAAO,CAAC,WAAW;wBACjC,MAAM,EAAE;4BACN,OAAO,EAAE,MAAM,CAAC,OAAO;4BACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;4BACzB,UAAU,EAAE,MAAM,CAAC,UAAU;4BAC7B,YAAY,EAAE,MAAM,CAAC,YAAY;yBAClC;qBACF,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -28,8 +28,23 @@ export function buildRevisionPrompt(currentPlan, feedback, keyDecisions, priorCo
|
|
|
28
28
|
? `\n## Key Decisions From Plan\n\n${keyDecisions}\n`
|
|
29
29
|
: "";
|
|
30
30
|
const issuesList = feedback.issues
|
|
31
|
-
.map((issue) =>
|
|
31
|
+
.map((issue) => {
|
|
32
|
+
const verifiedLine = issue.verified === false
|
|
33
|
+
? "\n**Verified:** false — quoted evidence could not be located in the plan; treat as likely hallucinated"
|
|
34
|
+
: issue.verified === true
|
|
35
|
+
? "\n**Verified:** true"
|
|
36
|
+
: "";
|
|
37
|
+
return `### ${issue.id} (${issue.severity}): ${issue.title}\n**Section:** ${issue.section}${verifiedLine}\n**Description:** ${issue.description}\n**Suggestion:** ${issue.suggestion}`;
|
|
38
|
+
})
|
|
32
39
|
.join("\n\n");
|
|
40
|
+
const evidenceVerificationBlock = `\n## Evidence Verification
|
|
41
|
+
|
|
42
|
+
Each issue carries a \`Verified\` flag. Issues with \`Verified: false\` could not be anchored to verbatim text in the plan and may be reviewer hallucinations.
|
|
43
|
+
|
|
44
|
+
- For unverified issues, address them only if you confirm the underlying concern is real by reading the plan yourself.
|
|
45
|
+
- If the concern is not present in the plan as written, mark the issue \`rejected\` with rationale "unverified evidence" (or a short variant explaining what you checked).
|
|
46
|
+
- Do NOT spend revision tokens fixing things that don't exist in the plan.
|
|
47
|
+
`;
|
|
33
48
|
const directionInstructions = `You are revising a plan based on HIGH-LEVEL directional feedback. This is the first review pass — the reviewer evaluated whether the plan is solving the right problem with the right approach.
|
|
34
49
|
|
|
35
50
|
You are the plan's ADVOCATE, but be open to directional changes. If the reviewer identifies a fundamentally better approach or a critical missing constraint, this is the round to make sweeping changes — restructure sections, change the approach, adjust scope. Don't be precious about the current draft.
|
|
@@ -176,7 +191,7 @@ ${currentPlan}
|
|
|
176
191
|
**Summary:** ${feedback.summary}
|
|
177
192
|
|
|
178
193
|
${issuesList}
|
|
179
|
-
|
|
194
|
+
${evidenceVerificationBlock}
|
|
180
195
|
## Your Task`;
|
|
181
196
|
const outputConstraint = useEdits ? editsConstraints : fullModeConstraint;
|
|
182
197
|
if (structuredOutput) {
|
|
@@ -230,7 +245,14 @@ YOUR_JSON_HERE
|
|
|
230
245
|
export function buildIncrementalRevisionPrompt(feedback, phase, structuredOutput, revisionMode = "full") {
|
|
231
246
|
const useEdits = revisionMode === "edits" && phase !== "direction";
|
|
232
247
|
const issuesList = feedback.issues
|
|
233
|
-
.map((issue) =>
|
|
248
|
+
.map((issue) => {
|
|
249
|
+
const verifiedLine = issue.verified === false
|
|
250
|
+
? "\n**Verified:** false — quoted evidence could not be located in the plan; treat as likely hallucinated"
|
|
251
|
+
: issue.verified === true
|
|
252
|
+
? "\n**Verified:** true"
|
|
253
|
+
: "";
|
|
254
|
+
return `### ${issue.id} (${issue.severity}): ${issue.title}\n**Section:** ${issue.section}${verifiedLine}\n**Description:** ${issue.description}\n**Suggestion:** ${issue.suggestion}`;
|
|
255
|
+
})
|
|
234
256
|
.join("\n\n");
|
|
235
257
|
const phaseLabel = phase === "direction"
|
|
236
258
|
? "DIRECTION"
|
|
@@ -286,6 +308,8 @@ The reviewer has produced new feedback for this round. Process it below.
|
|
|
286
308
|
|
|
287
309
|
${issuesList}
|
|
288
310
|
|
|
311
|
+
Each issue carries a \`Verified\` flag. Issues with \`Verified: false\` could not be anchored to verbatim text in the plan and may be reviewer hallucinations — address only if you confirm the concern is real, otherwise mark \`rejected\` with rationale "unverified evidence".
|
|
312
|
+
|
|
289
313
|
## Your Task`;
|
|
290
314
|
if (structuredOutput) {
|
|
291
315
|
return `${body}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/prompts/planner.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,sBAAsB,CACpC,YAAoB,EACpB,QAAgB;IAEhB,OAAO;;;;;;;;;;;;;;;;EAgBP,YAAY,EAAE,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,WAAmB,EACnB,QAAwB,EACxB,YAA2B,EAC3B,YAA2B,EAC3B,QAAqB,QAAQ,EAC7B,mBAA4B,KAAK,EACjC,eAAiC,MAAM;IAEvC,sEAAsE;IACtE,wDAAwD;IACxD,MAAM,QAAQ,GAAG,YAAY,KAAK,OAAO,IAAI,KAAK,KAAK,WAAW,CAAC;IACnE,MAAM,YAAY,GAAG,YAAY;QAC/B,CAAC,CAAC,wCAAwC,YAAY,IAAI;QAC1D,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,cAAc,GAAG,YAAY;QACjC,CAAC,CAAC,mCAAmC,YAAY,IAAI;QACrD,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM;SAC/B,GAAG,
|
|
1
|
+
{"version":3,"file":"planner.js","sourceRoot":"","sources":["../../../src/prompts/planner.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,sBAAsB,CACpC,YAAoB,EACpB,QAAgB;IAEhB,OAAO;;;;;;;;;;;;;;;;EAgBP,YAAY,EAAE,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,WAAmB,EACnB,QAAwB,EACxB,YAA2B,EAC3B,YAA2B,EAC3B,QAAqB,QAAQ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AAC,MAAM;;;;EAIb,CAAC,CAAC,IAAI,CAAC,KAAK;OACP,CAAC;IACJ,CAAC,CAAC;SACD,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhB,MAAM,WAAW,GAAG;;;;;;OAMf,CAAC;IAEN,MAAM,IAAI,GAAG;;;;;;EAMb,WAAW;;;;EAIX,YAAY;;aAED,CAAC;IAEZ,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,GAAG,IAAI;;;;;;EAMhB,WAAW;;;;mDAIsC,CAAC;IAClD,CAAC;IAED,OAAO,GAAG,IAAI;;;;EAId,WAAW;;;;;;;;;;qBAUQ,CAAC;AACtB,CAAC"}
|
|
@@ -5,15 +5,23 @@ export declare function getReviewPhase(round: number): ReviewPhase;
|
|
|
5
5
|
* Incremental review prompt for resumed reviewer sessions.
|
|
6
6
|
*
|
|
7
7
|
* The reviewer has already seen the full plan (round 1) and produced its
|
|
8
|
-
* own prior critique.
|
|
9
|
-
*
|
|
10
|
-
* plus the new phase instructions.
|
|
8
|
+
* own prior critique. Round 2+ prompts include both the diff (for change
|
|
9
|
+
* context) AND the full current plan text (for unambiguous quoting).
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* **Why ship the full plan even when the model has it in session memory:**
|
|
12
|
+
* the cite-evidence block requires verbatim `quoted_text` matching against
|
|
13
|
+
* the *current* plan. Without an authoritative current-plan section, the
|
|
14
|
+
* reviewer must reconstruct from R1's full plan + every subsequent diff in
|
|
15
|
+
* its memory. That's fragile (context loss, truncation, attention to old
|
|
16
|
+
* lines). Sending the full plan eliminates the reconstruction job. Plans
|
|
17
|
+
* are typically < 10KB — the cost is marginal next to a wasted round from
|
|
18
|
+
* bad quotes.
|
|
19
|
+
*
|
|
20
|
+
* `planDiffOrContent` carries the diff (or, when the caller skips diffing,
|
|
21
|
+
* the full plan as a fallback). `currentPlanContent` is always the
|
|
22
|
+
* authoritative current plan.
|
|
15
23
|
*/
|
|
16
|
-
export declare function buildIncrementalReviewPrompt(planDiffOrContent: string, priorDecisions: string | null, phase?: ReviewPhase, structuredOutput?: boolean): string;
|
|
24
|
+
export declare function buildIncrementalReviewPrompt(planDiffOrContent: string, currentPlanContent: string, priorDecisions: string | null, phase?: ReviewPhase, structuredOutput?: boolean): string;
|
|
17
25
|
export declare function buildReviewPrompt(planContent: string, priorDecisions: string | null, phase?: ReviewPhase, structuredOutput?: boolean): string;
|
|
18
26
|
export declare function formatPriorDecisions(rounds: Array<{
|
|
19
27
|
round: number;
|
|
@@ -5,6 +5,45 @@ export function getReviewPhase(round) {
|
|
|
5
5
|
return "risk";
|
|
6
6
|
return "detail";
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Shared "cite evidence" instruction blocks. Every issue must include a
|
|
10
|
+
* verbatim ≤200-char `quoted_text` snippet that planpong verifies by
|
|
11
|
+
* grepping the plan markdown. Quotes that don't match are tagged
|
|
12
|
+
* `verified: false` and deprioritized by the planner — they're treated
|
|
13
|
+
* as likely hallucinations.
|
|
14
|
+
*
|
|
15
|
+
* Length and distinctiveness limits are enforced server-side; the prompt
|
|
16
|
+
* communicates them so the model produces compliant quotes on the first
|
|
17
|
+
* try.
|
|
18
|
+
*
|
|
19
|
+
* Two variants:
|
|
20
|
+
* - `_FRESH` is appended by `buildReviewPrompt`. The full plan is in the
|
|
21
|
+
* prompt above the cite block, so "appear in the plan markdown above"
|
|
22
|
+
* is literally true.
|
|
23
|
+
* - `_INCREMENTAL` is appended by `buildIncrementalReviewPrompt`. That
|
|
24
|
+
* prompt now sends both a diff (for change context) AND the full
|
|
25
|
+
* current plan text (for quoting). Quoting from a diff line would leak
|
|
26
|
+
* `+ ` / `- ` prefixes; quoting from session memory of an earlier round
|
|
27
|
+
* risks pulling deleted lines. The incremental cite block points the
|
|
28
|
+
* reviewer at the authoritative current-plan section.
|
|
29
|
+
*/
|
|
30
|
+
const CITE_EVIDENCE_BLOCK_FRESH = `
|
|
31
|
+
## Cite Evidence For Every Issue
|
|
32
|
+
|
|
33
|
+
Every issue you raise MUST include a \`quoted_text\` field — a verbatim snippet copied from the plan that the issue refers to. This is how planpong verifies the issue actually corresponds to something in the plan rather than a misread.
|
|
34
|
+
|
|
35
|
+
- Quote, do not paraphrase. The string must appear character-for-character (whitespace tolerant) somewhere in the plan markdown above.
|
|
36
|
+
- Keep \`quoted_text\` between 10 and 200 characters. Pick the shortest distinctive snippet that anchors the issue.
|
|
37
|
+
- If you cannot find a verbatim quote that supports the issue, the issue is probably a misread of the plan — drop it.`;
|
|
38
|
+
const CITE_EVIDENCE_BLOCK_INCREMENTAL = `
|
|
39
|
+
## Cite Evidence For Every Issue
|
|
40
|
+
|
|
41
|
+
Every issue you raise MUST include a \`quoted_text\` field — a verbatim snippet copied from the plan that the issue refers to. This is how planpong verifies the issue actually corresponds to something in the plan rather than a misread.
|
|
42
|
+
|
|
43
|
+
- Quote, do not paraphrase. The string must appear character-for-character (whitespace tolerant) in the **current plan text provided below** (the "Current Plan" section, not the diff).
|
|
44
|
+
- Do NOT quote diff prefix characters (\`+ \` / \`- \`). The diff is for change context only; quote from the Current Plan section.
|
|
45
|
+
- Keep \`quoted_text\` between 10 and 200 characters. Pick the shortest distinctive snippet that anchors the issue.
|
|
46
|
+
- If you cannot find a verbatim quote that supports the issue, the issue is probably a misread of the plan — drop it.`;
|
|
8
47
|
function buildDirectionReviewInstructions() {
|
|
9
48
|
return `You are reviewing an implementation plan at a HIGH LEVEL. Focus on direction, not details.
|
|
10
49
|
|
|
@@ -110,7 +149,8 @@ function buildDirectionJsonSchema() {
|
|
|
110
149
|
"section": "Which part of the plan this relates to",
|
|
111
150
|
"title": "One-line summary",
|
|
112
151
|
"description": "Detailed explanation",
|
|
113
|
-
"suggestion": "Recommended fix"
|
|
152
|
+
"suggestion": "Recommended fix",
|
|
153
|
+
"quoted_text": "Verbatim ≤200-char snippet from the plan above"
|
|
114
154
|
}
|
|
115
155
|
]
|
|
116
156
|
}
|
|
@@ -145,7 +185,8 @@ function buildRiskJsonSchema() {
|
|
|
145
185
|
"section": "Which part of the plan this relates to",
|
|
146
186
|
"title": "One-line summary",
|
|
147
187
|
"description": "Detailed explanation",
|
|
148
|
-
"suggestion": "Recommended fix"
|
|
188
|
+
"suggestion": "Recommended fix",
|
|
189
|
+
"quoted_text": "Verbatim ≤200-char snippet from the plan above"
|
|
149
190
|
}
|
|
150
191
|
]
|
|
151
192
|
}
|
|
@@ -170,7 +211,8 @@ function buildDetailJsonSchema() {
|
|
|
170
211
|
"section": "Which part of the plan this relates to",
|
|
171
212
|
"title": "One-line summary",
|
|
172
213
|
"description": "Detailed explanation",
|
|
173
|
-
"suggestion": "Recommended fix"
|
|
214
|
+
"suggestion": "Recommended fix",
|
|
215
|
+
"quoted_text": "Verbatim ≤200-char snippet from the plan above"
|
|
174
216
|
}
|
|
175
217
|
]
|
|
176
218
|
}
|
|
@@ -185,15 +227,23 @@ If the plan is approved with no issues, use:
|
|
|
185
227
|
* Incremental review prompt for resumed reviewer sessions.
|
|
186
228
|
*
|
|
187
229
|
* The reviewer has already seen the full plan (round 1) and produced its
|
|
188
|
-
* own prior critique.
|
|
189
|
-
*
|
|
190
|
-
*
|
|
230
|
+
* own prior critique. Round 2+ prompts include both the diff (for change
|
|
231
|
+
* context) AND the full current plan text (for unambiguous quoting).
|
|
232
|
+
*
|
|
233
|
+
* **Why ship the full plan even when the model has it in session memory:**
|
|
234
|
+
* the cite-evidence block requires verbatim `quoted_text` matching against
|
|
235
|
+
* the *current* plan. Without an authoritative current-plan section, the
|
|
236
|
+
* reviewer must reconstruct from R1's full plan + every subsequent diff in
|
|
237
|
+
* its memory. That's fragile (context loss, truncation, attention to old
|
|
238
|
+
* lines). Sending the full plan eliminates the reconstruction job. Plans
|
|
239
|
+
* are typically < 10KB — the cost is marginal next to a wasted round from
|
|
240
|
+
* bad quotes.
|
|
191
241
|
*
|
|
192
|
-
*
|
|
193
|
-
* plan
|
|
194
|
-
*
|
|
242
|
+
* `planDiffOrContent` carries the diff (or, when the caller skips diffing,
|
|
243
|
+
* the full plan as a fallback). `currentPlanContent` is always the
|
|
244
|
+
* authoritative current plan.
|
|
195
245
|
*/
|
|
196
|
-
export function buildIncrementalReviewPrompt(planDiffOrContent, priorDecisions, phase = "detail", structuredOutput = false) {
|
|
246
|
+
export function buildIncrementalReviewPrompt(planDiffOrContent, currentPlanContent, priorDecisions, phase = "detail", structuredOutput = false) {
|
|
197
247
|
const instructions = phase === "direction"
|
|
198
248
|
? buildDirectionReviewInstructions()
|
|
199
249
|
: phase === "risk"
|
|
@@ -205,12 +255,19 @@ export function buildIncrementalReviewPrompt(planDiffOrContent, priorDecisions,
|
|
|
205
255
|
? buildRiskJsonSchema()
|
|
206
256
|
: buildDetailJsonSchema();
|
|
207
257
|
const isDiff = planDiffOrContent.startsWith("```diff");
|
|
258
|
+
// When the caller has a real diff: ship diff (for context) + current plan
|
|
259
|
+
// (for quoting). When `planDiffOrContent` is already the full plan
|
|
260
|
+
// (caller skipped diffing — e.g., R1 fallback path), don't duplicate.
|
|
208
261
|
const planSection = isDiff
|
|
209
262
|
? `## Plan Changes Since Last Round
|
|
210
263
|
|
|
211
|
-
The plan has been revised in response to your prior feedback. Below is what changed
|
|
264
|
+
The plan has been revised in response to your prior feedback. Below is what changed.
|
|
265
|
+
|
|
266
|
+
${planDiffOrContent}
|
|
212
267
|
|
|
213
|
-
|
|
268
|
+
## Current Plan (full text — quote from this)
|
|
269
|
+
|
|
270
|
+
${currentPlanContent}`
|
|
214
271
|
: `## Plan to Review
|
|
215
272
|
|
|
216
273
|
${planDiffOrContent}`;
|
|
@@ -220,24 +277,26 @@ ${planSection}
|
|
|
220
277
|
|
|
221
278
|
## Your Task
|
|
222
279
|
|
|
223
|
-
You are continuing the same review conversation. Your prior round's feedback
|
|
280
|
+
You are continuing the same review conversation. Your prior round's feedback is in your context — use it. The Current Plan section above is the authoritative source for quoting.
|
|
224
281
|
|
|
225
282
|
Output ONLY a single JSON object conforming to the schema below. The first character of your response must be \`{\` and the last must be \`}\`. No prose. No markdown. No code fences. No preamble or explanation. No trailing text.
|
|
226
283
|
|
|
227
284
|
Schema:
|
|
228
285
|
|
|
229
|
-
${jsonSchema}
|
|
286
|
+
${jsonSchema}
|
|
287
|
+
${CITE_EVIDENCE_BLOCK_INCREMENTAL}`;
|
|
230
288
|
}
|
|
231
289
|
return `${instructions}
|
|
232
290
|
${planSection}
|
|
233
291
|
|
|
234
292
|
## Your Task
|
|
235
293
|
|
|
236
|
-
You are continuing the same review conversation. Your prior round's feedback
|
|
294
|
+
You are continuing the same review conversation. Your prior round's feedback is in your context — use it. The Current Plan section above is the authoritative source for quoting.
|
|
237
295
|
|
|
238
296
|
Respond with a JSON object wrapped in <planpong-feedback> tags conforming to:
|
|
239
297
|
|
|
240
298
|
${jsonSchema}
|
|
299
|
+
${CITE_EVIDENCE_BLOCK_INCREMENTAL}
|
|
241
300
|
|
|
242
301
|
IMPORTANT: Wrap your JSON response in <planpong-feedback>...</planpong-feedback> tags.
|
|
243
302
|
|
|
@@ -272,7 +331,8 @@ Output ONLY a single JSON object conforming to the schema below. The first chara
|
|
|
272
331
|
|
|
273
332
|
Schema:
|
|
274
333
|
|
|
275
|
-
${jsonSchema}
|
|
334
|
+
${jsonSchema}
|
|
335
|
+
${CITE_EVIDENCE_BLOCK_FRESH}`;
|
|
276
336
|
}
|
|
277
337
|
return `${instructions}
|
|
278
338
|
## Plan to Review
|
|
@@ -284,6 +344,7 @@ ${planContent}
|
|
|
284
344
|
Respond with a JSON object wrapped in <planpong-feedback> tags. The JSON must match this schema:
|
|
285
345
|
|
|
286
346
|
${jsonSchema}
|
|
347
|
+
${CITE_EVIDENCE_BLOCK_FRESH}
|
|
287
348
|
|
|
288
349
|
IMPORTANT: Wrap your JSON response in <planpong-feedback>...</planpong-feedback> tags.
|
|
289
350
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../../src/prompts/reviewer.ts"],"names":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num<["inline", "external"]>>;
|
|
46
47
|
}, "strip", z.ZodTypeAny, {
|
|
47
48
|
planner: {
|
|
48
49
|
provider: string;
|
|
@@ -58,6 +59,7 @@ export declare const PlanpongConfigSchema: z.ZodObject<{
|
|
|
58
59
|
max_rounds: number;
|
|
59
60
|
human_in_loop: boolean;
|
|
60
61
|
revision_mode: "edits" | "full";
|
|
62
|
+
planner_mode: "external" | "inline";
|
|
61
63
|
}, {
|
|
62
64
|
planner: {
|
|
63
65
|
provider: string;
|
|
@@ -73,6 +75,7 @@ export declare const PlanpongConfigSchema: z.ZodObject<{
|
|
|
73
75
|
max_rounds?: number | undefined;
|
|
74
76
|
human_in_loop?: boolean | undefined;
|
|
75
77
|
revision_mode?: "edits" | "full" | undefined;
|
|
78
|
+
planner_mode?: "external" | "inline" | undefined;
|
|
76
79
|
}>;
|
|
77
80
|
export type ProviderConfig = z.infer<typeof ProviderConfigSchema>;
|
|
78
81
|
export type PlanpongConfig = z.infer<typeof PlanpongConfigSchema>;
|
|
@@ -16,5 +16,13 @@ export const PlanpongConfigSchema = z.object({
|
|
|
16
16
|
// kill switch — risk + detail phases use the direction-phase schema and
|
|
17
17
|
// skip the edit applier entirely.
|
|
18
18
|
revision_mode: z.enum(["edits", "full"]).default("full"),
|
|
19
|
+
// `external` (default) preserves today's behavior: `planpong_revise`
|
|
20
|
+
// sends plan + feedback to a planner provider that produces a structured
|
|
21
|
+
// revision. `inline` flips the loop: `planpong_revise` errors out, the
|
|
22
|
+
// agent that invoked /pong-review uses `planpong_record_revision` to log
|
|
23
|
+
// its own responses + advance the round after editing the plan with its
|
|
24
|
+
// own Edit/Write tools. Inline mode trades the planner's adversarial
|
|
25
|
+
// signal for the agent's full session context.
|
|
26
|
+
planner_mode: z.enum(["inline", "external"]).default("external"),
|
|
19
27
|
});
|
|
20
28
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/schemas/config.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CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,oBAAoB;IAC7B,QAAQ,EAAE,oBAAoB;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvD,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACxC,iEAAiE;IACjE,qEAAqE;IACrE,sEAAsE;IACtE,wEAAwE;IACxE,kCAAkC;IAClC,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACxD,qEAAqE;IACrE,yEAAyE;IACzE,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,qEAAqE;IACrE,+CAA+C;IAC/C,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;CACjE,CAAC,CAAC"}
|
|
@@ -6,6 +6,8 @@ export declare const FeedbackIssueSchema: z.ZodObject<{
|
|
|
6
6
|
title: z.ZodString;
|
|
7
7
|
description: z.ZodString;
|
|
8
8
|
suggestion: z.ZodString;
|
|
9
|
+
quoted_text: z.ZodOptional<z.ZodString>;
|
|
10
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
9
11
|
}, "strip", z.ZodTypeAny, {
|
|
10
12
|
id: string;
|
|
11
13
|
severity: "P1" | "P2" | "P3";
|
|
@@ -13,6 +15,8 @@ export declare const FeedbackIssueSchema: z.ZodObject<{
|
|
|
13
15
|
title: string;
|
|
14
16
|
description: string;
|
|
15
17
|
suggestion: string;
|
|
18
|
+
quoted_text?: string | undefined;
|
|
19
|
+
verified?: boolean | undefined;
|
|
16
20
|
}, {
|
|
17
21
|
id: string;
|
|
18
22
|
severity: "P1" | "P2" | "P3";
|
|
@@ -20,8 +24,23 @@ export declare const FeedbackIssueSchema: z.ZodObject<{
|
|
|
20
24
|
title: string;
|
|
21
25
|
description: string;
|
|
22
26
|
suggestion: string;
|
|
27
|
+
quoted_text?: string | undefined;
|
|
28
|
+
verified?: boolean | undefined;
|
|
23
29
|
}>;
|
|
24
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Base feedback schema for the detail phase. Includes the `blocked` verdict
|
|
32
|
+
* so fallback parsing can accept it from direction/risk phases when
|
|
33
|
+
* phase-specific parsing fails.
|
|
34
|
+
*
|
|
35
|
+
* **Production callers must NOT use `.parse()` / `.safeParse()` directly.**
|
|
36
|
+
* Always route through `parseFeedback` or `parseStructuredFeedbackForPhase`
|
|
37
|
+
* in `src/core/convergence.ts`. Those functions apply post-parse semantic
|
|
38
|
+
* coercions (e.g., `approved_with_notes` with non-P3 issues is downgraded
|
|
39
|
+
* to `needs_revision` rather than throwing). Calling the schema directly
|
|
40
|
+
* silently bypasses these coercions and reintroduces the terminal-Zod-error
|
|
41
|
+
* failure mode that the parser-side coercion is specifically there to avoid.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ReviewFeedbackSchema: z.ZodObject<{
|
|
25
44
|
verdict: z.ZodEnum<["needs_revision", "approved", "approved_with_notes", "blocked"]>;
|
|
26
45
|
summary: z.ZodString;
|
|
27
46
|
issues: z.ZodArray<z.ZodObject<{
|
|
@@ -31,6 +50,8 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31
50
|
title: z.ZodString;
|
|
32
51
|
description: z.ZodString;
|
|
33
52
|
suggestion: z.ZodString;
|
|
53
|
+
quoted_text: z.ZodOptional<z.ZodString>;
|
|
54
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
34
55
|
}, "strip", z.ZodTypeAny, {
|
|
35
56
|
id: string;
|
|
36
57
|
severity: "P1" | "P2" | "P3";
|
|
@@ -38,6 +59,8 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
38
59
|
title: string;
|
|
39
60
|
description: string;
|
|
40
61
|
suggestion: string;
|
|
62
|
+
quoted_text?: string | undefined;
|
|
63
|
+
verified?: boolean | undefined;
|
|
41
64
|
}, {
|
|
42
65
|
id: string;
|
|
43
66
|
severity: "P1" | "P2" | "P3";
|
|
@@ -45,9 +68,13 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
45
68
|
title: string;
|
|
46
69
|
description: string;
|
|
47
70
|
suggestion: string;
|
|
71
|
+
quoted_text?: string | undefined;
|
|
72
|
+
verified?: boolean | undefined;
|
|
48
73
|
}>, "many">;
|
|
49
74
|
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
50
75
|
missing_phase_fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
+
quote_compliance_warning: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
unverified_count: z.ZodOptional<z.ZodNumber>;
|
|
51
78
|
}, "strip", z.ZodTypeAny, {
|
|
52
79
|
issues: {
|
|
53
80
|
id: string;
|
|
@@ -56,11 +83,15 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
56
83
|
title: string;
|
|
57
84
|
description: string;
|
|
58
85
|
suggestion: string;
|
|
86
|
+
quoted_text?: string | undefined;
|
|
87
|
+
verified?: boolean | undefined;
|
|
59
88
|
}[];
|
|
60
89
|
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
61
90
|
summary: string;
|
|
62
91
|
fallback_used?: boolean | undefined;
|
|
63
92
|
missing_phase_fields?: string[] | undefined;
|
|
93
|
+
quote_compliance_warning?: boolean | undefined;
|
|
94
|
+
unverified_count?: number | undefined;
|
|
64
95
|
}, {
|
|
65
96
|
issues: {
|
|
66
97
|
id: string;
|
|
@@ -69,37 +100,15 @@ export declare const ReviewFeedbackSchema: z.ZodEffects<z.ZodObject<{
|
|
|
69
100
|
title: string;
|
|
70
101
|
description: string;
|
|
71
102
|
suggestion: string;
|
|
103
|
+
quoted_text?: string | undefined;
|
|
104
|
+
verified?: boolean | undefined;
|
|
72
105
|
}[];
|
|
73
106
|
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
74
107
|
summary: string;
|
|
75
108
|
fallback_used?: boolean | undefined;
|
|
76
109
|
missing_phase_fields?: string[] | undefined;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
id: string;
|
|
80
|
-
severity: "P1" | "P2" | "P3";
|
|
81
|
-
section: string;
|
|
82
|
-
title: string;
|
|
83
|
-
description: string;
|
|
84
|
-
suggestion: string;
|
|
85
|
-
}[];
|
|
86
|
-
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
87
|
-
summary: string;
|
|
88
|
-
fallback_used?: boolean | undefined;
|
|
89
|
-
missing_phase_fields?: string[] | undefined;
|
|
90
|
-
}, {
|
|
91
|
-
issues: {
|
|
92
|
-
id: string;
|
|
93
|
-
severity: "P1" | "P2" | "P3";
|
|
94
|
-
section: string;
|
|
95
|
-
title: string;
|
|
96
|
-
description: string;
|
|
97
|
-
suggestion: string;
|
|
98
|
-
}[];
|
|
99
|
-
verdict: "needs_revision" | "approved" | "approved_with_notes" | "blocked";
|
|
100
|
-
summary: string;
|
|
101
|
-
fallback_used?: boolean | undefined;
|
|
102
|
-
missing_phase_fields?: string[] | undefined;
|
|
110
|
+
quote_compliance_warning?: boolean | undefined;
|
|
111
|
+
unverified_count?: number | undefined;
|
|
103
112
|
}>;
|
|
104
113
|
export declare const AlternativeSchema: z.ZodObject<{
|
|
105
114
|
approach: z.ZodString;
|
|
@@ -121,6 +130,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
121
130
|
title: z.ZodString;
|
|
122
131
|
description: z.ZodString;
|
|
123
132
|
suggestion: z.ZodString;
|
|
133
|
+
quoted_text: z.ZodOptional<z.ZodString>;
|
|
134
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
124
135
|
}, "strip", z.ZodTypeAny, {
|
|
125
136
|
id: string;
|
|
126
137
|
severity: "P1" | "P2" | "P3";
|
|
@@ -128,6 +139,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
128
139
|
title: string;
|
|
129
140
|
description: string;
|
|
130
141
|
suggestion: string;
|
|
142
|
+
quoted_text?: string | undefined;
|
|
143
|
+
verified?: boolean | undefined;
|
|
131
144
|
}, {
|
|
132
145
|
id: string;
|
|
133
146
|
severity: "P1" | "P2" | "P3";
|
|
@@ -135,6 +148,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
135
148
|
title: string;
|
|
136
149
|
description: string;
|
|
137
150
|
suggestion: string;
|
|
151
|
+
quoted_text?: string | undefined;
|
|
152
|
+
verified?: boolean | undefined;
|
|
138
153
|
}>, "many">;
|
|
139
154
|
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
140
155
|
approach_assessment: z.ZodString;
|
|
@@ -151,6 +166,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
151
166
|
assumptions: z.ZodArray<z.ZodString, "many">;
|
|
152
167
|
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
153
168
|
missing_phase_fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
169
|
+
quote_compliance_warning: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
unverified_count: z.ZodOptional<z.ZodNumber>;
|
|
154
171
|
}, "strip", z.ZodTypeAny, {
|
|
155
172
|
issues: {
|
|
156
173
|
id: string;
|
|
@@ -159,6 +176,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
159
176
|
title: string;
|
|
160
177
|
description: string;
|
|
161
178
|
suggestion: string;
|
|
179
|
+
quoted_text?: string | undefined;
|
|
180
|
+
verified?: boolean | undefined;
|
|
162
181
|
}[];
|
|
163
182
|
verdict: "needs_revision" | "blocked";
|
|
164
183
|
summary: string;
|
|
@@ -171,6 +190,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
171
190
|
assumptions: string[];
|
|
172
191
|
fallback_used?: boolean | undefined;
|
|
173
192
|
missing_phase_fields?: string[] | undefined;
|
|
193
|
+
quote_compliance_warning?: boolean | undefined;
|
|
194
|
+
unverified_count?: number | undefined;
|
|
174
195
|
}, {
|
|
175
196
|
issues: {
|
|
176
197
|
id: string;
|
|
@@ -179,6 +200,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
179
200
|
title: string;
|
|
180
201
|
description: string;
|
|
181
202
|
suggestion: string;
|
|
203
|
+
quoted_text?: string | undefined;
|
|
204
|
+
verified?: boolean | undefined;
|
|
182
205
|
}[];
|
|
183
206
|
verdict: "needs_revision" | "blocked";
|
|
184
207
|
summary: string;
|
|
@@ -191,6 +214,8 @@ export declare const DirectionFeedbackSchema: z.ZodObject<{
|
|
|
191
214
|
assumptions: string[];
|
|
192
215
|
fallback_used?: boolean | undefined;
|
|
193
216
|
missing_phase_fields?: string[] | undefined;
|
|
217
|
+
quote_compliance_warning?: boolean | undefined;
|
|
218
|
+
unverified_count?: number | undefined;
|
|
194
219
|
}>;
|
|
195
220
|
export declare const RiskEntrySchema: z.ZodObject<{
|
|
196
221
|
id: z.ZodString;
|
|
@@ -227,6 +252,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
227
252
|
title: z.ZodString;
|
|
228
253
|
description: z.ZodString;
|
|
229
254
|
suggestion: z.ZodString;
|
|
255
|
+
quoted_text: z.ZodOptional<z.ZodString>;
|
|
256
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
230
257
|
}, "strip", z.ZodTypeAny, {
|
|
231
258
|
id: string;
|
|
232
259
|
severity: "P1" | "P2" | "P3";
|
|
@@ -234,6 +261,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
234
261
|
title: string;
|
|
235
262
|
description: string;
|
|
236
263
|
suggestion: string;
|
|
264
|
+
quoted_text?: string | undefined;
|
|
265
|
+
verified?: boolean | undefined;
|
|
237
266
|
}, {
|
|
238
267
|
id: string;
|
|
239
268
|
severity: "P1" | "P2" | "P3";
|
|
@@ -241,6 +270,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
241
270
|
title: string;
|
|
242
271
|
description: string;
|
|
243
272
|
suggestion: string;
|
|
273
|
+
quoted_text?: string | undefined;
|
|
274
|
+
verified?: boolean | undefined;
|
|
244
275
|
}>, "many">;
|
|
245
276
|
risk_level: z.ZodEnum<["high", "medium", "low"]>;
|
|
246
277
|
risks: z.ZodArray<z.ZodObject<{
|
|
@@ -270,6 +301,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
270
301
|
}>, "many">;
|
|
271
302
|
fallback_used: z.ZodOptional<z.ZodBoolean>;
|
|
272
303
|
missing_phase_fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
304
|
+
quote_compliance_warning: z.ZodOptional<z.ZodBoolean>;
|
|
305
|
+
unverified_count: z.ZodOptional<z.ZodNumber>;
|
|
273
306
|
}, "strip", z.ZodTypeAny, {
|
|
274
307
|
issues: {
|
|
275
308
|
id: string;
|
|
@@ -278,6 +311,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
278
311
|
title: string;
|
|
279
312
|
description: string;
|
|
280
313
|
suggestion: string;
|
|
314
|
+
quoted_text?: string | undefined;
|
|
315
|
+
verified?: boolean | undefined;
|
|
281
316
|
}[];
|
|
282
317
|
verdict: "needs_revision" | "blocked";
|
|
283
318
|
summary: string;
|
|
@@ -293,6 +328,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
293
328
|
}[];
|
|
294
329
|
fallback_used?: boolean | undefined;
|
|
295
330
|
missing_phase_fields?: string[] | undefined;
|
|
331
|
+
quote_compliance_warning?: boolean | undefined;
|
|
332
|
+
unverified_count?: number | undefined;
|
|
296
333
|
}, {
|
|
297
334
|
issues: {
|
|
298
335
|
id: string;
|
|
@@ -301,6 +338,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
301
338
|
title: string;
|
|
302
339
|
description: string;
|
|
303
340
|
suggestion: string;
|
|
341
|
+
quoted_text?: string | undefined;
|
|
342
|
+
verified?: boolean | undefined;
|
|
304
343
|
}[];
|
|
305
344
|
verdict: "needs_revision" | "blocked";
|
|
306
345
|
summary: string;
|
|
@@ -316,6 +355,8 @@ export declare const RiskFeedbackSchema: z.ZodObject<{
|
|
|
316
355
|
}[];
|
|
317
356
|
fallback_used?: boolean | undefined;
|
|
318
357
|
missing_phase_fields?: string[] | undefined;
|
|
358
|
+
quote_compliance_warning?: boolean | undefined;
|
|
359
|
+
unverified_count?: number | undefined;
|
|
319
360
|
}>;
|
|
320
361
|
export type FeedbackIssue = z.infer<typeof FeedbackIssueSchema>;
|
|
321
362
|
export type ReviewFeedback = z.infer<typeof ReviewFeedbackSchema>;
|