Open
Conversation
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
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
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
🚀 Preview DeploymentsCode Server (Full VS Code Extension)Browser-based VS Code with the Debrief extension and sample data pre-installed. Web Shell (Standalone App)Use this for Playwright testing and demos - runs outside Storybook. Storybook (Component Library)Browse all components, stories, and documentation. All Links
|
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
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
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two new STAC (SpatioTemporal Asset Catalog) JSON files to the repository for catalog and metadata documentation purposes.
Changes
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