Skip to content

Commit 97f9aff

Browse files
committed
Add VLM-judge creative critique tools
Close the generate → look → critique → revise loop with five agent tools built entirely on existing vision-capable chat providers — no dedicated scorer models: - critique_image: directional defect list (what/where/fix) against the brief with a pass/revise verdict; forbids "add more detail" advice. - compare_images: pairwise knockout tournament; every match judged twice with presentation order swapped to cancel position bias, plus a tiebreak call on disagreement. - score_image_adherence: decomposes the brief into binary yes/no checks and answers each with the VLM — an explainable adherence score. - record_style_preference / get_style_profile: persist aesthetic preferences via LongTermMemory and return them as a taste-profile block for generation prompts and judge rubrics. Judging tools take provider+model params (pair with find_model) and run through runProviderPrediction's generate_message capability at temperature 0, so asset:// image sources resolve like everywhere else. All five register as built-ins. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SGdnz8JAsc4p3SyUUY3sAc
1 parent 50060c3 commit 97f9aff

4 files changed

Lines changed: 1112 additions & 0 deletions

File tree

packages/agents/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ export {
209209
EmbedTextTool
210210
} from "./tools/media-tools.js";
211211
export { ImageGenerationTool } from "./tools/image-generation-tool.js";
212+
export {
213+
CritiqueImageTool,
214+
CompareImagesTool,
215+
ScoreImageAdherenceTool,
216+
RecordStylePreferenceTool,
217+
GetStyleProfileTool,
218+
CREATIVE_CRITIQUE_TOOL_NAMES
219+
} from "./tools/creative-critique-tools.js";
212220
export {
213221
persistOutput,
214222
workspaceDir as workspaceDirFromContext,

packages/agents/src/tools/builtin-tools.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ import {
7777
} from "./edit-search-tools.js";
7878
import { TodoWriteTool } from "./todo-tools.js";
7979
import { ViewImageTool, ListImagesTool } from "./view-image-tool.js";
80+
import {
81+
CritiqueImageTool,
82+
CompareImagesTool,
83+
ScoreImageAdherenceTool,
84+
RecordStylePreferenceTool,
85+
GetStyleProfileTool
86+
} from "./creative-critique-tools.js";
8087

8188
export const BUILTIN_TOOL_CLASSES: ReadonlyArray<new () => Tool> = [
8289
// Filesystem (workspace-relative)
@@ -104,6 +111,13 @@ export const BUILTIN_TOOL_CLASSES: ReadonlyArray<new () => Tool> = [
104111
DataForSEONewsTool,
105112
DataForSEOImagesTool,
106113

114+
// Creative critique (VLM judging + taste memory)
115+
CritiqueImageTool,
116+
CompareImagesTool,
117+
ScoreImageAdherenceTool,
118+
RecordStylePreferenceTool,
119+
GetStyleProfileTool,
120+
107121
// Generation
108122
ImageGenerationTool,
109123
GoogleImageGenerationTool,

0 commit comments

Comments
 (0)