feat(intelligence): PACT.TAILOR energy-intelligence extension workspace — ontology, registries, ingestion, real-time KG, API/SDUI, globe - #52
Conversation
… + 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
Bugbot couldn't run - usage limit reachedBugbot 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) |
|
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
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 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. |
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):
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.HttpGateseam (fixtures run the production code path); AEMO NEMWEB Dispatch/SCADA/Trading connectors, aisstream AIS, BOM, ENTSO-E/EIA stubs;verify:liveharness.InferenceRecord.fact-type proposals; the Gladstone competing-hypotheses demo (met coal 0.91 vs thermal 0.34) resolves via propose/object againstreference-server/in an offline e2e test. Design record:docs/v2-prep/rfc-intelligence-fact-evidence-extension.md.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
Checklist
Governance posture & disclosures
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 aau.tailor.intel.claimresource type inresource-types.yamlis deliberately deferred to a follow-up PR under the registry's own process, with maintainer sign-off.fixture_provenance: synthetic-from-spec, and every source record saysverification_status: documented_only. Theverify:liveharness upgrades statuses honestly once run with open egress.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 useMAY_SUPPLYwith confidence < 1 — no private contracts fabricated.private: true; the Publish @pact-protocol/cli and @pact-protocol/mcp to npm #5 publish freeze is untouched.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 futureau.tailor.intel.claimresource type; registration is deferred. Inferences map into existing PACTfactproposals viapact-bridge, including a competing-hypotheses demo againstreference-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, plusintelligence/var/gitignore.Reviewed by Cursor Bugbot for commit 219272a. Bugbot is set up for automated code reviews on this repo. Configure here.