@bitmagic/asset-core 0.2.10-dev.4 → 0.2.10

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/index.d.ts CHANGED
@@ -26,10 +26,10 @@ export type { AnimationParams, AnimationResult } from './generators/animation.js
26
26
  export { fetchContentLength } from './http.js';
27
27
  export { PIXAR_VOXEL_STYLE, MAX_COVER_DESIGN_CHARS, buildCoverArtPrompt } from './cover-prompt.js';
28
28
  export { MAX_REFERENCE_DESIGN_CHARS, buildReferenceImagePrompt } from './reference-prompt.js';
29
- export { JUDGE_DIMENSIONS, judgeScorecardSchema } from './judge-scorecard.js';
30
- export type { JudgeDimension, JudgeScorecard } from './judge-scorecard.js';
31
- export { JUDGE_GENRE_HINTS, JUDGE_MOBILE_HINT, JUDGE_RUBRIC, MAX_JUDGE_DESIGN_CHARS, MAX_JUDGE_SCENE_FACTS_CHARS, MAX_JUDGE_VERIFY_CHARS, buildJudgeRubric, } from './judge-prompt.js';
32
- export type { JudgeRubricInput } from './judge-prompt.js';
29
+ export { JUDGE_DIMENSIONS, deriveOverall, judgeModelResponseSchema, judgeScorecardSchema, } from './judge-scorecard.js';
30
+ export type { JudgeDimension, JudgeModelResponse, JudgeScorecard } from './judge-scorecard.js';
31
+ export { JUDGE_GENRE_HINTS, JUDGE_MOBILE_HINT, JUDGE_RUBRIC, MAX_JUDGE_ART_DIRECTION_CHARS, MAX_JUDGE_DESIGN_CHARS, MAX_JUDGE_SCENE_FACTS_CHARS, MAX_JUDGE_VERIFY_CHARS, buildJudgeRubric, buildJudgeStyleHint, } from './judge-prompt.js';
32
+ export type { JudgePriorVerdict, JudgeRubricInput } from './judge-prompt.js';
33
33
  export { TERMINAL_FAILURE_CODES, TERMINAL_FAILURE_VERSION, buildTerminalFailure, isTerminalFailureCode, legacyErrorTypeFor, parseTerminalFailure, } from './terminal-failure.js';
34
34
  export type { BuildTerminalFailureInput, LegacyErrorType, TerminalFailure, TerminalFailureCode, TerminalFailureDetail, } from './terminal-failure.js';
