<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Maulana Wirawan</title>
    <description>The latest articles on DEV Community by Maulana Wirawan (@maulanawirawan).</description>
    <link>https://dev.to/maulanawirawan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4265563%2F3bf660f4-094f-423a-a777-96842da537a9.png</url>
      <title>DEV Community: Maulana Wirawan</title>
      <link>https://dev.to/maulanawirawan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maulanawirawan"/>
    <language>en</language>
    <item>
      <title>Sootsayer: telling Indonesia's clinics who is coming, built with Kiro</title>
      <dc:creator>Maulana Wirawan</dc:creator>
      <pubDate>Wed, 25 Nov 2026 22:00:44 +0000</pubDate>
      <link>https://dev.to/maulanawirawan/sootsayer-telling-indonesias-clinics-who-is-coming-built-with-kiro-48jl</link>
      <guid>https://dev.to/maulanawirawan/sootsayer-telling-indonesias-clinics-who-is-coming-built-with-kiro-48jl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I wrote this post as part of the Kiroween 2026 hackathon.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm Indonesian, and haze season is something you hear about every year: schools close, the sky over Kalimantan and Riau turns orange, and the clinics fill up before anyone has a plan. This year I wanted to see whether open data could give a puskesmas a few days' warning instead of a headline.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap
&lt;/h2&gt;

&lt;p&gt;Between 20 August and 5 November 2026, Indonesia's health ministry counted at&lt;br&gt;
least 425,167 respiratory infections from fire haze. Satellites saw every fire,&lt;br&gt;
and air-quality apps showed the smoke. Nobody told a puskesmas (a community&lt;br&gt;
health clinic) how many breathless patients to expect next week, or told the&lt;br&gt;
district health office (Dinas Kesehatan) where to open emergency posts and&lt;br&gt;
oxygen houses first.&lt;/p&gt;

&lt;p&gt;Sootsayer tries to close that gap: from the fire pixel to the clinic queue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyou9bm9g0e69s33sbxnq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyou9bm9g0e69s33sbxnq.jpg" alt="Pulang Pisau: +88% respiratory visits expected, said first in one plain sentence" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A real 3D globe (MapLibre GL JS v6) with NASA's satellite image of the day,
NASA FIRMS fire detections, terrain, and the Copernicus CAMS smoke field.&lt;/li&gt;
&lt;li&gt;A five-day outlook for 96 districts in Kalimantan and Sumatra's peatland
provinces. Each district-day is a clear day, a haze day (daily mean PM10 of
at least 100 µg/m³) or a fire-haze day (a haze day with a satellite fire in
the district).&lt;/li&gt;
&lt;li&gt;The expected change in respiratory visits, from a peer-reviewed study of six
puskesmas in Central Kalimantan (Phung et al. 2025, International Journal of
Epidemiology), always with its 95% range.&lt;/li&gt;
&lt;li&gt;For each puskesmas: expected visits a day, a clean-air waiting room planner,
and indoor PM2.5 with and without a cleaner.&lt;/li&gt;
&lt;li&gt;A briefing the health office can send as is, in Bahasa Indonesia or English.
The engine writes it, not a language model.&lt;/li&gt;
&lt;li&gt;October 2026 replayed in hindsight and as it was forecast, with a check of
how often the forecast was right.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The study has a hard limit, and the app shows it next to the numbers: the&lt;br&gt;
effect was clear in a rural regency (Pulang Pisau) and absent in the city of&lt;br&gt;
Palangka Raya. Everywhere else, the estimates are applied by analogy.&lt;/p&gt;
&lt;h2&gt;
  
  
  A chimera of five parts
&lt;/h2&gt;

