Runbook · steps you can run as written · web aligned 6 Oct · subscriber notifications 9 Oct

ASAPify runbook

Every task has prerequisites, steps with complete commands, outputs (file or resource names) and a done check you can prove. A task counts as done only when the done check passes and the evidence is written in the WORKLOG.

00 · How to use

Before running any command

Conventions

  • Every command runs from the repo root asapify/, with the venv active (source .venv/bin/activate) and source infra/env.sh.
  • All times in code and arguments are UTC (suffix Z). Night = 13:00–21:00 UTC = 20:00–04:00 WIB.
  • <…> marks a value you must replace. There are no other placeholders.
  • Reference code (region, peat mask, Himawari, GK2A, NASA POWER, MAUT, agent, Telegram) is in Backend & API; gcloud commands are in Cloud setup.
  • ⚠️ = not verified yet. If the result differs from what is written, note it in the WORKLOG log and tell the owner of the next task.

Proof of done

  • Write in WORKLOG section 18: Done: <ID> — <summary> — <evidence>. Evidence = a file path, the output of the check command, or a link.
  • Code lands through a PR to main; the task's unit tests must pass in the PR.
  • Secrets (MAP_KEY, bot token) never go into the repo, chat or screenshots.
Variables (create once in S0-2)infra/env.sh
# infra/env.sh — run `source infra/env.sh` at the start of every terminal session
export PROJECT_ID="asapify-<initials>-2026"       # lowercase, globally unique; set in S0-2
export REGION="asia-southeast2"
export GEMINI_LOCATION="global"
export GEMINI_MODEL="<latest Gemini Flash model name on Vertex AI>"
export DATA_BUCKET="asapify-data-$PROJECT_ID"
export PUBLIC_BUCKET="asapify-public-$PROJECT_ID"
export BBOX="94.9,-6.2,119.4,6.2"                   # Sumatra + Kalimantan
export BACKTEST_BBOX="113.5,-2.6,114.3,-1.9"        # Central Kalimantan sub-area (default)
export BACKTEST_BBOX_SUMSEL="105.2,-3.7,106.0,-3.0" # OKI, South Sumatra (planned)
export WARMUP_START="2023-08-01"                    # 30 nights for the initial baseline
export BACKTEST_START="2023-09-01"; export BACKTEST_END="2023-10-15"
export IMAGE="$REGION-docker.pkg.dev/$PROJECT_ID/asapify/app:latest"
gcloud config set project $PROJECT_ID >/dev/null
JOBS_SA="sa-jobs@$PROJECT_ID.iam.gserviceaccount.com"
AGENT_SA="sa-agent@$PROJECT_ID.iam.gserviceaccount.com"
API_SA="sa-api@$PROJECT_ID.iam.gserviceaccount.com"
SCHED_SA="sa-scheduler@$PROJECT_ID.iam.gserviceaccount.com"
Sprint 0 · 29 Sep – 1 Oct

Accounts and local data

Tasks: S0-1 · S0-2 · S0-3 · S0-4 · S0-5 · S0-6 · S0-7 · S0-8 · S0-9

Sprint done when: All accounts are active; one Himawari scan and one GK2A scan are read onto the combined Sumatra + Kalimantan grid; NASA POWER, FIRMS and GIBS are tested.
S0-1All roles

Register the team on Hack2Skill

The team is officially registered before 11 Oct; without this the submission is not valid.

Prerequisites

  • An active email for each member
  • Every member is a working professional aged ≥ 21

Outputs

  • Team ASAPify on the Hack2Skill dashboard
  • docs/registrasi.png

Steps

  1. The lead opens the AI Builder Cup 2026 page via aibuildercup.com, clicks the Hack2Skill registration link, and signs in with a Google account.
  2. Create a team named ASAPify. Choose the Sustainability & Social Impact theme.
  3. Invite 1–3 members by email. Each member opens the invitation email and accepts.
  4. Take a screenshot of the team page and save it as docs/registrasi.png in the repo.

Done check

The team dashboard shows 2–4 members with active status. Deadline: 1 Oct (hard: 11 Oct).

S0-2Role C

GCP project, billing, budget, APIs

One project for every service, with a budget alert so Gemini and download costs stay under control.

Prerequisites

  • gcloud CLI installed (or use Cloud Shell)
  • A Google Cloud billing account

Outputs

  • Project $PROJECT_ID with billing enabled
  • Budget alert at 50/90/100%
  • infra/env.sh in the repo

Steps

  1. Sign in and create the project. Replace <initials>.
    gcloud auth login
    export PROJECT_ID=asapify-<initials>-2026
    gcloud projects create $PROJECT_ID --name="ASAPify"
  2. Link billing. Copy ACCOUNT_ID from the first command.
    gcloud billing accounts list
    gcloud billing projects link $PROJECT_ID --billing-account=<ACCOUNT_ID>
  3. Set a budget alert (50 USD is a 💡 figure, adjust it).
    gcloud billing budgets create --billing-account=<ACCOUNT_ID> \
      --display-name=asapify-budget --budget-amount=50USD \
      --threshold-rule=percent=0.5 --threshold-rule=percent=0.9 --threshold-rule=percent=1.0
  4. Create infra/env.sh exactly like the block in "Variables" on this page, then load it.
    source infra/env.sh
  5. Enable the APIs.
    gcloud services enable run.googleapis.com cloudscheduler.googleapis.com \
      artifactregistry.googleapis.com cloudbuild.googleapis.com firestore.googleapis.com \
      storage.googleapis.com secretmanager.googleapis.com aiplatform.googleapis.com \
      earthengine.googleapis.com iamcredentials.googleapis.com firebase.googleapis.com
  6. Give team members access (repeat per email).
    gcloud projects add-iam-policy-binding $PROJECT_ID \
      --member=user:<EMAIL> --role=roles/editor

Done check

Billing enabled:

gcloud billing projects describe $PROJECT_ID --format='value(billingEnabled)'   # must be: True

The seven main APIs are enabled:

gcloud services list --enabled --format='value(config.name)' | \
  grep -cE 'run|cloudscheduler|firestore|secretmanager|aiplatform|earthengine|storage.googleapis'   # must be: ≥ 7
S0-3Role C

Earth Engine registered, WorldCover tested

Earth Engine is used once only: the built-up fraction from WorldCover for the building mask.

Prerequisites

  • S0-2 done
  • Python 3.12 with earthengine-api (S0-6) or Cloud Shell

Outputs

  • Project registered with Earth Engine
  • Tier noted in the WORKLOG log

