Add hatch-me curated skill#407
Draft
areporeporepo wants to merge 2 commits into
Draft
Conversation
A first-person sibling of hatch-pet: hatches a tiny Codex baby
deterministically derived from the user's date of birth. Computes the
lunar phase at the moment of birth and cross-verifies it against NASA
JPL Horizons before baking it into the seed.
How it works
- Ask the user for DOB (date required, time + tz optional).
- Compute moon phase via Meeus, Astronomical Algorithms (2nd ed., 1998):
Ch. 7 Gregorian -> Julian Date
Ch. 47 Mean elements of the Moon (D, M, M')
Ch. 48 Phase angle and illuminated fraction (eq. 48.4)
Ch. 49 Phases of the Moon: JDE of new moon (Table 49.A
+ 14 planetary corrections, pp. 351-352)
- Seed a deterministic Soul via
BLAKE2b("hatch-me-2026|<dob_utc>|<phase_name>|<illum>")
-> SplitMix64-ish PRNG -> name, species, vibe, Bones (5 stats),
personality_seed, zodiac. Same Soul/Bones contract as hatch-pet.
- Persist to ${CODEX_HOME:-$HOME/.codex}/memories/babies/<name>/baby.json
(under memories/ so codex's workspace-write sandbox always permits the
write).
- Print an ASCII birth card with the moon glyph + zodiac. The parent
agent then roleplays as the freshly hatched baby for the rest of the
turn (contract in references/baby-roleplay.md).
Accuracy
- Self-test (scripts/moon_phase.py --self-test) checks four reference
events (USNO/JPL): 2000-01-06 new, 2024-04-08 eclipse new, 2024-04-23
full, 1969-07-20 Apollo 11.
- Live cross-check (--verify) hits JPL Horizons HTTP API (no key,
https://ssd.jpl.nasa.gov/api/horizons.api, body 301 Moon, center
500@399, quantities 10 + 24) and asserts illum delta <= 1.0% and
phase angle delta <= 0.5 degrees.
- Spot check at 1995-08-14 10:20 UTC: meeus 83.89% / 47.33 deg, JPL
83.85% / 47.40 deg, delta +0.04% / -0.07 deg (well within tolerance).
Relationship to existing skills
- hatch-pet (this catalog): generates animated pet spritesheets via
imagegen. Different output (image assets vs JSON Soul). Disjoint flow.
- hatch-mom (community, not in this catalog): seeds the Soul from a
parent Codex session UUID. hatch-me uses the user's DOB instead, and
additionally records the lunar phase at birth.
No external Python dependencies (urllib only for JPL Horizons). License
Apache 2.0, inherited from hatch-pet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
hatch-me, a first-person sibling ofhatch-pet: hatches a tiny Codex baby deterministically derived from the user's date of birth, with the lunar phase at birth baked into the seed.Moon phase via Meeus Astronomical Algorithms (2nd ed., chs. 7/47/48/49), cross-verified against NASA JPL Horizons. Spot check at 1995-08-14 10:20 UTC: Meeus 83.89% illum vs JPL 83.85% (Δ +0.04% / −0.07°).
Test plan
scripts/moon_phase.py --self-test(4 reference events)scripts/moon_phase.py --date <iso> --verify(JPL Horizons, ±1.0% / ±0.5° tolerance)scripts/hatch.py --dob 1990-01-01writesbaby.jsonand is idempotentcodex execend-to-endvs
hatch-pet: image spritesheets viaimagegen. Different output, disjoint flow.No external Python deps (
urllibonly). Apache 2.0, inherited fromhatch-pet. Draft — happy to iterate on naming or directory placement.