35
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,UAAU,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACxF,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACtF,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACnF,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,sBA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iB,EACjB,YAAY,EACZ,6BAA6B,EAC7B,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAM7E,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -14,8 +14,8 @@ export { generateAnimationAsset, animationParamsSchema, getConfiguredAnimationMo
14
14
  export { fetchContentLength } from './http.js';
15
15
  export { PIXAR_VOXEL_STYLE, MAX_COVER_DESIGN_CHARS, buildCoverArtPrompt } from './cover-prompt.js';
16
16
  export { MAX_REFERENCE_DESIGN_CHARS, buildReferenceImagePrompt } from './reference-prompt.js';
17
- export { JUDGE_DIMENSIONS, judgeScorecardSchema } from './judge-scorecard.js';
18
- export { JUDGE_GENRE_HINTS, JUDGE_MOBILE_HINT, JUDGE_RUBRIC, MAX_JUDGE_DESIGN_CHARS, MAX_JUDGE_SCENE_FACTS_CHARS, MAX_JUDGE_VERIFY_CHARS, buildJudgeRubric, } from './judge-prompt.js';
17
+ export { JUDGE_DIMENSIONS, deriveOverall, judgeModelResponseSchema, judgeScorecardSchema, } from './judge-scorecard.js';
18
+ export { JUDGE_GENRE_HINTS, JUDGE_MOBILE_HINT, JUDGE_RUBRIC, MAX_JUDGE_ART_DIRECTION_CHARS, MAX_JUDGE_DESIGN_CHARS, MAX_JUDGE_SCENE_FACTS_CHARS, MAX_JUDGE_VERIFY_CHARS, buildJudgeRubric, buildJudgeStyleHint, } from './judge-prompt.js';
19
19
  // The agent↔client terminal-failure contract. Also published as the
20
20
  // `@bitmagic/asset-core/terminal-failure` subpath: this barrel eagerly pulls in
21
21
  // the generators (and therefore zod, the forger client, and node http helpers),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEnF,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEvG,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE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AAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEvG,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,6BAA6B,EAC7B,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAG3B,oEAAoE;AACpE,gFAAgF;AAChF,gFAAgF;AAChF,oEAAoE;AACpE,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
@@ -14,6 +14,12 @@ export declare const MAX_JUDGE_DESIGN_CHARS = 4000;
14
14
  export declare const MAX_JUDGE_VERIFY_CHARS = 4000;
15
15
  /** How much engine scene inventory reaches the judge. */
16
16
  export declare const MAX_JUDGE_SCENE_FACTS_CHARS = 2500;
17
+ /**
18
+ * How much declared art direction reaches the judge. Small on purpose: this is a statement of
19
+ * intended look, not a second design document, and a creator who pastes their whole art bible
20
+ * here would push the rubric's own bullets further from the answer.
21
+ */
22
+ export declare const MAX_JUDGE_ART_DIRECTION_CHARS = 700;
17
23
  /**
18
24
  * The generic rubric: every dimension with concrete anchors for what a low and
19
25
  * a high score look like, so two runs land near each other. Anchors are what
@@ -22,7 +28,21 @@ export declare const MAX_JUDGE_SCENE_FACTS_CHARS = 2500;
22
28
  * Keep anchors about what is VISIBLE IN A FRAME — the judge sees screenshots,
23
29
  * not gameplay.
24
30
  */
25
- export declare const JUDGE_RUBRIC = "Score each dimension from 1 to 10:\n\n- visual-quality: Does the frame look like a finished game? 3 = flat default\n materials, untextured primitives, harsh unshadowed lighting. 8 = cohesive\n palette, deliberate lighting, materials and shapes that read as one art style.\n- readability: Could a new player tell from this frame alone what to do and\n where to go? 3 = player, goals and hazards blend into the background. 8 = the\n player character, the route and the interactive elements pop at a glance.\n- design-fidelity: Does the frame match the game the design document describes?\n 3 = generic scene that could be any game. 8 = the described setting, mood and\n core mechanic are recognizably on screen.\n- polish: 3 = placeholder blocks, floating or intersecting props, empty default\n skybox, raw default HUD. 8 = grounded objects, dressed edges of the world,\n HUD that belongs to this game.";
31
+ export declare const JUDGE_RUBRIC = "Score each dimension from 1 to 10.\n\nThe top of this scale is THIS game, in its own art style and on this engine,\nwith nothing left to fix \u2014 not a photorealistic AAA production. 10 is reachable\nand you must award it when the frame earns it. Holding the top of the scale in\nreserve for work of a different budget and medium makes every score below it\nmeaningless, and it tells a developer who has genuinely finished a frame that\ntheir work is mediocre.\n\n- visual-quality: Does the frame look like a finished game?\n 3 = default materials and undressed shapes with no shared palette; harsh, unshadowed lighting.\n 6 = a palette and a lighting intent are evident but applied unevenly \u2014 part of the frame is dressed, part is not.\n 8 = cohesive palette, deliberate lighting, materials and shapes that read as one art style.\n 10 = nothing in the frame reads as unfinished; it could serve as a store screenshot for this game.\n- readability: Could a new player tell from this frame alone what to do and where to go?\n 3 = player, goals and hazards blend into the background.\n 6 = the player reads clearly, but the route or the interactive elements take a moment to find.\n 8 = the player character, the route and the interactive elements pop at a glance.\n 10 = a first-time player would know where to go and what matters without being told.\n- design-fidelity: Does the frame match the game the design document describes?\n 3 = generic scene that could be any game.\n 6 = the setting is recognisable but the mood or the core mechanic is not yet legible on screen.\n 8 = the described setting, mood and core mechanic are recognizably on screen.\n 10 = the frame is unmistakably the game the document describes, mood included.\n- polish:\n 3 = placeholder blocks, floating or intersecting props, empty default skybox, raw default HUD.\n 6 = the obvious placeholders are gone, but edges of the world, prop grounding or HUD styling are unfinished.\n 8 = grounded objects, dressed edges of the world, HUD that belongs to this game.\n 10 = no seam, gap or default asset remains for you to point at.";
32
+ /**
33
+ * The declared art direction, stated as intent so the judge stops grading the medium.
34
+ *
35
+ * This is the same intervention as JUDGE_MOBILE_HINT and it exists for the same reason: a vision
36
+ * model with no statement of intent measures the frame against photoreal and reports the style
37
+ * itself as the defect. In the field that produced findings like "blocky character" on a voxel
38
+ * game and "low-poly mountains" on a deliberately low-poly one — the medium cited as a flaw, run
39
+ * after run, and unfixable by definition, which is what made creators stop running the judge.
40
+ *
41
+ * The final paragraph is the load-bearing one: it keeps the hint from becoming a blanket amnesty.
42
+ * A style consistently applied is what earns marks; the same style applied unevenly is still a
43
+ * finding, and that is the distinction the judge has to be handed rather than left to infer.
44
+ */
45
+ export declare function buildJudgeStyleHint(artDirection: string): string;
26
46
  /**
27
47
  * What changes when the frame is a phone screenshot rather than a desktop one.
28
48
  *
@@ -43,9 +63,44 @@ export declare const JUDGE_MOBILE_HINT = "This frame is a PHONE screen, captured
43
63
  * engine implementation docs and never reach the model.
44
64
  */
45
65
  export declare const JUDGE_GENRE_HINTS: Record<string, string>;
66
+ /**
67
+ * The previous verdict, replayed to the judge so a second run grades the DELTA.
68
+ *
69
+ * Without this every run is a clean room, and two failures follow from that. Findings contradict
70
+ * each other between runs with nothing to catch it — a glow reported as "barely visible" comes
71
+ * back as "no glow at all" while plainly in frame — and a shipped improvement is invisible,
72
+ * because the judge has no idea there was a before. Both were observed in the field across
73
+ * sixteen runs.
74
+ *
75
+ * The record this is built from already exists on disk (`.bitmagic/judge.json`) and the CLI
76
+ * already reads it for the staleness warning, so this costs nothing to obtain.
77
+ *
78
+ * Note the honest limit: each round grades a NEWLY captured screenshot, so a changed observation
79
+ * is sometimes a changed frame rather than a changed opinion. That is why the instruction below
80
+ * asks the judge to SAY the frame changed rather than silently reversing itself.
81
+ */
82
+ export interface JudgePriorVerdict {
83
+ readonly overall: number;
84
+ readonly dimensions: readonly {
85
+ readonly name: string;
86
+ readonly score: number;
87
+ }[];
88
+ readonly findings: readonly {
89
+ readonly title: string;
90
+ readonly severity: string;
91
+ }[];
92
+ }
46
93
  export interface JudgeRubricInput {
47
94
  /** GAME-DESIGN.md content; empty when the project has none. */
48
95
  designText: string;
96
+ /**
97
+ * The project's declared art direction — the "Art direction" section of GAME-DESIGN.md.
98
+ * Absent or empty means no declaration, and the judge grades style as it did before this
99
+ * existed.
100
+ */
101
+ artDirection?: string;
102
+ /** The previous run's verdict, when there is one to compare against. */
103
+ previous?: JudgePriorVerdict;
49
104
  /** Optional genre key; unknown keys are ignored. */
50
105
  genre?: string;
51
106
  /**
@@ -69,5 +124,5 @@ export interface JudgeRubricInput {
69
124
  * the text part alongside the screenshot(s); the server prepends its fixed
70
125
  * judging instructions and appends the JSON output directive.
71
126
  */
72
- export declare function buildJudgeRubric({ designText, genre, platform, verifySummary, sceneFacts, }: JudgeRubricInput): string;
127
+ export declare function buildJudgeRubric({ designText, artDirection, previous, genre, platform, verifySummary, sceneFacts, }: JudgeRubricInput): string;
73
128
  //# sourceMappingURL=judge-prompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"judge-prompt.d.ts","sourceRoot":"","sources":["../src/judge-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,yEAAyE;AACzE,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,yDAAyD;AACzD,eAAO,MAAM,2B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M,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmBpD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAClF,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACrF;AAyBD,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAChC,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,aAAa,EACb,UAAU,GACX,EAAE,gBAAgB,GAAG,MAAM,CAiD3B"}
@@ -15,6 +15,12 @@ export const MAX_JUDGE_DESIGN_CHARS = 4000;
15
15
  export const MAX_JUDGE_VERIFY_CHARS = 4000;
16
16
  /** How much engine scene inventory reaches the judge. */
17
17
  export const MAX_JUDGE_SCENE_FACTS_CHARS = 2500;
18
+ /**
19
+ * How much declared art direction reaches the judge. Small on purpose: this is a statement of
20
+ * intended look, not a second design document, and a creator who pastes their whole art bible
21
+ * here would push the rubric's own bullets further from the answer.
22
+ */
23
+ export const MAX_JUDGE_ART_DIRECTION_CHARS = 700;
18
24
  /**
19
25
  * The generic rubric: every dimension with concrete anchors for what a low and
20
26
  * a high score look like, so two runs land near each other. Anchors are what
@@ -23,20 +29,62 @@ export const MAX_JUDGE_SCENE_FACTS_CHARS = 2500;
23
29
  * Keep anchors about what is VISIBLE IN A FRAME — the judge sees screenshots,
24
30
  * not gameplay.
25
31
  */
26
- export const JUDGE_RUBRIC = `Score each dimension from 1 to 10:
32
+ export const JUDGE_RUBRIC = `Score each dimension from 1 to 10.
27
33
 
28
- - visual-quality: Does the frame look like a finished game? 3 = flat default
29
- materials, untextured primitives, harsh unshadowed lighting. 8 = cohesive
30
- palette, deliberate lighting, materials and shapes that read as one art style.
31
- - readability: Could a new player tell from this frame alone what to do and
32
- where to go? 3 = player, goals and hazards blend into the background. 8 = the
33
- player character, the route and the interactive elements pop at a glance.
34
+ The top of this scale is THIS game, in its own art style and on this engine,
35
+ with nothing left to fix — not a photorealistic AAA production. 10 is reachable
36
+ and you must award it when the frame earns it. Holding the top of the scale in
37
+ reserve for work of a different budget and medium makes every score below it
38
+ meaningless, and it tells a developer who has genuinely finished a frame that
39
+ their work is mediocre.
40
+
41
+ - visual-quality: Does the frame look like a finished game?
42
+ 3 = default materials and undressed shapes with no shared palette; harsh, unshadowed lighting.
43
+ 6 = a palette and a lighting intent are evident but applied unevenly — part of the frame is dressed, part is not.
44
+ 8 = cohesive palette, deliberate lighting, materials and shapes that read as one art style.
45
+ 10 = nothing in the frame reads as unfinished; it could serve as a store screenshot for this game.
46
+ - readability: Could a new player tell from this frame alone what to do and where to go?
47
+ 3 = player, goals and hazards blend into the background.
48
+ 6 = the player reads clearly, but the route or the interactive elements take a moment to find.
49
+ 8 = the player character, the route and the interactive elements pop at a glance.
50
+ 10 = a first-time player would know where to go and what matters without being told.
34
51
  - design-fidelity: Does the frame match the game the design document describes?
35
- 3 = generic scene that could be any game. 8 = the described setting, mood and
36
- core mechanic are recognizably on screen.
37
- - polish: 3 = placeholder blocks, floating or intersecting props, empty default
38
- skybox, raw default HUD. 8 = grounded objects, dressed edges of the world,
39
- HUD that belongs to this game.`;
52
+ 3 = generic scene that could be any game.
53
+ 6 = the setting is recognisable but the mood or the core mechanic is not yet legible on screen.
54
+ 8 = the described setting, mood and core mechanic are recognizably on screen.
55
+ 10 = the frame is unmistakably the game the document describes, mood included.
56
+ - polish:
57
+ 3 = placeholder blocks, floating or intersecting props, empty default skybox, raw default HUD.
58
+ 6 = the obvious placeholders are gone, but edges of the world, prop grounding or HUD styling are unfinished.
59
+ 8 = grounded objects, dressed edges of the world, HUD that belongs to this game.
60
+ 10 = no seam, gap or default asset remains for you to point at.`;
61
+ /**
62
+ * The declared art direction, stated as intent so the judge stops grading the medium.
63
+ *
64
+ * This is the same intervention as JUDGE_MOBILE_HINT and it exists for the same reason: a vision
65
+ * model with no statement of intent measures the frame against photoreal and reports the style
66
+ * itself as the defect. In the field that produced findings like "blocky character" on a voxel
67
+ * game and "low-poly mountains" on a deliberately low-poly one — the medium cited as a flaw, run
68
+ * after run, and unfixable by definition, which is what made creators stop running the judge.
69
+ *
70
+ * The final paragraph is the load-bearing one: it keeps the hint from becoming a blanket amnesty.
71
+ * A style consistently applied is what earns marks; the same style applied unevenly is still a
72
+ * finding, and that is the distinction the judge has to be handed rather than left to infer.
73
+ */
74
+ export function buildJudgeStyleHint(artDirection) {
75
+ return `The game's DECLARED ART DIRECTION. This is the intended look, chosen by the developer:
76
+
77
+ ${artDirection}
78
+
79
+ Grade craft, cohesion and readability WITHIN this style. A trait this art direction calls for is
80
+ never a finding: do not report blocky or cubic geometry on a voxel game, faceted shading or visible
81
+ polygons on a low-poly one, flat colour on a game that asks for flat colour, or a limited palette
82
+ chosen on purpose. Judging the medium is not a critique a developer can act on.
83
+
84
+ What remains fair game is the style applied INCONSISTENTLY: one asset at a visibly different
85
+ fidelity from everything around it, a texture or hue that fights the declared palette, an object
86
+ that plainly came from a different game. Those are real and worth reporting.`;
87
+ }
40
88
  /**
41
89
  * What changes when the frame is a phone screenshot rather than a desktop one.
42
90
  *
@@ -91,6 +139,28 @@ export const JUDGE_GENRE_HINTS = {
91
139
  - Do buildable spots and built towers read differently?
92
140
  - Is the economy/wave HUD legible?`,
93
141
  };
142
+ /** The prior-verdict section: the scores to beat, and the findings to adjudicate one by one. */
143
+ function buildPriorVerdictSection(previous) {
144
+ const scores = previous.dimensions.map((d) => `${d.name} ${d.score}`).join(', ');
145
+ const findings = previous.findings.length > 0
146
+ ? previous.findings.map((f, i) => ` ${i + 1}. [${f.severity}] ${f.title}`).join('\n')
147
+ : ' (none reported)';
148
+ return `YOU ALREADY GRADED THIS GAME. Your previous verdict:
149
+ overall ${previous.overall} — ${scores}
150
+ Findings you reported last time:
151
+ ${findings}
152
+
153
+ The developer has shipped changes since. Two things follow:
154
+
155
+ - Adjudicate your own findings. For each one above, say in the relevant dimension's note whether it
156
+ is fixed, unchanged or worse. Do not silently reverse a prior claim — if you reported something as
157
+ faint and now see none of it at all, say the frame changed, because it did: this is a newly
158
+ captured screenshot, not the one you graded before.
159
+ - Move the scores that earned it. If work visibly landed on a dimension, that dimension must go UP.
160
+ If nothing about a dimension changed, its score must NOT drift — re-rolling the same frame into a
161
+ different number is noise, and a developer reading these scores in sequence is entitled to treat a
162
+ change as meaningful.`;
163
+ }
94
164
  /** A section's text, trimmed and capped — empty when there is nothing to send. */
95
165
  function excerpt(text, maxChars) {
96
166
  return text?.trim().slice(0, maxChars) ?? '';
@@ -100,13 +170,18 @@ function excerpt(text, maxChars) {
100
170
  * the text part alongside the screenshot(s); the server prepends its fixed
101
171
  * judging instructions and appends the JSON output directive.
102
172
  */
103
- export function buildJudgeRubric({ designText, genre, platform, verifySummary, sceneFacts, }) {
173
+ export function buildJudgeRubric({ designText, artDirection, previous, genre, platform, verifySummary, sceneFacts, }) {
104
174
  const sections = [JUDGE_RUBRIC];
105
175
  // Immediately after the rubric it modifies, and before the genre hints: "this is a phone"
106
176
  // changes how every bullet above should be read, so it has to arrive before they are applied
107
177
  // rather than as a footnote after them.
108
178
  if (platform === 'mobile')
109
179
  sections.push(JUDGE_MOBILE_HINT);
180
+ // Beside the mobile hint and for the same reason — both re-point the rubric's bullets before
181
+ // they are applied, rather than excusing a verdict already formed.
182
+ const style = excerpt(artDirection, MAX_JUDGE_ART_DIRECTION_CHARS);
183
+ if (style)
184
+ sections.push(buildJudgeStyleHint(style));
110
185
  const genreKey = genre?.trim().toLowerCase() ?? '';
111
186
  const genreHints = JUDGE_GENRE_HINTS[genreKey];
112
187
  if (genreHints) {
@@ -126,7 +201,11 @@ export function buildJudgeRubric({ designText, genre, platform, verifySummary, s
126
201
  if (verify) {
127
202
  sections.push(`Context from the automated boot check of this exact build:\n${verify}`);
128
203
  }
129
- sections.push(`Findings must be specific, visible in the frame, and actionable by a developername the object or region and say what to change. Report at most 3, most severe first. Dimensions to score: ${JUDGE_DIMENSIONS.join(', ')}.`);
204
+ // Last, so it is the freshest instruction before the model answers — and after the prior
205
+ // verdict, whose findings it has to adjudicate.
206
+ if (previous)
207
+ sections.push(buildPriorVerdictSection(previous));
208
+ sections.push(`Findings must be specific, visible in the frame, and actionable by a developer — name the object or region and say what to change. Report at most 3, most severe first, and report FEWER when there are fewer: an empty list is the correct, expected answer for a frame whose only remaining flaws are matters of taste. Never pad the list to reach three — a manufactured finding costs a developer a real fix somewhere else, and one that only names the art direction cannot be acted on at all. Dimensions to score: ${JUDGE_DIMENSIONS.join(', ')}.`);
130
209
  return sections.join('\n\n');
131
210
  }
132
211
  //# sourceMappingURL=judge-prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"judge-prompt.js","sourceRoot":"","sources":["../src/judge-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,yEAAyE;AACzE,MAAM,CA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cAChF,0EAA0E,KAAK,EAAE,CACtF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,sBAAsB,CAAC,CAAC;IAC9D,IAAI,MAAM,EAAE,CAAC;QACX,QAAQ,CAAC,IAAI,CAAC,+DAA+D,MAAM,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,yFAAyF;IACzF,gDAAgD;IAChD,IAAI,QAAQ;QAAE,QAAQ,CAAC,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEhE,QAAQ,CAAC,IAAI,CACX,+fAA+f,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC9hB,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
@@ -12,8 +12,23 @@ import { z } from 'zod';
12
12
  */
13
13
  export declare const JUDGE_DIMENSIONS: readonly ["visual-quality", "readability", "design-fidelity", "polish"];
14
14
  export type JudgeDimension = (typeof JUDGE_DIMENSIONS)[number];
15
- export declare const judgeScorecardSchema: z.ZodObject<{
16
- overall: z.ZodNumber;
15
+ /**
16
+ * What the MODEL is asked to return: the anchored per-dimension scores and the
17
+ * findings. Deliberately no `overall`.
18
+ *
19
+ * A free-floating overall score is the one number on this card a model cannot
20
+ * produce well. The dimensions have written anchors, so they move when the
21
+ * frame moves; an overall asked for as its own judgement is a gestalt
22
+ * impression with nothing behind it, and it behaves like one — it anchors on
23
+ * the first verdict and then sits there while the sub-scores it supposedly
24
+ * summarises climb underneath it. That was observed in the field: shipped
25
+ * improvements moved individual dimensions run over run while the total stayed
26
+ * flat at 6, which reads to a creator as "nothing I do matters".
27
+ *
28
+ * So the server derives it (`deriveOverall`) instead of asking. A dimension
29
+ * that improves now moves the total by construction.
30
+ */
31
+ export declare const judgeModelResponseSchema: z.ZodObject<{
17
32
  dimensions: z.ZodArray<z.ZodObject<{
18
33
  name: z.ZodEnum<["visual-quality", "readability", "design-fidelity", "polish"]>;
19
34
  score: z.ZodNumber;
@@ -41,7 +56,6 @@ export declare const judgeScorecardSchema: z.ZodObject<{
41
56
  severity: "high" | "medium" | "low";
42
57
  }>, "many">;
43
58
  }, "strip", z.ZodTypeAny, {
44
- overall: number;
45
59
  dimensions: {
46
60
  name: "visual-quality" | "readability" | "design-fidelity" | "polish";
47
61
  score: number;
@@ -53,7 +67,65 @@ export declare const judgeScorecardSchema: z.ZodObject<{
53
67
  severity: "high" | "medium" | "low";
54
68
  }[];
55
69
  }, {
70
+ dimensions: {
71
+ name: "visual-quality" | "readability" | "design-fidelity" | "polish";
72
+ score: number;
73
+ note: string;
74
+ }[];
75
+ topFindings: {
76
+ title: string;
77
+ detail: string;
78
+ severity: "high" | "medium" | "low";
79
+ }[];
80
+ }>;
81
+ export type JudgeModelResponse = z.infer<typeof judgeModelResponseSchema>;
82
+ /**
83
+ * The full card: what the server streams back and the CLI records. Shape is
84
+ * unchanged from before `overall` became derived, so a published CLI validating
85
+ * an older contract still accepts what a current server sends.
86
+ */
87
+ export declare const judgeScorecardSchema: z.ZodObject<{
88
+ dimensions: z.ZodArray<z.ZodObject<{
89
+ name: z.ZodEnum<["visual-quality", "readability", "design-fidelity", "polish"]>;
90
+ score: z.ZodNumber;
91
+ note: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ name: "visual-quality" | "readability" | "design-fidelity" | "polish";
94
+ score: number;
95
+ note: string;
96
+ }, {
97
+ name: "visual-quality" | "readability" | "design-fidelity" | "polish";
98
+ score: number;
99
+ note: string;
100
+ }>, "many">;
101
+ topFindings: z.ZodArray<z.ZodObject<{
102
+ title: z.ZodString;
103
+ detail: z.ZodString;
104
+ severity: z.ZodEnum<["high", "medium", "low"]>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ title: string;
107
+ detail: string;
108
+ severity: "high" | "medium" | "low";
109
+ }, {
110
+ title: string;
111
+ detail: string;
112
+ severity: "high" | "medium" | "low";
113
+ }>, "many">;
114
+ } & {
115
+ overall: z.ZodNumber;
116
+ }, "strip", z.ZodTypeAny, {
117
+ dimensions: {
118
+ name: "visual-quality" | "readability" | "design-fidelity" | "polish";
119
+ score: number;
120
+ note: string;
121
+ }[];
122
+ topFindings: {
123
+ title: string;
124
+ detail: string;
125
+ severity: "high" | "medium" | "low";
126
+ }[];
56
127
  overall: number;
128
+ }, {
57
129
  dimensions: {
58
130
  name: "visual-quality" | "readability" | "design-fidelity" | "polish";
59
131
  score: number;
@@ -64,6 +136,23 @@ export declare const judgeScorecardSchema: z.ZodObject<{
64
136
  detail: string;
65
137
  severity: "high" | "medium" | "low";
66
138
  }[];
139
+ overall: number;
67
140
  }>;
68
141
  export type JudgeScorecard = z.infer<typeof judgeScorecardSchema>;
142
+ /**
143
+ * The overall score: the mean of the dimensions actually scored, to one
144
+ * decimal.
145
+ *
146
+ * One decimal rather than an integer is the point. Four dimensions on a 1-10
147
+ * scale mean a single dimension moving by one changes the mean by 0.25, and
148
+ * rounding that to an integer throws away exactly the signal a creator is
149
+ * looking for after shipping one improvement. `6.0 -> 6.3` is a true statement
150
+ * about a frame that got better; `6 -> 6` is not.
151
+ *
152
+ * An unweighted mean is deliberate: the four dimensions are peers, and any
153
+ * weighting would be a product opinion smuggled in as arithmetic.
154
+ */
155
+ export declare function deriveOverall(dimensions: readonly {
156
+ score: number;
157
+ }[]): number;
69
158
  //# sourceMappingURL=judge-scorecard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"judge-scorecard.d.ts","sourceRoot":"","sources":["../src/judge-scorecard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gBAAgB,yEAKnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"judge-scorecard.d.ts","sourceRoot":"","sources":["../src/judge-scorecard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gBAAgB,yEAKnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAI9E"}
@@ -16,8 +16,23 @@ export const JUDGE_DIMENSIONS = [
16
16
  'design-fidelity',
17
17
  'polish',
18
18
  ];
19
- export const judgeScorecardSchema = z.object({
20
- overall: z.number().min(1).max(10),
19
+ /**
20
+ * What the MODEL is asked to return: the anchored per-dimension scores and the
21
+ * findings. Deliberately no `overall`.
22
+ *
23
+ * A free-floating overall score is the one number on this card a model cannot
24
+ * produce well. The dimensions have written anchors, so they move when the
25
+ * frame moves; an overall asked for as its own judgement is a gestalt
26
+ * impression with nothing behind it, and it behaves like one — it anchors on
27
+ * the first verdict and then sits there while the sub-scores it supposedly
28
+ * summarises climb underneath it. That was observed in the field: shipped
29
+ * improvements moved individual dimensions run over run while the total stayed
30
+ * flat at 6, which reads to a creator as "nothing I do matters".
31
+ *
32
+ * So the server derives it (`deriveOverall`) instead of asking. A dimension
33
+ * that improves now moves the total by construction.
34
+ */
35
+ export const judgeModelResponseSchema = z.object({
21
36
  dimensions: z
22
37
  .array(z.object({
23
38
  name: z.enum(JUDGE_DIMENSIONS),
@@ -36,4 +51,31 @@ export const judgeScorecardSchema = z.object({
36
51
  }))
37
52
  .max(3),
38
53
  });
54
+ /**
55
+ * The full card: what the server streams back and the CLI records. Shape is
56
+ * unchanged from before `overall` became derived, so a published CLI validating
57
+ * an older contract still accepts what a current server sends.
58
+ */
59
+ export const judgeScorecardSchema = judgeModelResponseSchema.extend({
60
+ overall: z.number().min(1).max(10),
61
+ });
62
+ /**
63
+ * The overall score: the mean of the dimensions actually scored, to one
64
+ * decimal.
65
+ *
66
+ * One decimal rather than an integer is the point. Four dimensions on a 1-10
67
+ * scale mean a single dimension moving by one changes the mean by 0.25, and
68
+ * rounding that to an integer throws away exactly the signal a creator is
69
+ * looking for after shipping one improvement. `6.0 -> 6.3` is a true statement
70
+ * about a frame that got better; `6 -> 6` is not.
71
+ *
72
+ * An unweighted mean is deliberate: the four dimensions are peers, and any
73
+ * weighting would be a product opinion smuggled in as arithmetic.
74
+ */
75
+ export function deriveOverall(dimensions) {
76
+ if (dimensions.length === 0)
77
+ return 1;
78
+ const mean = dimensions.reduce((sum, d) => sum + d.score, 0) / dimensions.length;
79
+ return Math.round(mean * 10) / 10;
80
+ }
39
81
  //# sourceMappingURL=judge-scorecard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"judge-scorecard.js","sourceRoot":"","sources":["../src/judge-scorecard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;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AAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;IACjF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;AACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/asset-core",
3
- "version": "0.2.10-dev.4",
3
+ "version": "0.2.10",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "author": "Bitmagic Oy",
6
6
  "type": "module",