by adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
← Commit history
SKILL.md+8−2@@ -52,8 +52,14 @@ scales by gating the STYLE, not every part: its own title and render), generating locally, paced. Every export's provenance records the style, the gate that minted it, and the attestation, so a batch hero is always traceable to the human who set the- look. parts.json rows: {ref, title, kind?, showcase?: <render path>,- headline?, subtitle?}.+ look. parts.json rows: {ref, title, type?, kind?, showcase?: <render path>,+ headline?, subtitle?}. `type` is the page type and defaults to `hardware`,+ so app pages need `"type": "app"` or they get the hardware pill and layout.+ Each part is composed first to measure its lint: a hard fail skips that+ part (`results[].error` and `.lint`) and the batch carries on; warnings land+ in `results[].warnings`. The style's title size is fixed, so a headline+ longer than the gated page's can run into the showcase: read those warnings+ and fix that part by hand if it matters. EXISTING pages (a fleet that already lives on the wiki, e.g. 136 of the 137 basic parts) are not republished: push the PNG into the page repo and
drive.mjs+16−3@@ -216,7 +216,7 @@ try { // limits here); --pace spaces the renders. const si = args.indexOf('--style'); const pi2 = args.indexOf('--parts');- if (si < 0 || pi2 < 0) die('usage: hero-studio batch --style <name> --parts <parts.json> [--pace SECS] [--human <who>] [--quote "their words"]\n parts.json: [{"ref":"adom/x","title":"X","showcase":"render.png","kind":"component"}, ...]');+ if (si < 0 || pi2 < 0) die('usage: hero-studio batch --style <name> --parts <parts.json> [--pace SECS] [--human <who>] [--quote "their words"]\n parts.json: [{"ref":"adom/x","title":"X","type":"hardware","showcase":"render.png","kind":"component"}, ...]'); const styleName = args[si + 1]; const fsm = await import('fs'); const parts = JSON.parse(fsm.readFileSync(args[pi2 + 1], 'utf8'));@@ -232,6 +232,7 @@ try { console.error('batch: ' + parts.length + ' part(s), style "' + styleName + '" (gated by ' + st2.gate.page + '), pace ' + pace + 's'); for (let i = 0; i < parts.length; i++) { const part = parts[i];+ let lint = []; try { await jf('api/pages', { owner: part.ref.split('/')[0], slug: part.ref.split('/')[1], title: part.title, type: part.type || 'hardware', kind: part.kind }); await jf('state', Object.assign({}, stylePatch, { page: part.ref, headline: part.headline || '', subtitle: part.subtitle || '', showcase: Object.assign({ src: '', full: false }, stylePatch.showcase || {}) }));@@ -239,6 +240,16 @@ try { const v = await jf('showcase-file', { path: path.resolve(part.showcase), cover: !!(stylePatch.showcase || {}).cover, chrome: (stylePatch.showcase || {}).chrome || '' }); if (!v.ok) throw new Error('showcase: ' + v.error); }+ // Applying the style and the showcase moved the pose, so the stored lint+ // is one pose behind and automated Generate would refuse it. Compose+ // re-measures it against this part, in the same render Generate uses.+ const c = await fetch(BASE + 'compose.png');+ if (!c.ok) throw new Error('compose (' + c.status + '): ' + (await c.text()).slice(0, 300));+ await c.arrayBuffer();+ const measured = (await jf('state')).lint || [];+ lint = measured.map((l) => ({ level: l.level, id: l.id, msg: l.msg }));+ const hard = lint.filter((l) => l.level === 'fail');+ if (hard.length) throw new Error('hard-fail lint: ' + hard.map((l) => '[' + l.id + '] ' + l.msg).join('; ')); const g = await jf('generate', { attest: { style: styleName, human, quote } }); if (!g.ok) throw new Error(g.error); // wait for the finalize (poll state._gen)@@ -249,10 +260,12 @@ try { if (stt._gen && stt._gen.ok && stt._gen.file && (!results.length || stt._gen.file !== results[results.length - 1].file)) done = stt._gen; } if (!done) throw new Error('generate did not finish in 60s');- results.push({ ref: part.ref, ok: true, file: done.file });+ const warnings = lint.filter((l) => l.level !== 'fail');+ results.push({ ref: part.ref, ok: true, file: done.file, warnings }); console.error(' [' + (i + 1) + '/' + parts.length + '] ' + part.ref + ' -> ' + done.file);+ for (const l of warnings) console.error(' lint ' + l.level + ' [' + l.id + '] ' + l.msg); } catch (e) {- results.push({ ref: part.ref, ok: false, error: e.message });+ results.push({ ref: part.ref, ok: false, error: e.message, lint }); console.error(' [' + (i + 1) + '/' + parts.length + '] ' + part.ref + ' FAILED: ' + e.message); } if (i < parts.length - 1) await new Promise((r) => setTimeout(r, pace * 1000));
package.json+2−2@@ -2,7 +2,7 @@ "slug": "hero-studio", "title": "Hero Studio", "type": "app",- "version": "0.24.0",+ "version": "0.24.1", "description": "The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its PAGE OWNER's brand guide (<owner>/brand): colors, type, logo and background themes, Adom's included; an unresolved guide holds unbranded rather than borrowing Adom's look. Placement is fixed for all. The floating app window is the showcase: it auto-loads a real screenshot from the package's wiki page (screenshots/, docs/), takes a manual import, or a full-hero import (the human-ratified re-stamp path for existing heroes). The pose gate opens in verification mode: per-item checklist (title, subtitle, showcase, type match) and a Generate that unlocks only fully confirmed. Includes showcase bleeds, brand tile themes, gradient angles, pixel-faithful wiki marquee and index-card previews, and a component-hero mode with a photo/raytrace/phong fallback ladder.", "license": "MIT", "tags": [@@ -68,7 +68,7 @@ "test:render": "node test/render-view.mjs", "test:renderer": "node test/renderer.mjs", "test:syntax": "node test/syntax.mjs",- "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/pose-surface.mjs && node test/circuit-traces.mjs",+ "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/pose-surface.mjs && node test/batch.mjs && node test/circuit-traces.mjs", "test:traces": "node test/circuit-traces.mjs", "prepublishOnly": "node test/syntax.mjs", "test:platform": "node test/platform.mjs"
page.json+2−2@@ -2,7 +2,7 @@ "slug": "hero-studio", "title": "Hero Studio", "type": "app",- "version": "0.24.0",+ "version": "0.24.1", "description": "The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its PAGE OWNER's brand guide (<owner>/brand): colors, type, logo and background themes, Adom's included; an unresolved guide holds unbranded rather than borrowing Adom's look. Placement is fixed for all. The floating app window is the showcase: it auto-loads a real screenshot from the package's wiki page (screenshots/, docs/), takes a manual import, or a full-hero import (the human-ratified re-stamp path for existing heroes). The pose gate opens in verification mode: per-item checklist (title, subtitle, showcase, type match) and a Generate that unlocks only fully confirmed. Includes showcase bleeds, brand tile themes, gradient angles, pixel-faithful wiki marquee and index-card previews, and a component-hero mode with a photo/raytrace/phong fallback ladder.", "license": "MIT", "tags": [@@ -68,7 +68,7 @@ "test:render": "node test/render-view.mjs", "test:renderer": "node test/renderer.mjs", "test:syntax": "node test/syntax.mjs",- "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/pose-surface.mjs && node test/circuit-traces.mjs",+ "test": "node test/syntax.mjs && node test/brand.mjs && node test/render-view.mjs && node test/renderer.mjs && node test/platform.mjs && node test/pose-surface.mjs && node test/batch.mjs && node test/circuit-traces.mjs", "test:traces": "node test/circuit-traces.mjs", "prepublishOnly": "node test/syntax.mjs", "test:platform": "node test/platform.mjs"