Research a corrected finding#

What this demonstrates#

This example finds a bounded set of durable coastal-flood artifacts, exact-reads every artifact used, follows supersession, preserves limitations and an unknown extension namespace, and reports whether discovery was complete. It uses synthetic fixture data based on the skill’s positive lineage evaluation; it does not claim to show a production service response or wire format.

Example input#

The user supplies a project-scoped question and bounds:

{
  "project_id": "delta",
  "question": "What is the current durable coastal-flood finding for 2025-02-01?",
  "search_text": "coastal flood peak depth",
  "spatial_scope": {
    "type": "Polygon",
    "coordinates": [
      [
        [-89.30, 29.10],
        [-89.00, 29.10],
        [-89.00, 29.35],
        [-89.30, 29.35],
        [-89.30, 29.10]
      ]
    ]
  },
  "temporal_scope": {
    "start": "2025-02-01T00:00:00Z",
    "end": "2025-02-02T00:00:00Z"
  },
  "result_limit": 10
}

For an offline demonstration, the host-capability facts are represented by this bounded fixture. Search entries contain discovery metadata only; exact_reads contains the canonical values on which the answer may rely.

{
  "discovery": {
    "scope": {
      "project_id": "delta",
      "search_text": "coastal flood peak depth",
      "spatial_scope": {
        "type": "Polygon",
        "coordinates": [[[-89.30, 29.10], [-89.00, 29.10], [-89.00, 29.35], [-89.30, 29.35], [-89.30, 29.10]]]
      },
      "temporal_scope": {
        "start": "2025-02-01T00:00:00Z",
        "end": "2025-02-02T00:00:00Z"
      }
    },
    "limit": 10,
    "completeness": "complete_within_bounds",
    "ranking_basis": "host_provided",
    "warnings": [],
    "artifact_ids": [
      "delta-flood-001",
      "delta-flood-002"
    ]
  },
  "exact_reads": [
    {
      "artifact_id": "delta-flood-001",
      "kind": "observation",
      "finding": "peak depth 1.2 m",
      "measures": {
        "peak_depth": {"value": 1.2, "unit": "m", "method": "shoreline_model"}
      },
      "valid_time": "2025-02-01",
      "limitations": [
        "cloud-obscured shoreline"
      ],
      "superseded_by": [
        "delta-flood-002"
      ],
      "content_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "extensions": {
        "urn:example:hydrology:v1": {
          "quality_flag": "shoreline_interpolated"
        }
      }
    },
    {
      "artifact_id": "delta-flood-002",
      "kind": "observation",
      "finding": "corrected peak depth 0.9 m",
      "measures": {
        "peak_depth": {"value": 0.9, "unit": "m", "method": "gauge_interpolation"}
      },
      "valid_time": "2025-02-01",
      "limitations": [
        "gauge interpolation"
      ],
      "derived_from": [
        "delta-flood-001"
      ],
      "supersedes": [
        "delta-flood-001"
      ],
      "content_hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "extensions": {
        "urn:example:hydrology:v1": {
          "quality_flag": "gauge_corrected"
        }
      }
    }
  ]
}

Workflow#

  1. The host applies trusted project scope and calls gkb_search with the text and result limit. It owns service location, authentication, retries, and response bounds.

  2. The skill workflow records the returned bounds, completeness, ranking basis, warnings, and stable IDs. It does not treat snippets or rank as findings.

  3. The host calls gkb_read separately for delta-flood-001 and delta-flood-002.

  4. The skill workflow compares the exact canonical artifacts, follows supersedes, superseded_by, and derived_from, and preserves each limitation and extension value.

  5. The skill workflow produces a bounded answer with stable citations and an explicit completeness statement. There is no offline script for this skill and no filesystem or database fallback.

Example output#

This is the skill-level result derived from the typed peak_depth measure above, not a service response. The free-text finding is preserved rather than parsed into a measurement:

{
  "status": "answered",
  "discovery": {
    "scope": {
      "project_id": "delta",
      "search_text": "coastal flood peak depth",
      "spatial_scope": {
        "type": "Polygon",
        "coordinates": [[[-89.30, 29.10], [-89.00, 29.10], [-89.00, 29.35], [-89.30, 29.35], [-89.30, 29.10]]]
      },
      "temporal_scope": {
        "start": "2025-02-01T00:00:00Z",
        "end": "2025-02-02T00:00:00Z"
      }
    },
    "completeness": "complete_within_bounds",
    "ranking_basis": "host_provided",
    "result_limit": 10,
    "artifact_ids": [
      "delta-flood-001",
      "delta-flood-002"
    ],
    "warnings": []
  },
  "current_artifact_id": "delta-flood-002",
  "current_finding": {
    "value": 0.9,
    "unit": "m",
    "method": "gauge_interpolation",
    "finding": "corrected peak depth 0.9 m",
    "content_hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "valid_time": "2025-02-01",
    "limitations": [
      "gauge interpolation"
    ]
  },
  "superseded_artifacts": [
    {
      "artifact_id": "delta-flood-001",
      "finding": "peak depth 1.2 m",
      "content_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "limitations": [
        "cloud-obscured shoreline"
      ]
    }
  ],
  "lineage": {
    "delta-flood-001": {
      "superseded_by": ["delta-flood-002"]
    },
    "delta-flood-002": {
      "derived_from": [
        "delta-flood-001"
      ],
      "supersedes": [
        "delta-flood-001"
      ]
    }
  },
  "opaque_extensions": {
    "delta-flood-001": {
      "urn:example:hydrology:v1": {
        "quality_flag": "shoreline_interpolated"
      }
    },
    "delta-flood-002": {
      "urn:example:hydrology:v1": {
        "quality_flag": "gauge_corrected"
      }
    }
  }
}

Human-readable result#

Within the supplied project, space, time, text, and ten-result bound, discovery was complete and returned two artifacts. Exact read delta-flood-002 is the current corrected finding: peak depth was 0.9 m on 2025-02-01, limited by gauge interpolation. It explicitly supersedes and derives from delta-flood-001, whose earlier 1.2 m finding remains part of the immutable history and retains its cloud-obscured-shoreline limitation. The urn:example:hydrology:v1 values are preserved verbatim and are not interpreted by this skill.

Limitations#

  • complete_within_bounds means the host reported complete discovery only for the stated query, project scope, polygon, time interval, and limit. It is not global completeness.

  • A bounded or truncated search must be reported as such; do not silently upgrade it to complete.

  • Search hits establish candidates, not facts. If either exact read fails, return a stopped or partial status and omit any unsupported canonical conclusion.

  • Unrelated or competing artifacts remain separate unless exact lineage or supersession connects them. Unknown extension namespaces remain opaque.

Reproduce#

There is intentionally no offline GKB client. From the repository root, in a Python 3 development environment containing pytest==8.4.2 (the version used in CI), validate the worked example’s machine-readable blocks and its exact-read/derived-result consistency:

PYTHONDONTWRITEBYTECODE=1 python3 -m pytest -q tests/test_examples.py -k gkb_research

That is an offline documentation consistency check, not a service replay. An end-to-end run requires host-provided gkb_search and gkb_read; the skill intentionally supplies no standalone service client.