&lt;p&gt;I entered the Frankenstein category, so the stitching is the point:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Engine&lt;/td&gt;
&lt;td&gt;Rust: one crate with three faces (library, native CLI, WebAssembly with a hand-written C ABI)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Globe&lt;/td&gt;
&lt;td&gt;TypeScript, Vite, MapLibre GL JS v6 (globe projection, terrain, WebGL2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge&lt;/td&gt;
&lt;td&gt;Vercel functions that cache and trim CAMS (via Open-Meteo) and NASA FIRMS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data&lt;/td&gt;
&lt;td&gt;Python with uv and Shapely, the Copernicus Atmosphere Data Store client, and scikit-learn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agents&lt;/td&gt;
&lt;td&gt;An MCP server (Python SDK v2), a custom Kiro agent, and a Kiro power&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The browser and the agent run the same Rust code. A parity script feeds real&lt;br&gt;
October inputs through the WebAssembly module and the native CLI and requires&lt;br&gt;
byte-identical output.&lt;/p&gt;
&lt;h2&gt;
  
  
  How Kiro changed the way I worked
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Specs first, and specs that changed
&lt;/h3&gt;

&lt;p&gt;Three specs hold 16 requirements with 70 EARS acceptance criteria, 18 design&lt;br&gt;
decisions, and 32 tasks. The third one, for the haze-day chance below, was&lt;br&gt;
written before its code. The useful part was that the design changed when facts&lt;br&gt;
arrived, and the spec recorded why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenStreetMap maps only part of the puskesmas, so the priority list ranks
districts by the relative change, not by clinic counts.&lt;/li&gt;
&lt;li&gt;Open-Meteo's free tier allows 600 calls a minute. A live refresh of all of
Indonesia would cost about 2,655 calls, so coverage stays with the haze
regions, one region at a time.&lt;/li&gt;
&lt;li&gt;The forecast check showed that the first 7 hours of the first forecast day
are the same data as the archive, so the app now says that day flatters the
forecast.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Steering as house rules, hooks as the referee
&lt;/h3&gt;

&lt;p&gt;The steering file &lt;code&gt;product.md&lt;/code&gt; holds five house rules: real data only, a range&lt;br&gt;
next to every estimate, the limits on screen, never stale data as current, and&lt;br&gt;
decision support rather than diagnosis. Three agent hooks enforce them on every&lt;br&gt;
save, and they fire on Kiro's own edits too:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;engine-check-on-save&lt;/code&gt; runs the unit and property tests, rebuilds the
WebAssembly module and the CLI, and checks parity.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;method-citation-check&lt;/code&gt; keeps the study's numbers identical between
&lt;code&gt;engine/src/method.rs&lt;/code&gt; and &lt;code&gt;docs/METHOD.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;house-rules-ui-check&lt;/code&gt; reviews every UI edit against the steering.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They caught real bugs before they shipped: an English source label that would&lt;br&gt;
have appeared inside the Indonesian briefing, a failed forecast load that would&lt;br&gt;
have kept the "What was forecast" label over hindsight data, a hard-coded UI&lt;br&gt;
label outside the translation file, and METHOD.md missing new constants.&lt;/p&gt;

&lt;p&gt;Honestly, the biggest change was trust. Building fast used to mean checking everything twice myself. Here the rules lived in steering files and the hooks checked every save, so I could let Kiro run and spend my time on the decisions only I could make: which study to trust, what a puskesmas head actually needs to see, and what the app must refuse to say.&lt;/p&gt;
&lt;h3&gt;
  
  
  Property-based tests
&lt;/h3&gt;

&lt;p&gt;Ten proptest invariants come straight from the requirements: ranges stay&lt;br&gt;
ordered, a clear day changes nothing, the regency effect grows with the length&lt;br&gt;
of the haze, the output is deterministic, every briefing carries its limits and&lt;br&gt;
a range on every ranked line, the forecast check counts each pair once, the&lt;br&gt;
haze-day chance stays a probability on window days only, and more forecast&lt;br&gt;
smoke never lowers the chance.&lt;/p&gt;
&lt;h3&gt;
  
  
  MCP, a custom agent, and a power
&lt;/h3&gt;

&lt;p&gt;The MCP server has seven tools (&lt;code&gt;list_regions&lt;/code&gt;, &lt;code&gt;list_districts&lt;/code&gt;, &lt;code&gt;priority&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;haze_outlook&lt;/code&gt;, &lt;code&gt;clinic_plan&lt;/code&gt;, &lt;code&gt;daily_brief&lt;/code&gt;, &lt;code&gt;forecast_check&lt;/code&gt;) on the same&lt;br&gt;
engine. Kiro can answer "which districts need oxygen houses this week?" with&lt;br&gt;
the engine's numbers, and forward a briefing it did not write. A custom agent,&lt;br&gt;
&lt;code&gt;sootsayer-briefer&lt;/code&gt;, briefs only from those tools, and a Kiro power packages the&lt;br&gt;
server with two skills.&lt;/p&gt;
&lt;h2&gt;
  
  
  Can you trust the forecast?
&lt;/h2&gt;

&lt;p&gt;The October replay shows what the CAMS forecast said at 06:00 each morning (the&lt;br&gt;
12:00 UTC run of the day before, from the Copernicus Atmosphere Data Store), and&lt;br&gt;
the app grades it against the model's own later estimate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One day ahead, it caught 75% of Kalimantan's district haze days (361 of 480),
and 16% of its warnings were false.&lt;/li&gt;
&lt;li&gt;In Sumatra it caught only 49% (133 of 274).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is model against model, not against ground stations, and the app says so.&lt;/p&gt;

&lt;p&gt;Then I added a little machine learning, and tested it honestly. A logistic&lt;br&gt;
regression per lead day, trained with scikit-learn on that October replay and&lt;br&gt;
evaluated by the same Rust engine, turns each morning's forecast into a chance&lt;br&gt;
of a haze day, like a rain chance. Each week is scored by a model that never&lt;br&gt;
saw it. A district the raw forecast leaves clear but with a chance of 30% or&lt;br&gt;
more goes on a Watch list: one day ahead that caught 88% of Kalimantan's&lt;br&gt;
district haze days (raw forecast 75%) and 70% of Sumatra's (49%), with more&lt;br&gt;
false alarms (25% and 40% of warnings). The study's method stays unchanged.&lt;br&gt;
Getting the data took one request that waited about 18 hours in the queue. I&lt;br&gt;
never resubmitted it, because the Data Stores suspend accounts that send&lt;br&gt;
repeated requests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8wc0crpx208oig097drg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8wc0crpx208oig097drg.jpg" alt="The Watch list: districts the forecast left clear but with a haze-day chance of 30% or more" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The demo video is code too
&lt;/h2&gt;

&lt;p&gt;The video is rendered with Remotion and three.js. The opening draws the map&lt;br&gt;
from Natural Earth and geoBoundaries and ignites the 9,766 real FIRMS detections&lt;br&gt;
of 14 October 2026 as embers. The app shots are the real app, recorded frame by&lt;br&gt;
frame on Playwright's paused clock, and the music is synthesised with numpy.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/sy2W52_GN0I" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;A pilot with a district health office to compare the outlook with real 2026&lt;br&gt;
visit records (and the haze-day chance with a new season), and more regions as&lt;br&gt;
data packs. The 06:00 briefing already exists as a Kiro Crew app that runs it&lt;br&gt;
unattended.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App: &lt;a href="https://sootsayer.vercel.app" rel="noopener noreferrer"&gt;https://sootsayer.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/maulanawirawan/sootsayer" rel="noopener noreferrer"&gt;https://github.com/maulanawirawan/sootsayer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kiro Crew app: &lt;a href="https://github.com/maulanawirawan/sootsayer-morning-brief" rel="noopener noreferrer"&gt;https://github.com/maulanawirawan/sootsayer-morning-brief&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Data: NASA FIRMS (VIIRS NOAA-20, NASA LANCE) and NASA GIBS. Copernicus CAMS&lt;br&gt;
via Open-Meteo and the Atmosphere Data Store, CC BY 4.0: contains modified&lt;br&gt;
Copernicus Atmosphere Monitoring Service information 2026; neither the European&lt;br&gt;
Commission nor ECMWF is responsible for any use that may be made of the&lt;br&gt;
Copernicus information or data it contains. Sentinel-2 cloudless -&lt;br&gt;
&lt;a href="https://s2maps.eu" rel="noopener noreferrer"&gt;https://s2maps.eu&lt;/a&gt; by EOX IT Services GmbH (Contains modified Copernicus Sentinel&lt;br&gt;
data 2016 &amp;amp; 2017). OpenFreeMap © OpenMapTiles Data from OpenStreetMap;&lt;br&gt;
puskesmas © OpenStreetMap contributors (ODbL); districts: geoBoundaries.&lt;br&gt;
Sootsayer is decision support for health offices, not medical advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>kiroweenhackathon26</category>
      <category>rust</category>
      <category>webassembly</category>
    </item>
  </channel>
</rss>
