Rotate TODO to step 8; note complexity linters clean (step 7 done)

Refactor step 7 is complete: the whole golangci-lint run is 0 issues.
MEMORY.md updated to reflect the complexity linters are enabled and
clean.
This commit is contained in:
2026-07-22 22:18:11 +07:00
parent 5b7e258195
commit ad098f9d99
2 changed files with 32 additions and 21 deletions

40
TODO.md
View File

@@ -29,13 +29,27 @@ Refactor ground rules:
# Next Step
Refactor step 7: effects dispatch — the giant quaff/readScroll/doZap
switches become per-kind handler tables of small named methods,
keeping effect order and RNG call sequence identical. This step also
clears the outstanding cyclop/gocognit/nestif lint findings.
Refactor step 8: constructor and style pass per the house styleguide —
game.New(game.Params{...}) replacing NewGame(Config); replace the
gameEnd panic unwind with error-based turn results where feasible;
77-column wrap sweep.
# Completed Steps
- 2026-07-07 Refactor step 7 (refactor/effects-dispatch): effects
dispatch tables plus a full decomposition sweep — the quaff /
readScroll / doZap switches, the attack monster-power switch, the
be_trapped switch, the daemon d_func switch, and the command-key
switch all became handler tables on gameData (quaffHandlers,
readHandlers, zapHandlers, hitHandlers, trapHandlers, daemonHandlers,
commandHandlers), one small named method per case. Every remaining
cyclop/gocognit/nestif hot spot was split into named helpers across
fight, misc (look), command, chase, move, passages, options, pack,
things, save, daemons, rooms, score, monsters, rings, rip, io,
object, weapons, wizard, and term/tcell, plus three test functions.
Effect order and RNG call sequence preserved throughout; the whole
golangci-lint run is now 0 issues.
- 2026-07-07 Refactor step 6 (refactor/god-object-extraction):
MessageLine (was MsgLine) owns the msg/addmsg/endmsg machinery,
wired to its screen/look/input needs via attach(); RogueGame keeps
@@ -128,27 +142,23 @@ clears the outstanding cyclop/gocognit/nestif lint findings.
# Future Steps
1. Refactor step 8: constructor and style pass per the house
styleguide — game.New(game.Params{...}) replacing NewGame(Config);
replace the gameEnd panic unwind with error-based turn results where
feasible; 77-column wrap sweep.
2. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
1. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
post-refactor names; add the C name → Go name rename table.
3. Playtest hardening pass: play several full games with the tcell
2. Playtest hardening pass: play several full games with the tcell
binary and extend run_test.go to script a deeper multi-level
playthrough (descend past level 5, use potions, scrolls, zapping,
save/restore). Fix any panics, message mismatches, or divergences
from the C behavior that this uncovers, with regression tests.
4. Verify the seed-compatibility claim against the C reference on
3. Verify the seed-compatibility claim against the C reference on
c-master: same seed, same dungeon, same item tables, for several
seeds.
5. Broaden unit test coverage where playtesting finds thin spots
4. Broaden unit test coverage where playtesting finds thin spots
(rings, sticks, wizard commands).
6. Tag a release once a full game (Amulet retrieval and score entry)
5. Tag a release once a full game (Amulet retrieval and score entry)
completes without defects.
7. Full-terminal-size support (deferred by explicit decision
6. Full-terminal-size support (deferred by explicit decision
2026-07-06): per-game dungeon dimensions instead of the 80x24
constants; open design questions are resize policy, gameplay
tuning at larger sizes, and a --classic 80x24 mode.
8. Note: this repo is exempt from the standard policy scaffold. Do not
7. Note: this repo is exempt from the standard policy scaffold. Do not
add Makefile, Dockerfile, or REPO_POLICIES.md.