Wraps the FSM step stream in a Stone-boundary envelope so the trace
UI can render the four data-Stones + Capstone as collapsible parent
nodes around their atomic specialist calls.
web/main.py
Adds _STEP_TO_STONE mapping FSM step names to Stone groups, plus
_STONE_META (NAME / TAGLINE / DESCRIPTION) drawn straight from the
app/stones modules so taglines stay single-source.
The /api/agent/stream event_stream() now tracks the current Stone
and emits:
- stone_start when the first step of a new group fires (or when
the first reconcile token arrives, opening Capstone before the
FSM's reconcile step event lands at the end);
- stone_done when the next group opens, the pipeline completes
(final), or it terminates without a final.
Ancillary steps (geocode, rag_granite_embedding, gliner_extract,
nta_resolve) flow through without opening a Stone — they're
orientation / policy infrastructure shared across Stones.
web/static/a…
Wraps msradam/Granite-TTM-r2-Battery-Surge — Apache-2.0 fine-tune of
ibm-granite/granite-timeseries-ttm-r2 trained on AMD MI300X via AMD
Developer Cloud. Test MAE 0.1091 m on held-out 2023-2024 windows
(-41% vs persistence, -25% vs zero-shot TTM r2).
app/live/ttm_battery_surge.py
fetch() pulls the trailing 1024 h of hourly verified water level +
harmonic tide predictions from NOAA station 8518750 (The Battery),
computes surge residual, runs the fine-tuned TTM, and returns the
96 h forecast plus peak-residual / peak-time scalars the reconciler
can paraphrase. Gated by RIPRAP_TTM_BATTERY_SURGE_ENABLE.
app/fsm.py
New @action step_ttm_battery_surge wired into build_app's actions
dict next to the existing TTM specialists. Plumbed through
step_reconcile reads, the snap dict, run() output, and
iter_steps' final-state dict so the SSE stream surfaces the new
state key end-to-end.
app/reconcile.py
build_documents() emits a `ttm_battery` doc in…
Stones C5: upgrade prithvi_live to NYC-Pluvial v2 fine-tune
Switches the live Sentinel-2 segmentation specialist from the
Sen1Floods11 base (`ibm-nasa-geospatial/Prithvi-EO-2.0-300M-TL-
Sen1Floods11`, test flood IoU ~0.10 on NYC chips) to the NYC-specialized
fine-tune (`msradam/Prithvi-EO-2.0-NYC-Pluvial`, test flood IoU
0.5979 — 6x lift). Same input/output contract; doc_id `prithvi_live`
unchanged so reconciler citations and frontend chips stay stable.
Loader is now flexible across two artifact shapes:
v2 (default): Lightning ckpt restored via
SemanticSegmentationTask.load_from_checkpoint. Probes
best_val_loss.ckpt / model.ckpt / last.ckpt then walks for any
*.ckpt in the snapshot.
v1 (fallback): raw .pt + config.yaml via
LightningInferenceModel.from_config — the original code path,
kept so RIPRAP_PRITHVI_LIVE_REPO=ibm-nasa-geospatial/... still
works for A/B comparisons.
Either path resolves the inference helper from BASE_REPO (only the
IBM-NASA repo ships inference.py).
Reconciler doc body now credits the v2 li…
Stones C4: wire TerraMind-NYC LULC + Buildings into FSM
Adds three new Burr actions in app/fsm.py (gated behind
RIPRAP_HEAVY_SPECIALISTS):
step_eo_chip -> writes eo_chip (S2L2A + S1RTC + DEM)
step_terramind_lulc -> writes terramind_lulc
step_terramind_buildings-> writes terramind_buildings
eo_chip is a per-query cache: one ~150 MB Sentinel-2/1/DEM fetch from
Microsoft Planetary Computer, shared by both TerraMind specialists so
they don't each refetch. The cache lives in app/context/eo_chip_cache.py
and gracefully no-ops when terratorch / planetary_computer / pystac_client
/ rioxarray aren't installed.
Both TerraMind specialists call into app/context/terramind_nyc.py (added
in C3), which routes inference through terratorch tiled_inference at
224x224 and ships the per-class fraction summary the reconciler quotes.
Reconciler:
- app/reconcile.py:build_documents() now emits tm_lulc (Touchstone,
after prithvi_live) and tm_buildings (Keystone, after the legacy
terramind_synthetic prior).
- trim_docs_to_pl…
Telescoped from ~25 spine commits into the three UI generations:
Lit (kept on disk for reference, not loaded):
web/static/components/{briefing,trace,signals,sources-footer}.js
Component-per-tag custom elements with reactive props.
Svelte 5 custom-element bundle (legacy primary, served at /legacy):
web/svelte/src/lib/{Briefing,Trace,SourcesFooter}.svelte + main.js
Shared store for cross-component highlight (citeIndex,
highlightedDocId). Built artifact ships at web/static/dist/riprap.js.
SvelteKit design-system v0.4.2 (the new primary):
web/sveltekit/src/* — adapter-static build, IBM Plex, four-tier
glyphs, MapLibre map with custom basemap, server-side render of
/q/sample + /q/<query>. Built artifact ships at web/sveltekit/build/.
web/main.py wired up the new endpoint surface:
/, /q/sample, /q/<query> → SvelteKit build
/legacy, /single, /compare → Svelte custom-element bundle
/api/agent/stream → SSE pipeline (plan/step/toke…
Two more user-facing modes on top of the address endpoint:
/compare — side-by-side briefings for two queries, useful
when picking between candidate parcels or
comparing two neighborhoods.
/register/{class} — pre-computed exposure for an entire asset
register: NYC DOE schools, NYCHA developments,
MTA subway entrances. The JSON ships baked
(built offline by register_builder), so the
UI is just paginated rendering — every row
shows the same paragraph + tier the address
mode would produce.
Asset loaders normalise each register's source GeoJSON into the
common (name, lat, lon, props) shape register_builder expects.
FastAPI primary UI + NYCO design system vendor drop
web/main.py wires the address-mode endpoint at /, dispatches to the
Burr FSM, and returns the reconciled paragraph + per-step trace as
JSON for the front-end to render. /compare and /register/{class}
routes are stubbed for the next slot.
The static UI follows NYC Planning Labs' civic-assessment idiom
(ZoLa, Capital Planning Explorer): clean two-column layout, IBM
Plex Sans throughout, MapLibre for the map, vanilla JS event flow
with no framework. NYCO design-system CSS + fonts ship as a vendor
drop so the build stays Node-free.