Skip to content

Step 2: Plan the Energy Monitor

We run the plan command:

/auro.plan

The agent reads the charter and generates charters/1-energy-monitor/plan.md.

Language: TypeScript 5.4
Dependencies: React 18, Vite, Express, better-sqlite3, Chart.js
Storage: SQLite (single file, no server needed)
Testing: Vitest + Testing Library
Platform: Web browser + Node.js server
Type: Full-stack web dashboard
Performance: < 200ms API response, < 2s real-time update
Constraints: Runs on a single Raspberry Pi
Scale: Single household, ~1 reading per second
GateStatusNotes
Simplicity (VII)PASS2 projects (backend + frontend), under the 3 limit
Anti-Abstraction (VIII)PASSUsing better-sqlite3 directly, no ORM layer
Integration-First (IX)PASSContracts defined for all API endpoints
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: datetime
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.