# Engineering & Scraping Guidelines ## 1. Git Commit & Repository Hygiene - **Conventional Commits:** Write clear, concise commit messages prefixed with standard types (e.g., `feat:`, `fix:`, `refactor:`, `docs:`). - **Exclude Transient Artifacts:** Never stage or commit generated debug files (e.g., `src/*.html`, `src/*.png`, large logs) to version control. Always maintain `.gitignore` to keep git packs lean and prevent remote unpacker errors on Gitea/GitHub. ## 2. Web Scraping & DOM Inspection Strategy - **Rendered DOM Dumping for Debugging:** When debugging extraction failures on dynamic or anti-bot protected pages: - Capture the post-render HTML via `await page.content()` and save it to `src/hotel-debug.html`. - Capture a synchronized screenshot (`src/hotel-debug.png`). - Inspect the raw rendered DOM to verify if the page was served as standard SSR, an A/B test SPA variant, or intercepted by a challenge (e.g. AWS WAF). - **Multi-Tier Extraction Hierarchy:** Always implement fallbacks in this order: 1. **Deep JSON-LD Parsing:** Traverse all `