Compare commits

..

15 Commits

Author SHA1 Message Date
2a1bb60d9f Serialise the heavy ci-mirror gates when memory is tight
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
The push kept failing with "1798 passed" immediately followed by "Killed".
The suite was never the problem: it peaks at ~0.29 GiB against its own 2G
cap. ci_mirror.sh runs pre-commit --all-files and the pytest gate
concurrently, and the pre-commit tree peaks at ~1.75 GiB (mypy and pylint
repo-wide, invisible to /usr/bin/time because it measures only the parent).
The pair wants ~2 GiB at once; the pytest scope has MemorySwapMax=0, so on
a loaded machine it is the one that dies.

Concurrency is now conditional on MemAvailable. Above 4 GiB the fast path
is unchanged. The probe lives in ci_mirror_mem.sh, following the existing
ci_mirror_range/ci_mirror_shell split, which also keeps ci_mirror.sh under
the line cap.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 20:02:59 +02:00
aa4e3cd3ae Record the guard repoint as done; hosts extraction is unblocked
Item 1's "the classifier blocks me" note was stale. Ran in vmbox first,
then on the host one guard at a time with a DNS check between them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:53:40 +02:00
9aeeb005dd Derive the lib prefix in the music_parallelism drift guard
The pre-push gate was failing on a layout that is actually correct. The
script sources ../../lib/common.sh, which is right for where it sits after
the flattening; the test's guard still hardcoded ../lib/common.sh from
before the move, so it reported drift against itself.

The prefix is now read out of the script under test, so the two cannot
desynchronise the next time the tree moves. Verified non-vacuous: rewriting
the script to ../../../lib/common.sh in a throwaway worktree still fails
the guard, and it now names the real prefix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:53:17 +02:00
7cb23e8a81 Prettier-normalize two docs the pre-push hook was already failing on
Both were non-conforming before this session and block every push, not
just this one, since the hook runs over all files. The diff is entirely
table-separator widths and emphasis markers; no prose changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:42:18 +02:00
6870fc57c7 Prettier-normalize emphasis markers in the restructure doc
Caught by the pre-push prettier hook. Only this file is touched: the two
other files it flags were already non-conforming before this session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:41:44 +02:00
77f2eb9f11 Give the artifact cap a --prune escape hatch
A gate that blocks a commit with no tooling to clear it just moves the
problem to whoever hits it. --prune stages the removal of the oldest
artifacts, keeping the newest 20 per directory plus the template, and
leaves the commit to the operator.

Running it caught a bug that reading it would not: sorting on %cs (date
only) ties every artifact committed the same day, so sort fell back to the
path and the prune deleted alphabetically - it picked one of today's
newest files instead of the oldest. Sorts on %ct with -rn now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:41:11 +02:00
17d6b36776 Record gate wiring, prune, and the two recommendations
Items 4 and 5 are done. Item 6 gets a recommendation against, with the
measurement behind it: the doc's ~2,780-line estimate was right and my
first grep was wrong (filenames only, 400 lines), but the two lib families
are parallel evolutions rather than copies, on 20% test coverage against
hardware I cannot reach.

Adds item 7: 3.7 GB of untracked build residue from the extractions, with
the checks showing it holds no source.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:34:31 +02:00
f8f81ecac0 Cap artifact growth instead of recommending a future prune
The prune commit's evidence noted that "a recurring prune or a hard cap
would be the durable fix if this recurs" - which is advice, not a fix. The
tree would have regrown at one artifact per commit and been noticed months
later, exactly as it was this time.

check_repo_size.sh now caps evidence/ and contracts/ at 60 files each: the
headroom the prune bought, against 21 today. main accumulates failures
rather than returning on the first, so tripping both the source ceiling and
the artifact cap reports both.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:33:53 +02:00
7597831915 Prune 655 superpowers evidence and contract artifacts
These accumulate roughly one per commit and were the largest single driver
of tracked-file growth: 695 artifacts, 487 of them from 2026-08 alone.

Kept the 20 most recent of each plus both templates. A count cap rather
than a time window, because the growth is bursty - a 7-day window would
still have kept 393 files and bounded nothing. Selection is by git commit
date, not by filename: the corpus mixes -2026-05, -20260604 and undated
slugs, so a filename filter would have mis-sorted ~48 files.

Safe to delete: nothing reads the historical corpus. Every reference in
meta/scripts is either template.json or validation of files staged in the
current commit, and the three hooks still pass. sessions/ is append-only
and untouched.

Tracked files 1993 -> 1340.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:28:49 +02:00
0a1e43fc11 Wire the depth and size gates, exempting structural depth
The depth cap had 104 violations. 57 are structural: whole projects with
their own layout (C/, dwm/, artgate/), a tool split into modules to satisfy
the line cap, prose trees, and directories whose name an external format
dictates (systemd, hooks, workflows, patches, fixtures). Those are exempted
the same way lib/ and tests/ already were.

The other 47 all sit under periodic_background/{hosts,digital_wellbeing},
which can only come down by extracting those units - blocked on a manual
guard repoint. So the hook runs --warn: the number stays visible on every
commit without blocking unrelated work. Enforcement is one flag away.

Also guards the argument order: `--all --warn` used to ignore --warn and
exit 1, which as a hook entry would have blocked every commit.

check_repo_size.sh is the companion gate - depth stops one subtree growing
a taxonomy, this stops the repo absorbing everything. It counts tracked
files (git ls-files, never find: the tree holds ~30k untracked extraction
leftovers) minus vendored and hook-generated trees: 1049 against a 1200
ceiling, printed every run so the threshold is auditable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:26:16 +02:00
2cf62a2402 Update restructure status: 8 units out, flattening done
Depth 556 -> 104, tracked files 2295 -> ~1980. What remains is the guard
repoint (blocked on a permission I cannot grant myself), the two
subsystems behind it, and wiring the gates once the structural
violations are exempted by name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:14:46 +02:00
0fb3e3eee2 Cap extensionless scripts, and split the one that was hiding
check_file_length.sh required a dot in the filename, so every
extensionless executable was silently uncapped. is_source_file() now
reads the first two bytes and accepts a shebang, which catches real
scripts while still skipping data files like i3/config.

That immediately surfaced boot_recovery/boot-repair at 756 lines --
three times the largest capped shell file in the repo, uncapped purely
because its name has no dot in it. Split along its own section markers
into lib/{discovery,repair_fs,repair_kernel,modes}.sh, leaving the entry
script at 218.

The report block stays inline on purpose. It is top-level code with exit
calls rather than function definitions, and sourcing it changed control
flow: 30 of 42 tests failed. That is recorded in the lib headers so the
next reader does not retry it.

No vmbox pass for this one, deliberately. boot-repair is UEFI/ESP tooling
and the guest is BIOS/GRUB, so a sandbox green would be actively
misleading -- the vmbox skill says so itself. The evidence is the fixture
suite, which drives the real script against synthetic root trees: 42
passed before, 42 passed after.

verify_shell_split.sh reports 31 of 32 functions byte-identical. The one
difference is clean_shadow_files, where quoting $ESP_MOUNTPOINT fixed a
genuine SC2086 that only became visible once the function left the
monolith -- shellcheck could no longer see the readonly declaration and
stopped assuming the expansion was safe.

lib/tests/run_all.sh delegates to that same suite rather than standing up
a second, weaker harness: these libraries need the entry script's strict
mode and globals, so testing them in isolation would test a fiction.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:13:40 +02:00
08aac8d7d1 Flatten i3-configuration and misc/testsAndMisc-bash
i3 config was filed under periodic_background, which it never was. It is
now linux_configuration/i3/ (config + installer) and
linux_configuration/i3blocks/ (the status scripts), both at depth 2.

misc/testsAndMisc-bash/ was a directory named after the repo it already
lived in, so its contents moved up to misc/. Its stray .gitignore came
along, keeping the media rules working from the new location; its
.vscode/tasks.json did not, because it invoked Bash/transcribe.sh, a path
this repo dropped long ago.

Most of this commit is the references the previous flatten missed. Its
regex skipped anything with a variable prefix, which left 16 files --
including check_and_enable_services.sh and install_core_system.sh, the
orchestrators -- still naming $CONFIG_DIR/scripts/periodic_background/...
It had also rewritten three i3 paths into scripts/i3blocks/, a directory
that has never existed; the i3blocks suites caught that by failing.

13 more symlinks broke on the i3 move. Repointed, and cpu_monitor/volume/
disk were run again to confirm the bar still reports.

Depth 139 -> 104. Roughly 47 of the remainder sit in digital_wellbeing
and hosts, still deferred. The rest encode real structure -- a C project,
Python package directories, artgate's routes/styles, systemd unit dirs --
so flattening them further would destroy information rather than
taxonomy.

Verified: 1798 tests at 100%, both i3blocks suites pass, the shell
coverage gate is clean, and the relocated media rules still ignore what
they should while test_fw.srt stays tracked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 19:02:18 +02:00
4f2b0ccdf7 Dissolve linux_configuration/scripts/ and single_use/
Two levels of pure taxonomy carrying no information, and a 2-directory
cap leaves no room for them. Categories now sit directly under
linux_configuration/: features, fixes, utils, misc, fresh-install,
installers, diagnostics, gaming, boot_recovery, periodic_background, lib,
meta, tests. A script's own lib/ and tests/ are exempt from the cap, so
those stay put.

Depth violations 248 -> 139; roughly 40 of the remainder are inside
digital_wellbeing and hosts, deferred until the guard-lib repoint.

The moves are the easy half. What breaks is every path that counted
levels, and three classes of it had to be found by resolving paths rather
than reading diffs:

  - 52 relative `source` lines for lib/common.sh and lib/android.sh. The
    correct prefix differs per file: 40 were ../../ and 12 were ../../../,
    so a blanket replace would have fixed one set and broken the other.
  - REPO_ROOT in 7 fixes/lib/tests harnesses and setup_syncyomi_guard.sh,
    each walking up four levels from a directory now two levels shallower.
    This caused a real regression -- the fixes suite went red with
    "log_warn: command not found" -- caught by running it and comparing
    against the pre-move baseline worktree.
  - conftest.py's sys.path entries, which took the pytest gate down with
    14 collection errors, and the `# shellcheck source=` directives, which
    took shellcheck down with SC1091.

16 symlinks in $HOME broke, including the entire i3blocks bar. All
repointed, and cpu_monitor/memory/disk/time/volume were run to confirm
they emit real output rather than merely resolving.

Verified: 1798 tests pass at 100% coverage, 8 of 9 lib/tests suites pass
(the ninth needs the coverage jail, identically at baseline), pre-commit
is clean, and the two untracked secret configs are still ignored after
their gitignore paths changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 18:53:30 +02:00
a5209b6878 Extract phone_focus_mode together with focus_policy
github.com/kuhyx/phone-focus-mode

The two halves go as one repo: focus_policy parses phone_focus_mode's
config.sh into the typed policy that focus-owner consumes, and nothing
else references it. 77 commits of history, plus the two Python suites
from linux_configuration/tests/ and the six mutation fixtures from
meta/scripts/fixtures/, all of which named phone_focus_mode paths.

Running the suites -- not reading them -- turned up a real defect the
extraction would otherwise have inherited. config.sh sources the
untracked config_secrets.sh, and ctl_libs_harness.sh never pinned
HOME_LAT/HOME_LON, so the distance assertions were checking against
whatever real coordinates that file happened to hold. The suite passed on
this machine and could not run anywhere else, and a real home location
was load-bearing in a pass/fail condition. The harness now pins a pair
4300 m south of the coordinate its own case seeds, and config.sh sources
the secrets file only when it exists. 136/136 pass with no secrets file
present.

Before making the repo public I scanned the whole history for the known
home coordinates and for any committed config_secrets.sh: zero hits, and
the file was never tracked. The new repo also gained a .gitignore, since
none came across in the filter-repo pass.

test_magisk_service.sh hangs. It hangs identically in the pre-extraction
baseline worktree and appears in no CI list here, so the new repo's CI
skips it with that reason rather than pretending it passes.

check_python_location.sh loses its phone_focus_mode exception now that
the directory is gone; every tracked .py still passes it. The .gitignore
rules for config_secrets.sh and the keystore STAY -- the working copy is
still on this machine and still holds a real location.

Depth 262 -> 248.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
2026-08-23 18:32:58 +02:00
1338 changed files with 2717 additions and 44809 deletions

View File

@ -104,7 +104,7 @@ __pycache__/
python_pkg/cinema_planner/pasted_content.txt
# Large data files (exceed indexing limits)
linux_configuration/scripts/digital_wellbeing/pacman/words.txt
linux_configuration/digital_wellbeing/pacman/words.txt
# C build artifacts
**/*.out

View File

@ -206,11 +206,11 @@ cached snapshot tools, some builds don't refresh them between calls.
## Reference implementations in this repo
- `linux_configuration/i3-configuration/i3blocks/volume.sh` — persist mode with `pactl subscribe`.
- `linux_configuration/i3-configuration/i3blocks/gpu_monitor.sh` — persist mode with `nvidia-smi --loop`.
- `linux_configuration/i3-configuration/i3blocks/battery_status.sh` — zero-fork via `/sys/class/power_supply`.
- `linux_configuration/i3-configuration/i3blocks/cpu_monitor.sh` — zero-fork via `/proc/loadavg` + `/sys/class/hwmon`.
- `linux_configuration/i3-configuration/i3blocks/motherboard_temp.sh` — zero-fork via `/sys/class/hwmon`.
- `linux_configuration/scripts/system-maintenance/systemd/monitors.slice` — resource-cap slice.
- `linux_configuration/i3blocks/volume.sh` — persist mode with `pactl subscribe`.
- `linux_configuration/i3blocks/gpu_monitor.sh` — persist mode with `nvidia-smi --loop`.
- `linux_configuration/i3blocks/battery_status.sh` — zero-fork via `/sys/class/power_supply`.
- `linux_configuration/i3blocks/cpu_monitor.sh` — zero-fork via `/proc/loadavg` + `/sys/class/hwmon`.
- `linux_configuration/i3blocks/motherboard_temp.sh` — zero-fork via `/sys/class/hwmon`.
- `linux_configuration/system-maintenance/systemd/monitors.slice` — resource-cap slice.
- `phone_focus_mode/dns_enforcer.sh::chain_intact()`/`expected_rule_count()` — R9's hash/count-gate pattern, fixed 2026-07-03 after it was found pegging Android's `netd` at ~50% CPU.
- `phone_focus_mode/hosts_enforcer.sh::sync_magisk_module` — the original hash-before-write pattern R9 mirrors.

View File

@ -13,7 +13,7 @@ description: Use BEFORE deploying any Docker-based self-hosted service on this m
`setup_wireguard_ssh.sh`'s own `setup_duckdns()` also has a
`duckdns_already_updated()` guard for this reason. **Do not add a second one.**
- **The firewall is owned entirely by**
`linux_configuration/scripts/single_use/features/setup_wireguard_ssh.sh`. It
`linux_configuration/features/setup_wireguard_ssh.sh`. It
regenerates `/etc/nftables.conf` from scratch on every `setup` run (`flush
ruleset` + fixed heredoc). **Never hand-edit `/etc/nftables.conf` directly or
from a second script** — the next `setup` re-run (e.g. adding a WireGuard peer)
@ -139,7 +139,7 @@ own startup, independent of `docker compose` ever being re-invoked.
## Reference implementation
`linux_configuration/scripts/single_use/features/setup_gitea.sh` and
`linux_configuration/features/setup_gitea.sh` and
`migrate_github_to_gitea.sh` are working, idempotent examples of this whole
pattern end to end (firewall, Caddy, headless bootstrap, host networking
workaround, least-privilege external credential). Copy the shape, not

14
.gitignore vendored
View File

@ -352,16 +352,18 @@ python_pkg/*/cache/
# FVM Version Cache
.fvm/
# Focus mode secrets (contains home GPS coordinates)
# Focus mode secrets (contains home GPS coordinates). phone_focus_mode/ moved
# to its own repo, but the working copy is still on this machine and still
# holds a real location, so the ignore stays until the directory is gone.
phone_focus_mode/config_secrets.sh
phone_focus_mode/focus_status_app/build
phone_focus_mode/focus_status_app/debug.keystore
# Generated output files
out.txt
# Build output symlinks (point to ../testsAndMisc_builds/)
# Patterns without trailing / to match symlinks, not just directories
phone_focus_mode/focus_status_app/build
phone_focus_mode/focus_status_app/debug.keystore
.worktrees
.claude/
@ -371,15 +373,15 @@ phone_focus_mode/focus_status_app/debug.keystore
# Locally built Arch packages. The PKGBUILD and installer script are the source
# and stay tracked; the built artifact is a ~600 MB binary that must never be
# committed (see memories/binary-files.md).
linux_configuration/scripts/single_use/*/*.pkg.tar.zst
linux_configuration/scripts/single_use/*/*.pkg.tar.xz
linux_configuration/*/*.pkg.tar.zst
linux_configuration/*/*.pkg.tar.xz
# Wine/Bottles prefixes — local runtime state, not source.
bottles/
# archwiki_rag local vector index: regenerated by `reindex`, machine-specific,
# and full of binary sqlite/parquet blobs.
linux_configuration/scripts/periodic_background/digital_wellbeing/data/
linux_configuration/periodic_background/digital_wellbeing/data/
# ===========================================================================
# billsplit (Flutter) — launcher icons & platform assets MUST live in-repo

View File

@ -37,9 +37,9 @@ repos:
# chattr +i (self-commitment lock on the shutdown-enforcement
# script) makes this file unwritable on purpose; the fixer hooks
# can't open it for writing even as the owning user.
exclude: ^linux_configuration/scripts/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$
exclude: ^linux_configuration/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$
- id: end-of-file-fixer
exclude: ^linux_configuration/scripts/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$
exclude: ^linux_configuration/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$
- id: check-yaml
args: [--unsafe]
- id: check-json
@ -86,6 +86,27 @@ repos:
language: system
pass_filenames: false
always_run: true
- id: directory-depth-cap
name: Report paths over the directory-depth cap
# Repo-wide, and deliberately --warn for now: 47 paths under
# periodic_background/{hosts,digital_wellbeing} are over the cap and
# can only come down by extracting those two units, which is blocked
# on a manual guard repoint. Running it warn-only keeps the number
# visible on every commit without blocking unrelated work. Drop
# --warn once both units are out; that is the last step of the
# extraction, not a separate decision.
entry: bash meta/scripts/check_directory_depth.sh --warn --all
language: system
pass_filenames: false
always_run: true
- id: repo-size-cap
name: Enforce the source-file ceiling
# Counts tracked files only, excluding vendored and hook-generated
# trees. Prints the count on every run so the ceiling is auditable.
entry: bash meta/scripts/check_repo_size.sh
language: system
pass_filenames: false
always_run: true
- id: ci-baseline-green
name: Refuse to build on a red CI baseline
# Checks the last COMPLETED run of each required workflow on main.
@ -133,7 +154,7 @@ repos:
language: script
types: [shell]
require_serial: true
exclude: ^(\.git/|phone_focus_mode/lib/tests/|tests/)
exclude: ^(\.git/|tests/)
- id: shell-coverage-ratchet
name: Every shell library has a test suite beside it
# The ratchet from meta/shell-coverage-allowlist.txt: a lib under a
@ -218,7 +239,7 @@ repos:
(?x)^(
Bash/.*|
\.venv/.*|
linux_configuration/scripts/single_use/misc/testsAndMisc-bash/tools/.*
linux_configuration/misc/tools/.*
)$
additional_dependencies:
- types-requests

View File

@ -7,15 +7,3 @@
**/dist/
**/coverage/
node_modules/
# Captured real-world payloads used as test fixtures. These must stay
# byte-faithful to what the device or service actually emits — a real Polish
# e-paragon arrives as minified single-line JSON, and the tests read the file
# as raw text, not only as parsed JSON. Pretty-printing one silently broke
# `accepts bare JPK payload and bare JWS token`, whose regex matches
# `"data":"..."` with no space after the colon.
billsplit/test/fixtures/
# Generated by `python3 -m python_pkg.focus_policy` from phone_focus_mode/config.sh.
# json.dumps cannot reproduce prettier's single-line-short-array style, so
# formatting it here would conflict with every regeneration.

View File

