Files
periscope/.cursor/rules/10-architecture.mdc
T
michele 0533d4ebd2 Add Periscope Cursor engineering constitution and always-on rules.
Docs-only: master CODING_CONSTITUTION plus seven .mdc splits. Git policy is
phase = test then commit+push; deploy only after a macro-phase.
2026-09-20 18:06:00 +02:00

28 lines
1.5 KiB
Plaintext

---
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.