Skip to content

P3.0: all four verticals as declarative kits - #22

Merged
ocularminds merged 1 commit into
masterfrom
p3.0-vertical-kits
Aug 17, 2026
Merged

ocularminds merged 1 commit into
masterfrom
p3.0-vertical-kits

Conversation

@ocularminds

Copy link
Copy Markdown
Owner

Roadmap item

P3.0 — Phase 3 opens the way the roadmap always insisted: verticals are data, never forks. All four ship at once; the pilot choice becomes an activation + hardware decision.

What a kit is

  • Metric catalog: snake_case types with units and typical ranges (drives simulators and dashboards)
  • Labeled rule pack: operations language, not comparisons — 'Bin needs collection', 'Frost risk', 'ISO 10816 zone D — investigate', 'Pump possibly dry-running'
  • Field notes: the roadmap's watch-outs, including the water-actuation safety boundary

Mechanics

  • GET /kits, GET /kits/:key; POST /admin/sites/:id/apply-kit instantiates the pack per site, idempotent on exact (metric, op, threshold) duplicates — a coarser dedupe was caught by the test suite shadowing a kit rule behind an unrelated threshold
  • Rules gain human labels (migration 011), surfaced in alerts
  • A templated Grafana dashboard (metric/site variables) serves any vertical — no per-vertical dashboard forks either
  • Simulator CLI: npm run simulate -- --kit waste --site 1 --admin $TOKEN --breach enrolls a virtual sensor and streams signed random-walk readings — pilots rehearse before hardware exists; three concurrent runs = M3's '3 nodes' simulated

Verification

  • 59/59 tests: kit/metric referential consistency, sim-walk clamping, apply-kit idempotency incl. the threshold-dedupe fix, and a waste-kit rule firing end to end with its label on the alert
  • Live 3-node simulator demo was prepared but the local Docker daemon went away mid-run; it's a one-command rerun once the stack is up (feature itself is fully pipeline-verified in tests)

🤖 Generated with Claude Code

- server/src/kits/: agriculture, waste, factory, water as data — metric
  catalogs (snake_case types, units, typical ranges), labeled default
  rule packs ('Bin needs collection', 'ISO 10816 zone D — investigate',
  'Pump possibly dry-running'), cadence/connectivity, field notes
  (incl. the water-actuation safety boundary)
- GET /kits + GET /kits/:key; POST /admin/sites/:id/apply-kit
  instantiates a kit's rules for a site, idempotent on exact
  (metric, op, threshold) duplicates
- rules gain human labels (migration 011), surfaced in alert listings
- templated 'Vertical Kit' Grafana dashboard (metric + site variables,
  latest-per-device table, labeled alerts) serves any vertical
- simulator CLI (npm run simulate -- --kit <key> --site <id> --admin
  <token> [--breach]): enrolls a virtual sensor and streams plausible
  random-walk readings so pilots rehearse before hardware exists

Tests: 59 — kit/metric consistency, sim walk clamping, kit apply
idempotency, and a waste-kit rule firing end to end with its label.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ocularminds
ocularminds merged commit 2150fb0 into master Aug 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant