From de930f32773ace7748fb52fe976302d07424809a Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 16 Aug 2026 18:27:18 +0200 Subject: [PATCH] Apply prettier to the handoff and recipe docs prettier only runs on pre-push, so the previous commit passed the per-file gate and then failed the push. No line counts changed. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY --- docs/python-split-recipes.md | 10 +++++----- docs/shell-split-recipes.md | 5 +++-- refactor_claude_todo_resume.md | 18 +++++++++--------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/python-split-recipes.md b/docs/python-split-recipes.md index 02c20385..50c5b298 100644 --- a/docs/python-split-recipes.md +++ b/docs/python-split-recipes.md @@ -175,25 +175,25 @@ Generalised from `python_pkg`; full detail in `docs/python-split-recipes.md`. **A block may move if every MOD-relative patch that reaches it comes from one test module. If two test modules patch a shared collaborator, keep the collaborator and move its callers instead.** The caller resolves the name -through its *own* module's globals, so importing it into the new module makes +through its _own_ module's globals, so importing it into the new module makes the patch land there. Corollaries that each cost a failed run to learn: - **`test_X.py` needing no edit is the signal you cut in the right place.** It held on four of five source splits in `brother_printer`. -- **Never blanket-`sed` a MOD.** Decide per test *by which function is under - test*. `test_challenge_part3.py` needed 13 of its strings repointed and 4 +- **Never blanket-`sed` a MOD.** Decide per test _by which function is under + test_. `test_challenge_part3.py` needed 13 of its strings repointed and 4 left alone. - **A mispointed patch does not always fail — it can HANG or do real work.** `code_tutor` spun for two minutes running a real interactive flow; `cups_queue` would have restarted the live CUPS daemon. Always run under - `timeout`, and assert the targets resolve *before* invoking pytest. + `timeout`, and assert the targets resolve _before_ invoking pytest. - **When splitting a test file, copy the WHOLE preamble** (docstring, imports, fixture builders) into the new file and let ruff's `F401` pass prune it. Hand-writing the import block failed on every early attempt; the copy-then- prune order removed 82 imports correctly in `wsg_grabber` with none missed. - It does **not** cover module-level `def`s and constants sitting *between* + It does **not** cover module-level `def`s and constants sitting _between_ sections — `_make_verifier`, `_QUESTIONS`, `_logger` and `_SAME_FIELD_X_TOLERANCE_PX` were each left behind that way. Grep for them. - **Budget two cuts.** Nine of the splits landed 1–20 lines over after the diff --git a/docs/shell-split-recipes.md b/docs/shell-split-recipes.md index dc7ed237..38c685ff 100644 --- a/docs/shell-split-recipes.md +++ b/docs/shell-split-recipes.md @@ -8,7 +8,7 @@ coverage gate**, so none of the above transfers. Decision 6 governs: `bash -n` + `shellcheck` + `systemctl cat` path checks, and **never execute an enforcement script that mutates the live system or the phone.** -- After each split, `bash -n` and `shellcheck` the entry script *and* every new +- After each split, `bash -n` and `shellcheck` the entry script _and_ every new lib. Neither catches a lib that is never sourced. - So also: for each new `lib/*.sh`, grep the entry script for the `source`/`.` line naming it, and confirm the path resolves from where the script actually @@ -21,7 +21,8 @@ enforcement script that mutates the live system or the phone.** `scripts/single_use/utils/organize_downloads.sh` Every other in-repo unit references an installed copy under `/usr/local/`, - so those are only at risk if the *installer* is what you split. + so those are only at risk if the _installer_ is what you split. + - Prefer files that **nothing** references first — pure lint risk. - Watch **jscpd** on the first multi-lib commit: repeated `set -euo pipefail` + source-guard headers across several new libs is exactly what pushes diff --git a/refactor_claude_todo_resume.md b/refactor_claude_todo_resume.md index dce5dbd0..8aa60aaf 100644 --- a/refactor_claude_todo_resume.md +++ b/refactor_claude_todo_resume.md @@ -23,15 +23,15 @@ Earlier sessions had already done: the `~/utils` exemptions, the ## What is left -| Directory | Count | -|---|---| -| `linux_configuration` | 84 | -| `phone_focus_mode` | 13 (do LAST) | -| `kcd2_dice_solver` | 12 | -| `focus_owner` | 11 | -| `billsplit` | 6 | -| `reverse_survivors` / `meta` / `docs` | 4 each | -| `.github` / `bucket_catch` | 2 each | +| Directory | Count | +| ------------------------------------- | ------------ | +| `linux_configuration` | 84 | +| `phone_focus_mode` | 13 (do LAST) | +| `kcd2_dice_solver` | 12 | +| `focus_owner` | 11 | +| `billsplit` | 6 | +| `reverse_survivors` / `meta` / `docs` | 4 each | +| `.github` / `bucket_catch` | 2 each | Within `linux_configuration` the bulk is `scripts/single_use/` (39 across `features`/`utils`/`fixes`), then `scripts/periodic_background/` (10) and