Sentinel
Ops Intelligence Dashboard — a unified interface for active ecosystem monitoring with predictive compliance. Combines drift prediction, circuit breaker health monitoring, and compliance verification into a single pane of glass for tracking Aloysius Productions system health.
Overview
Sentinel synthesizes monitoring capabilities extracted from multiple existing apps into one dashboard:
- ComplianceChecker — Validates 6 required ops-core management and GitHub files per repo
- HealthMonitor — Service health checks with circuit breaker pattern (3 failures to open, 30s cooldown)
- DriftPredictor — Monte Carlo compliance decay simulation with 3 risk profiles and black swan events
The project is in staging/ and currently implements the logic layer (19+ tests passing) with simulated data. No UI is built yet. When live data mode is enabled, it will connect to real filesystem ops-core data, GitHub API, and Linear API.
The app practices self-monitoring (dogfooding): when running in live mode, Sentinel must include itself in compliance, health, and drift snapshots.
Tech Stack
| Technology | Version | Purpose |
|---|---|---|
| React | ^19.0.0 | UI framework |
| TypeScript | ^5.6.0 | Type safety, strict mode |
| Vite | ^7.3.1 | Build tool and dev server |
| Vitest | ^4.0.18 | Test runner with V8 coverage |
| Zod | ^3.23.8 | Runtime schema validation |
| Node.js | >=18.0.0 | Runtime (ESM modules) |
| @ap/eliza-engine | file:../eliza-engine | Decision support (integrated) |
Architecture
src/
├── modules/
│ ├── compliance/ ComplianceChecker — ops-core file validation
│ ├── forecast/ DriftPredictor — compliance decay prediction
│ └── health/ HealthMonitor — service health + circuit breaker
├── types/ Shared type definitions
└── index.ts Barrel exports
Key Architecture Decisions
| Decision | Rationale | Status |
|---|---|---|
| React 19 + TypeScript + Vite | Modern toolchain for rapid dashboard development | Implemented |
| Monte Carlo drift prediction (Aura) | Quantified uncertainty for system state monitoring | Integrated |
| Circuit breaker pattern (stock-art-collector) | Proven fault tolerance visualization | Imported |
| Compliance checker (TeachersPet) | Automated governance monitoring | Integrated |
| Zod runtime schemas | Enforce API contracts at runtime; validate live payloads at boundaries | Implemented |
| Server-side bearer tokens | Move auth enforcement from client to server; remove secrets from client env | Implemented |
| Data source abstraction + env validation | Prepare secure switch between demo and live data (VITE_DATA_SOURCE) | Implemented |
| API versioning + contract tests | Prevent breaking changes; document compatibility via mock API | Implemented |
| CSP headers + threat model | Define security posture; document attack surface and mitigations | Implemented |
| Error reporting sink + batching | Centralized error collection; client-side batching; privacy-preserving | Implemented |
| HTTP retry policy (no 4xx retry) | Avoid retrying client errors; focus retries on transient failures | Implemented |
| CI gates (type-check + tests + lint) | Ensure baseline quality before merge | Implemented |
| Coverage thresholds + correlation IDs | Enforce test rigor and improve observability | Implemented |
| Core-logic coverage scoping | Ensure measurable coverage without UI harness | Implemented |
Reusable Patterns Established
| Pattern | Description | Reusable? |
|---|---|---|
| Dashboard aggregation | Multi-module synthesis into single interface | Yes |
| Drift prediction visualization | Monte Carlo probability display for uncertainty | Yes |
| Circuit breaker status display | Real-time health monitoring for distributed services | Yes |
| Compliance verification UI | Automated checklist with pass/fail status | Yes |
Environment Configuration
| Variable | Default | Purpose |
|---|---|---|
VITE_DATA_SOURCE | demo | demo or live |
VITE_API_BASE_URL | — | Required when VITE_DATA_SOURCE=live |
VITE_API_CORRELATION_HEADER | x-correlation-id | Optional correlation ID header name |
Current Status
v0.1 — Logic layer complete. All service modules implemented and tested. No UI built yet.
- CI/CD: Configured with type-check, tests, and lint gates
- Test Coverage: Integration + retry boundary tests passing
- Compliance: Full — all ops-core items satisfied
- Zone:
staging/— not yet promoted toapps/ - Port: 3140 (registered in ops-core registry)
- Open:
@ap/pipelineand@ap/source-adapterplanned integrations not yet installed
Source Lineage
Extracted from the Compliance Dashboard, Aura (drift prediction), stock-art-collector (circuit breaker pattern), and TeachersPet (compliance checker).
See Also
- Aura — Source of the Monte Carlo drift prediction module
- stock-art-collector — Source of the circuit breaker pattern
- Tech Stack — React + Vite stack documentation for the org
- Project Status — Org-wide project tracking