@babylonjs-toolkit/agent 1.2.16 → 1.2.18
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/README.md +3 -2
- package/package.json +1 -1
- package/skills/bt-blender/SKILL.md +386 -0
- package/skills/bt-blender/THIRD_PARTY_NOTICES.md +141 -0
- package/skills/bt-blender/references/art-style-and-genre.md +173 -0
- package/skills/bt-blender/references/characters-and-creatures.md +644 -0
- package/skills/bt-blender/references/environments.md +478 -0
- package/skills/bt-blender/references/game-engine-export.md +284 -0
- package/skills/bt-blender/references/geometry-nodes.md +447 -0
- package/skills/bt-blender/references/hard-surface.md +720 -0
- package/skills/bt-blender/references/procedural-generation.md +358 -0
- package/skills/bt-blender/references/rigging-and-animation.md +1080 -0
- package/skills/bt-blender/references/sculpting-and-retopology.md +544 -0
- package/skills/bt-blender/references/uv-and-pbr-materials.md +381 -0
- package/skills/bt-blender/references/vehicles.md +632 -0
- package/skills/bt-blender/scripts/blender/assembly_check.py +420 -0
- package/skills/bt-blender/scripts/blender/character_blockout.py +462 -0
- package/skills/bt-blender/scripts/blender/construction_kit.py +1710 -0
- package/skills/bt-blender/scripts/blender/environment_kit.py +525 -0
- package/skills/bt-blender/scripts/blender/export_asset.py +623 -0
- package/skills/bt-blender/scripts/blender/geometry_nodes_builders.py +575 -0
- package/skills/bt-blender/scripts/blender/hard_surface_panels.py +374 -0
- package/skills/bt-blender/scripts/blender/hard_surface_trims.py +200 -0
- package/skills/bt-blender/scripts/blender/image_measure.py +568 -0
- package/skills/bt-blender/scripts/blender/materials_pbr.py +439 -0
- package/skills/bt-blender/scripts/blender/measure_stations.py +486 -0
- package/skills/bt-blender/scripts/blender/ortho_views.py +309 -0
- package/skills/bt-blender/scripts/blender/procedural_game_ready.py +258 -0
- package/skills/bt-blender/scripts/blender/procedural_generators.py +842 -0
- package/skills/bt-blender/scripts/blender/qa_check.py +729 -0
- package/skills/bt-blender/scripts/blender/retopology_tools.py +781 -0
- package/skills/bt-blender/scripts/blender/review_render.py +358 -0
- package/skills/bt-blender/scripts/blender/rigging_tools.py +1170 -0
- package/skills/bt-blender/scripts/blender/style_palette.py +190 -0
- package/skills/bt-blender/scripts/blender/tool_common.py +289 -0
- package/skills/bt-blender/scripts/blender/uv_layout.py +555 -0
- package/skills/bt-blender/scripts/blender/vehicle_parts.py +370 -0
- package/skills/bt-blender/scripts/blender/view_consistency.py +133 -0
- package/skills/bt-blender/scripts/blender/world_gate.py +219 -0
- package/skills/bt-blender/scripts/bt-blender.mjs +329 -0
- package/skills/bt-blender/scripts/validate_gltf.mjs +204 -0
- package/skills/bt-gauntlet/SKILL.md +6 -6
- package/skills/bt-gauntlet/references/critic-rubrics.md +71 -4
- package/skills/bt-gauntlet/references/spec-composition.md +13 -0
- package/skills/bt-gauntlet/references/unity-pipeline.md +18 -2
- package/skills/bt-unwrap/scripts/blender/__pycache__/bt_unwrap.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/image_utils.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/mesh_tools.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/model_io.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/previews.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/rasterizer.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/reference_views.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/reference_warp.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/texture_bake.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/texture_compose.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/uv_layout.cpython-313.pyc +0 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* validate_gltf: runs the Khronos glTF-Validator on a .glb or .gltf and prints one JSON result line.
|
|
4
|
+
*
|
|
5
|
+
* node validate_gltf.mjs <file.glb|file.gltf> [--validator-dir <dir>] [--max-issues 100] [--ignore CODE ...]
|
|
6
|
+
*
|
|
7
|
+
* The validator is an npm package, not bundled with the skill. It is looked for in --validator-dir, then
|
|
8
|
+
* $BT_GLTF_VALIDATOR_DIR, then node_modules beside this script, then the global npm folder. Install it once:
|
|
9
|
+
* npm install --prefix <bt-blender>/scripts gltf-validator
|
|
10
|
+
* When it is not installed the result says skipped (with that command) and the exit code is 0, so a
|
|
11
|
+
* machine without it is not reported as a broken asset.
|
|
12
|
+
*
|
|
13
|
+
* Exit code: 0 valid (or skipped), 1 the validator found errors or the file could not be read, 2 bad options.
|
|
14
|
+
*
|
|
15
|
+
* Portions adapted from colinurbs/game-asset-modeling (tools/khronos_validate.mjs)
|
|
16
|
+
* -- Copyright (c) 2026 Colin Urban, MIT License:
|
|
17
|
+
*
|
|
18
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
20
|
+
* in the Software without restriction, including without limitation the rights
|
|
21
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
23
|
+
* furnished to do so, subject to the following conditions:
|
|
24
|
+
*
|
|
25
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
26
|
+
* copies or substantial portions of the Software.
|
|
27
|
+
*
|
|
28
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
30
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
32
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
33
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
34
|
+
* SOFTWARE.
|
|
35
|
+
*
|
|
36
|
+
* Changes: validator discovery with a skipped result, a summary instead of the raw report, a non-zero
|
|
37
|
+
* exit on errors, and option handling.
|
|
38
|
+
*/
|
|
39
|
+
import { spawnSync } from 'node:child_process';
|
|
40
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
41
|
+
import { createRequire } from 'node:module';
|
|
42
|
+
import path from 'node:path';
|
|
43
|
+
import { fileURLToPath } from 'node:url';
|
|
44
|
+
|
|
45
|
+
/** Folder holding this script; `npm install --prefix` here puts the validator in its node_modules. */
|
|
46
|
+
const SCRIPT_DIRECTORY = path.dirname(fileURLToPath(import.meta.url));
|
|
47
|
+
|
|
48
|
+
/** npm package name of the Khronos validator. */
|
|
49
|
+
const VALIDATOR_PACKAGE = 'gltf-validator';
|
|
50
|
+
|
|
51
|
+
/** Environment variable naming a folder that holds the validator. */
|
|
52
|
+
const VALIDATOR_DIRECTORY_VARIABLE = 'BT_GLTF_VALIDATOR_DIR';
|
|
53
|
+
|
|
54
|
+
/** Issue codes ignored by default: unused objects are common in exporter output and harmless. */
|
|
55
|
+
const DEFAULT_IGNORED_ISSUES = ['UNUSED_OBJECT'];
|
|
56
|
+
|
|
57
|
+
/** Default cap on the issues the validator reports. */
|
|
58
|
+
const DEFAULT_MAX_ISSUES = 100;
|
|
59
|
+
|
|
60
|
+
/** Validator severity numbers. */
|
|
61
|
+
const SEVERITY_NAMES = ['error', 'warning', 'info', 'hint'];
|
|
62
|
+
|
|
63
|
+
/** Exit codes, shared with the bt-blender tools. */
|
|
64
|
+
const EXIT_PASSED = 0;
|
|
65
|
+
const EXIT_FAILED = 1;
|
|
66
|
+
const EXIT_BAD_OPTIONS = 2;
|
|
67
|
+
|
|
68
|
+
/** The install command reported when the validator is missing. */
|
|
69
|
+
const INSTALL_HINT = `npm install --prefix "${SCRIPT_DIRECTORY}" ${VALIDATOR_PACKAGE}`;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Prints the single result line.
|
|
73
|
+
* @param {object} result - The result.
|
|
74
|
+
*/
|
|
75
|
+
function emit(result) {
|
|
76
|
+
process.stdout.write(`${JSON.stringify({ tool: 'validate-gltf', ...result })}\n`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Parses the command line.
|
|
81
|
+
* @param {string[]} argv - Arguments after the script name.
|
|
82
|
+
* @returns {{ file: string, validatorDirectory: string | undefined, maxIssues: number, ignored: string[] }}
|
|
83
|
+
* @throws {Error} On a missing file argument or a bad value.
|
|
84
|
+
*/
|
|
85
|
+
function parseArguments(argv) {
|
|
86
|
+
const options = { file: undefined, validatorDirectory: undefined, maxIssues: DEFAULT_MAX_ISSUES, ignored: [...DEFAULT_IGNORED_ISSUES] };
|
|
87
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
88
|
+
const argument = argv[index];
|
|
89
|
+
if (argument === '--validator-dir') {
|
|
90
|
+
options.validatorDirectory = argv[++index];
|
|
91
|
+
} else if (argument === '--max-issues') {
|
|
92
|
+
options.maxIssues = Number.parseInt(argv[++index], 10);
|
|
93
|
+
if (!Number.isInteger(options.maxIssues) || options.maxIssues < 1) throw new Error('--max-issues needs a positive integer');
|
|
94
|
+
} else if (argument === '--ignore') {
|
|
95
|
+
while (index + 1 < argv.length && !argv[index + 1].startsWith('--')) options.ignored.push(argv[++index]);
|
|
96
|
+
} else if (argument.startsWith('--')) {
|
|
97
|
+
throw new Error(`unknown option ${argument}`);
|
|
98
|
+
} else if (options.file) {
|
|
99
|
+
throw new Error(`only one file can be validated (got ${options.file} and ${argument})`);
|
|
100
|
+
} else {
|
|
101
|
+
options.file = argument;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (!options.file) throw new Error('usage: validate_gltf.mjs <file.glb|file.gltf> [--validator-dir <dir>]');
|
|
105
|
+
return options;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The global npm package folder, or undefined when npm is not available.
|
|
110
|
+
* @returns {string | undefined} Folder path.
|
|
111
|
+
*/
|
|
112
|
+
function globalNodeModules() {
|
|
113
|
+
const probe = spawnSync('npm', ['root', '-g'], { encoding: 'utf8', shell: process.platform === 'win32' });
|
|
114
|
+
return probe.status === 0 ? probe.stdout.trim() : undefined;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Finds the validator package folder.
|
|
119
|
+
* @param {string | undefined} explicitDirectory - Folder from --validator-dir.
|
|
120
|
+
* @returns {string | undefined} Package folder, or undefined when not installed.
|
|
121
|
+
*/
|
|
122
|
+
function findValidator(explicitDirectory) {
|
|
123
|
+
const roots = [explicitDirectory, process.env[VALIDATOR_DIRECTORY_VARIABLE], SCRIPT_DIRECTORY].filter(Boolean);
|
|
124
|
+
const candidates = roots.flatMap((root) => [root, path.join(root, VALIDATOR_PACKAGE), path.join(root, 'node_modules', VALIDATOR_PACKAGE)]);
|
|
125
|
+
const isPackage = (folder) => existsSync(path.join(folder, 'package.json'))
|
|
126
|
+
&& JSON.parse(readFileSync(path.join(folder, 'package.json'), 'utf8')).name === VALIDATOR_PACKAGE;
|
|
127
|
+
const local = candidates.find(isPackage);
|
|
128
|
+
if (local) return local;
|
|
129
|
+
const globalRoot = globalNodeModules();
|
|
130
|
+
const globalPackage = globalRoot ? path.join(globalRoot, VALIDATOR_PACKAGE) : undefined;
|
|
131
|
+
return globalPackage && isPackage(globalPackage) ? globalPackage : undefined;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Validates a file and summarises the report.
|
|
136
|
+
* @param {object} validator - The gltf-validator module.
|
|
137
|
+
* @param {{ file: string, maxIssues: number, ignored: string[] }} options - Parsed options.
|
|
138
|
+
* @returns {Promise<object>} Summary.
|
|
139
|
+
*/
|
|
140
|
+
async function validate(validator, options) {
|
|
141
|
+
const file = path.resolve(options.file);
|
|
142
|
+
const report = await validator.validateBytes(new Uint8Array(readFileSync(file)), {
|
|
143
|
+
uri: path.basename(file),
|
|
144
|
+
maxIssues: options.maxIssues,
|
|
145
|
+
ignoredIssues: options.ignored,
|
|
146
|
+
externalResourceFunction: async (uri) => new Uint8Array(readFileSync(path.resolve(path.dirname(file), decodeURIComponent(uri)))),
|
|
147
|
+
});
|
|
148
|
+
const issues = report.issues ?? {};
|
|
149
|
+
const errors = issues.numErrors ?? 0;
|
|
150
|
+
return {
|
|
151
|
+
ok: true,
|
|
152
|
+
pass: errors === 0,
|
|
153
|
+
file,
|
|
154
|
+
validator_version: report.validatorVersion,
|
|
155
|
+
errors,
|
|
156
|
+
warnings: issues.numWarnings ?? 0,
|
|
157
|
+
infos: issues.numInfos ?? 0,
|
|
158
|
+
hints: issues.numHints ?? 0,
|
|
159
|
+
truncated: Boolean(issues.truncated),
|
|
160
|
+
ignored: options.ignored,
|
|
161
|
+
issues: (issues.messages ?? []).map((message) => ({
|
|
162
|
+
code: message.code,
|
|
163
|
+
severity: SEVERITY_NAMES[message.severity] ?? String(message.severity),
|
|
164
|
+
pointer: message.pointer,
|
|
165
|
+
message: message.message,
|
|
166
|
+
})),
|
|
167
|
+
info: report.info ?? {},
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Runs the validation and returns the exit code.
|
|
173
|
+
* @returns {Promise<number>} Exit code.
|
|
174
|
+
*/
|
|
175
|
+
async function main() {
|
|
176
|
+
let options;
|
|
177
|
+
try {
|
|
178
|
+
options = parseArguments(process.argv.slice(2));
|
|
179
|
+
} catch (error) {
|
|
180
|
+
emit({ ok: false, error: `bad options: ${error.message}` });
|
|
181
|
+
return EXIT_BAD_OPTIONS;
|
|
182
|
+
}
|
|
183
|
+
if (!existsSync(options.file)) {
|
|
184
|
+
emit({ ok: false, error: `file not found: ${path.resolve(options.file)}` });
|
|
185
|
+
return EXIT_FAILED;
|
|
186
|
+
}
|
|
187
|
+
const packageFolder = findValidator(options.validatorDirectory);
|
|
188
|
+
if (!packageFolder) {
|
|
189
|
+
emit({ ok: true, pass: true, skipped: true, file: path.resolve(options.file),
|
|
190
|
+
reason: `the Khronos glTF-Validator is not installed; run: ${INSTALL_HINT}` });
|
|
191
|
+
return EXIT_PASSED;
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
const validator = createRequire(import.meta.url)(packageFolder);
|
|
195
|
+
const result = await validate(validator, options);
|
|
196
|
+
emit(result);
|
|
197
|
+
return result.pass ? EXIT_PASSED : EXIT_FAILED;
|
|
198
|
+
} catch (error) {
|
|
199
|
+
emit({ ok: false, error: `validation failed: ${error?.message ?? error}` });
|
|
200
|
+
return EXIT_FAILED;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
process.exitCode = await main();
|
|
@@ -102,9 +102,9 @@ Interview batches:
|
|
|
102
102
|
1. **DELIVERABLE KIND + DELIVERABLE** — Which of the three kinds is this: a **web game**, a **Unity level for export**, or a **Blender model**? Then what exactly ships (playable browser demo, one polished level, a hero asset with LODs...)? Module style: ES6/ESM default; UMD only if explicitly demanded. New project or existing? Target folder. **Read the matching pipeline reference now** and run its prerequisite gate before going further — a failed gate (no Pro licence, no toolkit bootstrap, no rendering Editor for snapshots, no Blender) changes what is worth agreeing to.
|
|
103
103
|
2. **OBJECTIVE** — The exact outcome that must become true, as one testable sentence. Rewrite with the user until it is inspectable.
|
|
104
104
|
3. **THE TARGET + CAMERAS** — Per `references/target-images.md`: does the user have reference media, is there an existing artifact to refine, or do we generate the target? Agree the target image(s), run the **reachability pass** (Reachable / Approximable / **OUT OF REACH**), and agree the **locked cameras** — one per target, three to five, including a detail crop. Settle the **image-generation backend** too (kie by default, the Higgsfield CLI if it is installed and signed in or the user asks for it — `target-images.md` §1a) and record it in `pipeline.md`. Plus numeric benchmarks: target FPS @ resolution, max load time, draw-call / texture / triangle budgets. If the user has no benchmark, making a defensible one is part of the interview, not skipped.
|
|
105
|
-
4. **RUBRIC + PASS THRESHOLD** — Confirm the rubric axes from `references/critic-rubrics.md` (or amend them for this job) and the score a part must reach to pass. Default: **8.
|
|
105
|
+
4. **RUBRIC + PASS THRESHOLD** — Confirm the rubric axes from `references/critic-rubrics.md` (or amend them for this job) and the score a part must reach to pass. Default: **8.5 / 10 plus every hard gate green** (also the default a spec- or plan-driven card uses when the user names none).
|
|
106
106
|
5. **SUCCESS CONDITION** — When is the loop DONE? (e.g. "every part scores ≥8/10 from a fresh critic; sustained 60 FPS @1080p in Chrome; zero console errors; the final integration critic passes"). Success and failure defined separately.
|
|
107
|
-
6. **BOUNDARIES** — Time/cost expressed in **rounds and attempts, not wall-clock** (wall-clock cannot survive a two-week pause; counters can): max total rounds, max attempts per part before a forced strategy change, max consecutive no-improvement rounds. Permission gates: no deploy, no purchases/paid services, no credentials, no destructive ops, no contacting anyone — without explicit approval. For `unity`: the **bake tier policy** (how many rounds at preview tier before a production bake). Escalation rules: what blocks and waits for the user.
|
|
107
|
+
6. **BOUNDARIES** — Time/cost expressed in **rounds and attempts, not wall-clock** (wall-clock cannot survive a two-week pause; counters can): max total rounds (recommended default **100** when the user names none; never invent a smaller ceiling — `references/spec-composition.md`), max attempts per part before a forced strategy change, max consecutive no-improvement rounds. Permission gates: no deploy, no purchases/paid services (image generation through the configured generation tools is authorised asset generation, not a paid service — see *Textures are generated* below), no credentials, no destructive ops, no contacting anyone — without explicit approval. For `unity`: the **bake tier policy** (how many rounds at preview tier before a production bake). Escalation rules: what blocks and waits for the user.
|
|
108
108
|
7. **Kind specifics** — For `web-game`: genre & camera, physics (Havok default), input, audio, asset pipeline, scene scale, target browsers, and explicit scope cuts. For `unity`: which scene (that is where the work is authored, rendered and judged), render pipeline, terrain in scope?, existing lighting to preserve, whether Blender model work is in scope (and if so which assets, in-place or new path, tri budget, texel density, rig to match), the bake tier policy, and the **milestone checkpoints** (round 1, each major part group as it passes, and the end — by default). The Editor runs **with graphics** (never `-nographics`) and with the GPU Resident Drawer off, or its snapshots show only the sky. The level is authored like a full Unity game level and relies on Unity→Babylon parity; checkpoints confirm it. What finally gets exported — the whole level, or an individual asset as a container — is the user's call at checkpoint time, not something to decide now.
|
|
109
109
|
|
|
110
110
|
8. **Loop mechanics** — confirm `--template` choice, rounds-per-session default, and any parts the user wants prioritized first.
|
|
@@ -179,7 +179,7 @@ generate_image(
|
|
|
179
179
|
aspect_ratio: "16:9", resolution: "2K", output_format: "png")
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
**Interview settles:** kind `unity`; three locked cameras (`gauntlet_hero` down the alley, `gauntlet_side` across the puddles, `gauntlet_detail` on a sign); pass threshold 8.
|
|
182
|
+
**Interview settles:** kind `unity`; three locked cameras (`gauntlet_hero` down the alley, `gauntlet_side` across the puddles, `gauntlet_detail` on a sign); pass threshold 8.5; budgets 60 FPS @1080p, ≤900 draws; bake policy *preview until round 8, then production*.
|
|
183
183
|
|
|
184
184
|
**The reachability pass matters here.** URP has no screen-space reflections to export — the declared approach becomes *a reflection probe per puddle group plus a wet-mask material*, recorded as **Approximable**. True volumetric light shafts go to `OUT OF REACH`; height fog stands in. Without this the critic names "no SSR" every round forever.
|
|
185
185
|
|
|
@@ -269,9 +269,9 @@ Nothing model-specific is needed — `selection == null` exports the level, the
|
|
|
269
269
|
|
|
270
270
|
The checkpoint is also where the critic gets both the Unity snapshot and the browser frame of the same angle and must say which side a gap is on — *Unity right, browser wrong* means material translation, not the sculpt, so don't re-model.
|
|
271
271
|
|
|
272
|
-
**Textures are generated, never procedural stand-ins** — `generate_image` (kie by default, Higgsfield per `target-images.md` §1a) for albedo, normal and roughness detail. A part that starts from nothing may take an image-to-3D GLB as its blockout: Hi3D when `HI3D_ACCESS_KEY` + `HI3D_SECRET_KEY` are set, else Higgsfield (API or CLI) (`unity-pipeline.md`). "Substituted procedural noise for the missing map" is a gate failure, and it is the single most common reason a model reads as plastic.
|
|
272
|
+
**Textures are generated, never procedural stand-ins** — `generate_image` (kie by default, Higgsfield per `target-images.md` §1a) for albedo, normal and roughness detail. A part that starts from nothing may take an image-to-3D GLB as its blockout: Hi3D when `HI3D_ACCESS_KEY` + `HI3D_SECRET_KEY` are set, else Higgsfield (API or CLI) (`unity-pipeline.md`). "Substituted procedural noise for the missing map" is a gate failure, and it is the single most common reason a model reads as plastic. Image generation through the project's configured generation tools (kie by default, Higgsfield) for textures, decals and art is **authorised asset generation, not a "paid service" needing approval** — a spec, plan or loop card never bans it unless the user does, and a ban on image-to-3D (generated meshes) never extends to 2D image generation.
|
|
273
273
|
|
|
274
|
-
Scored on the **model rubric** (
|
|
274
|
+
Scored on the **reference-match model rubric** (Shape Fidelity 4 · Surface & Material 2 · Detail Density 2 · Topology & Efficiency 1 · Integration Readiness 1, with shape caps and the shape-fidelity gate — the critic lists the turntable's defining features before it sees any evidence), with gates on tri budget, ≤4 influences/vertex, weights normalised, transform hygiene and GUID survival.
|
|
275
275
|
|
|
276
276
|
## Example 4 — The canonical brief (engine correction is automatic)
|
|
277
277
|
|
|
@@ -334,7 +334,7 @@ candy-themed circuit with a jump, a tunnel, boost pads and scenery everywhere. K
|
|
|
334
334
|
- **No single gameable score.** The rubric score decides quality; the hard gates decide admissibility. A part passes only when both are satisfied — perf, console, camera lock, component authority and the pipeline gate all green.
|
|
335
335
|
- **The critic returns the whole gap list.** One gap per round is a slow loop; a comprehensive, actionable, prioritized list is the work order for the next round.
|
|
336
336
|
- **Scores must be comparable.** Every critic sees the previous verdict and screenshot. A regression scores worse and says what regressed.
|
|
337
|
-
- **Repetition without a changed strategy is a boundary event**, not persistence. The stall ladder is mandatory, and its triggers are concrete: no full-point gain in 2 rounds, or the same top gap twice.
|
|
337
|
+
- **Repetition without a changed strategy is a boundary event**, not persistence. The stall ladder is mandatory, and its triggers are concrete: no full-point gain in 2 rounds, or the same top gap twice. Before that, a gap that survives one fix round triggers research into how professional technical artists solve it, and the builder rebuilds with that technique (`references/critic-rubrics.md` § 4, *Research trigger*).
|
|
338
338
|
- **Progress is never self-reported.** Screenshots, perf numbers, exported metadata, diffs — an observable receipt, or it didn't happen.
|
|
339
339
|
- **Never chase what cannot cross the boundary.** The `OUT OF REACH` list exists so critics stop naming impossible gaps.
|
|
340
340
|
- **Permissions start reversible.** Deploy, delete, spend, publish, message, and secrets stay behind explicit user approval, always.
|
|
@@ -22,6 +22,32 @@ A critic is a **fresh-context subagent**. It gets a fixed input set:
|
|
|
22
22
|
| `cameras.md` | to confirm the evidence was shot from the locked transform |
|
|
23
23
|
| The pipeline's extra criteria (see the pipeline reference for the deliverable kind) | export boundary, GUID survival, etc. |
|
|
24
24
|
|
|
25
|
+
**Reference first — before it opens any evidence.** The critic studies the target views that judge the part, at full
|
|
26
|
+
resolution, and writes a **DEFINING FEATURES** list: the part's outline in each judging view, its proportions, and
|
|
27
|
+
every signature feature with its shape, position, size and orientation, in measurable terms (pixels on the named
|
|
28
|
+
reference, angles, ratios). It also states each surface's **form language** — rounded and flowing (edges rolling
|
|
29
|
+
over a radius, highlights sweeping continuously), faceted (flat planes meeting at crisp creases), or a mix with named
|
|
30
|
+
crisp lines — read from the highlights and shading, not only the outline. Labelling a rounded surface "faceted" sends
|
|
31
|
+
every later round building the wrong form. The list is fixed before the critic sees our result or the previous verdict, so it can
|
|
32
|
+
only be anchored to the target. The critic then compares each feature against the evidence, view by view, at the same
|
|
33
|
+
scale (its own crops and overlays — the builder's overlays are a convenience, not the judgment), and marks it MATCH,
|
|
34
|
+
CLOSE (right shape, small offset — say how much) or WRONG/MISSING. It judges the target image itself, never a previous
|
|
35
|
+
verdict's description of it.
|
|
36
|
+
|
|
37
|
+
**Station measurements — measure, never eyeball.** The Agent Reference's Blender guide (`unity-blender-cli.md`
|
|
38
|
+
§ 8.4b) makes station measurement the method for any model built from reference images; the loop adds that the
|
|
39
|
+
critic re-checks the numbers. When a part is modelled from a set of reference views, every round's evidence includes the part measured at **stations** along its length in every judging view: width in the front
|
|
40
|
+
and top views, height and thickness in the side view, depth where a view shows it. Each station gives reference
|
|
41
|
+
against ours at that view's own scale, with the delta in pixels, metres and percent, and the station lines drawn on
|
|
42
|
+
both images (`evidence/round-NN-<part>-stations.json` + `round-NN-<part>-stations-<view>.png`). Whole-silhouette IoU
|
|
43
|
+
cannot replace this: a part can sit in the right place, be 15 % too fat, and still score a good IoU. Stations
|
|
44
|
+
measure **form** as well as size: at two or three stations per part, also measure the cross-section's corner radii
|
|
45
|
+
and judge whether the shading rolls continuously or breaks into flat facets. A part that is rounded in the reference
|
|
46
|
+
and blocky or faceted in ours is a WRONG defining feature, whatever its widths measure. Grade each
|
|
47
|
+
station **MATCH** ≤ 3 % (or ≤ 1 cm), **CLOSE** ≤ 6 %, **WRONG** > 6 %. A WRONG station is a WRONG defining feature
|
|
48
|
+
(the outline of that view), and missing station evidence fails the shape-fidelity gate. Where two reference views
|
|
49
|
+
genuinely disagree, grade that dimension against the split the loop recorded, not against either view alone.
|
|
50
|
+
|
|
25
51
|
**It must never see:** the builder's rationale, its chain of decisions, its summary of what it did, its
|
|
26
52
|
own claim of success, or the round journal's narrative. The critic grades pixels, numbers and behaviour —
|
|
27
53
|
never effort or intent.
|
|
@@ -48,7 +74,23 @@ table applies.
|
|
|
48
74
|
| **Detail & Density** | 0–2 | Set dressing, clutter, wear, edge damage, decals, scatter, small-scale variation. Does the frame hold up under a fine-toothed comb? |
|
|
49
75
|
| **Motion & Life** | 0–1 | Animation, wind, particles, flicker, ambient movement. Score `n/a` and redistribute to Detail when the part is genuinely static. |
|
|
50
76
|
|
|
51
|
-
**
|
|
77
|
+
**Reference-match model rubric** — the default for **asset parts judged against a locked target of the same object**
|
|
78
|
+
(a turnaround, orthographic views, a product shot): fidelity to the target dominates, because a part with the wrong
|
|
79
|
+
shape must never score near a pass on the strength of clean topology or materials — **10 points**:
|
|
80
|
+
|
|
81
|
+
| Axis | Points | What it covers |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| **Shape Fidelity** | 0–4 | Outline and proportions in **every** judging view (camera-solved views included), and every DEFINING FEATURE's shape, position, size and orientation against the target. |
|
|
84
|
+
| **Surface & Material** | 0–2 | Material separation and read, roughness/metal, normal detail, seams, no stretched UVs. |
|
|
85
|
+
| **Detail Density** | 0–2 | Panel lines, bevels, small forms, wear — where the target has them. |
|
|
86
|
+
| **Topology & Efficiency** | 0–1 | Triangle budget, clean normals, LOD chain. |
|
|
87
|
+
| **Integration Readiness** | 0–1 | Scale, orientation, pivot, naming, skinning hygiene. |
|
|
88
|
+
|
|
89
|
+
**Shape caps (mandatory, this rubric):** any DEFINING FEATURE WRONG/MISSING in any judging view → Shape Fidelity
|
|
90
|
+
≤ 2.0 and the **total ≤ 6.5**, whatever the other axes earn; two or more → total ≤ 5.5.
|
|
91
|
+
|
|
92
|
+
**Model / asset rubric** — for **asset parts** of a `unity` job with no same-object target (an original asset judged
|
|
93
|
+
against a mood or style target) (an individual model: silhouette, UVs, bakes, materials, topology, rig) — **10 points**:
|
|
52
94
|
|
|
53
95
|
| Axis | Points | What it covers |
|
|
54
96
|
|---|---|---|
|
|
@@ -84,6 +126,17 @@ Rules the critic must follow:
|
|
|
84
126
|
card — swap to layered alpha-tested branch planes with a translucency map."
|
|
85
127
|
- **Say when something needs to be thrown away.** If the model, layout or lighting rig needs a full
|
|
86
128
|
redesign, say so. Do not sugarcoat and do not settle.
|
|
129
|
+
- **Order a model's gaps by the fix order, then by impact.** For a modelled asset the fixes land in this
|
|
130
|
+
order, because each step changes what the next is judged on: **camera → silhouette → form (blockiness,
|
|
131
|
+
rounding) → materials → lighting → features → micro-detail.** A materials gap never outranks an open
|
|
132
|
+
silhouette or form gap.
|
|
133
|
+
- **Name primitive soup.** A model that reads as an assembly of boxes, cylinders and spheres, with new
|
|
134
|
+
primitives added after the blockout where the target shows one continuous surface built by loft, spin,
|
|
135
|
+
subdivision or a bevelled section, is a form gap even when every measurement passes. Say which surfaces
|
|
136
|
+
should be one continuous build and with which technique.
|
|
137
|
+
- **Show differences in colour.** For silhouette and form gaps, the critic's own evidence includes a coloured
|
|
138
|
+
difference overlay (reference-only pixels in one colour, ours-only in another) and a zoomed crop at the
|
|
139
|
+
station, so the builder sees exactly where and by how much.
|
|
87
140
|
- **Stay inside the reachable set.** The loop card's `OUT OF REACH` list names things the pipeline
|
|
88
141
|
physically cannot deliver (§ target-image reachability in `SKILL.md`). Do not raise gaps against those.
|
|
89
142
|
|
|
@@ -102,6 +155,9 @@ threshold AND every gate passes.**
|
|
|
102
155
|
| **Component authority** | a protected `TOOLKIT.*` component was reimplemented, bypassed or deleted without the full replacement-evidence checklist in the round journal |
|
|
103
156
|
| **Coding practices** | any code the round created or changed breaks the Agent Reference's **Coding Practices — ENFORCED**: TypeScript or JavaScript that is not clean and professional (needless `any` or loose typing, code converted to the other language unasked), one- or two-letter or obfuscated names (outside the allowed loop counters, axis/`uv` names, toolkit aliases and names that bind to exported data), dead code or leftover `console.log`, or code a developer new to the project could not read and maintain. **JSDoc never fails this gate**: list missing or thin JSDoc as a low-priority entry in the gap list. Quote the offending lines |
|
|
104
157
|
| **Game UI performance** | any HUD, overlay or GUI the round created or changed breaks the Agent Reference's **Game UI Performance — ENFORCED**: a per-frame value (speed, RPM, needles, timers, bars, markers) set through React state, props, context or a store, or posted on the EventBus per frame; a state setter, `dispatch(` or `EventBus.PostMessage(` inside `requestAnimationFrame`, a frame-loop hook, a render observable or `update()`; `width` / `height` / `top` / `left` / `innerHTML` / SVG geometry written per frame or layout read in the loop; a Babylon GUI control assigned every frame without a changed-value check; a frame loop on a menu, splash, preloader or landing page, or driving motion CSS could do (a real-time hero that pauses off-screen and at rest is allowed); a HUD loop still writing while its HUD is hidden or the game is paused. Quote the offending lines |
|
|
158
|
+
| **Shape fidelity** *(reference-match parts)* | any DEFINING FEATURE is WRONG/MISSING in any judging view, any station measurement is WRONG (> 6 %), or the round has no station evidence — a part with the wrong shape cannot pass, whatever it scores |
|
|
159
|
+
| **Assembly** *(modelled assets)* | a part floats, leaves a visible gap, or is not attached where the target shows it joined — measured by the `bt-blender` skill's `assembly_check`, never by eye alone |
|
|
160
|
+
| **Asset QA** *(modelled assets)* | the `bt-blender` skill's `qa_check` reports an error the round introduced: z-fighting, inside-out or inconsistently wound faces, overlapping UVs where unique UVs are required, wrong texture colour space, more than four bone influences, empty material slots |
|
|
105
161
|
| **Camera lock** | the evidence was not captured from the transform recorded in `cameras.md` |
|
|
106
162
|
| **Pipeline gate** | whatever the deliverable kind's pipeline reference declares (export-boundary integrity, GUID survival, licence tier …) |
|
|
107
163
|
|
|
@@ -124,8 +180,9 @@ REGRESSION: none
|
|
|
124
180
|
The critic is fresh-context, but it is **not** memoryless about the score. It always receives the previous
|
|
125
181
|
round's screenshot and verdict for that part, with this instruction:
|
|
126
182
|
|
|
127
|
-
>
|
|
128
|
-
>
|
|
183
|
+
> Score first from your own reference-first comparison; only then read the previous verdict and explain any
|
|
184
|
+
> difference from its score. Maintain consistency with the prior judgment — the same axes, the same standards, so the
|
|
185
|
+
> two scores are comparable. Do not feel obliged to match or increase the score. **If the product regressed, score it
|
|
129
186
|
> worse and say what regressed.**
|
|
130
187
|
|
|
131
188
|
Without this, round-over-round scores are not on the same scale, and the no-improvement counter in
|
|
@@ -135,6 +192,16 @@ Without this, round-over-round scores are not on the same scale, and the no-impr
|
|
|
135
192
|
|
|
136
193
|
## 4. The stall ladder
|
|
137
194
|
|
|
195
|
+
**Research trigger — earlier than the ladder.** When a gap the critic named in one round is still in the next
|
|
196
|
+
round's gap list, it has survived a fix round. Before the builder touches it again, it researches how professional
|
|
197
|
+
technical artists handle that situation; for Blender or Unity work that means Blender and Unity technical artists.
|
|
198
|
+
The research is a thorough web search across several independent professional sources (official manuals,
|
|
199
|
+
artist and studio breakdowns, Polycount, 80.lv, GDC talks, technical-artist write-ups). The builder writes the
|
|
200
|
+
findings with their sources to `.agents/gauntlet/<name>/research/<part>-<topic>.md`, and the next round adopts the
|
|
201
|
+
technique, rebuilding rather than patching. Its journal names the research note and the technique used. A builder
|
|
202
|
+
unsure how to approach a part at all researches the same way before its first round. Research never overrides the
|
|
203
|
+
references: the technique stays only if the critic's measurements then show the part matching.
|
|
204
|
+
|
|
138
205
|
Repetition without a changed strategy is a boundary event, not persistence. Two tiers, both with concrete
|
|
139
206
|
triggers, both checked in the round protocol's gate check.
|
|
140
207
|
|
|
@@ -148,7 +215,7 @@ Fires when **either** is true for a part:
|
|
|
148
215
|
Response — **incremental tweaks are forbidden for the next round on that part.** Step back and look for the
|
|
149
216
|
architectural cause: the assets are simply not good enough; the lighting rig is wrong in kind, not degree;
|
|
150
217
|
the camera is in the wrong place; the layout does not match the target's structure; the material system
|
|
151
|
-
cannot express what the target shows. Make **one dramatic change
|
|
218
|
+
cannot express what the target shows. Make **one dramatic change**, grounded in the research note for that gap (the research trigger above has always fired by now), and record it in the round journal as:
|
|
152
219
|
|
|
153
220
|
```
|
|
154
221
|
STRATEGY: <what is being thrown away and what replaces it>
|
|
@@ -41,6 +41,19 @@ idiom bt-prototype uses with bt-hero — **pre-resolve everything at spec time s
|
|
|
41
41
|
`<NAME>`, `<DELIVERABLE KIND>`, the reference media or target-generation prompt, the locked cameras, the
|
|
42
42
|
`OUT OF REACH` list and the boundaries) and writes the **pre-filled loop card** as a spec artifact
|
|
43
43
|
(e.g. `.agents/specs/<feature>/documents/<feature>_gauntlet-card.md`).
|
|
44
|
+
- **The whole-job round budget defaults to 100.** When the user has not named a maximum number of rounds for
|
|
45
|
+
the whole job, the card's boundaries say **at most 100 rounds across the whole job, plus the stall ladder**.
|
|
46
|
+
Never invent a smaller ceiling. In bt-spec's interview, offer 100 as the recommended answer and use the user's
|
|
47
|
+
number if they give one. A Quick Plan that asks no questions writes 100 and lists it under its assumptions.
|
|
48
|
+
The job is resumable and the stall ladder stops a part that has stopped improving, so a large ceiling costs
|
|
49
|
+
nothing until rounds are actually spent. It also keeps a fidelity job from parking on a budget the user never
|
|
50
|
+
chose. This is separate from the per-invocation `--rounds:N` cap (default 5; a card may set its own, such as
|
|
51
|
+
6), which only decides how often the job parks and re-enters. Raising or lowering the ceiling later is a dated
|
|
52
|
+
amendment to the job's `loop-card.md`, and the round counter never resets.
|
|
53
|
+
- **Image generation is in scope by default.** Generation through the project's configured generation tools (kie by default, Higgsfield) for textures, decals and art is **authorised asset generation, not a "paid service" needing approval** — a spec, plan or loop card never bans it unless the user does, and a ban on image-to-3D (generated meshes) never extends to 2D image generation.
|
|
54
|
+
The card's permission boundaries (no purchases, no paid services) do not cover it; the user's own words do. When
|
|
55
|
+
the user rules out image-to-3D, the card says so in those words and still allows textures, decals and livery art
|
|
56
|
+
to be generated.
|
|
44
57
|
- **bt-plan:** the gauntlet becomes one task (usually the last), whose Details invoke
|
|
45
58
|
`/bt-gauntlet --card:.agents/specs/<feature>/documents/<feature>_gauntlet-card.md --rounds:N`. Its **Acceptance** is observable:
|
|
46
59
|
"gauntlet job `<name>` reports DONE — success condition met and the integration critic passed — as
|
|
@@ -221,7 +221,7 @@ Higgsfield API (`node "$HF_API" <model-path> … --out <dir>`, then move the sav
|
|
|
221
221
|
`Assets/Textures/<map>.png`), or the Higgsfield CLI (`node scripts/hf-generate.mjs <model> … --out Assets/Textures/<map>.png`),
|
|
222
222
|
per `target-images.md` §1a. Substituting
|
|
223
223
|
procedural noise or flat colours for maps the target needs is a gate failure, and the commonest reason an
|
|
224
|
-
asset reads as plastic.
|
|
224
|
+
asset reads as plastic. Image generation through the project's configured generation tools (kie by default, Higgsfield) for textures, decals and art is **authorised asset generation, not a "paid service" needing approval** — a spec, plan or loop card never bans it unless the user does, and a ban on image-to-3D (generated meshes) never extends to 2D image generation.
|
|
225
225
|
|
|
226
226
|
**Image → starting mesh.** When a model part starts from nothing, an image-to-3D model can turn the locked
|
|
227
227
|
target's subject into a GLB blockout. Pick the generator in this order and record it in `pipeline.md`:
|
|
@@ -360,6 +360,20 @@ triangle/vertex counts, material and texture counts, texture memory, texel densi
|
|
|
360
360
|
vertex, whether weights normalise to 1.0, LOD chain ratios. These are **Unity-side indicators, not the
|
|
361
361
|
BabylonJS perf gate**; they catch a scene going wildly heavy, they do not predict browser FPS.
|
|
362
362
|
|
|
363
|
+
#### 4. Measure the part against the references (reference-match parts)
|
|
364
|
+
|
|
365
|
+
When the part is modelled from reference views, measure it at stations along its length in every judging view —
|
|
366
|
+
the reference's edges traced on the full-resolution image, ours from the locked-camera frame or the Blender twin's
|
|
367
|
+
part mask at the same scale — and write `evidence/round-NN-<part>-stations.json` with annotated images
|
|
368
|
+
(`critic-rubrics.md` § 1, *Station measurements*). The builder iterates on these numbers before it hands the round to
|
|
369
|
+
the critic; the critic verifies them.
|
|
370
|
+
|
|
371
|
+
For modelled assets the builder's toolbox is the **`bt-blender`** skill: its construction kit (lofted rounded
|
|
372
|
+
sections, subdivision cages, bevels) builds the part, and its `measure_stations` (size and form), `world_gate`
|
|
373
|
+
(silhouette at true world scale), `review_render` (the asset at its in-game pixel height), `assembly_check` and
|
|
374
|
+
`qa_check` produce the round's evidence. A model that will be exported as glTF is also run through its Khronos
|
|
375
|
+
validation at each export checkpoint.
|
|
376
|
+
|
|
363
377
|
That is the whole in-loop verify. Seconds, not minutes.
|
|
364
378
|
|
|
365
379
|
### 6.B Checkpoint verification — export + browser (at milestones)
|
|
@@ -450,7 +464,9 @@ evidence.
|
|
|
450
464
|
## 7. Extra critic inputs and gates
|
|
451
465
|
|
|
452
466
|
Added to the standard contract in `critic-rubrics.md`. **Which rubric applies depends on the part**: scene
|
|
453
|
-
parts use the scene/level rubric
|
|
467
|
+
parts use the scene/level rubric; asset parts judged against a locked target of the same object use the
|
|
468
|
+
**reference-match model rubric** with its shape caps and the shape-fidelity gate; other asset parts use the
|
|
469
|
+
model/asset rubric. **Which gates apply depends on the
|
|
454
470
|
evidence mode.**
|
|
455
471
|
|
|
456
472
|
### In-loop rounds (Unity snapshot)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|