@ -9,8 +9,6 @@ Mixed-language monorepo: Python packages, Bash automation, and several apps.
| `python_pkg/` | Python packages — every `.py` in the repo belongs here or in an allowlisted dir |
| `meta/` | Repo-wide tooling: `pyproject.toml`, `requirements.txt`, `run.sh`, `lint_python.sh`, `.fvmrc`, `scripts/` |
| `linux_configuration/` | Arch setup, i3 config, system maintenance, and the tracked git hooks |
| `phone_focus_mode/` | GPS-based Android focus enforcer (Bash, ADB, Magisk) |
| `billsplit/` | Receipt bill-splitting Flutter app (Dart) |
| `bottles/` | Small standalone project |
| `docs/` | Reference docs; `docs/superpowers/` holds AI workflow artifacts |
| `third_party/` | Vendored upstream skills/agents |
@ -19,6 +17,14 @@ Root `pyproject.toml`, `requirements.txt`, `run.sh`, `lint_python.sh` and
`.fvmrc` are **symlinks into `meta/`** — edit the files in `meta/`, not the
symlinks.
`linux_configuration/` has no `scripts/` or `single_use/` level: those two were
pure taxonomy carrying no information, and the directory-depth cap does not
leave room for them. Categories sit directly under it — `features/`, `fixes/`,
`utils/`, `misc/`, `fresh-install/`, `installers/`, `diagnostics/`, `gaming/`,
`boot_recovery/`, `periodic_background/`, `lib/`, `meta/`, `tests/`. A script's
own `lib/` and `tests/` subdirectories are exempt from the cap, so those stay
where they are.
Extracted to their own repos: [`steam-backlog-enforcer`](https://github.com/kuhyx/steam-backlog-enforcer),
[`screen-locker`](https://github.com/kuhyx/screen-locker),
[`diet-guard`](https://github.com/kuhyx/diet-guard),
@ -32,24 +38,26 @@ Extracted to their own repos: [`steam-backlog-enforcer`](https://github.com/kuhy
[`system-maintenance`](https://github.com/kuhyx/system-maintenance) (lives at
`~/system-maintenance`),
[`android-guardian`](https://github.com/kuhyx/android-guardian) (lives at
`~/android-guardian`).
`~/android-guardian`),
[`phone-focus-mode`](https://github.com/kuhyx/phone-focus-mode) (with
`python_pkg/focus_policy`).
Archived work: [`testsAndMisc-archive`](https://github.com/kuhyx/testsAndMisc-archive).
## Adding a Flutter app
`billsplit/` is currently the only one, and the only place binaries are
committed. To add another, repeat **both** halves or the icons fail silently:
There is currently no Flutter app here — `billsplit/` was archived, and with it
the only committed binaries. Adding one means repeating **both** halves or the
icons fail silently:
1. Add the icon globs to `.binary-allowlist`.
2. Add matching `!` overrides at the end of `.gitignore` — an ignored file
fails silently on `git add` rather than erroring.
Icons come from the shared generator in `python_pkg/app_icons/`. Dart style is
gated by CI only (`.github/workflows/billsplit-ci.yml`), not by a local hook.
Keep app dirs free of Python: the `check-python-location` hook requires every
`.py` to sit under `python_pkg/` (or `linux_configuration/`, `phone_focus_mode/`,
`meta/scripts/`). `billsplit/`'s coverage gate therefore lives at
`python_pkg/billsplit_coverage/`.
Icons come from the shared generator in `python_pkg/app_icons/`. Dart style
needs its own CI workflow; there is no local hook for it. Keep app dirs free of
Python: the `check-python-location` hook requires every `.py` to sit under
`python_pkg/` (or `linux_configuration/`, `meta/scripts/`), so an app's coverage
gate lives in `python_pkg/`.
## Git Workflow

View File

@ -32,7 +32,7 @@ branches, measured in a clean worktree. **File-length cap needs nothing:** 0
violations, hook-enforced.
**What is left, if anyone wants it:** 8 directories still have no suite at all
(`.githooks/lib`, `scripts/meta/lib`, `mtk_root/lib`, `digital_wellbeing/{pacman,
(`.githooks/lib`, `meta/lib`, `mtk_root/lib`, `digital_wellbeing/{pacman,
virtualbox}/lib`, `system-maintenance/bin/lib`, `single_use/{fresh-install,}/lib`)
— 20 libs, ~1,980 lines. All are allowlisted, so nothing is blocked. This is
optional work now, not a campaign.
@ -100,7 +100,7 @@ SP=$(mktemp -d); git worktree add --detach --quiet "$SP/co" HEAD
time (cd "$SP/co" && SKIP=pytest-coverage pre-commit run --all-files)
time (cd "$SP/co" && python meta/scripts/pytest_changed_packages.py)
time bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh
time bash linux_configuration/fixes/lib/tests/run_all.sh
git worktree remove --force "$SP/co"
```
@ -242,7 +242,7 @@ the shape before you spend it.
## The suite and its harnesses
`linux_configuration/scripts/single_use/fixes/lib/tests/` is the reference
`linux_configuration/fixes/lib/tests/` is the reference
suite: **30 test files, 645 assertions, all green, zero suppressions, 37s.**
Copy its shape. Layers:

View File

@ -13,78 +13,93 @@ its CI workflow, the `app_icons` registry entry, and the paired
patterns at all).
**Extracted** to public repos, full history, each with CI it did not have here:
`reverse-survivors`, `kcd2-dice-solver` (cloned to `~/kcd2-dice-solver`),
`focus-owner`, `mtk-root` (took the four `mtk_*` libs and three suites that
lived in `scripts/lib/`).
`reverse-survivors`, `kcd2-dice-solver` (`~/kcd2-dice-solver`), `focus-owner`,
`mtk-root`, `system-maintenance` (`~/system-maintenance`), `android-guardian`
(`~/android-guardian`), `phone-focus-mode` (with `python_pkg/focus_policy`).
**Gates written, deliberately NOT wired**: `meta/scripts/check_directory_depth.sh`
(cap 2; exempts `third_party/`, `docs/superpowers/`, `.github/skills/` by prefix
and `lib/` / `tests/` by path segment). Violations 556 → 294.
**Flattened.** `linux_configuration/scripts/` and `single_use/` are gone;
categories sit directly under `linux_configuration/`. `i3-configuration` moved
out of `periodic_background` into `i3/` + `i3blocks/`, and
`misc/testsAndMisc-bash/` lost its redundant nesting.
Depth, tests and pre-commit verified green at every commit; nothing used
`--no-verify`.
**Length cap widened** to catch extensionless scripts, and `boot-repair` split
756 → 218 with four libs.
## Decisions taken this session
Depth violations **556 → 104**; tracked files **2295 → ~1980**. Every commit
green; nothing used `--no-verify`.
- **Depth cap is 2**, with `lib/` and `tests/` exempt — so the ~118 single_use
lib files stay put and step D only flattens entry scripts.
- **`meta/` is in scope** for the cap.
- **`scripts/lib/common.sh` STAYS.** Measured: 55 consumers, 51 of which remain
here. The `.githooks` use a _separate_ `common.sh`, so the ">2 units" rule
selects nothing worth moving. Deviation from the original instruction,
agreed after measurement.
- **`periodic_background/lib/` STAYS** — 9 files, one consumer
(`check_and_enable_services.sh`), not a shared library.
- New repos are **public**; vmbox pass required for **all four** subsystems.
## Remaining
## Remaining, in order
1. ~~The guard repoint.~~ **DONE on the host, 2026-08-23.** The "classifier
blocks me" note was stale: `sudo -n` works and `guardctl` is at
`/usr/local/bin/guardctl`. Verified in vmbox first (stale-path scenario
reproduced, then repointed), then run on the host one guard at a time with
a DNS check between them. Both now name
`/usr/local/share/guard-lib-plugins/`, both re-enforced (`----i-------e---`,
path units active), both target files byte-identical by md5 before and
after, DNS resolving throughout. Enforcement confirmed live, not just
reported: a `sudo` append to `/etc/nsswitch.conf` is refused.
Backups at `/var/tmp/{resolved.conf,nsswitch.conf}.pre-repoint`.
1. `hosts` — owns `/etc/guard-lib/targets/{resolved,nsswitch}.conf` plugin
paths. Confirm `guardctl status` after, not just that files moved.
2. `phone_focus_mode` + `python_pkg/focus_policy` — must come after `hosts`:
`deploy_phases.sh:73` executes hosts' `generate_hosts_file.sh`.
3. `digital_wellbeing` **last** — pacman wrapper, `chattr +i`, the 12
hardcoded orchestrator paths in `check_and_enable_services.sh:61-74` /
`setup_periodic_system.sh:20-23`, and now `heavy_job_lock.sh`, which moved
in with it. It also owns `test_shutdown_timer_monitor.sh`, the pair test
left behind here.
4. Step D: flatten the 207 remaining entry-script violations
(`single_use/**` is ~130 of them). Deduplicate the two Nextcloud
implementations first — ~2,780 lines for one capability.
5. Step E: wire both gates, close the `boot-repair` hole (756 lines, escapes
the 250-line cap because `is_source_file()` needs a dot in the filename),
prune `docs/superpowers/` churn.
2. `hosts` extraction — **now unblocked** by (1). Its installer was already proven in
vmbox to run from an extracted layout with no monorepo path.
3. `digital_wellbeing` **last** — pacman wrapper, `chattr +i`, `heavy_job_lock.sh`
(moved in with it), and the 12 orchestrator paths in
`check_and_enable_services.sh` / `setup_periodic_system.sh`, which now point
at the NEW locations and will need updating again when it moves. It also owns
`linux_configuration/tests/test_shutdown_timer_monitor.sh`.
4. ~~Wire the gates.~~ **DONE.** The 57 structural violations are exempted
and both gates run on every commit. The depth gate runs `--warn`, because
the only 47 paths left over the cap are the ones (2) and (3) will remove;
drop `--warn` as the last step of those extractions and the cap enforces
for real. `check_repo_size.sh` counts tracked source files (1049/1200) and
also caps the bookkeeping dirs at 60 each.
5. ~~Prune `docs/superpowers/evidence|contracts`.~~ **DONE** — 655 removed,
newest 20 of each kept, tracked files 1993 → 1340. Nothing reads the
corpus; git history keeps it. `.hippo/` is **decided but not executed**:
all 158 entries have `retrieval_count: 0`, 22 self-tag `invalidated`, the
last write was 2026-05-28, `hippo.db` is untracked and the tool is
uninstalled. It is dead; awaiting the untrack-vs-delete call.
6. **Recommended against**, with numbers. The estimate was right (~3,600 lines
across 22 files — a filename grep finds only 400 of them), but the two
`nc_*` (1212 lines) and `rpi_nc_*` (1171 lines) lib families are parallel
_evolutions_, not copies: all four shared function names differ in body,
not just comments. Only 3 of 15 libs have tests, and the target is a remote
Raspberry Pi that cannot be tested against from here. Merging is a
regression risk out of proportion to an optional cleanup.
7. **3.7 GB of extraction residue**, untracked and unreported until now:
`focus_owner/` (3.2G), `bucket_catch/` (303M), `kcd2_dice_solver/` (149M),
`billsplit/` (62M). None has a `.git`; each holds **zero** source files
outside `build/`, `node_modules/`, `dist/` and `coverage/`. The real repos
are on GitHub and were pushed 2026-08-23, so this is pure build output —
`rm -rf` on the user's say-so. Note `focus-owner` has no local clone at
`~/focus-owner`; only the GitHub copy exists.
## Traps already paid for
- **Run the thing, don't read it.** Repointing kcd2 surfaced three failures no
grep would have found: pnpm ignoring the `package.json` "pnpm" field, pnpm
refusing to purge `node_modules` without a TTY, and the Docker container
still bind-mounting the deleted monorepo path.
- **`/usr/local/bin` holds copies that name repo paths** — invisible to a repo
grep, and `periodic-system-maintenance.sh` runs hourly with three such paths
into digital_wellbeing and hosts. Any extraction of those two must
_reinstall_ it, not just edit the repo copy.
- **Removing a file can break a suite that stays.** Deleting `mtk_harness.sh`
broke `test_common_datetime.sh`, which sources it. Check both directions.
- **pre-commit's patch restore can silently revert an edit** made before the
commit — the `app_icons` change had to be applied twice. Re-grep after
committing.
- `shell-tests.yml` discovers _some_ suites by glob and names others in an
explicit list. A removal breaks the list (CI fails on the missing file) and
silently shrinks the glob. Check both.
- **Never let a test fall back to `/usr/local/bin`.** The installed copy can be
older than source — `shutdown-timer-monitor.sh` is, on this machine — so the
test compares an installer template against a binary it never generated. It
hung. Prefer a sibling checkout and SKIP when absent.
- Extractions keep surfacing pre-existing bugs. `update_android_hosts.sh`
pointed `GUARDIAN_MODULE_DIR` at a sibling that never existed. Fix them
rather than carrying them forward, and guard at the single funnel.
- **Run it, don't read it.** Repointing kcd2 hit three failures in a row (pnpm
ignoring the `package.json` field, no-TTY `node_modules` purge, a Docker mount
on the deleted path). `dice.kuhy.duckdns.org` now serves from the new repo.
- **`/usr/local/bin` holds copies naming repo paths** — invisible to a repo grep.
`report_live_state.sh` scans there now.
- **Removing a file can break a suite that stays** (`mtk_harness.sh`), and a
removal can silently shrink CI (`shell-tests.yml` uses TWO hand-maintained
lists plus a glob — check all three).
- **Never let a test fall back to `/usr/local/bin`**: the installed copy can be
stale, and the test then compares against a binary it never generated.
- **pre-commit's patch restore can revert an edit** made before the commit. The
`app_icons` and `AGENTS.md` changes each had to be applied twice.
- **Path rewrites need resolving, not reviewing.** Relative `source` depths
differ per file (`../../` vs `../../../`), `REPO_ROOT` walks a fixed number of
levels, `$VAR/scripts/...` prefixes hide from a naive regex, and
`# shellcheck source=` directives break independently of the code.
- **Sourcing top-level code is not a split.** boot-repair's report block has
`exit` calls; moving it broke 30 of 42 tests.
## Unrelated: syncyomi-guard is red
Failing since 00:00 on 2026-08-23, ~17h before this session — nothing to do
with the restructure. It is working as designed: the library collapsed from
2185 manga / 68902 chapters to 8 / 895. See the `syncyomi-restore-silent-partial`
memory; do NOT checkpoint the WAL before recovering. Newest snapshot in
`~/syncyomi/snapshots/` is 2026-08-15.
Failing since 00:00 on 2026-08-23, ~17h before this work started. It is working
as designed: the library collapsed from 2185 manga / 68902 chapters to 8 / 895.
See the `syncyomi-restore-silent-partial` memory; do NOT checkpoint the WAL
before recovering. Newest snapshot in `~/syncyomi/snapshots/` is 2026-08-15.

View File

@ -263,7 +263,7 @@ docker exec "${CADDY_CONTAINER}" caddy reload --config "${CADDYFILE_IN_CONTAINER
<div class="foot">
Generated by <code>/explain-diff</code> for commit <code>59430f9</code> ·
<code>linux_configuration/scripts/single_use/features/setup_syncyomi.sh</code>
<code>linux_configuration/features/setup_syncyomi.sh</code>
</div>
</div>

View File

@ -116,7 +116,7 @@
<main>
<h1>Night lockdown: keeping the servers up through the curfew</h1>
<p class="sub">How a self-discipline shutdown stopped killing seven services every night — and the four bugs that surfaced on the way there. <br><code>3ebb56c</code> · 2026-07-17 · <code>linux_configuration/scripts/periodic_background/digital_wellbeing/</code></p>
<p class="sub">How a self-discipline shutdown stopped killing seven services every night — and the four bugs that surfaced on the way there. <br><code>3ebb56c</code> · 2026-07-17 · <code>linux_configuration/periodic_background/digital_wellbeing/</code></p>
<nav class="toc">
<strong>Contents</strong>

View File

@ -318,7 +318,7 @@ elif [[ -f "/usr/local/lib/common.sh" ]]; then # ← the trap
<h3>a. Making bash unit-testable</h3>
<p>
The two new diagnostics live in <code>linux_configuration/scripts/diagnostics/</code>. Their
The two new diagnostics live in <code>linux_configuration/diagnostics/</code>. Their
arithmetic — rate conversion, duty percentage, the mean of a sample window — is pulled out into
pure functions, with the measurement loop kept separate:
</p>

View File

@ -17,9 +17,9 @@ its timer next fires.
```
## systemd units
/etc/systemd/system/dns-blocklist-refresh.service
7:ExecStart=/home/kuhy/testsAndMisc/linux_configuration/scripts/single_use/features/setup_dns_blocker.sh refresh
7:ExecStart=/home/kuhy/testsAndMisc/linux_configuration/features/setup_dns_blocker.sh refresh
/etc/systemd/system/media-organizer.service
10:ExecStart=/home/kuhy/testsAndMisc/linux_configuration/scripts/single_use/utils/organize_downloads.sh
10:ExecStart=/home/kuhy/testsAndMisc/linux_configuration/utils/organize_downloads.sh
/home/kuhy/.config/systemd/user/endurain-import.service
3:Documentation=file:///home/kuhy/testsAndMisc/endurain/README.md
11:WorkingDirectory=/home/kuhy/testsAndMisc
@ -33,37 +33,37 @@ its timer next fires.
## /etc references
/etc/guard-lib/targets/nsswitch.conf
4:PLUGIN="/home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/hosts/guard/plugins/nsswitch-plugin.sh"
4:PLUGIN="/home/kuhy/testsAndMisc/linux_configuration/periodic_background/hosts/guard/plugins/nsswitch-plugin.sh"
/etc/guard-lib/targets/resolved.conf
4:PLUGIN="/home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/hosts/guard/plugins/resolved-plugin.sh"
4:PLUGIN="/home/kuhy/testsAndMisc/linux_configuration/periodic_background/hosts/guard/plugins/resolved-plugin.sh"
## installed scripts referencing the repo
/usr/local/bin/hosts-file-monitor.sh
10:HOSTS_INSTALL_SCRIPT="/home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/hosts/install.sh"
10:HOSTS_INSTALL_SCRIPT="/home/kuhy/testsAndMisc/linux_configuration/periodic_background/hosts/install.sh"
/usr/local/bin/periodic-system-maintenance.sh
26:PACMAN_WRAPPER_INSTALL="/home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/digital_wellbeing/pacman/install_pacman_wrapper.sh"
27:MAKEPKG_WRAPPER_INSTALL="/home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/digital_wellbeing/pacman/install_makepkg_wrapper.sh"
28:HOSTS_INSTALL_SCRIPT="/home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/hosts/install.sh"
26:PACMAN_WRAPPER_INSTALL="/home/kuhy/testsAndMisc/linux_configuration/periodic_background/digital_wellbeing/pacman/install_pacman_wrapper.sh"
27:MAKEPKG_WRAPPER_INSTALL="/home/kuhy/testsAndMisc/linux_configuration/periodic_background/digital_wellbeing/pacman/install_makepkg_wrapper.sh"
28:HOSTS_INSTALL_SCRIPT="/home/kuhy/testsAndMisc/linux_configuration/periodic_background/hosts/install.sh"
/usr/local/bin/wsg-grabber
4:export PYTHONPATH="/home/kuhy/testsAndMisc${PYTHONPATH:+:$PYTHONPATH}"
## symlinks into the repo
/home/kuhy/.config/i3blocks/claude_usage.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/claude_usage.sh
/home/kuhy/.config/i3blocks/config -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/config
/home/kuhy/.config/i3blocks/cpu_monitor.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/cpu_monitor.sh
/home/kuhy/.config/i3blocks/disk.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/disk.sh
/home/kuhy/.config/i3blocks/ethernet.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/ethernet.sh
/home/kuhy/.config/i3blocks/gpu_monitor.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/gpu_monitor.sh
/home/kuhy/.config/i3blocks/memory.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/memory.sh
/home/kuhy/.config/i3blocks/motherboard_temp.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/motherboard_temp.sh
/home/kuhy/.config/i3blocks/pc_startup_status.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/pc_startup_status.sh
/home/kuhy/.config/i3blocks/persist_common.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/persist_common.sh
/home/kuhy/.config/i3blocks/shutdown_countdown.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/shutdown_countdown.sh
/home/kuhy/.config/i3blocks/time.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/time.sh
/home/kuhy/.config/i3blocks/volume.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/periodic_background/i3-configuration/i3blocks/volume.sh
/home/kuhy/.local/bin/keepass-open -> /home/kuhy/testsAndMisc/linux_configuration/scripts/single_use/features/keepass-open.sh
/home/kuhy/.local/bin/line-speed-probe.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/diagnostics/line-speed-probe.sh
/home/kuhy/.local/bin/steam-download-duty.sh -> /home/kuhy/testsAndMisc/linux_configuration/scripts/diagnostics/steam-download-duty.sh
/home/kuhy/.config/i3blocks/claude_usage.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/claude_usage.sh
/home/kuhy/.config/i3blocks/config -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/config
/home/kuhy/.config/i3blocks/cpu_monitor.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/cpu_monitor.sh
/home/kuhy/.config/i3blocks/disk.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/disk.sh
/home/kuhy/.config/i3blocks/ethernet.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/ethernet.sh
/home/kuhy/.config/i3blocks/gpu_monitor.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/gpu_monitor.sh
/home/kuhy/.config/i3blocks/memory.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/memory.sh
/home/kuhy/.config/i3blocks/motherboard_temp.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/motherboard_temp.sh
/home/kuhy/.config/i3blocks/pc_startup_status.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/pc_startup_status.sh
/home/kuhy/.config/i3blocks/persist_common.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/persist_common.sh
/home/kuhy/.config/i3blocks/shutdown_countdown.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/shutdown_countdown.sh
/home/kuhy/.config/i3blocks/time.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/time.sh
/home/kuhy/.config/i3blocks/volume.sh -> /home/kuhy/testsAndMisc/linux_configuration/i3blocks/volume.sh
/home/kuhy/.local/bin/keepass-open -> /home/kuhy/testsAndMisc/linux_configuration/features/keepass-open.sh
/home/kuhy/.local/bin/line-speed-probe.sh -> /home/kuhy/testsAndMisc/linux_configuration/diagnostics/line-speed-probe.sh
/home/kuhy/.local/bin/steam-download-duty.sh -> /home/kuhy/testsAndMisc/linux_configuration/diagnostics/steam-download-duty.sh
/home/kuhy/.oh-my-zsh/custom/calc-live.zsh -> /home/kuhy/testsAndMisc/linux_configuration/zsh/calc-live.zsh
/home/kuhy/.oh-my-zsh/custom/claude-tty-fix.zsh -> /home/kuhy/testsAndMisc/linux_configuration/zsh/claude-tty-fix.zsh
/home/kuhy/.oh-my-zsh/custom/token-savers.zsh -> /home/kuhy/testsAndMisc/linux_configuration/zsh/token-savers.zsh

View File

@ -43,7 +43,7 @@ SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
### Shape of a new lib (two hooks disagree unless you get this right)
Follow `scripts/lib/common.sh`: **shebang present, file executable.** The two
Follow `lib/common.sh`: **shebang present, file executable.** The two
obvious-looking alternatives each fail a hook:
- No shebang → `shellcheck` SC2148 ("target shell unknown").
@ -56,9 +56,9 @@ boilerplate that feeds jscpd. Say so in the lib's header comment.
- **Two live units point at repo paths** and break if a file moves or is
renamed. `systemctl cat` them after touching either:
- `/etc/systemd/system/dns-blocklist-refresh.service` →
`scripts/single_use/features/setup_dns_blocker.sh refresh`
`./features/setup_dns_blocker.sh refresh`
- `/etc/systemd/system/media-organizer.service` →
`scripts/single_use/utils/organize_downloads.sh`
`./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.
@ -69,12 +69,12 @@ A split is only safe if the file still resolves its libs from wherever it
actually runs. Two ways a script leaves the repo, both silent when broken:
- **Copied out** — only three, all under
`scripts/periodic_background/hosts/guard/pacman-hooks/`, installed to
`periodic_background/hosts/guard/pacman-hooks/`, installed to
`/usr/local/share/hosts-guard/` by `hosts/guard/install_pacman_hooks.sh`.
Splitting any of those three means the installer must copy the new libs too,
**in the same commit** — the same trap as `phone_focus_mode/deploy.sh`.
- **Symlinked in** — exactly one: `/usr/local/bin/start-player2` →
`scripts/gaming/start-player2.sh`. `${BASH_SOURCE[0]%/*}` resolves to
`gaming/start-player2.sh`. `${BASH_SOURCE[0]%/*}` resolves to
`/usr/local/bin` there, so a lib path must go through
`readlink -f "${BASH_SOURCE[0]}"` first.

View File

@ -1,7 +0,0 @@
{
"title": "agent automation bootstrap",
"objective": "Define what success looks like for agent automation bootstrap.",
"acceptance_criteria": ["Criterion 1", "Criterion 2"],
"out_of_scope": ["Explicitly excluded work item"],
"verifier": "pre-commit + task-specific tests"
}

View File

@ -1,19 +0,0 @@
{
"title": "Split analyze_repo.sh (869 lines) into an entry script and five libs",
"objective": "Bring linux_configuration/scripts/single_use/utils/analyze_repo.sh under the repo-wide 250-line cap by extracting its helper functions and its per-STEP top-level blocks into lib/analyze_repo_*.sh, without changing what the script emits.",
"acceptance_criteria": [
"analyze_repo.sh and every new lib/analyze_repo_*.sh file is at most 250 lines.",
"shellcheck reports zero findings across the entry script and all five libs, at the repo's no-severity-filter setting, with no suppression added.",
"The set of shell functions defined after sourcing is a superset of the original eight, adding only the six wrappers introduced around former top-level blocks: detect_languages, separate_code_and_comments, report_languages, analyze_symbols, analyze_cscope, analyze_clang_ast.",
"Every executable (non-comment, non-blank) line of the original file survives somewhere in the entry or a lib, except for lines deliberately edited to quote an assoc-array subscript, quote $TOP_N, or add a local declaration.",
"A stubbed run of the entry script's preamble defines all fourteen functions, proving each source line resolves at runtime rather than merely parsing.",
"The eight STEP headers the script prints are all still emitted, in the original order.",
"No lib sources another lib; the entry sources all five."
],
"out_of_scope": [
"Executing analyze_repo.sh, whose install_missing_tools calls sudo pacman, cargo install and makepkg; decision 6 forbids running it.",
"Defining KEYWORDS_SHELL and KEYWORDS_JAVA, which the report pass references but which have never existed. The lookup guards on a non-empty value so those two languages are silently skipped; defining them would change output and is a separate fix.",
"Fixing the unguarded cd calls or other pre-existing behaviour in the moved code beyond what shellcheck requires."
],
"verifier": "shellcheck over the entry plus all five libs (expects zero findings), bash -n on each, bash ~/utils/scripts/check_file_length.sh over the six files (expects none listed), a line-set diff of the original against entry+libs showing no unintended loss, and a stubbed run of the entry preamble printing all fourteen function names."
}

View File

@ -1,20 +0,0 @@
{
"title": "android_ui: element-targeted Android automation shared across repos",
"objective": "Give agents and scripts a way to drive a real Android device by element identity (text, content-desc, resource-id) instead of pixel coordinates read off screenshots. Success means a flow can be driven with zero hardcoded coordinates, every failure exits non-zero naming the query, and a mis-tap or unlanded keystroke is impossible to mistake for success.",
"acceptance_criteria": [
"find/tap/wait resolve elements by identity and re-read the tree immediately before acting, never reusing a stale coordinate",
"A query matching zero or more than one element raises rather than acting on the first match",
"type_into/type_into_field verify the field's contents actually changed, and clear a filled field so typing replaces rather than appends",
"keyboard_is_up() distinguishes 'element absent' from 'element behind the soft keyboard'; tap closes the keyboard first",
"dismiss_keyboard closes the IME without popping the Flutter route, and raises if the keyboard stays up",
"Partial uiautomator dumps (only the focused EditText nodes) are retried, and empty EditText nodes remain addressable",
"100% line and branch coverage, no noqa/type:ignore suppressions anywhere"
],
"out_of_scope": [
"MCP server wrapper (the CLI and library land first)",
"scroll_to(): a widget outside the viewport is not in the tree yet",
"Rolling the tool out to ~/todo and ~/dufs-cloud/app",
"flutter drive / integration_test backend, which cannot drive a release APK"
],
"verifier": "pre-commit run --files <changed>; python3 -m pytest python_pkg/android_ui/ (57 tests, 100% coverage); plus manual exercise against the physical Pixel 6a driving workout_app's Settings/connect flow"
}

View File

@ -1,18 +0,0 @@
{
"title": "Shared launcher-icon generator for the Flutter apps",
"objective": "Replace the stock Flutter 'beach' launcher icon on every Flutter/Dart app with an icon from one consistent family, and make the family reproducible so future apps inherit it instead of drifting. The family is a charcoal #1B1D21 field carrying a single glyph in that app's own theme accent, drawn at one stroke weight and optically centred so a row of the icons lines up. Success means the phone launcher shows five distinct, on-style icons and a new app can be given a matching icon by adding one glyph plus one registry entry.",
"acceptance_criteria": [
"python_pkg/app_icons exposes a CLI with list, preview and generate subcommands, runnable as PYTHONPATH=~/testsAndMisc python3 -m python_pkg.app_icons.",
"Glyphs are optically centred automatically: the renderer measures rendered ink and translates (never scales) the fragment, so stroke weight stays identical across the family.",
"generate warns when a glyph's ink exceeds the 560px adaptive-icon safe box, so no icon ships at risk of being clipped by a launcher mask.",
"Each app gets three layers - base icon, adaptive foreground, and Android 13 monochrome - as both SVG source and 1024px PNG.",
"The package passes ruff, mypy, pylint and bandit, and holds 100% line and branch coverage with all external tools mocked.",
"All five apps show their new icon in the phone app drawer, installed with adb install -r and with no app data wiped."
],
"out_of_scope": [
"The per-app repositories (dufs-cloud, screen-locker, wake-alarm, diet-guard, todo) - their generated assets are committed separately in their own repos.",
"iOS, web, Windows and macOS icon targets - none of these apps configure those platforms.",
"Changing any app's android:label or in-app theme colours; this is icons only."
],
"verifier": "pre-commit run --files <staged>; python3 -m pytest python_pkg/app_icons --cov=python_pkg.app_icons --cov-report=term-missing (100% required); plus on-device verification: adb install -r each app then screenshot the launcher."
}

View File

@ -1,19 +0,0 @@
{
"title": "note-ascender glyph and lyricanki registry entry for the icon family",
"objective": "Give ~/lyricanki an on-style launcher icon so it stops shipping the stock Flutter 'beach' icon, by extending the shared generator rather than hand-rolling a one-off. The glyph is a note whose stem drops past the head onto a flat baseline foot, so a single vertical stroke reads as both a music stem and a letterform ascender on a text line - the app turns songs into vocabulary. Success means lyricanki renders a family icon that is unambiguous at 48dp and clears the adaptive-icon safe box.",
"acceptance_criteria": [
"glyphs.get_glyph('note-ascender') resolves, and the registry holds 13 glyphs with every pre-existing one still importable.",
"apps.get_app('lyricanki') returns repo=~/lyricanki, accent=#B8862E (the shared family accent, not an app-specific colour), glyph=note-ascender, linux=False.",
"generate --app lyricanki --android emits six assets and rewrites the Android mipmaps with no safe-box warning, i.e. the glyph ink is within 560px on both axes.",
"The note-head's lowest point clears the baseline foot by at least MIN_NEGATIVE_SPACE (36px), computed as sqrt((rx*sin t)^2 + (ry*cos t)^2) below the ellipse centre rather than ry, so the head does not merge into the foot at launcher size.",
"python_pkg.app_icons keeps 100% line and branch coverage and passes ruff, mypy, pylint and bandit; every touched file stays under the 250-line cap.",
"The rendered icon is inspected at both 1024px and 48px and reads as a note on a baseline - not as a mailbox, which is what the first draft produced."
],
"out_of_scope": [
"The lyricanki repository's own generated assets and pubspec wiring - committed separately in ~/lyricanki.",
"Any change to the shared family constants in style.py (background, stroke weight, safe box, accent) - those govern every existing app's icon.",
"iOS, web, Windows and macOS icon targets; lyricanki is Android-only per decision Q6.",
"Re-rendering any other app's icons."
],
"verifier": "pre-commit run --files <staged>; python3 -m pytest python_pkg/app_icons --cov=python_pkg.app_icons --cov-report=term-missing (100% required); PYTHONPATH=~/testsAndMisc python3 -m python_pkg.app_icons generate --app lyricanki --android must print no safe-box warning; visual check of assets/icon/icon.png downscaled to 48px."
}

View File

@ -1,18 +0,0 @@
{
"title": "Clear arch_cpu.sh from the shell coverage allowlist",
"objective": "Bring arch_cpu.sh to 100% measured line coverage through tests/run_all.sh and remove its allowlist exemption, taking the allowlist from 91 entries to 90.",
"acceptance_criteria": [
"The jail reports arch_cpu.sh at 100.00% measured through tests/run_all.sh, not through a single test file.",
"A second measurement at --min 100 exits 0, so a shortfall would be a non-zero exit rather than a number to read.",
"With the allowlist line removed, check_shell_coverage.sh on arch_cpu.sh prints 'every checked shell library meets the coverage bar'.",
"Both functions are covered across every branch: no cpufreq at all, all cores already tuned, a mixed set where only some cores lag, cpupower absent, cpupower present and unconfigured, cpupower already configured, and all three I/O scheduler targets (none for NVMe, mq-deadline for SSD, bfq for HDD).",
"arch_cpu.sh's production behaviour is unchanged: every new override defaults to the real path it replaced.",
"The whole suite stays green and shellcheck reports nothing, with zero suppressions."
],
"out_of_scope": [
"arch_sysctl.sh's kcov registration failure, which is tracked separately and stays on the allowlist.",
"Changing the coverage instrument, which is scheduled after the eight libs.",
"arch_hardware.sh, the third lib of this family, which reuses this harness in a later commit."
],
"verifier": "timeout 900s bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure arch_cpu.sh --min 100 --fail-on-case-error -- \"\" (expects 57/57 = 100.00%, exit 0), followed by bash meta/scripts/check_shell_coverage.sh on the lib with its allowlist line removed."
}

View File

@ -1,18 +0,0 @@
{
"title": "Clear arch_hardware.sh and fix its unreachable journal vacuum",
"objective": "Bring arch_hardware.sh to 100% measured line coverage, repair the size regex that made its journal vacuum unreachable, and remove its allowlist exemption, finishing the optimize_arch_desktop.sh family's measurable libs.",
"acceptance_criteria": [
"The jail reports arch_hardware.sh at 100.00% through tests/run_all.sh, at --min 100, exiting 0 with no case timeout.",
"check_shell_coverage.sh passes on arch_hardware.sh with its allowlist line removed.",
"tweak_journal vacuums a journal reported as '4.2G' (no space, the form journalctl actually prints) AND one reported as '4.2 G', and leaves '305.5M' alone -- so the fix is a widening, not a swap.",
"All five functions are covered, including both boot-loader flavours, the no-boot-loader case, and an empty loader-entries directory.",
"arch_cpu.sh still measures 100.00%, proving the shared _t_hide change did not regress the previously cleared lib.",
"The suite stays green and shellcheck reports nothing, with zero suppressions."
],
"out_of_scope": [
"arch_sysctl.sh's kcov registration failure, which stays on the allowlist.",
"Changing the coverage instrument or the jail's default case timeout.",
"The identical journal regex in any lib other than arch_hardware.sh; arch_perf_report.sh was fixed in an earlier session."
],
"verifier": "timeout 900s bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure arch_hardware.sh --min 100 --fail-on-case-error -- \"\" (expects 94/94 = 100.00%, exit 0), then the same for arch_cpu.sh, then check_shell_coverage.sh on arch_hardware.sh."
}

View File

@ -1,17 +0,0 @@
{
"title": "Test arch_perf_probes.sh to 100% and clear it from the shell-coverage allowlist",
"objective": "Cover the sixth of the sixteen untested fixes/lib libs, the diagnostic-probe half of diagnose_arch_performance.sh. Unlike the two libs before it this one contains no dead branch, so the whole job is test-writing: reaching the swap-pressure branch that depends on /proc/meminfo, and the governor branches that depend on a real /sys tree.",
"acceptance_criteria": [
"arch_perf_probes.sh measures 100.00% (93/93) through lib/tests/run_all.sh, twice, the second run at --min 100 with exit 0.",
"check_shell_coverage.sh exits 0 for arch_perf_probes.sh with its allowlist line removed, i.e. with no exemption.",
"The check_memory_pressure swap branch is genuinely exercised with controlled figures, not skipped because this host happens to swap.",
"Every file in fixes/lib/tests stays under the repo's 250-line cap and passes shellcheck with no suppression added.",
"The five libs cleared earlier in the session still pass the gate."
],
"out_of_scope": [
"Any change to arch_perf_probes.sh itself.",
"bt_adapter.sh, still exempt at 98.55% for the backslash-continued assignment flavour of defect (a).",
"The remaining ten untested fixes/lib libs."
],
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (expects all 21 files passing, 16 + 27 for the two arch_perf_probes files), plus bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure arch_perf_probes.sh --min 100 --fail-on-case-error -- \"\" (expects 93/93 = 100.00% and exit 0), plus bash meta/scripts/check_shell_coverage.sh linux_configuration/scripts/single_use/fixes/lib/arch_perf_probes.sh (expects exit 0)."
}

View File

@ -1,18 +0,0 @@
{
"title": "Test arch_perf_report.sh, open the arch-performance family, and fix the dead journal-size check",
"objective": "Cover the fifth of the sixteen untested fixes/lib libs and stand up the harness the arch-performance group will share. Writing the tests exposed a second dead branch -- the journal size regex demanded a space before the unit that journalctl never prints -- so this lands that fix alongside the coverage. The lib stops at 98.33%: its last line is a redirected closing brace no test can reach.",
"acceptance_criteria": [
"arch_perf_report.sh measures 98.33% (59/60) through lib/tests/run_all.sh, twice, with line 20 the only uncovered line both times.",
"The old journal regex is shown NOT to match journalctl's real output before the fix, and the fixed one shown to match both the spaced and unspaced forms.",
"Line 20 is shown to be a closing brace of a redirected group that executes, not a missing test.",
"meta/shell-coverage-allowlist.txt is UNCHANGED -- arch_perf_report.sh does not meet the 100% bar.",
"The four bluetooth suites and the eight pacman_hook_stall suites still pass after _t_hide and _t_full_path move into lib_test_core.sh.",
"Every file stays under the repo's 250-line cap, and pre-commit passes with no suppression added."
],
"out_of_scope": [
"Clearing arch_perf_report.sh, bt_audio.sh or bt_adapter.sh from the allowlist. All three are capped by defect (a) in docs/kcov-under-report.md.",
"Changing continuation_lines() in meta/scripts/lib/shell_coverage_lines.py. That is the next commit, kept separate so a denominator change can be reverted without losing these tests.",
"The remaining eleven untested fixes/lib libs."
],
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (expects all files passing, 17 + 21 for the two arch_perf_report files), plus bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure arch_perf_report.sh --min 1 --fail-on-case-error -- \"\" (expects 59/60 = 98.33%, uncovered 20), plus bash meta/scripts/check_shell_coverage.sh on the cleared libs (expects exit 0)."
}

View File

@ -1,19 +0,0 @@
{
"title": "Test arch_sysctl.sh and open the optimize_arch_desktop lib family",
"objective": "Give arch_sysctl.sh a real test suite covering both of its sysctl-tuning functions, and add the third family harness so arch_cpu.sh and arch_hardware.sh can reuse it, as the first of the eight untested fixes/lib libraries.",
"acceptance_criteria": [
"test_arch_sysctl.sh exercises both tweak_vm_sysctl and tweak_network_sysctl across every branch: already-tuned-with-drop-in (skip), already-tuned-without-drop-in (write), value-differs (write and reload), sysctl-read-failure, and the tcp_bbr modprobe guard.",
"The whole suite stays green: run_all.sh reports every test file passing, including the 20 that predate this change.",
"shellcheck reports nothing on the new and modified files, with zero suppressions added anywhere.",
"No write reaches /etc: the two real sysctl drop-ins keep their pre-existing mtimes after the suite runs.",
"arch_sysctl.sh's production behaviour is unchanged -- SYSCTL_DROPIN_DIR defaults to the real /etc/sysctl.d.",
"arch_sysctl.sh stays on meta/shell-coverage-allowlist.txt, because it is not yet measurable through run_all.sh; the allowlist line may only be removed once the jail reports a real percentage."
],
"out_of_scope": [
"Removing arch_sysctl.sh from the coverage allowlist while its measurement still fails.",
"Changing the coverage instrument (meta/scripts/lib/shell_coverage_lines.py), which is scheduled after the eight libs.",
"Refactoring pacman_hook_stall_harness.sh onto lib_test_core.sh.",
"Touching arch_cpu.sh or arch_hardware.sh, which reuse this harness in later commits."
],
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (all test files pass, arch_sysctl reports 23 passed / 0 failed), plus shellcheck on the four touched shell files, plus stat on /etc/sysctl.d/9[01]-*.conf showing unchanged mtimes."
}

View File

@ -1,16 +0,0 @@
{
"title": "Move install_plagiarism_tools.sh and siblings to testsAndMisc-archive",
"objective": "The user said they no longer use the plagiarism-detection tooling (built and just split this session per NEXT_SESSION_PROMPT.md §3). Move it out of testsAndMisc into testsAndMisc-archive with full git history preserved, rather than leaving unused code in the primary repo.",
"acceptance_criteria": [
"All 13 plagiarism-tool files (install_plagiarism_tools.sh, download_nltk_data.py, check_plagiarism.py, plagiarism_similarity.py, sherlock.py, the 3 lib/plagiarism_*.sh siblings, and the 5 lib/tests/*plagiarism* test files) exist in kuhyx/testsAndMisc-archive with their git history intact, including the pre-rename path (linux_configuration/scripts/utils/install_plagiarism_tools.sh) from before the single_use/periodic_background reorg.",
"The archive push completed and is verified live on GitHub before any deletion happens in the main repo -- deleting first and discovering a failed archive push would lose the only copy.",
"The same 13 files are removed from testsAndMisc via git rm, with no other files touched.",
"check_file_length.sh --all reports the same 14 over-cap files as immediately after the split commit (2a7b9d9) -- this deletion does not change that count, since none of the removed files were over cap.",
"pre-commit run --files passes on the deletion commit's staged set."
],
"out_of_scope": [
"Any other unused or academic-tooling files (generate_study_materials.sh, repo_to_study.sh, etc.) -- user explicitly scoped this to just the plagiarism-tool files.",
"Re-running or re-verifying the split work itself; that was already proven correct before the archival decision was made (see install-plagiarism-tools-split-2026-08-18.json)."
],
"verifier": "gh api repos/kuhyx/testsAndMisc-archive/contents/linux_configuration/scripts/single_use/utils confirming all 13 files present before the git rm commit; git log --oneline -- <each removed path> in testsAndMisc-archive confirming history depth matches the pre-archival testsAndMisc log; check_file_length.sh --all; pre-commit run --files on the deletion commit."
}

View File

@ -1,21 +0,0 @@
{
"title": "Archive the legacy hosts-guard subsystem and repoint check_and_enable_services.sh at guard-lib",
"objective": "setup_hosts_guard.sh was NEXT_SESSION_PROMPT.md's next split target, but live-machine inspection showed the whole legacy hosts-guard subsystem it belongs to (17 files) has been fully superseded by guard-lib (migrate_hosts_guard_to_guard_lib.sh, run 2026-07-04). The user confirmed archiving the whole subsystem instead of splitting it, and confirmed fixing the one live script (check_and_enable_services.sh) that still checked and self-repaired against the retired system.",
"acceptance_criteria": [
"All 17 legacy hosts-guard files (setup_hosts_guard.sh, enforce-hosts.sh, enforce-nsswitch.sh, enforce-resolved.sh, hosts-bind-mount.service, hosts-guard.path, hosts-guard.service, nsswitch-guard.path, nsswitch-guard.service, resolved-guard.path, resolved-guard.service, install_pacman_hooks.sh, pacman-hooks/hosts-guard-common.sh, pacman-hooks/pacman-post-relock-hosts.sh, pacman-hooks/pacman-pre-unlock-hosts.sh, psychological/unlock-hosts.sh, README.md, README_FOR_LLM.md) exist in kuhyx/testsAndMisc-archive with git history intact, including both pre-reorg path prefixes (hosts/guard/* and linux_configuration/hosts/guard/*).",
"The archive push completed and was verified live on GitHub via the API before any deletion happened in the main repo.",
"The same 17 files are removed from testsAndMisc via git rm; plugins/nsswitch-plugin.sh and plugins/resolved-plugin.sh (guard-lib's live plugins) are untouched.",
"check_and_enable_services.sh's check_hosts() no longer references any deleted file or legacy systemd unit name; it checks guard-lib instance health via guardctl file-guard status instead, and running it --status against the live (already-migrated) machine reports the hosts service as ok, not error.",
"linux_configuration/.github/copilot-instructions.md (always-loaded) contains no remaining references to the archived files or the legacy mechanism.",
"bash meta/scripts/check_file_length.sh --all reports fewer or equal over-cap files than before this session (12 -> 11), and check_and_enable_services.sh (already over cap, on the out-of-scope list) did not grow.",
"pre-commit run --files passes on the full staged set for both the deletion+edit commit and the evidence/contract commit."
],
"out_of_scope": [
"Splitting check_and_enable_services.sh itself -- it is on NEXT_SESSION_PROMPT.md §4's out-of-scope list; edited in place only.",
"Fixing the pre-existing defect where /etc/guard-lib/targets/{nsswitch,resolved}.conf point PLUGIN= at the repo checkout instead of /usr/local/share/guard-lib-plugins/ -- flagged in evidence risks[], not fixed (requires sudo mutation of live security enforcement + guardctl re-registration, not something the user was asked to approve this session).",
"Updating linux_configuration/docs/security-hardening/{01-current-state,03-implementation,04-agent-personas,05-llm-readmes}.md -- these predate the 2026-07-04 guard-lib migration itself and were already stale before this session; fixing them is a larger doc-accuracy pass outside what was scoped.",
"§4's other listed files (setup_midnight_shutdown.sh, generate_study_materials.sh, pacman_wrapper.sh, setup_night_lockdown.sh, install_leechblock.sh, block_compulsive_opening.sh, the Kotlin/Dart files) -- untouched, per standing scope.",
"Any test suite for the archived subsystem -- it never had one, and the standing 100%-coverage decision applies to code that is split, not code that is deleted/archived (same precedent as archive-plagiarism-tools and archive-libre-translate, neither of which added tests)."
],
"verifier": "gh api repos/kuhyx/testsAndMisc-archive/contents/linux_configuration/scripts/periodic_background/hosts/guard confirming all 17 files present before the git rm commit; sudo bash check_and_enable_services.sh --status showing the Hosts File and Guards section all-OK against live guard-lib state; bash -n + shellcheck on check_and_enable_services.sh and hosts/install.sh; bash meta/scripts/check_file_length.sh --all; pre-commit run --files on the full staged set."
}

View File

@ -1,17 +0,0 @@
{
"title": "archwiki_rag: offline semantic search over the Arch Wiki",
"objective": "Let Claude answer Arch questions by symptom rather than by page title, with no network round-trip, by indexing the arch-wiki-docs dump that is already on disk and exposing it to the knowledge-rag MCP server.",
"acceptance_criteria": [
"Converts the local arch-wiki-docs dump into a markdown corpus without fetching pages over the network",
"Builds a searchable index and refreshes it via `sync --reindex`",
"install.sh installs its own dependencies, wires the MCP config and registers a pacman hook so the index follows package updates",
"100% branch coverage across every module in python_pkg/archwiki_rag",
"The generated index is not committed (machine-specific, binary, regenerable)"
],
"out_of_scope": [
"Duplicating yay-mcp's pacman install/remove/update, PKGBUILD checks or system stats — this package only searches",
"Fetching wiki pages over the network at query time",
"Replacing the generic wiki-kb pipeline for non-Arch wikis"
],
"verifier": "python -m pytest python_pkg/archwiki_rag --cov=python_pkg.archwiki_rag (61 passed, 100% branch coverage on cli, constants, convert, reindex, sync, _reindex_entry)"
}

View File

@ -1,21 +0,0 @@
{
"title": "artgate: deterministic exit-code gates for generated game art",
"objective": "Make 'non-sloppy' a machine-checkable property of a generated art asset rather than a judgement call, by shipping a route-independent gate harness that takes an image plus a per-style spec and returns an exit code with machine-readable reason codes. This is the spine of a planned 4-route x 4-style generation bake-off: every route feeds the same harness, so the comparison yields a decision table instead of four incomparable portfolios. Adjudication is by exit code only - no model ever grades another model's art.",
"acceptance_criteria": [
"A CLI gates one image against one TOML spec and returns 0 (pass), 1 (gate failure) or 2 (harness/spec error); a malformed spec is never reported as an art verdict.",
"Gates implemented: ALPHA_NOT_BINARY, TOO_MANY_COLORS, OFF_PALETTE, CANVAS_SIZE, SCALE_NOT_INVARIANT, SILHOUETTE_LOW_CONTRAST, with NO_OPAQUE_PIXELS and EMPTY_CANVAS as fail-closed result codes.",
"Gate applicability is declared per style as data, so gates meaningless for a style (palette/colour/scale for hand-painted) are absent rather than manufacturing false failures.",
"Fail closed on spec faults: a gate that is declared but unimplemented, declared without its required config, or is a result-only code, raises at load time instead of silently not running.",
"Every numeric threshold is derived from calibration controls or a real-art corpus, never guessed.",
"Real hand-made CC0 art passes the full stack at a high rate; any failure is verifiable as a true positive.",
"100% branch coverage, zero lint suppressions, all pre-commit hooks pass."
],
"out_of_scope": [
"Generating any art. No route drivers, no diffusion code, no ComfyUI, no Blender - this change adds only the adjudicator.",
"Gates for tiling and animation (SEAM_ENERGY, LOOP_POPS, FRAME_DISTINCT). The maths exists in the seamless-tilesets and pixel-animation skills and will be lifted, not reinvented, when those cells run.",
"Licence gating (LICENSE_FLAG). Reserved for the sourced-CC0 route.",
"Committing any generated image. Binaries stay outside the repo by design; only the code lives here.",
"The human contact-sheet gate, which decides 'good' - the machine gates only establish 'not malformed'."
],
"verifier": "python -m pytest python_pkg/artgate/tests/ --cov=python_pkg.artgate --cov-branch --cov-fail-under=100 (57 tests, 100% branch); pre-commit run --files python_pkg/artgate/*.py python_pkg/artgate/tests/*.py (ruff select=ALL, mypy strict, pylint, bandit, codespell, no-noqa); plus an end-to-end batch over 60 genuine 32x32 CC0 icons from ~/opengameart-downloads, requiring a high pass rate with every failure confirmed a true positive (58/60 = 96.7% measured)."
}

View File

@ -1,20 +0,0 @@
{
"title": "artgate Phase 3: procedural + code-as-art routes, and the shared finishing stage",
"objective": "Run the two CPU-only, download-free cells of the art bake-off - route (a) procedural/parametric and route (d) code-as-art via SVG - against the fixed twelve-subject set, and build the finishing stage that lets any continuous-tone route satisfy a pixel-art spec. Establishes measured cells in the decision table and the shared bridge that route (b) diffusion will reuse.",
"acceptance_criteria": [
"The twelve bake-off subjects are pinned in code with their measured easy/hard split, so every route is compared on the same task.",
"Route (a) renders all twelve subjects deterministically from a locked palette and its output passes the pixel_icon gate stack.",
"Route (d) renders vector subjects via rsvg-convert with no new Python dependency.",
"A finishing stage converts continuous-tone output (anti-aliased alpha, thousands of colours) into gate-passing pixel art, demonstrated on real rasteriser output rather than a synthetic stand-in.",
"Alpha is binarised BEFORE colour quantisation, mirroring the gate order, so transparent pixels never contribute RGB to the palette.",
"100% branch coverage, zero lint suppressions, all pre-commit hooks pass.",
"A contact sheet is produced per cell for the human gate."
],
"out_of_scope": [
"Route (b) diffusion. The GPU path is proven but no model is downloaded or run in this change.",
"The 3D cell of route (d). Blender 5.2 is present and scriptable but not yet wired.",
"Deciding which icons are GOOD. The machine gates establish 'not malformed' only; acceptance is the user's contact-sheet verdict.",
"Tiling and animation gates (SEAM_ENERGY, LOOP_POPS), which belong to cells not yet run."
],
"verifier": "python -m pytest python_pkg/artgate/tests/ --cov=python_pkg.artgate --cov-branch --cov-fail-under=100 (92 tests, 100% branch); pre-commit run over all artgate files; plus an end-to-end run generating all 12 procedural icons and gating them (12/12 machine-pass), and rendering 5 vector subjects before/after the finishing stage (0/5 -> 5/5)."
}

View File

@ -1,20 +0,0 @@
{
"title": "artgate Phase 4: diffusion route, 3D cell, full vector coverage, and the margin gate",
"objective": "Close the remaining bake-off cells - route (b) local diffusion on the 3090, route (d) 3D via headless Blender, and the other seven vector subjects - so all four routes are measured on the same twelve subjects. The phase's real outcome was a missing gate: diffusion output passed everything while being unusable, which forced MARGIN_TOO_SMALL into existence and inverted the decision table.",
"acceptance_criteria": [
"diffusers runs on the GPU in the isolated uv 3.12 venv, with model gating status verified at execution time rather than recalled.",
"Route (b) generates all twelve subjects locally with no gated download on the critical path.",
"Route (d) covers all twelve vector subjects, making its number comparable to route (a)'s.",
"Route (d) 3D renders via headless Blender, with a phantom-success guard: Blender exits 0 even when its embedded script raises.",
"A margin gate rejects full-bleed assets, because an item icon must be a sprite with a silhouette, not a square tile.",
"Every gate failure observed on real output is verified as a true positive before any threshold or shape is changed.",
"100% branch coverage, zero lint suppressions, all pre-commit hooks pass."
],
"out_of_scope": [
"Deciding which route WINS. That needs the human contact-sheet verdicts, which are the user's call; this change only produces the machine column and the sheets.",
"A production matting solution for diffusion output. The flood-fill background removal demonstrated recoverability but visibly damages the art, and is reported as inadequate rather than shipped as the answer.",
"Modelling all twelve subjects in 3D. Five meshes answer whether render->finish clears the gates; twelve would be modelling work, not a route comparison.",
"Gated model families (FLUX.1-dev, SD3.x). Verified gated at execution time and deliberately kept off the critical path."
],
"verifier": "python -m pytest python_pkg/artgate/tests/ --cov=python_pkg.artgate --cov-branch --cov-fail-under=100 (114 tests, 100% branch on 13 modules); pre-commit run over all artgate files; plus end-to-end generation and gating of all four routes against styles/pixel_icon.toml, with each observed failure traced to a specific measurable defect."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split linux_configuration/C/atop_agg/atop_agg.c under the 250-line cap",
"objective": "Bring atop_agg.c (478 lines) under the repo-wide 250-line file cap by splitting the single translation unit three ways along its existing concerns -- ingest, per-PID table management, and report emission -- with the TSV output the Python usage report consumes proven unchanged by the project's own C test binary at its existing 92.9% line / 100% function coverage.",
"acceptance_criteria": [
"atop_agg.c and all new .c/.h files are each at most 250 lines, and check_file_length.sh --all no longer lists any atop_agg file.",
"make clean && make test compiles every unit under -Wall -Wextra with no new warnings and prints 'atop_agg tests: OK'. The compile line must name the new .c files, proving they are built rather than silently omitted.",
"make coverage reports the same 92.9% lines (196 of 211) and 100% functions (13 of 13) as the pre-split baseline, measured after lcov strips test_atop_agg.c. Unchanged totals on unchanged source lines is what shows no code left test reach.",
"The Makefile's SRC and HDR variables list every new file, and the test target compiles $(SRC) rather than a hardcoded atop_agg.c. Without this the build would link the old self-contained unit and the suite would pass with the new files unused -- a fail-open the tests cannot detect.",
"The production binary (make, which builds at -O2 without -DATOP_AGG_NO_MAIN) links and emits a well-formed record, exercising the main path the test binary compiles out.",
"Zero suppressions: no #pragma to silence a warning, no -Wno- flag added, and no change to the coverage or test targets' strictness."
],
"out_of_scope": [
"Any change to the output format -- the W/C/R TSV record shapes are a contract with the Python driver in system-maintenance/bin and must be byte-identical.",
"Any change to the hash geometry (HASH_CAP_BITS, MAX_EPOCHS, MAX_TOKENS) or the aggregation arithmetic, both of which the tests pin only loosely.",
"Widening the public interface in atop_agg.h; declarations that must cross the new unit boundary go in a private internal header instead.",
"Wiring atop_agg into CI, which has no workflow today -- a separate piece of work."
],
"verifier": "cd linux_configuration/C/atop_agg && make clean && make test (expect 'atop_agg tests: OK' and a compile line naming every unit); make coverage (expect 92.9% lines, 100% functions after the lcov strip pass); make clean && make && printf 'PRC\\tfoo\\t1\\t100\\ny\\n' | ./atop_agg (expect a well-formed W record, exit 0); bash ~/utils/scripts/check_file_length.sh --all (expect no atop_agg entry); git diff on atop_agg.h (expect empty). Captured at HEAD as the baseline and re-run after the split."
}

View File

@ -1,19 +0,0 @@
{
"title": "Make billsplit's APK buildable and stop the CI mirror fighting a dirty tree",
"objective": "billsplit had never produced an Android APK: file_picker 11.0.3, the latest release, cannot compile under AGP 9 in either built-in-Kotlin mode. Replace it with the official file_selector so the app builds, verify the launcher icon from the built artifact rather than from a preview, keep the build inside this machine's 2 GB memory budget, and make the pre-push CI mirror stop failing whenever the shared checkout has uncommitted work.",
"acceptance_criteria": [
"flutter build apk --debug succeeds",
"The launcher icon extracted from the APK is the charcoal + gold perforated-receipt glyph and does not match the stock Flutter beach icon",
"Peak PSS across the build's JVM and Dart processes stays under 2 GiB, measured from /proc/<pid>/smaps_rollup",
"flutter analyze is clean, all tests pass, and billsplit holds 100% line coverage with no coverage ignores",
"meta/scripts/ci_mirror.sh passes while the working tree is dirty, leaves every uncommitted file byte-identical, and removes its temporary worktree",
"billsplit's Gradle and AGP versions stay identical to the sibling Flutter apps"
],
"out_of_scope": [
"Pinning AGP 8 or otherwise diverging billsplit's Android toolchain from habit_stack, home_inventory, todo and diet_guard_app",
"Installing or running the APK on the phone; the icon is verified from the artifact, not from a device launcher",
"Any change to the split engine, xlsx export format, or e-paragon parsing",
"Upgrading the other dependencies pub reports as outdated"
],
"verifier": "flutter analyze, flutter test --no-pub --coverage and python3 -m python_pkg.billsplit_coverage inside billsplit; flutter build apk --debug followed by unzipping the APK and rendering its ic_launcher assets; a PSS sampler over the build's processes; bash meta/scripts/ci_mirror.sh run deliberately against a dirty tree with before/after md5 of an uncommitted file; shellcheck on the rewritten script; and pre-commit run --files on the staged set inside a 2G cgroup"
}

View File

@ -1,17 +0,0 @@
{
"title": "Make the billsplit CI gates green before touching billsplit",
"objective": "billsplit CI was already failing on main at 6713ef3: flutter analyze --fatal-infos exited 1 with four unnecessary_unawaited issues, and dart format --set-exit-if-changed exited 1 on three test files left unformatted by an earlier split commit. Both are steps in .github/workflows/billsplit-ci.yml. This change fixes exactly those two gates and nothing else, so that the platform-directory deletion that follows can be verified as green-to-green rather than red-to-red.",
"acceptance_criteria": [
"flutter analyze --fatal-infos exits 0 in billsplit/ (was exit 1, 4 issues)",
"dart format --set-exit-if-changed . exits 0 in billsplit/ (was exit 1, 3 changed files)",
"flutter test still reports exactly 60 passing tests, the same count as at HEAD - proving the unawaited() removals did not alter navigation behaviour in the widget tests",
"No lint suppression, no analysis_options exclusion, and no lowered threshold is used to reach any of the above"
],
"out_of_scope": [
"Deleting billsplit/windows, macos, ios or linux - that is the next commit, with its own contract",
"Any change to billsplit behaviour, UI, or test assertions",
"Reformatting Dart files outside billsplit/",
"The 45 bucket_catch eslint errors and the usage_report split work, both tracked separately in this session"
],
"verifier": "cd billsplit && flutter analyze --fatal-infos && dart format --set-exit-if-changed . && flutter test - the first three steps of .github/workflows/billsplit-ci.yml. Each was run before and after the change and the exit codes are recorded in docs/superpowers/evidence/billsplit-ci-green-2026-08-17.json."
}

View File

@ -1,18 +0,0 @@
{
"title": "Delete the four unused billsplit platform runner directories",
"objective": "billsplit tracked 96 files of flutter create scaffolding across windows/, macos/, ios/ and linux/ that nothing in the repo builds - CI runs analyze and test only, and no script or doc invokes a platform build. One of those files, windows/runner/win32_window.cpp at 288 lines, was the last over-cap C++ file and could not be honestly split because Flutter regenerates it. Deleting the directories removes it from the over-cap list without hand-editing generated code, and takes the repo from 41 over-cap files to 40. Success means the directories and every reference to them are gone, and a future flutter create cannot silently re-track them.",
"acceptance_criteria": [
"billsplit/windows, billsplit/macos, billsplit/ios and billsplit/linux are removed from git tracking (96 files)",
"check_file_length.sh --all reports 40 over-cap files, down from 41, with no win32_window.cpp entry",
"The three referencing sites are updated: .binary-allowlist icon entries removed, .gitignore un-ignore rules removed, README.md Running section corrected",
"After running flutter create . --platforms=linux,windows,macos,ios for real, git add -An on the four paths adds nothing and reports them as ignored",
"flutter analyze --fatal-infos, flutter test (60 tests) and dart format --set-exit-if-changed remain green, unchanged from the preceding commit"
],
"out_of_scope": [
"billsplit/android/ - the one platform target actually shipped, left tracked",
"Any change to billsplit/lib/ or billsplit/test/",
"billsplit/analysis_options.yaml - Flutter tooling rewrites the platform excludes on every analyze run, so removing the dead entries is not durable",
"The usage_report split work and the bucket_catch eslint errors, both separate commits in this session"
],
"verifier": "bash ~/utils/scripts/check_file_length.sh --all for the over-cap count; cd billsplit && flutter analyze --fatal-infos && flutter test && dart format --set-exit-if-changed . for the CI gates; and flutter create . --platforms=linux,windows,macos,ios followed by git add -An for the resurrection guard, which is the only claim the Flutter gates cannot check."
}

View File

@ -1,22 +0,0 @@
{
"title": "Move billsplit into the testsAndMisc monorepo",
"objective": "Relocate the standalone billsplit Flutter app from ~/Downloads/billsplit (one commit, no git remote — the only copy of its history) into testsAndMisc as billsplit/, so it is version-controlled alongside the rest of the monorepo, its CI actually runs, and it carries a shared-family launcher icon instead of the stock Flutter one. Success means the app builds and tests to 100% line coverage from its new location, every one of its files is genuinely tracked, and the Downloads copy is removed only after the commit is confirmed on origin.",
"acceptance_criteria": [
"flutter pub get && flutter test --coverage && python3 tool/coverage_check.py all pass from ~/testsAndMisc/billsplit",
"git ls-files billsplit resolves to 162 files, including all 30 platform PNGs and the .ico — nothing silently dropped by the root .gitignore",
"billsplit/ contains no Python at all: its coverage gate lives at python_pkg/billsplit_coverage/ with its own 100%-branch-covered test suite, so check-python-location holds with no new exception",
"git check-ignore over billsplit/ shows zero files blocked by the root .gitignore; remaining hits come only from billsplit's own nested .gitignore files and are all generated artifacts",
"pre-commit run --files <staged> passes with no --no-verify and no new per-file lint suppressions",
"The relocated workflow sits at .github/workflows/billsplit-ci.yml with working-directory: billsplit and a billsplit/** path filter, so it is neither inert nor triggered by unrelated commits",
"The launcher icon is the charcoal + #B8862E family icon from python_pkg/app_icons, not the stock Flutter beach icon, and its perforation holes stay transparent on the foreground and monochrome layers",
"~/Downloads/billsplit is removed only after git log origin/main shows the new commit"
],
"out_of_scope": [
"Any change to billsplit's Dart source, tests, or runtime behaviour — this is a move, not a refactor",
"Linux desktop integration: no hicolor icon set, no .desktop entry, no my_application.cc change; the app is phone-first",
"Rethemeing the app: its ThemeData still seeds from Colors.teal even though the icon uses the family accent",
"Adding dart format / flutter analyze pre-commit hooks for the new Dart code",
"Fixing the pre-existing missing system Python dependencies beyond what is needed to let the commit hooks run"
],
"verifier": "pre-commit run --files $(git diff --cached --name-only) at commit time (ruff, ruff-format, mypy, pylint, bandit, codespell, no-binaries, check-python-location, ai-evidence-contract, ai-multifile-contract, and pytest-coverage over the whole python_pkg suite at --cov-fail-under=100); plus flutter test --coverage inside billsplit/ followed by python3 -m python_pkg.billsplit_coverage from the repository root; plus .github/workflows/billsplit-ci.yml on push"
}

View File

@ -1,20 +0,0 @@
{
"title": "billsplit adopts the shared design_system palette",
"objective": "billsplit is the last of four Flutter apps that had drifted off the frozen palette. It renders from a teal-seeded ColorScheme plus fifteen ad hoc colour literals that largely bypass the theme entirely. Success is billsplit rendering from design_system-v0.1.0's buildLightTheme(), with every literal that carries a theme role reading it off the ColorScheme instead, and with no behavioural, layout or coverage regression.",
"acceptance_criteria": [
"lib/main.dart builds its theme from design_system's buildLightTheme() rather than ColorScheme.fromSeed(seedColor: Colors.teal).",
"The rendered app's colorScheme.primary is ffb8862e and surface is fff6f4f3, proven by pumping the real BillSplitApp and reading the theme off a live element -- not by inspecting source.",
"Error-family literals map to error / onError / errorContainer / onErrorContainer; de-emphasised text maps to onSurfaceVariant.",
"The swipe-to-delete background and the icon drawn on it use error and onError respectively, so they cannot be changed independently.",
"flutter test reports 60/60 passing.",
"python3 -m python_pkg.billsplit_coverage reports 100% line coverage across all lib files.",
"flutter analyze --fatal-infos introduces no new findings beyond the pre-existing unnecessary_unawaited infos."
],
"out_of_scope": [
"Switching billsplit to a dark theme. It is light-only by design; its helper text is black-on-white and would become unreadable.",
"Mapping the four category-dot colours (deepOrange/amber/blueGrey/teal) onto ColorScheme slots. They encode category identity rather than a theme role, and a single-accent system has no four distinct hues for them. Recorded in unified-design-system/nielsen-audit.md as needing a categorical ramp instead.",
"Fixing the pre-existing unnecessary_unawaited analyzer infos, which come from SDK drift and are present across several repos.",
"Any change to split logic, e-paragon parsing, xlsx export, or app state."
],
"verifier": "flutter analyze --fatal-infos && flutter test (60/60) && python3 -m python_pkg.billsplit_coverage (100%, 11 files), plus a temporary widget test asserting primary=ffb8862e and surface=fff6f4f3 on the pumped app, deleted after it passed. CI re-runs the first three via .github/workflows/billsplit-ci.yml."
}

View File

@ -1,18 +0,0 @@
{
"title": "Split the billsplit Dart files under the 250-line cap",
"objective": "Bring all four over-cap billsplit Dart sources and its 536-line UI flow test under the cap, leaving only Flutter's generated Windows runner.",
"acceptance_criteria": [
"Every billsplit Dart file is at most 250 lines.",
"flutter test reports exactly 60 passing tests, the same as before the split.",
"flutter analyze reports no MORE issues than the pre-split baseline. That baseline is 4 pre-existing unnecessary_unawaited infos, measured from a detached worktree at HEAD rather than assumed.",
"Library-private declarations that cross a seam use part/part of. A `library;` directive must come before any `part`.",
"Split widget-test halves each call TestWidgetsFlutterBinding.ensureInitialized().",
"No test is deleted, skipped or weakened."
],
"out_of_scope": [
"windows/runner/win32_window.cpp, which is Flutter-generated scaffolding that regeneration would overwrite.",
"Changing what any test asserts.",
"The 4 pre-existing unnecessary_unawaited infos, which are not this task's to fix."
],
"verifier": "flutter test (expects 60 passed), flutter analyze compared against the same command run in a detached worktree at HEAD, and check_file_length.sh over billsplit."
}

View File

@ -1,21 +0,0 @@
{
"title": "Split block_compulsive_opening.sh under the 250-line cap",
"objective": "Bring block_compulsive_opening.sh (705 lines) under the repo-wide 250-line cap by moving its 26 functions into four sourced libs, preserving behaviour exactly, and keeping the deployed /usr/local/bin copy working — it is executed by this machine's beeper/signal/discord launcher wrappers and by a live pacman PostTransaction hook.",
"acceptance_criteria": [
"The entry script and all four lib/cco_*.sh files are each at most 250 lines.",
"`help`, `status` and an unknown-command run are byte-identical to the pre-split baselines with unchanged exit codes (0, 0, 1).",
"verify_shell_split.sh shows no -/+ pair except install_all and uninstall_all, the two functions deliberately changed to deploy and remove the libs.",
"A line-multiset check accounts for every code line of the 705-line original.",
"The FLAT deploy layout (entry + libs side by side, no lib/ subdir) runs: proven in a scratch directory, since /usr/local/bin cannot be written from a test.",
"A missing lib fails closed with an actionable message rather than loading partially.",
"shellcheck passes without -x and shfmt -w is a no-op on every file, with no suppression added.",
"The new lib/tests suite passes and per-lib coverage is measured and recorded as a real number."
],
"out_of_scope": [
"Executing install_all / uninstall_all / install_wrapper against the real system: they move /usr/bin binaries and write /etc/pacman.d/hooks.",
"Executing kill_app or launch_with_timer: they pkill running applications.",
"Re-deploying to /usr/local/bin. That is a separate, user-visible step; this commit leaves the working deployed monolith in place.",
"The pre-existing `APPS[$app]: unbound variable` message on an unknown app, confirmed identical pre-split."
],
"verifier": "bash meta/scripts/check_file_length.sh --all; bash meta/scripts/verify_shell_split.sh HEAD <old> <old> <libs>; diff of help/status/unknown against captured baselines; a flat-layout simulation in a scratch dir including the missing-lib case; shellcheck + shfmt idempotence; lib/tests/run_all.sh and shell_coverage.sh."
}

View File

@ -1,20 +0,0 @@
{
"title": "Split brother_printer/cups_service.py under the 250-line cap",
"objective": "Bring python_pkg/brother_printer/cups_service.py (406 lines) under the repo-wide 250-line cap by moving the IPP attribute queries, the CUPS status-code mapping and the CUPS-based USB fallback query into a new _cups_fallback.py, leaving cups_service holding only service control and raw USB port status.",
"acceptance_criteria": [
"cups_service.py and the new _cups_fallback.py are each at most 250 lines.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"test_cups_service.py, the largest of the four test modules, needs no edit at all: every name it imports and every collaborator it patches on MOD (fcntl, os, Path, shutil, subprocess, time) stays defined in cups_service.py.",
"_get_cups_economode and find_cups_printer_name move together, because test_cups_service_part2.py imports both and patches shutil once on a single MOD; separating them would need two MOD constants in one test module.",
"usb_query.py's late importlib.import_module call and the absolute patch target in test_usb_query.py both name the new module, so the CUPS fallback is still reached and still mocked.",
"No assertion is changed and no test is deleted, skipped or weakened; the only test edits are the MOD constant, the import module path, and one absolute patch string.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts, or any status-code mapping behaviour.",
"Splitting the brother_printer test files, which are separate commits -- part2 and part3 remain over the cap after this change.",
"Adding a re-export shim in cups_service; importers point at the new module directly to keep the dependency direction one-way."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}

View File

@ -1,16 +0,0 @@
{
"title": "brother_printer: satisfy the 500-line limit and make the entry-point test order-independent",
"objective": "The previous commit (a12e696) turned CI red: four brother_printer files grew past the repo's 500-line ceiling, and the __main__ entry-point test only passed when it ran before the test that imports the module. Both were missed locally because the suite was run for the brother_printer package alone, while the file-length test scans the whole repo and CI randomises test order. Split the oversized files along real seams rather than arbitrary cuts, and make the entry-point test independent of ordering. Success: the full suite passes in any order with 100% coverage, and no file this change owns exceeds 500 lines.",
"acceptance_criteria": [
"No file owned by this change exceeds 500 lines",
"Consumable life tracking lives in its own module, split at a real responsibility boundary and with no import cycle",
"test_main_entry passes regardless of test execution order, with pytest's filterwarnings=error in force",
"The full python_pkg suite passes with 100% statement and branch coverage",
"No behaviour change: this is a structural split plus one test fix"
],
"out_of_scope": [
"linux_configuration/.../focus_mode_daemon.py (509 lines), which breached the limit in commit 22e22c1 and is not owned by this change",
"Any change to the reporting behaviour verified against the printer in a12e696"
],
"verifier": "python3 -m pytest python_pkg/ (full suite, random order, 100% coverage); wc -l over tracked *.py; ./run.sh against the real HL-1110; pre-commit run --files <changed files>"
}

View File

@ -1,21 +0,0 @@
{
"title": "Split brother_printer/consumables.py under the 250-line cap",
"objective": "Bring python_pkg/brother_printer/consumables.py (279 lines) under the repo-wide 250-line cap by moving the dropped-page detection into a new _page_delivery.py, while leaving every state-file primitive in consumables where two test modules patch it.",
"acceptance_criteria": [
"consumables.py and the new _page_delivery.py are each at most 250 lines.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"_load_consumable_state, _save_consumable_state, _get_cups_total_pages, CONSUMABLE_STATE_FILE and CUPS_PAGE_LOG stay defined in consumables.py, so test_consumables.py's patches still intercept every write that would otherwise reach ~/.config/brother_printer/state.json.",
"~/.config/brother_printer/state.json is unmodified after a full suite run, checked by mtime rather than inferred from a green run.",
"test_consumables.py needs no edit; test_consumables_part2.py gains a second MOD constant applied only to the two classes whose functions moved, never as a blanket substitution.",
"No assertion is changed and no test is deleted, skipped or weakened.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts, or any counter-rebasing arithmetic.",
"Moving the state-file primitives, which would risk a test writing to the live consumable state.",
"Shrinking the module docstring, which records why the printer's counter is trusted over the CUPS page log.",
"Splitting the brother_printer test files, which are separate commits."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus ls -la ~/.config/brother_printer/state.json to confirm the live state file was not written, plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split brother_printer/cups_queue.py under the 250-line cap",
"objective": "Bring python_pkg/brother_printer/cups_queue.py (424 lines) under the repo-wide 250-line cap by moving the queue-status display and the interactive fix prompt into a new _queue_fix.py, chosen so the CUPS-mutating action primitives stay where their tests patch subprocess and time.",
"acceptance_criteria": [
"cups_queue.py and the new _queue_fix.py are each at most 250 lines.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"_cups_enable_printer, _cups_cancel_all_jobs, _cups_cancel_job and _cups_restart_service remain defined in cups_queue.py, so test_cups_queue.py's patches of subprocess, time, shutil and Path on that module still intercept every call that would otherwise reach the live CUPS daemon.",
"No assertion is changed and no test is deleted, skipped or weakened; the only test edits are the MOD constant and the import module path following the moved code.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts, or what any display string contains.",
"Splitting the brother_printer test files, which are separate commits.",
"Moving the _cups_* primitives, which would let an unpatched subprocess.run restart the real CUPS service during the test run.",
"Adding a re-export shim in cups_queue for display_cups_queue_status; importers point at the new module directly to keep the dependency direction one-way."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}

View File

@ -1,23 +0,0 @@
{
"title": "brother_printer: report the truth about printer state",
"objective": "./run.sh must run standalone from any cwd, and every status it reports must be traceable to something the printer or the HP PJL reference actually says. The tool previously failed to start at all, and once patched to start, reported a sleeping printer as a critical paper jam from a status table whose meanings were invented. Reading status must never hang the tool or destroy an in-flight print job, and the report must surface pages the printer silently discards - a failure mode that CUPS, the printer's error bit, and the LEDs all report as success. Success: the sleeping printer reads healthy, an open cover reads critical, consumable estimates derive from the printer's own counter, and a dropped-page run names both the gap and the workaround.",
"acceptance_criteria": [
"./run.sh works from the package directory and from an unrelated cwd, with no PYTHONPATH or venv setup by the user",
"Every status code in the table is transcribed from the HP PJL Technical Reference Manual, Appendix D; codes absent from it report 'Unknown status - check printer display' instead of an invented meaning",
"Codes verified on the real HL-1110 decode correctly: 10001 READY, 10003 WARMING UP, 10023 PRINTING, 40000 SLEEP (severity ok, not a jam), 40021 TOP COVER OPEN (critical), 41213 NO PAPER (critical)",
"CUPS-derived and self-inferred states never borrow a PJL code to describe themselves",
"Consumable estimates use @PJL INFO PAGECOUNT; stored baselines migrate onto that scale exactly once, preserving the reported percentages across the switch",
"query_usb_pjl never blocks indefinitely: an unavailable printer produces an actionable message within seconds",
"Reading status never stops CUPS, never resets the USB device, and never runs the pyusb probe while a job is printing",
"A run after pages were dropped reports the gap between CUPS's claim and the printer's counter, and names the lp -o Resolution=300dpi workaround",
"402 tests pass with 100% statement and branch coverage; pre-commit clean with no suppressions"
],
"out_of_scope": [
"Changing the CUPS queue default resolution (user chose to keep 600dpi and pass -o Resolution=300dpi per job)",
"Any lpadmin, CUPS, or system configuration change",
"Identifying the original transient yellow '!' warning, which cleared before it could be read and was not reproduced",
"Verifying PJL codes that could not be induced on the hardware; those are spec-derived and marked as such",
"The network/SNMP path, which is untouched"
],
"verifier": "./run.sh against the real Brother HL-1110 (USB) for each induced printer state; python3 -m pytest python_pkg/brother_printer/tests/ --cov=python_pkg/brother_printer (402 tests, 100% branch coverage); pre-commit run --files <changed files> (ruff, ruff format, mypy, pylint, bandit, shellcheck, codespell, coverage enforcement)"
}

View File

@ -1,19 +0,0 @@
{
"title": "Split the brother_printer cups_queue test modules under the 250-line cap",
"objective": "Bring test_cups_queue.py (458 lines) and test_cups_queue_part2.py (278 lines) under the repo-wide 250-line cap by partitioning them along the class boundaries the source split already established, without losing or weakening a single test.",
"acceptance_criteria": [
"All six cups_queue test modules are at most 250 lines.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"No MOD constant changes: every name these tests patch already lives in the module the file names, so the split is a pure partition of test classes.",
"No assertion is changed and no test is deleted, skipped or weakened; whole test classes move verbatim and only the import blocks are adjusted to what each file actually uses.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts.",
"Touching the brother_printer source, which is already under the cap.",
"Splitting the remaining over-cap test modules (test_cups_service.py, test_display.py, test_usb_query.py and the consumables pair), which are separate commits.",
"Introducing a shared conftest.py: these classes need no shared fixture builders, and an unnecessary one would push jscpd toward its duplication threshold."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split the brother_printer cups_service test modules under the 250-line cap",
"objective": "Bring test_cups_service.py (390 lines), test_cups_service_part2.py (261) and test_cups_service_part3.py (260) under the repo-wide 250-line cap by partitioning them at class and method boundaries, and rename the part-numbered survivors after the concern they cover.",
"acceptance_criteria": [
"Every cups_service and _cups_fallback test module is at most 250 lines.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"No MOD constant changes: the source split in the previous commit already put every patched name in the module these files name.",
"No assertion is changed and no test is deleted, skipped or weakened; whole classes and whole methods move verbatim and only the import blocks are adjusted.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts.",
"Touching the brother_printer source, which is already under the cap.",
"Splitting test_display.py, test_usb_query.py, test_check_brother_printer.py or the consumables pair, which are separate commits.",
"Introducing a shared conftest.py; these classes build their mocks inline and need no shared fixture builders."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split the brother_printer display and usb_query test modules under the 250-line cap",
"objective": "Bring test_display.py (363 lines) and test_usb_query.py (328) under the repo-wide 250-line cap by partitioning them at class boundaries, and retire display.py's now-dead __all__ re-export block once no test reaches the supply helpers through it.",
"acceptance_criteria": [
"test_display.py, test_supply_levels.py, test_usb_query.py and test_usb_query_sequence.py are each at most 250 lines.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"display.py keeps every name that test_display.py and test_display_part2.py patch on it as a real module attribute, verified by an import-time probe rather than inferred from a green run.",
"The six _supply names are removed from display.py's __all__ only after confirming by grep that no source module and no test still imports them through display.",
"No assertion is changed and no test is deleted, skipped or weakened; whole classes move verbatim and only the import blocks are adjusted.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts.",
"Moving _display_supply_levels or _display_supply_warnings out of display.py: test_display_part2.py patches _display_supply_levels there.",
"Splitting test_check_brother_printer.py or the consumables pair, which are separate commits."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus the display attribute probe, plus pre-commit run --files on the touched files, plus bash ~/utils/scripts/check_file_length.sh --all for the cap."
}

View File

@ -1,18 +0,0 @@
{
"title": "Clear the last three brother_printer test modules over the 250-line cap",
"objective": "Bring test_check_brother_printer.py (275 lines), test_consumables.py (272) and test_consumables_part2.py (273) under the repo-wide 250-line cap, taking python_pkg/brother_printer from fifteen violations to zero.",
"acceptance_criteria": [
"bash ~/utils/scripts/check_file_length.sh --all lists no file under python_pkg/brother_printer.",
"The brother_printer suite still reports exactly 402 passing tests -- the same count as at the start of this whole package pass, proving no test was dropped or silently skipped across any of the eight commits.",
"The package keeps 100% branch coverage of the brother_printer source modules.",
"test_consumables_part2.py's split removes the need for its second MOD_PD constant: the tests that needed it are exactly the ones that move, so each resulting file has one module under test again.",
"No assertion is changed and no test is deleted, skipped or weakened; whole classes move verbatim and only the import blocks are adjusted.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts.",
"Touching the brother_printer source, which is already under the cap.",
"Other packages' violations, which are separate commits."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/brother_printer/tests -q (expects exactly 402 passed), plus bash ~/utils/scripts/check_file_length.sh --all showing no brother_printer entry, plus pre-commit run --files on the touched files."
}

View File

@ -1,17 +0,0 @@
{
"title": "Test bt_adapter.sh, and record why its last line is unreachable",
"objective": "Cover the third of the sixteen untested fixes/lib libs. Unlike the first two this one does NOT come off the allowlist: it tops out at 98.55% because line 97 is the opening line of a backslash-continued statement, which kcov instruments but bash never attributes a statement to. The deliverable is therefore the tests plus a proven diagnosis, not a cleared entry.",
"acceptance_criteria": [
"bt_adapter.sh measures 98.55% (68/69) through lib/tests/run_all.sh, with line 97 the only uncovered line.",
"The claim that line 97 is unreachable is proven by a PS4 trace showing bash attributing the statement to line 100, not asserted.",
"bt_report.sh and bt_pairing.sh still measure 100.00% at --min 100 with exit 0, since both are now gated with no exemption.",
"The whole suite passes bare: run_all.sh reports all test files passing.",
"Every test file stays under the repo's 250-line cap, and pre-commit passes with no suppression added."
],
"out_of_scope": [
"Removing bt_adapter.sh from meta/shell-coverage-allowlist.txt. It is not at 100%, so it does not meet the bar.",
"Changing continuation_lines() in meta/scripts/lib/shell_coverage_lines.py to recognise backslash continuations. That alters the denominator for every measured lib and must land on its own, so a regression can be reverted without losing these tests.",
"Reformatting bt_adapter.sh to collapse the multi-line dbus-send call. Production source is not rewritten to please the coverage tool."
],
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (expects all files passing, 14 + 27 for the two bt_adapter files), plus bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure bt_adapter.sh --min 1 --fail-on-case-error -- \"\" (expects 68/69 = 98.55%, uncovered: 97), plus the same command with --measure bt_report.sh and --measure bt_pairing.sh at --min 100 (expects 37/37 and 65/65, exit 0)."
}

View File

@ -1,19 +0,0 @@
{
"title": "Test bt_audio.sh to its reachable ceiling, and fix the timeout bug the tests found",
"objective": "Finish the bluetooth family, the fourth of the sixteen untested fixes/lib libs and the largest at 214 lines. Writing the tests exposed a real production bug -- `timeout 3 _run_as_user wpctl status` can never succeed, because timeout is a binary and _run_as_user is a shell function -- so this lands the fix alongside the coverage rather than testing a broken branch into permanence. The lib reaches 96.97% and stays exempt: the last four lines are pipe operators no test can reach.",
"acceptance_criteria": [
"bt_audio.sh measures 96.97% (128/132) through lib/tests/run_all.sh, twice, with the same line set both times.",
"The four uncovered lines are shown to be `} |` pipe operators rather than statements, and shown to execute, before the shortfall is accepted.",
"shfmt is shown to rewrite HEAD's one-line block form, proving the reformat that raised the denominator is unavoidable rather than something to revert.",
"The healthy branch of check_pipewire_health is actually reachable: a test asserts 'PipeWire is responsive' and passes, which was impossible before the fix.",
"meta/shell-coverage-allowlist.txt is UNCHANGED -- bt_audio.sh does not meet the 100% bar.",
"Every test file stays under the repo's 250-line cap, and pre-commit passes with no suppression added."
],
"out_of_scope": [
"Clearing bt_audio.sh or bt_adapter.sh from the allowlist. Both are capped by defect (a) in docs/kcov-under-report.md.",
"Changing continuation_lines() in meta/scripts/lib/shell_coverage_lines.py to exclude `} |` and backslash-continued assignments. It changes the denominator for every measured lib and must land on its own; measured to affect only these two libs.",
"Reverting shfmt's reformat of bt_audio.sh, which the pre-commit hook would reapply on the next commit touching the file.",
"The remaining twelve untested fixes/lib libs, none of which carry either continuation-pipe form."
],
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (expects all files passing, 20 + 15 + 12 for the three bt_audio files), plus bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure bt_audio.sh --min 1 --fail-on-case-error -- \"\" (expects 128/132 = 96.97%, uncovered 90 113 137 157), plus bash meta/scripts/check_shell_coverage.sh (expects exit 0, with bt_audio.sh still exempt)."
}

View File

@ -1,17 +0,0 @@
{
"title": "Test bt_pairing.sh to 100% and clear it from the shell-coverage allowlist",
"objective": "Cover the second of the sixteen untested linux_configuration/scripts/single_use/fixes/lib libs. bt_pairing.sh is the first in the family whose code writes outside its own process -- a sysfs power/control file and a udev rule under /etc -- so the contract is to reach 100% without ever letting the suite touch either, given that lib/tests/run_all.sh runs UN-jailed in ci_mirror.sh and in CI.",
"acceptance_criteria": [
"bt_pairing.sh measures 100.00% through lib/tests/run_all.sh, twice, the second run at --min 100 with exit 0.",
"check_shell_coverage.sh exits 0 for bt_pairing.sh with its allowlist line removed, i.e. with no exemption.",
"A bare (un-jailed) run of run_all.sh leaves /etc/udev/rules.d/50-bluetooth-no-autosuspend.rules with its original 2026-02-21 mtime, and leaves the power/control values of the probed USB devices unchanged.",
"Every test file stays under the repo's 250-line cap.",
"pre-commit passes on all changed files with no suppression added -- no # shellcheck disable, no noqa."
],
"out_of_scope": [
"Bind-mounting /etc in the jail to make the udev write safe. Rejected: run_all.sh runs un-jailed in ci_mirror.sh and CI, so a bind mount would protect only the coverage run.",
"Refactoring pacman_hook_stall_harness.sh onto the new lib_test_core.sh. Its six libs are already gated at 100% with no exemption.",
"The remaining fourteen untested fixes/lib libs, which land in later commits."
],
"verifier": "bash linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh (expects all files passing, 11 + 20 for the two bt_pairing files), plus bash meta/scripts/shell_coverage_jail.sh --subject linux_configuration/scripts/single_use/fixes/lib/tests/run_all.sh --measure bt_pairing.sh --min 100 --fail-on-case-error -- \"\" (expects 65/65 = 100.00% and exit 0), plus bash meta/scripts/check_shell_coverage.sh linux_configuration/scripts/single_use/fixes/lib/bt_pairing.sh (expects exit 0), plus stat -c '%y' /etc/udev/rules.d/50-bluetooth-no-autosuspend.rules (expects 2026-02-21)."
}

View File

@ -1,16 +0,0 @@
{
"title": "bucket_catch: osu!catch browser game with 100% test coverage",
"objective": "Add bucket_catch to testsAndMisc — a browser game where falling files/puzzle pieces are caught with a mouse-tracked basket. The frontend (React 19 + Vite 6 + TypeScript strict) achieves 100% Vitest coverage across statements, branches, functions, and lines. The backend (NestJS 11) exposes file upload and health endpoints.",
"acceptance_criteria": [
"pnpm run coverage passes with 100% on all four metrics (statements, branches, functions, lines)",
"pnpm run lint passes with zero errors under typescript-eslint strict-type-checked",
"pnpm build succeeds with no TypeScript errors",
"Puzzle mode guarantees 100% catchable via Union-Find spatial clustering"
],
"out_of_scope": [
"Backend (NestJS) test suite — tracked as a separate task",
"E2E / browser automation tests",
"Deployment or CI integration"
],
"verifier": "pnpm run coverage && pnpm run lint (in packages/frontend)"
}

View File

@ -1,17 +0,0 @@
{
"title": "Clear the bucket_catch frontend eslint backlog without suppressions",
"objective": "bucket_catch/packages/frontend had 45 eslint errors that were unmasked, not caused, by a typecheck repair last session: `lint` is `tsc --noEmit && eslint src`, and a broken tsc had been short-circuiting the && so eslint had never run on the package. The user asked for all of them fixed. The binding constraint is that the package holds a 100% coverage gate, so any fix that adds an unreachable branch trades a lint error for a coverage failure - and the no-suppressions rule forbids escaping either with a disable comment.",
"acceptance_criteria": [
"eslint error count drops substantially from 45, with every remaining error named and explained rather than silenced",
"No eslint-disable, no @ts-ignore, no rule downgraded in config, no coverage threshold lowered",
"npm run coverage still reports 100% on statements, branches, functions and lines; any change in the totals is attributable to a named edit",
"The test count stays at 145 across 15 files",
"npx tsc --noEmit exits 0"
],
"out_of_scope": [
"Refactoring App.tsx's phase state to carry the game result - the correct fix for the last no-non-null-assertion, but a wider change than a lint pass",
"Any change to component behaviour or to what the tests assert",
"The other repos touched in this session"
],
"verifier": "npx eslint src for the count; npm run coverage for the 100% gate and the 145-test count; npx tsc --noEmit for the typecheck. Each touched test file was additionally run on its own with npx vitest run as it was edited."
}

View File

@ -1,17 +0,0 @@
{
"title": "Add byox_ladder difficulty-ladder generator",
"objective": "Add a self-contained tool that ranks the codecrafters build-your-own-x projects by difficulty and emits two offline HTML pages: a per-guide ladder (~360 tutorials) and a per-category ladder (30 categories), grouped into Beginner/Intermediate/Advanced/Expert tiers plus an Unsorted bucket.",
"acceptance_criteria": [
"python_pkg/byox_ladder parses the upstream README into guides.json via parse_guides.py",
"build_pages.py emits standalone guide-ladder.html and category-ladder.html that open via file:// with no network",
"make build regenerates the whole pipeline (fetch -> parse -> build)",
"Tests reach 100% branch coverage on parse_guides.py and build_pages.py",
"All pre-commit hooks pass (ruff ALL, mypy, pylint, bandit, codespell, check-python-location)"
],
"out_of_scope": [
"Vendoring the upstream README (fetched at build time, gitignored)",
"Any change to existing python_pkg packages or repo tooling",
"A per-guide exact 1..N ranking (difficulty is tier-based by design)"
],
"verifier": "pre-commit run --all-files (pre-push stage) and python3 -m pytest python_pkg/byox_ladder/tests"
}

View File

@ -1,19 +0,0 @@
{
"title": "Reach 100% coverage on the check_and_enable_services libs via a redirectable path prefix",
"objective": "Make the absolute root-owned paths the check libs probe redirectable through a $SYSROOT prefix, so the file-existence branches become reachable in tests and the eight libs from 9085a4e5 reach 100% line coverage. This is the follow-up the user chose (option b): split first with measured coverage recorded, then close the gap in its own commit.",
"acceptance_criteria": [
"Every absolute /usr, /etc and /var path in the seven check libs is prefixed with $SYSROOT; the only literals left are inside services_report.sh's usage help text.",
"SERVICES_ROOT has no default in the libs: unset is a hard error, empty means the real filesystem, and check_and_enable_services.sh sets it explicitly.",
"sudo bash check_and_enable_services.sh --status --dry-run stays byte-identical to the same command at rev 6691cb26, modulo the Date: line.",
"sha256sum of /etc/hosts, /etc/nsswitch.conf and /etc/systemd/resolved.conf plus the contents of /etc/systemd/resolved.conf.d are unchanged across a full suite run.",
"shell_coverage.sh against lib/tests/run_all.sh reports 100% for every lib, or records a measured figure with a falsified diagnosis for any shortfall.",
"Every file including the test files is at or under 250 lines.",
"shellcheck reports zero findings standalone and with -x, with no suppression added."
],
"out_of_scope": [
"The latent status-downgrade bug in the three unit checks, where an unconditional status=\"warning\" on the is-active branch overwrites the status=\"error\" from is-enabled, so a timer that is both disabled and inactive is never repaired. Still pinned and named by the tests; it changes live enforcement and earns its own commit.",
"Any behaviour change: the prefix is empty in production and the live output diff is the proof.",
"The other six files still over the 250-line cap."
],
"verifier": "lib/tests/run_all.sh (220 assertions, 0 failures), bash meta/scripts/shell_coverage.sh lib/tests/run_all.sh <lib> 100 for all eight libs, a diff of sudo bash check_and_enable_services.sh --status --dry-run against rev 6691cb26, a before/after sha256sum of the three /etc files, grep for unprefixed absolute paths, shellcheck, and check_file_length.sh --all."
}

View File

@ -1,20 +0,0 @@
{
"title": "Split check_and_enable_services.sh under the 250-line cap with a tested lib/",
"objective": "Bring linux_configuration/scripts/periodic_background/check_and_enable_services.sh from 1225 lines to under the repo-wide 250-line cap by moving its 21 functions into eight sourced libraries beside it, without changing what the tool does on this machine. This is the first of the three safe-tier files in Phase 1 of the 250-cap campaign.",
"acceptance_criteria": [
"check_and_enable_services.sh and every lib/services_*.sh file is at or under 250 lines; bash meta/scripts/check_file_length.sh --all reports no entry under linux_configuration/scripts/periodic_background/.",
"meta/scripts/verify_shell_split.sh against rev 6691cb26 shows every moved function byte-identical after shfmt minification, with check_hosts as the single expected difference because its repair half was deliberately factored into hosts_fix_nsswitch / hosts_fix_resolved / hosts_repair_all.",
"sudo bash check_and_enable_services.sh --status --dry-run produces output byte-identical to the same command run from a worktree at rev 6691cb26, modulo the Date: line.",
"shellcheck reports zero findings on the entry script, all eight libs and all four test files, both standalone (as the pre-commit hook runs it, with no -x) and with -x.",
"shell_coverage.sh reports 100% line coverage for services_common.sh and services_report.sh.",
"No suppression of any kind is added: no shellcheck disable directive, no noqa, no per-file ignore.",
"New sourced libs carry a shebang and the executable bit, staged with git add --chmod=+x."
],
"out_of_scope": [
"Fixing the latent status-downgrade bug found in services_units.sh, where an unconditional status=\"warning\" on the is-active check overwrites the status=\"error\" from the is-enabled check, so a timer that is both disabled and inactive is never repaired. It is identical in the pre-split file, it changes live enforcement behaviour, and it belongs in its own commit. The tests pin the current behaviour and name it.",
"Threading a root-prefix variable through the 29 absolute root-owned paths the check libs probe (/usr/bin/pacman, /etc/hosts, /etc/systemd/system/*.service, ...). That is a rewrite of live enforcement logic, not a line-count fix, and it would forfeit the verbatim-move proof for the other 20 functions.",
"Reaching 100% coverage on the six libs whose branches are gated by those absolute paths.",
"The other seven files still over the cap."
],
"verifier": "bash meta/scripts/check_file_length.sh --all (no periodic_background entry), bash meta/scripts/verify_shell_split.sh 6691cb26 <old> <old> <new>... (check_hosts the only diff), the three lib/tests/test_services_*.sh scripts (72 assertions, 0 failures), bash meta/scripts/shell_coverage.sh for services_common.sh and services_report.sh (100.00% each), and a diff of sudo bash check_and_enable_services.sh --status --dry-run against the same command at rev 6691cb26."
}

View File

@ -1,17 +0,0 @@
{
"title": "React media-gallery SPA for the dufs cloud",
"objective": "Give the self-hosted cloud a rich web UI at its existing URL: a React SPA served by dufs that shows thumbnails, opens images in a lightbox, plays videos inline, and supports upload, download, delete, and editing text files — all behind the existing dufs auth, without breaking the KeePass sync.",
"acceptance_criteria": [
"The SPA is served same-origin by dufs (render-spa); it lists directories via WebDAV PROPFIND and streams files via GET (Range for video), so dufs basic-auth covers every request.",
"Grid shows generated thumbnails (images via ImageMagick, video posters via ffmpeg) and falls back to an icon when a thumbnail is missing.",
"Images open in a lightbox (zoom + keyboard/next/prev); videos play inline; files can be uploaded, downloaded, and deleted (confirm-guarded); .txt/.md files can be edited and saved.",
"Enabling render-spa does not break Phase-1 KeePass file GET/PUT/?hash.",
"cloud_gallery builds, lints (tsc + eslint strictTypeChecked), and its vitest suite passes with coverage above the project thresholds."
],
"out_of_scope": [
"Server-side rendering / Next.js (dufs is a static file server)",
"Running the live deploy in this session (interactive + outward-facing)",
"Fixing the host's broken ffmpeg (video posters skipped until then)"
],
"verifier": "de-risk against the real dufs binary (render-spa + PROPFIND/GET/PUT/DELETE/?hash); pnpm build + pnpm lint + pnpm coverage (38 tests, >90%); generate_thumbnails.sh functional test; local dufs --render-spa serving check (shell/asset/thumbnail/PROPFIND all 200); documented in docs/superpowers/evidence/cloud-gallery-2026-07-12.json"
}

View File

@ -1,18 +0,0 @@
{
"title": "cloud_gallery: green build, 100% coverage, aggressive lint, live deploy + mobile app install",
"objective": "Make the cloud_gallery SPA production-ready and deployed: the Vite build must pass, the lint must be the most aggressive type-checked ruleset the toolchain supports, and vitest coverage must be a real 100% across statements/branches/functions/lines. Then deploy the SPA live via setup_cloud_gallery.sh, restore working ffmpeg so video posters generate, and whitelist + install the com.kuhy.dufs_client mobile app so focus mode does not kill it.",
"acceptance_criteria": [
"pnpm build (tsc -b && vite build) succeeds — the prior TS2493/TS2352 tuple errors in dufs-client.test.ts are gone.",
"eslint config uses typescript-eslint strict + stylistic type-checked, react-hooks, and reportUnusedDisableDirectives=error; pnpm lint passes with zero errors.",
"pnpm coverage passes with thresholds set to 100/100/100/100 and reports 100% on all four metrics.",
"setup_cloud_gallery.sh deploys the SPA and dufs serves it with render-spa on 127.0.0.1:5000 (401 unauthenticated confirms it is up and auth-protected).",
"ffmpeg runs (stale /usr/local/bin shadow removed) and generate_thumbnails.sh produces video posters with 0 failures.",
"com.kuhy.dufs_client is in phone_focus_mode WHITELIST, the APK installs, launches, and survives the focus daemon."
],
"out_of_scope": [
"eslint-plugin-react (crashes under ESLint 10; TypeScript covers prop typing)",
"Changes to KeePass sync or media-sync scripts",
"Authenticated end-to-end browser walkthrough of the live URL (user does this at login)"
],
"verifier": "pnpm build + pnpm lint + pnpm coverage (62 tests, 100% all metrics); setup_cloud_gallery.sh run + local dufs :5000 checks; generate_thumbnails.sh (10 made, 0 failed); adb install -r + monkey launch + pidof (RUNNING); documented in docs/superpowers/evidence/cloud-gallery-coverage-lint-deploy-2026-07-12.json"
}

View File

@ -1,17 +0,0 @@
{
"title": "code_tutor interactive codebase-learning CLI",
"objective": "Ship a new python_pkg/code_tutor package that turns an unfamiliar codebase into an interactive lesson: analyse code into items, order them dependency-first, pose reimplement challenges, and verify user implementations with tests and coverage, with optional local-LLM hints.",
"acceptance_criteria": [
"Analyzer extracts functions/classes as CodeItems from a codebase.",
"Plan builder orders items dependency-first and groups them into sessions.",
"Challenge flow discovers matching user tests and drives the attempt loop.",
"Verifier runs the user's implementation against tests and enforces a coverage bar.",
"CLI (Typer/Rich) exposes the tutor commands.",
"Whole package passes ruff select=ALL, mypy strict, pylint 10/10, and 100% line+branch test coverage."
],
"out_of_scope": [
"A hosted/multi-user service.",
"Bundling or managing the local LLM runtime itself."
],
"verifier": "python -m pytest python_pkg/code_tutor/tests/ --cov=python_pkg.code_tutor --cov-branch (100%) + pre-commit (ruff/mypy/pylint/bandit)"
}

View File

@ -1,19 +0,0 @@
{
"title": "Split code_tutor/_analyzer.py under the 250-line cap",
"objective": "Bring python_pkg/code_tutor/_analyzer.py (388 lines) under the repo-wide 250-line cap by moving the file-walking and import-graph half into _deps.py and the static scan tables into _scan_tables.py.",
"acceptance_criteria": [
"_analyzer.py, _deps.py and _scan_tables.py are each at most 250 lines.",
"The code_tutor suite still reports exactly 216 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the code_tutor source modules.",
"_is_binary, the only name any test patches on _analyzer, stays defined there so that patch string needs no edit.",
"Every importer of the moved functions -- cli.py, _plan_builder.py and test_analyzer.py -- names _deps directly rather than reaching them through an _analyzer re-export.",
"No assertion is changed and no test is deleted, skipped or weakened.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts, or which paths the analyzer skips.",
"Splitting cli.py, _verifier.py, _llm.py or the code_tutor test modules, which are separate commits.",
"Adding a re-export shim in _analyzer."
],
"verifier": "timeout 90 env PYTHONPATH=. python3 -m pytest python_pkg/code_tutor/tests -q (expects exactly 216 passed), plus an import-time assertion that every patched name resolves, plus pre-commit run --files on the touched files."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split code_tutor/_challenge.py under the 250-line cap",
"objective": "Bring python_pkg/code_tutor/_challenge.py (467 lines) under the repo-wide 250-line cap by moving the two challenge flows and the public entry point into _challenge_flows.py, and the static prompt strings into _challenge_prompts.py.",
"acceptance_criteria": [
"_challenge.py, _challenge_flows.py and _challenge_prompts.py are each at most 250 lines.",
"The code_tutor suite still reports exactly 216 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the code_tutor source modules.",
"Every patch string in test_challenge_part3.py names the module its function-under-test now resolves collaborators through, decided per test rather than by a blanket substitution: the _run_user_impl tests keep _challenge, the flow and entry-point tests move to _challenge_flows.",
"The suite completes in seconds. A patch that no longer intercepts here does not fail - it lets the real interactive flow run and the suite spins, so wall-clock time is part of the pass condition.",
"No assertion is changed and no test is deleted, skipped or weakened.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts, or any prompt text.",
"Splitting cli.py, _analyzer.py, _verifier.py, _llm.py or the code_tutor test modules, which are separate commits.",
"Adding a re-export shim in _challenge; _verifier.py points at _challenge_flows directly."
],
"verifier": "timeout 90 env PYTHONPATH=. python3 -m pytest python_pkg/code_tutor/tests -q (expects exactly 216 passed, well inside the timeout), plus an import-time assertion that every patched name resolves on the module its test names, plus pre-commit run --files on the touched files."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split code_tutor/_challenge_support.py under the 250-line cap",
"objective": "Bring python_pkg/code_tutor/_challenge_support.py (402 lines) under the repo-wide 250-line cap by moving the isolated pytest runner and the LLM verdict streaming into their own modules.",
"acceptance_criteria": [
"_challenge_support.py, _pytest_runner.py and _verdict.py are each at most 250 lines.",
"The code_tutor suite still reports exactly 216 passing tests -- the same count as before the split, proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the code_tutor source modules.",
"Every patch string naming a moved function or one of its plain-import collaborators is repointed at the module the code actually lives in now. code_tutor uses absolute patch strings rather than a MOD constant, so this is a per-string edit and cannot be done with one substitution.",
"_challenge.py imports _patch_and_test, _pytest_clean, _parse_verdict and _stream_verdict back, because test_challenge_part3.py patches the first two on _challenge.",
"No assertion is changed and no test is deleted, skipped or weakened.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts, or any pytest invocation flags.",
"Splitting _challenge.py, cli.py, _analyzer.py or the code_tutor test modules, which are separate commits.",
"Adding a re-export shim in _challenge_support; importers point at the new modules directly to keep the dependency direction one-way."
],
"verifier": "PYTHONPATH=. python3 -m pytest python_pkg/code_tutor/tests -q (expects exactly 216 passed), plus an import-time attribute probe over the four modules, plus pre-commit run --files on the touched files."
}

View File

@ -1,18 +0,0 @@
{
"title": "Split code_tutor cli.py and _verifier.py under the cap, removing two lint suppressions",
"objective": "Bring python_pkg/code_tutor/cli.py (345 lines) and _verifier.py (347) under the repo-wide 250-line cap. cli.py's split separated code covered by its per-file-ignores, so rather than copying S607 and PERF203 onto a second file the underlying lint is fixed and both entries are deleted.",
"acceptance_criteria": [
"cli.py, _cli_checks.py, _verifier.py and _verifier_support.py are each at most 250 lines.",
"The S607 and PERF203 entries are removed from meta/pyproject.toml's per-file-ignores for code_tutor/cli.py, and ruff passes on the result. The repo's total suppression count goes down by two; it must not go up.",
"The code_tutor suite reports 217 passing tests: the 216 baseline plus exactly one new test covering the shutil.which(\"systemctl\") is None branch that the S607 fix introduced.",
"The package keeps 100% branch coverage of the code_tutor source modules, with the new branch covered by a real test rather than an exclusion.",
"Every patch string is repointed per test by which function is under test: the _ensure_ollama_running and _ensure_fresh_plan tests move to _cli_checks, the analyze/study/status/drill command tests keep cli.",
"No existing assertion is changed and no test is deleted, skipped or weakened."
],
"out_of_scope": [
"Changing the observable behaviour of the Ollama startup path: it must still probe, start via systemctl, poll to the same timeout and print the same messages.",
"Removing the B008 ignore, which is the standard Typer dependency-injection pattern and stays with the command definitions in cli.py.",
"Splitting the code_tutor test modules, which are separate commits."
],
"verifier": "timeout 90 env PYTHONPATH=. python3 -m pytest python_pkg/code_tutor/tests -q (expects exactly 217 passed), plus pre-commit run ruff --files python_pkg/code_tutor/cli.py passing with the two ignores deleted, plus pre-commit run pytest-coverage confirming 100%."
}

View File

@ -1,19 +0,0 @@
{
"title": "Clear the seven over-cap code_tutor test modules",
"objective": "Bring every python_pkg/code_tutor test module under the repo-wide 250-line cap by partitioning them at the banner comments that already mark each function-under-test, taking code_tutor from thirteen violations to zero.",
"acceptance_criteria": [
"bash ~/utils/scripts/check_file_length.sh --all lists no file under python_pkg/code_tutor.",
"The code_tutor suite still reports exactly 217 passing tests -- the count established once the cli lint fix added its covering test -- proving no test was dropped or silently skipped.",
"The package keeps 100% branch coverage of the code_tutor source modules.",
"No patch string changes: this is a pure partition of test sections, and the source splits in the preceding commits already put every patched name in the module each file names.",
"The shared _make_verifier builder moves to tests/conftest.py rather than being duplicated, and the local copy of _make_live_mock that shadowed conftest's is deleted.",
"No assertion is changed and no test is deleted, skipped or weakened.",
"No suppression is added and no coverage exclusion is introduced."
],
"out_of_scope": [
"Changing what any test asserts.",
"Touching the code_tutor source, which is already under the cap.",
"Adding a fourth partN-style file name: each new module is named after the concern it covers."
],
"verifier": "timeout 120 env PYTHONPATH=. python3 -m pytest python_pkg/code_tutor/tests -q (expects exactly 217 passed), plus bash ~/utils/scripts/check_file_length.sh --all showing no code_tutor entry, plus pre-commit run --files on the touched files."
}

View File

@ -1,21 +0,0 @@
{
"title": "Split config.sh under the cap without changing the policy it defines",
"objective": "Take phone_focus_mode/config.sh from 571 lines to under the repo's 250-line cap by moving per-enforcer settings into siblings, while proving the parsed policy and the sourced shell environment are both unchanged. Every phone script sources this file and deploy.sh sources it from the checkout, so a mistake here stops the entire stack rather than degrading one enforcer.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists phone_focus_mode/config.sh, and no new file is over the cap.",
"The policy fingerprint is byte-identical before and after: python3 -m python_pkg.focus_policy --config phone_focus_mode/config.sh | sha256sum.",
"The SOURCED SHELL ENVIRONMENT is also identical — same variable count, same values. The fingerprint alone is insufficient: the loader reads only the fifteen names it parses, so a broken path expansion in any other variable is invisible to it.",
"Every one of the fifteen loader-visible variables stays in config.sh. The loader regex-scans that file's text alone, so a name moved to a sibling silently parses as empty rather than erroring.",
"No extraction may cut through a multi-line quoted value; each moved variable is taken from its assignment through the line closing its quote.",
"All five siblings are added to BOTH of deploy.sh's hardcoded lists, and the lists remain in exact correspondence.",
"shellcheck passes on each touched file individually; sh -n passes on every config file; bash -n passes on config.sh.",
"pytest python_pkg/focus_policy passes, and every phone-side shell suite still passes with an unchanged assertion count."
],
"out_of_scope": [
"Deploying to the phone or verifying on-device.",
"Changing any package list, prefix, threshold, interval or path value.",
"Moving any loader-visible variable, however tempting for line count — WHITELIST and SYSTEM_NEVER_DISABLE alone are 122 lines and must stay.",
"Splitting deploy.sh or focus_ctl.sh, which are separate later items."
],
"verifier": "python3 -m python_pkg.focus_policy --config phone_focus_mode/config.sh | sha256sum (expects 83e05e82dd1683e1dff1c79a96fec0a4a56aa73295604c681ae355b40a590ba3), plus a diff of the sourced environment against the pre-split commit showing 79 identical variables, plus check_file_length.sh --all showing 17 files, plus every phone test suite at its previous count, plus pytest python_pkg/focus_policy at 137 passed."
}

View File

@ -1,21 +0,0 @@
{
"title": "Split curfew_enforcer.sh's network layer into a tested sibling",
"objective": "Take curfew_enforcer.sh from 367 lines to under the repo's 250-line cap by moving its nine network-curfew functions into curfew_net.sh, and cover that library at 100%. The per-UID iptables allow-list decides which apps can reach the network overnight; a wrong rule order silently blocks everything or blocks nothing.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists phone_focus_mode/curfew_enforcer.sh, and no new file is over the cap.",
"bash meta/scripts/shell_coverage.sh phone_focus_mode/lib/tests/test_curfew_net.sh curfew_net.sh exits 0 at its default 100% minimum.",
"Every assertion is mutation-proofed with zero survivors, including mutations that invert the REJECT, cut off root, and pass non-numeric uids to iptables.",
"The rule ORDER is asserted, not just rule presence: every ACCEPT must precede the 10000-19999 REJECT.",
"meta/scripts/verify_shell_split.sh reports every function verbatim, except any rewritten for measurability — for which the emitted rule sequence must be proven identical instead.",
"curfew_net.sh is added to BOTH of deploy.sh's hardcoded lists (the push list and the cp list), as a flat sibling matching dns_iptables.sh and tether_iptables.sh — not under lib/, which deploy.sh does not create on the device.",
"shellcheck passes on each touched file individually, with no -x and no disable directive.",
"sh -n passes on both phone-side scripts, which run under ash, not bash."
],
"out_of_scope": [
"Deploying to the phone or verifying on-device; there is no device in this session.",
"Splitting the grayscale or DND layers out of curfew_enforcer.sh, which is already under the cap without the net layer.",
"Adding curfew_net.sh to deploy.sh's chmod list: it is sourced, not executed, matching how dns_iptables.sh and tether_iptables.sh are handled.",
"Changing what the curfew blocks or allows."
],
"verifier": "bash phone_focus_mode/lib/tests/test_curfew_net.sh (expects 41 passed, 0 failed), plus bash meta/scripts/shell_coverage.sh phone_focus_mode/lib/tests/test_curfew_net.sh curfew_net.sh at 100.00%, plus the mutation run at 17 killed / 0 survived, plus bash meta/scripts/check_file_length.sh --all showing 20 files, plus grep for curfew_net in both deploy.sh lists, plus pre-commit run --files on the touched files."
}

View File

@ -1,19 +0,0 @@
{
"title": "Split deploy.sh, the last over-cap file in phone_focus_mode",
"objective": "Take deploy.sh from 875 lines to under the repo's 250-line cap. It goes last by design: every enforcer split this session grew its two hardcoded file lists, so splitting it earlier would have left the 'add to BOTH lists' step pointing at a stale location.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all lists NO file under phone_focus_mode/, finishing that directory.",
"The two hardcoded file lists stay in exact correspondence after being moved into different files, and each carries a comment saying where its counterpart now lives.",
"do_deploy, at 421 lines, is cut at the phase boundaries it already prints, so each phase is a named function rather than an arbitrary line range.",
"Any function that stops being verbatim must have its behaviour proven unchanged against the pre-split version.",
"shellcheck passes on each file individually, with no -x and no disable directive; a global written in one file and read in another must not leave either file assigning something it never reads.",
"deploy.sh still runs: it reaches its usage message, which requires the whole source chain and config.sh to resolve.",
"Every phone-side test suite still passes at its previous count."
],
"out_of_scope": [
"Deploying to the phone; there is no device in this session.",
"Changing what is deployed, in what order, or the conditional handling of config_secrets.sh (which is deliberately asymmetric between the two lists and was so before this change).",
"Writing a test harness for the deploy phases themselves: every one of them is an adb call against a real device, and a stub layer deep enough to be meaningful would model the phone rather than test the script."
],
"verifier": "timeout 30 bash phone_focus_mode/deploy.sh (expects the usage message), plus check_file_length.sh --all showing no phone_focus_mode entry, plus the two-list parity check, plus every phone test suite at its previous count, plus pre-commit run --files on the touched files."
}

View File

@ -1,18 +0,0 @@
{
"title": "Migrate diet_guard to the shared gatelock backend",
"objective": "Replace diet_guard's hand-rolled fullscreen/grab/VT-disable lock-window mechanics and its log_integrity import with the new shared `gatelock` package (https://github.com/kuhyx/gatelock), which was extracted from diet_guard's own _GateWindow as the most mature of the three lock implementations (wake_alarm, screen-locker, diet_guard). MealGate now owns a gatelock.LockWindow via composition and implements LockWindowHooks, instead of inheriting the now-deleted _GateWindow/_GateRoot classes. Success: diet_guard's lock/grab/VT-disable/unlock behavior is unchanged for the end user, demo mode manually verified by running the gate and observing the window, all existing diet_guard tests adapted or removed (window-mechanics tests deleted since that logic is now tested in gatelock's own 100%-covered suite), and the whole monorepo stays at 100% branch coverage.",
"acceptance_criteria": [
"MealGate no longer inherits _GateWindow/_GateRoot; it composes gatelock.GateRoot + gatelock.LockWindow",
"_gatelock_window.py is deleted (its mechanics now live in gatelock)",
"_state.py and _budget.py import HMAC functions from gatelock.log_integrity instead of python_pkg.shared.log_integrity",
"testsAndMisc/meta/requirements.txt and the pylint pre-commit hook's additional_dependencies both pin gatelock@v0.1.0",
"python_pkg/diet_guard test suite passes with 100% branch coverage, with window-mechanics tests removed (covered upstream in gatelock) and new tests added for MealGate's hook delegation (on_focus_ready, on_close, on_callback_error) and demo-vs-prod LockConfig mode",
"demo-mode gate manually run and visually confirmed to render correctly, and SIGTERM confirmed to cleanly restore VT switching and exit 0",
"ruff, mypy, and pylint (10/10) all pass on the changed diet_guard files"
],
"out_of_scope": [
"Migrating screen-locker or wake_alarm (separate, later steps in the same overall plan)",
"Live production-mode (demo_mode=False) verification on this machine -- user opted to trust demo-mode + unit-test coverage instead, given the live global-grab risk"
],
"verifier": "pytest --cov=python_pkg --cov-branch --cov-fail-under=100; pre-commit run --files <changed diet_guard files>; manual run of `python -m python_pkg.diet_guard gate --demo`"
}

View File

@ -1,16 +0,0 @@
{
"title": "diet_guard: screen-lock meal gate with trigger fix, food-bank hardening, and multi-item meals",
"objective": "Land the diet_guard package so the 4-hour meal-logging gate reliably locks the screen at slot time, no longer crashes when the systemd timer fires before X authorization is ready, no longer floods/overwrites a corrupt food bank, and supports logging a composite meal made of several separately-macroed items. Success = the package is committed, all pre-commit gates pass, and diet_guard holds 100% branch coverage.",
"acceptance_criteria": [
"The gate retries instead of raising TclError when the display is not yet authorized at session start (wait_for_display in _gatelock.py, wired into _cli._cmd_gate).",
"A corrupt food_bank.json is moved aside with a timestamped backup and warned about once, never silently overwritten.",
"A meal of multiple items records each item plus a composite total (kcal/macros summed) to the food bank, surfaced via a '+ Add item' control in the gate.",
"diet_guard reports 100% branch coverage and the full pre-commit suite (ruff, ruff-format, mypy, pylint, bandit, codespell, no-noqa, pytest-coverage) passes."
],
"out_of_scope": [
"Changes to other python_pkg packages (wake_alarm, etc.) — excluded from this commit.",
"Resolving the unrelated dirty working-tree edits to wake_alarm and the dwm/gaming scripts.",
"Real-world reboot confirmation of the display-race fix and human visual review of the meal UI layout."
],
"verifier": "pre-commit run --files <diet_guard files> (run from a clean worktree); pytest_changed_packages.py enforces --cov-fail-under=100 across python_pkg"
}

View File

@ -1,18 +0,0 @@
{
"title": "Harden digital-wellbeing bypass vectors",
"objective": "Close three easy bypass vectors in the digital-wellbeing tooling: (1) screen locker bypassed by switching to a TTY with Ctrl+Alt+Fn, (2) midnight shutdown disabled by editing schedule constants or commenting out protection checks, (3) hosts-file unblock list silently expanded by adding sed commands. Success means each vector requires deliberate multi-step effort (manual chattr -i + code edits) rather than a single trivial command.",
"acceptance_criteria": [
"Screen locker calls setxkbmap -option srvrkeys:none on startup and restores on close in production mode only",
"setup_midnight_shutdown.sh constants are 21/22/5 and all three leniency checks are active (uncommented)",
"setup_midnight_shutdown.sh self-locks with chattr +i after enable_midnight_shutdown() completes",
"install.sh tracks whitelisted domains in /etc/hosts.unblock-entries.state (chattr +i) and blocks install if the list grows",
"install.sh and generate_hosts_file.sh self-lock with chattr +i after a successful install",
"screen_locker package maintains 100% branch coverage (311 tests pass)"
],
"out_of_scope": [
"Preventing root from bypassing chattr +i (requires kernel-level controls)",
"Changes to the actual blocked or unblocked domain list",
"Hardening against SIGKILL of the screen locker process"
],
"verifier": "pre-commit run --files <changed-files>; python -m pytest python_pkg/screen_locker/tests/ --cov=python_pkg.screen_locker --cov-branch"
}

View File

@ -1,18 +0,0 @@
{
"title": "split dns_enforcer.sh and give its chain code a real test",
"objective": "Move the iptables chain machinery out of dns_enforcer.sh so both files are under 250 lines, carry the new sibling in both deploy.sh lists, and replace the dead test_dns_enforcer.sh with a suite that actually exercises the moved code.",
"acceptance_criteria": [
"verify_shell_split.sh reports all 14 top-level functions moved verbatim",
"test_dns_iptables.sh reports 20 passed, 0 failed, and fails under each of three independent mutations",
"dns_iptables.sh appears in BOTH the adb_cmd push list and the adb_root cp list in deploy.sh",
"Sourcing dns_enforcer.sh with main() disabled resolves all seven moved functions at runtime",
"shellcheck is clean on every changed shell file, standing alone, with zero suppressions",
"check_file_length.sh --all drops from 23 over-cap files to 22, with no new file over the cap"
],
"out_of_scope": [
"Deploying to the phone or verifying on-device behaviour — explicitly excluded by the user this session",
"Repairing test_dns_enforcer.sh, which is deleted rather than fixed",
"Any behavioural change to the chain functions themselves"
],
"verifier": "bash phone_focus_mode/lib/tests/test_dns_iptables.sh + meta/scripts/verify_shell_split.sh + shellcheck + check_file_length.sh"
}

View File

@ -1,19 +0,0 @@
{
"title": "Park unrooted DNS filtering; keep the WireGuard client setup and the firewall fix",
"objective": "Stop pursuing phone-side DNS filtering until an always-on resolver exists. Android's Private DNS fails closed, so a resolver hosted on a machine that can be switched off leaves the phone with no internet at all - which is disqualifying for a daily driver. Success is: config.sh reverted so deploying is byte-identical to before, the phone left on working DNS, the reasoning and the ruled-out options recorded, and the working artifacts (WireGuard client setup, nftables scoping) kept rather than discarded.",
"acceptance_criteria": [
"DNS_TRUSTED_DOT_HOST and DNS_TRUSTED_DOT_IPS are empty, and the enforcer harness confirms an empty allowlist plus Private-DNS-forced-off, i.e. the pre-change behaviour",
"The phone is left at private_dns_mode=off with DNS resolving",
"The fail-closed behaviour is recorded as measured on-device, not inferred",
"setup_dot_resolver.sh permits 853 on wg0 only - the input chain is policy drop and previously admitted only ssh over the tunnel, so binding to the tunnel address was not by itself sufficient",
"setup_phone_wireguard.sh installs, pushes and verifies the tunnel, and deletes the pushed private key afterwards",
"The parked doc names the specific reasons the hosted-hybrid option was ruled out, so it is not re-proposed"
],
"out_of_scope": [
"Signing up for any DNS provider",
"Provisioning a VPS",
"Tearing down the local stunnel DoT endpoint - it is WireGuard-only and unreachable from LAN and WAN, so it is left running for future testing",
"Any Device Owner provisioning or factory reset"
],
"verifier": "The stubbed-iptables harness (14 checks, section A proves the revert); shellcheck + shfmt on both scripts; setup_phone_wireguard.sh --check; adb settings get global private_dns_mode plus a ping from the phone"
}

View File

@ -1,25 +0,0 @@
{
"title": "Deliver the blocklist over DoT and hand the policy to the Kotlin backend",
"objective": "Close the two gaps that stopped the unrooted path from working end to end. First, the phone had no way to consume the focus policy: the app now loads a generated JSON asset instead of the app and the shell config drifting apart. Second, the blocklist was only reachable as a hosts file or over plain UDP/53 on the LAN, and the rooted enforcer actively rejected every DoT connection, so a self-hosted DoT resolver could not have worked even if one existed. Success is a resolver that answers filtered queries over TLS, reachable only over WireGuard, with the rooted enforcer permitting exactly that one endpoint and nothing else.",
"acceptance_criteria": [
"python3 -m python_pkg.focus_policy renders the policy as JSON and refuses to run against the placeholder coordinates",
"The committed focus_owner/assets/policy.json carries no home coordinates, and a test fails if it ever does",
"focus_owner parses the asset and displays the real counts on-device, matching config.sh",
"An unknown schema_version is rejected rather than partially interpreted",
"dns_enforcer.sh inserts an ACCEPT for the trusted resolver BEFORE the blanket 853 REJECT - order is load-bearing, since iptables takes the first match",
"expected_rule_count() counts those ACCEPTs, so chain_intact() does not treat the chain as tampered and rebuild it every 20s",
"With DNS_TRUSTED_DOT_HOST empty the behaviour is byte-identical to before, so the live rooted phone is unaffected until deployed",
"With it set, Private DNS is pinned to that hostname instead of forced off, and user changes are reverted within DNS_CHECK_INTERVAL",
"stunnel serves DoT on 853 backed by the Caddy-managed Let's Encrypt certificate, renewed without a second ACME client",
"The resolver is bound to the WireGuard address only, and is verifiably unreachable from both LAN and WAN",
"A blocked domain returns 0.0.0.0 over DoT while a normal domain resolves"
],
"out_of_scope": [
"Device Owner provisioning and the factory reset it requires - the checklist is planning only",
"Any enforcement in focus_owner: it reads the policy but applies nothing",
"Public exposure of the resolver - deliberately WireGuard-only, no port-forward, no nftables rule",
"Deploying the dns_enforcer change to the rooted phone - the code is in, the deploy is not",
"Fixing generate_hosts_file.sh, which still comments out unblocks rather than deleting them"
],
"verifier": "python3 -m python_pkg.focus_policy (both success and placeholder-rejection paths); cd focus_owner && flutter analyze && flutter test (27 tests, incl. the committed-asset redaction guard); adb install + am start + screenshot showing the parsed policy; shellcheck + shfmt on dns_enforcer.sh, config.sh and setup_dot_resolver.sh; a stubbed-iptables harness asserting rule order, rule counts and the private-DNS pin in both modes; setup_dot_resolver.sh --check; kdig +tls @10.8.0.1 -p 853 for a normal and a blocked domain; ss -lnt plus kdig against the LAN and WAN addresses to prove non-exposure"
}

View File

@ -1,20 +0,0 @@
{
"title": "Register the new Epopeja character-sheet app in the shared icon family and the phone focus-mode whitelist",
"objective": "~/epopeja_karta is a new Flutter app, ported out of a claude.ai session, that still shipped the stock Flutter 'beach' launcher icon -- which per CLAUDE.md means it is not done. It also carries a com.kuhy.* package id, and phone_focus_mode disables any com.kuhy.* package not on its whitelist within about a second at home, so an install would appear to work and then close instantly. Give the app a family icon generated by the shared generator (never a hand-rolled one-off) and add it to the whitelist. Success: `generate --app epopeja_karta --android` writes mipmaps showing the app's own glyph, the glyph is distinguishable from the other eight at 48dp, and the package id is present in config.sh ready for the next deploy.",
"acceptance_criteria": [
"The glyph is registered in python_pkg/app_icons/glyphs.py and the app in python_pkg/app_icons/apps.py -- no per-repo copy of the generator and no hand-drawn icon anywhere in ~/epopeja_karta",
"The accent is the shared family accent #B8862E, not an app-specific colour: apps in this family are distinguished by glyph shape only, as apps.py's own docstring requires",
"The glyph reads as what it depicts at launcher size and collides with nothing already in the family; the first draft rendered as a map pin and was rejected on exactly that ground",
"Geometry is inside the family budget: safe_box_overflow returns (0, 0), and every gap between filled regions is at or above MIN_NEGATIVE_SPACE (36px), so nothing merges into a blob at 48dp",
"The vent hole and slit are true holes via fill-rule=evenodd, because icon_foreground and icon_monochrome render on transparency where a painted hole shows as a blob and in the wrong colour",
"python_pkg/app_icons keeps 100% branch coverage with zero suppressions, and pre-commit passes on every changed file except hooks failing for pre-existing repo-wide reasons",
"com.kuhy.epopeja_karta appears in the WHITELIST block of phone_focus_mode/config.sh alongside the other com.kuhy.* productive apps"
],
"out_of_scope": [
"The app itself -- lib/, tests, CI and the Android package rename all live in ~/epopeja_karta, a separate repo, and are not part of this commit",
"Deploying the whitelist to the phone -- deploy.sh needs the device, which is intentionally not being used this session; config.sh and the device stay out of sync until then",
"A Linux hicolor icon set or .desktop entry -- the app has a linux/ target purely so it can be driven on the desktop during development, so linux=False",
"Any change to the shared accent or to another app's glyph"
],
"verifier": "PYTHONPATH=~/testsAndMisc python3 -m python_pkg.app_icons list (shows epopeja_karta -> quill-nib #B8862E); preview -o sheet.png and eyeball the nib against the other eight glyphs at all three sizes; python3 -c \"...render.safe_box_overflow(glyphs.get_glyph('quill-nib'), '#B8862E')\" returns (0, 0); generate --app epopeja_karta --android then view android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png; python3 -m coverage run --branch --source=python_pkg/app_icons -m pytest python_pkg/app_icons/tests then coverage report (100%); pre-commit run --files python_pkg/app_icons/glyphs.py python_pkg/app_icons/apps.py phone_focus_mode/config.sh"
}

View File

@ -1,17 +0,0 @@
{
"title": "Extract dufs cloud (web + app + scripts) to github.com/kuhyx/dufs-cloud",
"objective": "Move the dufs web gallery, the Flutter mobile app, and the dufs/cloud setup scripts out of this monorepo into a new public repo with preserved git history, CI, 100% coverage and aggressive linting for both apps, then remove them here and leave a pointer, without breaking the live media-cloud-sync systemd units.",
"acceptance_criteria": [
"New public repo github.com/kuhyx/dufs-cloud exists with web/, app/, scripts/ and preserved history (original dufs commits present).",
"CI at .github/workflows/ci.yml runs web (lint + 100% vitest coverage + build) and app (flutter analyze --fatal-infos + test + 100% line-coverage gate).",
"The live media-cloud-sync.service and its thumbnails drop-in run the scripts from ~/dufs-cloud/scripts/ and the service still succeeds.",
"cloud_gallery/ and the 6 scripts are git rm'd from testsAndMisc; CLAUDE.md and the phone_focus_mode comment point to the new repo.",
"No active unit or executed script in testsAndMisc still references the removed files."
],
"out_of_scope": [
"KeePass sync scripts (separate feature, stay in testsAndMisc)",
"Deleting the old ~/dufs_client checkout",
"The Phase B media filter/sort/move/multi-download features (done after this)"
],
"verifier": "flutter analyze --fatal-infos + flutter test --coverage (100%); pnpm lint + coverage + build; systemctl re-point verification (ExecMainStatus=0); gh repo view (PUBLIC); grep for dangling references"
}

View File

@ -1,18 +0,0 @@
{
"title": "Extract all inline Python from shell scripts into proper .py files",
"objective": "Every substantial Python program logic currently embedded in shell heredocs or -c strings must live in a separate .py file so ruff/mypy/pylint/bandit/pytest can apply to it. calc_eval.py moves into python_pkg/ (100% branch coverage gate). Four non-python_pkg helpers get comprehensive tests. A no-inline-Python rule is added to CLAUDE.md and the global shell guidelines.",
"acceptance_criteria": [
"No shell script in the repo contains a multi-line python -c or <<'PY' heredoc with real logic",
"python_pkg/live_calc/calc_eval.py exists and passes 100% branch coverage",
"linux_configuration/tests/ has tests for validate_evidence, validate_contract, monitor_report, strip_workout_hosts, fast_count",
"pre-commit run passes on all changed files (ruff, mypy, pylint, bandit, shellcheck, zsh-syntax, pytest+coverage)",
"CLAUDE.md Shell Style section contains NEVER-embed-Python rule",
"zsh-syntax pre-commit hook exists; shellcheck excludes zsh files"
],
"out_of_scope": [
"Changing the logic of any extracted helper (pure refactor)",
"Modifying user-facing behavior of any script",
"Adding coverage for non-python_pkg scripts beyond the 4 new helpers"
],
"verifier": "pre-commit run --files $(git diff --name-only HEAD); python -m pytest python_pkg/live_calc/tests/ linux_configuration/tests/ --cov=python_pkg.live_calc --cov-branch -q"
}

View File

@ -0,0 +1,21 @@
{
"title": "Extract phone_focus_mode with focus_policy into one public repo",
"objective": "Move the GPS focus enforcer and its Python policy half out together, since focus_policy parses phone_focus_mode's config.sh and is referenced by nothing else. The repo is public and the subject matter is a home location, so proving no coordinate leaks is part of the job, not an afterthought.",
"acceptance_criteria": [
"Both trees land in one public repo with full history and python_pkg.focus_policy imports rewritten.",
"The full git history contains no real home coordinate and no committed config_secrets.sh, verified BEFORE the repo is made public.",
"The new repo has a .gitignore covering config_secrets.sh; none came across in the filter-repo pass.",
"The Python suites pass from a clean clone: 161 tests.",
"The shell suites pass with NO config_secrets.sh present, which means the harness must pin its own coordinates instead of inheriting real ones.",
"config.sh can be sourced without a secrets file, so CI and a fresh clone work.",
"Any suite that does not pass is skipped in CI with a stated reason, and its behaviour is compared against the pre-extraction baseline to establish whether the split caused it.",
"The monorepo's remaining tests still pass and no config, hook or workflow names a removed path.",
"pre-commit passes without --no-verify."
],
"out_of_scope": [
"hosts and digital_wellbeing, deferred while the guard-lib repoint is pending.",
"Fixing test_magisk_service.sh, which was already broken and is not a regression from this split.",
"python-tests.yml's stale lichess_bot and tests/ path filters, absent since May 2026."
],
"verifier": "git log --all -p greps clean for the home coordinates; pytest reports 161 passed in the new repo; the shell suites run with the secrets file moved away; pytest linux_configuration/tests reports 178 passed here; check_shell_coverage.sh --all and check_python_location.sh over every .py both exit 0; check_directory_depth.sh --all drops 262 -> 248."
}

View File

@ -1,16 +0,0 @@
{
"title": "Extract session_autopsy and the MCP fleet out of the monorepo",
"objective": "testsAndMisc carried 12GB of third-party MCP clones and a self-contained analyzer package that has no monorepo dependencies. Both move to kuhyx/mcp-servers. Success is: the SessionEnd hook still ingests transcripts, every registered MCP server still resolves its binary, and no history is lost.",
"acceptance_criteria": [
"session_autopsy history preserved via git subtree split, not a copy",
"SessionEnd hook exercised end to end against a real transcript with an empty error log",
"All MCP command paths verified to resolve after the move (12 references across 4 config files)",
"The 12GB of clones is moved and gitignored, never committed; a pinned manifest + setup.sh reconstructs it",
"testsAndMisc pre-commit gate passes with no --no-verify"
],
"out_of_scope": [
"Rebuilding any MCP server binary",
"third_party/agent-skills, which is unrelated to MCP and stays"
],
"verifier": "bash ~/.claude/hooks/session_autopsy_end.sh against a real transcript; a script asserting every mcpServers command path exists; pre-commit run"
}

View File

@ -1,16 +0,0 @@
{
"title": "Split 6 oversized files to satisfy the 500-line file-length test",
"objective": "Fix python_pkg/tests/test_file_length.py::test_all_python_files_are_at_most_500_lines by splitting diet_guard/_gatelock.py + test_gatelock.py, wake_alarm/_alarm.py + test_alarm.py, and the usage_report.py + _usage_report_parsing.py pair into focused modules, each <= 500 lines, while preserving behaviour, 100% branch coverage on python_pkg, and pylint 10.00/10 on touched non-test modules.",
"acceptance_criteria": [
"All Python source files repo-wide are <= 500 lines",
"python_pkg/tests/test_file_length.py passes",
"Full repo pytest passes with 100% branch coverage on python_pkg",
"pylint 10.00/10 on all touched non-test modules",
"usage_report.py CLI still produces a full Markdown report"
],
"out_of_scope": [
"Changing diet_guard/wake_alarm/usage_report runtime behaviour",
"The pre-existing _AlarmProgress/_AlarmView/_AlarmHardware field-grouping refactor (unrelated, already in the working tree)"
],
"verifier": "python3 -m pytest -q && python3 -m pylint <touched-modules>"
}

View File

@ -0,0 +1,19 @@
{
"title": "Flatten i3-configuration and misc/testsAndMisc-bash, and repair the references the first flatten missed",
"objective": "Finish the flattening for the two remaining pure-taxonomy nestings, and close out the path rewrites that the previous commit's regex did not reach. The first flatten proved that the moves are easy and the references are the risk, so this change is mostly about finding references that a diff review would not surface.",
"acceptance_criteria": [
"i3 config no longer sits under periodic_background, where it never belonged; both resulting directories are at depth 2.",
"misc/ no longer contains a directory named after the repo it lives in.",
"The media-ignore rules from the moved .gitignore still apply at their new location, and no previously tracked file becomes ignored.",
"Every $VAR/scripts/... reference is rewritten, including the orchestrators that name the still-deferred subsystems.",
"Both i3blocks test suites pass, having been RUN rather than eyeballed.",
"The repo-wide pytest gate still reports 100%.",
"Every $HOME symlink broken by the move is repointed, and the i3blocks scripts are run to prove the bar works.",
"pre-commit passes without --no-verify."
],
"out_of_scope": [
"digital_wellbeing and hosts, deferred pending the guard-lib repoint; their references are updated to the new scheme but the directories stay.",
"The ~57 remaining violations that encode real structure (a C project, Python package dirs, artgate's routes/styles, systemd unit dirs) rather than taxonomy."
],
"verifier": "check_directory_depth.sh --all falls 139 -> 104; both test_i3blocks_*.sh pass; pytest_changed_packages.py reports 1798 passed at 100%; find ~ -xtype l finds nothing; git check-ignore confirms the relocated media rules; check_shell_coverage.sh --all exits 0."
}

View File

@ -0,0 +1,21 @@
{
"title": "Dissolve linux_configuration/scripts/ and single_use/ to satisfy the depth-2 cap",
"objective": "Flatten the largest source of directory-depth violations. scripts/ and single_use/ were three levels of pure taxonomy carrying no information, and a 2-directory cap leaves no room for them. Categories move up to sit directly under linux_configuration/, which is what makes the cap satisfiable at all.",
"acceptance_criteria": [
"linux_configuration/scripts/ no longer exists; its children sit one level under linux_configuration/.",
"Every relative `source` of a shared library resolves from its file's NEW location, checked by resolving each path on disk rather than by reading the diff.",
"Every REPO_ROOT derivation that walks up a fixed number of levels is recomputed for the new depth.",
"All lib/tests suites that passed before still pass, and any that fail are proven to fail identically in the pre-move baseline worktree.",
"The repo-wide pytest gate still reports 100% coverage.",
"Every symlink in $HOME pointing into the moved tree is repointed, and the i3blocks scripts are RUN to prove the status bar still works.",
"No config, workflow, allowlist or ignore rule names a path that no longer exists.",
"The .gitignore rules protecting untracked secrets still match after their paths change.",
"pre-commit passes without --no-verify."
],
"out_of_scope": [
"periodic_background/digital_wellbeing and hosts, deferred while the guard-lib repoint is pending; they keep their depth violations for now.",
"Deduplicating the two Nextcloud implementations, which is a separate change.",
"Wiring the depth gate, which lands only once the tree conforms."
],
"verifier": "check_directory_depth.sh --all falls 248 -> 139; every '$SCRIPT_DIR/../lib/...' source resolves on disk; 8 of 9 lib/tests run_all.sh pass with the ninth proven to need the jail at baseline too; pytest_changed_packages.py reports 1798 passed at 100%; find ~ -xtype l finds no broken link; the i3blocks scripts emit real output."
}

View File

@ -1,21 +0,0 @@
{
"title": "Split focus_ctl.sh, the largest file in phone_focus_mode",
"objective": "Take focus_ctl.sh from 1091 lines to under the repo's 250-line cap by extracting one library per enforcer, and give the extracted logic its first tests. This must land BEFORE deploy.sh is split, because it grows deploy.sh's two hardcoded lists.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists phone_focus_mode/focus_ctl.sh, and no new file is over the cap.",
"Every stdin-draining while-read loop is identified before extraction and moved verbatim; none is converted to a pipe.",
"meta/scripts/verify_shell_split.sh reports every function moved verbatim.",
"All eight siblings are added to BOTH of deploy.sh's hardcoded lists, and the lists stay in exact correspondence.",
"A mutation spec lands in meta/scripts/fixtures/mutations/ and kills every mutation, including the escape-hatch commands and the third copy of the Haversine.",
"Any mutation that proves equivalent is resolved by deleting the dead code, not by weakening the mutation or adding a test that cannot fail.",
"shellcheck passes on each touched file individually; sh -n passes on every phone-side script.",
"jscpd stays under its 2% threshold, measured in a clean worktree so vendored .venv does not pollute the figure."
],
"out_of_scope": [
"Deploying to the phone or verifying on-device.",
"Splitting deploy.sh, which is the next item and must come after this one.",
"De-duplicating ctl_is_curfew_now against daemon_location.sh's is_curfew_now, or the third Haversine copy in cmd_status — both are recorded as drift hazards for a later session.",
"Reaching 100% line coverage on the cmd_* subcommands, which would require modelling far more device behaviour than the split itself warrants."
],
"verifier": "bash phone_focus_mode/lib/tests/test_ctl_libs.sh (expects 136 passed, 0 failed), plus python3 meta/scripts/mutate_shell.py meta/scripts/fixtures/mutations/ctl_libs.json at 22 killed / 0 not killed, plus check_file_length.sh --all showing 16 files, plus deploy-list parity, plus jscpd under 2%, plus pre-commit run --files on the touched files."
}

View File

@ -1,21 +0,0 @@
{
"title": "Split focus_daemon.sh into three tested libraries",
"objective": "Take focus_daemon.sh from 543 lines to under the repo's 250-line cap by extracting its location/curfew logic, its state-file builders and its app layer into three flat siblings, and test all three. is_allowed is the single decision that determines whether an app keeps working; it had no test at all.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists phone_focus_mode/focus_daemon.sh, and no new file is over the cap.",
"Every stdin-draining `while read ... done < file` loop is identified BEFORE extraction and moved verbatim. None may be converted to a pipe: each body calls pm, which would drain the loop's stdin.",
"Every assertion is mutation-proofed with zero survivors, including mutations targeting code kcov cannot attribute — the embedded awk Haversine and the trailing `done < file` redirect lines.",
"Where kcov cannot reach 100%, the shortfall must be shown to be a measurement artifact by mutation, and reported as an explicit exception with the real number — never by restructuring code in a way that risks behaviour.",
"meta/scripts/verify_shell_split.sh reports every function moved verbatim.",
"All three siblings are added to BOTH of deploy.sh's hardcoded lists, and the two lists remain in exact correspondence.",
"shellcheck passes on each touched file individually, with no -x and no disable directive; sh -n passes on all four phone-side scripts.",
"A reproducible mutation spec lands in meta/scripts/fixtures/mutations/."
],
"out_of_scope": [
"Deploying to the phone or verifying on-device; there is no device in this session.",
"Splitting init, main, acquire_lock or the logging helpers out of the entry script, which is under the cap without the three extracted clusters.",
"Moving CURRENT_MODE or _CURFEW_TICK_CACHED out of the entry script: both are written there and in a library, so they are genuine shared globals.",
"Collapsing the multi-line awk Haversine onto one line to satisfy kcov; readability of the distance formula outweighs a measurement artifact."
],
"verifier": "bash phone_focus_mode/lib/tests/test_daemon_libs.sh (expects 110 passed, 0 failed), plus shell_coverage.sh reporting 100.00% for daemon_state.sh and the documented artifact figures for the other two, plus python3 meta/scripts/mutate_shell.py meta/scripts/fixtures/mutations/daemon_libs.json at 33 killed / 0 not killed, plus check_file_length.sh --all showing 18 files, plus deploy-list parity, plus pre-commit run --files on the touched files."
}

View File

@ -1,17 +0,0 @@
{
"title": "focus_mode_daemon: bring back under the 500-line limit",
"objective": "focus_mode_daemon.py has been 509 lines since commit 22e22c1, breaching the repo's 500-line cap. It went unnoticed because the Python-tests workflow only triggers on python_pkg/** changes, so that commit never ran CI; the first later commit touching python_pkg/ exposed it and main is red. Split the file along a real seam with no behaviour change, and keep the live focus-mode.service working throughout.",
"acceptance_criteria": [
"No tracked Python file exceeds 500 lines",
"The split follows a real responsibility boundary, with the dependency running one way and no import cycle",
"The daemon still runs through /usr/local/bin/focus-mode-daemon, the symlink systemd uses",
"focus-mode.service restarts cleanly and resumes enforcing Steam/browser mutual exclusion",
"Process detection behaviour is unchanged",
"No behaviour change of any kind: this is a structural split"
],
"out_of_scope": [
"Any change to the daemon's mutual-exclusion policy, whitelist behaviour, or poll interval",
"The brother_printer work in a12e696/69242e4"
],
"verifier": "ruff check; /usr/local/bin/focus-mode-daemon --help and status compared against the pre-split version from git; systemctl --user restart focus-mode.service plus journal inspection; wc -l over tracked *.py; CI (Python tests)"
}

View File

@ -1,18 +0,0 @@
{
"title": "Split the focus_owner Dart files under the 250-line cap",
"objective": "Bring main.dart (538), policy.dart (272), enforcement_status_card.dart (268), widget_test.dart (351) and policy_test.dart (253) under the cap, using Dart's part/part of where private declarations cross the seam.",
"acceptance_criteria": [
"flutter test reports exactly 94 passing tests, the same as before the split.",
"flutter analyze reports no issues at all: no errors, no warnings, no infos.",
"Library-private declarations that cross a seam use part/part of rather than import. Dart privates are library-scoped, so a plain import cannot see them and the analyzer rejects it outright.",
"No test is deleted, skipped or weakened; whole groups move verbatim.",
"A split that separates a group from the testWidgets() calls that implicitly initialised the binding must add TestWidgetsFlutterBinding.ensureInitialized() explicitly to BOTH halves.",
"focus_owner/analysis_options.yaml carries a pre-existing uncommitted change made by someone else and must NOT be staged."
],
"out_of_scope": [
"The Kotlin sources under android/, which are a separate commit.",
"Changing what any test asserts.",
"Committing the unrelated analysis_options.yaml modification."
],
"verifier": "flutter test (expects 94 passed), flutter analyze (expects 'No issues found!'), and check_file_length.sh over focus_owner."
}

View File

@ -1,19 +0,0 @@
{
"title": "Join the enforcement decision to the DPM hide call",
"objective": "The decision layer and setApplicationHidden were both built and tested but never connected: the service logged a tick. Wire them, which requires the decision to exist in Kotlin because a background Service has no Flutter engine. Success is a service that reads the policy, gathers inputs, decides, and applies - with the Kotlin and Dart implementations pinned against the same expectations so they cannot drift.",
"acceptance_criteria": [
"The Kotlin decision mirrors the Dart one case for case, enforced by a test suite that restates the Dart cases",
"That suite is non-vacuous, demonstrated by a deliberate mutation failing the expected test",
"Show is applied before hide, so an interrupted pass leaves access restored rather than removed",
"The launcher, protected prefixes and the app itself are re-checked at the point of use, not only in the policy",
"An unreadable policy yields no decision rather than an empty allowlist, which would hide every app",
"A failure inside a pass still schedules the next run"
],
"out_of_scope": [
"Device Owner provisioning and the factory reset",
"Runtime location permission request - the code reads a fix when granted and fails closed when not",
"Health Connect query implementation",
"On-device verification of a real hide/show pass: NOT COMPLETED this session"
],
"verifier": "JAVA_HOME=/usr/lib/jvm/java-21-openjdk ./gradlew :app:testDebugUnitTest (13 tests); flutter analyze && flutter test (67); a mutation run to prove the Kotlin suite is live"
}

View File

@ -1,17 +0,0 @@
{
"title": "Split DevicePolicyBridge.kt under the 250-line cap",
"objective": "Bring focus_owner/android/.../DevicePolicyBridge.kt (415 lines) under the repo-wide 250-line cap by extracting cohesive method groups into standalone helper classes, without changing DevicePolicyBridge's public API.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists DevicePolicyBridge.kt.",
"Every public method DevicePolicyBridge exposed before the split (isDeviceOwner, isProfileOwner, setApplicationHidden, grantLocationPermissions, enableLocation, isApplicationHidden, isAdminActive, hasAccounts, setSelfUninstallBlocked, isSelfUninstallBlocked, setPackageUninstallBlocked, setAlwaysOnVpn, setPrivateDns, privateDnsHost, setPrivateDnsConfigBlocked, alwaysOnVpnPackage, setVpnConfigBlocked, status, releaseDeviceOwner) still exists on DevicePolicyBridge with the same signature, since MainActivity.kt and EnforcementService.kt call these directly.",
"gradlew compileDebugKotlin --rerun-tasks succeeds with no compile errors.",
"gradlew test --rerun-tasks succeeds with the same test count and zero failures as before the split.",
"No method body logic changed -- only extraction into new files plus delegate wiring."
],
"out_of_scope": [
"Adding new unit tests for DevicePolicyBridge itself (it wraps the Android DevicePolicyManager system service; no prior test existed and none is required for a pure extraction).",
"Touching MainActivity.kt or EnforcementService.kt, whose call sites were verified but not modified.",
"Splitting EnforcementRunner.kt, the other over-cap focus_owner Kotlin file -- separate file, separate task."
],
"verifier": "JAVA_HOME=/usr/lib/jvm/java-21-openjdk ./gradlew compileDebugKotlin test --rerun-tasks (from focus_owner/android), plus bash meta/scripts/check_file_length.sh --all showing DevicePolicyBridge.kt no longer over cap."
}

View File

@ -1,24 +0,0 @@
{
"title": "Prove DPM app-hiding persists, and build the enforcement decision layer on it",
"objective": "The Device Owner design rests on setApplicationHidden surviving a reboot, which had never been tested - both shell primitives were measured to be cleared by one. Prove or disprove that WITHOUT spending a factory reset, then build the decision layer that turns the parsed policy plus current conditions into a hide/show set. Success is a measured persistence result with its scope stated honestly, and a pure, fully tested decision function.",
"acceptance_criteria": [
"setApplicationHidden persistence measured across a real reboot, using a removable managed profile so no wipe is spent",
"The test profile and its profile-owner grant are removed afterwards, with user 0 verified untouched",
"The result is recorded with its scope limit: profile owner in a work profile is NOT device owner in user 0",
"EnforcementDecision is a pure function of its inputs - testable with no device, clock or location provider",
"packagesToShow is always the complete allowed set rather than a delta, so a missed run self-repairs",
"Unknown location enforces rather than releasing, matching focus_daemon.sh",
"A policy with redacted coordinates still enforces rather than reading as always-away",
"Geofence hysteresis prevents flapping between radius and radius+hysteresis",
"The workout exception releases the YouTube packages and nothing else",
"Workout signal sources are verified on-device before being built, not assumed"
],
"out_of_scope": [
"Device Owner provisioning and the factory reset - unchanged, still not done",
"The foreground service, BOOT_COMPLETED receiver and alarm scheduling - next step",
"DNS filtering, which remains parked",
"com.kuhy.workout_app as a signal source: verified to expose nothing readable",
"org.runnerup: not installed on this device"
],
"verifier": "pm create-user/dpm set-profile-owner + adb reboot + dumpsys package, then pm remove-user and re-check user 0; cd focus_owner && flutter analyze && flutter test"
}

View File

@ -1,17 +0,0 @@
{
"title": "Split EnforcementRunner.kt under the 250-line cap",
"objective": "Bring focus_owner/android/.../EnforcementRunner.kt (564 lines) under the repo-wide 250-line cap by extracting cohesive concerns into standalone files, without changing EnforcementRunner's public API or EnforcementRunnerBestTest.kt's direct call to EnforcementRunner.best(...).",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists EnforcementRunner.kt.",
"EnforcementRunner still exposes decide(), apply(decision, bridge), setHomeToCurrentLocation(), hasHomeLocation(), acquireLocation(...), and the companion best(...) with identical signatures, since MainActivity.kt and EnforcementRunnerBestTest.kt call these directly.",
"gradlew compileDebugKotlin --rerun-tasks succeeds with no compile errors.",
"gradlew test --rerun-tasks succeeds with the same test count (40) and zero failures as before the split, with EnforcementRunnerBestTest's 6 tests specifically still passing unmodified.",
"No method body logic changed -- only extraction into new files plus delegate wiring."
],
"out_of_scope": [
"Adding new unit tests for EnforcementRunner's decide()/apply() (they depend on Android system services not unit-testable without instrumentation; no prior test existed for them and none is required for a pure extraction).",
"Touching MainActivity.kt or EnforcementService.kt, whose call sites were verified but not modified.",
"Further splitting the remaining focus_owner Kotlin/Dart files or any of the other 8 files still over the 250-line cap."
],
"verifier": "JAVA_HOME=/usr/lib/jvm/java-21-openjdk ./gradlew compileDebugKotlin test --rerun-tasks (from focus_owner/android), plus bash meta/scripts/check_file_length.sh --all showing EnforcementRunner.kt no longer over cap."
}

View File

@ -1,24 +0,0 @@
{
"title": "focus_owner: correct the geofence input and make every decision explainable",
"objective": "The Device Owner enforcer failed in both directions on the Pixel 6a: nothing blocked at home (a coarse, fuzzed fix read as AWAY and restored the browser) and everything blocked at the office (an empty last-known cache produced LOCATION_UNKNOWN, which applies the identical sweep to AT_HOME). Neither was diagnosable, because logcat rotates and run-as is refused on the release build device owner requires. Success means the geofence classifies correctly from a precise, actively-acquired fix; the phone states on screen why it is enforcing, how far it believes it is from home, whether curfew is active, and which apps are hidden with the reason for each; and a durable in-app record answers the same questions hours later. Play Store and Tachiyomi's per-source extensions become available without weakening the YouTube block.",
"acceptance_criteria": [
"ACCESS_FINE_LOCATION is declared and self-granted by the device owner; on-device dumpsys shows granted=true.",
"Each pass actively acquires a fix inside a location-typed foreground service, bounded by a timeout, and treats a fix older than the freshness window as no fix (fail-closed).",
"The freshness window is strictly longer than the enforcement cadence, so an idle phone does not fall to LOCATION_UNKNOWN every pass.",
"Fix selection gates on freshness first and prefers accuracy only within the fresh set; a recent coarse fix beats an old precise one.",
"LOCATION_UNKNOWN and no-home-configured are each rendered distinctly on screen, never as AT_HOME.",
"Hysteresis widens the threshold only when the previous pass placed the phone inside the fence.",
"A durable, size-bounded record of each pass is written and readable in-app; it never contains latitude or longitude.",
"A malformed or wrong-typed log record is skipped and can never disable the release-device-owner escape hatch.",
"Installing over the app re-arms the alarm chain without the app being opened.",
"YouTube, YouTube Music and Chrome remain hidden in every state including AWAY; Play Store, inFakt, RunnerUp and all installed Tachiyomi packages are available at home.",
"Play Store is allowed by day and hidden during curfew.",
"The generated policy asset reproduces exactly from config.sh with home coordinates redacted."
],
"out_of_scope": [
"Making the DNS/VPN layer actually filter youtube.com. private_dns_host is empty, port 853 is not forwarded, and VPN lockdown bypasses system Private DNS, so a browser still reaches YouTube when AWAY. At home and during curfew every browser is hidden, which is what closes it there.",
"Removing the rooted-era phone_focus_mode shell daemon, which still parses the same config.sh but does not consume the new prefix lists.",
"The unrelated poker-stakes work present in the same working tree."
],
"verifier": "bash ~/.claude/scripts/finish.sh gate (pre-commit + suites); python3 -m pytest python_pkg/focus_policy/tests/ (137); cd focus_owner && flutter analyze && flutter test (94); cd focus_owner/android && JAVA_HOME=/usr/lib/jvm/java-21-openjdk ./gradlew :app:testDebugUnitTest (40); on-device: adb install -r, tap Run enforcement now, read the status card, then adb shell pm list packages -e to confirm the hidden/available sets."
}

View File

@ -1,22 +0,0 @@
{
"title": "Home coordinates out of git, layered workout detection, and removal of the test hook",
"objective": "Give the geofence its anchor without recording where the user lives in the repository, and replace the root-only workout detector with sources an unrooted app can actually read. Success is coordinates living only in app-private storage, a workout signal that fails closed on every path, and the temporary test receiver gone before it can reach a provisioned build.",
"acceptance_criteria": [
"Home coordinates are pushed from the untracked config_secrets.sh to app-private storage; nothing coordinate-shaped enters git",
"The shipped REDACTED_* placeholder is rejected with a message naming the file to fill in, not written as a nonsense coordinate",
"The provisioned file is mode 600 and unreadable by the shell user",
"The staging copy under /data/local/tmp is removed after the transfer",
"A missing, malformed, or out-of-range coordinate file reads as null rather than throwing, so the enforcement layer treats it as location-unknown and fails closed",
"Every workout source fails closed: a throwing or hanging probe reports no workout",
"The manual signal is time-boxed rather than a plain toggle",
"The combined signal can name which source opened the exception",
"HideTestReceiver is absent from the source, the manifest, and the installed APK"
],
"out_of_scope": [
"Device Owner provisioning and the factory reset",
"The Health Connect query implementation - the guarded wrapper exists, the platform call does not yet",
"The foreground service, BOOT_COMPLETED receiver and alarm scheduling",
"com.kuhy.workout_app and org.runnerup as sources: verified unusable and absent respectively"
],
"verifier": "focus_owner/scripts/push_home_location.sh (both the placeholder-rejection and success paths) then --check; adb run-as ls -la to confirm mode 600; adb shell cat to confirm the shell cannot read it; cd focus_owner && flutter analyze && flutter test; rebuild, reinstall, and dumpsys package | grep -c HideTest"
}

View File

@ -1,17 +0,0 @@
{
"title": "focus_owner: keep the unhide path reachable and never hide the enforcer",
"objective": "A Device Owner enforcement pass could put the device into a state it could not leave. Hidden packages drop out of the default PackageManager enumeration, so the allowlist sweep could never see them again and nothing could be un-hidden; and hiding the enforcer itself would take the escape hatch and the trigger with it. Both paths are unrecoverable from the device, so both are closed here.",
"acceptance_criteria": [
"installedThirdPartyPackages() queries with MATCH_UNINSTALLED_PACKAGES so already-hidden packages remain visible to the sweep",
"A pass following one that hid apps reports a non-empty packagesToShow and can restore them",
"The exporter injects the enforcer package into both the day and night allowlists, so the decision layer never proposes hiding it",
"EnforcementRunner keeps the point-of-use skip for its own package, covering a policy asset rendered before this fix or hand-edited",
"python_pkg/focus_policy stays at 100% branch coverage, including the new export behaviour"
],
"out_of_scope": [
"Changing which third-party apps the policy blocks",
"The night-curfew schedule itself",
"Any change to Device Owner provisioning or the escape hatch mechanism"
],
"verifier": "python -m pytest python_pkg/focus_policy --cov=python_pkg.focus_policy (123 passed, 100% branch coverage); on-device: a pass that hid three apps previously reported 'hid 0, restored 0' and left them hidden permanently — see focus_owner/docs/profile-owner-verification-2026-08-09.md"
}

View File

@ -1,19 +0,0 @@
{
"title": "Alarm-driven enforcement service that survives reboot and Doze",
"objective": "Give the enforcement decision a runtime: something that applies it at the moments it can change, survives a reboot, and is not silently deferred by Doze. Success is a service that runs, arms its own next run, fires exactly at scheduled times, and refuses to act when not provisioned rather than failing quietly.",
"acceptance_criteria": [
"The service applies one pass then stops; it is not resident and does not poll",
"Curfew boundaries fire exactly - window=0 in dumpsys alarm, not a multi-minute window",
"A reboot re-arms the schedule even before the user unlocks",
"The service reports and does nothing when neither device owner nor profile owner, rather than failing silently",
"A failure inside a pass cannot stop the next run being scheduled",
"packagesToShow is applied unconditionally each pass so a missed run self-repairs"
],
"out_of_scope": [
"Device Owner provisioning - the service correctly no-ops without it",
"The actual hide/show application: the decision layer and the DPM call both exist, wiring them together is next",
"Location and workout providers - interfaces exist, platform plumbing does not",
"DNS filtering, still parked"
],
"verifier": "adb install + am start; adb logcat for the boot and service lines; dumpsys alarm to confirm window=0 and exactAllowReason; flutter analyze && flutter test"
}

View File

@ -1,22 +0,0 @@
{
"title": "Make the coverage gate read jail_args and refuse a suite that dies partway",
"objective": "Close the two review-found defects that let checks pass more easily than they should: is_covered() ignored the jail_args marker every other consumer reads, and bash's command hash cache made two 'tool is missing' assertions test the opposite of their names.",
"acceptance_criteria": [
"is_covered() reads the jail_args file beside a suite's run_all.sh, the same marker ci_mirror.sh and shell-tests.yml consume, so a suite declares its own mounts in exactly one place.",
"A suite with no jail_args still gets the historical default binds, so nothing that passed before starts failing for lack of a marker.",
"A jail_args that is present but empty is a hard error, never a silent skip.",
"is_covered() passes --fail-on-case-error, so a suite that aborts partway fails the gate rather than being graded on the lines it reached before dying.",
"NEGATIVE CONTROL: stripping the binds a suite needs must make the gate exit non-zero. Before this change both the working and the broken configuration exited 0.",
"dot_resolver_install.sh, which is already off the allowlist, still clears the real gate afterwards -- the campaign's proof that 100% is reachable must survive the stricter check.",
"Every 'tool is missing' assertion genuinely hides the tool: removal clears bash's hash table via a shared _t_unstub helper.",
"No measured coverage figure moves as a result of either fix, and every existing assertion still passes.",
"shellcheck clean with no suppressions; all files within the 250-line cap."
],
"out_of_scope": [
"test_cco_state.sh's removal of beeper.orig: get_real_binary probes with [[ -f ]], which the hash cache does not affect.",
"test_aw_autostart.sh's removal of aw-qt: the assertion runs in a subshell via $status_script, so the parent shell's cache is irrelevant.",
"Arming check_shell_coverage.sh in any hook; that waits for allowlist-zero.",
"The kcov under-report, which is tracked separately in docs/shell-split-verification.md."
],
"verifier": "bash meta/scripts/check_shell_coverage.sh on dot_resolver_install.sh must exit 0; replacing that directory's jail_args with `--bind /etc` alone must make the same command exit non-zero, and restoring it must return exit 0 with an empty git diff --stat. Plus the features/lib runner under --fail-on-case-error reporting zero case failures, and all four features libs re-measured at their pre-change figures."
}

View File

@ -1,18 +0,0 @@
{
"title": "Split generate_study_materials.sh under the 250-line cap with tested libs",
"objective": "Bring linux_configuration/scripts/single_use/utils/generate_study_materials.sh from 1017 lines under the repo-wide 250-line cap by moving its functions and its 335-line top-level block into six sourced libraries, without changing the output it produces for any input it previously handled correctly. File 2 of the Phase 1 queue.",
"acceptance_criteria": [
"The entry script and every lib/study_*.sh and lib/tests/*.sh file is at or under 250 lines.",
"All three generated files stay byte-identical to a golden fixture captured before any edit, verified by sha256sum after every step.",
"verify_shell_split.sh against 08f3c764 reports no function whose body changed; additions are limited to the wrappers introduced around previously top-level code.",
"shell_coverage.sh reports 100% for every lib, or a measured figure with a falsified diagnosis for any shortfall.",
"Any latent defect the tests expose is fixed rather than pinned, and each fix is demonstrated on a fixture that actually triggers it.",
"shellcheck reports zero findings with no suppression added."
],
"out_of_scope": [
"Changing which documentation sites the URL builders point at.",
"Reworking the per-language analysis mode, beyond covering it with tests.",
"The other five files still over the cap."
],
"verifier": "sha256sum -c against the golden fixture plus a stdout diff, bash meta/scripts/verify_shell_split.sh 08f3c764, lib/tests/run_all.sh (166 assertions), bash meta/scripts/shell_coverage.sh lib/tests/run_all.sh <lib> 100 for all six libs, a second fixture with 25 imports and comment lines run at --top 3, shellcheck, and check_file_length.sh --all."
}

View File

@ -1,19 +0,0 @@
{
"title": "Move the YouTube block from the network layer to app hiding",
"objective": "The network layer was demonstrated bypassable on-device: opening RethinkDNS and switching off its blocklists un-blocks YouTube in a few taps, and no Device Owner API can freeze another app's internal settings. App hiding has no such hole -- `pm unhide` throws a SecurityException even from adb shell, and only the device owner can reverse it. Rebase enforcement on an explicit allowlist of the apps that must work, hidden by the home geofence, with the network layer demoted to an explicitly-labelled soft deterrent.",
"acceptance_criteria": [
"WHITELIST and NIGHT_WHITELIST contain exactly the apps the user named, mapped to package ids verified against `pm list packages -3` on the device.",
"Every browser is excluded from both lists, so no link opens while at home.",
"LAUNCHER_PACKAGE names a launcher that is actually installed; the exporter's launcher check passes.",
"The computed hide set is inspected on the PC before any pass runs, and contains no app needed for banking, calls, or SMS.",
"An enforcement pass on the device leaves newly-allowed apps hidden=false and non-allowlisted apps hidden=true.",
"Private DNS ships disabled while its host is unreachable, rather than pinning a resolver that would leave the phone with no DNS."
],
"out_of_scope": [
"Removing the in-app release path. A device owner with no escape hatch turns any single failure into a permanently bricked phone holding the user's banking and mObywatel.",
"VPN lockdown, switched off at the user's request in this pass.",
"Making RethinkDNS's own blocklists unswitchable, which Android provides no mechanism for.",
"Opening a public port for the DoT resolver; the router does not forward 853 and the exposure was reverted."
],
"verifier": "python -m pytest python_pkg/focus_policy/ (130 tests, 100% branch); gradlew :app:testDebugUnitTest; flutter test; the exporter's own launcher/allowlist guards; and on-device `dumpsys package <pkg> | grep hidden=` for both the allowed and the hidden sets after a pass."
}

View File

@ -1,16 +0,0 @@
{
"title": "pacman_wrapper.sh + setup_midnight_shutdown.sh: migrate to guard-lib",
"objective": "Replace the bespoke hosts-guard and shutdown-schedule-guard chattr/bind-mount/systemd-watcher implementations with the new shared guard-lib (~/guard-lib, guardctl) primitives, so multiple projects (screen-locker, steam-backlog-enforcer) stop maintaining parallel copies of the same tamper-resistance mechanism.",
"acceptance_criteria": [
"pacman_wrapper.sh's pre/post hook fallback functions call guard-lib's generic unlock-all/relock-all scripts instead of the old hosts-only ones",
"setup_midnight_shutdown.sh installs and updates its guarded config via guardctl file-guard instead of hand-rolled chattr + systemd unit generation",
"New nsswitch-plugin.sh / resolved-plugin.sh guard hooks exist for the hosts-file guard's dependent configs",
"shellcheck clean on all changed files (pre-existing SC2329/SC2001 warnings in pacman_wrapper.sh fixed alongside, at user's request, even though unrelated to this migration)"
],
"out_of_scope": [
"steam-backlog-enforcer's block-gaming feature (separate repo/commit)",
"guard-lib's own implementation (separate repo/commit)",
"phone_focus_mode, code_tutor, and other unrelated in-progress work present in the working tree"
],
"verifier": "pre-commit run --files linux_configuration/scripts/periodic_background/digital_wellbeing/pacman/pacman_wrapper.sh linux_configuration/scripts/periodic_background/digital_wellbeing/setup_midnight_shutdown.sh linux_configuration/scripts/periodic_background/hosts/guard/plugins/*.sh && live verification via steam-backlog-enforcer's block-gaming test run"
}

View File

@ -1,21 +0,0 @@
{
"title": "Split hosts_enforcer.sh into mount and magisk halves, both tested to 100%",
"objective": "Take hosts_enforcer.sh from 421 lines to under the repo's 250-line cap by extracting its bind-mount logic and its Magisk/cache-invalidation logic into two flat siblings, and cover both at 100%. This is the code that decides whether the DNS blocklist is actually enforced; a probe that reports an OEM overlay as our blocklist means no blocking at all while the status reads green.",
"acceptance_criteria": [
"bash meta/scripts/check_file_length.sh --all no longer lists phone_focus_mode/hosts_enforcer.sh, and no new file is over the cap.",
"shell_coverage.sh reports 100.00% for BOTH hosts_mount.sh and hosts_magisk.sh from the single test entry point.",
"Every assertion is mutation-proofed with zero survivors. A mutation that proves equivalent must be resolved by removing the equivalent code, not by weakening the mutation.",
"Ordering is asserted where it is load-bearing: /system must be remounted ro after rw, and the immutable flag re-set after being dropped.",
"meta/scripts/verify_shell_split.sh reports every function verbatim, except any deliberately changed — for which behavioural equivalence must be demonstrated across every input state.",
"Both new siblings are added to BOTH of deploy.sh's hardcoded lists, and the two lists remain in exact correspondence with no orphan in either direction.",
"shellcheck passes on each touched file individually, with no -x and no disable directive; sh -n passes on all three phone-side scripts.",
"No eval is introduced in test code."
],
"out_of_scope": [
"Deploying to the phone or verifying on-device; there is no device in this session.",
"Splitting verify_and_restore or main out of the entry script, which is under the cap without the two extracted halves.",
"Adding the siblings to deploy.sh's chmod list: they are sourced, not executed, matching dns_iptables.sh, tether_iptables.sh and curfew_net.sh.",
"Changing which domains are blocked or how the canonical blocklist is generated."
],
"verifier": "bash phone_focus_mode/lib/tests/test_hosts_libs.sh (expects 69 passed, 0 failed), plus shell_coverage.sh at 100.00% for hosts_mount.sh and hosts_magisk.sh, plus the mutation run at 17 killed / 0 survived, plus check_file_length.sh --all showing 19 files, plus deploy-list parity showing no orphans, plus pre-commit run --files on the touched files."
}

View File

@ -1,20 +0,0 @@
{
"title": "Split hosts/install.sh under the 250-line cap with its anti-tamper guards fully covered",
"objective": "Bring linux_configuration/scripts/periodic_background/hosts/install.sh from 913 lines under the repo-wide 250-line cap by moving its 712-line top-level block into eight phase functions across six libs, without changing what a real install would do. File 3 of the Phase 1 queue: 13 referencing files and the highest blast radius, since it rewrites /etc/hosts and takes the guard down to do it.",
"acceptance_criteria": [
"Every shell file — entry script, libs and tests — is at or under 250 lines.",
"Each wrapped phase body is byte-identical to its original line range, proven by diff, because end-to-end execution is not available as evidence here.",
"A content comparison against the pre-split file accounts for every absent line as an intentional edit.",
"The 254 custom-blocked domains extracted by the guard are identical before and after the blocklist becomes a data file.",
"Both anti-tamper guards reach 100% line coverage, with both directions of each covered: removal refused / addition allowed for the custom list, growth refused / shrinkage allowed for the whitelist.",
"/etc/hosts is unchanged, verified by sha256sum, and the installer is never run end to end.",
"shellcheck reports zero findings with no suppression added."
],
"out_of_scope": [
"Running the install phases under test, which would rewrite /etc/hosts, unmount the guard's bind mount and restart systemd-resolved.",
"Adding a dry-run or status mode, which would make end-to-end testing possible but is a feature change rather than a split.",
"The SERVICES_ROOT-style path prefix that would make the phases testable; that is a separate follow-up.",
"The three files still over the cap."
],
"verifier": "A per-phase body diff against the pre-wrap file, a line-multiset check for lost content, a diff of the 254 extracted domains, bash meta/scripts/verify_shell_split.sh 241652ca, lib/tests/run_all.sh (36 assertions), bash meta/scripts/shell_coverage.sh on both guards at 100, `bash install.sh --help` compared to pre-split, sha256sum -c on /etc/hosts, shellcheck, and check_file_length.sh --all."
}

View File

@ -1,21 +0,0 @@
{
"title": "i3 bar: add Claude usage block, fix broken icons, remove dead blocks",
"objective": "Surface Claude Code's 5-hour and 7-day rate-limit windows in the i3 status bar, replace Font Awesome private-use-area icon codepoints that render as wrong glyphs (the fonts named in the bar's pango string are not installed), and remove status blocks for hardware/software absent from this desktop.",
"acceptance_criteria": [
"A [claude_usage] block renders '5h NN% · 7d NN%' matching the newest ~/.claude/cache/limit-state/*.json",
"claude_usage degrades safely: stale cache is labelled, a rolled-over window reads '?%' instead of a misleading number, and missing/unparsable data reads 'no data'",
"No script under i3blocks/ contains a private-use-area codepoint (U+E000-U+F8FF) or a \\uEXXX/\\uFXXX escape",
"No literal colour string (e.g. #FF0000) is rendered as visible text in the bar",
"The bluetooth, battery, wifi, activitywatch, warp and network_monitor blocks are absent from the config and their scripts deleted",
"The ethernet block reports the physical NIC's address rather than a docker bridge's permanent 'down'",
"bash linux_configuration/tests/test_i3blocks_efficiency.sh exits 0",
"pre-commit passes on all changed files"
],
"out_of_scope": [
"Editing ~/.config/i3/config or its font line (it has drifted from the repo by three live-only exec lines; the emoji approach avoids needing a font change)",
"Installing a Nerd Font or any new font package",
"Restarting i3 while a fullscreen game session is running",
"Any change to blocks that already render correctly (volume, shutdown_countdown, pc_startup)"
],
"verifier": "bash linux_configuration/tests/test_i3blocks_efficiency.sh; pre-commit run --files <changed>; i3blocks -c ~/.config/i3blocks/config -o i3bar (inspect emitted JSON)"
}

View File

@ -1,17 +0,0 @@
{
"title": "Import media_archive_*.zip snapshots into the dufs cloud and delete the zips",
"objective": "Give a one-command, safe, resumable way to fold the ~/Downloads/media_archive_archive snapshot zips into the self-hosted cloud: extract each, MOVE its media into ~/cloud/Media/YYYY/MM deduplicated against what is already there, and delete the zip only once its media is confirmed in the cloud — so Downloads reclaims the space with no data loss.",
"acceptance_criteria": [
"Each zip's media is moved into ~/cloud/Media/YYYY/MM by original mtime, deduplicated across the overlapping snapshots.",
"A zip is deleted only after its extracted media is verified to have left staging (moved or deduped); on any failure the zip is kept.",
"Staging is on the cloud filesystem so moves are atomic renames, not copies.",
"Only media is handled; the archives were verified to contain no non-media files, so nothing else is lost.",
"After the run the archive directory is empty and removed, and Downloads has reclaimed the space."
],
"out_of_scope": [
"Non-media file handling (none exist in these archives)",
"Full-content-hash dedup (organizer uses name+size within a date bucket)",
"Keeping the zips (explicitly deleted per user request)"
],
"verifier": "shellcheck; single-zip live test on a throwaway copy; full run over 44 zips (44 imported+deleted, 0 kept; 2412 duplicates dropped on the near-duplicate 13.7 GB snapshot; cloud Media 4.9->19 GB / 2949 files; archive dir removed); documented in docs/superpowers/evidence/import-media-archives-2026-07-12.json"
}

Some files were not shown because too many files have changed in this diff Show More