Skip to content

Add STAC catalog and metadata JSON files#414

Open
IanMayo wants to merge 8 commits intomainfrom
claude/stac-catalog-exploration-8LPDV
Open

Add STAC catalog and metadata JSON files#414
IanMayo wants to merge 8 commits intomainfrom
claude/stac-catalog-exploration-8LPDV

Conversation

@IanMayo
Copy link
Copy Markdown
Member

@IanMayo IanMayo commented Apr 10, 2026

Summary

This PR adds two new STAC (SpatioTemporal Asset Catalog) JSON files to the repository for catalog and metadata documentation purposes.

Changes

  • stac-catalog-dump.json: Added comprehensive STAC catalog dump file (~9935 lines)
  • stac-metadata-only.json: Added STAC metadata-only file (~3095 lines)

Details

These JSON files appear to be STAC format documents used for cataloging and describing spatiotemporal assets. The catalog dump file is significantly larger and likely contains complete catalog information, while the metadata-only file contains a more focused set of metadata information.

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr

Two files extracted from the 71-item local-store STAC catalog:
- stac-catalog-dump.json (259 KB): full item metadata with geometry, links, assets, and enriched feature counts/kinds
- stac-metadata-only.json (84 KB): flat queryable fields only (title, description, datetime, bbox, tags, track names, nationalities, vessel classes, feature counts)

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 10, 2026 18:43 Inactive
Browser app (prototypes/stac-nl-filter/):
- Single-page React + Babel-standalone playground that lets analysts
  discover plots via natural language queries, per the Discovery PoC SRD.
- Embeds CATALOG_FULL (70 items, all fields) and CATALOG_COMPACT (same
  items, no description/track_names — fed to the LLM) as JS constants.
  core--bulk-red-tracks is excluded as an outlier.
- Direct fetch to api.anthropic.com with anthropic-dangerous-direct-
  browser-access. API key persisted to localStorage.
- Chips bar, recent searches, card grid with colour-coded badges per
  SRD §4.5.

Headless test harness (test-harness.mjs):
- Node runner that mirrors the browser search pipeline but spawns
  `claude -p` (from an isolated cwd) instead of calling Anthropic direct.
- 13 unit tests covering catalog integrity, extractJson helper, and
  system-prompt construction.
- 7 integration tests covering typical analyst phrases: UK-only filter,
  NATO ASW, submarines, multi-national, vague queries, year ranges, and
  narrative content. Validators assert on item fields rather than exact
  ID matches.
- Modes: --unit (offline), --query "text" (ad-hoc), default (full suite).

Last local run: 13/13 unit + 7/7 integration passed.

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 11, 2026 06:54 Inactive
The v1 slug had flat aggregate lists — nationalities: [GB, US],
vessel_classes: [type45, astute] — so joined queries like "UK submarine"
were structurally unanswerable: the LLM couldn't tell which nationality
owned which vessel class.

v2 makes features.geojson the source of truth by decorating each TRACK
feature with per-platform metadata:
  display_name, nationality, vessel_class, vessel_type, vessel_role,
  domain, synthetic

For the 10 platform IDs in PLATFORM_VESSEL_MAP (imported from the
existing scripts/enrich-legacy-catalog.py), values are authoritative.
For the ~92 unknown platforms (SENSOR, TX_1, OWNSHIP, Contact etc.)
the build script deterministically zips the alphabetically-sorted
unknown IDs against each item's aggregate debrief:track_names /
debrief:vessel_classes lists, and flags those platforms synthetic=true.
This is 31.9% authoritative, 68.1% synthetic, internally consistent.

The slug (catalog-data.js) is regenerated from the enriched features:

  {
    id, title, exercise, year, duration_hours, bbox,
    feature_kinds, platform_count, narrative_count,
    platforms: [{ id, name, nationality, vessel_class, vessel_type,
                  vessel_role, domain, synthetic }],
    nationalities, domains, vessel_types,    // derived
    has_submarine, has_warship,              // derived
    tags, feature_tags
  }

build-catalog.py runs both phases (enrich features, then regenerate
the JS slug). System prompts in app.jsx and test-harness.mjs are
updated to describe the per-platform shape and explicitly call out the
"UK submarines" join pattern.

Test suite expanded and all green on v2:
- 21/21 unit tests (includes new per-platform integrity checks)
- 9/9 integration tests, including three new per-platform joins:
    * UK submarines:    18 hits, all GB+subsurface
    * German frigates:  1 hit,   DE+frigate
    * Type 23 frigates: 25 hits, all vessel_type="type23"

