Files
librofm-downloader/.pi/agent/AGENTS.md
T
AlexKucera 25ee66b95d feat(downloader): add path resolution and sanitization (closes #4)
Add pure-logic downloader module with Book dataclass, filesystem-safe
path component sanitization, default conditional path patterns, custom
{TOKEN} pattern substitution, and subdirectory decision logic.

- sanitize(): 5-rule pipeline — colon→dash, strip illegal/control chars,
  trim whitespace, remove trailing dots, cap at 255 characters
- resolve_path(book, pattern?): default mode selects pattern by series
  presence; custom mode substitutes 11 tokens with sanitization
- needs_subdirectory(book): True when PDF extras or cover art present
- @dataclass(frozen=True) Book: immutable record for all book metadata

56 new tests across 11 classes. 97 total tests passing. 16/16 AC met.
2026-06-03 12:03:00 +02:00

959 B

Agent Instructions

Session Logs

Session logs are written to docs/devlog/ after each completed task, issue fix, or milestone. They capture what was done, decisions & rationale, gotchas & fixes, and next steps. Before starting a new session, read the previous session logs.

Date Type File Summary
2026-06-03 slice 20260603-slice-3a-path-resolution-and-sanitization-issue4_log.md Issue #4 Complete: Path resolution + sanitization + Book model + custom patterns. 56 new tests, 97 total · 16/16 AC
2026-06-03 issue 20260603-project-scaffolding-and-config-module-issue2_log.md Issue #2 Complete: pyproject.toml + venv + config module (load/merge/validate) + 25 tests. 11/11 AC met