docs: warn that project is AI-assisted

This commit is contained in:
goober 2026-08-21 15:43:20 +03:00
parent e38d5baf6a
commit fb39e1749f

113
README.md
View file

@ -1,76 +1,63 @@
# nte-optimizer
Gear optimizer for *Neverness to Everness*. Static site, no server, no account.
> [!CAUTION]
> **This repository is vibecoded.** Its implementation was written with substantial AI assistance and may contain plausible-looking mistakes, unsafe assumptions, or unreviewed edge cases. Treat it with care: inspect the code, verify outputs, and run the tests before relying on it.
It imports the JSON that [`nte-exporter`](../nte-exporter) writes during a normal
capture run, and recommends what to equip on whom — drawn onto each character's
console grid.
Gear optimizer for *Neverness to Everness*. Static site, no server, no account, and no runtime connection to the game.
## Running it
It imports a gear snapshot produced by `nte-exporter`, scores the available cartridges and modules, and draws recommended builds directly onto each character's console grid.
## Features
- Single-character optimization with Prydwen targets or custom targets and weights.
- Cartridge set and 2-piece/4-piece bonus selection.
- Arc stats, refinements, conditional-effect controls, and explicit notices for effects the model cannot score.
- Team optimization against one shared item pool without assigning an item twice.
- Console-grid layouts with module placement and enough item detail to find each piece in game.
- Local equipment tracking, Equip/Undo, and import refreshes from game truth.
- Predicted-versus-measured character sheet comparison.
- Hosted build plus a single-file offline build.
All account data stays in the browser. Nothing is uploaded by the app.
## Running locally
```sh
npm ci
npm run dev # development
npm run build # dist/index.html — the normal build
npm run build:single # dist/nte.html — one file, works over file://
npm test
npm run dev
```
`dist/` is **committed on purpose**. In three years, when `npm ci` fails on some
transitive native module, `python3 -m http.server -d dist` will still work. The
source build is the convenience; the committed output is the artifact.
Useful checks and builds:
## Layout
```sh
npm test
npm run check:guides
npm run build # hosted build in dist/
npm run build:single # standalone dist/nte.html
```
| path | what lives there |
The standalone build works over `file://`. Browser restrictions disable workers, IndexedDB, and bundled artwork there; the app falls back to inline solving and localStorage or memory.
## Model boundaries
This is a stat-target optimizer, not a damage simulator. It has no rotation or ability-multiplier model.
- Targets are floors. Published substat rankings determine their relative weights.
- Timed bonuses are reported but not scored without defensible uptime data.
- Shield strength, enemy resistance, ally-only buffs, and other unsupported quantities are marked unmodellable instead of mapped onto a different stat.
- Level-80 base-stat scaling remains unmeasured, so dependent sheet values are shown as unavailable.
- “Proven” means optimal for one packing and cartridge, not globally optimal across every internal beam-search choice.
## Project layout
| Path | Contents |
|---|---|
| `data-src/` | raw everness mirrors, Arc classifications, guide data. Committed, not shipped. |
| `tools/` | build-time scripts. Output goes to `src/generated/`, also committed. |
| `src/domain/` | **pure.** No DOM, no IndexedDB, no imports from `ui/`, `db/` or `state/`. |
| `src/solver/` | same rule. Chunked generators, so they run in a worker or inline unchanged. |
| `src/db/` | schema, migrations, import, persistence adapters. |
| `src/ui/` | React. Four tabs and a hash router. |
| `data-src/` | Source classifications, cartridge bonuses, and guide data. |
| `tools/` | Data validation, generation, benchmarking, and build scripts. |
| `src/domain/` | Pure stat, board, cartridge, Arc, and scoring logic. |
| `src/solver/` | Worker-safe single-character and team solvers. |
| `src/db/` | Import validation and local persistence. |
| `src/ui/` | React interface. |
| `tests/` | Domain, solver, persistence, and integration checks. |
The `domain/` and `solver/` rule is what makes them worker-safe, Node-testable
and diffable against the Python they were ported from. Keep it.
## Two things that are easy to get wrong
**Ported rules were expensive to derive and break in ways that still look
plausible.** Before touching anything in `domain/`, read
`~/Apps/nte-research/WIREFORMAT.md` and the "facts worth not re-deriving"
section of `RESUME.md`. Builds are 6, 7 or 8 modules and never always 7; the
console trait is not always CRIT DMG or Type III; a transposed board renders
correctly on a symmetric grid.
**The model has measured gaps, and the app is built to show them rather than
hide them.** Set bonus values are unknown and contribute nothing. The base-stat
multiplier has never been read at level 80. A `proven` build is optimal for its
packing and cartridge, not globally. Every one of those is surfaced in the UI on
purpose — if you find yourself replacing one with a plausible number, don't.
## Degraded modes
Opening `dist/nte.html` from the filesystem gives the page an opaque origin, so
IndexedDB, workers, `fetch` and module scripts are all unavailable. The app
handles this behind two interfaces it never sees through — `PersistenceAdapter`
(IndexedDB → localStorage → memory) and `SolverHost` (worker → inline) — and
shows a banner when storage is not durable. Artwork is not carried in that build.
## Deploying
`npm run deploy` builds both targets and publishes to
**[removed]**.
The homelab has no `rsync`, so the tree goes over as a tar stream, and the
destination is wiped first: a stale content-hashed chunk left behind would be
served forever, since `/assets/*` is cached as immutable. Caddy serves
`/mnt/docker/appdata/caddy/sites/[removed]` as `/srv/[removed]` via a
read-only bind mount, which is why a deploy needs no container restart — but
adding a *new* site does, and recreating that container briefly drops every
other site behind Caddy.
`[removed]` is the single-file offline build, shipped
alongside the app.
`dist/` is not in git. The deploy builds from source.
`src/domain/` and `src/solver/` stay free of DOM, storage, and UI imports so the same logic runs in tests, inline, or in a Web Worker.