cbonsai
What it is
Section titled “What it is”cbonsai grows a bonsai tree as ASCII art in the terminal. Branches split and extend according to growth parameters, producing a different believable tree each run — or the same tree every run, if you pin the seed. It has a static print mode (--print), a --live animated growth mode, an --infinite loop, and a --screensaver mode (live + infinite combined) that makes it a genuine terminal screensaver. Trees are drawn with colored characters chosen by branch type and direction.
The options that matter for KN-86:
| Flag | Effect |
|---|---|
--seed=INT | Reproducible generation — same seed always grows the same tree. The hook for everything below. |
--live | Animate growth step-by-step rather than printing the finished tree. |
--infinite | Grow trees continuously, one after another. |
--screensaver | --live + --infinite — the screensaver mode. |
--life=INT | Total growth extent (0–200, default 32) — how far the tree develops. |
--multiplier=INT | Branching density (0–20, default 5). |
--wait=TIME / --time=TIME | Pacing between trees / between growth steps. |
--base=INT | Plant-base / pot style. |
--leaf=LIST | Leaf characters. |
--message=STR | Text drawn alongside the tree. |
The whole thing is a tight, self-contained example of seeded procedural generation rendered as live terminal animation — which is precisely the shape of two things KN-86 already has (LFSR procgen, the seed-capture mechanic) and one thing it wants (a canonical ambient/screensaver mode).
KN-86 relevance
Section titled “KN-86 relevance”1. A strong ambient / screensaver reference
Section titled “1. A strong ambient / screensaver reference”KN-86 wants an idle/attract aesthetic — something the deck shows when it’s powered but unattended, and something the attract pipeline can use. cbonsai is the right kind of reference: a single generative scene that grows, holds, and regenerates, indefinitely, with no operator input. It slots alongside the existing screensaver-lineage references in the corpus — the R4 neo / astroterm screensaver work (matrix-rain / star-field ambient generators) and ascii-effects.md’s reveal/animation grammar. Where neo/astroterm give motion-noise ambient (rain, stars), cbonsai gives structured-growth ambient (a thing that builds itself and resolves). KN-86 wants both registers in its ambient palette; cbonsai is the structured-growth exemplar.
2. The decisive hook: seed-determinism maps onto KN-86’s existing substrate
Section titled “2. The decisive hook: seed-determinism maps onto KN-86’s existing substrate”This is why cbonsai is more than a mood-board entry. KN-86’s procgen is LFSR-based, and the deck already persists a seed with documented determinism semantics: deck-state.md stores cipher_seed[4] (“two decks with identical state produce identical Cipher text”). cbonsai’s --seed is the same idea in a different domain — same seed, same tree. The two compose directly:
An operator-captured seed grows a deterministic ambient scene.
The KN-86 seed-capture gameplay mechanic already lets a operator capture a seed (CIPHER-LINE seed-capture mode, TERM key context per ADR-0016). Feed that captured seed to a cbonsai-style generator and the operator gets a specific, reproducible, shareable ambient scene that belongs to that seed. Two decks fed the same captured seed grow the identical bonsai — the same property deck-state.md already guarantees for CIPHER text. The seed becomes a portable artifact: “grow seed 7F3A91C2” is a thing one operator can hand another, and both decks render the same tree.
Proposal — cbonsai as a canonical Deckline ambient-mode generator seeded by Deck State
Section titled “Proposal — cbonsai as a canonical Deckline ambient-mode generator seeded by Deck State”Concretely, propose a bonsai ambient generator in the nOSh ambient/screensaver roster:
- Default seed = Deck State. When the deck idles into ambient mode, the generator seeds from the current deck seed (
cipher_seedor a dedicated ambient-seed field). The result: your deck grows your tree — the ambient scene is an identity artifact derived from the operator’s accumulated state, not a generic loop. A heavily-played deck and a fresh deck idle into visibly different trees. - Seed-capture override. A captured seed (seed-capture mechanic) overrides the default, growing the scene that seed encodes. This is the gameplay tie-in: capturing a rare seed in play and watching what it grows is a small reward loop.
- Live growth, then hold, then regenerate — cbonsai’s
--screensavermodel: grow the tree with the animation budget, hold the finished frame, regenerate from an advanced seed. The LFSR advance between regenerations is the same advancedeck-state.mddescribes for the CIPHER voice. - Composes with ascii-effects.md: the tree can reveal via
reveal:radial(“birth”) and clear viaunreveal:radialbetween regenerations.
This makes the ambient mode part of the deck’s state-driven identity, not decoration — which fits the project’s standing position that the fiction and state are the differentiator.
Single-color adaptation
Section titled “Single-color adaptation”cbonsai colors branches vs leaves vs base by hue. KN-86 is monochrome amber on black, so the structure is carried by glyph choice and intensity, not color:
| cbonsai element | KN-86 amber-only treatment |
|---|---|
| Trunk / branches | Box-drawing + diagonal glyphs (│ ╱ ╲ ┤ ├), full-amber |
| Leaves | Dense punctuation cluster (&, *, the high end of the ascii-effects.md ramp), brightened amber for canopy mass |
| Base / pot | Dim-amber box-drawing row |
| Depth / shading | Intensity steps within amber, not separate hues |
cbonsai is already monochrome-friendly — the green→amber swap is trivial because the design never depended on multiple hues to read; it depended on character shape and density, which survive the palette collapse intact. On the device this renders against the 128×150 half-block canvas (ADR-0027) for the finer trunk/leaf strokes, with cell-level glyphs for the coarse structure — no pixel framebuffer needed.
- The seed→ambient determinism is the entry’s reason to exist. Park the screensaver mood as nice-to-have; the durable contribution is “Deck State seed → deterministic shareable ambient scene,” which reuses machinery
deck-state.mdalready documents. - GPL — reimplement, don’t vendor. Same posture as no-more-secrets. The growth algorithm (recursive branch with seeded RNG, life/multiplier params) is independently reimplementable against the deck’s LFSR.
- Cross-link terrain.md — the other seeded-procedural-generation reference in the corpus (fantasy maps); cbonsai is the ambient-animation sibling to terrain’s static-map generation. Both are seed-deterministic; both could one day be Deck-State-seeded.
- Cross-link ascii-effects.md — reveal/unreveal grammar for the grow/regenerate transitions.
- Cross-link the R4 neo / astroterm screensaver lineage (matrix-rain / star-field ambient) — cbonsai is the structured-growth counterpart to their motion-noise ambient; the nOSh ambient roster should carry both registers.
- Cross-link
deck-state.md— thecipher_seed[4]LFSR + determinism guarantee that the seeded-ambient proposal stands on.