GeoNeMo report generation worked example#

Contents#

What this demonstrates#

This example turns one bounded synthetic reporting manifest derived from a change result into deterministic Markdown and a standalone HTML page. The renderer preserves the exact result, records evidence and report SHA-256 hashes, and does not rerun analysis, fetch data, or publish anything.

Example input#

The manifest is bounded structured data. The evidence entry names a regular staged file; it is not a URL or an arbitrary server path.

{
  "manifest": {
    "schema_version": "geo_change.v3",
    "status": "detected",
    "before": {
      "collection": "imagery",
      "record_id": "a",
      "asset_id": "tci-a",
      "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    },
    "after": {
      "collection": "imagery",
      "record_id": "b",
      "asset_id": "tci-b",
      "sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
    },
    "measurement": {
      "changed_area_km2": 1.25
    },
    "warnings": [
      "analysis grid was coarsened"
    ],
    "limitations": [
      "Changed pixels do not establish object identity or cause."
    ],
    "truncated": false,
    "provenance": {"implementation": "analyze_change.py/3.0.0"}
  },
  "title": "Harbor change review",
  "evidence": [
    {
      "file": "difference.txt",
      "label": "Synthetic difference evidence",
      "media_type": "text/plain"
    }
  ]
}

The manifest intentionally selects source identity, status, measurement, warnings, limitations, truncation, and provenance to keep the example small. A production caller should pass the complete bounded result when it needs quality, regions, evidence manifest, uncertainty, or other sections rendered rather than shown as not supplied. Outer-envelope warnings, truncation, and implementation provenance are mapped into this reduced manifest explicitly. The checked-in evidence fixture contains 27 bytes and has SHA-256 eba01b16d2ffe4b5f43f2335397dc037c8e537f12e8a4787d6f6baf960f21117.

Workflow#

  1. The host supplies the exact result manifest and explicitly stages bounded evidence.

  2. The offline scripts/render_report.py render command validates the envelope and paths.

  3. The script hashes canonical manifest JSON and every listed evidence file.

  4. The script writes only report.md and report.html into the pre-created empty output directory and returns their relative names and hashes.

  5. The host presents those files. No model, service, credential, or publication call occurs in the script.

Example output#

The script returns this structured envelope for the example:

{
  "data": {
    "evidence": [
      {
        "file": "difference.txt",
        "label": "Synthetic difference evidence",
        "media_type": "text/plain",
        "sha256": "eba01b16d2ffe4b5f43f2335397dc037c8e537f12e8a4787d6f6baf960f21117",
        "size_bytes": 27
      }
    ],
    "manifest_sha256": "39ab5838698de32d806c48b3a3ec6887893c08976620ad0cf35eddfd2643aea2",
    "outputs": {
      "html": {
        "file": "report-out/report.html",
        "sha256": "fc5f07c813388f6ac2a08fad4807ee81ba5a276e726ba034dd43b4fdc930414c"
      },
      "markdown": {
        "file": "report-out/report.md",
        "sha256": "4b181335ad97c8f12acaba6c5534e80b1870d4d19c2228d7acda1fc0b99a369e"
      }
    },
    "schema_version": "geo_change.v3"
  },
  "ok": true,
  "provenance": {
    "implementation": "render_report.py/2.0.0"
  },
  "status": "complete",
  "truncated": false,
  "warnings": []
}

The beginning of the generated Markdown is human-readable while retaining exact JSON values:

# Harbor change review

Schema: geo\_change\.v3

## Status

```json
"detected"
```

## Measurement

```json
{
  "changed_area_km2": 1.25
}
```

## Provenance

```json
{
  "implementation": "analyze_change.py/3.0.0"
}
```

## Limitations

```json
[
  "Changed pixels do not establish object identity or cause."
]
```

## Truncation

no

The standalone HTML contains the complete Markdown report in escaped form and needs no server, JavaScript, stylesheet, or external asset.

Human-readable result#

The supplied analysis detected 1.25 km² of change between exact assets tci-a and tci-b. The report warns that the grid was coarsened and explicitly says changed pixels do not establish identity or cause. Rendering completed, but that status describes rendering only; it is not an independent validation or publication of the analysis.

Limitations#

  • The renderer presents supplied facts; it cannot repair or infer missing analysis fields.

  • Only geo_change.v3 receives specialized ordering. Other schemas use the generic adapter and produce an explicit warning.

  • Evidence is limited to 24 staged files, 8 MiB each and 32 MiB total. The manifest and rendered artifacts have separate documented bounds.

  • Relative output paths are staging-local and are not durable artifact IDs.

Reproduce#

From the geonemo-report-generation installed skill directory, with Python 3 available:

example_stage="$(mktemp -d /tmp/geonemo-report-example.XXXXXX)"
mkdir "$example_stage/report-out"
cp evals/files/difference.txt "$example_stage/difference.txt"
printf '%s' '{"manifest":{"schema_version":"geo_change.v3","status":"detected","before":{"collection":"imagery","record_id":"a","asset_id":"tci-a","sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"after":{"collection":"imagery","record_id":"b","asset_id":"tci-b","sha256":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},"measurement":{"changed_area_km2":1.25},"warnings":["analysis grid was coarsened"],"limitations":["Changed pixels do not establish object identity or cause."],"truncated":false,"provenance":{"implementation":"analyze_change.py/3.0.0"}},"title":"Harbor change review","evidence":[{"file":"difference.txt","label":"Synthetic difference evidence","media_type":"text/plain"}]}' | python3 scripts/render_report.py render --staging-dir "$example_stage" --output-dir report-out

Open $example_stage/report-out/report.html in a browser or read $example_stage/report-out/report.md. Reproduction uses only the checked-in synthetic fixture.