{
  "$schema": "https://gismap.online/schemas/agent-recipe-v1.schema.json",
  "schemaVersion": 1,
  "id": "spatial-3d-chart",
  "title": "3D spatial chart (strata, footprint stacks)",
  "status": "experimental",
  "question": "Can an AI agent separate overlapping events by year in 3D?",
  "answer": "On the MapLibre engine, yes: a spatialChart lifts each group (such as a year) into its own virtual-Z slot, or extrudes by a measure, without changing the source polygons. It is a display technique, not overlay analysis.",
  "triggers": [
    "Separate overlapping fire perimeters by year",
    "Stack these events in 3D by year",
    "Make a five-part 3D brief of fire history"
  ],
  "inputTypes": [
    "Polygon layer with a group (year) field"
  ],
  "inputs": {
    "required": [
      {
        "name": "source",
        "description": "Polygon layer."
      },
      {
        "name": "groupBy",
        "description": "Field with at most 40 distinct values."
      }
    ],
    "optional": [
      {
        "name": "heightField",
        "description": "Nonnegative numeric field."
      },
      {
        "name": "slotMeters",
        "description": "Slot height."
      },
      {
        "name": "gapMeters",
        "description": "Gap between slots."
      }
    ]
  },
  "capabilities": [
    "spatial-chart-3d"
  ],
  "engines": [
    "maplibre",
    "arcgis"
  ],
  "steps": [
    {
      "stage": "discover",
      "action": "Read llms.txt, this recipe and api/capabilities.json; note the engine and execution environment you actually have.",
      "interfaces": [
        "declarative-url"
      ],
      "references": [
        "https://gismap.online/llms.txt",
        "https://gismap.online/api/capabilities.json",
        "https://gismap.online/api/manifest.json"
      ]
    },
    {
      "stage": "inspect",
      "action": "Read the source metadata: geometry type, field names and types, spatial reference, extent, sentinels and query support. Query real values before filtering; never invent fields.",
      "interfaces": [
        "declarative-url",
        "standalone-js",
        "in-browser-api"
      ],
      "references": [
        "<layer URL>?f=pjson",
        "sources.inspect",
        "sources.detectSentinels",
        "layers.metadata"
      ]
    },
    {
      "stage": "execute",
      "action": "Add spatialChart to the map-v1 layer, or call briefing.generateTemplate({ template: \"spatial-3d-chart\" }) in the page.",
      "interfaces": [
        "declarative-url",
        "in-browser-api"
      ],
      "references": [
        "https://gismap.online/schemas/map-v1.schema.json",
        "briefing.generateTemplate"
      ]
    },
    {
      "stage": "verify",
      "action": "Check the Z legend, the strata order and source-event identify.",
      "interfaces": [
        "in-browser-api"
      ],
      "references": [
        "layers.list"
      ]
    }
  ],
  "artifact": {
    "type": "map",
    "schema": "https://gismap.online/schemas/map-v1.schema.json",
    "structure": "map-v1 layer.spatialChart, or briefing slides with spatialChart."
  },
  "outputs": [
    {
      "format": "Interactive map or briefing link",
      "interface": "declarative-url",
      "interactive": true
    }
  ],
  "verification": [
    "Z legend states the meaning",
    "Groups ordered",
    "Restored after the briefing closes"
  ],
  "limitations": [
    "MapLibre and ArcGIS engines; the ArcGIS SceneView draws extrude symbols with a meters size variable and Decode() base heights.",
    "Fast display: no exact overlap partition or unique-area totals.",
    "At most 40 groups."
  ],
  "recovery": [
    "Filter the layer or use a coarser group field when there are more than 40 values."
  ],
  "examples": [
    {
      "checkedOn": "2026-10-21",
      "checkedVersion": "0.53.0",
      "title": "See the skill reference",
      "prompt": "Separate these overlapping fire perimeters by year.",
      "dataset": [
        {
          "label": "California historic fire perimeters (CAL FIRE)",
          "url": "https://services1.arcgis.com/jUJYIo9tSA7EHvfZ/ArcGIS/rest/services/California_Historic_Fire_Perimeters/FeatureServer/0"
        }
      ],
      "page": "https://gismap.online/skills/gismap/references/briefs.md",
      "status": "prepared",
      "checks": [
        "No published link yet."
      ]
    }
  ],
  "lastTestedVersion": "0.53.0",
  "resultStatuses": [
    "prepared",
    "validated",
    "loaded",
    "rendered",
    "verified",
    "partial",
    "failed"
  ]
}
