Conversation
Automate-Automata was one SvelteKit app with the simulation living inside a 612-line Svelte component. This splits it into a Bun workspace: an engine anyone can depend on, a UI layer, and three ways to run it — web, Android and the terminal. packages/complexity-automata (npm: complexity-automata) The engine, with no DOM, no timers and no dependencies. Rules parse from B3/S23 notation, rule numbers or names; the 18-bit rule number makes all 262,144 universes addressable. Adds toroidal wrapping, a seeded RNG so a universe is reproducible, typed-array cells and colours, stagnation detection, twelve demos, a pattern catalogue with fractal seeds, and universe save/load as Life RLE — JSON, a URL-safe share string, or a UniverseLibrary over any key/value store. packages/complexity-automata-cli (npm: complexity-automata-cli) Terminal animation in truecolor half-blocks, two grid rows per line. Demos, patterns, rule tours, keyboard control, saved universes in ~/.complexity-automata, and a --print mode that writes one frame to stdout for pipes and CI. packages/complexity-automata-svelte (npm: complexity-automata-svelte) The canvas view, the rule as eighteen switches, the demo picker, the intro screen and the saved-universe shelf. Painting goes through an offscreen buffer at one pixel per cell, so a redraw costs cells rather than screen pixels. apps/web SvelteKit shell around the component. Static, client-rendered, with ?demo=, ?intro=0, ?cell= and ?u= (shared universe) URL parameters. apps/android The same build wrapped by Capacitor: webDir points at ../web/build, so the app ships exactly what Cloudflare serves. Renamed to Complexity Automata, version 3.0.0. 86 tests across the three packages, plus a CI workflow that typechecks, tests, builds all three and verifies the Capacitor copy step. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DPssgQtTm138yEbfJm6Ham
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.
Automate-Automata was one SvelteKit app with the simulation living inside a 612-line Svelte component. This splits it into a Bun workspace: an engine anyone can depend on, a UI layer, and three ways to run it — web, Android and the terminal.
Packages
packages/complexity-automatapackages/complexity-automata-cliautomata).packages/complexity-automata-svelteapps/webapps/androidwebDirpoints at../web/build.complexity-automata
Rules parse from
B3/S23notation, rule numbers, or names (highlife,replicator,fredkin, …). The 18-bit rule number makes all 262,144 universes addressable by an integer. Adds toroidal wrapping, a seeded RNG so a universe is reproducible on any platform, typed-array cells and colours, stagnation detection, twelve demos, a pattern catalogue including fractal seeds, and anAutopilotthat tours random rules and moves on whenever one stops evolving.Colour is inheritance: a cell born beside living cells takes the average of their colours, so colonies drift into their own hues and collisions fade into blends.
Saving universes
A universe is its rule plus its live cells, stored as Life RLE — the encoding conwaylife.com uses — so saved universes open in other Life software and patterns from elsewhere load here. Three ways out: a JSON file, a URL-safe share string for
?u=links, and aUniverseLibraryover any key/value store (localStoragein the browser,~/.complexity-automata/universes.jsonin the CLI).complexity-automata-cli
Truecolor half-blocks, two grid rows per terminal line for square pixels. Demos, patterns, rule tours, keyboard control (
spacenarcpds+/-q), an intro screen cut out of the running grid, saved universes, and a--printmode that renders one frame to stdout for pipes and CI. Falls back to the 256-colour palette, mono blocks or plain ASCII; honoursNO_COLORand never colours a non-TTY.Apps
The web app is client-rendered and static, with
?demo=,?intro=0,?cell=and?u=parameters. The Android app ships that exactbuild/directory through Capacitor, so the two can never drift apart; renamed to Complexity Automata, version 3.0.0.Testing
q.cap sync androidcopies the web build into the Android project.Not run here: the Gradle APK assembly, which needs a JDK and the Android SDK.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DPssgQtTm138yEbfJm6Ham
Generated by Claude Code