Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
31e25cf
Analyst: autonomous narrate → review → publish (`earthdeck analyst --…
marcoloco23 Sep 26, 2026
9cc589d
VISION §15: valuing the living world — the bioeconomy thesis and eart…
marcoloco23 Sep 26, 2026
bb72693
Merge branch 'worktree-agent-a6aeaccaeced89818' into worktree-earth-w…
marcoloco23 Sep 26, 2026
907505a
Ledger: autonomous publishing policy 2026-09-26-autonomous behind che…
marcoloco23 Sep 26, 2026
2963866
analyst: name detector ignores month abbreviations and line breaks; f…
marcoloco23 Sep 26, 2026
a3ab7a9
natural_value: what a place is worth alive (benefit transfer) + livin…
marcoloco23 Sep 26, 2026
6027e61
Merge branch 'worktree-agent-a362a15b72042b286' into worktree-earth-w…
marcoloco23 Sep 26, 2026
4e7c2f0
Merge branch 'worktree-agent-ad6e2a17f78c2872b' into worktree-earth-w…
marcoloco23 Sep 26, 2026
67e5373
AWS hosting for Earth Watch: CloudFormation stack, Lambda runner, dep…
marcoloco23 Sep 26, 2026
90caa55
analyst: publish through schema.publishGates (the contract decides)
marcoloco23 Sep 26, 2026
74e739e
Merge branch 'worktree-agent-a6ade71b4de3a34e0' into worktree-earth-w…
marcoloco23 Sep 26, 2026
ac10c5c
trust contract: an unreachable-party notice must record ≥ 2 attempted…
marcoloco23 Sep 26, 2026
7ad4c8c
Earth Engine research + gee_query prototype (REST, no new deps)
marcoloco23 Sep 26, 2026
3819b9d
Static public site: `earthdeck watch export` (Vital) — SSR pages, SEO…
marcoloco23 Sep 26, 2026
e1a782e
Site: default base URL https://vitalearth.io; 'Vital Earth' as the lo…
marcoloco23 Sep 26, 2026
b98cb77
Site: default base URL back to https://vital.marcsperzel.com (domain …
marcoloco23 Sep 26, 2026
9b9fda4
Merge branch 'worktree-agent-a3090cfc0c7ec0e68' into worktree-earth-w…
marcoloco23 Sep 26, 2026
1c31ab1
Merge branch 'worktree-agent-ac65f567a3450fcad' into worktree-earth-w…
marcoloco23 Sep 26, 2026
92c289d
infra: CloudFront directory-index rewrite for static case pages; depl…
marcoloco23 Sep 26, 2026
6b1d1e4
CONTINUITY: session 8c handoff (Vital, autonomous publishing, hosting)
marcoloco23 Sep 26, 2026
1e09b34
site: neutral name (Earth Watch) until the product name is chosen — '…
marcoloco23 Sep 26, 2026
e9447c4
runner: export with base URL, contact and TRUST.md (site URL + contac…
marcoloco23 Sep 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/false-positive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: False positive
about: A finding looks wrong — the signal isn't what the rule says it is.
title: "False positive: "
labels: false-positive
---

<!--
If a reviewer agrees, the finding moves to `false_positive` with your reason as a signed
event. It stays in the ledger — publicly, forever — and counts against its rule's published
false-positive rate. That's the point: the rate only improves when the rules do.
-->

**Finding id** (from the case page URL, `watch/case/<id>/`):

**What you think it actually is** (e.g. seasonal burn, cloud shadow, sensor artefact, wrong boundary):

**How to check** (a scene id, a date, a map link, local knowledge — anything a reviewer can reproduce):

**Anything else:**
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/right-of-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Right of reply
about: You are named in, or affected by, a published finding and want your reply on the record.
title: "Right of reply: "
labels: right-of-reply
---

<!--
Your reply is recorded as a signed `replied` event in the findings ledger and shown
verbatim on the case page, next to the evidence. Nothing in the ledger is ever edited or
deleted; corrections are new events. If you'd rather not reply in public, say so below and
leave a way to reach you — we'll take it from there.
-->

**Finding id** (from the case page URL, `watch/case/<id>/`):

**Who you are / on whose behalf you reply** (organisation, role):

**Your reply** (this text is published verbatim):

**Evidence you'd like considered** (links, documents, dates — optional):

**Can we contact you privately?** (email or other channel — optional, not published):
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ npm-debug.log*
data/ledger/ledger.key
data/ledger/*.tmp
data/
build/
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ test → build on every push/PR.
| --- | --- | --- |
| `CDSE_CLIENT_ID` / `CDSE_CLIENT_SECRET` | `eo_search`, `eo_render`, `eo_index`, `eo_compare` | Free Copernicus Data Space OAuth client |
| `FIRMS_MAP_KEY` | `fires_in` | Free NASA FIRMS map key |
| `GEE_SERVICE_ACCOUNT_JSON` / `GEE_PROJECT` | `gee_query` | Earth Engine service-account key (path or inline JSON) + EE-registered Cloud project — see `docs/research/2026-09-26_google-earth-engine.md` |
| `EARTHDECK_DASHBOARD_URL` | card push target | default `http://127.0.0.1:5005` |
| `EARTHDECK_DASHBOARD_PORT` | dashboard server | default `5005` |

Expand Down
82 changes: 35 additions & 47 deletions CONTINUITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,56 +10,44 @@ reference is [CLAUDE.md](CLAUDE.md); the phase plan is [ROADMAP.md](ROADMAP.md).

- Agent read full file: YES
- Current task understood: YES
- Current task: **Session 8b complete (2026-09-26, local Mac, Fable orchestrator + 6 Opus
workers in worktrees).** MVP = M2 live-verified + M3 shipped + UI overhaul + life layer.
**M2 exit criterion met**: first real `watch --once` sweep opened 8 findings, confirmed 2
by NDVI (São Félix 232 ha, Novo Progresso 727 ha); ledger verified. Controls (Jaú,
Salonga) fired at detect stage on ~15–19 ha/90 d of radar floodplain noise → tuned to
minHa 25 / minAlerts 300 (re-verified quiet), both recorded as `false_positive` via
`ledger_advance`. **Live bugs fixed**: GFW `byConfidence` is nested (every `created` was
rejected; dry-run now validates too); OWID ignores `country=` on several charts (filter by
code + `csvType=full` fallback + per-indicator `column`); FIRMS caps `dayRange` at 5.
**M3 shipped + live-verified**: `protected_areas` (Overpass + LandMark + WDPA ids/stats via
GFW — São Félix → APA Triunfo do Xingu), `emitters` (Climate TRACE v7: 59 cattle assets in
São Félix), `methane_plumes` (S5P CH₄ Permian +6 ppb vs baseline; EMIT feed stale since
2025-09-22; MARS gated), `flaring` (Rumaila 25 persistent clusters, 22 matched to EOG VNF
2024 sites — zero-key), rules `methane_anomaly@1.0` + `flaring@1.0` (Rumaila confirmed
live via VNF), `ledger_*` ×7 (never publish), doctor Watch section, JSON Schema export.
**UI**: design system + feed/Watch/case/verify pages + charts + mobile
(`docs/screenshots/ui-after-*.jpg`), Emil Kowalski skills in `.agents/skills`.
**Life layer**: see PROGRESS (biodiversity, species, coral_bleaching, world_pulse life
indicators). Tool count via `node scripts/list-tools.mjs`.
- Session started: 2026-09-26 (Session 8b)
- Current task: **Session 8c complete (2026-09-26 evening, local; Fable orchestrator + 6 more
Opus workers).** Product renamed **Vital** (earthdeck.co is someone else's; the CLI/npm
package keeps `earthdeck` for now). **The system now publishes on its own**: trust contract
`2026-09-26-autonomous` (`TRUST.md`) + `earthdeck analyst --once` (Opus narrates, Sonnet
reviews with verdict, publish through `publishGates`) — São Félix and Novo Progresso are
the first AI-published cases (ledger 18 entries, verify OK). **Living value**:
`natural_value` + `living_value_*` on findings + VISION §15 + research doc. **Public site**:
`earthdeck watch export` (static, SEO, per-case HTML, in-browser proofs). **Hosting**:
CloudFormation stack `earthdeck` in Marc's personal AWS (us-east-1), Lambda runner on a
6-hourly schedule, site at `https://vital.marcsperzel.com`. **GEE**: research + `gee_query`
client (needs a GCP project/key — UNCONFIRMED live). 283 tests, 43 tools. PR #4.
- Session started: 2026-09-26 (Session 8c)

---

## HANDOFF → next session (written 2026-09-26, local)

Everything is merged on one branch and pushed; PR is a draft until Marc reviews. In order:

1. `git checkout main && git pull` after the PR merges; `pnpm install && pnpm build && pnpm
test`. pnpm 11 needs `pnpm-workspace.yaml` `allowBuilds: esbuild` (committed).
`.env` holds GFW/CDSE/FIRMS keys; the CLI does not load it — use `node --env-file=.env
dist/cli.js …`. `node scripts/probe-tool.mjs <tool> '<json>'` calls any tool in-process.
2. **Look at the dashboard** with the real ledger: `node --env-file=.env dist/cli.js
dashboard` → Watch tab shows the 8 real cases (2 confirmed, 2 false positives).
3. **Next build steps (M3 tail → M4)**: (a) wire attribution *onto cases* — the kernel's
`created.context` should carry `protected_areas` + `emitters` hits for the AOI (tools
exist; ~1 h); (b) `methane_anomaly` needs a live confirmer while EMIT is stale → use
`emitters` proximity as the second signal (the `TODO(emitters)` hook in
`src/watch/rules/methaneAnomaly.ts`); (c) expose the sweep heartbeat on a dashboard
endpoint so the header shows it (UI worker note); (d) M4: `watch export` static site +
`.github/workflows/watch.yml` schedule.
4. **Tuning with data**: Kayapó/Apyterewa (60 d, minHa 5) open at 16–34 ha — intended
sensitivity, confirmation gates them; methane 20 ppb threshold untuned; flaring Bakken
had one transient FIRMS fetch failure (kernel recorded a gap, correct).
5. Known gaps: reviewer identity in `ledger_review` is unauthenticated (caller's honesty);
UNEP MARS needs email authorization; EMIT plume feed may have paused; Overpass public
server returns 504 under load (tool degrades, reports source unavailable).

Sub-agents (Opus, isolated worktrees, one per disjoint file set, orchestrator merges) worked
well today: six workers, ~4 h wall clock, every branch merged with only append-style
conflicts in `src/index.ts`, `rules/index.ts`, `README.md`, `doctor.ts`.
## HANDOFF → next session (written 2026-09-26 late, local)

1. `git checkout main && git pull && pnpm install && pnpm build && pnpm test` (283). Keys in
`.env` incl. `ANTHROPIC_API_KEY`; run CLI with `node --env-file=.env dist/cli.js …`.
2. **Hosting state**: stack `earthdeck` (profile `personal`, us-east-1). `scripts/deploy.sh`
is idempotent (`EARTHDECK_DOMAIN` overrides the host; default `vital.marcsperzel.com`).
`scripts/run-job.sh sweep controls --dry-run` exercises the runner; `scripts/seed-state.sh`
copies the local ledger to S3 (refuses unless keys match). Schedules: sweeps every 6 h
staggered (amazon :00 … flaring :40), analyst :50, export +1 h. Alarm email:
me@marcsperzel.com. Check `state/heartbeat.json` in the state bucket.
3. **Naming is open**: Marc rejected `vitalearth.io` (registered 2026-09-26, $71/yr — drop it
or keep as redirect; check the refund window). `vital.earth` is taken. Do NOT register
anything without showing him the exact name + price first (memory: ask-before-purchases).
Brand strings live in `src/site.config.ts` (name, full name, tagline, base URL).
4. **Next build steps**: (a) attribution onto cases in `created.context` (`protected_areas` +
`emitters`); (b) `emitters` as the methane confirmer while EMIT is stale; (c) `ledger verify
--remote <base-url>` (the case pages already print it); (d) GEE: Marc creates the GCP
project + service-account key (7 steps in `docs/research/2026-09-26_google-earth-engine.md`)
→ live-verify `gee_query`; MapBiomas pasture to fix the pasture-as-grassland flaw in
`natural_value`; (e) community votes on cases (signal, not gate) — needs a tiny backend;
(f) `SITE.dataLicense` choice; (g) M5 docs (CONTRIBUTING, detectors, published error rate).
5. Known risks: reviewer identity is self-declared model strings; EMIT plume feed stale since
2025-09-22; Overpass 504s under load; FIRMS throttles after bursts (kernel records gaps).


## WORKFLOW (every session)
Expand Down
47 changes: 47 additions & 0 deletions PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,53 @@ status, next priorities. The live task pointer is in [CONTINUITY.md](CONTINUITY.

---

## Session: 2026-09-26 (local, 8c) — Vital: the system publishes on its own; living value; hosting ✅

**Focus**: Marc's decisions in one evening: *publishing is an AI act* (fully autonomous,
humans verify after, community votes later as signal); host it on his personal AWS; value
nature *alive* (ecosystem services, Natural Asset Companies, the bioeconomy thesis);
Google Earth Engine as the next data substrate; a public, SEO-indexable site; rename to
**Vital** (earthdeck.co belongs to someone else). Same pattern as 8b: one orchestrator,
Opus workers in worktrees, merged here. 283 offline tests, 43 tools.

**Done**:
- [x] **Trust contract `2026-09-26-autonomous`** (`TRUST.md`, `src/ledger/schema.ts`):
a `model:` actor may publish only with a narration + a review by a *different* model
with verdict `publish`, tier ≤ 2; naming a party needs two distinct reviewers and a
72 h private notice — or an `unreachable` notice that lists ≥ 2 attempted channels;
`status_changed.gates` records why; `publishGates()`; JSON Schema regenerated.
- [x] **Analyst** (`earthdeck analyst --once`, `src/analyst/`): Opus narrates (strict JSON,
faithfulness check — every number must exist in evidence, rounding-tolerant; no-persons
detector), Sonnet reviews, publish/hold/reject appended through the contract. Two
live bugs from the first run fixed (month abbreviations / line breaks flagged as
names; "232 ha" vs 232.05 rejected). **First two autonomous publications**: São
Félix and Novo Progresso — 4 API calls, $0.12; ledger 18 entries, verify OK.
- [x] **Valuing living nature**: `natural_value` (Costanza 2014 / de Groot 2012 per-biome
values, whale/elephant/tree references, 100-y living value vs one-time clearing,
method + blind spots; land cover from CLMS 10 m via CDSE — pasture-as-grassland flaw
flagged), `living_value_*` on forest-loss findings (São Félix bbox ≈ $2.0 bn/yr alive;
the 232 ha case ≈ $1.56 M/yr), research `docs/research/2026-09-26_valuing-living-
nature.md` (ESVD/SEEA/IPBES, IEG NACs and the NYSE withdrawal, biodiversity credits,
debt-for-nature, TFFF, the valuation-provider angle), VISION §15.
- [x] **Public static site** (`earthdeck watch export --out DIR --base-url URL`): landing +
cases index + one real HTML page per case (SEO: titles, canonical, OG, JSON-LD
Organization/Dataset/Report, sitemap, robots), in-browser Merkle proof checks, stats
incl. false-positive rate per rule and living value at stake, `site.config.ts` holds
the brand (Vital), issue templates for right of reply / false positive.
- [x] **Hosting** (`infra/earthdeck.yaml`, `src/runner/`, `scripts/deploy.sh|run-job.sh|
seed-state.sh`): S3 site + state, CloudFront + ACM + Route 53, Lambda runner (arm64,
SSM secrets, verify-before-upload, heartbeat + alarm), EventBridge every 6 h staggered
per watchlist + analyst + export. Deployed 2026-09-26 evening (see CONTINUITY).
- [x] **Google Earth Engine**: research (`docs/research/2026-09-26_google-earth-engine.md`:
noncommercial free tier, REST API, MapBiomas pasture / Dynamic World / GEDI / Global
Pasture Watch / WorldPop) + `gee_query` client with service-account JWT auth (offline
tested; needs Marc's GCP project + key — UNCONFIRMED live).
- [x] Domain: `vital.earth` is taken; `vitalearth.io` was registered ($71/yr) — Marc finds it
too long → placeholder only; naming still open. Interim host `vital.marcsperzel.com`.

**Lesson (saved to memory)**: confirm the exact item + price before any purchase, even
under a blanket "just do it".

## Session: 2026-09-26 (local, 8b) — Earth Watch MVP: M2 live-verified, M3 shipped, UI overhaul, life layer ✅

**Focus**: Marc's brief — "build the MVP today": one Fable orchestrator planning and
Expand Down
Loading
Loading