# Zerocode: a fork of nodecode-ai/nodecode

Base: `73e2e99` (version 0.1.5) on `origin/main`. Everything a person meets
carries the fork's own name; the contracts that make the shipped cells load
are kept on purpose.

## What changed

- Display name `Nodecode` -> `Zerocode` in prose, docs, help text and TUI
  labels.
- Binary and layout: `zerocode`, `zerocode.exe`, `~/.local/bin/zerocode`,
  `~/.local/share/zerocode/<version>/`, `release/zerocode-<label>-<arch>-<os>`.
- The organism's home `~/.nodecode` -> `~/.zerocode`, profiles under it too.
- Env prefix `NODECODE_*` -> `ZEROCODE_*` (`ZEROCODE_HOME`, `ZEROCODE_BASE_URL`,
  `ZEROCODE_VERSION`, `ZEROCODE_CHANNEL`, ...).
- Domain `nodecode.ai` -> **`zerocode.ulas.tech`**, a subdomain of the
  operator's `ulas.tech` (the apex stays with the main site, which lives on
  another host). Every place the code reaches out or points a person:
  - `https://zerocode.ulas.tech/dl` — release host: tarballs, sha256 sidecars,
    the per-channel pointer, `install.sh`, `install.ps1`, `zerocode update`.
    Override per build with `ZEROCODE_BASE_URL` or the `base-url` file the
    installer writes.
  - `https://api.zerocode.ulas.tech/v1` — the account API: `zerocode login`,
    the plan and credit meter, and the default `base_url` of provider id
    `zerocode` (its own models); the login answer may name another base.
  - `https://zerocode.ulas.tech/dl/cells/index.json` and
    `https://zerocode.ulas.tech/cells/community.json` — the two cell-hub
    indexes.
  - `https://zerocode.ulas.tech/docs/...`, `/pricing`, `/account/top-up`,
    `/account/machines` — the manual and account pages the help text and
    messages link to. Nothing fetches these at start.
- Org `nodecode-ai` -> `zerocode`, except the pinned cells repository.
- Copyright holder in `NOTICE` and `LICENSE`.
- Provider id `nodecode` -> `zerocode`, and with it the model ids the picker
  composes (`zerocode/foresight-cyber-v1`) and the generation kind of the same
  name. Cell folder names, and the prefixes the code composes for them, stay
  `nodecode-*`: those folders live in the cells repository.
- The mark: `resources/assets/zerocode-logo.png` is cropped from the operator's
  portrait (woman with lit hair and a black cat). Source 1080x1984; the square
  is `(0, 420, 1080, 1500)` resized to 1024 and lifted 6% in contrast, which
  stays above the faint `fusion` watermark at y~1690 and the corner glyph at
  y~1900. Regenerate with `logo.py` (same crop box) from the original.

## What is kept, and why

1. **Packages and ASDF systems**: `#:nodecode.kernel`, `.evolved`, `.import`,
   `.term`, `.test`, `src/nodecode.asd`, systems `"nodecode"`,
   `"nodecode/bin"`, `"nodecode/test"`. The shipped cells are Lisp taken at a
   pinned commit from the cells repository and they open those packages and
   depend on that system; renaming them breaks every cell at load. To rename
   them, fork the cells repository too and move `src/cells/bundle.json` with
   it (tier 2).
2. **The cells repository URL and the paths taken from it**, in
   `src/cells/bundle.json`: they must name the remote tree.
3. **Third-party names**: models.dev, SBCL, Quicklisp, Homebrew's OpenSSL 3.

## Re-run with another name or domain

The whole change is one script, `rebrand.sh`, applied to a clean checkout:

```sh
git checkout -b <branch> main
bash ../rebrand.sh . "Display Name" slug "Org" host.tld
```

It is idempotent from a clean tree and its undo is `git`.

## Build

SBCL 2.6.8 is what the project targets (the Debian 2.5.2 package is too old:
`SB-UNIX:CLOCK-MONOTONIC` does not exist there). Dependencies come from
Quicklisp, the shipped cells from `src/tools/pull-cells.sh`.

```sh
src/tools/pull-cells.sh
cd src
sbcl --dynamic-space-size 4096 --non-interactive \
  --eval '(load "~/quicklisp/setup.lisp")' \
  --eval '(push (truename ".") asdf:*central-registry*)' \
  --eval '(dolist (d (directory "cells/*/")) (push d asdf:*central-registry*))' \
  --eval '(progn (asdf:load-system :nodecode/bin) (asdf:make :nodecode/bin))'
# -> ../zerocode, 87 MB
```

The suite: `asdf:test-system :nodecode`, or one lane at a time with
`NEEDLES=a,b sbcl --load tools/test-subset.lisp`. The unmodified tree fails 11
of the 3010 tests in this sandbox (no display, no vendor network); the fork
fails a subset of those and nothing of its own.

## Hosting

The static half — release feed, installers, docs, cell indexes — is a folder:
`dl/`, `docs/`, `cells/`, `install.sh`, `install.ps1`, `index.html`, with
`deploy/nginx.conf` (the VPS already runs nginx for `chat.ulas.tech`) or
`deploy/Caddyfile`. The account API is a live service and is not part of it.
