Skip to content

Roadmap: firms-client to the level of dpc-radar (tracking) #26

Backlog

Description

@gzileni

Roadmap: firms-client to the level of dpc-radar (tracking)

firms-client 0.5.0 reads FIRMS well: country archives and the area API, hotspots, events, digests, season anomaly, the static-source mask, land cover (classify_burning), grounded bulletins, MCP, llms.txt. It does not yet say how much to trust a detection in a place, it has no benchmark of known cases, and a Comune cannot install it. This issue tracks the work, one PR per phase. The standard is agent-engineering-studio/agent-engineering-studio.github.io#11; the model is dpc-radar, the latest example is egms-client#22.

Part of agent-engineering-studio/limen#714 (the wildfire epic).

Limen follows every phase. A phase that changes what Limen can use (a new function, a fix, a contract) ends with a release of firms-client (after Giuseppe's go-ahead) and a Limen PR «Parte di #714» that raises the pin, adopts the feature and updates the book (docs/book/02-le-librerie.md, appendice-c-librerie.md, and the chapter that uses it). Phases 0–2 change only the repository and the measures: their Limen side is the book, if anything changes there. Phase 3 is the first that needs a release (0.6.0, the transport); phase 4 the second.

Rules: firms-client imports no other Limen library. The UI is not an alternative to Limen. Not measured is not zero. A hotspot is not an alert. Whole archives stay out of the repo; only small crops of the cases go in, with their source.

Where Limen stands (read 25/11/2026)

  • Limen pins firms-client~=0.5.0 but uses only the pure parts: parse_csv, select, area_url, the archive URLs and StaticMask. Transport (fetch_with_retry), cache and degradation are Limen's own (integrations/firms/).
  • classify_burning is not used: it is not validated (Validate the crop-burning heuristic against ground truth #17).
  • limen#714: Italy 2024–2026 at «high», 72 h, catches 62–68 % of burnt cells against a base rate of 11–14 %. The North is behind: at «moderate», Lombardia 20 %, Veneto 14 %, Piemonte 48 %, Emilia-Romagna 38 %, and the FWI scale does not recover it. The epic asks for «a signal beyond the FWI (fuel, season, agricultural use of fire)»: this is what firms-client can measure.
  • EFFIS perimeters (the backtest truth) miss small fires; FIRMS sees some of them, at 375 m.

Phase 0 · Repository like the others (S)

  • Full Makefile: check, format, build, docs, notebooks, bench, up, down, logs, clean, help.
  • A test that no src file imports limen, dpc_radar, egms_client, effis_client, fwi_chain and the others.
  • CI also on the core without extras (CI: also test the core without extras #23).
  • publiccode.yml validated in CI (publiccode-parser-action), first docs/riuso.md.
  • Generated API reference on Pages, linked from the home and llms.txt (Site: generated API reference on GitHub Pages #22).

Check: make help lists every target; CI is green with the import ban, the core-only job and publiccode.

Phase 1 · A benchmark of known cases (M)

benchmarks/cases.toml and benchmarks/run.py --check in CI, offline on small committed crops of the country archives.

  • Fires: large wildfires with a known date and place (e.g. Montiferru, Sardinia, July 2021; Sicily, July 2023).
  • Static sources: the Taranto steelworks, which must come out masked.
  • False fires: the Etna lava flow of February 2025, type 0 (Lava flows and volcano flanks: teach the mask and the land cover about volcanoes #15).
  • Crop burning: stubble fires in the Po plain or the Tavoliere.
  • Blind: fires below the 375 m detection limit, or under cloud, where the answer must be «not measured», not 0.
  • Methods scored: select, StaticMask.verdict, cluster, classify_burning, season_anomaly.

Check: N of N cases, recorded in results.json.

Phase 2 · How much to trust it, per place (M)

firms_client.reliability, declared as an estimate made from outside (FIRMS publishes no per-place trust map):

  • useful overpasses per day at that latitude, by sensor;
  • distance from a known static source (the mask);
  • pixel confidence and scan/track size;
  • land cover under the detection (WorldCover);
  • score = the minimum of the known parts, with reliable and the reason.

#17: validate classify_burning here, in the benchmark. The independence rule is about code: src/ imports no other library, but the benchmark can carry crops of another open source as truth, fetched with plain httpx (as egms-client does with INGV bulletins). The truth is the EFFIS burnt-area database (modis.ba.poly on /effis, not the NRT layer effis-client reads): every perimeter carries its CORINE land-cover shares (AGRIAREAS, BROADLEA, SCLEROPH, …), e.g. Sindia, 12/07/2021, 914 ha, 95 % agricultural. It says what land burnt (≥ ~30 ha), not why: small stubble fires stay below it, written in «What is not there». Licence checked before committing the crops. What stays in Limen is only what Limen alone can do: the measure over all Italy and years against the risk engine (AUC of crop burning in the North, backtests). #16: masks for one more country as a control, not more.

What is not there (written down, not hidden): clouds and thick smoke; small or short fires between two overpasses; burnt area (that is EFFIS); the type field in the area API.

Check: on the cases of phase 1, blind places come out unreliable.

Phase 3 · Freshness and the service's contract (S)

Check: the live test passes; Limen gives the same output after the switch.

Phase 4 · Per-cell features, for Limen (M)

firms_client.cells: hotspots → statistics on any grid, NaN kept as NaN: fire-days per km², share of crop burning, distance from a static source, with the reliability of phase 2. A parity test against Limen's fire_density.

For Limen (each becomes a box in limen#714):

  • limen misura --pericolo wildfire --feature crop_burning_share on the North, region by region, before touching wildfire.yaml;
  • FIRMS as truth for the small fires EFFIS misses: hit rate and base rate beside the perimeters;
  • «not measured» for cells with no useful overpass.

Check: parity on one region; the AUC measured in Limen comes back as a small file with its source.

Phase 5 · The AI layer (M)

Check: faithful score --check in CI; every faulty answer is caught.

Phase 6 · Docker, the UI for a Comune, notebooks (M)

  • compose.yaml, name: firms-client; containers firms-client-api, firms-client-ui (127.0.0.1:3005), firms-client-notebook (127.0.0.1:8890), firms-client-mcp (127.0.0.1:8769). Ports and volumes from .env, complete .env.example. The MAP_KEY only from .env or a mounted secret, never in the image or the logs (a test checks the logs).
  • The UI, on the dpc-radar/egms-client model: Bootstrap Italia from npm (no CDN), Italian and English, configured per Comune from env vars and the URL, embeddable with an iframe. Narrow: the fires seen in the Comune in the last days and in the season, how much to trust them, «non è un'allerta» in view. Without a MAP_KEY it shows only the archives, and says so.
  • Notebooks (Notebooks: a national fire history and a season comparison #21): a national fire history, a season comparison, how_much_to_trust, cells_for_a_model. make notebooks.
  • docs/riuso.md complete.

Check: docker compose up on a clean machine; a CI job starts it and answers /api/health and /.

Phase 7 · Release, the fifth episode, LinkedIn

Parked

🤖 Generated with Claude Code

Activity

  1. added
    roadmap
    on Nov 25, 2026
  2. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 0 is on branch chore/phase-0 (0af53ee), waiting for a push: make check green (107 tests, 100 %), core alone 88 passed / 3 skipped, publiccode.yml valid for the official parser, make docs builds the site with the API reference. Closes #22 and #23.

  3. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 0 done: #27 merged (closes #22, #23), #28 fixed the Pages deploy (upload-pages-artifact/deploy-pages v5). Site live with the API reference at https://agentengineering.it/firms-client/api/firms_client.html. No API change: no release, nothing to update in Limen or its book. Next: phase 1, the benchmark of known cases.

  4. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 1 done (#29): 13 checks on known cases, 11 of 13 pass, scored offline in CI (make bench). The two failures are the Etna lava flow of February 2025 (#15): 44 % typed as vegetation fire by FIRMS, 15 % still kept with the static mask. Not there: crop burning (#17, in Limen), missed fires (phase 2), MODIS and the area API (phase 3). Next: phase 2, how much to trust it per place.

  5. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 1 completed by #31: crop burning measured against EFFIS burnt areas (the independence rule is about code, not about the truth a benchmark carries; corrected in phase 2 above). 17 of 23 pass: wildfires 5/5; fires on cropland 1/4 (three mixed, grassland 29-37 %, #17); Etna lava 0/2 (#15); Polizzi Generosa 2022, 876 ha, no VIIRS detection — the first datum for phase 2.

  6. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 2 done (#32). seen(area_ha): VIIRS S-NPP saw 19 % of the fires under 30 ha and 82 % of 300-1,000 ha in 2022-2025 (10,290 EFFIS burnt areas of Italy; lower than 2016-2021 at every size). trust(lat, lon): static + land parts, nothing known = not measured; 8 of 8 benchmark checks (25 of 31 in all). firms sync: the init for servers and offline use, idempotent. This phase adds API: a release (0.6.0) and a Limen PR come after the go-ahead.

  7. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 3 done (#33) and 0.6.0 released on PyPI (#35, tag v0.6.0): phases 0-3.

    Limen side (pin, WorldCover in the init, book): PR in progress.

  8. gzileni commented on Nov 25, 2026

    @gzileni
    ContributorAuthor

    Phase 4 done (#36): cell_stats(hotspots, grid, cells=, mask=, land=) per cell (fire-days, fire-days/km², WorldCover cropland and natural share under the fire-days, distance from static sources, trust at the centre; None = not measured), LaeaGrid (EPSG:3035 with no pyproj, default origin = EEA 1 km grid; with an AOI's bounds = Limen's grid), firms cells. Benchmark: cropland under the fire-days 0.58-0.86 on the agricultural EFFIS fires FIRMS saw, 0-0.004 on the wildfires; 34 of 41. #37 adds init() and the shared DATA_ROOT. Limen side (parity with fire_density, limen misura --feature on the cropland share in the North) after the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions