Findings F-6 + F-9b of the "Brownfield CLI/TUI Refactor Assessment" (local report, gitignored under _bmad-output/implementation-artifacts/).
Evidence
pyproject.toml has NO [tool.ruff.lint] table, so local ruff runs default rules while CI's trunk runs ruff + black + isort + bandit. Local green ≠ CI green.
- ~72
# noqa comments across src/ include codes (BLE001, S105/S106, …) the local config never enables — a known false-positive class from past reviews. (The 63 except Exception sites are annotated seam translations by design — only their noqa-code audit belongs here.)
- F-9b (folded in): 5 scattered
BMAD_LOOP_* env reads — engine.py:2504 (BMAD_LOOP_SESSION_TIMEOUT_S), adapters/multiplexer.py:417,476 + cli.py:621 (BMAD_LOOP_MUX_BACKEND), process_host.py:394 (BMAD_LOOP_PROCESS_HOST) — undiscoverable and undocumented.
Recommendation
Lint alignment PR:
- Determine what rule set trunk's ruff actually enforces (check
.trunk/ config and trunk's ruff defaults — verify against current trunk/ruff docs, don't assume).
- Add
[tool.ruff.lint] select mirroring that — do NOT ratchet stricter than CI.
- Run ruff clean: fix cheap violations, per-rule ignores with reasons otherwise.
- Audit all noqa comments — delete stale ones whose codes still aren't enabled, keep and verify the rest.
Env-var registry PR (small, independent): create a ~30-line module (e.g. src/bmad_loop/envvars.py) with named typed readers for the three vars; update the read sites to go through it (re-grep, lines will have drifted); add a doc table of supported env vars where operator docs live. Semantics identical — tests must not need changes beyond import paths. Terse CHANGELOG line for the env-var docs.
Ordering
Sessions 11-12 of the refactor program. The lint PR assumes the verify.py-split re-exports exist (it must not delete them).
Traps
- ruff F401 autofix silently DELETES re-exports (
cli.py:42-56, plus the verify.py/install.py/runsetup.py re-exports from earlier sessions) — run trunk check --no-fix and diff-review any autofix before accepting.
Findings F-6 + F-9b of the "Brownfield CLI/TUI Refactor Assessment" (local report, gitignored under
_bmad-output/implementation-artifacts/).Evidence
pyproject.tomlhas NO[tool.ruff.lint]table, so local ruff runs default rules while CI's trunk runs ruff + black + isort + bandit. Local green ≠ CI green.# noqacomments acrosssrc/include codes (BLE001, S105/S106, …) the local config never enables — a known false-positive class from past reviews. (The 63except Exceptionsites are annotated seam translations by design — only their noqa-code audit belongs here.)BMAD_LOOP_*env reads —engine.py:2504(BMAD_LOOP_SESSION_TIMEOUT_S),adapters/multiplexer.py:417,476+cli.py:621(BMAD_LOOP_MUX_BACKEND),process_host.py:394(BMAD_LOOP_PROCESS_HOST) — undiscoverable and undocumented.Recommendation
Lint alignment PR:
.trunk/config and trunk's ruff defaults — verify against current trunk/ruff docs, don't assume).[tool.ruff.lint] selectmirroring that — do NOT ratchet stricter than CI.Env-var registry PR (small, independent): create a ~30-line module (e.g.
src/bmad_loop/envvars.py) with named typed readers for the three vars; update the read sites to go through it (re-grep, lines will have drifted); add a doc table of supported env vars where operator docs live. Semantics identical — tests must not need changes beyond import paths. Terse CHANGELOG line for the env-var docs.Ordering
Sessions 11-12 of the refactor program. The lint PR assumes the verify.py-split re-exports exist (it must not delete them).
Traps
cli.py:42-56, plus theverify.py/install.py/runsetup.pyre-exports from earlier sessions) — runtrunk check --no-fixand diff-review any autofix before accepting.