Turn one illustration into an animated 2D mesh avatar with a coding agent and a local editor
Name random projects by the local date
shinshin86364e4015adc1
diff --git a/tests/create-avatar.test.ts b/tests/create-avatar.test.tsindex b963b0a..cc232a4 100644--- a/tests/create-avatar.test.ts+++ b/tests/create-avatar.test.ts@@ -27,7 +27,7 @@ function harness({ files = [] as string[], statuses = {} as Record<string, numbeconst save = (path: string, data: string) => { saved[path] = data; };const ask = async (question: string) => { questions.push(question); return answer; };const readJson = () => ({ layers: Object.fromEntries(sprites.map(sprite => [sprite, [0, 0, 1, 1]])) });- const deps = { run, read, readJson, save, randomSeed: () => 4821, today: () => new Date('2026-10-27T12:00:00Z'), ask, interactive, exists: (path: string) => existing.has(path), environment, log: (m: string) => logs.push(m), error: (m: string) => errors.push(m), cwd: '/work' };+ const deps = { run, read, readJson, save, randomSeed: () => 4821, today: () => new Date(2026, 9, 27, 7, 30), ask, interactive, exists: (path: string) => existing.has(path), environment, log: (m: string) => logs.push(m), error: (m: string) => errors.push(m), cwd: '/work' };return { calls, logs, errors, questions, saved, deps };}diff --git a/tools/create.mjs b/tools/create.mjsindex bf9cd59..47c130d 100644--- a/tools/create.mjs+++ b/tools/create.mjs@@ -268,7 +268,7 @@ export async function create(argv, deps = {}) {let image = options.image && resolve(cwd, options.image);if (image && !exists(image)) { error(t.noImage(options.image)); return 1; }const taken = value => exists(join(root, 'projects', value));- const stamp = today().toISOString().slice(0, 10).replaceAll('-', '');+ const day = today(), stamp = `${day.getFullYear()}${String(day.getMonth() + 1).padStart(2, '0')}${String(day.getDate()).padStart(2, '0')}`;const name = options.name ?? (options.random ? projectName(`random-${stamp}-${seed}`, taken) : projectName(options.image, taken));if (!validName(name)) { error(t.badName(name)); return 1; }if (exists(join(root, 'projects', name))) { error(t.exists(name)); return 1; }