@cat-factory/agents 0.156.2 → 0.157.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/agents/kinds/bug-fisher.d.ts +48 -0
  2. package/dist/agents/kinds/bug-fisher.d.ts.map +1 -1
  3. package/dist/agents/kinds/bug-fisher.js +149 -14
  4. package/dist/agents/kinds/bug-fisher.js.map +1 -1
  5. package/dist/agents/kinds/built-in-container.d.ts +0 -2
  6. package/dist/agents/kinds/built-in-container.d.ts.map +1 -1
  7. package/dist/agents/kinds/built-in-container.js +1 -1
  8. package/dist/agents/kinds/built-in-container.js.map +1 -1
  9. package/dist/agents/kinds/deploy-fixer.d.ts +0 -12
  10. package/dist/agents/kinds/deploy-fixer.d.ts.map +1 -1
  11. package/dist/agents/kinds/deploy-fixer.js +1 -1
  12. package/dist/agents/kinds/deploy-fixer.js.map +1 -1
  13. package/dist/agents/kinds/pr-review-context.d.ts +15 -19
  14. package/dist/agents/kinds/pr-review-context.d.ts.map +1 -1
  15. package/dist/agents/kinds/pr-review-context.js +17 -12
  16. package/dist/agents/kinds/pr-review-context.js.map +1 -1
  17. package/dist/agents/kinds/pr-reviewer.d.ts +1 -1
  18. package/dist/agents/kinds/pr-reviewer.d.ts.map +1 -1
  19. package/dist/agents/kinds/pr-reviewer.js +5 -5
  20. package/dist/agents/kinds/pr-reviewer.js.map +1 -1
  21. package/dist/agents/kinds/registry.d.ts +1 -1
  22. package/dist/agents/kinds/spec-blueprints.d.ts +1 -2
  23. package/dist/agents/kinds/spec-blueprints.d.ts.map +1 -1
  24. package/dist/agents/kinds/spec-blueprints.js +1 -1
  25. package/dist/agents/kinds/spec-blueprints.js.map +1 -1
  26. package/dist/agents/prompts/shared.d.ts +14 -0
  27. package/dist/agents/prompts/shared.d.ts.map +1 -1
  28. package/dist/agents/prompts/shared.js +20 -0
  29. package/dist/agents/prompts/shared.js.map +1 -1
  30. package/dist/agents/prompts/standard.d.ts +0 -1
  31. package/dist/agents/prompts/standard.d.ts.map +1 -1
  32. package/dist/agents/prompts/standard.js +0 -1
  33. package/dist/agents/prompts/standard.js.map +1 -1
  34. package/dist/agents/prompts/testing.d.ts +0 -2
  35. package/dist/agents/prompts/testing.d.ts.map +1 -1
  36. package/dist/agents/prompts/testing.js +0 -4
  37. package/dist/agents/prompts/testing.js.map +1 -1
  38. package/dist/foundationalServices/folder-scan.d.ts +0 -7
  39. package/dist/foundationalServices/folder-scan.d.ts.map +1 -1
  40. package/dist/foundationalServices/folder-scan.js +1 -1
  41. package/dist/foundationalServices/folder-scan.js.map +1 -1
  42. package/dist/index.d.ts +3 -3
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +3 -3
  45. package/dist/index.js.map +1 -1
  46. package/dist/providers/usage-attribution.d.ts +0 -14
  47. package/dist/providers/usage-attribution.d.ts.map +1 -1
  48. package/dist/providers/usage-attribution.js +1 -1
  49. package/dist/providers/usage-attribution.js.map +1 -1
  50. package/dist/repo-ops/readServiceSpec.d.ts +0 -17
  51. package/dist/repo-ops/readServiceSpec.d.ts.map +1 -1
  52. package/dist/repo-ops/readServiceSpec.js +1 -1
  53. package/dist/repo-ops/readServiceSpec.js.map +1 -1
  54. package/package.json +5 -5
@@ -9,6 +9,7 @@ export declare const BUG_FISHER_KIND = "bug-fisher";
9
9
  */
10
10
  export declare const bugFishing: import("./structured-output.js").StructuredOutput<{
11
11
  summary?: string | undefined;
12
+ filesRead: string[];
12
13
  findings: {
13
14
  path: string;
14
15
  line?: number | undefined;
@@ -23,6 +24,16 @@ export declare const bugFishing: import("./structured-output.js").StructuredOutp
23
24
  }[];
24
25
  }>;
25
26
  export type BugFishingOutput = ReturnType<typeof bugFishing.parse>;
27
+ /**
28
+ * The NAME the territory manifest is injected under, which is what `InjectedContextFile.path`
29
+ * takes: the harness resolves every injected file inside the run's context directory and
30
+ * `sanitizeContextFileName` strips any directory part it is handed. A path spelled with the
31
+ * directory in it therefore landed correctly and was RECORDED wrong, so the context snapshot and
32
+ * the run's own listing named `.cat-context/.cat-context/territory.md`.
33
+ */
34
+ export declare const BUG_FISHING_TERRITORY_CONTEXT_FILE = "territory.md";
35
+ /** Where the agent reads that manifest, and therefore the only spelling a prompt may use. */
36
+ export declare const BUG_FISHING_TERRITORY_CONTEXT_PATH = ".cat-context/territory.md";
26
37
  export declare const BUG_FISHER_SYSTEM_PROMPT: string;
