--- alwaysApply: true --- # Periscope Cursor Engineering Rules Mandatory for every Cursor agent working on Periscope. This section is copied from `docs/development/CODING_CONSTITUTION.md` and must not contradict that master. ## 1. Architecture Three layers: | Layer | Location | Purpose | | --- | --- | --- | | Core | `backend/periscopex/` (native under `periscope/src` when split) | Models, parsers, graph, validator, passives, taxonomy, derating | | Backend | `backend/` | FastAPI, pipeline, SSE, storage | | Frontend | `frontend/` | Next.js app: dashboard, progress, report, derating, admin | Physical split (when present): `periscope/src` = Periscope; `periscope/dependency` = inherited PinScope in-tree. Docker copies dependency then src so native files win **only when they are real replacements**, not stamped copies. Import switch rule: keep calling `dependency/` until pytest + deploy smoke pass for that slice, then switch imports. Fail-soft: if verification fails, leave the inherited path. Netlist is a queryable bipartite graph (components + nets). Deterministic checks beat heuristics. Finding normalization is downgrade-only. Cross-IC excerpt budget is global plus per-neighbor. Content-addressed datasheets live under `library/datasheets/`. DigiKey matches exact MPN only. Value-string passives stay per-project, never the shared library. Do not add auth, billing, or extra services unless the task needs them. Do not add a second frontend component library.