# Coding Standards The house standards every Rethink Studios project follows. They keep our code consistent, readable, and predictable across the whole suite. ## File hygiene - Files end with a **single trailing newline** (LF / Unix line endings). - **No trailing whitespace** on any line. ## Indentation - **4 spaces** by default. - Respect language norms: TS/JS use **2 spaces**, Go uses **tabs**. - When editing an existing file, follow that file's existing indentation. ## Docstrings and comments - Public functions get a **docstring**. Style: **lowercase-start, no trailing period**. - Keep inline comments minimal — prefer docstrings. Use an inline comment only where the code is genuinely complex. - Each module/file states its scope and purpose via a **module docstring** (header string) — **not** a license or copyright header. ## READMEs Every library and project has a defined **README** covering: - the install line, - what it does, - a usage example. ## Linting and types - **flake8 clean**, max line length **120**. - **Type hints** on public functions. ## Error handling - **Fail loud** — never swallow exceptions. - Catch the **specific** exception, and **log** it.