VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Z6.AdapterSpec — v1.0 (Almost-Code, Sensors-Only, No-Structure-Overwrite)

ID: Z6_ADAPTER_SPEC_v1_0
Status: LOCKED
Scope: Any data feed (news, APIs, manual ops logs, spreadsheets, “LLM summaries”) updating RECL/ERCO runtime across Z0–Z6
Depends on: RECL_SCHEMA_v1_0, UOS_THRESHOLD_SPEC_v1_0, Z5Z5_COUNTRY_BIND_LAYER_v1_0, Z6_GLOBALPACK_CITYERCO_REGISTRY_BLOCK_v1_0
Core Rule: Adapters may update sensors + weights only. They must never overwrite structure.


0) Definition Lock + Non-Overwrite Fence

DEFLOCK.Z6.ADAPTER:
Adapter := a pipeline that converts external signals into SensorUpdateEvents.
External signal := any observed data (text, numbers, alerts, reports).
Runtime Structure := NodeIDs, BindIDs, PlaceIDs, LaneIDs (frozen).
HARD_FENCE (non-negotiable):
- Adapter MUST NOT create, delete, rename, or mutate:
NodeID, BindID, PlaceID, LaneID, ModuleID
- Adapter MAY ONLY update:
Node.Sensors S (ρ, R, TTC, p95 variance, CI, buffers…)
Bind.Weight w and Bind.Delay τ
Optional: Source confidence metadata
- If structure change is required:
emit CHANGE_REQUEST (human-reviewed) instead of writing structure.

1) Adapter Contract

ADAPTER.CONTRACT:
Inputs:
- RawSignals (text/metrics/events)
- SourceMeta (publisher, timestamp, url-id, method, confidence)
- RuntimeIndex (read-only): Node registry + Bind registry
Outputs:
- SensorUpdateEvent[] (append-only)
- WeightUpdateEvent[] (append-only)
- AlertEvent[] (optional: Fence triggers / anomalies)
- ChangeRequest[] (when missing Node/Bind mapping)
Guarantees:
- No structure overwrite
- Forward-only versioning
- Traceability: every update references a source

2) Unified Event Schema (Append-Only)

2.1 SensorUpdateEvent

EVENT.SensorUpdate:
EventID: EVT_S_<ULID>
NodeID: <stable NodeID>
SensorID: <SENSOR_*>
Value: <number|bool|categorical>
Units: <optional>
TimestampObserved: <ISO8601>
TimestampIngested: <ISO8601>
Source:
SourceID: <SRC_*>
Method: <api|news|manual|llm-summary|spreadsheet|sensor>
Confidence: 0..1
Notes: <short>
Integrity:
Signature: <hash optional>
QScore: 0..1 # quality score after validation
Policy:
TTL: <time-to-live> optional
Visibility: <public|internal>

2.2 WeightUpdateEvent (for κ surface)

EVENT.WeightUpdate:
EventID: EVT_W_<ULID>
BindID: <stable BindID>
w_new: <0..1 or absolute scale>
τ_new: <optional delay>
TimestampObserved: <ISO8601>
Source: {SourceID, Method, Confidence, Notes}
Integrity: {QScore}

2.3 AlertEvent (optional)

EVENT.Alert:
EventID: EVT_A_<ULID>
Severity: <info|warn|critical>
Target: <NodeID|BindID|ClusterID>
Trigger: <TH_*> # named threshold from UOS spec
Message: <short>
SuggestedAction: <truncate|stitch|retest|quarantine>
SourceRef: <EventID(s)>

2.4 ChangeRequest (structure-gap)

EVENT.ChangeRequest:
ReqID: CR_<ULID>
MissingRef: <NodeID or BindID or PlaceID>
ProposedAdd: <new Node/Bind stub suggestion>
Reason: <why needed>
SourceRef: <EventID(s)>
Status: <pending|approved|rejected>

3) Sensor Registry (Canonical IDs)

SENSOR.REGISTRY.MIN:
SENSOR_RHO # ρ = L/C
SENSOR_R # R = Ġ/Ḋ
SENSOR_TTC # time-to-core
SENSOR_T_REPAIR # time needed to repair
SENSOR_KAPPA_EFF # κ_eff derived (optional; can be computed)
SENSOR_SIGMA # σ (change injection)
SENSOR_SIGMA_CAP # σ_cap
SENSOR_RHOSIGMA # ρσ
SENSOR_P95_VARIANCE # p95 variance (service/backlog/etc.)
SENSOR_CI # concentration/brittleness index
SENSOR_BUFFER_FIN
SENSOR_BUFFER_ENRG
SENSOR_BUFFER_FOOD
SENSOR_BUFFER_HLTH
SENSOR_BUFFER_TRANS
SENSOR_BUFFER_TRUST

4) Adapter Pipeline Stages (Normalize → Map → Validate → Emit)

PIPELINE:
Stage 1: INGEST
- accept RawSignals + SourceMeta
- assign SourceID
- basic parsing into SignalAtoms
Stage 2: NORMALIZE
- normalize time (UTC)
- normalize numeric units
- normalize entity names -> PlaceID using Alias Registry (read-only)
- output NormalizedAtoms:
{PlaceID, LaneTag, MetricHint, ValueHint, Time, SourceID}
Stage 3: RESOLVE
- map PlaceID -> NodeID (from RuntimeIndex)
- map (PlaceID, LaneTag) -> LaneNodeID if exists
- if no match:
emit ChangeRequest (do not invent IDs)
Stage 4: MAP_TO_SENSORS
- convert atoms into SensorID updates or Bind weight updates
- produce CandidateEvents
Stage 5: VALIDATE
- run integrity checks (range, rate-of-change, contradiction, source credibility)
- assign QScore
- if fails: quarantine (no runtime update) + alert
Stage 6: EMIT (append-only)
- write SensorUpdateEvent / WeightUpdateEvent
- optional AlertEvent if thresholds crossed
Stage 7: DERIVE (optional)
- compute derived sensors (ρ, R, κ_eff, ρσ) if components updated
- emit derived SensorUpdateEvents (marked Method=derived)