Touches 70 features.geojson files (one per plot), the slug, both
system prompts, the test harness, the new build-catalog.py, and README.

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 11, 2026 12:59 Inactive
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

🚀 Preview Deployments

Code Server (Full VS Code Extension)

🖥️ Open Code Server

Browser-based VS Code with the Debrief extension and sample data pre-installed.

Web Shell (Standalone App)

📱 Open Web Shell

Use this for Playwright testing and demos - runs outside Storybook.

Storybook (Component Library)

📚 Open Storybook

Browse all components, stories, and documentation.


All Links
Environment Code Server Web Shell Storybook
This PR Open IDE Open App Open Storybook
Main branch Open App Open Storybook

Updated on commit c926d8e

Two cleanups on the NL filter PoC:

1. Remove the 'synthetic' marker.
   - build-catalog.py no longer writes a 'synthetic' property to TRACK
     features or to slug platforms[]. The deterministic assignment for
     unknown platforms still happens; we just don't tag the result.
   - 70 features.geojson files regenerated without the property.
   - System prompt no longer mentions a synthetic flag.
   - Unit test inverted: 'no platform carries a synthetic marker'.

2. Extract buildSystemPrompt + extractJson into prototypes/stac-nl-filter/lib.js.
   - Single source of truth for both functions.
   - Browser: <script src="lib.js"></script> sets window.NLFilterLib.
   - Node: test-harness loads catalog-data.js and lib.js into one shared
     vm sandbox, then destructures the lib functions off sandbox.window.
   - app.jsx and test-harness.mjs both call
     buildSystemPrompt(CATALOG_COMPACT, TOTAL_ITEMS) — the function takes
     its inputs as args instead of reading them from a context-specific
     global, so the same code runs in both environments.
   - Removes ~60 lines of duplicated prompt text.

Tests still green: 22/22 unit + 9/9 integration. Hit counts on the
typical-phrase suite are unchanged from the previous v2 run, confirming
that removing the synthetic marker did not affect LLM behaviour.

System prompt size: 70.5 KB → 68.1 KB.

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 11, 2026 15:48 Inactive
Captures all technical decisions and validated designs from the
throwaway prototype branch (claude/stac-catalog-exploration-8LPDV).

11 backlog items across 4 phases:
  Phase 0 (Foundation): platform registry + LinkML schema updates
  Phase 1 (Pipeline): import enrichment + save-time regen + sample nuke
  Phase 2 (CQL2): array_filter evaluator + filter bar platform chips
  Phase 3 (NL→CQL2): enum extraction + prompt design + LLM transport
  Phase 4 (Demo): stakeholder prototype UI

Key architectural decisions captured:
- Platform registry as shared/data/ YAML (not a service)
- features.geojson as source of truth for per-platform metadata
- Import handlers do the enrichment (not a post-processing script)
- debrief:platforms replaces flat aggregates on item.json
- LLM receives schema+enums (not catalog items) and generates CQL2
- CQL2 array_filter() for per-platform joined queries
- All enrichment fields optional (unknown platforms stay empty)

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 13, 2026 17:15 Inactive
Two design refinements from review:

1. Unified tree: platforms are leaf instances under their vessel
   class node. vessel_class, vessel_type, vessel_role, and domain
   are all derived from position in the tree — no string references,
   no possibility of typos or inconsistencies.

2. Registry as fallback: features.geojson stores only platform_id
   by default. Enrichment fields on TrackProperties are optional
   override slots. At save time, the save handler resolves
   platform_id against the registry, overlays any analyst-set
   overrides, and emits the fully resolved debrief:platforms on
   item.json. Registry changes propagate on next save without
   re-importing.

Updated sections: registry structure, LinkML schema (override slots
pattern), import pipeline (warnings only, no enrichment write),
save-time regeneration (registry resolution + overlay), success
criteria, constraints, and breakdown task descriptions.

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 13, 2026 17:27 Inactive
11 items across 4 phases:
  Phase 0: #180 platform registry, #181 LinkML schema update
  Phase 1: #182 import warnings, #183 save-time resolution, #184 sample regen
  Phase 2: #185 CQL2 array_filter, #186 filter bar chips
  Phase 3: #187 enum extraction, #188 NL→CQL2 prompt, #189 LLM transport
  Phase 4: #190 stakeholder demo UI

https://claude.ai/code/session_01KmUJ2x51PB822FKhwDZpVr
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-414 April 13, 2026 17:31 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants