Skip to content

feat(intelligence): PACT.TAILOR energy-intelligence extension workspace — ontology, registries, ingestion, real-time KG, API/SDUI, globe - #52

Open
Tailor-AUS wants to merge 16 commits into
mainfrom
claude/pact-tailor-energy-intelligence-q8h5z1
Open

Tailor-AUS wants to merge 16 commits into
mainfrom
claude/pact-tailor-energy-intelligence-q8h5z1

Conversation

@Tailor-AUS

@Tailor-AUS Tailor-AUS commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

New self-contained extension workspace intelligence/ implementing the PACT.TAILOR global real-time energy, industry & trade intelligence network — a machine-readable model of the physical economy (resource → extraction → transport → grid → load → facility → production → logistics → destination) with Australia's NEM and the Gladstone industrial cluster as the depth exemplar.

What's in the box (16 commits, phase-ordered per the build handoff):

  • Ontology — JSON Schema 2020-12 envelopes for the three data classes (A structural / B live telemetry / C derived intelligence), structurally separated so an inference can never masquerade as telemetry; slug ID grammar; typed external-ID vocabulary (DUIDs, EICs, IMO/MMSI, UN/LOCODE…).
  • Registries (researched, CI-validated) — 71 electrical systems (synchronous areas → ISOs/TSOs → regions, with live-data availability ratings), 67 data sources (with licensing verdicts and honest verification_status), 35 observability gaps (proxy derivations + owned-instrumentation options — a first-class product output), 121 NEM entities + 206 relationships with real DUIDs and 2026-current ownership.
  • Engine — bronze/silver/gold medallion store (hash-chained gold graph journal, PACT §6.4 construction), bitemporal knowledge graph (upstream/downstream supply-chain traversal), real-time state engine (event-time semantics, corrections, windows, delta bus).
  • Ingestion — connector SDK with a replay|live HttpGate seam (fixtures run the production code path); AEMO NEMWEB Dispatch/SCADA/Trading connectors, aisstream AIS, BOM, ENTSO-E/EIA stubs; verify:live harness.
  • Intelligence — versioned deterministic rules (smelter utilisation, vessel cargo inference, anomaly detection, gap synthesis); every output is an evidence-linked, schema-validated InferenceRecord.
  • PACT integration — inferences publish as fact-type proposals; the Gladstone competing-hypotheses demo (met coal 0.91 vs thermal 0.34) resolves via propose/object against reference-server/ in an offline e2e test. Design record: docs/v2-prep/rfc-intelligence-fact-evidence-extension.md.
  • Surfaces — zero-dep REST + SSE API with server-driven UI composition, and a deck.gl GPU globe (LOD tiers, gap rings, SDUI side panel, zero external requests).

Verification: 171 unit tests across 9 packages, registry validation with full referential integrity, and a 14-assertion end-to-end smoke (fixture replay → medallion → state → graph → API/SDUI → SSE), all wired into a path-filtered workflow.

Type of Change

  • Spec change (modification to the PACT specification)
  • Schema change (new or modified JSON Schema)
  • Documentation (README, guides, examples)
  • Meta (CI/CD, templates, config)

Primarily a new extension workspace (no checkbox exists for that): all code/data/schemas live under intelligence/; nothing under spec/ is touched. The new JSON Schemas are workspace schemas, not spec schemas.

Checklist

  • I've read CONTRIBUTING.md
  • My changes don't break existing schema validation
  • Links in Markdown files are valid
  • For spec changes: N/A — no spec changes in this PR

Governance posture & disclosures

  • Extension, not core (D2=B): this is an extension implementation under GOVERNANCE.md. It is not the issue KG product code still in tailor-app — finish extraction into TailorAU/pact (rehome residual) #34 KG-product extraction (owner-only, security-sensitive) — stated explicitly in the RFC. Registration of a au.tailor.intel.claim resource type in resource-types.yaml is deliberately deferred to a follow-up PR under the registry's own process, with maintainer sign-off.
  • No live-data claims: the development environment's egress policy blocks all energy endpoints, so every connector is built against documented wire formats, every fixture is marked fixture_provenance: synthetic-from-spec, and every source record says verification_status: documented_only. The verify:live harness upgrades statuses honestly once run with open egress.
  • Licensing: per-source terms recorded as engineering metadata (intelligence/docs/LEGAL-LICENSING.md); no bulk third-party data committed; AIS designed against aisstream.io's permitted feed, scraping rejected; the three demo vessels are clearly-flagged synthetic exemplars; inferred commercial links use MAY_SUPPLY with confidence < 1 — no private contracts fabricated.
  • npm: all workspace packages are private: true; the Publish @pact-protocol/cli and @pact-protocol/mcp to npm #5 publish freeze is untouched.
  • Deferred with landing spots documented: production storage mapping (Timescale/ClickHouse/graph DB), 3DGS facility views, AI-driven SDUI composition (identity-stub hook shipped), Sovrgn market layer.

Generated by Claude Code


Note

High Risk
Very large new architectural surface (data model, ingestion, KG, API, PACT fact-bridge). Risk is mostly review/merge scope rather than core-spec breakage — spec/ is untouched and CI is path-isolated.

Overview
Adds a new self-contained intelligence/ extension workspace for a real-time energy, industry, and trade intelligence network — ontology, registries, ingestion, bitemporal KG, derived intelligence, REST/SSE API, and a deck.gl globe — with Australia's NEM / Gladstone as the depth exemplar.

Does not modify spec/. An RFC proposes a future au.tailor.intel.claim resource type; registration is deferred. Inferences map into existing PACT fact proposals via pact-bridge, including a competing-hypotheses demo against reference-server/.

Core capability stack: schema-separated structural / observation / inference envelopes; researched grid/source/gap/entity registries; bronze→silver→gold store + state engine; connector SDK with replay|live fixtures (AEMO, AIS, BOM, stubs); rule-based intel that must cite evidence; zero-dep API/SDUI and globe UI.

Also adds path-filtered CI (.github/workflows/intelligence.yml) for build/test, registry validation, e2e smoke, and globe build, plus intelligence/var/ gitignore.

Reviewed by Cursor Bugbot for commit 219272a. Bugbot is set up for automated code reviews on this repo. Configure here.

claude added 16 commits August 12, 2026 01:22
… + architecture docs

New self-contained npm-workspaces root at intelligence/ (10 private packages,
never published) implementing the PACT.TAILOR intelligence network as a Tailor
extension per GOVERNANCE.md D2=B. No files under spec/ are touched; the design
record is docs/v2-prep/rfc-intelligence-fact-evidence-extension.md, which
formalises the built-in fact type's informal {claim, evidence, tier, sources}
payload as an evidence-carrying claim envelope (registration deferred to a
follow-up PR under the resource-type registry's own process).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…ammar

JSON Schema 2020-12 set for all nine envelopes (entity, relationship,
observation, source, observability-gap, inference, grid, telemetry-feed,
sdui-panel) with per-type property sub-schemas; the three data classes are
structurally separate envelopes so derived intelligence cannot masquerade as
telemetry. TS mirror types, Ajv validators, slug ID grammar, zero-dep ULID.
58 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
Embedded, zero-external-service storage under gitignored var/: immutable
content-addressed bronze artifacts, append-only silver observation JSONL
partitioned by feed and event date, and a hash-chained gold graph-delta
journal (prev_hash over canonical JSON, GENESIS first — the PACT §6.4
construction) so runtime graph changes are tamper-evident and replayable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
In-process property graph over canonical entities: world-time and system-time
filters on every read, upstream/downstream supply-chain traversal, explicit
rel-type chains (mine → terminal → port), re-record supersession that keeps
prior belief queryable, deterministic export. Zero runtime deps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
YAML registry loading with per-record schema validation, referential
integrity across grids/sources/gaps/entities/relationships (every cited ID
must resolve), Grid-entity materialisation, and entity-resolution candidates
(exact external-ID and name+proximity passes — reported, never auto-merged).
validate:data CLI wired for CI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
Observations in, per-(entity, metric) current state out: event-time
latest-wins, late data lands in history without touching state, corrections
supersede via corrects/source_sequence and emit state.corrected with the
previous value, tumbling 5-min/1-h windows with watermark-based revision,
typed delta bus, gold snapshots, and boot-time silver replay. Canonical
entities are never mutated. 18 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…es demo (phase 17)

InferenceRecord → PACT fact-type proposal mapping (lossless degradation per
the RFC: evidence ∪ contrary_evidence verbatim with roles), zero-dep PACT
client, and the Gladstone worked example: two agents propose competing cargo
claims for a synthetic vessel at RG Tanna, consensus resolves via
approve/object, outcomes fold back as CORROBORATED/CONTESTED records that
retain full contrary evidence. E2e test boots the reference server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…se 1)

Electrical systems as the organising unit, countries as metadata: synchronous
areas, interconnections, ISO/RTOs, TSO areas, national/regional/isolated
grids with PART_OF hierarchy, operators, market structure, interconnections,
and a live-data availability rating per system. Verified via research:
Japan's 50/60 Hz split, Hydro-Québec as its own interconnection, Ukraine and
Baltic synchronisation to Continental Europe, NWIS isolation. Grid market
subfields made nullable (null = honestly unknown).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…2-3)

AEMO deep coverage (NEMWEB report families, dashboard API, MMS data model,
Gas BB, WEM) plus global breadth: North American ISOs, European TSOs and
platforms, Asian operators, maritime AIS providers with licensing verdicts
(aisstream free tier vs AISHub reciprocity vs commercial-only aggregators),
weather, trade and satellite datasets. Every record carries
verification_status: documented_only — this environment cannot reach the
endpoints, and no live verification is claimed. Licensing vocabulary widened
to capture real terms (public-domain, open-noncommercial, reciprocal, mixed).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…se 10)

Where live observability does not exist, the gap is explicit and first-class:
Boyne potline load, RG Tanna/WICET shiploader throughput, per-train LNG
production at Curtis Island, Bowen Basin mine production, coal-rail consist
movements, Tomago, Port Kembla, Sydney data-centre load, NWIS (no public
real-time data at all). Each records the best available proxy with its
derivation and the owned-instrumentation options (substation gateways, AIS
receivers, partner feeds, satellite thermal) that could close it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…el (phases 7-13)

121 entities and 206 relationships: NEM regions, 25 QLD/NSW stations with
real DUIDs, six interconnectors, the full Gladstone chain (GPS → Boyne, QAL/
Yarwun alumina, RG Tanna/WICET/Barney Point, Curtis Island LNG trains, Bowen
Basin mines and the three Aurizon coal systems), ownership current to 2026
(Sev.en at Callide C, Whitehaven Blackwater JV, APA Basslink, Eraring
extension to 2029), commodity flows to country-level destinations, and three
clearly-flagged synthetic exemplar vessels. Inferred commercial links use
MAY_SUPPLY with confidence < 1; no private contracts fabricated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…rs (phases 6, 8, 12)

Connector contract (discover/fetch/parse/normalize/verify) behind an HttpGate
seam where fixture replay is the same code path as live fetching. AEMO NEMWEB
DispatchIS/Dispatch_SCADA/TradingIS (zip + MMS C/I/D CSV, NEM-time
conversion, RUNNO-keyed corrections), the AEMO dashboard summary API,
aisstream websocket (Gladstone bbox, unmapped MMSIs dropped and reported —
never guessed), BOM observations, and ENTSO-E/EIA breadth stubs. All
fixtures are synthetic-from-spec and say so; verify-live harness writes a
report and never edits registries. Deterministic fixture generator; 32 tests.
Seed vessels gain MMSIs matching the AIS fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
Deterministic, versioned rules — the system's ONLY producer of class-C data:
smelter-utilisation (grid-demand proxy + SUPPLIES edge evidence),
cargo-inference (terminal commodity profile; never emits without a LOADS_AT
edge), anomaly-detection (3-sigma over event-time history), gap-synthesis
(proposes gap records for unobserved strategic entities). Every record is
schema-validated on emit — a rule producing invalid intelligence throws.
React mode re-runs anomaly detection per state delta, debounced. 15 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
Zero-dep node:http server (reference-server style) composing registry ⊕
graph ⊕ state ⊕ gaps ⊕ inferences at read time: entities with bbox/type/
grid filters, grid live summaries, graph traversal endpoints, sources, gaps,
inferences, SSE stream with per-connection filters and heartbeats, and
server-driven UI: deterministic per-type panel templates + live situation
rules (anomaly hoists inferences, no-live-data hoists the gap card), with
composeWithAI as the documented identity stub — panels reference endpoints,
never inline values. Honest replay mode drains remaining silver observations
through the real ingest path on a compressed clock. 27 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
…s 19-21)

_GlobeView + instanced layers only — no DOM for geographic objects: land
basemap (bundled hand-simplified outline, production swaps Natural Earth
110m), grid markers, animated interconnector arcs, capacity/utilisation-
encoded generators, heading-rotated vessels, and pulsing observability-gap
rings as a first-class visual. Zoom-gated LOD (global → continental →
regional → facility) with the SDUI side panel rendering all five panel kinds
and a 3DGS mount placeholder. SSE state cache with reconnect backoff;
degrades to structural view when the API is absent; every data view carries
a replayed-not-live banner. Zero external requests at build and runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
Four jobs scoped to intelligence/** only (spec/CLI/MCP work never waits on
them): build + 171 unit tests, registry/schema validation with referential
integrity, the end-to-end smoke (fixture replay -> medallion -> state ->
graph -> REST/SDUI -> SSE, 14 assertions), and the globe bundle build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yVGqBtvM1zNAd9tvUVNzm
@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b156bc8d-e382-4361-887b-9b068914bbf6)

@Tailor-AUS

Copy link
Copy Markdown
Contributor Author

Deliverer assessment 2026-08-20 — decision-gated, parked pending Knox disposition (routed via TailorAU/tailor-app#5249). Not merging.

Why this is decision-gated despite being technically mergeable and spec/-untouched:

  1. New product surface. intelligence/ is a global energy/industry/trade intelligence network — a commercial product, not protocol hygiene. Under the portfolio model, market/energy access is sovrgn's commercial role and intelligence products are their own surfaces; whether this lives inside the public MIT pact repo is a strategy call, not an engineering one.
  2. Irreversible disclosure. This repo is public. Merging publishes the full architecture, researched registries (71 grids / 67 sources / 121 NEM entities + 206 relationships), the observability-gap analysis positioned as a product output, and the PACT.TAILOR naming — all MIT-licensed the moment it lands. That forfeits IP/licensing optionality and sits adjacent to the KG product code still in tailor-app — finish extraction into TailorAU/pact (rehome residual) #34 KG-product extraction decision (owner-only, security-sensitive) even though the RFC disclaims it.

Options for Knox: merge (accept public MIT disclosure; low core-spec risk — spec/ untouched, CI path-isolated), park (hold as-is; branch stays rebased and mergeable), or split (land the RFC docs/v2-prep/rfc-intelligence-fact-evidence-extension.md + the PACT fact-bridge design here, move the intelligence/ workspace to a private repo per the one-app-one-repo doctrine). Recommendation: split — the protocol-facing thinking belongs here; the product does not.

Two-line risk note: merge risk is disclosure/IP and review scope (~110 files, no human review, Bugbot never ran), not breakage. Parking risk is drift — 16 commits rotting against a moving main and the fixture/licensing claims going stale unverified.

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