5) Mapping Rules (Signals → Sensors / Weights)

5.1 Generic mapping table (intent tags)

MAP.TABLE:
If SignalAtom.LaneTag == FIN:
update SENSOR_BUFFER_FIN, SENSOR_RHO (proxy), or Bind weights tagged FIN
If LaneTag == ENRG:
update SENSOR_BUFFER_ENRG, TTC proxies for ENRG lanes, or ENRG bind weights
If LaneTag == SUPPLY:
update p95 variance (delivery variance proxy), κ weights on supply binds
If LaneTag == HLTH:
update SENSOR_BUFFER_HLTH, p95 variance, TTC proxies for health lane
If LaneTag == MULTI:
update Bind weights w_ij (country↔country or lane↔lane) and/or κ_eff flags

5.2 Weight update rule (κ surface)

MAP.WEIGHT:
If signal implies increased dependency / tighter coupling:
propose w_new = min(1, w_old + Δw)
If signal implies decoupling / corridor diversification:
propose w_new = max(0, w_old - Δw)
Δw must be small per update (rate-limited); large jumps require multi-source confirmation.

6) Validation + Anti-Poisoning Guardrails (Mandatory)

VALIDATION.GUARDS:
G1 RangeCheck:
- sensor values must be within defined bounds (per SensorID)
G2 RateLimit:
- max Δ per day/week (per sensor and per bind weight)
G3 Multi-Source Confirmation (for high-impact updates):
- if update affects:
TH_FENCE triggers OR w_new change > Δw* OR buffer drops below B_min
then require:
>=2 independent sources OR one high-trust source + historical consistency
G4 Contradiction Check:
- if new update contradicts recent confirmed state:
quarantine + alert (needs review)
G5 Source Quality:
- each SourceID has TrustTier:
T1 (official/primary), T2 (reputable secondary), T3 (unknown)
- high-impact changes cannot be driven solely by T3
G6 Quarantine Mode:
- quarantined events are stored but not applied to runtime sensors used for decisions
G7 Explainability:
- every applied update must cite SourceRef(s)

7) Adapter Output Policy (When to Trigger ERCO/Fence Alerts)

ALERT.POLICY:
Emit AlertEvent if any of:
- SensorUpdate crosses TH_ρ_2 or TH_R_2
- TTC ≤ T_repair (TH_FENCE)
- κ_cluster spike detected (for Z5 clusters)
- buffer below B_min
- ρσ > 1 sustained
AlertEvent does not “actuate” changes; it signals ERCO loop to consider truncation/stitching.

8) Compatibility Rules (Ontology Assimilation Safe)

ONTOLOGY.SAFETY:
- Keep IDs stable (prevents semantic drift in Google/AI graph)
- Keep module names consistent (ERCO, RECL, FenceOS)
- Put updates in append-only event logs (auditable)
- Never rewrite old structure; only add new version pages or new stubs

9) Example Adapters (Templates)

9.1 Adapter: NEWS_SUMMARY_FEED (text → lane-tag atoms)

ADAPTER: ADP_NEWS_SUMMARY_v1_0
Input: {headline, snippet, timestamp, publisher}
Normalize:
- extract Place mentions -> PlaceID via Alias Registry
- classify LaneTag (FIN/ENRG/SUPPLY/HLTH/MULTI) via rule-based tags
Resolve:
- map PlaceID -> NodeID (Z5 or Z3)
Map:
- produce Candidate WeightUpdateEvent (small Δw) for relevant binds
Validate:
- require multi-source for large Δw
Emit:
- WeightUpdateEvent + optional AlertEvent

9.2 Adapter: MANUAL_OPS_PANEL (operators enter sensor values)

ADAPTER: ADP_MANUAL_PANEL_v1_0
Input: {NodeID, SensorID, Value, Timestamp, OperatorID}
Validate:
- range + rate limit
- if high-impact threshold crossed: require second operator sign-off
Emit:
- SensorUpdateEvent (Method=manual)

9.3 Adapter: SPREADSHEET_IMPORT (batch update)

ADAPTER: ADP_SHEET_IMPORT_v1_0
Input: rows of {PlaceID, Z, OS, SensorID, Value, Time}
Resolve:
- PlaceID->NodeID
Validate:
- apply G1..G7
Emit:
- batch SensorUpdateEvent[]

10) Minimal Insert Block (for runtime pages)

Z6.ADAPTER.INSERT.MIN:
Adapters update sensors and bind weights only (append-only events).
They never overwrite NodeIDs/BindIDs/PlaceIDs.
High-impact changes require validation + multi-source confirmation.
Alerts are emitted when thresholds (ρ, R, TTC, buffers, κ, ρσ) cross gates.

Recommended Internal Links (Spine)

Start Here For Mathematics OS Articles: 

Start Here for Lattice Infrastructure Connectors

eduKateSG Learning Systems: