Step 2: Plan the Energy Monitor
We run the plan command:
/auro.planThe agent reads the charter and generates charters/1-energy-monitor/plan.md.
Technical Context
Section titled “Technical Context”Language: TypeScript 5.4Dependencies: React 18, Vite, Express, better-sqlite3, Chart.jsStorage: SQLite (single file, no server needed)Testing: Vitest + Testing LibraryPlatform: Web browser + Node.js serverType: Full-stack web dashboardPerformance: < 200ms API response, < 2s real-time updateConstraints: Runs on a single Raspberry PiScale: Single household, ~1 reading per secondConstitution Check
Section titled “Constitution Check”| Gate | Status | Notes |
|---|---|---|
| Simplicity (VII) | PASS | 2 projects (backend + frontend), under the 3 limit |
| Anti-Abstraction (VIII) | PASS | Using better-sqlite3 directly, no ORM layer |
| Integration-First (IX) | PASS | Contracts defined for all API endpoints |
Data Model (data-model.md excerpt)
Section titled “Data Model (data-model.md excerpt)”Reading - id: integer, primary key - timestamp: datetime, indexed - value_kw: float, required - created_at: datetime
AlertConfig - id: integer, primary key - threshold_kw: float, required - updated_at: datetimeAPI Contracts (contracts/ excerpt)
Section titled “API Contracts (contracts/ excerpt)”GET /api/readings?from=&to= Response: { readings: [{ timestamp, value_kw }] }
GET /api/readings/current Response: { timestamp, value_kw }
GET /api/alerts/config Response: { threshold_kw }
PUT /api/alerts/config Body: { threshold_kw } Response: { threshold_kw }All gates pass. On to Step 3: Tasks.