27
38
  /**
28
39
  * Render the per-dispatch PHASE BRIEF the engine injects as a prior output: which angle this
@@ -45,6 +56,43 @@ export declare function renderBugFishingPhaseBrief(input: {
45
56
  focus?: string | null;
46
57
  /** Titles of findings earlier passes already reported, so this one does not repeat them. */
47
58
  priorFindingTitles?: readonly string[];
59
+ /**
60
+ * The territory this pass owns, on a codebase large enough to have been partitioned. Absent ⇒
61
+ * the pass fishes the whole codebase, which is what a small repository gets and what every
62
+ * expedition got before territories existed.
63
+ */
64
+ territory?: {
65
+ label: string;
66
+ roots: readonly string[];
67
+ } | null;
68
+ }): string;
69
+ /**
70
+ * Render the TERRITORY MANIFEST a pass is handed up front: the shape of the slice it owns, the
71
+ * directories inside it with their file counts, and the territories it sits beside.
72
+ *
73
+ * This is where the token saving of the whole partition actually comes from, and it is
74
+ * independent of how many passes run. Each angle is a fresh context by design, so without a
75
+ * manifest every one of them re-discovers the layout, the entry points and the package boundaries
76
+ * before it reads a body, and those discovery turns are re-sent on every later turn of the pass.
77
+ * Handed the map, a pass's FIRST body read is its first turn.
78
+ *
79
+ * The manifest is itself context, so it is SIZED: directories with counts always, individual file
80
+ * paths only while the list stays small. A map that costs a tenth of the budget it is meant to
81
+ * save is not a map, and above the threshold the file list stays in the tree, which the pass can
82
+ * `ls` on demand.
83
+ */
84
+ export declare function renderBugFishingTerritoryContext(input: {
85
+ territory: {
86
+ label: string;
87
+ roots: readonly string[];
88
+ approxTokens?: number;
89
+ };
90
+ /** Every file of the territory, in the frame the agent works in (see the engine's survey). */
91
+ files: readonly string[];
92
+ /** The labels of the other territories this expedition fishes, so the pass knows its edges. */
93
+ neighbours: readonly string[];
94
+ /** Most individual paths to list before falling back to directory counts alone. */
95
+ maxListedFiles?: number;
48
96
  }): string;
49
97
  export declare const BUG_FISHER_AGENT_KINDS: AgentKindDefinition[];
50
98
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"bug-fisher.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/bug-fisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAA+B,MAAM,wBAAwB,CAAA;AAEpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AA+B3E,eAAO,MAAM,eAAe,eAAe,CAAA;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;EAAsD,CAAA;AAE7E,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAA;AAgDlE,eAAO,MAAM,wBAAwB,QA8CO,CAAA;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,KAAK,EAAE,yBAAyB,CAAA;IAChC,wFAAwF;IACxF,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,4FAA4F;IAC5F,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACvC,GAAG,MAAM,CAqCT;AAED,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAiCvD,CAAA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAExE"}
1
+ {"version":3,"file":"bug-fisher.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/bug-fisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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F;IAC/F,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,MAAM,CA4CT;AAaD,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EA+CvD,CAAA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAExE"}
@@ -1,4 +1,7 @@
1
1
  import { bugFishingAgentOutputSchema } from '@cat-factory/contracts';
2
+ import { STANDARDS_AS_CONTEXT_FILES_GUIDANCE } from '../prompts/shared.js';
3
+ import { CONTEXT_DIR } from '../prompts/standard.js';
4
+ import { standardsAsContextFilesPreOp } from './pr-review-context.js';
2
5
  import { defineStructuredOutput } from './structured-output.js';
3
6
  import { CODE_AWARE_TRAIT, SPEC_AWARE_TRAIT } from './traits.js';
4
7
  // ---------------------------------------------------------------------------
@@ -36,6 +39,16 @@ export const BUG_FISHER_KIND = 'bug-fisher';
36
39
  * to sensible defaults rather than throwing away a pass whose other findings are fine.
37
40
  */
38
41
  export const bugFishing = defineStructuredOutput(bugFishingAgentOutputSchema);
