# Changelog All notable changes to **tasplanning.report** are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) — versioning is [Semantic Versioning](https://semver.org/). --- ## [Unreleased] ### Changed - Telemetry inserts in `/ask` moved to FastAPI `BackgroundTasks` — no longer blocks the response - Extracted shared `_log_ask()` helper, removing duplicated insert logic between GET and POST handlers - Qdrant collection availability now verified at startup with `@app.on_event("startup")` - Ollama inference parameters (`num_ctx`, `num_predict`, `temperature`) now configurable via env vars `OLLAMA_NUM_CTX`, `OLLAMA_NUM_PREDICT`, `OLLAMA_TEMPERATURE` ### Fixed - Added missing SQLite indexes on `ask_logs.ts`, `ask_logs.normalized`, and `feedback.ts` — improves dashboard query performance as the DB grows --- ## [1.1.0] — 2026-03-27 ### Added - **BYOK (Bring Your Own Key)** — `context_only` mode on `/ask` returns RAG context and a pre-built prompt so the browser can call an external LLM directly (Anthropic, OpenAI, xAI Grok, local Ollama) - `byok-settings.php` — provider and API key management UI; keys stored in `localStorage` only, never sent to the server - `_bootstrap.php` — shared PHP bootstrap for common config/auth helpers - `design-tokens.css` — extracted CSS custom properties into a standalone shared token file - `limiter.py` — extracted `slowapi` rate limiter into its own module to avoid circular imports between `app.py` and `telemetry.py` - `telemetry.py` refactored as a standalone FastAPI `APIRouter` — browser-side events (`page_view`, `byok_call`, `error`) logged to `events` table - `/feedback` endpoint — stores thumbs-up/down ratings with query, answer, model, scope, and cited sources - `/councils` endpoint — returns sorted list of indexed council names from Qdrant payload - Scope-aware retrieval: `state_plus_local`, `state_only`, `local_only`, `any` - NCC and Australian Standards optional inclusion (`include_ncc`, `include_standards` params) - `section_id` parameter on `/ask` — triggers section-specific output format guides for planning report generation - DEMO token gate — optional `DEMO_REQUIRE_TOKEN` / `DEMO_TOKEN` env vars for API gating during early access - Rate limiting via `slowapi`: 20/min on `/ask`, 60/min on `/feedback` and `/telemetry` - `dashboard.php` — internal query monitoring dashboard with IP-based access control - `CLAUDE.md` — full project context document for AI-assisted development ### Changed - `app.py` fully rewritten: RAG pipeline, prompt structure, Qdrant filter builders, admin endpoints, and telemetry all consolidated - CORS now accepts explicit origin list from `CORS_ORIGINS` env var; wildcard fallback uses `tasplanning.report` subdomain regex - `ollama_chat()`: `keep_alive=-1` enforced as top-level JSON key (not inside `options`) to prevent model unloading between requests - `num_ctx` fixed at 6144 to avoid KV cache resize on every request - Dashboard restricted to allowlisted IPs via `.htaccess` rewrite rules - `site-report.php` — Google Maps key loaded via `/gmaps-key.php` proxy instead of inline - `byok-settings.php`, `faq.php`, `dashboard.php` updated to use `design-tokens.css` - `generate_planning_report.php` — CORS origin validation tightened ### Removed - `app(1).py` and `telemetry(1).py` — legacy duplicate files removed --- ## [1.0.0] — Initial release ### Added - FastAPI backend with RAG pipeline: Ollama embeddings → Qdrant vector search → Ollama LLM - Qdrant vector database with `planning_docs` collection; chunks keyed by `corpus`, `council`, `source_file`, `page` - PHP/Apache frontend served from `public/` - `local_state-planning-scheme.php` — two-panel chat assistant UI (sidebar + thread) - `site-report.php` — property lookup with Google Maps PlaceAutocomplete and LIST/ArcGIS integration - `index.php` — landing page with demo modal and waitlist form - `faq.php`, `privacy.php`, `terms.php` — supporting pages - `waitlist.php` — PHPMailer-backed waitlist signup endpoint - `gmaps-key.php` — Google Maps API key proxy (validates `HTTP_HOST` before serving key) - `/js/api-status.js` — shared live API health indicator polling `/readyz` - SQLite telemetry database (`telemetry.db`) with `ask_logs`, `feedback`, `events` tables - IP anonymisation via HMAC-SHA256 (`TPR_IP_SECRET`) - Docker Compose stack: `qdrant`, `backend`, `web`, `sqliteweb`, `composer` services - Ollama on Windows host (`RTX 4070 Super`) with `llama3.1:8b-instruct-q4_K_M` and `nomic-embed-text` ## [0.9.0] - 2026-03-27 ### Added - Initial stable release of the Property Report LLM system - Core LLM integration for planning scheme query handling - Structured response formatting for planning data outputs - Docker Compose setup for containerized deployment - Reverse proxy compatibility (Nginx Proxy Manager support) - Basic project documentation and setup instructions ### Changed - Refined prompt handling for more accurate planning scheme responses - Improved container configuration for stability and restart behavior ### Fixed - Resolved initial configuration inconsistencies in environment variables --- ## [0.2.0] - 2026-03-20 ### Added - Extended query handling for planning-related questions - Support for multiple document inputs and structured analysis - Improved error logging within container environment ### Changed - Updated Docker Compose configuration for better service separation - Optimized LLM response formatting for clarity and consistency ### Fixed - Fixed issues with dependency installation in container builds - Corrected volume configuration warnings --- ## [0.1.1] - 2026-03-18 ### Fixed - Minor bug fixes in Docker setup - Corrected environment variable loading issues - Addressed startup timing issues between services --- ## [0.1.0] - 2026-03-15 ### Added - Initial project scaffolding - Basic LLM query interface - Docker-based development environment - Preliminary planning scheme data integration --- ## Versioning Notes - MAJOR: Breaking changes or major architectural updates - MINOR: New features or significant improvements, backward compatible - PATCH: Bug fixes and small adjustments