Repository navigation
P3.0: all four verticals as declarative kits - #22
Merged
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Mechanics
GET /kits,GET /kits/:key;POST /admin/sites/:id/apply-kitinstantiates 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 thresholdnpm run simulate -- --kit waste --site 1 --admin $TOKEN --breachenrolls a virtual sensor and streams signed random-walk readings — pilots rehearse before hardware exists; three concurrent runs = M3's '3 nodes' simulatedVerification
🤖 Generated with Claude Code