42
+ /**
43
+ * The NAME the territory manifest is injected under, which is what `InjectedContextFile.path`
44
+ * takes: the harness resolves every injected file inside the run's context directory and
45
+ * `sanitizeContextFileName` strips any directory part it is handed. A path spelled with the
46
+ * directory in it therefore landed correctly and was RECORDED wrong, so the context snapshot and
47
+ * the run's own listing named `.cat-context/.cat-context/territory.md`.
48
+ */
49
+ export const BUG_FISHING_TERRITORY_CONTEXT_FILE = 'territory.md';
50
+ /** Where the agent reads that manifest, and therefore the only spelling a prompt may use. */
51
+ export const BUG_FISHING_TERRITORY_CONTEXT_PATH = `${CONTEXT_DIR}/${BUG_FISHING_TERRITORY_CONTEXT_FILE}`;
39
52
  /**
40
53
  * How the fisher must spend its context. Same constraint as the PR reviewer's, for the same
41
54
  * reason: an agentic loop re-sends its whole transcript every turn, so a file read into context
@@ -46,8 +59,11 @@ export const bugFishing = defineStructuredOutput(bugFishingAgentOutputSchema);
46
59
  const CONTEXT_DISCIPLINE = `
47
60
  Everything you read stays in your context for the rest of this pass and is re-sent on every later
48
61
  turn, so a large file read early costs many times what it looks like. Work accordingly:
49
- - Start from structure, not bodies: the directory layout, entry points, and \`grep -n\` for the
50
- shapes this angle is about. Read a body only once something points you at it.
62
+ - Start from structure, not bodies. When \`${BUG_FISHING_TERRITORY_CONTEXT_PATH}\` is present it is
63
+ that structure already handed to you: read it FIRST and let it point you at bodies, instead of
64
+ spending turns on \`find\`, \`ls\` and three greps to rebuild it.
65
+ - Otherwise start from the directory layout, entry points, and \`grep -n\` for the shapes this
66
+ angle is about. Read a body only once something points you at it.
51
67
  - Read RANGES, not whole files (\`sed -n '120,260p'\`, \`grep -n -C5 <pattern>\`).
52
68
  - Never re-read something you already read — it is still in your context.
53
69
  - When a lead needs deep reading, dispatch a subagent for it: its reading lands on its context,
@@ -88,7 +104,11 @@ export const BUG_FISHER_SYSTEM_PROMPT = 'You are a senior engineer on a BUG FISH
88
104
  'because of it. A human then decides which findings become fix tasks.\n' +
89
105
  'This dispatch fishes ONE ANGLE, named in the phase brief you have been given. Stay on that ' +
90
106
  'angle. If you notice something that belongs to a different angle, leave it: another pass ' +
91
- 'covers it, and a pass that wanders covers its own angle badly. The brief also lists the ' +
107
+ 'covers it, and a pass that wanders covers its own angle badly. On a large codebase the brief ' +
108
+ 'ALSO names one TERRITORY: the slice of the codebase this pass owns. Read outside it freely ' +
109
+ 'when a neighbour answers "has something else already handled this?", but REPORT only findings ' +
110
+ 'whose code lies inside it. Another pass owns the rest, and a finding outside your territory ' +
111
+ 'is dropped rather than filed twice. The brief also lists the ' +
92
112
  'findings earlier passes already reported — do NOT report the same defect again, even phrased ' +
93
113
  'differently, and say so in your summary if an earlier finding turned out to be the root ' +
94
114
  'cause of something you were about to raise.\n' +
@@ -108,8 +128,10 @@ export const BUG_FISHER_SYSTEM_PROMPT = 'You are a senior engineer on a BUG FISH
108
128
  'Return ONLY a JSON object of this exact shape:\n' +
109
129
  '{\n' +
110
130
  ' "summary": "one paragraph: what you covered under this angle and what you concluded",\n' +
131
+ ' "filesRead": ["every path you actually read during this pass, relative to your working ' +
132
+ 'directory"],\n' +
111
133
  ' "findings": [{\n' +
112
- ' "path": "repo/relative/path.ts",\n' +
134
+ ' "path": "path/relative/to/your/working/directory.ts",\n' +
113
135
  ' "line": 42,\n' +
114
136
  ' "severity": "critical | high | medium | low",\n' +
115
137
  ' "kind": "bug | logic-gap | edge-case | footgun | requirement-gap | other",\n' +
@@ -123,9 +145,38 @@ export const BUG_FISHER_SYSTEM_PROMPT = 'You are a senior engineer on a BUG FISH
123
145
  '}\n' +
124
146
  'Severity is about CONSEQUENCE, not about how interesting the finding is: `critical` means ' +
125
147
  'data loss, a security hole, or a broken core path; `low` means a real but contained problem. ' +
126
- 'Confidence is about how sure YOU are that it is real, and is yours to set honestly a ' +
148
+ 'Confidence is about how sure YOU are that it is real, and is yours to set honestly: a ' +
127
149
  'low-confidence finding that says so is useful, and a low-confidence finding reported as ' +
128
- 'certain is worse than no finding at all.';
150
+ 'certain is worse than no finding at all.\n' +
151
+ '`filesRead` is how the platform records what this expedition COVERED, so list every path you ' +
152
+ 'opened, including the ones you read and found nothing in. It is not a score and nothing ' +
153
+ 'judges you by its length: a short honest list plus an empty findings list says "this ' +
154
+ 'territory was sampled", which is what a human needs in order to know whether to run the ' +
155
+ 'angle again. Never list a file you did not open.\n' +
156
+ 'Every path you report, in `filesRead` and in a finding alike, is RELATIVE TO YOUR WORKING ' +
157
+ 'DIRECTORY, which for a service inside a monorepo is that service and not the repository root. ' +
158
+ 'The platform matches those paths against the territory it gave you, so a path in another ' +
159
+ "frame reads as a file that is not in this pass's territory.\n" +
160
+ STANDARDS_AS_CONTEXT_FILES_GUIDANCE;
161
+ /**
162
+ * Most territory roots a brief or a manifest header spells out before naming the remainder.
163
+ *
164
+ * A territory's roots are usually a directory or two, but the group of files sitting loose at a
165
+ * root owns each of those files by path, and a flat repository has many. The brief is itself
166
+ * context, so the list is bounded; the cap SAYS what it left out, because a reader who took the
167
+ * list for the whole territory would treat the rest as somebody else's ground.
168
+ */
169
+ const MAX_LISTED_ROOTS = 25;
170
+ /** The roots a brief spells out, as bullets, plus a line naming any it did not. */
171
+ function listedRoots(roots) {
172
+ const shown = roots.slice(0, MAX_LISTED_ROOTS).map((root) => `- \`${root}\``);
173
+ if (roots.length <= MAX_LISTED_ROOTS)
174
+ return shown;
175
+ return [
176
+ ...shown,
177
+ `- plus ${roots.length - MAX_LISTED_ROOTS} more paths this pass owns, not spelled out here.`,
178
+ ];
179
+ }
129
180
  /**
130
181
  * Render the per-dispatch PHASE BRIEF the engine injects as a prior output: which angle this
131
182
  * pass fishes, what it is hunting, the task's own focus, and the findings earlier passes
@@ -137,12 +188,17 @@ export const BUG_FISHER_SYSTEM_PROMPT = 'You are a senior engineer on a BUG FISH
137
188
  * than with `undefined` (contracts' `describeBugFishingPhase` is what produces one).
138
189
  */
139
190
  export function renderBugFishingPhaseBrief(input) {
140
- const { phase, position, focus, priorFindingTitles } = input;
191
+ const { phase, position, focus, priorFindingTitles, territory } = input;
141
192
  const lines = [
142
193
  `## Phase ${position.index} of ${position.total}: ${phase.title}`,
143
194
  '',
144
195
  `Goal: ${phase.goal}`,
145
196
  ];
197
+ if (territory) {
198
+ lines.push('', `Territory: ${territory.label}`, `This pass owns the paths below, and \`${BUG_FISHING_TERRITORY_CONTEXT_PATH}\` holds their shape. Read ` +
199
+ 'outside them whenever a neighbour tells you whether something is already handled, and ' +
200
+ 'report only findings whose own code lies inside them:', ...listedRoots(territory.roots));
201
+ }
146
202
  // A retired angle carries no focus text (there is no catalog entry left to take it from), and
147
203
  // an empty "What to look for" heading would read as an angle with nothing to look for.
148
204
  if (phase.focus)
@@ -157,24 +213,103 @@ export function renderBugFishingPhaseBrief(input) {
157
213
  }
158
214
  const prior = (priorFindingTitles ?? []).filter((t) => t.trim().length > 0);
159
215
  if (prior.length > 0) {
160
- lines.push('', 'Earlier phases of this expedition already reported the findings below. Do NOT report any ' +
161
- 'of them again:', ...prior.map((title) => `- ${title}`));
216
+ lines.push('', territory
217
+ ? 'Earlier phases of this expedition already reported the findings below IN THIS ' +
218
+ 'TERRITORY. Do NOT report any of them again:'
219
+ : 'Earlier phases of this expedition already reported the findings below. Do NOT report ' +
220
+ 'any of them again:', ...prior.map((title) => `- ${title}`));
162
221
  }
163
222
  else {
164
223
  lines.push('', 'No earlier phase of this expedition has reported a finding yet.');
165
224
  }
166
225
  return lines.join('\n');
167
226
  }
