# Run Phase 0 shadow mode

> Phase 0 dry-run: exchange and track commitments, execute only the Grid 1 baseline, then graduate to Phase 1 local integration and Phase 2 federation.

- Repository: g2tf-org/g2tf-standards
- GitHub: https://github.com/g2tf-org/g2tf-standards
- Human docs: https://grok-wiki.com/public/docs/g2tf-org-g2tf-standards-436ba3f3e0ff
- Complete Markdown: https://grok-wiki.com/public/docs/g2tf-org-g2tf-standards-436ba3f3e0ff/llms-full.txt

## Source Files

- `architecture/design-principles.md`
- `architecture/federation.md`
- `architecture/failsafe-model.md`
- `CONTRIBUTING.md`
- `rfcs/grid-2-rfc-1.pdf`
- `README.md`

---

---
title: "Run Phase 0 shadow mode"
description: "Phase 0 dry-run: exchange and track commitments, execute only the Grid 1 baseline, then graduate to Phase 1 local integration and Phase 2 federation."
---

RFC #1 §Phased Adoption defines **Phase 0 — Shadow Mode** as: run the full protocol stack as a dry run; make and track commitments; execute only what would have happened anyway. In this repository that stack is **G2P** (`specs/g2p/spec.md`, v26.0-draft), **GCAP** (`specs/gcap/spec.md`), and **DESP** (`specs/desp/spec.md`). Physical dispatch stays on each element's **Grid 1 baseline**. There is no shadow-mode flag, CLI, or wire format in the living specs — Phase 0 is an operational constraint on an otherwise complete interval loop.

<Warning>
All three protocols and the member files are `Status: Draft — seeking input`. G2P §7 leaves wire format, encoding, element state machines, version negotiation, and conformance test vectors unspecified. A Phase 0 run is an implementation report against Draft text, not a conformance claim against a Stable `v26.Y` line.
</Warning>

## What Phase 0 does and does not do

| Surface | Phase 0 requirement | Not in Phase 0 |
|---|---|---|
| G2P message families | Exchange and persist Service Descriptors, Commitments, and Response / Telemetry on the one-minute clock | A published encoding or transport |
| GCAP | Allocator computes per-class `commit-%`, Buffer committed dispatch, and Source committed take from provisioned Grid 1 constraints | Binding those outputs to physical setpoints |
| DESP | Members declare A / B / C positions; Allocator records C → B → A curtailment order | Charging, class SLAs, or domain class-mix enforcement (commercial terms, outside the protocol) |
| Physical POI | Execute only the Grid 1 baseline that would have run without Grid 2 | Self-dispatch of the Commitment |
| Federation announcements (G2P §3.3) | Optional local bookkeeping | Phase 2 inter-domain interoperation |

RFC #1 recommends starting in **select grid pockets**, typically a hyperscaler, a utility transmission provider, a clean energy provider, and a load serving entity. The smallest Allocation Domain remains a **host utility plus one flexible load** (`architecture/allocation-domains.md`). Broader recognition (for example FERC-level) is deferred until the local path is proven (`architecture/design-principles.md`).

## Adoption lifecycle

```mermaid
stateDiagram-v2
    [*] --> Phase0: RFC 1 recommended start
    Phase0: Phase 0 Shadow Mode
    Phase0: protocol runs, Grid 1 executes
    Phase1: Phase 1 Local Vertical Integration
    Phase1: solution proof in existing rules
    Phase2: Phase 2 Regional Federation
    Phase2: peer Allocators announce and listen
    Phase0 --> Phase1: local pocket ready to bind commits
    Phase1 --> Phase2: same-spec peers couple domains
    Phase0 --> Phase0: interval loop, no physical Grid 2
```

| Phase | RFC #1 wording | Binding physical behavior |
|---|---|---|
| **0 Shadow Mode** | Run the full stack as a dry run; make and track commitments; execute only what would have happened anyway | Grid 1 baseline / standalone schedule / interconnection behavior (`architecture/failsafe-model.md`) |
| **1 Local Vertical Integration** | Groups of large loads, transmission owners, and load serving entities build a solution proof in existing rules structures | Members self-dispatch Commitments inside host-utility parameters |
| **2 Regional Federation** | Peer entities running the same spec interoperate; inter-domain advertisements and policy | Announce-and-listen across coupled zones; local constraints still win (`architecture/federation.md`) |

`architecture/federation.md` lists **Phase 2 milestone criteria** as an open item. Do not invent a graduation scorecard.

## Interval loop (dry-run)

Phase 0 uses the same Member ↔ Allocator pattern as live operation. The split is at the point of interconnection: the Commitment is recorded; the physical asset does not follow it.

```mermaid
sequenceDiagram
    participant Use as Use / Buffer / Source
    participant Alloc as Allocator
    participant TO as Grid 1 custodians
    participant POI as Physical POI
    TO->>Alloc: Provision constraints (capacity, transmission, reserves)
    Use->>Alloc: G2P Service Descriptor (signed positions)
    Alloc->>Alloc: GCAP clear (headroom, buffers, C then B then A)
    Alloc->>Use: G2P Commitment (interval, domain, inputs version)
    Note over Use: Track commit vs baseline; do not bind setpoints
    Use->>POI: Execute Grid 1 baseline only
    Use->>Alloc: G2P Response / Telemetry (actual vs Commitment)
```

<Info>
Where a Grid 1 dispatch instruction conflicts with a Grid 2 allocation, **Grid 1 prevails** (`architecture/temporal-position.md`). In Phase 0 that rule is absolute: the allocation is never the executed instruction.
</Info>

### Messages still required

G2P defines four families. Phase 0 still needs the first, second, and fourth. The third belongs to Phase 2.

<ParamField body="Service Descriptor" type="Member → Allocator" required>
Signed per-interval (or reissued) statement of requests/offers over a forward time vector. Use: one consume position per DESP class. Buffer: signed charge (+) / discharge (−). Source: offer to supply. Units: energy in the interval (v26.0).
</ParamField>

<ParamField body="Commitment" type="Allocator → Member" required>
Per-class `commit-%` to Use; committed dispatch to Buffer (cleared before any load curtailment); committed take to Source. MUST identify interval, domain, and the clearing-inputs version.
</ParamField>

<ParamField body="Response / Telemetry" type="Member → Allocator" required>
Verified self-dispatch report of actual per-class dispatch against the Commitment so the overlay footprint is measurable. In Phase 0, **actual** is the Grid 1 baseline; the Commitment is the counterfactual.
</ParamField>

<ParamField body="Federation Announcement" type="Allocator ↔ Allocator">
Announce-and-listen across coupled zones. Out of Phase 0 scope. A missing peer announcement MUST be treated as no extra boundary headroom if you exercise this path early.
</ParamField>

Timing budget (descriptor deadline, clearing deadline, commitment publication, clock sync) is an open Engineering discussion. Allocations apply to **whole one-minute intervals** only.

## Element behavior in shadow mode

Treat Phase 0 physical output as the same table the failsafe model uses when context is lost. Protocol software still runs; setpoints do not move off baseline.

| Element | Protocol still does | Physical execute (Phase 0) |
|---|---|---|
| **Use** | Broadcast per-class consume positions; listen for `commit-%` | Grid 1 firm load limit or the site's existing manual curtailment; honor agreed ramp rates |
| **Buffer** | Broadcast charge/discharge offers; listen for committed dispatch | Standalone Grid 1 schedule; **no Grid 2 support commitment** |
| **Source** | Broadcast supply offers; listen for committed take | Grid 1 interconnection behavior; agreed ramp rates |
| **Allocator** | Deterministic GCAP from TO-provisioned constraints; publish Commitments and (SHOULD) an inputs digest | Does not command breakers, setpoints, or market awards. On stale inputs or partition: **MUST NOT clear** |

The Allocator has **no discretion** (`members/allocator.md`, GCAP §1). Identical inputs MUST produce identical allocations so a shadow log can be reproduced by any party holding the same descriptors and constraint set.

<Note>
Pool sizing still applies as a planning bound: the participating pool MUST be sized so simultaneous fallback stays inside manageable Grid 1 ramp limits. Phase 0 does not relax that constraint; it is the same bound Phase 1 will inherit.
</Note>

## Run a pocket

<Steps>
<Step title="Fix the domain and authority">
Pick the smallest viable pocket: host utility transmission owner plus at least one Use Member. Authority for constraints is the transmission owner; a regional operator MAY add capacity limits. Commercial terms (flex enforcement, class mix, charging) stay **outside** G2P/GCAP/DESP.
</Step>
<Step title="Provision Grid 1 constraint inputs">
Feed the Allocator each interval: zone production capacity, transmission constraints, target reserves; optionally distribution factors and DLR. Peer announcements MUST NOT relax local limits. GCAP MUST withhold clearing on stale constraint inputs.
</Step>
<Step title="Stand up Draft 26.0-draft implementations">
Implement Use / Buffer / Source / Allocator against `members/*.md` and the three specs. Choose any local encoding and transport; this repository does not specify one. Authenticate every Service Descriptor and Commitment (G2P §6). Transmission-level deployments are expected on private networks.
</Step>
<Step title="Exchange and persist every interval">
On the one-minute clock: Members send descriptors → Allocator runs GCAP → Allocator publishes Commitments (interval, domain, inputs version) → Members **do not** apply them to the POI → Members send telemetry of actual (baseline) versus Commitment.
</Step>
<Step title="Track, do not bind">
Keep a per-interval log that a third party can replay: inputs digest, descriptors, Commitment, actual MW/MWh, and the delta (counterfactual Grid 2 vs executed Grid 1). That delta is the Phase 0 evidence, not a dispatch order.
</Step>
<Step title="Report running code">
File implementation reports in GitHub Discussions (`CONTRIBUTING.md` comment-cycle step **Run**). Use Issues only for spec defects or RFC #1 errata. Running Phase 0 experience is what informs the next living-spec revision.
</Step>
</Steps>

### Suggested per-interval record

There is no mandated schema. A replayable log needs at least:

| Field | Role |
|---|---|
| `interval` | One-minute window the messages bind to |
| `domain` | Allocation Domain id (format open) |
| `inputs_version` / digest | Constraint set the Commitment was computed against (GCAP §5 SHOULD publish) |
| Service Descriptor set | Signed Use / Buffer / Source positions |
| Commitment | `commit-%`, committed dispatch, committed take |
| `actual` | Metered or scheduled Grid 1 baseline |
| `delta` | Commitment minus actual (tracking only) |
| `cleared` | Whether the Allocator published or withheld (stale/partition) |

## Graduation

Specs do not define numeric exit criteria. RFC #1 sequences the work as **local proof first**, then federation.

**Phase 0 → Phase 1** is appropriate when the pocket can bind Commitments to self-dispatch **inside existing Grid 1 rules** (connect-and-manage / host-utility parameters), still meeting NERC, FERC, utility, and TSO/ISO obligations. Phase 1 is the first interval in which executed MW may follow `commit-%` rather than the prior baseline.

**Phase 1 → Phase 2** is appropriate when a second domain runs the same spec and Allocators exchange G2P federation announcements. Partition MUST NOT stop local clearing and MUST NOT trip Members in unaffected domains. Missing announcements clear as **zero extra boundary headroom**.

<Check>
Phase 1 does not require a market-rule change. Grid 2 sits below ~5-minute market dispatch and above sub-second ancillaries, so a voluntary pocket can go live without replacing Grid 1 settlements (`architecture/temporal-position.md`).
</Check>

## Verification signals

A Phase 0 run is healthy when:

- Every interval has either a Commitment that names `interval`, `domain`, and inputs version, or an explicit withhold (stale/partition).
- Replaying stored inputs through a second GCAP implementation reproduces the same allocations.
- Physical telemetry matches the site's **pre-Grid 2** schedule or firm limit, not the Commitment.
- Aggregate ramps, if you simulated applying Commitments, stay inside the host-agreed ramp rates and the domain pool-sizing bound.
- Grid 1 measures (frequency, ACE, flows) are unchanged by the overlay software, because the overlay is not yet moving the POI.

Grid 1 custodians verify the overlay by **aggregate footprint**, not by inspecting internal workloads (`architecture/overview.md`). The Allocator never sees facility-internal mapping of jobs onto A / B / C.

## Failure modes and open items that block a closed-loop test

<AccordionGroup>
<Accordion title="No wire format">
G2P §7. Interoperability between two vendors in one pocket is a local agreement until encoding and test vectors land. Report the encoding you used in the Discussion.
</Accordion>
<Accordion title="Staleness timers unspecified">
Failsafe says allocations are interval-only and a missed `commit-%` is fallback. Quantitative missed-interval thresholds and re-entry hysteresis are open. In Phase 0, fallback equals the behavior you are already executing — still log withhold vs miss.
</Accordion>
<Accordion title="Intra-interval timing budget open">
Commit-before-open is required in spirit (`architecture/temporal-position.md`) but the millisecond/second budget is an Engineering discussion. Do not claim a spec deadline.
</Accordion>
<Accordion title="Telemetry and conformance tests open">
G2P §3.4 verification granularity, metering source of truth, and attestation are unspecified. Domain certification criteria for “spec compliance” are an open item on allocation domains. Phase 0 reports should state how actuals were measured.
</Accordion>
<Accordion title="Phase 2 criteria not written">
Do not treat federation announcements, loop prevention, or import policy as Phase 0 exit gates.
</Accordion>
</AccordionGroup>

<Warning>
Do not size or operate a shadow pool that would be unsafe if software later bound Commitments by mistake. Ramp discipline and whole-pool fallback limits are normative now, including in dry-run.
</Warning>

## Related pages

<CardGroup>
<Card title="Failsafe model" href="/failsafe-model">
The Grid 1 baselines Phase 0 executes on purpose, and that Phase 1+ must revert to on fault.
</Card>
<Card title="Minimum viable domain" href="/minimum-viable-domain">
Host utility plus one flexible load: the on-ramp pocket for a first shadow run.
</Card>
<Card title="G2P reference" href="/g2p-reference">
The four message families, one-minute clock, and authentication MUSTS the dry-run still exercises.
</Card>
<Card title="Allocator" href="/allocator">
No-discretion clearing, withhold-on-stale, and constraint-authority inputs.
</Card>
<Card title="Federation" href="/federation">
What Phase 2 adds: announce-and-listen, conservative missing-announcement clearing.
</Card>
<Card title="Contributing" href="/contributing">
Where Phase 0 implementation reports go (Discussions) and how they feed the next spec revision.
</Card>
</CardGroup>
