@leejungkiin/awkit 1.7.1 → 1.7.4
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/bin/awk.js +576 -84
- package/core/CLAUDE.md +1 -1
- package/core/GEMINI.md +148 -167
- package/core/GEMINI.md.bak +149 -116
- package/core/skill-runtime-manifest.json +3 -0
- package/docs/Claude Fable 5.md +3826 -0
- package/docs/android_kotlin_system_instruction.md +210 -0
- package/docs/brainstorm_ponytail_integration.md +146 -0
- package/docs/brainstorm_smart_setup.md +113 -0
- package/docs/deep-research-report (1).md +293 -0
- package/docs/history/GEMINI.v1.md +135 -0
- package/docs/history/brainstorm_antigravity_unified_architecture.v1.md +105 -0
- package/docs/history/implementation_plan.v1.md +58 -0
- package/package.json +4 -1
- package/scripts/artifact-storage.js +130 -0
- package/scripts/automation-gate.js +35 -2
- package/scripts/claude-plan.js +76 -0
- package/scripts/dependency-manager.js +210 -0
- package/scripts/exec-rtk.js +11 -5
- package/scripts/i18n-helper.js +381 -0
- package/scripts/multi-model-pipeline.js +144 -0
- package/skill-packs/mobile-ios/pack.json +4 -2
- package/skill-packs/reverse-engineering/pack.json +1 -0
- package/skills/CATALOG.md +20 -0
- package/skills/GEMINI.md +9 -1
- package/skills/TRIGGER_INDEX.md +10 -0
- package/skills/ai-music/SKILL.md +275 -0
- package/skills/android-re-analyzer/SKILL.md +238 -0
- package/skills/android-re-analyzer/references/api-extraction-patterns.md +119 -0
- package/skills/android-re-analyzer/references/call-flow-analysis.md +176 -0
- package/skills/android-re-analyzer/references/fernflower-usage.md +115 -0
- package/skills/android-re-analyzer/references/jadx-usage.md +116 -0
- package/skills/android-re-analyzer/references/setup-guide.md +221 -0
- package/skills/android-re-analyzer/scripts/check-deps.sh +129 -0
- package/skills/android-re-analyzer/scripts/decompile.sh +375 -0
- package/skills/android-re-analyzer/scripts/find-api-calls.sh +118 -0
- package/skills/android-re-analyzer/scripts/install-dep.sh +448 -0
- package/skills/animal-island-ui-style/SKILL.md +1450 -0
- package/skills/app-store-review-agent/SKILL.md +164 -0
- package/skills/app-store-review-agent/references/guidelines/README.md +154 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/ai_apps.md +37 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/all_apps.md +50 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/crypto_finance.md +31 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/games.md +31 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/health_fitness.md +31 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/kids.md +27 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/macos.md +38 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/social_ugc.md +32 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/subscription_iap.md +34 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/vpn.md +18 -0
- package/skills/app-store-review-agent/references/rules/design/minimum_functionality.md +96 -0
- package/skills/app-store-review-agent/references/rules/design/sign_in_with_apple.md +54 -0
- package/skills/app-store-review-agent/references/rules/entitlements/unused_entitlements.md +83 -0
- package/skills/app-store-review-agent/references/rules/metadata/accurate_metadata.md +54 -0
- package/skills/app-store-review-agent/references/rules/metadata/apple_trademark.md +99 -0
- package/skills/app-store-review-agent/references/rules/metadata/china_storefront.md +72 -0
- package/skills/app-store-review-agent/references/rules/metadata/competitor_terms.md +56 -0
- package/skills/app-store-review-agent/references/rules/metadata/subscription_metadata.md +81 -0
- package/skills/app-store-review-agent/references/rules/privacy/privacy_manifest.md +84 -0
- package/skills/app-store-review-agent/references/rules/privacy/unnecessary_data.md +60 -0
- package/skills/app-store-review-agent/references/rules/subscription/misleading_pricing.md +63 -0
- package/skills/app-store-review-agent/references/rules/subscription/missing_tos_pp.md +54 -0
- package/skills/awf-ponytail/SKILL.md +91 -0
- package/skills/awf-ponytail-review/SKILL.md +67 -0
- package/skills/awf-session-restore/SKILL.md +3 -3
- package/skills/brainstorm-agent/SKILL.md +11 -2
- package/skills/brainstorm-agent/templates/brief-template.md +8 -0
- package/skills/claude-planner/SKILL.md +47 -0
- package/skills/code-review/SKILL.md +87 -0
- package/skills/expo-game-development/SKILL.md +163 -0
- package/skills/flutter/LICENSE.txt +202 -0
- package/skills/flutter/SKILL.md +127 -0
- package/skills/flutter-project-creater/LICENSE.txt +202 -0
- package/skills/flutter-project-creater/SKILL.md +106 -0
- package/skills/game-developer/SKILL.md +163 -0
- package/skills/game-developer/references/ecs-patterns.md +501 -0
- package/skills/game-developer/references/multiplayer-networking.md +475 -0
- package/skills/game-developer/references/performance-optimization.md +422 -0
- package/skills/game-developer/references/unity-patterns.md +271 -0
- package/skills/game-developer/references/unreal-cpp.md +352 -0
- package/skills/generate-gui-assets/SKILL.md +305 -0
- package/skills/generate-gui-assets/agents/openai.yaml +4 -0
- package/skills/generate-gui-assets/references/catalog-schema.md +58 -0
- package/skills/generate-gui-assets/references/extraction-techniques.md +21 -0
- package/skills/generate-gui-assets/references/prompt-patterns.md +58 -0
- package/skills/generate-gui-assets/scripts/__pycache__/clean_chroma_edges.cpython-311.pyc +0 -0
- package/skills/generate-gui-assets/scripts/build_gui_contact_sheet.py +51 -0
- package/skills/generate-gui-assets/scripts/clean_chroma_edges.py +262 -0
- package/skills/generate-gui-assets/scripts/copy_approved_icons.py +64 -0
- package/skills/generate-gui-assets/scripts/prepare_gui_asset_run.py +91 -0
- package/skills/generate-gui-assets/scripts/suggest_grid_options.py +63 -0
- package/skills/generate-gui-assets/scripts/validate_gui_catalog.py +50 -0
- package/skills/godot-game-development/SKILL.md +142 -0
- package/skills/hatch-pet/LICENSE.txt +201 -0
- package/skills/hatch-pet/SKILL.md +420 -0
- package/skills/hatch-pet/agents/openai.yaml +4 -0
- package/skills/hatch-pet/references/animation-rows.md +29 -0
- package/skills/hatch-pet/references/codex-pet-contract.md +35 -0
- package/skills/hatch-pet/references/qa-rubric.md +60 -0
- package/skills/hatch-pet/scripts/__pycache__/clean_chroma_edges.cpython-311.pyc +0 -0
- package/skills/hatch-pet/scripts/clean_chroma_edges.py +262 -0
- package/skills/hatch-pet/scripts/compose_atlas.py +150 -0
- package/skills/hatch-pet/scripts/derive_running_left_from_running_right.py +143 -0
- package/skills/hatch-pet/scripts/extract_strip_frames.py +323 -0
- package/skills/hatch-pet/scripts/finalize_pet_run.py +382 -0
- package/skills/hatch-pet/scripts/generate_pet_images.py +287 -0
- package/skills/hatch-pet/scripts/inspect_frames.py +246 -0
- package/skills/hatch-pet/scripts/make_contact_sheet.py +96 -0
- package/skills/hatch-pet/scripts/package_custom_pet.py +108 -0
- package/skills/hatch-pet/scripts/pet_job_status.py +117 -0
- package/skills/hatch-pet/scripts/prepare_pet_run.py +673 -0
- package/skills/hatch-pet/scripts/queue_pet_repairs.py +172 -0
- package/skills/hatch-pet/scripts/record_imagegen_result.py +250 -0
- package/skills/hatch-pet/scripts/render_animation_videos.py +134 -0
- package/skills/hatch-pet/scripts/render_animation_videos.sh +5 -0
- package/skills/hatch-pet/scripts/validate_atlas.py +139 -0
- package/skills/i18n-orchestrator/SKILL.md +37 -0
- package/skills/ios-simulator-skill/SKILL.md +390 -0
- package/skills/ios-simulator-skill/scripts/accessibility_audit.py +300 -0
- package/skills/ios-simulator-skill/scripts/app_launcher.py +326 -0
- package/skills/ios-simulator-skill/scripts/app_state_capture.py +400 -0
- package/skills/ios-simulator-skill/scripts/appearance.py +385 -0
- package/skills/ios-simulator-skill/scripts/build_and_test.py +348 -0
- package/skills/ios-simulator-skill/scripts/clipboard.py +103 -0
- package/skills/ios-simulator-skill/scripts/common/__init__.py +61 -0
- package/skills/ios-simulator-skill/scripts/common/cache_utils.py +289 -0
- package/skills/ios-simulator-skill/scripts/common/device_utils.py +462 -0
- package/skills/ios-simulator-skill/scripts/common/env_config.py +35 -0
- package/skills/ios-simulator-skill/scripts/common/hang_pipeline.py +862 -0
- package/skills/ios-simulator-skill/scripts/common/hang_sessions.py +490 -0
- package/skills/ios-simulator-skill/scripts/common/idb_utils.py +180 -0
- package/skills/ios-simulator-skill/scripts/common/screenshot_utils.py +338 -0
- package/skills/ios-simulator-skill/scripts/container.py +668 -0
- package/skills/ios-simulator-skill/scripts/gesture.py +394 -0
- package/skills/ios-simulator-skill/scripts/hang_watcher.py +1533 -0
- package/skills/ios-simulator-skill/scripts/keyboard.py +391 -0
- package/skills/ios-simulator-skill/scripts/localization_audit.py +483 -0
- package/skills/ios-simulator-skill/scripts/location.py +467 -0
- package/skills/ios-simulator-skill/scripts/log_monitor.py +493 -0
- package/skills/ios-simulator-skill/scripts/model_inspector.py +645 -0
- package/skills/ios-simulator-skill/scripts/navigator.py +461 -0
- package/skills/ios-simulator-skill/scripts/privacy_manager.py +310 -0
- package/skills/ios-simulator-skill/scripts/push_notification.py +240 -0
- package/skills/ios-simulator-skill/scripts/screen_mapper.py +296 -0
- package/skills/ios-simulator-skill/scripts/sim_health_check.sh +245 -0
- package/skills/ios-simulator-skill/scripts/sim_list.py +299 -0
- package/skills/ios-simulator-skill/scripts/simctl_boot.py +312 -0
- package/skills/ios-simulator-skill/scripts/simctl_create.py +316 -0
- package/skills/ios-simulator-skill/scripts/simctl_delete.py +357 -0
- package/skills/ios-simulator-skill/scripts/simctl_erase.py +351 -0
- package/skills/ios-simulator-skill/scripts/simctl_shutdown.py +290 -0
- package/skills/ios-simulator-skill/scripts/simulator_selector.py +375 -0
- package/skills/ios-simulator-skill/scripts/status_bar.py +250 -0
- package/skills/ios-simulator-skill/scripts/test_recorder.py +323 -0
- package/skills/ios-simulator-skill/scripts/visual_diff.py +235 -0
- package/skills/ios-simulator-skill/scripts/xcode/__init__.py +13 -0
- package/skills/ios-simulator-skill/scripts/xcode/builder.py +397 -0
- package/skills/ios-simulator-skill/scripts/xcode/cache.py +204 -0
- package/skills/ios-simulator-skill/scripts/xcode/config.py +178 -0
- package/skills/ios-simulator-skill/scripts/xcode/reporter.py +343 -0
- package/skills/ios-simulator-skill/scripts/xcode/xcresult.py +451 -0
- package/skills/ios-visual-qa-strategist/SKILL.md +111 -0
- package/skills/ios-visual-qa-strategist/agents/openai.yaml +4 -0
- package/skills/ios-visual-qa-strategist/references/ios-tool-selection.md +61 -0
- package/skills/ios-visual-qa-strategist/references/minimal-capture-policy.md +56 -0
- package/skills/ios-visual-qa-strategist/references/visual-reasoning-heuristics.md +53 -0
- package/skills/orchestrator/SKILL.md +0 -20
- package/skills/persistent-storage/SKILL.md +55 -0
- package/skills/short-maker/SKILL.md +23 -0
- package/skills/short-maker/scripts/effects.js +56 -0
- package/skills/short-maker/scripts/shortmaker-bridge.js +332 -0
- package/skills/short-maker/scripts/videomix.js +601 -0
- package/skills/short-maker/templates/hyperframes/cinematic-character.template.html +172 -0
- package/skills/short-maker/templates/hyperframes/index.template.html +194 -0
- package/skills/smali-to-kotlin/SKILL.md +128 -0
- package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
- package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
- package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
- package/skills/smali-to-kotlin/library-patterns.md +189 -0
- package/skills/smali-to-kotlin/phase-0-discovery.md +128 -0
- package/skills/smali-to-kotlin/phase-1-architecture.md +166 -0
- package/skills/smali-to-kotlin/phase-2-blueprint-ui.md +347 -0
- package/skills/smali-to-kotlin/phase-2-blueprint.md +228 -0
- package/skills/smali-to-kotlin/phase-3-build.md +248 -0
- package/skills/smali-to-kotlin/phase-3-logic-build.md +268 -0
- package/skills/smali-to-kotlin/smali-reading-guide.md +310 -0
- package/skills/smali-to-kotlin/templates/app-map.md +101 -0
- package/skills/smali-to-kotlin/templates/architecture.md +142 -0
- package/skills/smali-to-kotlin/templates/blueprint.md +145 -0
- package/skills/spec-gate/SKILL.md +6 -2
- package/skills/symphony-enforcer/SKILL.md +8 -0
- package/skills/symphony-enforcer/examples/mindful-stop.md +2 -0
- package/skills/symphony-enforcer/examples/three-phase.md +16 -0
- package/skills/symphony-enforcer/examples/trigger-points.md +7 -1
- package/skills/unity-game-development/SKILL.md +231 -0
- package/skills/video-edit/SKILL.md +36 -0
- package/skills/video-edit/scripts/video_edit.py +324 -0
- package/templates/project-identity/android.json +2 -2
- package/templates/project-identity/backend-nestjs.json +2 -2
- package/templates/project-identity/expo.json +2 -2
- package/templates/project-identity/ios.json +2 -2
- package/templates/project-identity/web-nextjs.json +2 -2
- package/templates/setup-mapping.json +48 -0
- package/templates/specs/design-template.md +161 -71
- package/templates/specs/requirements-template.md +65 -133
- package/templates/specs/task-spec-template.xml +3 -0
- package/workflows/_uncategorized/critic.md +40 -0
- package/workflows/_uncategorized/git-rebase-flow.md +81 -0
- package/workflows/_uncategorized/image-gen.md +118 -0
- package/workflows/_uncategorized/multi-model-pipeline.md +60 -0
- package/workflows/_uncategorized/pixel-gen.md +86 -0
- package/workflows/_uncategorized/pixel-setup.md +90 -0
- package/workflows/_uncategorized/ponytail-review.md +59 -0
- package/workflows/_uncategorized/reverse-android-build.md +222 -0
- package/workflows/_uncategorized/reverse-android-design.md +139 -0
- package/workflows/_uncategorized/reverse-android-discover.md +150 -0
- package/workflows/_uncategorized/reverse-android-scan.md +158 -0
- package/workflows/_uncategorized/reverse-android.md +143 -0
- package/workflows/_uncategorized/reverse-ios-build.md +240 -0
- package/workflows/_uncategorized/reverse-ios-design.md +112 -0
- package/workflows/_uncategorized/reverse-ios-discover.md +120 -0
- package/workflows/_uncategorized/reverse-ios-scan.md +155 -0
- package/workflows/_uncategorized/reverse-ios.md +152 -0
- package/workflows/_uncategorized/safety-router.md +34 -0
- package/workflows/_uncategorized/teach.md +89 -0
- package/workflows/_uncategorized/verify-ui.md +53 -0
- package/workflows/_uncategorized/visualize-screenshots.md +34 -0
- package/workflows/ads/ads-analyst.md +201 -0
- package/workflows/ads/ads-audit.md +106 -0
- package/workflows/ads/ads-optimize.md +97 -0
- package/workflows/ads/ads-targeting.md +241 -0
- package/workflows/ads/adsExpert.md +160 -0
- package/workflows/ads/smali-ads-config.md +400 -0
- package/workflows/ads/smali-ads-flow.md +331 -0
- package/workflows/ads/smali-ads-interstitial.md +377 -0
- package/workflows/ads/smali-ads-native.md +382 -0
- package/workflows/context/teach.md +89 -0
- package/workflows/gitnexus.md +8 -8
- package/workflows/lifecycle/brainstorm.md +43 -0
- package/workflows/lifecycle/code.md +5 -0
- package/workflows/lifecycle/init.md +23 -5
- package/workflows/lifecycle/multi-model-pipeline.md +60 -0
- package/workflows/quality/ponytail-review.md +59 -0
- package/workflows/roles/critic.md +40 -0
- package/workflows/roles/safety-router.md +34 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hatch-pet
|
|
3
|
+
description: Create, repair, validate, preview, and package Codex-compatible animated pet spritesheets from character art, screenshots, generated images, or visual references. Use when a user wants to hatch a Codex pet, create a custom animated pet, or build a built-in pet asset with an 8x9 atlas, transparent unused cells, row-by-row animation prompts, QA contact sheets, preview videos, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hatch Pet
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Create a Codex-compatible animated pet from a concept, one or more reference images, or both. This skill owns pet-specific prompt planning, animation rows, frame extraction, atlas geometry, QA, previews, and packaging. It delegates visual generation to `$imagegen`.
|
|
11
|
+
|
|
12
|
+
User-facing inputs are optional. If the user omits a pet name, infer one from the concept or reference filenames; if that is not possible, choose a short appropriate name. If the user omits a description, infer one from the concept or references. If the user omits reference images, generate the base pet from text first, then use that base as the canonical reference for every animation row.
|
|
13
|
+
|
|
14
|
+
## Generation Delegation
|
|
15
|
+
|
|
16
|
+
Use `$imagegen` for all normal visual generation.
|
|
17
|
+
|
|
18
|
+
Before generating base art, row strips, or repair rows, load and follow the installed image generation skill:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
${CODEX_HOME:-$HOME/.codex}/skills/.system/imagegen/SKILL.md
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Do not call the Image API directly for the normal path. Let `$imagegen` choose its own built-in-first path and its own CLI fallback rules. If `$imagegen` says a fallback requires confirmation, ask the user before continuing.
|
|
25
|
+
|
|
26
|
+
Fallback providers are opt-in only and require explicit user request plus both `OPENAI_API_KEY` and `OPENROUTER_API_KEY`.
|
|
27
|
+
Do not precheck, mention, or require provider API keys unless the user explicitly requests fallback.
|
|
28
|
+
|
|
29
|
+
When invoking `$imagegen` from this skill, pass the generated pet prompt as the authoritative visual spec. Do not wrap it in the generic `$imagegen` shared prompt schema and do not add extra polish, hero-art, photo, product, or illustration-style augmentation. Pet prompts should stay terse, sprite-specific, and digital-pet oriented; only add role labels for input images and any essential user constraint.
|
|
30
|
+
|
|
31
|
+
Use this skill's scripts for deterministic work only: preparing prompts and manifests, ingesting selected `$imagegen` outputs, extracting frames, validating rows, composing the final atlas, creating QA media, and packaging.
|
|
32
|
+
|
|
33
|
+
Hard boundary: do not create, draw, tile, warp, mirror, or synthesize pet visuals with local Python/Pillow scripts, SVG, canvas, HTML/CSS, or other code-native art as a substitute for `$imagegen`. For a normal pet run, expect up to 10 visual generation jobs: 1 base pet plus 9 row-strip jobs. The only exception is `running-left`, which may be derived by mirroring `running-right` only after `running-right` has been generated, visually inspected, and explicitly approved as safe to mirror. If mirroring is not appropriate, generate `running-left` as a normal grounded `$imagegen` row. If those calls are too expensive, blocked, or unavailable, stop and explain the blocker instead of fabricating row strips locally.
|
|
34
|
+
|
|
35
|
+
Do not mark visual jobs complete by editing `imagegen-jobs.json`, copying files into `decoded/`, or writing helper scripts that populate row outputs. Use `record_imagegen_result.py` for selected built-in `$imagegen` outputs, or `generate_pet_images.py` only for the documented secondary fallback. The deterministic scripts may only process already-generated visual outputs.
|
|
36
|
+
|
|
37
|
+
Only the base job may be prompt-only. Every row-strip job generated through `$imagegen` must use the input images listed in `imagegen-jobs.json`, including the canonical base reference created after the base job is recorded. Treat any row generation without attached grounding images as invalid.
|
|
38
|
+
|
|
39
|
+
## Codex Digital Pet Style
|
|
40
|
+
|
|
41
|
+
Default pet art should match the Codex app's built-in digital pets using a smooth vector-2D look: compact chibi mascots, readable silhouettes, crisp dark outlines, controlled anti-aliased edges, simplified palettes, flat-to-soft cel shading, and simple expressive faces. Even if the reference art is more detailed, complex or realistic, the generated pet should be simplified into this style.
|
|
42
|
+
|
|
43
|
+
Do NOT generate polished illustration, painterly rendering, anime key art, 3D rendering, glossy app-icon treatment, realistic fur or material texture, soft gradients, high-detail antialiasing, and complex tiny accessories. References that are more detailed than this should be simplified into the house style before row generation.
|
|
44
|
+
|
|
45
|
+
## Transparency And Effects
|
|
46
|
+
|
|
47
|
+
Pet rows are processed into transparent 192x208 cells, so every generated pixel must either belong to the pet sprite or be cleanly removable chroma-key background. Prefer pose, expression, and silhouette changes over decorative effects.
|
|
48
|
+
|
|
49
|
+
Allowed effects must satisfy all of these conditions:
|
|
50
|
+
|
|
51
|
+
- The effect is state-relevant and helps explain the animation.
|
|
52
|
+
- The effect is physically attached to, touching, or overlapping the pet silhouette, not floating nearby.
|
|
53
|
+
- The effect is inside the same frame slot as the pet and does not create a separate sprite component.
|
|
54
|
+
- The effect is opaque, clean-edged, stylistically consistent with smooth 2D vector rendering, and uses non-chroma-key colors.
|
|
55
|
+
- The effect is small enough to remain readable at 192x208 without clutter.
|
|
56
|
+
|
|
57
|
+
Examples of allowed effects: a tear touching the face, a small smoke puff touching the box or head, or tiny stars overlapping the pet during a failed/dizzy reaction.
|
|
58
|
+
|
|
59
|
+
Avoid these by default because they usually break transparent-background cleanup or component extraction:
|
|
60
|
+
|
|
61
|
+
- wave marks, motion arcs, speed lines, action streaks, afterimages, blur, or smears
|
|
62
|
+
- detached stars, loose sparkles, floating punctuation, floating icons, falling tear drops, separated smoke clouds, or loose dust
|
|
63
|
+
- cast shadows, contact shadows, drop shadows, oval floor shadows, floor patches, landing marks, impact bursts, glow, halo, aura, or soft transparent effects
|
|
64
|
+
- text, labels, frame numbers, visible grids, guide marks, speech bubbles, thought bubbles, UI panels, code snippets, checkerboard transparency, white backgrounds, black backgrounds, or scenery
|
|
65
|
+
- chroma-key-adjacent colors in the pet, prop, effects, highlights, or shadows
|
|
66
|
+
- stray pixels, disconnected outline bits, speckle/noise, cropped body parts, overlapping poses, or any pose that crosses into a neighboring frame slot
|
|
67
|
+
|
|
68
|
+
State-specific guidance:
|
|
69
|
+
|
|
70
|
+
- `waving`: show the wave through paw pose only. Do not draw wave marks, motion arcs, lines, sparkles, or symbols around the paw.
|
|
71
|
+
- `jumping`: show vertical motion through body position only. Do not draw shadows, dust, landing marks, impact bursts, bounce pads, or floor cues.
|
|
72
|
+
- `failed`: tears, attached smoke puffs, or attached stars are allowed if they obey the allowed-effects rules; do not use red X marks, floating symbols, detached smoke, detached stars, or separate tear droplets.
|
|
73
|
+
- `review`: show focus through lean, blink, eyes, head tilt, or paw position. Do not add magnifying glasses, papers, code, UI, punctuation, or symbols unless that prop already exists in the base pet identity.
|
|
74
|
+
- `running-right`, `running-left`, and `running`: show locomotion through body, limb, and prop movement only. Do not draw speed lines, dust clouds, floor shadows, or motion trails.
|
|
75
|
+
|
|
76
|
+
## Pet Naming
|
|
77
|
+
|
|
78
|
+
Ask the user for a pet name when they have not provided one and only if the conversation naturally allows it. If asking would slow down a direct execution request, choose a short appropriate name from the pet concept, reference image, or personality, then use that name consistently as the display name and as the source for the package folder slug.
|
|
79
|
+
|
|
80
|
+
Good built-in style examples:
|
|
81
|
+
|
|
82
|
+
- Codex - The original Codex companion.
|
|
83
|
+
- Dewey - A tidy duck for calm workspace days.
|
|
84
|
+
- Fireball - Hot path energy for fast iteration.
|
|
85
|
+
- Rocky - A steady rock when the diff gets large.
|
|
86
|
+
- Seedy - Small green shoots for new ideas.
|
|
87
|
+
- Stacky - A balanced stack for deep work.
|
|
88
|
+
- BSOD - A tiny blue-screen gremlin.
|
|
89
|
+
- Null Signal - Quiet signal from the void.
|
|
90
|
+
|
|
91
|
+
## Visible Progress Plan
|
|
92
|
+
|
|
93
|
+
For every pet run, keep a visible checklist so the user can see where the work is up to. Create the checklist before starting, keep one step active at a time, and update it as each step finishes.
|
|
94
|
+
|
|
95
|
+
Before creating the checklist, establish the pet name when possible. Use the user-provided name when available; otherwise infer a short appropriate name from the concept or references. If the name is too long, not settled, or not appropriate for a friendly checklist, use `your pet` instead.
|
|
96
|
+
|
|
97
|
+
Use this checklist for a normal pet run, replacing `<Pet>` with the pet's name or `your pet`:
|
|
98
|
+
|
|
99
|
+
1. Getting `<Pet>` ready.
|
|
100
|
+
2. Imagining `<Pet>`'s main look.
|
|
101
|
+
3. Picturing `<Pet>`'s poses.
|
|
102
|
+
4. Hatching `<Pet>`.
|
|
103
|
+
|
|
104
|
+
What each step means:
|
|
105
|
+
|
|
106
|
+
- `Getting <Pet> ready.` Choose or confirm the pet name, description, source images, and working folder.
|
|
107
|
+
- `Imagining <Pet>'s main look.` Generate the pet's main reference image. This is required for new pets, even when the user does not provide an image, because it becomes the visual source of truth.
|
|
108
|
+
- `Picturing <Pet>'s poses.` Create the pose rows, starting with `idle` and `running-right` to confirm the pet still looks consistent. Only mirror `running-left` if `running-right` clearly works when flipped.
|
|
109
|
+
- `Hatching <Pet>.` Turn the approved poses into the final pet files, review the contact sheet, previews, and validation results, fix any broken parts, save `pet.json` and `spritesheet.webp` into the pet folder, then tell the user where the pet and QA files were saved.
|
|
110
|
+
|
|
111
|
+
Only mark a step complete when the real file, image, or decision exists. If this is just a repair run, start from the first relevant step instead of restarting the whole checklist.
|
|
112
|
+
|
|
113
|
+
## Default Workflow
|
|
114
|
+
|
|
115
|
+
1. Prepare a pet run folder and imagegen job manifest:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
SKILL_DIR="${CODEX_HOME:-$HOME/.codex}/skills/hatch-pet"
|
|
119
|
+
python "$SKILL_DIR/scripts/prepare_pet_run.py" \
|
|
120
|
+
--pet-name "<Name>" \
|
|
121
|
+
--description "<one sentence>" \
|
|
122
|
+
--reference /absolute/path/to/reference.png \
|
|
123
|
+
--output-dir /absolute/path/to/run \
|
|
124
|
+
--pet-notes "<stable pet description>" \
|
|
125
|
+
--style-notes "<style notes>" \
|
|
126
|
+
--force
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
All arguments above are optional except any flags needed to express user constraints. For text-only requests, pass the concept through `--pet-notes` and omit `--reference`; `prepare_pet_run.py` will infer a name, description, chroma key, and output directory as needed.
|
|
130
|
+
|
|
131
|
+
2. Inspect the next ready `$imagegen` jobs:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
python "$SKILL_DIR/scripts/pet_job_status.py" --run-dir /absolute/path/to/run
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
3. For each ready job, invoke `$imagegen` with:
|
|
138
|
+
|
|
139
|
+
- the prompt file listed in `imagegen-jobs.json`
|
|
140
|
+
- every input image listed for the job, with its role label
|
|
141
|
+
- the default built-in `image_gen` path unless `$imagegen` itself routes otherwise
|
|
142
|
+
|
|
143
|
+
The base job must complete first. If user references exist, the base job uses them. If no references exist, the base job may be prompt-only. After recording the base, `record_imagegen_result.py` writes `decoded/base.png` and `references/canonical-base.png`; all row jobs use the original references if present plus those canonical base images.
|
|
144
|
+
|
|
145
|
+
`prepare_pet_run.py` also creates 9 row-specific layout guide images under `references/layout-guides/`, one per animation state. Row jobs attach the matching guide as a layout-only input so the model can follow the correct frame count, spacing, centering, and safe padding. Treat these guides as invisible construction references: the generated row strip must not include visible boxes, borders, center marks, labels, guide colors, or the guide background.
|
|
146
|
+
|
|
147
|
+
When generating row strips, keep the identity lock in the row prompt authoritative: do not redesign the pet, and preserve the same head shape, face, markings, palette, prop, outline weight, body proportions, and silhouette. A row that looks like a related but different pet is failed even if the deterministic geometry QA passes.
|
|
148
|
+
|
|
149
|
+
Generate and record `running-right` before deciding how to complete `running-left`. Inspect `running-right` against the base and references. If the pet is visually symmetric enough that a horizontal mirror preserves identity, prop placement, handedness, markings, lighting, text-free details, and direction semantics, derive `running-left` with:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
python "$SKILL_DIR/scripts/derive_running_left_from_running_right.py" \
|
|
153
|
+
--run-dir /absolute/path/to/run \
|
|
154
|
+
--confirm-appropriate-mirror \
|
|
155
|
+
--decision-note "<why mirroring preserves this pet's identity>"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
If there is any asymmetric side-specific marking, readable text, non-mirrored logo, handed prop, one-sided accessory, lighting cue, or direction-specific pose that would become wrong when flipped, do not mirror. Generate `running-left` with `$imagegen` using its row prompt and all listed grounding images, including `decoded/running-right.png` as a gait reference.
|
|
159
|
+
|
|
160
|
+
For the built-in path, record the selected source image from `$CODEX_HOME/generated_images/.../ig_*.png`. Do not record files from the run directory, `tmp/`, hand-made fixtures, deterministic row folders, or post-processed copies as visual job sources.
|
|
161
|
+
|
|
162
|
+
4. After selecting a generated output for a job, ingest it:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
python "$SKILL_DIR/scripts/record_imagegen_result.py" \
|
|
166
|
+
--run-dir /absolute/path/to/run \
|
|
167
|
+
--job-id <job-id> \
|
|
168
|
+
--source /absolute/path/to/generated-output.png
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This copies the image to the exact decoded path expected by the deterministic pipeline and records source metadata in `imagegen-jobs.json`.
|
|
172
|
+
|
|
173
|
+
5. When all jobs are complete, finalize:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
python "$SKILL_DIR/scripts/finalize_pet_run.py" \
|
|
177
|
+
--run-dir /absolute/path/to/run
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Expected output:
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
run/
|
|
184
|
+
pet_request.json
|
|
185
|
+
imagegen-jobs.json
|
|
186
|
+
prompts/
|
|
187
|
+
decoded/
|
|
188
|
+
frames/frames-manifest.json
|
|
189
|
+
final/spritesheet.png
|
|
190
|
+
final/spritesheet.webp
|
|
191
|
+
final/validation.json
|
|
192
|
+
qa/contact-sheet.png
|
|
193
|
+
qa/review.json
|
|
194
|
+
qa/run-summary.json
|
|
195
|
+
qa/videos/*.mp4
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Package output is written outside the run directory by default. If `CODEX_HOME` is set, use it; otherwise use `$HOME/.codex`.
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/
|
|
202
|
+
pet.json
|
|
203
|
+
spritesheet.webp
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
For project-owned pets, also promote the approved package into the app's canonical project asset directory before calling the work done:
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
assets/pets/<pet-slug>/
|
|
210
|
+
pet.json
|
|
211
|
+
spritesheet.webp
|
|
212
|
+
pet_manifest.json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The run directory is only a staging workspace. Canonical project manifests must describe the promoted files in `assets/pets/<pet-slug>/`, not the temporary run paths. If the pet is only for the Codex app, `${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/` may be the canonical package, but say that explicitly.
|
|
216
|
+
|
|
217
|
+
After the package is promoted, manifests point at canonical files, and verification passes, proactively clean the staging run by moving it to Trash or an archive outside the repo. Do not delete canonical packages, user references, or approved source files that are still needed for future repairs.
|
|
218
|
+
|
|
219
|
+
Review `qa/contact-sheet.png`, `qa/review.json`, `final/validation.json`, and `qa/videos/` before accepting the pet.
|
|
220
|
+
|
|
221
|
+
Deterministic validation is necessary but not sufficient. Before calling the pet done, visually inspect the contact sheet for identity consistency. Block acceptance if any row changes species/body type, face, markings, palette, prop design, prop side unexpectedly, or overall silhouette.
|
|
222
|
+
|
|
223
|
+
## Subagent Row Generation
|
|
224
|
+
|
|
225
|
+
After the base job has been recorded and `references/canonical-base.png` exists, row-strip visual generation must use subagents unless the user explicitly says not to use subagents for this session. Before row generation, state that subagents are being used and which row jobs are being delegated. If subagents cannot be spawned because the current environment or tool policy blocks them, stop before row-strip generation, explain the blocker, and ask for explicit user direction before continuing sequentially.
|
|
226
|
+
|
|
227
|
+
The parent agent must own the manifest and package writes.
|
|
228
|
+
|
|
229
|
+
Default flow:
|
|
230
|
+
|
|
231
|
+
1. Parent runs `prepare_pet_run.py`.
|
|
232
|
+
2. Parent generates and records `base`.
|
|
233
|
+
3. Parent runs `pet_job_status.py`.
|
|
234
|
+
4. Parent spawns subagents for `idle` and `running-right` first as identity and gait checks.
|
|
235
|
+
5. Parent records the selected `idle` and `running-right` results returned by subagents.
|
|
236
|
+
6. Parent decides whether `running-left` is safe to derive by mirror; if not, parent treats it as a normal grounded row job delegated to a subagent.
|
|
237
|
+
7. Parent spawns subagents for every remaining non-derived row image-generation job.
|
|
238
|
+
8. Each subagent receives the row prompt and every listed input image path, invokes `$imagegen`, and returns only the selected `$CODEX_HOME/generated_images/.../ig_*.png` source path.
|
|
239
|
+
9. Parent alone runs `record_imagegen_result.py`, `derive_running_left_from_running_right.py`, repair queueing, finalization, QA, and packaging.
|
|
240
|
+
|
|
241
|
+
Subagent write boundary: do not let subagents edit `imagegen-jobs.json`, copy files into `decoded/`, run `record_imagegen_result.py`, run `derive_running_left_from_running_right.py`, run `finalize_pet_run.py`, or package the pet. This avoids manifest races and keeps provenance checks centralized.
|
|
242
|
+
|
|
243
|
+
Subagent handoff contract:
|
|
244
|
+
|
|
245
|
+
- Give each subagent exactly one row job unless you are intentionally batching adjacent simple rows.
|
|
246
|
+
- Include the row id, the absolute prompt file path, the full prompt text or an instruction to read that exact prompt file, and every input image path with its role label from `imagegen-jobs.json`.
|
|
247
|
+
- Explicitly remind the subagent that the prompt's transparency and effects rules are mandatory: no detached effects, no wave marks for `waving`, no speed lines or dust for running rows, and only attached opaque sprite-like tears/smoke/stars when allowed by the state prompt.
|
|
248
|
+
- Tell the subagent to inspect the generated candidate for frame count, identity consistency, clean flat chroma-key background, safe spacing, and forbidden detached effects before returning it.
|
|
249
|
+
- Tell the subagent to return only the selected original `$CODEX_HOME/generated_images/.../ig_*.png` source path plus a one-sentence QA note. The parent decides whether to record or repair it.
|
|
250
|
+
|
|
251
|
+
Use this template for each subagent:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
Generate the `<row-id>` row for this hatch-pet run.
|
|
255
|
+
|
|
256
|
+
Run dir: <absolute run dir>
|
|
257
|
+
Prompt file: <absolute prompt file>
|
|
258
|
+
Input images:
|
|
259
|
+
- <absolute path> — <role>
|
|
260
|
+
- <absolute path> — <role>
|
|
261
|
+
|
|
262
|
+
Read and follow the row prompt exactly, including the Transparency and artifact rules. Use `$imagegen` only; do not use local scripts to draw, tile, edit, or synthesize sprites.
|
|
263
|
+
|
|
264
|
+
Before returning, visually check:
|
|
265
|
+
- exact requested frame count
|
|
266
|
+
- same pet identity as the canonical base
|
|
267
|
+
- clean flat chroma-key background
|
|
268
|
+
- complete, separated, unclipped poses
|
|
269
|
+
- no forbidden detached effects or slot-crossing artifacts
|
|
270
|
+
|
|
271
|
+
Do not edit manifests, copy into decoded, record results, mirror rows, finalize, repair, or package. Return only:
|
|
272
|
+
selected_source=/absolute/path/to/$CODEX_HOME/generated_images/.../ig_*.png
|
|
273
|
+
qa_note=<one sentence>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
No silent sequential fallback: if subagents cannot be used for row-strip visual generation, stop and ask for explicit user direction before continuing without them. Only an explicit user instruction such as "do not use subagents" or "run this sequentially" authorizes a normal sequential row-generation path. The final answer must report which row jobs were delegated to subagents and which, if any, were mirrored or repaired by the parent.
|
|
277
|
+
|
|
278
|
+
## Repair Workflow
|
|
279
|
+
|
|
280
|
+
If finalization stops because row QA failed, queue targeted repair jobs:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
python "$SKILL_DIR/scripts/queue_pet_repairs.py" \
|
|
284
|
+
--run-dir /absolute/path/to/run
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Then repeat the `$imagegen` generation and `record_imagegen_result.py` ingest loop for each reopened row job. Regenerate the smallest failing scope: the failed row, not the whole sheet.
|
|
288
|
+
|
|
289
|
+
For identity repairs, use the canonical base image, original references, contact sheet, and exact row failure note as grounding context. Repair only the failed row while preserving the canonical pet identity.
|
|
290
|
+
|
|
291
|
+
## Secondary Image Generation Fallback
|
|
292
|
+
|
|
293
|
+
`scripts/generate_pet_images.py` is a secondary fallback for this skill.
|
|
294
|
+
|
|
295
|
+
Use it only when the installed `$imagegen` system skill is unavailable or cannot be invoked in the current environment, and only after explicit user request to use fallback. Normal pet creation should delegate visual generation to `$imagegen`, because `$imagegen` owns the built-in-first image generation policy and its own CLI fallback behavior.
|
|
296
|
+
|
|
297
|
+
Run the secondary fallback only after explaining why `$imagegen` cannot be used:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
python "$SKILL_DIR/scripts/generate_pet_images.py" \
|
|
301
|
+
--run-dir /absolute/path/to/run \
|
|
302
|
+
--model gpt-image-2 \
|
|
303
|
+
--states all
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
The secondary fallback requires both `OPENAI_API_KEY` and `OPENROUTER_API_KEY`.
|
|
307
|
+
|
|
308
|
+
## Chroma Noise Recovery
|
|
309
|
+
|
|
310
|
+
Use this recovery path only when a generated strip has a visibly noisy chroma background (for example, magenta background with grain, compression speckle, or mottled non-flat patches) that causes dirty alpha after normal keying.
|
|
311
|
+
|
|
312
|
+
Do not run this on assets that already have clean alpha or clean flat chroma.
|
|
313
|
+
|
|
314
|
+
Recommended recovery sequence:
|
|
315
|
+
|
|
316
|
+
1. Flatten noisy background to a uniform chroma field.
|
|
317
|
+
2. Key out chroma with a lower fuzz pass to protect character edges.
|
|
318
|
+
3. Generate a dark-background preview for edge QA.
|
|
319
|
+
|
|
320
|
+
Reference command pattern (ImageMagick):
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
magick input.png -alpha off -fuzz 35% -fill '#FF00FF' -opaque '#FF00FF' bg_flattened.png
|
|
324
|
+
magick bg_flattened.png -alpha set -fuzz 4% -transparent '#FF00FF' chroma_clean.png
|
|
325
|
+
magick chroma_clean.png -background '#222222' -alpha background chroma_clean_preview.png
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Default parameter ranges:
|
|
329
|
+
|
|
330
|
+
- flatten fuzz: `30-40%` (background normalization pass)
|
|
331
|
+
- key fuzz: `3-6%` (alpha extraction pass)
|
|
332
|
+
- preview background: dark neutral (`#222222` or similar)
|
|
333
|
+
|
|
334
|
+
Guardrails:
|
|
335
|
+
|
|
336
|
+
- If edge erosion appears (thin outlines or small features disappear), reduce flatten fuzz and/or key fuzz.
|
|
337
|
+
- If magenta fringe remains, increase key fuzz gradually (small steps).
|
|
338
|
+
- Keep this recovery scoped to the affected strip/state; do not batch-apply blindly to every row.
|
|
339
|
+
- Preserve original generated source files and write recovered outputs as new files.
|
|
340
|
+
- After recovery, re-run normal frame extraction/QA (`inspect_frames.py`, contact sheet review, and atlas validation).
|
|
341
|
+
|
|
342
|
+
## Soft Chroma Edge Cleanup
|
|
343
|
+
|
|
344
|
+
Use this cleanup path when final pet frames or the composed spritesheet have visible magenta/pink chroma fringe after normal extraction. This is for already-transparent PNG outputs, not raw opaque chroma strips.
|
|
345
|
+
|
|
346
|
+
Use the bundled deterministic cleaner:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
SKILL_DIR="${CODEX_HOME:-$HOME/.codex}/skills/hatch-pet"
|
|
350
|
+
python "$SKILL_DIR/scripts/clean_chroma_edges.py" /absolute/path/to/run/frames --edge-despill
|
|
351
|
+
python "$SKILL_DIR/scripts/clean_chroma_edges.py" /absolute/path/to/run/frames --edge-despill --apply
|
|
352
|
+
python "$SKILL_DIR/scripts/clean_chroma_edges.py" /absolute/path/to/run/frames --edge-despill
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Default behavior:
|
|
356
|
+
|
|
357
|
+
- Recurses through PNG files under the provided run path.
|
|
358
|
+
- Soft-keys low-alpha pixels near the run's chroma color when they survived extraction.
|
|
359
|
+
- Bleeds nearby foreground RGB into transparent edge pixels so app scaling cannot sample hidden chroma.
|
|
360
|
+
- With `--edge-despill`, repairs opaque baked-in pink/purple spill along the alpha edge while protecting interior colors.
|
|
361
|
+
|
|
362
|
+
Preferred pet sequence:
|
|
363
|
+
|
|
364
|
+
1. Run `finalize_pet_run.py` normally.
|
|
365
|
+
2. Inspect `qa/contact-sheet.png` and preview videos.
|
|
366
|
+
3. If magenta fringe remains, run the cleaner on `/run/frames` with `--edge-despill`.
|
|
367
|
+
4. Recompose the atlas from cleaned frames:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
python "$SKILL_DIR/scripts/compose_atlas.py" \
|
|
371
|
+
--frames-root /absolute/path/to/run/frames \
|
|
372
|
+
--output /absolute/path/to/run/final/spritesheet.png \
|
|
373
|
+
--webp-output /absolute/path/to/run/final/spritesheet.webp
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
5. Re-run validation, contact sheet/video QA, and packaging. If the pet was already promoted, re-copy the cleaned `spritesheet.webp` into the canonical pet package and re-check `pet.json`.
|
|
377
|
+
|
|
378
|
+
Guardrails:
|
|
379
|
+
|
|
380
|
+
- Always run dry-run first and inspect the reported file count.
|
|
381
|
+
- Do not run this on raw generated row strips with opaque chroma backgrounds; use Chroma Noise Recovery first, then extraction.
|
|
382
|
+
- Stop if outlines, tiny markings, or required attached effects are being eroded.
|
|
383
|
+
- Treat repeated non-zero dry-runs after two passes as a visual-review item, not an infinite cleanup loop.
|
|
384
|
+
- Keep original generated sources unchanged; cleanup only deterministic frame or final spritesheet outputs.
|
|
385
|
+
|
|
386
|
+
## Rules
|
|
387
|
+
|
|
388
|
+
- Keep `$imagegen` as the primary generation layer.
|
|
389
|
+
- Keep reference images attached/visible for `$imagegen` whenever the chosen path supports references.
|
|
390
|
+
- Attach the row's `references/layout-guides/<state>.png` image to every row-strip job as a layout-only guide, and do not accept outputs that copy guide pixels.
|
|
391
|
+
- Use subagents for row-strip visual generation after the parent records the base image. The parent may generate the base, but row-strip jobs belong to subagents unless the user explicitly says not to use subagents for this session.
|
|
392
|
+
- Generate every normal visual job with `$imagegen`: base plus all row strips that are not explicitly approved `running-left` mirror derivations.
|
|
393
|
+
- Treat only the base job as eligible for prompt-only generation; every row job must attach its listed grounding images.
|
|
394
|
+
- Delegate `running-right` first, then mirror `running-left` only when visual inspection confirms a mirror preserves identity and semantics; otherwise delegate `running-left` as a normal grounded `$imagegen` row.
|
|
395
|
+
- Never substitute locally drawn, tiled, transformed, or code-generated row strips for missing `$imagegen` outputs.
|
|
396
|
+
- Never manually mutate `imagegen-jobs.json` to claim a visual job completed.
|
|
397
|
+
- Do not rely on generated images for exact atlas geometry; use this skill's deterministic scripts.
|
|
398
|
+
- Use the chroma key stored in `pet_request.json`; do not force a fixed green screen.
|
|
399
|
+
- Keep the pet's silhouette, face, materials, palette, and props consistent across all rows.
|
|
400
|
+
- Enforce the transparency and effects rules above in every base, row, and repair prompt.
|
|
401
|
+
- Treat visual identity drift as a blocker even when `qa/review.json` and `final/validation.json` have no errors.
|
|
402
|
+
- Treat a contact sheet that shows cropped references, repeated tiles, white cell backgrounds, or non-sprite fragments as failed.
|
|
403
|
+
- Treat forbidden detached effects, chroma-key-adjacent artifacts, shadows, glows, smears, dust, landing marks, wave marks, speed lines, or motion trails as failed rows.
|
|
404
|
+
- Treat visible magenta/pink edge fringe in final frames, contact sheets, or preview videos as a cleanup blocker; run Soft Chroma Edge Cleanup before accepting the pet.
|
|
405
|
+
- Treat `qa/review.json` errors as blockers. Warnings require visual review.
|
|
406
|
+
- Treat a pet as unfinished if approved files remain only in the staging run and have not been promoted to the declared canonical package location.
|
|
407
|
+
- After successful promotion and verification, clean completed staging runs from the repo by moving them to Trash or an archive; do not use irreversible deletion unless the user explicitly asks.
|
|
408
|
+
|
|
409
|
+
## Acceptance Criteria
|
|
410
|
+
|
|
411
|
+
- Final atlas is PNG or WebP, `1536x1872`, transparent-capable, and based on `192x208` cells.
|
|
412
|
+
- Used cells are non-empty and unused cells are fully transparent.
|
|
413
|
+
- Atlas follows the row/frame counts in `references/animation-rows.md`.
|
|
414
|
+
- Contact sheet and preview videos have been produced unless explicitly skipped.
|
|
415
|
+
- `qa/review.json` has no errors.
|
|
416
|
+
- Row-by-row review confirms the animation cycles are complete enough for the Codex app.
|
|
417
|
+
- Neutral-background contact sheet or preview videos show no visible chroma fringe around the pet at app scale.
|
|
418
|
+
- `${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/pet.json` and `${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/spritesheet.webp` are staged together for custom pets.
|
|
419
|
+
- For project-owned pets, `assets/pets/<pet-slug>/pet.json`, `spritesheet.webp`, and `pet_manifest.json` exist and are the paths referenced by app code or handoff notes.
|
|
420
|
+
- Temporary run folders have been cleaned up or intentionally retained with a short reason.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Hatch Pet"
|
|
3
|
+
short_description: "Hatch Codex-compatible animated pet spritesheets"
|
|
4
|
+
default_prompt: "Hatch a Codex-compatible animated pet from a concept, reference images, or both. Infer missing names/descriptions, use $imagegen for the base and grounded row strips, generate running-right before deciding whether running-left can be safely mirrored, then use this skill's deterministic scripts to ingest outputs, validate frames, assemble the spritesheet, and package the pet under ${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/."
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Animation Rows
|
|
2
|
+
|
|
3
|
+
The Codex app reads one fixed atlas: 8 columns, 9 rows, 192x208 pixels per cell.
|
|
4
|
+
|
|
5
|
+
| Row | State | Used columns | Durations |
|
|
6
|
+
| --- | --- | ---: | --- |
|
|
7
|
+
| 0 | idle | 0-5 | 280, 110, 110, 140, 140, 320 ms |
|
|
8
|
+
| 1 | running-right | 0-7 | 120 ms each, final 220 ms |
|
|
9
|
+
| 2 | running-left | 0-7 | 120 ms each, final 220 ms |
|
|
10
|
+
| 3 | waving | 0-3 | 140 ms each, final 280 ms |
|
|
11
|
+
| 4 | jumping | 0-4 | 140 ms each, final 280 ms |
|
|
12
|
+
| 5 | failed | 0-7 | 140 ms each, final 240 ms |
|
|
13
|
+
| 6 | waiting | 0-5 | 150 ms each, final 260 ms |
|
|
14
|
+
| 7 | running | 0-5 | 120 ms each, final 220 ms |
|
|
15
|
+
| 8 | review | 0-5 | 150 ms each, final 280 ms |
|
|
16
|
+
|
|
17
|
+
Unused cells after each row's final used column must be fully transparent.
|
|
18
|
+
|
|
19
|
+
## Row Purposes
|
|
20
|
+
|
|
21
|
+
- `idle`: neutral breathing/blinking loop; use as the reduced-motion first frame.
|
|
22
|
+
- `running-right`: locomotion to the right; 8-frame loop should read directionally.
|
|
23
|
+
- `running-left`: mirrored or redrawn locomotion to the left; do not simply reuse right-facing frames unless the design is symmetric.
|
|
24
|
+
- `waving`: greeting or attention gesture; clear start, raised gesture, return.
|
|
25
|
+
- `jumping`: anticipation, lift, peak, descent, settle.
|
|
26
|
+
- `failed`: error/sad/deflated reaction; readable but not visually noisy.
|
|
27
|
+
- `waiting`: patient idle variant; glance, small bounce, or prop motion.
|
|
28
|
+
- `running`: generic/front-facing or in-place run loop.
|
|
29
|
+
- `review`: focused/inspecting/thinking loop suitable for review state.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Codex Pet Contract
|
|
2
|
+
|
|
3
|
+
## Sprite Atlas
|
|
4
|
+
|
|
5
|
+
- Format: PNG or WebP.
|
|
6
|
+
- Dimensions: `1536x1872`.
|
|
7
|
+
- Grid: 8 columns x 9 rows.
|
|
8
|
+
- Cell: `192x208`.
|
|
9
|
+
- Background: transparent.
|
|
10
|
+
- Unused cells: fully transparent.
|
|
11
|
+
|
|
12
|
+
The webview animation uses CSS background positions from the fixed row and column counts. Do not add labels, gutters, borders, grid lines, shadows outside the cell, or extra frames.
|
|
13
|
+
|
|
14
|
+
## Local Custom Pet Package
|
|
15
|
+
|
|
16
|
+
Place files under:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
${CODEX_HOME:-$HOME/.codex}/pets/<pet-name>/
|
|
20
|
+
├── pet.json
|
|
21
|
+
└── spritesheet.webp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Manifest shape:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"id": "pet-name",
|
|
29
|
+
"displayName": "Pet Name",
|
|
30
|
+
"description": "One short sentence.",
|
|
31
|
+
"spritesheetPath": "spritesheet.webp"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The app loads custom pets from the folder name under `${CODEX_HOME:-$HOME/.codex}/pets/`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# QA Rubric
|
|
2
|
+
|
|
3
|
+
Do not accept an atlas until all checks pass.
|
|
4
|
+
|
|
5
|
+
## Geometry
|
|
6
|
+
|
|
7
|
+
- Exact `1536x1872` dimensions.
|
|
8
|
+
- 8 columns x 9 rows.
|
|
9
|
+
- Each frame fits inside its `192x208` cell.
|
|
10
|
+
- Unused cells are transparent.
|
|
11
|
+
- `qa/review.json` has no errors.
|
|
12
|
+
- `frames/frames-manifest.json` records component extraction for production rows, unless slot extraction was intentionally accepted after visual inspection.
|
|
13
|
+
|
|
14
|
+
## Character Consistency
|
|
15
|
+
|
|
16
|
+
- Same silhouette and proportions across every row.
|
|
17
|
+
- Same face and expression language.
|
|
18
|
+
- Same material, palette, lighting, and prop design.
|
|
19
|
+
- No frame introduces a new unintended character or object.
|
|
20
|
+
|
|
21
|
+
## Sprite Style
|
|
22
|
+
|
|
23
|
+
- Art reads as a Codex digital pet sprite with smooth vector-2D clarity, not a glossy app icon.
|
|
24
|
+
- Silhouette is compact and readable inside a `192x208` cell.
|
|
25
|
+
- Outlines are crisp, dark, and consistent, with controlled anti-aliased edges.
|
|
26
|
+
- Palette is simplified, with flat-to-soft cel shading that remains legible at pet size.
|
|
27
|
+
- No painterly texture, realistic fur/material detail, noisy micro-texture, or tiny accessories that disappear at pet size.
|
|
28
|
+
|
|
29
|
+
## Animation Completeness
|
|
30
|
+
|
|
31
|
+
- Each row uses the exact expected number of frames.
|
|
32
|
+
- The first and last frames can loop without an obvious pop.
|
|
33
|
+
- Directional rows read as the intended direction.
|
|
34
|
+
- State-specific actions are recognizable at pet size.
|
|
35
|
+
- Poses are generated animation variants, not repeated copies of the same source image.
|
|
36
|
+
|
|
37
|
+
## App Fitness
|
|
38
|
+
|
|
39
|
+
- First idle frame works as a static reduced-motion pet.
|
|
40
|
+
- No important detail is too small to read.
|
|
41
|
+
- No frame is clipped by the cell.
|
|
42
|
+
- Failed/review/waiting states are distinct from ordinary idle.
|
|
43
|
+
- Contact sheets must show whole sprite poses inside cells, not cropped tiles from a larger reference image.
|
|
44
|
+
- Contact sheets must not be accepted if every used frame is just the reference image with small geometric transforms.
|
|
45
|
+
- Used cells must not have white or opaque rectangular backgrounds unless the pet intentionally fills the whole cell and the user accepts that tradeoff.
|
|
46
|
+
- The chroma key must be visually absent from the character. If extraction removes character regions, choose a different key and regenerate the affected base/rows.
|
|
47
|
+
- Contact sheets must not show edge slivers or partial neighboring sprites inside cells.
|
|
48
|
+
- Contact sheets must not show darker/lighter versions of the chroma key as shadows, dust, smears, glows, landing marks, or motion effects. These are background extraction failures and should trigger row repair.
|
|
49
|
+
- If `qa/review.json` reports edge pixels, sparse frames, size outliers, or slot-extraction fallback, inspect the row visually and repair it when the issue is visible.
|
|
50
|
+
- If `qa/review.json` reports chroma-adjacent non-transparent pixels, repair the row unless those pixels are an intentional character color and the selected key was manually accepted.
|
|
51
|
+
|
|
52
|
+
## Repair Policy
|
|
53
|
+
|
|
54
|
+
Repair the smallest failing scope first:
|
|
55
|
+
|
|
56
|
+
1. Single bad frame.
|
|
57
|
+
2. One row.
|
|
58
|
+
3. Full atlas regeneration only when identity or layout is broadly broken.
|
|
59
|
+
|
|
60
|
+
The normal production path should queue targeted repair jobs for failing rows. Manual repair should preserve the same run directory and regenerate only the affected row prompt/image unless the base character is wrong.
|