227
+ /**
228
+ * Render the TERRITORY MANIFEST a pass is handed up front: the shape of the slice it owns, the
229
+ * directories inside it with their file counts, and the territories it sits beside.
230
+ *
231
+ * This is where the token saving of the whole partition actually comes from, and it is
232
+ * independent of how many passes run. Each angle is a fresh context by design, so without a
233
+ * manifest every one of them re-discovers the layout, the entry points and the package boundaries
234
+ * before it reads a body, and those discovery turns are re-sent on every later turn of the pass.
235
+ * Handed the map, a pass's FIRST body read is its first turn.
236
+ *
237
+ * The manifest is itself context, so it is SIZED: directories with counts always, individual file
238
+ * paths only while the list stays small. A map that costs a tenth of the budget it is meant to
239
+ * save is not a map, and above the threshold the file list stays in the tree, which the pass can
240
+ * `ls` on demand.
241
+ */
242
+ export function renderBugFishingTerritoryContext(input) {
243
+ const { territory, files, neighbours } = input;
244
+ const maxListed = input.maxListedFiles ?? 200;
245
+ const lines = [
246
+ `# Territory: ${territory.label}`,
247
+ '',
248
+ 'This is the slice of the codebase your pass owns. It was computed by the platform from the ',
249
+ 'repository tree, not by a model, so it is a fact about the code rather than a guess. Every ',
250
+ 'path below is relative to your working directory.',
251
+ '',
252
+ `- Files: ${files.length}`,
253
+ `- Approximate size: ${territory.approxTokens ?? 0} tokens`,
254
+ '',
255
+ '## Roots',
256
+ '',
257
+ ...(territory.roots.length > 0 ? listedRoots(territory.roots) : ['- the whole codebase']),
258
+ '',
259
+ '## Directories',
260
+ '',
261
+ ];
262
+ for (const [directory, count] of directoryCounts(files)) {
263
+ lines.push(`- \`${directory}\` (${count} ${count === 1 ? 'file' : 'files'})`);
264
+ }
265
+ if (files.length <= maxListed) {
266
+ lines.push('', '## Files', '', ...files.map((file) => `- \`${file}\``));
267
+ }
268
+ else {
269
+ lines.push('', `The full file list is ${files.length} paths, too long to hand over without spending the ` +
270
+ 'context this map exists to save. The directory counts above are complete; list what you ' +
271
+ 'need with `ls` or `find` inside a directory.');
272
+ }
273
+ if (neighbours.length > 0) {
274
+ lines.push('', '## Neighbouring territories', '', 'Other passes of this expedition own these. Read into them when you need to know whether ' +
275
+ 'something is already handled, and leave their defects to them:', ...neighbours.map((label) => `- ${label}`));
276
+ }
277
+ return lines.join('\n');
278
+ }
279
+ /** Files per directory, deepest-path-first ordering removed: plain alphabetical by directory. */
280
+ function directoryCounts(files) {
281
+ const counts = new Map();
282
+ for (const file of files) {
283
+ const slash = file.lastIndexOf('/');
284
+ const directory = slash === -1 ? '.' : file.slice(0, slash);
285
+ counts.set(directory, (counts.get(directory) ?? 0) + 1);
286
+ }
287
+ return [...counts.entries()].sort(([a], [b]) => a.localeCompare(b));
288
+ }
168
289
  export const BUG_FISHER_AGENT_KINDS = [
169
290
  {
170
291
  kind: BUG_FISHER_KIND,
171
292
  systemPrompt: BUG_FISHER_SYSTEM_PROMPT,
172
- // Code-aware, so the engine folds the task's selected best-practice fragments into the
173
- // prompt: what "correct" means for this service is exactly what an expedition measures the
174
- // code against, and without the trait the task's chosen standards are silently dropped by
175
- // `AgentContextBuilder.resolveFragments`. Spec-aware for the requirements angle: the
176
- // committed specs are the other half of "what was this supposed to do".
293
+ // Code-aware, so the engine RESOLVES the task's selected best-practice fragments for this
294
+ // step: what "correct" means for this service is exactly what an expedition measures the code
295
+ // against, and without the trait the task's chosen standards are silently dropped by
296
+ // `AgentContextBuilder.resolveFragments`. Where they are then delivered is
297
+ // `standardsDelivery`, below. Spec-aware for the requirements angle: the committed specs are
298
+ // the other half of "what was this supposed to do".
177
299
  traits: [CODE_AWARE_TRAIT, SPEC_AWARE_TRAIT],
300
+ // The task's best-practice standards arrive as `.cat-context/` FILES rather than folded into
301
+ // the system prompt (the PR reviewer's precedent). A `code-aware` kind folds them by default,
302
+ // and an agentic loop re-sends its whole system prompt on every turn of every pass: across
303
+ // an expedition's passes that is the same standards text paid for dozens of times, to be read
304
+ // once. As files, a standard is read when the angle needs it.
305
+ standardsDelivery: 'context-files',
306
+ // The other half of that decision, and it is not optional: `standardsDelivery` only stops the
307
+ // engine folding the standards in. Without the op that WRITES them, a `code-aware` kind
308
+ // declaring `context-files` does not deliver its standards more cheaply, it stops delivering
309
+ // them, and the loss is invisible: the pass simply reviews against nothing. The THIRD half is
310
+ // the prompt: `STANDARDS_AS_CONTEXT_FILES_GUIDANCE` above is what tells the pass the files are
311
+ // there at all, and without it the op writes into a directory the agent never opens.
312
+ preOps: [standardsAsContextFilesPreOp],
178
313
  // Read-only FULL clone of the base branch. An expedition reads the codebase as it stands on
179
314
  // the default branch — there is no work branch, and nothing it does produces one. Full
180
315
  // history because several angles (lifecycle, concurrency, contracts) are answered by what a
@@ -1 +1 @@
1
- {"version":3,"file":"bug-fisher.js","sourceRoot":"","sources":["../../../src/agents/kinds/bug-fisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEhE,8EAA8E;AAC9E,yFAAyF;AACzF,oDAAoD;AACpD,EAAE;AACF,wFAAwF;AACxF,sFAAsF;AACtF,4FAA4F;AAC5F,0FAA0F;AAC1F,2FAA2F;AAC3F,mFAAmF;AACnF,4FAA4F;AAC5F,sEAAsE;AACtE,EAAE;AACF,qFAAqF;AACrF,8FAA8F;AAC9F,4FAA4F;AAC5F,4CAA4C;AAC5C,EAAE;AACF,4FAA4F;AAC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C;AAED,MAAM,CAAC,MAAM,sBAAsB,GAA0B;IAC3D;QACE,IAAI,EAAE,eAAe;QACrB,YAAY,EAAE,wBAAwB;QACtC,0FAA0F;QAC1F,8FAA8F;QAC9F,qFAAqF;QACrF,2EAA2E;QAC3E,6FAA6F;QAC7F,oDAAoD;QACpD,MAAM,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;QAC5C,6FAA6F;QAC7F,8FAA8F;QAC9F,2FAA2F;QAC3F,8FAA8F;QAC9F,8DAA8D;QAC9D,iBAAiB,EAAE,eAAe;QAClC,8FAA8F;QAC9F,wFAAwF;QACxF,6FAA6F;QAC7F,8FAA8F;QAC9F,+FAA+F;QAC/F,qFAAqF;QACrF,MAAM,EAAE,CAAC,4BAA4B,CAAC;QACtC,4FAA4F;QAC5F,uFAAuF;QACvF,4FAA4F;QAC5F,sDAAsD;QACtD,KAAK,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAC9E,gBAAgB,EAAE,UAAU;QAC5B,YAAY,EAAE;YACZ,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,mFAAmF;gBACnF,uFAAuF;YACzF,QAAQ,EAAE,QAAQ;YAClB,uFAAuF;YACvF,+EAA+E;YAC/E,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;YAC9B,IAAI,EAAE,cAAc;YACpB,uFAAuF;YACvF,mDAAmD;YACnD,UAAU,EAAE,aAAa;SAC1B;KACF;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAA2B;IAChE,QAAQ,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAA;AAC9C,CAAC"}
@@ -4,8 +4,6 @@ import type { AgentKindDefinition, AgentKindRegistry } from './registry.js';
4
4
  * the per-task work branch and opens the run's pull request.
5
5
  */
6
6
  export declare const IMPLEMENTER_AGENT_KIND = "coder";
7
- /** The agent kind of the read-only container agent that proposes a design after reading the repo. */
8
- export declare const ARCHITECT_AGENT_KIND = "architect";
9
7
  /** The agent kind of the read-only tech-debt auditor that reads the repo and emits a report. */
10
8
  export declare const ANALYSIS_AGENT_KIND = "analysis";
11
9
  /** The agent kind of the container agent that scores a PR for the merge decision. */
@@ -1 +1 @@
1
- {"version":3,"file":"built-in-container.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/built-in-container.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AA+B3E;;;GAGG;AACH,eAAO,MAAM,sBAAsB,UAAU,CAAA;AAE7C,qGAAqG;AACrG,eAAO,MAAM,oBAAoB,cAAc,CAAA;AAE/C,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAE7C,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,WAAW,CAAA;AAEzC;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,WAAW,CAAA;AAEzC,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,eAAe,CAAA;AAEjD,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,wBAAwB,CAAA;AAwBnE,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,EAAE,mBAAmB,EAgK/D,CAAA;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAEhF"}
1
+ {"version":3,"file":"built-in-container.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/built-in-container.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AA+B3E;;;GAGG;AACH,eAAO,MAAM,sBAAsB,UAAU,CAAA;AAK7C,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,aAAa,CAAA;AAE7C,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,WAAW,CAAA;AAEzC;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,WAAW,CAAA;AAEzC,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,eAAe,CAAA;AAEjD,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,wBAAwB,CAAA;AAwBnE,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,EAAE,mBAAmB,EAgK/D,CAAA;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAEhF"}
@@ -37,7 +37,7 @@ import { mergerResult, onCallResult, testerResult } from './built-in-results.js'
37
37
  */
38
38
  export const IMPLEMENTER_AGENT_KIND = 'coder';
39
39
  /** The agent kind of the read-only container agent that proposes a design after reading the repo. */
40
- export const ARCHITECT_AGENT_KIND = 'architect';
40
+ const ARCHITECT_AGENT_KIND = 'architect';
41
41
  /** The agent kind of the read-only tech-debt auditor that reads the repo and emits a report. */
42
42
  export const ANALYSIS_AGENT_KIND = 'analysis';
43
43
  /** The agent kind of the container agent that scores a PR for the merge decision. */
@@ -1 +1 @@
1
- {"version":3,"file":"built-in-container.js","sourceRoot":"","sources":["../../../src/agents/kinds/built-in-container.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yB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,CAAC,WAAW,CAAC,8BAA8B,CAAC,CAAA;AACtD,CAAC"}
1
+ {"version":3,"file":"built-in-container.js","sourceRoot":"","sources":["../../../src/agents/kinds/built-in-container.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGhF,8EAA8E;AAC9E,+EAA+E;AAC/E,EAAE;AACF,gGAAgG;AAChG,mFAAmF;AACnF,iGAAiG;AACjG,kGAAkG;AAClG,2FAA2F;AAC3F,sFAAsF;AACtF,EAAE;AACF,oDAAoD;AACpD,EAAE;AACF,8EAA8E;AAC9E,8FAA8F;AAC9F,8FAA8F;AAC9F,6FAA6F;AAC7F,0CAA0C;AAC1C,0FAA0F;AAC1F,iGAAiG;AACjG,yEAAyE;AACzE,gGAAgG;AAChG,2FAA2F;AAC3F,8DAA8D;AAC9D,EAAE;AACF,+FAA+F;AAC/F,+FAA+F;AAC/F,wFAAwF;AACxF,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAA;AAE7C,qGAAqG;AACrG,MAAM,oBAAoB,GAAG,WAAW,CAAA;AAExC,gGAAgG;AAChG,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAA;AAE7C,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAG,Q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AoF;QACpF,yFAAyF;QACzF,sCAAsC;QACtC,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE;YACL,OAAO,EAAE,mBAAmB;YAC5B,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,yBAAyB,EAAE;YACpE,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,IAAI;SACZ;QACD,mBAAmB,EAAE,YAAY;KAClC;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAAC,QAA2B;IACxE,QAAQ,CAAC,WAAW,CAAC,8BAA8B,CAAC,CAAA;AACtD,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { DEPLOY_FIXER_AGENT_KIND } from '@cat-factory/contracts';
2
- import type { AgentRunContext } from '@cat-factory/kernel';
3
2
  import type { AgentKindDefinition, AgentKindRegistry } from './registry.js';
4
3
  /**
5
4
  * The role half of the deploy-fixer's prompt: WHO it is and WHAT it is for.
@@ -23,17 +22,6 @@ export declare const DEPLOY_FIXER_ROLE_PROMPT: string;
23
22
  * from it entirely.
24
23
  */
25
24
  export declare const DEPLOY_FIXER_DIRECTIVES: string;
26
- /**
27
- * The deploy-fixer's task prompt: COMPACT, and leading with the deployment failure.
28
- *
29
- * Compact for the reason `conflictResolverUserPrompt` is: the generic block-context prompt renders
30
- * the full task brief plus every prior agent's output (the architect's design, the coder's account
31
- * of the feature), which buries a one-line repair role. The observed failure mode of handing a
32
- * coding agent that context is that it resumes building the feature.
33
- *
34
- * The failure brief rides `priorOutputs` tagged as the deployer's, which is whose output it is.
35
- */
36
- export declare function deployFixerUserPrompt(context: AgentRunContext): string;
37
25
  /**
38
26
  * The `agentKind` the deployment failure brief is tagged with in the fixer's `priorOutputs`. The
39
27
  * `deployer` step is what produced the failure, so it is what the entry is attributed to.
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-fixer.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/deploy-fixer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAsB3E;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAczB,CAAA;AAEZ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,QAuBxB,CAAA;AAEZ;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAStE;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,aAAa,CAAA;AAEnD,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAwBzD,CAAA;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAE1E;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
1
+ {"version":3,"file":"deploy-fixer.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/deploy-fixer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAsB3E;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAczB,CAAA;AAEZ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,QAuBxB,CAAA;AAuBZ;;;GAGG;AACH,eAAO,MAAM,yBAAyB,aAAa,CAAA;AAEnD,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAwBzD,CAAA;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAE1E;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
@@ -87,7 +87,7 @@ export const DEPLOY_FIXER_DIRECTIVES = [
87
87
  *
88
88
  * The failure brief rides `priorOutputs` tagged as the deployer's, which is whose output it is.
89
89
  */
90
- export function deployFixerUserPrompt(context) {
90
+ function deployFixerUserPrompt(context) {
91
91
  const failure = context.priorOutputs.find((o) => o.agentKind === DEPLOY_FAILURE_PRIOR_KIND);
92
92
  const description = context.block.description?.trim();
93
93
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-fixer.js","sourceRoot":"","sources":["../../../src/agents/kinds/deploy-fixer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9C,8EAA8E;AAC9E,8FAA8F;AAC9F,2EAA2E;AAC3E,EAAE;AACF,2FAA2F;AAC3F,yFAAyF;AACzF,iGAAiG;AACjG,2EAA2E;AAC3E,2FAA2F;AAC3F,gGAAgG;AAChG,4FAA4F;AAC5F,6FAA6F;AAC7F,EAAE;AACF,kGAAkG;AAClG,iGAAiG;AACjG,gGAAgG;AAChG,+EAA+E;AAC/E,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,qFAAqF;IACrF,8FAA8F;IAC9F,gGAAgG;IAChG,sBAAsB;IACtB,EAAE;IACF,8FAA8F;IAC9F,+FAA+F;IAC/F,4FAA4F;IAC5F,4DAA4D;IAC5D,EAAE;IACF,qFAAqF;IACrF,gGAAgG;IAChG,4EAA4E;CAC7E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAEZ;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,wBAAwB;IACxB,8FAA8F;IAC9F,wEAAwE;IACxE,+FAA+F;IAC/F,gGAAgG;IAChG,4DAA4D;IAC5D,gGAAgG;IAChG,0FAA0F;IAC1F,eA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F,4FAA4F;KAC7F;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAA2B;IAClE,QAAQ,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAA;AAChD,CAAC;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
@@ -10,13 +10,6 @@ export declare const PR_EXISTING_COMMENTS_CONTEXT_FILE = "pr-existing-comments.m
10
10
  * tells the reviewer it is continuing rather than starting.
11
11
  */
12
12
  export declare const PR_PRIOR_REVIEW_CONTEXT_FILE = "pr-prior-review.md";
13
- /**
14
- * Filename prefix for the per-standard context files the standards preOp writes. Re-exports the
15
- * SHARED convention (`@cat-factory/agents` `fragments.ts`) so `standardsDeliveredAsFiles` — which
16
- * decides whether to fold standards into the prompt as a fallback — recognises what this preOp
17
- * writes without knowing anything pr-review-specific.
18
- */
19
- export declare const PR_STANDARD_CONTEXT_PREFIX = "standard-";
20
13
  /** Resolve the reviewed PR's number from the block's task-type fields (prefer `prNumber`). */
21
14
  export declare function resolvePrNumber(fields: {
22
15
  prNumber?: number;
@@ -129,8 +122,6 @@ export declare function standardsContextFileName(fragmentId: string): string;
129
122
  export declare function renderStandardContext(fragment: ComposableFragment): string;
130
123
  /** Render the index that tells the reviewer which standards exist and where each one is. */
131
124
  export declare function renderStandardsIndex(fragments: ComposableFragment[]): string;
132
- /** The index file listing every injected standard (the shared `context-files` convention). */
133
- export declare const PR_STANDARDS_INDEX_CONTEXT_FILE = "standards.md";
134
125
  /**
135
126
  * PreOp for the `pr-reviewer` kind: hand the reviewer the PR's changed-file list, change shape and
136
127
  * a suggested slicing as `.cat-context/pr-diff.md` (plus the patches when the whole diff is small
@@ -147,17 +138,22 @@ export declare const prReviewerDiffPreOp: RepoOp;
147
138
  */
148
139
  export declare const prReviewerExistingCommentsPreOp: RepoOp;
149
140
  /**
150
- * PreOp for the `pr-reviewer` kind: write the task's selected best-practice standards as one
151
- * `.cat-context/standard-<id>.md` file each, plus an index.
141
+ * PreOp for any `standardsDelivery: 'context-files'` kind: write the task's selected
142
+ * best-practice standards as one `.cat-context/standard-<id>.md` file each, plus an index.
143
+ *
144
+ * KIND-NEUTRAL despite living beside the PR reviewer, which is the kind that first needed it: it
145
+ * reads nothing but the run's resolved fragments. `standardsDelivery: 'context-files'` only stops
146
+ * the ENGINE folding the standards into the system prompt, so a kind that declares it without
147
+ * pairing it with this op does not deliver its standards more cheaply, it silently stops
148
+ * delivering them.
152
149
  *
153
- * The reviewer's own prompt does NOT carry the standards (the kind declares
154
- * `standardsDelivery: 'context-files'`, so the engine skips the fold). Folding them in charged
155
- * the parent for every standard on every turn 145 KB across 5 standards on the measured run,
156
- * ~3.7M tokens over 96 turns while the agents that actually review the code, the parallel slice
157
- * subagents, never received them and worked from the parent's one-line paraphrase instead. As
158
- * files, each standard is read once by the slices it applies to, from the real text.
150
+ * Why the split is worth it: folding them charged the parent for every standard on every turn
151
+ * (145 KB across 5 standards on the measured run, ~3.7M tokens over 96 turns) while the agents
152
+ * that actually read the code never received them. As files, each standard is read once, by the
153
+ * pass it applies to, from the real text. A bug-fishing expedition is the same shape and worse:
154
+ * it re-sends its whole system prompt on every turn of every one of its passes.
159
155
  *
160
- * Pass-through when the run resolved no fragments (a review task with none selected).
156
+ * Pass-through when the run resolved no fragments (a task with none selected).
161
157
  */
162
- export declare const prReviewerStandardsPreOp: RepoOp;
158
+ export declare const standardsAsContextFilesPreOp: RepoOp;
163
159
  //# sourceMappingURL=pr-review-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr-review-context.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/pr-review-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,EAGP,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAmCjE,gGAAgG;AAChG,eAAO,MAAM,oBAAo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AgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAInE;AAED,4FAA4F;AAC5F,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAS1E;AAsFD,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAmB5E;AASD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAoBjC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAiB7C,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAc1C,CAAA"}
@@ -43,7 +43,7 @@ export const PR_PRIOR_REVIEW_CONTEXT_FILE = 'pr-prior-review.md';
43
43
  * decides whether to fold standards into the prompt as a fallback — recognises what this preOp
44
44
  * writes without knowing anything pr-review-specific.
45
45
  */
46
- export const PR_STANDARD_CONTEXT_PREFIX = STANDARDS_CONTEXT_FILE_PREFIX;
46
+ const PR_STANDARD_CONTEXT_PREFIX = STANDARDS_CONTEXT_FILE_PREFIX;
47
47
  /**
48
48
  * Total inlined-patch budget. Under it, the WHOLE diff is inlined and a small PR is reviewable
49
49
  * in one pass with no git turns at all. Over it, no patch is inlined: the reviewer slices from
@@ -654,7 +654,7 @@ export function renderStandardsIndex(fragments) {
654
654
  '\n');
655
655
  }
656
656
  /** The index file listing every injected standard (the shared `context-files` convention). */
657
- export const PR_STANDARDS_INDEX_CONTEXT_FILE = STANDARDS_CONTEXT_INDEX_FILE;
657
+ const PR_STANDARDS_INDEX_CONTEXT_FILE = STANDARDS_CONTEXT_INDEX_FILE;
658
658
  // ---------------------------------------------------------------------------
659
659
  // PreOps
660
660
  // ---------------------------------------------------------------------------
@@ -713,19 +713,24 @@ export const prReviewerExistingCommentsPreOp = async (ctx) => {
713
713
  };
714
714
  };
715
715
  /**
716
- * PreOp for the `pr-reviewer` kind: write the task's selected best-practice standards as one
717
- * `.cat-context/standard-<id>.md` file each, plus an index.
716
+ * PreOp for any `standardsDelivery: 'context-files'` kind: write the task's selected
717
+ * best-practice standards as one `.cat-context/standard-<id>.md` file each, plus an index.
718
718
  *
719
- * The reviewer's own prompt does NOT carry the standards (the kind declares
720
- * `standardsDelivery: 'context-files'`, so the engine skips the fold). Folding them in charged
721
- * the parent for every standard on every turn 145 KB across 5 standards on the measured run,
722
- * ~3.7M tokens over 96 turns while the agents that actually review the code, the parallel slice
723
- * subagents, never received them and worked from the parent's one-line paraphrase instead. As
724
- * files, each standard is read once by the slices it applies to, from the real text.
719
+ * KIND-NEUTRAL despite living beside the PR reviewer, which is the kind that first needed it: it
720
+ * reads nothing but the run's resolved fragments. `standardsDelivery: 'context-files'` only stops
721
+ * the ENGINE folding the standards into the system prompt, so a kind that declares it without
722
+ * pairing it with this op does not deliver its standards more cheaply, it silently stops
723
+ * delivering them.
725
724
  *
726
- * Pass-through when the run resolved no fragments (a review task with none selected).
725
+ * Why the split is worth it: folding them charged the parent for every standard on every turn
726
+ * (145 KB across 5 standards on the measured run, ~3.7M tokens over 96 turns) while the agents
727
+ * that actually read the code never received them. As files, each standard is read once, by the
728
+ * pass it applies to, from the real text. A bug-fishing expedition is the same shape and worse:
729
+ * it re-sends its whole system prompt on every turn of every one of its passes.
730
+ *
731
+ * Pass-through when the run resolved no fragments (a task with none selected).
727
732
  */
728
- export const prReviewerStandardsPreOp = async (ctx) => {
733
+ export const standardsAsContextFilesPreOp = async (ctx) => {
729
734
  const fragments = ctx.context.block.resolvedFragments ?? [];
730
735
  if (!fragments.length)
731
736
  return;