book-lamp-development
Installation
SKILL.md
Book Lamp Development Skill
This skill provides comprehensive guidelines for developing, maintaining, and extending the Book Lamp application.
Core Philosophy
Following the Python Architecture Tutor principles, we prioritise clarity, readability, and explicit structure:
1. Layered Architecture (Separation of Concerns)
The project is structured into distinct layers to separate business logic from external side effects:
- Models/Entities: Pure data structures (e.g., book dictionaries with defined keys).
- Adapters (Persistence): Isolated in
book_lamp/services/.GoogleSheetsStorageis our primary adapter for Google Sheets. - Service Layer: Pure logic that sits between entry points and adapters (e.g.,
book_lookup.py). - Entry Points: Flask routes in
app.pyand CLI commands.
2. Pure vs. Effectful Separation
- Pure Code: Logic should be deterministic. It should not perform I/O or rely on system time directly.
- Effectful Code: All I/O (Google Sheets API, network, filesystem, time) must be isolated at the edges in adapter classes or functions.
- Dependency Injection: Inject adapters into logic or entry points to keep them decoupled.