Steps

  1. Open https://code.earthengine.google.com/register with a Google account that has access to the project. Choose unpaid / noncommercial use, pick project $PROJECT_ID, and answer the questionnaire: noncommercial research prototype for early detection of peat fires, built for a competition, not sold.
  2. Authenticate on your workstation.
    pip install earthengine-api
    earthengine authenticate
  3. Test reading WorldCover over the backtest sub-area.
    python - <<'EOF'
    import ee, os
    ee.Initialize(project=os.environ["PROJECT_ID"])
    roi = ee.Geometry.Rectangle([113.5, -2.6, 114.3, -1.9])
    wc = ee.ImageCollection("ESA/WorldCover/v200").first()
    frac = wc.eq(50).reduceRegion(ee.Reducer.mean(), roi, 100).getInfo()
    print("sub-area built-up fraction:", frac)
    EOF
  4. If registration is refused: note it in the WORKLOG log; download WorldCover tiles from esa-worldcover.org for the Sumatra + Kalimantan bbox instead and tell A.

Done check

The script prints {'Map': 0.0…} (a small number, no error).

S0-4Role B

FIRMS MAP_KEY and a small-area query test

Access to VIIRS detections for the agent (on demand) and for backtest validation.

Prerequisites

  • S0-2 done (for Secret Manager)

Outputs

  • Secret firms-map-key

Steps

  1. Open https://firms.modaps.eosdis.nasa.gov/api/map_key/, enter the team email, copy the MAP_KEY from the email.
  2. Test the query the agent will use: a ±0.1° box around one coordinate, 2 days, three satellites.
    export MAP_KEY=<key>
    for S in VIIRS_SNPP_NRT VIIRS_NOAA20_NRT VIIRS_NOAA21_NRT; do
      curl -s "https://firms.modaps.eosdis.nasa.gov/api/area/csv/$MAP_KEY/$S/113.82,-2.31,114.02,-2.11/2" | head -2
    done
  3. Store it in Secret Manager.
    printf "%s" "$MAP_KEY" | gcloud secrets create firms-map-key --data-file=-

Done check

Each satellite prints a header that starts with latitude,longitude,bright_ti4 and includes the confidence and daynight columns (zero data rows is fine).

The secret is readable:

gcloud secrets versions access latest --secret firms-map-key | wc -c   # > 0
S0-5Role D

Telegram bot, operator group, chat_id

The bot is ready: an operator group for verification summaries, DMs for subscribers.

Prerequisites

  • A Telegram account
  • S0-2 done (Secret Manager)

Outputs

  • Secret telegram-bot-token
  • TG_OPERATOR_CHAT_ID and TG_BOT_USERNAME in infra/env.sh

Steps

  1. In Telegram open @BotFather → send /newbot → name ASAPify Bot → a username ending in bot, e.g. asapify_demo_bot. Copy the token.
  2. Store the token.
    export TOKEN=<token>
    printf "%s" "$TOKEN" | gcloud secrets create telegram-bot-token --data-file=-
  3. Create the group ASAPify Operator and add the bot. Public alerts do not use groups: subscribers link their own Telegram from the Notifications page (D4).
  4. In that group send /start@asapify_demo_bot. A bot in privacy mode only receives commands that mention it, so ordinary messages do not appear in getUpdates.
  5. Get the group's chat_id (a negative value; supergroups start with -100).
    curl -s "https://api.telegram.org/bot$TOKEN/getUpdates" | jq '.result[].message.chat | {id, title}'
  6. Test a send to the group.
    curl -s "https://api.telegram.org/bot$TOKEN/sendMessage" -d chat_id=<CHAT_ID> -d text="Uji ASAPify"
  7. Record them in infra/env.sh (not secret).
    export TG_OPERATOR_CHAT_ID=-100...
    export TG_BOT_USERNAME=asapify_demo_bot

Done check

The message Uji ASAPify appears in the operator group. If the group is upgraded to a supergroup, its chat_id changes: repeat step 5.

S0-6Role A

Repo, Python environment, check the 2023 backtest window

Everyone uses the same structure and dependencies; the backtest window is proven to contain events.

Prerequisites

  • S0-4 done (MAP_KEY)

Outputs

  • Repo with the folder structure
  • requirements.lock
  • data/local/firms_backtest_2023_sp.csv

Steps

  1. Create a private GitHub repo asapify, clone it, and create the folders.
    git clone <repo-url> asapify && cd asapify
    mkdir -p jobs/lib jobs/tests agent api/routers shared infra data/ref data/local notebooks docs scripts
    # web: team repo ktp-asapify-fe; API + Notification Engine: team repo ktp-asapify-be
  2. Python 3.12 environment and dependencies.
    python3.12 -m venv .venv && source .venv/bin/activate
    pip install satpy pyresample s3fs xarray netCDF4 numpy pandas pyarrow geopandas rasterio \
      shapely scipy matplotlib pillow httpx earthengine-api google-adk google-genai fastapi uvicorn \
      google-cloud-firestore google-cloud-storage pytest
    pip freeze > requirements.lock
  3. Copy jobs/lib/region.py from Backend & API section 05b.
  4. Check that the 1 Sep – 15 Oct 2023 backtest window has VIIRS detections in the Central Kalimantan sub-area. The SP archive is fetched in 5-day chunks (API limit). This is for validation only, not the operational path.
    python - <<'EOF'
    import io, os, httpx, pandas as pd, datetime as dt
    K, B = os.environ["MAP_KEY"], os.environ["BACKTEST_BBOX"]
    url = "https://firms.modaps.eosdis.nasa.gov/api/area/csv/{}/{}/{}/5/{}"
    d0, parts = dt.date(2023, 9, 1), []
    while d0 <= dt.date(2023, 10, 15):
        for src in ("VIIRS_SNPP_SP", "VIIRS_NOAA20_SP"):
            parts.append(pd.read_csv(io.StringIO(httpx.get(url.format(K, src, B, d0), timeout=120).text)))
        d0 += dt.timedelta(days=5)
    df = pd.concat(parts).drop_duplicates()
    print("acq_date range:", df.acq_date.min(), df.acq_date.max())
    print("total detections:", len(df), "night:", (df.daynight == "N").sum())
    df.to_csv("data/local/firms_backtest_2023_sp.csv", index=False)
    EOF

Done check

acq_date range covers 2023-09-01 to 2023-10-15. If it is shifted, the FIRMS date parameter is the start or end date ⚠️: shift the dates and repeat.

total detections ≥ 20. If fewer, widen BACKTEST_BBOX by 0.3° in each direction and note it in WORKLOG open item 11.

S0-7Role A

One Himawari and one GK2A scan: read, latency

Confirm both buckets, the channels and data wait times before writing ingest.

Prerequisites

  • S0-6 done (venv, region.py)

Outputs

  • data/local/raw/himawari/ (4 files), data/local/raw/gk2a/ (2 files)
  • data/local/latency.csv (6 rows)

