app/main.py | API endpoints, request routing and dashboard serving. | Add authentication, authorization, rate limits and request correlation IDs. |
app/schemas.py | Validate required request fields and allowed value ranges. | Use explicit business rules and reject ambiguous or incomplete requests. |
app/matcher.py | Compare request attributes against approved historical patterns. | Calibrate thresholds on labelled examples; monitor false matches and drift. |
app/adapters.py | Demo query drafting, sample audience preview and request-board payload. | Replace placeholders with approved LLM, warehouse and Monday.com adapters. |
app/sql_guardrails.py | Basic static checks for the generated SQL draft. | Static checks are not a security boundary; enforce read-only access and table allowlists at the data platform. |
data/historical_requests.json | Stores example approved request patterns and templates. | Version templates, track owners/approvals, and avoid storing sensitive audience data. |
data/audit_log.jsonl | Records request status, match result and preview details. | Use durable, access-controlled logging with retention and privacy controls. |