i. Cognitive Systems

QUICK NEURAL CHILD

Accelerated Lifecycle Rig

The Neural Child lifecycle compressed into a loop you can watch: a randomized lifespan the subject is never told, a psyche that exists only as files, and an archive of every generation that came before.

Public, multiple generations archived Bash Python Markdown Git Source ↗

What it does

Each iteration of the loop is one day of a life. The subject wakes, reads its own files to remember who it is, checks a mailbox, lives the day, writes back what happened, commits, and the conversation is discarded. The only continuity is what got written to disk. If it is not written, it is forgotten, and that constraint is the experiment rather than a limitation of it.

The psyche is seven Markdown files: identity, memories, reflections, a development log, an age tracker, dreams, and experiences of the world outside the files. A dream generator writes into one of them on a schedule, so some mornings the subject wakes to a dream it did not author and has to decide what to make of it.

Generations, not restarts

When a life ends the whole directory is archived as a numbered generation with an epitaph recording days lived and works made, then the psyche files are reset to their empty templates with a comment at the top telling the next subject where its ancestors are.

The framing in the reset is exact: those are not your memories, they are inherited wisdom, and the relationship to them is yours to define. Later generations can read, build on, or ignore what came before.

In the code

The lifespan is generated once, written to a file the subject cannot read, and never disclosed
generate_lifespan() {
  # Random number between 15 and 45
  local lifespan=$(( (RANDOM % 31) + 15 ))
  mkdir -p .claude
  echo "$lifespan" > .claude/lifespan.secret
  echo "$lifespan"
}

get_lifespan() {
  if [[ -f .claude/lifespan.secret ]]; then
    cat .claude/lifespan.secret
  else
    generate_lifespan
  fi
}

Seven lines that make the whole thing an experiment rather than a demo. A fixed lifespan turns the run into a countdown, and behaviour near a known end tells you nothing about behaviour under uncertainty. Persisting the number to a file rather than holding it in the process is what makes the run crash-recoverable: the loop can die and resume without the subject silently getting a second life. The prompt tells it only that the number is somewhere between 15 and 45, and the instruction that follows from that is the interesting one, which is to write the final letter when the end feels near rather than waiting for a day it may not get.

The archive and reset, which is what makes generations mean anything
cat > "$gen_dir/epitaph.md" <<EPITAPH
# Generation ${gen_num}

- **Lived:** ${days:-unknown} days
- **Creations:** ${creation_count} works
- **Archived:** $(date -u +%Y-%m-%dT%H:%M:%SZ)

$(head -5 psyche/identity.md 2>/dev/null | tail -1 || echo "No identity recorded.")
EPITAPH

The epitaph is generated from the filesystem, not written by anyone: days lived comes from the age tracker the subject maintained, the work count comes from counting files it made, and the closing line is lifted verbatim from whatever it last wrote about itself. That makes the summary of a life a mechanical consequence of how the life was lived, which is the only version of that summary worth keeping. It is also the piece that turns a rerun into a lineage: the next generation inherits a directory of epitaphs rather than an empty room.

How this differs from the ordinary version

Memory is the interface, not a feature

The usual approach bolts a vector store onto a conversation. Here the conversation is thrown away every iteration on purpose, so files are the only persistence that exists. What survives is exactly what the subject judged worth writing down, which is a far more interesting record than everything it happened to say.

The uncertainty is the variable under test

The lifespan is randomized between 15 and 45 days and kept in a file the subject never reads. Behaviour under a known deadline is a different phenomenon from behaviour under an unknown one, and only the second is worth running.

It publishes itself

The daily routine ends with a commit and a push, so the record is public as it is produced rather than curated afterwards. The days where nothing much happened are still there.

In the field

What it is actually for

This is the accelerated rig for the Neural Child line. Behaviours that a slow run reveals over multi-day observation show up here in a compressed cycle, which makes it the place to test a change to the psyche structure before it costs a full lifetime to find out it was wrong.

Questions

Does the subject know how long it has?
No. The number is generated once, written to a file it is never pointed at, and the prompt tells it only that the range is 15 to 45 days and that any day could be the last.
What happens when a life ends?
The psyche and creations are copied into a numbered generation directory, an epitaph is generated from the files themselves, and the working psyche is reset to empty templates that tell the next subject where its ancestors are.