refactor: fix remaining readability items from REFACTOR.md

- parser: replace fragile match.groups()[1:] generator with explicit
  match.group(3)/match.group(4) (C1)
- parser: use lazy logger.debug("%s", ...) instead of eager f-string (C2)
- legacy: standardise stat check to os.stat().st_mode attribute form (C4)
- api: remove what-not-why comment from load_env (C7)
