@cat-factory/agents 0.126.5 → 0.126.7
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/agents/catalog.d.ts.map +1 -1
- package/dist/agents/catalog.js +59 -3
- package/dist/agents/catalog.js.map +1 -1
- package/dist/agents/kinds/versions.d.ts +10 -1
- package/dist/agents/kinds/versions.d.ts.map +1 -1
- package/dist/agents/kinds/versions.js +19 -1
- package/dist/agents/kinds/versions.js.map +1 -1
- package/dist/agents/prompts/companion.d.ts.map +1 -1
- package/dist/agents/prompts/companion.js +15 -3
- package/dist/agents/prompts/companion.js.map +1 -1
- package/dist/agents/prompts/judge.d.ts +11 -1
- package/dist/agents/prompts/judge.d.ts.map +1 -1
- package/dist/agents/prompts/judge.js +18 -8
- package/dist/agents/prompts/judge.js.map +1 -1
- package/dist/agents/prompts/review-rounds.d.ts +45 -0
- package/dist/agents/prompts/review-rounds.d.ts.map +1 -0
- package/dist/agents/prompts/review-rounds.js +80 -0
- package/dist/agents/prompts/review-rounds.js.map +1 -0
- package/dist/agents/prompts/shared.d.ts +22 -0
- package/dist/agents/prompts/shared.d.ts.map +1 -1
- package/dist/agents/prompts/shared.js +35 -0
- package/dist/agents/prompts/shared.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAc1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAc1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AA0F5D;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAE1F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAsBR;AA4CD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAyBxF;AAwCD,8EAA8E;AAC9E,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,GAAE,sBAA2B,GAChC,MAAM,CAWR"}
|
package/dist/agents/catalog.js
CHANGED
|
@@ -9,7 +9,8 @@ import { mockFrontendSection, mockSystemPrompt } from './prompts/mock.js';
|
|
|
9
9
|
import { testingSystemPrompt, testerEnvironmentSection } from './prompts/testing.js';
|
|
10
10
|
import { traitGuidanceFor } from './kinds/traits.js';
|
|
11
11
|
import { roleSystemPrompt } from './prompts/roles.js';
|
|
12
|
-
import { FINAL_ANSWER_IN_REPLY, PLATFORM_IS_NOT_THE_PRODUCT } from './prompts/shared.js';
|
|
12
|
+
import { FINAL_ANSWER_IN_REPLY, PLATFORM_IS_NOT_THE_PRODUCT, REVIEW_SUMMARY_LAYOUT, } from './prompts/shared.js';
|
|
13
|
+
import { PRIOR_ROUNDS_DIRECTIVE, renderPriorReviewRounds } from './prompts/review-rounds.js';
|
|
13
14
|
import { customTaskTypeSection, environmentSection, initiativePresetSection, involvedServicesSection, linkedContextSection, ownServiceSection, phaseForKind, renderStandardUserPrompt, standardSystemPrompt, testSecretsSection, } from './prompts/standard.js';
|
|
14
15
|
// Prompt construction for the built-in agent kinds: turns an agent kind + block
|
|
15
16
|
// context into the system/user prompts handed to the LLM. This file is the
|
|
@@ -25,8 +26,19 @@ import { customTaskTypeSection, environmentSection, initiativePresetSection, inv
|
|
|
25
26
|
* track prompt. That difference is invisible from the outside and is exactly the trap: an
|
|
26
27
|
* override replaces the track prompt, so for a built-in kind it silently takes the inline copy
|
|
27
28
|
* with it. See {@link restoreShippedInvariants}.
|
|
29
|
+
*
|
|
30
|
+
* {@link REVIEW_SUMMARY_LAYOUT} belongs here for the same reason the final-answer rule does: it is
|
|
31
|
+
* a fact about how the platform READS a reviewer's reply, not editorial content. The `summary` it
|
|
32
|
+
* shapes is rendered as markdown blocks in the run panel, and the escaping sentence it carries is
|
|
33
|
+
* what keeps a multi-line verdict from arriving as invalid JSON. A workspace that edits its
|
|
34
|
+
* reviewer prompt for an unrelated reason would otherwise send every later verdict back to one
|
|
35
|
+
* unskimmable paragraph, with nothing in the editor saying why.
|
|
28
36
|
*/
|
|
29
|
-
const OVERRIDE_PRESERVED_FRAGMENTS = [
|
|
37
|
+
const OVERRIDE_PRESERVED_FRAGMENTS = [
|
|
38
|
+
READ_ONLY_GUARDRAIL,
|
|
39
|
+
FINAL_ANSWER_IN_REPLY,
|
|
40
|
+
REVIEW_SUMMARY_LAYOUT,
|
|
41
|
+
];
|
|
30
42
|
/**
|
|
31
43
|
* Re-append any invariant the SHIPPED prompt for this kind guaranteed and the overridden
|
|
32
44
|
* composition now lacks.
|
|
@@ -235,7 +247,51 @@ export function userPromptFor(context, registry, opts = {}) {
|
|
|
235
247
|
// "respond with ONLY a JSON object" is the shape), and both wrappers append. Folded in earlier,
|
|
236
248
|
// a revision re-run would end on the reviewer's feedback and an inline run on a context-file
|
|
237
249
|
// dump, leaving the reply-shape instruction buried mid-prompt.
|
|
238
|
-
return withSuffix(withInjectedContext(withRevision(prompt, context), context, opts), suffix);
|
|
250
|
+
return withSuffix(withInjectedContext(withPriorReview(withRevision(prompt, context), context), context, opts), suffix);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Append the rounds this step's companion loop has already been through.
|
|
254
|
+
*
|
|
255
|
+
* ONE site, deliberately, and it is what makes the memory arrive for every companion rather than
|
|
256
|
+
* for whichever one somebody wired: `userPromptFor` is the single prompt assembly both surfaces
|
|
257
|
+
* go through, so an inline companion (`architect-companion`, `spec-companion`), a
|
|
258
|
+
* container-backed one (`reviewer`, `doc-reviewer`) and a companion a DEPLOYMENT registered all
|
|
259
|
+
* receive it on the same terms, as does the producer being reworked.
|
|
260
|
+
*
|
|
261
|
+
* Applied AFTER {@link withRevision} so a producer reads the current round's asks first (that is
|
|
262
|
+
* the work) and the older rounds after it (that is the thing not to regress on). `context.role`
|
|
263
|
+
* decides the framing, since the two sides need opposite instructions from the same data.
|
|
264
|
+
*/
|
|
265
|
+
function withPriorReview(prompt, context) {
|
|
266
|
+
const prior = context.priorReview;
|
|
267
|
+
if (!prior?.rounds.length)
|
|
268
|
+
return prompt;
|
|
269
|
+
const grading = prior.role === 'grader';
|
|
270
|
+
const lines = [
|
|
271
|
+
prompt,
|
|
272
|
+
'',
|
|
273
|
+
grading
|
|
274
|
+
? `You have already reviewed earlier revisions of this work ${prior.rounds.length} time(s), ` +
|
|
275
|
+
`against a bar of ${prior.threshold.toFixed(2)}. Your own previous verdicts:`
|
|
276
|
+
: `This work has been through ${prior.rounds.length} review round(s) before the feedback ` +
|
|
277
|
+
`above. Everything previously raised, so you do not undo a fix or drop an open point:`,
|
|
278
|
+
...renderPriorReviewRounds(prior.rounds),
|
|
279
|
+
'',
|
|
280
|
+
grading
|
|
281
|
+
? PRIOR_ROUNDS_DIRECTIVE
|
|
282
|
+
: 'Keep every earlier point that was already addressed addressed. Where an earlier point ' +
|
|
283
|
+
'is still open, deal with it in this revision too, not only the feedback above.',
|
|
284
|
+
];
|
|
285
|
+
// How much rope is left, stated to the GRADER only. A producer told "this is the last round"
|
|
286
|
+
// optimises for the grader rather than for the work; a grader that knows it is holding the run
|
|
287
|
+
// has the context to weigh a marginal call, which is the call this loop keeps getting wrong.
|
|
288
|
+
if (grading) {
|
|
289
|
+
lines.push(prior.roundsRemaining > 0
|
|
290
|
+
? `${prior.roundsRemaining} automatic rework round(s) remain after this one.`
|
|
291
|
+
: 'This is the LAST automatic round: below the bar, the run stops for a person or ' +
|
|
292
|
+
"proceeds on this work under the run's risk policy. Rate what is actually there.");
|
|
293
|
+
}
|
|
294
|
+
return lines.join('\n');
|
|
239
295
|
}
|
|
240
296
|
/** Append a kind's closing task instructions ({@link buildBaseUserPrompt}'s `suffix`), if any. */
|
|
241
297
|
function withSuffix(prompt, suffix) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,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QAAQ,CAAC,SAAS,4CAA4C,CACvE,CAAA;QACH,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -83,7 +83,7 @@ export declare const PROMPT_VERSIONS: {
|
|
|
83
83
|
};
|
|
84
84
|
readonly judge: {
|
|
85
85
|
readonly id: 'judge';
|
|
86
|
-
readonly version:
|
|
86
|
+
readonly version: 2;
|
|
87
87
|
readonly text: string;
|
|
88
88
|
};
|
|
89
89
|
};
|
|
@@ -95,6 +95,15 @@ export type PromptId = keyof typeof PROMPT_VERSIONS;
|
|
|
95
95
|
* supplies it — the same two-step resolution {@link promptVersionForKind} does, hoisted out so
|
|
96
96
|
* a caller that wants the `id@vN` LABEL (the prompt editor, naming the shipped revision an
|
|
97
97
|
* override was forked from) doesn't have to re-derive the id from a bare version number.
|
|
98
|
+
*
|
|
99
|
+
* A COMPANION resolves to no id, and that exclusion is load-bearing rather than tidy-up:
|
|
100
|
+
* `baseSystemPromptFor` gives every companion the shared COMPANION prompt, which wins over any
|
|
101
|
+
* built-in track, so the `reviewer` (the one companion that is also listed in the standard-phase
|
|
102
|
+
* map, under `review`) does not send the `review` prompt at all. Answering `review@vN` for it named
|
|
103
|
+
* a revision of TEXT IT NEVER RUNS: the editor showed that label as the baseline an override was
|
|
104
|
+
* forked from, and a Kaizen combo re-keyed on edits to a prompt the step never saw while ignoring
|
|
105
|
+
* edits to the one it did. The companion prompt is not under version control (it is composed per
|
|
106
|
+
* kind, from the pairing's own `reviews` label), so "no number" is the honest answer until it is.
|
|
98
107
|
*/
|
|
99
108
|
export declare function promptIdForKind(kind: string): PromptId | undefined;
|
|
100
109
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/versions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/versions.ts"],"names":[],"mappings":"AA8BA,+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AAE,CAAC;iBAAE,IAAI;;CACY,CAAA;AAEpD,0DAA0D;AAC1D,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,eAAe,CAAA;AAyBnD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAMlE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED,8CAA8C;AAC9C,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG,eAAe,CAE3D;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGvE"}
|
|
@@ -6,6 +6,7 @@ import { KAIZEN_SYSTEM_PROMPT } from '../prompts/kaizen.js';
|
|
|
6
6
|
import { FORK_PROPOSER_SYSTEM_PROMPT } from './fork-proposer.js';
|
|
7
7
|
import { FORK_CHAT_SYSTEM_PROMPT } from '../prompts/fork-decision.js';
|
|
8
8
|
import { JUDGE_SYSTEM_PROMPT } from '../prompts/judge.js';
|
|
9
|
+
import { isCompanionKind } from './companions.js';
|
|
9
10
|
import { SPEC_WRITER_SYSTEM_PROMPT } from './spec-blueprints.js';
|
|
10
11
|
/** The currently-shipping version of each numbered prompt. */
|
|
11
12
|
export const PROMPT_VERSIONS = {
|
|
@@ -57,7 +58,13 @@ export const PROMPT_VERSIONS = {
|
|
|
57
58
|
kaizen: { id: 'kaizen', version: 1, text: KAIZEN_SYSTEM_PROMPT },
|
|
58
59
|
'fork-proposer': { id: 'fork-proposer', version: 1, text: FORK_PROPOSER_SYSTEM_PROMPT },
|
|
59
60
|
'fork-chat': { id: 'fork-chat', version: 1, text: FORK_CHAT_SYSTEM_PROMPT },
|
|
60
|
-
|
|
61
|
+
// v2: the summary is now rendered as markdown beside the `findings` list, so the prompt asks for
|
|
62
|
+
// a short whole-verdict paragraph that does NOT restate the findings. Scoring is untouched.
|
|
63
|
+
//
|
|
64
|
+
// The number is the shipped prompt's IDENTITY (what a benchmark cell and the sandbox baseline
|
|
65
|
+
// label attribute an outcome to); it does not re-key a Kaizen combo, because a judge is attached
|
|
66
|
+
// to a step and is never a step's own `agentKind`, which is what `promptVersionForKind` reads.
|
|
67
|
+
judge: { id: 'judge', version: 2, text: JUDGE_SYSTEM_PROMPT },
|
|
61
68
|
};
|
|
62
69
|
/**
|
|
63
70
|
* The versioned prompt id for each STANDARD PHASE that is under version control. The
|
|
@@ -86,11 +93,22 @@ const NON_PHASE_PROMPT_IDS = {
|
|
|
86
93
|
* supplies it — the same two-step resolution {@link promptVersionForKind} does, hoisted out so
|
|
87
94
|
* a caller that wants the `id@vN` LABEL (the prompt editor, naming the shipped revision an
|
|
88
95
|
* override was forked from) doesn't have to re-derive the id from a bare version number.
|
|
96
|
+
*
|
|
97
|
+
* A COMPANION resolves to no id, and that exclusion is load-bearing rather than tidy-up:
|
|
98
|
+
* `baseSystemPromptFor` gives every companion the shared COMPANION prompt, which wins over any
|
|
99
|
+
* built-in track, so the `reviewer` (the one companion that is also listed in the standard-phase
|
|
100
|
+
* map, under `review`) does not send the `review` prompt at all. Answering `review@vN` for it named
|
|
101
|
+
* a revision of TEXT IT NEVER RUNS: the editor showed that label as the baseline an override was
|
|
102
|
+
* forked from, and a Kaizen combo re-keyed on edits to a prompt the step never saw while ignoring
|
|
103
|
+
* edits to the one it did. The companion prompt is not under version control (it is composed per
|
|
104
|
+
* kind, from the pairing's own `reviews` label), so "no number" is the honest answer until it is.
|
|
89
105
|
*/
|
|
90
106
|
export function promptIdForKind(kind) {
|
|
91
107
|
const direct = NON_PHASE_PROMPT_IDS[kind];
|
|
92
108
|
if (direct)
|
|
93
109
|
return direct;
|
|
110
|
+
if (isCompanionKind(kind))
|
|
111
|
+
return undefined;
|
|
94
112
|
const phase = phaseForKind(kind);
|
|
95
113
|
return phase ? PHASE_PROMPT_IDS[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,CAAA;IACzB,IAAI,eAAe,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAC3C,MAAM,KAAK,GAAG,YAAY,CAAC,IAA0C,CAAC,CAAA;IACtE,OAAO,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACpD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA;IAChC,OAAO,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7C,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,aAAa,CAAC,EAAY;IACxC,OAAO,eAAe,CAAC,EAAE,CAAC,CAAA;AAC5B,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,kBAAkB,CAAC,EAAU,EAAE,OAAgB;IAC7D,MAAM,CAAC,GAAG,OAAO,IAAI,CAAC,EAAE,IAAI,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,EAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1F,OAAO,GAAG,EAAE,KAAK,CAAC,EAAE,CAAA;AACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/companion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"companion.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/companion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAa7D,2FAA2F;AAC3F,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,iBAAiB,GAC1B,MAAM,GAAG,SAAS,CA8GpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { companionFor, isContainerBackedCompanion } from '../kinds/companions.js';
|
|
2
|
-
import { FINAL_ANSWER_IN_REPLY, FRAGMENT_ADHERENCE_GUIDANCE } from './shared.js';
|
|
2
|
+
import { FINAL_ANSWER_IN_REPLY, FRAGMENT_ADHERENCE_GUIDANCE, REVIEW_SUMMARY_LAYOUT, } from './shared.js';
|
|
3
|
+
import { anchoredQualityScale } from './review-rounds.js';
|
|
3
4
|
// System prompt for a companion agent, parameterised by the producer kind it
|
|
4
5
|
// reviews. The companion returns a single overall quality rating (0..1) plus prose
|
|
5
6
|
// feedback and optional per-item challenges, all as JSON the engine validates with
|
|
@@ -14,8 +15,14 @@ export function companionSystemPrompt(kind, registry) {
|
|
|
14
15
|
`preceding ${def.targets.join(' / ')} step. Challenge it hard for correctness, quality,`,
|
|
15
16
|
'completeness and risk: call out gaps, missing cases, weak or untestable points, and',
|
|
16
17
|
'anything that would block confident downstream work. Then give a SINGLE overall quality',
|
|
17
|
-
'rating between 0 and 1
|
|
18
|
-
'
|
|
18
|
+
'rating between 0 and 1. Be a fair but demanding critic: do not rubber-stamp, and do not',
|
|
19
|
+
'hunt for something to say when the work is sound.',
|
|
20
|
+
'',
|
|
21
|
+
// The SAME anchors the judge bucket scores on. Unanchored, "rate this 0..1" produces a
|
|
22
|
+
// number drawn from the model's priors rather than from the work, which is what made a
|
|
23
|
+
// rework loop's scores wander instead of climb: the step's `threshold` can only mean
|
|
24
|
+
// something if two consecutive rounds mean the same thing by 0.8.
|
|
25
|
+
anchoredQualityScale('the standard for this deliverable'),
|
|
19
26
|
// A container-backed companion gets a real, read-only checkout of the producer's PR
|
|
20
27
|
// branch. Reviewing the producer's summary reply alone is worthless — judge the ACTUAL
|
|
21
28
|
// artifact: open and read the changed files / the full committed document and whatever
|
|
@@ -101,6 +108,11 @@ export function companionSystemPrompt(kind, registry) {
|
|
|
101
108
|
// below. Only the code `reviewer` does this; the other companions review different artifacts.
|
|
102
109
|
...(kind === 'reviewer' ? ['Include a `fragmentAdherence` array as described below.'] : []),
|
|
103
110
|
'No prose outside the JSON, no code fences.',
|
|
111
|
+
// `summary` is the whole review as far as a human is concerned: `comments` only exist when
|
|
112
|
+
// the graded output has ids to anchor to, and nothing else on the step carries the findings.
|
|
113
|
+
// So the shape of that one string is the shape of the review, and it gets said here.
|
|
114
|
+
'',
|
|
115
|
+
REVIEW_SUMMARY_LAYOUT,
|
|
104
116
|
...(kind === 'reviewer' ? ['', FRAGMENT_ADHERENCE_GUIDANCE] : []),
|
|
105
117
|
'',
|
|
106
118
|
FINAL_ANSWER_IN_REPLY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companion.js","sourceRoot":"","sources":["../../../src/agents/prompts/companion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAEjF,OAAO,
|
|
1
|
+
{"version":3,"file":"companion.js","sourceRoot":"","sources":["../../../src/agents/prompts/companion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAEjF,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,6EAA6E;AAC7E,mFAAmF;AACnF,mFAAmF;AACnF,+BAA+B;AAE/B,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CACnC,IAAe,EACf,QAA2B;IAE3B,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IACxC,IAAI,CA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D;gBACxD,kFAAkF;gBAClF,kFAAkF;gBAClF,0DAA0D;gBAC1D,EAAE;gBACF,mFAAmF;gBACnF,qFAAqF;gBACrF,mFAAmF;gBACnF,sEAAsE;gBACtE,8EAA8E;gBAC9E,kFAAkF;gBAClF,sFAAsF;gBACtF,kFAAkF;gBAClF,sFAAsF;gBACtF,qFAAqF;gBACrF,+EAA+E;aAChF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,EAAE;QACF,0CAA0C;QAC1C,wFAAwF;QACxF,0FAA0F;QAC1F,oFAAoF;QACpF,oFAAoF;QACpF,GAAG,CAAC,IAAI,KAAK,gBAAgB;YAC3B,CAAC,CAAC,CAAC,kEAAkE,CAAC;YACtE,CAAC,CAAC,EAAE,CAAC;QACP,2FAA2F;QAC3F,4FAA4F;QAC5F,8FAA8F;QAC9F,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,yDAAyD,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3F,4CAA4C;QAC5C,2FAA2F;QAC3F,6FAA6F;QAC7F,qFAAqF;QACrF,EAAE;QACF,qBAAqB;QACrB,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,EAAE;QACF,qBAAqB;KACtB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
|
|
@@ -7,7 +7,17 @@ import type { JudgeSubject } from '@cat-factory/kernel';
|
|
|
7
7
|
*
|
|
8
8
|
* The scale is stated explicitly and anchored, because an unanchored 0..1 score is the one
|
|
9
9
|
* thing that makes thresholds meaningless across rubrics: two judges must mean the same thing
|
|
10
|
-
* by `0.7` or a workspace cannot set one number in its merge preset.
|
|
10
|
+
* by `0.7` or a workspace cannot set one number in its merge preset. It comes from
|
|
11
|
+
* {@link anchoredQualityScale}, SHARED with the companion prompt, because the same argument
|
|
12
|
+
* holds across the two grading buckets and not merely across rubrics.
|
|
13
|
+
*
|
|
14
|
+
* It deliberately does NOT carry `REVIEW_SUMMARY_LAYOUT`, which asks a reviewer to lay its
|
|
15
|
+
* `summary` out as grouped bullets. A judge already returns its points as `findings`, and
|
|
16
|
+
* `JudgeResultView` renders that array as its own list directly below the summary — so the layout
|
|
17
|
+
* would have every point written twice, in two orderings that can disagree. The same reasoning
|
|
18
|
+
* excludes the `pr-reviewer` and the tester; the fragment is for a reviewer whose one string IS
|
|
19
|
+
* the whole review (the companions). What the judge needs is the RENDER half, which it has: the
|
|
20
|
+
* summary goes through the same markdown reader, so a short verdict paragraph reads properly.
|
|
11
21
|
*/
|
|
12
22
|
export declare const JUDGE_SYSTEM_PROMPT: string;
|
|
13
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"judge.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/judge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"judge.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/judge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAwBvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mBAAmB,QAgBT,CAAA;AAcvB;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAkC/D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FINAL_ANSWER_IN_REPLY } from './shared.js';
|
|
2
|
+
import { anchoredQualityScale, PRIOR_ROUNDS_DIRECTIVE } from './review-rounds.js';
|
|
2
3
|
// ---------------------------------------------------------------------------
|
|
3
4
|
// The JUDGE assessment prompt — the inline LLM call behind the fourth step-taxonomy bucket
|
|
4
5
|
// (see `docs/initiatives/judge-registry.md`).
|
|
@@ -25,7 +26,17 @@ import { FINAL_ANSWER_IN_REPLY } from './shared.js';
|
|
|
25
26
|
*
|
|
26
27
|
* The scale is stated explicitly and anchored, because an unanchored 0..1 score is the one
|
|
27
28
|
* thing that makes thresholds meaningless across rubrics: two judges must mean the same thing
|
|
28
|
-
* by `0.7` or a workspace cannot set one number in its merge preset.
|
|
29
|
+
* by `0.7` or a workspace cannot set one number in its merge preset. It comes from
|
|
30
|
+
* {@link anchoredQualityScale}, SHARED with the companion prompt, because the same argument
|
|
31
|
+
* holds across the two grading buckets and not merely across rubrics.
|
|
32
|
+
*
|
|
33
|
+
* It deliberately does NOT carry `REVIEW_SUMMARY_LAYOUT`, which asks a reviewer to lay its
|
|
34
|
+
* `summary` out as grouped bullets. A judge already returns its points as `findings`, and
|
|
35
|
+
* `JudgeResultView` renders that array as its own list directly below the summary — so the layout
|
|
36
|
+
* would have every point written twice, in two orderings that can disagree. The same reasoning
|
|
37
|
+
* excludes the `pr-reviewer` and the tester; the fragment is for a reviewer whose one string IS
|
|
38
|
+
* the whole review (the companions). What the judge needs is the RENDER half, which it has: the
|
|
39
|
+
* summary goes through the same markdown reader, so a short verdict paragraph reads properly.
|
|
29
40
|
*/
|
|
30
41
|
export const JUDGE_SYSTEM_PROMPT = 'You are an impartial reviewer scoring a piece of work against a RUBRIC you are given. You ' +
|
|
31
42
|
'assess only — you never edit code, never open pull requests, and never decide what happens ' +
|
|
@@ -34,14 +45,14 @@ export const JUDGE_SYSTEM_PROMPT = 'You are an impartial reviewer scoring a piec
|
|
|
34
45
|
'that satisfies or violates the rubric, and never invent a problem you cannot point at. If ' +
|
|
35
46
|
'the evidence is too thin to judge a rubric point, say so in the summary rather than ' +
|
|
36
47
|
'guessing — an unverifiable concern is a finding of its own, not a low score in disguise. ' +
|
|
37
|
-
'
|
|
38
|
-
'0.8 meets it with minor, non-blocking nits; 0.6 has a real gap a reviewer would ask about; ' +
|
|
39
|
-
'0.4 clearly violates the rubric in a way that should be fixed before merge; 0.2 or below ' +
|
|
40
|
-
'ignores the rubric or does something the rubric forbids. Reply with ONLY a JSON object of ' +
|
|
48
|
+
`${anchoredQualityScale('the rubric')} Reply with ONLY a JSON object of ` +
|
|
41
49
|
'the shape {"score": number 0..1, "summary": string, "findings": [{"title": string, ' +
|
|
42
50
|
'"detail": string, "severity": "low"|"medium"|"high"|"critical", "where": string}]} — no ' +
|
|
43
51
|
'prose around it, no code fences. Report `findings` for everything that pulled the score ' +
|
|
44
|
-
'below 1.0, worst first; return an empty array when the work is clean. ' +
|
|
52
|
+
'below 1.0, worst first; return an empty array when the work is clean. Keep `summary` to a ' +
|
|
53
|
+
'few sentences on the verdict as a whole — what the work is, what holds it back, what would ' +
|
|
54
|
+
'raise the score — and do NOT restate the findings there: they are shown to the reader as ' +
|
|
55
|
+
'their own list beside it. ' +
|
|
45
56
|
FINAL_ANSWER_IN_REPLY;
|
|
46
57
|
/** Trim + cap one prior step's output so a long transcript can't blow the assessment prompt. */
|
|
47
58
|
const MAX_PRIOR_OUTPUT_CHARS = 6_000;
|
|
@@ -92,8 +103,7 @@ export function renderJudgePrompt(subject) {
|
|
|
92
103
|
for (const f of previous.findings ?? []) {
|
|
93
104
|
lines.push(`- [${f.severity}] ${f.title}${f.detail ? ` — ${f.detail}` : ''}`);
|
|
94
105
|
}
|
|
95
|
-
lines.push('',
|
|
96
|
-
'whether it was addressed.', '');
|
|
106
|
+
lines.push('', PRIOR_ROUNDS_DIRECTIVE, '');
|
|
97
107
|
}
|
|
98
108
|
lines.push(`Score this work against the "${subject.rubricName}" rubric and reply with the JSON object.`);
|
|
99
109
|
return lines.join('\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"judge.js","sourceRoot":"","sources":["../../../src/agents/prompts/judge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"judge.js","sourceRoot":"","sources":["../../../src/agents/prompts/judge.ts"],"names":[],"mappings":"AACA,OAAO,E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,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAC/E,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,sBAAsB,EAAE,EAAE,CAAC,CAAA;IAC5C,CAAC;IACD,KAAK,CAAC,IAAI,CACR,gCAAgC,OAAO,CAAC,UAAU,0CAA0C,CAC7F,CAAA;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** One already-settled round of a grading loop, as a prompt renders it. */
|
|
2
|
+
export interface PriorReviewRound {
|
|
3
|
+
/** 1-based, in the order they happened. */
|
|
4
|
+
round: number;
|
|
5
|
+
rating: number;
|
|
6
|
+
passed: boolean;
|
|
7
|
+
summary: string;
|
|
8
|
+
comments?: {
|
|
9
|
+
quotedSource?: string;
|
|
10
|
+
body: string;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The anchored 0..1 scale every grader in this repo scores on.
|
|
15
|
+
*
|
|
16
|
+
* An UNANCHORED 0..1 score is the single thing that makes a threshold meaningless: asked for "a
|
|
17
|
+
* quality rating" with no scale, a model hovers wherever its priors sit, and the number moves
|
|
18
|
+
* between runs on identical work. Anchoring is also what lets the same `0.8` be a bar for a code
|
|
19
|
+
* reviewer, a design companion and a rubric judge at once.
|
|
20
|
+
*
|
|
21
|
+
* `subject` names what the work is being measured against, so the same anchors read naturally for
|
|
22
|
+
* a rubric ("the rubric") and for a deliverable ("the standard for this deliverable"). The ANCHOR
|
|
23
|
+
* POINTS are the shared part and must not be varied per caller: that is the whole contract.
|
|
24
|
+
*/
|
|
25
|
+
export declare function anchoredQualityScale(subject: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* What a grader is told to do with its own previous rounds.
|
|
28
|
+
*
|
|
29
|
+
* "State plainly for each" is the load-bearing half. A grader merely SHOWN its history still tends
|
|
30
|
+
* to re-review from scratch and spend the round's attention on a fresh subset of problems, which
|
|
31
|
+
* is what produces a score that wanders up and down while the work improves. Being made to
|
|
32
|
+
* account for each earlier ask converts the round into a delta, and makes a score that moved the
|
|
33
|
+
* wrong way something the grader has to justify rather than something it can emit silently.
|
|
34
|
+
*/
|
|
35
|
+
export declare const PRIOR_ROUNDS_DIRECTIVE: string;
|
|
36
|
+
/**
|
|
37
|
+
* Render a grading loop's settled rounds, oldest first.
|
|
38
|
+
*
|
|
39
|
+
* The most recent round is the one whose asks are most likely still open, so it keeps far more of
|
|
40
|
+
* its prose than the rest; every earlier one is still NAMED, because a point raised in round 1 and
|
|
41
|
+
* quietly dropped by round 3 is exactly the regression this exists to catch. A trimmed round says
|
|
42
|
+
* so inline rather than ending mid-sentence, so nothing reads as a grader that had little to say.
|
|
43
|
+
*/
|
|
44
|
+
export declare function renderPriorReviewRounds(rounds: readonly PriorReviewRound[]): string[];
|
|
45
|
+
//# sourceMappingURL=review-rounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-rounds.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/review-rounds.ts"],"names":[],"mappings":"AAgBA,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACrD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,QAKI,CAAA;AAMvC;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,EAAE,CAiBrF"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// What a REPEATED grading loop says to itself, in one place.
|
|
3
|
+
//
|
|
4
|
+
// Two buckets of the step taxonomy re-grade the same artifact on a budget: JUDGES (score against
|
|
5
|
+
// a rubric, bounce the producer, re-score) and COMPANIONS (rate a producer's output, loop it back,
|
|
6
|
+
// re-rate). They differ in what they read and in the JSON they return, and in nothing that matters
|
|
7
|
+
// here — both must anchor their 0..1 score to the same meanings, and both must say what became of
|
|
8
|
+
// what they asked for last round.
|
|
9
|
+
//
|
|
10
|
+
// Keeping those two things here rather than in each prompt is what makes a threshold portable. An
|
|
11
|
+
// operator sets ONE number per policy (`judgeMinScore`, a companion step's `threshold`), and two
|
|
12
|
+
// graders that mean different things by `0.8` turn that number into noise. The rendering of the
|
|
13
|
+
// rounds themselves lives beside them for the same reason: a companion that showed its history in
|
|
14
|
+
// a different shape from the judge's would be a second thing to keep in step by hand.
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
/**
|
|
17
|
+
* The anchored 0..1 scale every grader in this repo scores on.
|
|
18
|
+
*
|
|
19
|
+
* An UNANCHORED 0..1 score is the single thing that makes a threshold meaningless: asked for "a
|
|
20
|
+
* quality rating" with no scale, a model hovers wherever its priors sit, and the number moves
|
|
21
|
+
* between runs on identical work. Anchoring is also what lets the same `0.8` be a bar for a code
|
|
22
|
+
* reviewer, a design companion and a rubric judge at once.
|
|
23
|
+
*
|
|
24
|
+
* `subject` names what the work is being measured against, so the same anchors read naturally for
|
|
25
|
+
* a rubric ("the rubric") and for a deliverable ("the standard for this deliverable"). The ANCHOR
|
|
26
|
+
* POINTS are the shared part and must not be varied per caller: that is the whole contract.
|
|
27
|
+
*/
|
|
28
|
+
export function anchoredQualityScale(subject) {
|
|
29
|
+
return (`Score on this anchored 0..1 scale: 1.0 fully meets ${subject} with nothing to raise; ` +
|
|
30
|
+
`0.8 meets it with minor, non-blocking nits; 0.6 has a real gap a reviewer would ask about; ` +
|
|
31
|
+
`0.4 clearly falls short of ${subject} in a way that should be fixed before this work goes ` +
|
|
32
|
+
`further; 0.2 or below ignores ${subject}.`);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* What a grader is told to do with its own previous rounds.
|
|
36
|
+
*
|
|
37
|
+
* "State plainly for each" is the load-bearing half. A grader merely SHOWN its history still tends
|
|
38
|
+
* to re-review from scratch and spend the round's attention on a fresh subset of problems, which
|
|
39
|
+
* is what produces a score that wanders up and down while the work improves. Being made to
|
|
40
|
+
* account for each earlier ask converts the round into a delta, and makes a score that moved the
|
|
41
|
+
* wrong way something the grader has to justify rather than something it can emit silently.
|
|
42
|
+
*/
|
|
43
|
+
export const PRIOR_ROUNDS_DIRECTIVE = 'Judge the CURRENT work on its own merits, but state plainly for each point you raised in an ' +
|
|
44
|
+
'earlier round whether it is now addressed, still open, or no longer applies. Do not re-open a ' +
|
|
45
|
+
'point you already accepted, and do not let a fresh observation displace one you have not yet ' +
|
|
46
|
+
'accounted for: a rating that moved DOWN while every earlier point was addressed needs saying ' +
|
|
47
|
+
'so explicitly, with what got worse.';
|
|
48
|
+
/** How much of one round's prose a rendering keeps. Generous for the latest, tight for the rest. */
|
|
49
|
+
const LATEST_ROUND_CHARS = 4_000;
|
|
50
|
+
const EARLIER_ROUND_CHARS = 1_200;
|
|
51
|
+
/**
|
|
52
|
+
* Render a grading loop's settled rounds, oldest first.
|
|
53
|
+
*
|
|
54
|
+
* The most recent round is the one whose asks are most likely still open, so it keeps far more of
|
|
55
|
+
* its prose than the rest; every earlier one is still NAMED, because a point raised in round 1 and
|
|
56
|
+
* quietly dropped by round 3 is exactly the regression this exists to catch. A trimmed round says
|
|
57
|
+
* so inline rather than ending mid-sentence, so nothing reads as a grader that had little to say.
|
|
58
|
+
*/
|
|
59
|
+
export function renderPriorReviewRounds(rounds) {
|
|
60
|
+
const lines = [];
|
|
61
|
+
for (const [index, round] of rounds.entries()) {
|
|
62
|
+
const isLatest = index === rounds.length - 1;
|
|
63
|
+
const verdict = round.passed ? 'met the bar' : 'did not meet the bar';
|
|
64
|
+
lines.push('', `Round ${round.round} — rated ${round.rating.toFixed(2)}, ${verdict}:`);
|
|
65
|
+
lines.push(clip(round.summary.trim() || '(no summary given)', isLatest));
|
|
66
|
+
for (const comment of round.comments ?? []) {
|
|
67
|
+
const target = comment.quotedSource?.trim();
|
|
68
|
+
lines.push(target
|
|
69
|
+
? `- On "${clip(target, false)}": ${clip(comment.body, isLatest)}`
|
|
70
|
+
: `- ${clip(comment.body, isLatest)}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return lines;
|
|
74
|
+
}
|
|
75
|
+
/** Trim one field, STATING that it was trimmed (a silent cut reads as a shorter original). */
|
|
76
|
+
function clip(text, generous) {
|
|
77
|
+
const limit = generous ? LATEST_ROUND_CHARS : EARLIER_ROUND_CHARS;
|
|
78
|
+
return text.length > limit ? `${text.slice(0, limit)}… [trimmed]` : text;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=review-rounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-rounds.js","sourceRoot":"","sources":["../../../src/agents/prompts/review-rounds.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6DAA6D;AAC7D,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,mGAAmG;AACnG,kGAAkG;AAClG,kCAAkC;AAClC,EAAE;AACF,kGAAkG;AAClG,iGAAiG;AACjG,gGAAgG;AAChG,kGAAkG;AAClG,sFAAsF;AACtF,8EAA8E;AAY9E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,CACL,sDAAsD,OAAO,0BAA0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,EAAE,QAAQ,CAAC,EAAE;gBAClE,CAAC,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CACxC,CAAA;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAED,8FAA8F;AAC9F,SAAS,IAAI,CAAC,IAAY,EAAE,QAAiB;IAC3C,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAA;IACjE,OAAO,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAA;AAC1E,CAAC"}
|
|
@@ -16,6 +16,28 @@ export declare const STANDARDS_FOOTER = "Treat every best-practice standard appe
|
|
|
16
16
|
* legitimately end with no final text, and telling them otherwise is wrong.
|
|
17
17
|
*/
|
|
18
18
|
export declare const FINAL_ANSWER_IN_REPLY: string;
|
|
19
|
+
/**
|
|
20
|
+
* Appended wherever a reviewer's `summary` field IS the review a human reads: the COMPANIONS (see
|
|
21
|
+
* ./companion), the reviewers with no other outlet, so everything they found lands in one string.
|
|
22
|
+
*
|
|
23
|
+
* Unshaped, a model writes that string as one dense paragraph that numbers its points inline
|
|
24
|
+
* ("(1) … (2) …"), and the reader cannot see what blocks the work without reading all of it.
|
|
25
|
+
* The skeleton asked for here is what the SPA renders: a verdict line, then bullet groups
|
|
26
|
+
* ordered by disposition, through the same markdown reader the other agent prose goes through.
|
|
27
|
+
* A fixed skeleton also makes two reviews of the same work comparable, which a free shape is not.
|
|
28
|
+
*
|
|
29
|
+
* NOT for a reviewer that already reports its points as STRUCTURED findings beside a short summary
|
|
30
|
+
* (every judge, the `pr-reviewer`, the tester): the view renders that array as its own list, so
|
|
31
|
+
* asking for the same points as bullets in the summary means writing the whole review twice, in two
|
|
32
|
+
* orderings that can disagree. Those surfaces need only the render half.
|
|
33
|
+
*
|
|
34
|
+
* Two sentences here are load-bearing rather than editorial, both about the summary being a JSON
|
|
35
|
+
* STRING the platform parses. A raw line break inside one is invalid JSON (kernel's `extractJson`
|
|
36
|
+
* repairs it, but a reviewer that escapes correctly never costs a repair retry), and a FENCED block
|
|
37
|
+
* inside it puts a ``` pair ahead of the object in a reply whose JSON is not itself fenced, which is
|
|
38
|
+
* what `extractJson` reads first. Inline backticks carry code in a verdict perfectly well.
|
|
39
|
+
*/
|
|
40
|
+
export declare const REVIEW_SUMMARY_LAYOUT: string;
|
|
19
41
|
/**
|
|
20
42
|
* Appended to every agent that reasons about a work item WITHOUT a checkout to orient itself in —
|
|
21
43
|
* the inline reviewers and structured-dialogue agents (requirements review + rework, the Writer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/shared.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,+FACiE,CAAA;AAE9F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,QAIV,CAAA;AAExB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,QAQiD,CAAA;AAEhF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,QAQT,CAAA;AAE/B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,QAQA,CAAA;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,qBAAqB,CAAA;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,0BAA0B,CAAA;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,QASc,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAE3D;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,QAoBX,CAAA;AA2BzB,eAAO,MAAM,2BAA2B,QAOyC,CAAA;AAEjF,eAAO,MAAM,yCAAyC,QAQF,CAAA;AAEpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,QAW0C,CAAA"}
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/shared.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,+FACiE,CAAA;AAE9F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,QAIV,CAAA;AAExB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB,QAcrB,CAAA;AAEb;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,QAQiD,CAAA;AAEhF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,QAQT,CAAA;AAE/B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,QAQA,CAAA;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,qBAAqB,CAAA;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,0BAA0B,CAAA;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,QASc,CAAA;AAEjD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAE3D;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,QAoBX,CAAA;AA2BzB,eAAO,MAAM,2BAA2B,QAOyC,CAAA;AAEjF,eAAO,MAAM,yCAAyC,QAQF,CAAA;AAEpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,QAW0C,CAAA"}
|
|
@@ -22,6 +22,41 @@ export const FINAL_ANSWER_IN_REPLY = 'Your deliverable is the text of your FINAL
|
|
|
22
22
|
'visible content of that reply, NOT inside your private reasoning or thinking. A final ' +
|
|
23
23
|
'reply whose visible content is empty is treated as a failure even when your reasoning ' +
|
|
24
24
|
'contains the answer.';
|
|
25
|
+
/**
|
|
26
|
+
* Appended wherever a reviewer's `summary` field IS the review a human reads: the COMPANIONS (see
|
|
27
|
+
* ./companion), the reviewers with no other outlet, so everything they found lands in one string.
|
|
28
|
+
*
|
|
29
|
+
* Unshaped, a model writes that string as one dense paragraph that numbers its points inline
|
|
30
|
+
* ("(1) … (2) …"), and the reader cannot see what blocks the work without reading all of it.
|
|
31
|
+
* The skeleton asked for here is what the SPA renders: a verdict line, then bullet groups
|
|
32
|
+
* ordered by disposition, through the same markdown reader the other agent prose goes through.
|
|
33
|
+
* A fixed skeleton also makes two reviews of the same work comparable, which a free shape is not.
|
|
34
|
+
*
|
|
35
|
+
* NOT for a reviewer that already reports its points as STRUCTURED findings beside a short summary
|
|
36
|
+
* (every judge, the `pr-reviewer`, the tester): the view renders that array as its own list, so
|
|
37
|
+
* asking for the same points as bullets in the summary means writing the whole review twice, in two
|
|
38
|
+
* orderings that can disagree. Those surfaces need only the render half.
|
|
39
|
+
*
|
|
40
|
+
* Two sentences here are load-bearing rather than editorial, both about the summary being a JSON
|
|
41
|
+
* STRING the platform parses. A raw line break inside one is invalid JSON (kernel's `extractJson`
|
|
42
|
+
* repairs it, but a reviewer that escapes correctly never costs a repair retry), and a FENCED block
|
|
43
|
+
* inside it puts a ``` pair ahead of the object in a reply whose JSON is not itself fenced, which is
|
|
44
|
+
* what `extractJson` reads first. Inline backticks carry code in a verdict perfectly well.
|
|
45
|
+
*/
|
|
46
|
+
export const REVIEW_SUMMARY_LAYOUT = 'LAY THE SUMMARY OUT AS BLOCKS, NEVER AS ONE PARAGRAPH. It is read in a narrow panel, so a ' +
|
|
47
|
+
'dense block of prose that numbers its points inline ("(1) … (2) …") cannot be skimmed: the ' +
|
|
48
|
+
'reader cannot tell what blocks the work from what is a nit without reading all of it. Write ' +
|
|
49
|
+
'it as Markdown, in this order. FIRST one short verdict sentence on its own line: what the ' +
|
|
50
|
+
'work is, what is genuinely good about it, and what holds it back. THEN, for each group of ' +
|
|
51
|
+
'points you actually have, a bold label line (`**Must fix**`, then `**Should fix**`, then ' +
|
|
52
|
+
'`**Minor**`; skip a label you have no points for) followed by one `- ` bullet per point, ' +
|
|
53
|
+
'worst first. Each bullet starts with a bolded short title, then one or two sentences saying ' +
|
|
54
|
+
'what is wrong and the concrete change to make. Nothing else: no preamble, no closing ' +
|
|
55
|
+
'paragraph, no group for what is already fine. Keep every paragraph under four sentences, ' +
|
|
56
|
+
'leave a blank line between blocks, and put code, paths, identifiers and commands in INLINE ' +
|
|
57
|
+
'backticks — never open a fenced code block (```) inside the summary. The summary is a JSON ' +
|
|
58
|
+
'string value, so write its line breaks as \\n escapes and never as raw line breaks inside ' +
|
|
59
|
+
'the JSON.';
|
|
25
60
|
/**
|
|
26
61
|
* Appended to every agent that reasons about a work item WITHOUT a checkout to orient itself in —
|
|
27
62
|
* the inline reviewers and structured-dialogue agents (requirements review + rework, the Writer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/agents/prompts/shared.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,kFAAkF;AAClF,4DAA4D;AAE5D;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,4FAA4F,CAAA;AAE9F;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,oFAAoF;IACpF,wFAAwF;IACxF,wFAAwF;IACxF,sBAAsB,CAAA;AAExB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,+FAA+F;IAC/F,gGAAgG;IAChG,iGAAiG;IACjG,8FAA8F;IAC9F,6FAA6F;IAC7F,gGAAgG;IAChG,gGAAgG;IAChG,8EAA8E,CAAA;AAEhF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,2BAA2B,GACtC,wFAAwF;IACxF,+FAA+F;IAC/F,4FAA4F;IAC5F,4FAA4F;IAC5F,gGAAgG;IAChG,4FAA4F;IAC5F,6FAA6F;IAC7F,6BAA6B,CAAA;AAE/B;;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F,iFAAiF;IACjF,+FAA+F;IAC/F,gGAAgG;IAChG,YAAY,CAAA;AAEd,MAAM,CAAC,MAAM,2BAA2B,GACtC,gGAAgG;IAChG,+FAA+F;IAC/F,SAAS;IACT,+BAA+B;IAC/B,qFAAqF;IACrF,4FAA4F;IAC5F,+EAA+E,CAAA;AAEjF,MAAM,CAAC,MAAM,yCAAyC,GACpD,gGAAgG;IAChG,oGAAoG;IACpG,0FAA0F;IAC1F,oDAAoD;IACpD,+BAA+B;IAC/B,iGAAiG;IACjG,2FAA2F;IAC3F,kDAAkD,CAAA;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,oFAAoF;IACpF,uFAAuF;IACvF,wFAAwF;IACxF,8CAA8C,eAAe,qBAAqB;IAClF,kFAAkF;IAClF,iFAAiF;IACjF,oFAAoF;IACpF,yFAAyF;IACzF,uFAAuF;IACvF,yFAAyF;IACzF,uEAAuE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/agents",
|
|
3
|
-
"version": "0.126.
|
|
3
|
+
"version": "0.126.7",
|
|
4
4
|
"description": "Agent catalog, routing, prompts and fragment library for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"handlebars": "^4.7.9",
|
|
33
33
|
"p-map": "^7.0.6",
|
|
34
34
|
"valibot": "^1.4.2",
|
|
35
|
-
"@cat-factory/contracts": "0.
|
|
36
|
-
"@cat-factory/kernel": "0.
|
|
37
|
-
"@cat-factory/prompt-fragments": "1.0.
|
|
35
|
+
"@cat-factory/contracts": "0.301.0",
|
|
36
|
+
"@cat-factory/kernel": "0.292.1",
|
|
37
|
+
"@cat-factory/prompt-fragments": "1.0.62"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "7.0.2",
|
|
41
41
|
"vitest": "^4.1.10",
|
|
42
|
-
"@cat-factory/caching": "0.20.
|
|
42
|
+
"@cat-factory/caching": "0.20.7"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -b tsconfig.build.json",
|