Skip to content

deviations ​

Tool tools/triage/deviations.py (program, Triage). Collect every known difference from the original into one ledger.

Run it with ./gameframe run deviations ARGS or python3 tools/triage/deviations.py. Source on GitHub.

Its own help ​

This is the help text in the tool itself, as ./gameframe tool deviations prints it.

text
Collect every known difference from the original into one ledger.

A reimplementation marks each intentional difference from the original with a comment that
contains `Deviation:`, and each piece it leaves out with `not ported` (see the re-port skill).
This tool finds those comments in the source tree and writes them, grouped by file, with links,
so the project always has one up-to-date list of where it differs from the original.

Usage:
  deviations.py [--out FILE] [--check] [DIR ...]

  DIR       folders to scan (default: the current folder)
  --out     where to write the ledger (default: print it)
  --check   with --out: exit 1, without writing, when FILE is out of date (for tests and CI)

What it reads: comment lines starting with `//`, `#`, `--`, `;` or `*` (C, C++, Rust, Go,
JavaScript, Python, shell, Lua, assembly, block comments). Consecutive comment lines form one
block; a block that contains a marker is one entry. Markers (any letter case): `deviation`,
`not ported`. Lines that only cite the original (`Original: ...`) are left out of the text.

What it skips: prose and data files (.md, .txt, .tsv, .json and the like), folders named .git, target, build, analysis, derived, node_modules, .venv
(the game's files and generated output), and files that are not text.

It does not judge the comments: a comment that says "deviation" in passing is listed too.
Keep the marker for real differences.

Named by ​

Skills: re-port, re-land.

Code: Apache 2.0. Content: CC0 1.0. No game material: bring your own copy.