Steps

  1. Download Himawari-9 B07 + B14 segments S05 and S06 for 25 Sep 2023 15:00 UTC and note their sizes.
    python - <<'EOF'
    import s3fs
    fs = s3fs.S3FileSystem(anon=True)
    p = "noaa-himawari9/AHI-L1b-FLDK/2023/09/25/1500"
    files = [f for f in fs.ls(p) if any(b in f for b in ("_B07_", "_B14_")) and ("S0510" in f or "S0610" in f)]
    for f in files:
        print(f.split("/")[-1], round(fs.size(f)/1e6, 1), "MB"); fs.get(f, "data/local/raw/himawari/")
    EOF
  2. Download GK2A SW038 + IR105 for the same time.
    python - <<'EOF'
    import s3fs
    fs = s3fs.S3FileSystem(anon=True)
    p = "noaa-gk2a-pds/AMI/L1B/FD/202309/25/15"
    for ch in ("sw038", "ir105"):
        f = f"{p}/gk2a_ami_le1b_{ch}_fd020ge_202309251500.nc"
        print(ch, round(fs.size(f)/1e6, 1), "MB"); fs.get(f, "data/local/raw/gk2a/")
    EOF
  3. Read both onto the combined grid and compare (one area in Sumatra, one in Kalimantan).
    python - <<'EOF'
    import glob, numpy as np
    from satpy import Scene
    from jobs.lib.region import AREA
    def grid(reader, files, ch):
        s = Scene(reader=reader, filenames=files); s.load([ch], calibration="brightness_temperature")
        return s.resample(AREA, resampler="nearest", radius_of_influence=5000)[ch].values
    h = grid("ahi_hsd", sorted(glob.glob("data/local/raw/himawari/*B07*")), "B07")
    g = grid("ami_l1b", glob.glob("data/local/raw/gk2a/*sw038*"), "SW038")
    for n, a in (("Himawari B07", h), ("GK2A SW038", g)):
        print(n, "NaN:", round(float(np.isnan(a).mean()), 4), "min/max K:", np.nanmin(a), np.nanmax(a))
    m = ~np.isnan(h) & ~np.isnan(g)
    print("correlation:", round(float(np.corrcoef(h[m], g[m])[0, 1]), 3))
    EOF
  4. Measure the latency of both buckets 3 times (afternoon, night and early morning WIB): the gap between the latest scan time and LastModified. Append to data/local/latency.csv.
    python - <<'EOF'
    import s3fs, datetime as dt
    fs = s3fs.S3FileSystem(anon=True); now = dt.datetime.utcnow()
    h = sorted(fs.ls(f"noaa-himawari9/AHI-L1b-FLDK/{now:%Y/%m/%d}"))[-1]
    hf = [x for x in fs.ls(h) if "_B07_" in x and "S0510" in x][0]
    hs = dt.datetime.strptime(h[-15:], "%Y/%m/%d/%H%M")
    g = sorted(fs.ls(f"noaa-gk2a-pds/AMI/L1B/FD/{now:%Y%m/%d}"))[-1]
    gf = sorted(x for x in fs.ls(g) if "sw038" in x)[-1]
    gs = dt.datetime.strptime(gf[-15:-3], "%Y%m%d%H%M")
    for n, s, f in (("himawari", hs, hf), ("gk2a", gs, gf)):
        lm = fs.info(f)["LastModified"].replace(tzinfo=None)
        print(f"{n},{s:%Y-%m-%dT%H:%MZ},{(lm - s).total_seconds()/60:.1f}")
    EOF

Done check

Both satellites: NaN < 0.01, min/max 200–340 K, correlation ≥ 0.8. If Himawari NaN ≥ 0.01: add segments S04/S07 in himawari.py.

If satpy cannot read .bz2: run bunzip2 -k first and note it in the WORKLOG ⚠️.

The median latency per satellite is written in WORKLOG open item 8.

S0-8Role A

KHG and province boundaries for Sumatra + Kalimantan

The peat mask inputs and the 15-province filter are stored locally with their sources.

Prerequisites

  • S0-6 done

Outputs

  • data/ref/khg_sumkal.geojson
  • data/ref/idn_adm1_meta.json (licence)
  • data/ref/provinces.geojson (15 rows, code column)

Steps

  1. Pull KHG for the whole bbox (the fetch_khg function from Backend 05b) and save it.
    python - <<'EOF'
    from jobs.build_peat_mask import fetch_khg
    from jobs.lib.region import MONITOR_BBOX
    g = fetch_khg(MONITOR_BBOX)
    print("features:", len(g), "area km2:", round(g.to_crs(6933).area.sum()/1e6))
    g.to_file("data/ref/khg_sumkal.geojson", driver="GeoJSON")
    EOF
  2. Download geoBoundaries province boundaries and record the licence.
    curl -s https://www.geoboundaries.org/api/current/gbOpen/IDN/ADM1/ > data/ref/idn_adm1_meta.json
    jq -r '.boundaryLicense, .gjDownloadURL' data/ref/idn_adm1_meta.json
    curl -L -o data/ref/idn_adm1.geojson "$(jq -r .gjDownloadURL data/ref/idn_adm1_meta.json)"
  3. Select the 15 provinces and add BPS codes (names may be in Indonesian or English).
    python - <<'EOF'
    import geopandas as gpd
    g = gpd.read_file("data/ref/idn_adm1.geojson")
    print(sorted(g.shapeName.unique()))
    CODE = {"Aceh":"11","North Sumatra":"12","West Sumatra":"13","Riau":"14","Jambi":"15",
            "South Sumatra":"16","Bengkulu":"17","Lampung":"18","Bangka-Belitung Islands":"19",
            "Riau Islands":"21","West Kalimantan":"61","Central Kalimantan":"62",
            "South Kalimantan":"63","East Kalimantan":"64","North Kalimantan":"65"}
    k = g[g.shapeName.isin(CODE)].assign(code=lambda d: d.shapeName.map(CODE))
    k[["shapeName","code","geometry"]].to_file("data/ref/provinces.geojson", driver="GeoJSON")
    print(k[["shapeName","code"]])
    EOF

Done check

KHG: feature count > 0 and the area is printed (note the figure in the log).

Provinces: the printed table has exactly 15 rows with codes 11–19, 21, 61–65. If North Kalimantan or the Riau Islands is missing (older data merges them into East Kalimantan/Riau): note it, use the rows that exist, and mark ⚠️.

The geoBoundaries licence is recorded in WORKLOG open item 12.

S0-9Role B

Test NASA POWER hourly and GIBS true colour

Confirm the environment baseline and VIIRS imagery can be fetched from Cloud Run without a key.

Prerequisites

  • S0-6 done

Outputs

  • POWER latency and cell coordinates noted in the WORKLOG log
  • docs/gibs_VIIRS_*.jpg (3 files)

Steps

  1. Fetch hourly TS and T2M (UTC) for one point in Central Kalimantan over the last 10 days, then find the last valid hour.
    python - <<'EOF'
    import httpx, datetime as dt
    end = dt.date.today(); start = end - dt.timedelta(days=10)
    r = httpx.get("https://power.larc.nasa.gov/api/temporal/hourly/point", timeout=120, params=dict(
        parameters="TS,T2M", community="RE", longitude=113.9, latitude=-2.2,
        start=f"{start:%Y%m%d}", end=f"{end:%Y%m%d}", format="JSON", **{"time-standard": "UTC"}))
    d = r.json(); p = d["properties"]["parameter"]
    valid = [k for k, v in p["TS"].items() if v != -999]
    print("sources:", d["header"]["sources"], "last valid hour:", valid[-1], "TS:", p["TS"][valid[-1]], "T2M:", p["T2M"][valid[-1]])
    print("cell coordinates:", d["geometry"]["coordinates"])
    EOF
  2. Fetch VIIRS true-colour imagery from GIBS for the backtest sub-area, three satellites, 25 Sep 2023.
    for L in VIIRS_SNPP VIIRS_NOAA20 VIIRS_NOAA21; do
      curl -s -o docs/gibs_${L}.jpg -w "$L %{http_code} %{size_download}\n" \
      "https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=${L}_CorrectedReflectance_TrueColor&CRS=EPSG:4326&BBOX=-2.6,113.5,-1.9,114.3&WIDTH=512&HEIGHT=448&FORMAT=image/jpeg&TIME=2023-09-25"
    done

Done check

POWER: sources contains GEOSIT; the last valid hour is recorded (29 Sep 2026: ~1.5 days behind).

GIBS: three 200 lines and sizes > 10 KB; open the JPGs and confirm the Central Kalimantan area is visible (clouds are fine). Mind the WMS 1.3.0 EPSG:4326 BBOX order = lat_min,lon_min,lat_max,lon_max.

Sprint 1 · 2–5 Oct

Observation and the rule engine

Tasks: A1 · A2 · A3 · A4 · A5 · A6 · A7 · C1

Sprint done when: The first 2023 backtest produces a list of AWAS clusters and a lead-time table against VIIRS detections.
A1Role A

Peat mask, neighbour index, POWER cells

The list of pixels every job processes, their neighbours, and the NASA POWER cells that cover them.

Prerequisites

  • S0-3, S0-8 done
  • Backend 05b code: region.py, build_built_frac.py, build_peat_mask.py, build_neighbors.py

Outputs

  • data/ref/built_frac_002.npy
  • peat/pixels.parquet (with cell_id)
  • peat/neighbors8.parquet, peat/neighbors_r5.parquet
  • peat/power_cells.parquet
  • docs/peat_mask.png

Steps

  1. Compute the built-up fraction from WorldCover.
    python -m jobs.build_built_frac      # → data/ref/built_frac_002.npy (445 × 545)
  2. Build the peat mask.
    python -m jobs.build_peat_mask       # → gs://$DATA_BUCKET/peat/pixels.parquet
  3. Build two neighbour indexes: 8 directions (neighbour support) and a 5-cell radius (relative score).
    python -m jobs.build_neighbors       # → peat/neighbors8.parquet, peat/neighbors_r5.parquet
  4. Map pixels to NASA POWER cells (lat 0.5°, lon 0.625°): cell_lat = round(lat/0.5)*0.5, cell_lon = round(lon/0.625)*0.625, cell_id = f"c{cell_lat:+.1f}_{cell_lon:.3f}".
    python -m jobs.build_power_cells     # → peat/power_cells.parquet (cell_id, lat, lon, n_pixels) + cell_id column in pixels
  5. Make a quicklook.
    python - <<'EOF'
    import pandas as pd, matplotlib.pyplot as plt, os
    df = pd.read_parquet(f"gs://{os.environ['DATA_BUCKET']}/peat/pixels.parquet")
    print(len(df), df.province.value_counts().to_dict(), "POWER cells:", df.cell_id.nunique())
    plt.figure(figsize=(8,6)); plt.scatter(df.lon, df.lat, s=0.3, c=df.peat_frac); plt.colorbar()
    plt.savefig("docs/peat_mask.png", dpi=150)
    EOF

Done check

Pixel and POWER cell counts are printed (note them); every province ∈ {11…19, 21, 61…65}; peat_frac ≥ 0.5 and built_frac < 0.2 on every row.

docs/peat_mask.png shows concentrations on the east coast of Sumatra (Riau, Jambi, South Sumatra) and the south coasts of Central and West Kalimantan, with no points in Malaysia, Singapore, Brunei, Java or Sulawesi. If POWER cells > 600: follow WORKLOG open item 16.

A2Role A

asapify-ingest-himawari → himawari/

Observation 1: 3.9 µm and 11.2 µm BT for every peat pixel every 10 minutes, at night only.

Prerequisites

  • A1 done
  • S0-7 results

Outputs

  • jobs/lib/himawari.py, features.py, jobs/ingest.py, jobs/backfill.py
  • himawari/2023/08/…, himawari/2023/09/…, himawari/2023/10/…

Steps

  1. Write jobs/lib/himawari.py (Backend 05c): list_scan(slot) → 4 files (B07, B14 × S05, S06) under noaa-himawari9/AHI-L1b-FLDK/YYYY/MM/DD/HHMM/; read_scan(files) → mir, win on the 0.02° grid.
  2. Write jobs/lib/features.py: to_features(mir, win, peat) → pixel_id, mir, win, cloud, cloud = win < 270. Shared with GK2A.
  3. Write jobs/ingest.py --sat himawari --as-of …: take the latest complete night slot + fill slots missing in the last 60 minutes; write himawari/YYYY/MM/DD/HHMM.parquet (overwritten on rerun) and raw/himawari/manifest/YYYYMMDD.json (source files per slot).
    python -m jobs.ingest --sat himawari --as-of 2023-09-25T15:00Z
  4. Backfill: August 2023 warm-up every 20 minutes, then 1 Sep – 15 Oct 2023 every 10 minutes, nights only (13:00–20:50 UTC). Locally, or as an 8-task Cloud Run job after C4 (dates split by CLOUD_RUN_TASK_INDEX).
    python -m jobs.backfill --sat himawari --start $WARMUP_START --end 2023-08-31 --step 20 --night-only
    python -m jobs.backfill --sat himawari --start $BACKTEST_START --end $BACKTEST_END --step 10 --night-only
  5. Unit tests.
    pytest jobs/tests/test_features.py jobs/tests/test_himawari.py -q

Done check

One scan: parquet rows = A1 pixel count; night median mir 285–305 K.

Backfill: 45 nights × 48 files (Sep–Oct) + 31 nights × 24 files (August). Count with gcloud storage ls gs://$DATA_BUCKET/himawari/2023/09/** | wc -l; missing slots are recorded in runs.

A3Role A

asapify-ingest-gk2a → gk2a/

Observation 2 (independent): 3.8 µm and 10.5 µm BT from GK2A in the same output format as Himawari.

Prerequisites

  • A2 (features.py)
  • S0-7 results

Outputs

  • jobs/lib/gk2a.py
  • gk2a/2023/…

Steps

  1. Write jobs/lib/gk2a.py (Backend 05c): list_scan(slot) → noaa-gk2a-pds/AMI/L1B/FD/YYYYMM/DD/HH/gk2a_ami_le1b_{sw038,ir105}_fd020ge_YYYYMMDDHHMM.nc; read_scan(files) with satpy ami_l1b, channels SW038 and IR105.
  2. Use the same to_features. Output gk2a/YYYY/MM/DD/HHMM.parquet with the same columns as himawari/.
    python -m jobs.ingest --sat gk2a --as-of 2023-09-25T15:00Z
  3. Download to /tmp and delete after reading (a full-disk file is ~30 MB per channel).
  4. Backfill on the same schedule as A2. Estimated download ~175 GB in total: run it as an 8-task Cloud Run job after C4, not from a laptop.
    python -m jobs.backfill --sat gk2a --start $WARMUP_START --end 2023-08-31 --step 20 --night-only
    python -m jobs.backfill --sat gk2a --start $BACKTEST_START --end $BACKTEST_END --step 10 --night-only
  5. Unit tests.
    pytest jobs/tests/test_gk2a.py -q

Done check

One scan: parquet rows = A1 pixel count; night median mir 285–305 K; median difference from Himawari in the same slot < 3 K.

Backfill: same file count as A2 (± recorded missing slots).

A4Role A

asapify-environment → environment/

Environment baseline (NASA POWER) and thermal baseline per pixel per satellite.

Prerequisites

  • A1 (power_cells), A2, A3 (August backfill)

Outputs

  • jobs/lib/power.py, baseline.py, jobs/environment.py
  • environment/power/20230901.parquet
  • environment/thermal/himawari|gk2a/20230901.parquet
  • environment/bias/20230901.parquet

Steps

  1. jobs/lib/power.py: fetch_cell(lat, lon, start, end) → hourly TS, T2M in UTC (Backend 05d); power_baseline(as_of) → per cell_id × hour_utc 13–20: ts_base, t2m_base = median of the valid last 30 days (ignore -999). Write environment/power/YYYYMMDD.parquet.
  2. Cache raw data per cell in raw/power/{cell_id}.parquet; each day request only the missing days. Pause 0.2 s between requests.
  3. jobs/lib/baseline.py: thermal_baseline(sat, as_of, nights=30) → pixel_id, hour_utc, median, mad, n_obs, frozen from cloud-free mir; lst_bias(as_of) → 30-night median of win_max − ts_base per pixel per hour. Write environment/thermal/{himawari,gk2a}/YYYYMMDD.parquet and environment/bias/YYYYMMDD.parquet.
  4. Pixels with WATCH/AWAS status in the last night's score/ keep the previous baseline row with frozen = true.
  5. CLI and tests.
    python -m jobs.environment --as-of 2023-09-01T05:00Z
    pytest jobs/tests/test_power.py jobs/tests/test_baseline.py -q

Done check

environment/power: every A1 cell × 8 hours, ts_base 295–305 K (22–32 °C).

environment/thermal: ≥ 80% of rows have n_obs ≥ 10 for each satellite; if fewer, note the percentage in the log.

A5Role A

MAUT and neighbour support (library)

Pure functions that compute utility and status exactly as in Plan section 05.

Prerequisites

  • A4 (shape of the baseline data)

Outputs

  • jobs/lib/anomaly.py, maut.py, neighbours.py, status.py
  • jobs/tests/test_maut.py, test_status.py

Steps

  1. jobs/lib/anomaly.py: zscore(feat, base, nbr_r5) → z, z_rel per satellite; cloud → NaN.
  2. jobs/lib/maut.py (Backend 05e): ramp, WEIGHTS, attributes(...) → u_H, u_G, u_LST, u_SAT, u_T; u0(attrs) and utility(attrs, u_N) with weights renormalised over the available attributes.
  3. jobs/lib/neighbours.py: support(u0, nbr8) → fraction of observed peat neighbours with U0 ≥ 0.5.
  4. jobs/lib/status.py: classify(U, u_N, agree, n_sat) → SAFE/NO_OBSERVATION/WATCH/AWAS, thresholds from a single THRESHOLDS dict.
  5. Seven-case unit test.
    pytest jobs/tests/test_maut.py jobs/tests/test_status.py -q

Done check

Seven cases pass: (1) z_rel 4.5 on both satellites, 3/8 neighbours, first night → AWAS; (2) the same with 0/8 neighbours → WATCH; (3) only Himawari z_rel 4.5 (GK2A clear, z_rel 0.5) → WATCH; (4) GK2A cloudy, Himawari high → WATCH (n_sat = 1); (5) both cloudy → NO_OBSERVATION; (6) z_rel 1.0 on both → SAFE; (7) missing attribute weights are renormalised (effective weights sum to 1).

A6Role A

asapify-evaluate → score/ and clusters

The rule engine runs per slot: status per pixel, AWAS clusters, agent trigger.

Prerequisites

  • A2–A5

Outputs

  • jobs/evaluate.py, jobs/lib/cluster.py
  • score/…
  • Firestore clusters

Steps

  1. jobs/evaluate.py --as-of: pick the latest night slot that has both satellites, or a slot older than 40 minutes (run with one satellite). Skip slots already recorded in runs.
  2. Compute z → attributes → U0 → u_N → U → status. Write score/YYYY/MM/DD/HHMM.parquet with exactly the columns in WORKLOG section 7 (score record).
  3. jobs/lib/cluster.py: label(awas_mask, prev) with scipy.ndimage.label (3 × 3 structure); ID C-{MMDD}-{nnn}, reuse the old ID on overlap; representative pixel = highest U. Write clusters/{id}: pixels, rep_pixel, centroid, province, utility_max, neighbour_support, first_awas_at, last_awas_at, last_verified_at, state (active/closed).
  4. Trigger: a new cluster, or an active one with last_verified_at > 6 hours → POST $AGENT_URL/verify (disabled with --no-agent until C2). Close clusters with no AWAS for 3 valid nights and call POST $AGENT_URL/cluster-closed.
    python -m jobs.evaluate --as-of 2023-09-25T15:10Z --no-agent
  5. Unit tests for labelling and stable IDs.
    pytest jobs/tests/test_cluster.py -q

Done check

One slot: score/ holds every peat pixel; status has only four values; runs records n_sat and the count per status.

Tests: two clusters touching diagonally = one cluster; an overlapping cluster the next night keeps the old ID.

A7Role A

First backtest (2023)

The lead-time figure: how early AWAS appears compared with the first VIIRS detection.

Prerequisites

  • A2–A6 done for August – 15 Oct 2023
  • data/local/firms_backtest_2023_sp.csv (S0-6)

Outputs

  • docs/backtest_2023.csv
  • docs/backtest_2023.png
  • docs/d_sat_hist.png

Steps

  1. Replay evaluation over the backtest window, without the agent.
    python -m jobs.replay --start $BACKTEST_START --end $BACKTEST_END --bbox $BACKTEST_BBOX --no-agent
  2. In notebooks/backtest.ipynb: for each cluster compute first_awas_at, first_viirs_at (first VIIRS SP detection ≤ 2 km from a cluster pixel, ±7 days), lead_h = first_viirs_at − first_awas_at.
  3. False alarm: a cluster with no VIIRS detection within ±7 days. Missed: a group of night VIIRS detections never preceded by AWAS within 2 km.
  4. Save the table and charts, including the d_sat distribution for WORKLOG open item 15.
    # docs/backtest_2023.csv: cluster_id, first_awas_at, first_viirs_at, lead_h, false_alarm, utility_max
    # docs/backtest_2023.png: lead_h histogram
    # docs/d_sat_hist.png: d_sat for pixels without VIIRS vs with VIIRS

Done check

The notebook prints: cluster count, median lead_h, false alarms, misses, number of NO_OBSERVATION slots. The figures go into the WORKLOG log whatever they are.

C1Role C

Base infrastructure

Buckets, Firestore, service accounts and permissions ready before deploy.

Prerequisites

  • S0-2 done

Outputs

  • 2 buckets, Firestore (Native) + notification indexes, 6 service accounts, 3 secrets

Steps

  1. Run sections 03 (IAM), 04 (Secret) and 05 (Storage + Firestore) on the Cloud setup page, in order.
  2. Deploy the notification Firestore indexes from ktp-asapify-be (its config targets a database named asapify; adjust it if you use (default)).
    cd ktp-asapify-be/gcp && npx firebase-tools deploy --only firestore --config firebase.notifications.json --project $PROJECT_ID

Done check

Check:

gcloud storage ls                      # 2 asapify-* buckets
gcloud firestore databases list         # (default)
gcloud iam service-accounts list | grep -c 'sa-'   # 4
Sprint 2 · 6–9 Oct

Verification and the agent

Tasks: B1 · B2 · B3 · C2 · C3 · C4

Sprint done when: One backtest AWAS cluster is verified by the agent and stored in Firestore; every job and service runs on Cloud Run.
B1Role B

Tool get_latest_viirs (FIRMS on demand)

The agent fetches the latest VIIRS detections around an AWAS coordinate, only when needed.

Prerequisites

  • S0-4, C1

Outputs

  • agent/tools/viirs.py
  • raw/firms/… cache

Steps

  1. agent/tools/viirs.py: get_latest_viirs(lat, lon, as_of, radius_km=10, hours=48). Box = coordinate ± radius_km/111°. Source: _NRT if as_of ≤ 7 days ago, otherwise _SP with a date parameter (Backend 06).
  2. Filter time to [as_of − 48 h, as_of] (from acq_date + acq_time UTC); compute distance_km (haversine). Return {detections: [{satellite, time_utc, daynight, confidence, frp, distance_km}], within_2km: n, source} sorted by distance.
  3. Cache results for 30 minutes per box in raw/firms/ so replay and the agent use the same data.
  4. Unit test with a synthetic CSV (points at 1 km, 8 km, 12 km; one outside the time window).
    pytest agent/tests/test_viirs.py -q

Done check

Test: the 1 km and 8 km points are in, the 12 km point and the one outside 48 hours are not; within_2km = 1.

A real call for the 25 Sep 2023 backtest coordinate uses _SP and returns no error.

B2Role B

Tool fetch_viirs_image (GIBS true colour)

The latest daytime VIIRS image around a coordinate, for Gemini to read.

Prerequisites

  • S0-9, C1

Outputs

  • agent/tools/viirs_image.py
  • crops/{pixel_id}/…_viirs.png

Steps

  1. agent/tools/viirs_image.py: fetch_viirs_image(lat, lon, as_of, half_deg=0.2). Try the WIB date of as_of, then go back up to 3 days; for each date try VIIRS_NOAA21, VIIRS_NOAA20, VIIRS_SNPP (_CorrectedReflectance_TrueColor).
  2. WMS 1.3.0 request, CRS=EPSG:4326, BBOX=lat_min,lon_min,lat_max,lon_max, 512 × 512, JPEG (Backend 06). Reject near-uniform images (pixel standard deviation < 3) as "no data".
  3. Draw the coordinate point and a 5 km circle with Pillow; save crops/{pixel_id}/{timestamp}_viirs.png; return {path, signed_url (1 hour), layer, date, age_h}. age_h counts from 13:30 local time on the image date.
  4. Unit test URL building and date selection (mocked HTTP).
    pytest agent/tests/test_viirs_image.py -q

Done check

For the 25 Sep 2023 backtest coordinate one PNG is created, opens via its signed URL, and shows the 5 km marker.

B3Role B

Tool fetch_himawari_image

A complementary capture: Himawari imagery at whatever hour AWAS happens.

Prerequisites

  • A2, C1

Outputs

  • agent/tools/himawari_image.py
  • crops/{pixel_id}/…_himawari_*.png
  • crops/{pixel_id}/…_thermal.json

Steps

  1. agent/tools/himawari_image.py: fetch_himawari_image(lat, lon, as_of, kind), kind ∈ {thermal_night, visible_day}.
  2. thermal_night: B07 at slot as_of, a ±0.2° crop (20 × 20 cells of 0.02°, edges on grid lines), coordinate marker. Fixed hot-channel colour scale 270–340 K (270 K #d8dee4 … 316 K #ff6a00 … 340 K #ffffff, linear interpolation, no per-crop stretching), exactly the ThermalCrop table in the web app's API Contract tab, so the UI legend and tooltip match. visible_day: the nearest 03:00 UTC (10:00 WIB) scan before as_of, satpy composite true_color ⚠️ check the composite name, same window.
  3. For thermal_night also write crops/{pixel_id}/{timestamp}_thermal.json: bbox, 20 × 20 cells, channels B07/B14 (Himawari) and SW038/IR105 (GK2A) in kelvin to 1 decimal, null = cloudy. The API serves it as images[].thermal.
  4. Save crops/{pixel_id}/{timestamp}_himawari_{kind}.png; return {path, signed_url, ts, kind, bbox}.

Done check

For one backtest cluster two PNGs and one JSON are created; the thermal image shows a brighter spot at the marker, and the marker cell in the JSON is hotter than the cells around it.

C2Role C

ADK agent, validator, asapify-agent service

Gemini verifies AWAS clusters without being able to change status.

Prerequisites

  • B1, B2, B3, A6

Outputs

  • agent/agent.py, schema.py, validator.py, main.py, run.py
  • Firestore verifications/{id}

Steps

  1. Copy the agent/agent.py and agent/schema.py skeletons from Backend 06; model from GEMINI_MODEL, location global, GOOGLE_GENAI_USE_VERTEXAI=True.
  2. Tool get_pixel_context(cluster_id, as_of): read clusters/{id} + 3 nights of score/ for the representative pixel (utility, attributes, neighbours). Limit: at most 8 calls per verification, counted in the tool layer.
  3. agent/validator.py: reject when the schema does not match, when viirs_within_2km_48h > 0 but the result is inconclusive, or when a number in the summary is not in the tool results. Fails twice → save inconclusive with the note validator_failed.
  4. agent/main.py (FastAPI): POST /verify {cluster_id, trigger_slot} (OIDC sa-jobs) → run the agent → save verifications/{cluster_id}_{slot} → send a summary to the operator group (TELEGRAM_OPERATOR_CHAT_ID). POST /cluster-closed {cluster_id} (no Gemini): if it was ever published, close the alert, label the inbox entries SELESAI and cancel unsent jobs.
  5. Test locally on one backtest cluster.
    python -m agent.run --cluster <ID from A7> --as-of 2023-09-25T16:00Z

Done check

The output has result ∈ {strong_evidence, inconclusive}, ≥ 1 evidence, ID and EN summaries; tool trace ≤ 8; validator passes; no status/level field.

C3Role C

asapify-api service

Endpoints for the operator web app and publish/reject decisions.

Prerequisites

  • C2

Outputs

  • api/main.py, api/routers/*.py

Steps

  1. Implement the endpoints exactly as in the Backend 03 table (public, operator, subscriber), including /operator/pixels, /operator/grid?format=compact, /operator/grid/night, /operator/nights and /operator/basemaps. JSON shapes, examples and error codes follow the web app's API Contract tab (/kontrak-api) exactly; the web app already uses all of them. The subscriber endpoints (/notifications/*), /operator/alerts/{id}/deliveries and the notification worker are already built in ktp-asapify-be (asapify_api/).
  2. Run locally. AUTH_DISABLED=1 is for local use only, never on Cloud Run.
    AUTH_DISABLED=1 uvicorn api.main:app --reload --port 8000
  3. Test.
    curl -s localhost:8000/api/v1/health
    curl -s localhost:8000/api/v1/meta | jq .nights
    curl -s "localhost:8000/api/v1/operator/grid?as_of=2023-09-25T16:00Z&format=compact" | jq '.status | length'
    curl -s "localhost:8000/api/v1/operator/nights?month=2023-09" | jq length
    curl -s "localhost:8000/api/v1/operator/clusters?as_of=2023-09-25T16:00Z" | jq length

Done check

/health → {"status": "ok", "version": …, "time": …}; /meta includes nights.first; the compact grid status length = A1 pixel count; the September night list and the cluster list for the backtest as_of are not empty.

C4Role C

Deploy jobs, services and Scheduler

The pipeline runs automatically on Cloud Run.

Prerequisites

  • A2–A6, C1, C2, C3

Outputs

  • 3 services + 5 jobs + 5 Scheduler schedules + a Cloud Tasks queue

Steps

  1. Create the Dockerfile and .gcloudignore at the repo root (Cloud setup 09), then deploy asapify-agent, asapify-api and asapify-notify (with its queue and sweep) using the commands in the same section.
  2. Deploy the five jobs and four schedules (Cloud setup 10): two ingests */10 20-23,0-4 * * *, evaluate 5-59/10 20-23,0-4 * * *, environment 0 12 * * * (all Asia/Jakarta), build without a schedule.
  3. Run build, then one replay cycle.
    gcloud run jobs execute asapify-build --region $REGION --wait
    for J in asapify-ingest-himawari asapify-ingest-gk2a; do
      gcloud run jobs execute $J --region $REGION --wait --update-env-vars AS_OF=2023-09-25T15:00:00Z
    done
    gcloud run jobs execute asapify-evaluate --region $REGION --wait --update-env-vars AS_OF=2023-09-25T15:10:00Z

Done check

Check:

gcloud run jobs executions list --job asapify-evaluate --region $REGION --limit 3   # Succeeded
gcloud scheduler jobs list --location $REGION                                    # 5 schedules ENABLED (4 jobs + notification sweep)
gcloud run services list --region $REGION                                        # asapify-agent, asapify-api, asapify-notify
Sprint 3 · 10–13 Oct

Web and notifications

Tasks: D1 · D2 · D3 · D4 · C5

Sprint done when: The end-to-end flow works at the public URL: replay → AWAS → verification → operator decision → subscriber Telegram DM + inbox.
D1Role D

Operator map

The operator sees the status of every peat pixel in Sumatra and Kalimantan (15 provinces).

Prerequisites

  • C3

Outputs

  • ktp-asapify-fe running in live mode against the API
  • Google sign-in (Firebase Auth) working on the team project

Steps

  1. The web app is already built in the team repo ktp-asapify-fe (React 19 + Vite + MapLibre 6). Run it in mock mode first (fictional Central Kalimantan backtest data for 24 Sep 2023, no backend).
    git clone https://github.com/KRL-TEAM-PROJECT/ktp-asapify-fe.git && cd ktp-asapify-fe
    npm ci
    npm run dev
  2. Switch to live mode: copy .env.example to .env.local and set VITE_API_MODE=live, VITE_API_BASE=http://localhost:8000 (the local C3 API), plus VITE_PEAT_LAYER_URL, VITE_PROVINCES_LAYER_URL (public bucket, Cloud setup 05) and VITE_FIREBASE_* (Cloud setup 11). The map, slot player and archive calendar call the endpoints in the API Contract tab.
  3. Google sign-in through Firebase Auth is already in src/auth.ts (9 Oct). An account without a claim only opens the Notifications page; give the demo operator account the claim role = operator (tools/set_operator.py in ktp-asapify-be), then sign out and in again.

Done check

Live mode, night of 25 Sep 2023 picked from the calendar: four statuses show with icon + colour, NO_OBSERVATION is hatched, AWAS clusters have a dashed outline, and the province boundary is highlighted when one province is selected. API down → an error banner, not a blank screen.

D2Role D

Cluster detail + ToolTrace

The operator sees why a pixel is AWAS (MAUT attributes, neighbours) and what the verification says.

Prerequisites

  • C2, C3, D1

Outputs

  • Data-vs-contract gaps noted in the WORKLOG log (empty if everything matches)

Steps

  1. The /kelompok/:id page already exists. Open a backtest cluster in live mode and match each panel to its API fields: the 3-night utility_score chart with lines at 0.30 and 0.65 (NO_OBSERVATION slots hatched); attribute bars u_H, u_G, u_LST, u_SAT, u_T, u_N with weights and the table of measured values (attribute_details); the 3 × 3 neighbour grid.
  2. Verification card: result (Strong evidence / Inconclusive), VIIRS + Himawari images, VIIRS detection list, agent summary, ToolTrace panel. Hover the thermal image: the tooltip shows cell temperatures from images[].thermal with a swatch on the 270–340 K scale.
  3. Fields that are empty or shaped differently are fixed in the API (C3), not in the web app: the web app follows the API Contract tab.

Done check

A backtest cluster shows the chart, attribute bars + value table, neighbour grid, two images (or a "no image" note) with temperature tooltips on the thermal image, and a ToolTrace of ≤ 8 rows.

D3Role D

Decision panel: publish / reject

Only an operator can publish an alert to subscribers.

Prerequisites

  • D2

Outputs

  • Real decisions saved through src/components/DecisionPanel.tsx

Steps

  1. The panel already exists: Publish (message text ≤ 1,024 characters, prefilled, editable) and Reject (reason required) → POST /operator/clusters/{id}/decision, response DecisionResponse. Test both in live mode. After publishing, the panel shows the queue summary and the send status per channel.
  2. Test the 409 path: open the same cluster in two tabs, decide in the first tab and then in the second. The second tab must show the ALREADY_DECIDED message and reload the detail.
  3. Clusters without a decision stay in the list with the label "undecided".

Done check

The decision is stored in alerts and audit_log; a second decision gets 409 and the UI shows the existing decision.

D4Role D

Subscriber notifications

Subscribers who chose that province get one message per channel and can confirm it.

Prerequisites

  • S0-5, C4, D3

Outputs

  • A demo subscriber account with Telegram linked
  • Send status shown at /operator/alerts/{id}/deliveries

Steps

  1. The code exists: Notification Engine v1 in ktp-asapify-be (Backend 06b) and the /notifikasi page in ktp-asapify-fe. Make sure the worker, queue, sweep and webhook are deployed (Cloud setup 09).
  2. Sign in with the demo subscriber's Google account (no role) → Notifications: pick Central Kalimantan, the Telegram channel, tick consent, save. Press Link Telegram, open the bot, press Start.
  3. Message text from the template in UI section 03b (in Indonesian): AWAS, province, coordinates, pixel count, utility, neighbours, "Himawari + GK2A sepakat", verification result, WIB time. Sent as plain text without a photo, with an Buka & konfirmasi diterima (open & confirm) button.
  4. Test in dry_run first (status simulated, nothing leaves), then set NOTIFICATION_MODE=live and TELEGRAM_ENABLED=true on api and the worker.

Done check

Publish in the UI → a DM reaches the demo account's Telegram in < 10 seconds and the message is in the web inbox; the decision panel shows status accepted. Press Confirm receipt → the status changes to confirmed. An account that chose another province receives nothing.

C5Role C

End-to-end test

Prove the full flow works at the public URL with replay data.

Prerequisites

  • C4, D1–D4

Outputs

  • scripts/e2e.sh
  • docs/e2e_log.txt

Steps

  1. scripts/e2e.sh: run ingest + evaluate replay for three nights of a backtest cluster, wait for verification, then call decision with the demo operator token.
    bash scripts/e2e.sh --cluster <ID> --start 2023-09-23 --end 2023-09-25

Done check

The cluster appears on the public map, the verification is stored, and the message appears in the operator group, then as a DM and in the inbox of the demo subscriber. The log is saved.

Sprint 4 · 14–16 Oct

Test and freeze

Tasks: A8 · C6 · D5

Sprint done when: Three replays run without errors; final backtest and agent-evaluation figures are recorded. Freeze 16 Oct 23:59 WIB.
A8Role A

Calibration and final backtest figures

Final MAUT weights/thresholds and the figures used in the deck and video.

Prerequisites

  • A7

Outputs

  • docs/calibration.csv
  • docs/backtest_final.csv, .png

Steps

  1. Try at most 6 combinations of AWAS threshold (0.60/0.65/0.70) × neighbour requirement (0.25/0.375) on the first half of the window (Sep); pick the one with the fewest false alarms and misses ≤ A7.
    python -m jobs.calibrate --start 2023-09-01 --end 2023-09-30 --grid awas=0.60,0.65,0.70 nbr=0.25,0.375
  2. Test the chosen combination on 1–15 Oct 2023 (data not used for picking). Write parameter changes in WORKLOG section 7.

Done check

Final figures (median lead time, false alarms, misses, cloudy slots) for 1–15 Oct are recorded in the WORKLOG and sent to D.

C6Role C

Agent evaluation

Show the agent is consistent with the evidence.

Prerequisites

  • A8, C2

Outputs

  • docs/agent_eval.csv

Steps

  1. Run the agent on every backtest cluster; table cluster_id, result, smoke_visible, viirs_within_2km_48h, viirs_image_age_h, tool_calls, validator_ok.
    python -m agent.evaluate --start $BACKTEST_START --end $BACKTEST_END > docs/agent_eval.csv

Done check

Every row has validator_ok = true and tool_calls ≤ 8; the strong_evidence/inconclusive percentages are recorded.

D5Role D

UI on a 360 px screen and freeze

Ready to show the judges from a phone.

Prerequisites

  • D1–D4

Outputs

  • freeze commit tagged v1.0 in ktp-asapify-be and ktp-asapify-fe

Steps

  1. Open the web app in Chrome DevTools at 360 × 740; fix clipped elements or buttons < 44 px. Also check Lite mode (plain map, no motion) and the system reduced motion setting.
  2. Build in live mode and deploy to Firebase Hosting (Cloud setup 11); this is the URL that gets judged. After 16 Oct 23:59 WIB, bug fixes only.

Done check

No horizontal scroll at 360 px; lite mode and reduced motion move nothing; the Firebase Hosting URL opens in an incognito window; tag v1.0 exists in both repos.

Sprint 5 · 17–18 Oct

Submit

Tasks: D6 · D7

Sprint done when: The submission confirmation from Hack2Skill is received.
D6Role D

3-minute video

Show the flow, the two satellites, and Gemini via ADK as the verifier.

Prerequisites

  • C5, A8

Outputs

  • Video link

Steps

  1. Record following the WORKLOG section 16 script in replay mode; show the MAUT attribute bars and ToolTrace; English narration and subtitles; credit the source as "NOAA open data"; say "AI is not the detector". Upload to YouTube (unlisted) or Drive (anyone with the link).

Done check

Duration ≤ 3:00; plays in an incognito window.

D7Role D

Final submission deck and submit

Complete materials are sent before the deadline.

Prerequisites

  • A8, D6

Outputs

  • Final ASAPify_Pitch.pdf
  • Submission confirmation

Steps

  1. Update the deck: real screenshots, final backtest figures, team slide, prototype URL, video link. Export to PDF.
  2. Turn on minimum instances for judging.
    gcloud run services update asapify-api --region $REGION --min-instances 1
    gcloud run services update asapify-agent --region $REGION --min-instances 1
  3. Submit on Hack2Skill; tick the WORKLOG section 16 checklist.

Done check

The submission confirmation email/page is received (target 17 Oct).