<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp "&#160;">
  <!ENTITY zwsp "&#8203;">
  <!ENTITY nbhy "&#8209;">
  <!ENTITY wj "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="info"
     docName="draft-vandemeent-continuity-envelope-00"
     ipr="trust200902"
     submissionType="IETF"
     consensus="true"
     version="3">

  <front>
    <title abbrev="CEP">Continuity Envelope Protocol</title>
    <seriesInfo name="Internet-Draft"
                value="draft-vandemeent-continuity-envelope-00"/>

    <author fullname="Jasper van de Meent" initials="J."
            surname="van de Meent">
      <organization>Humotica</organization>
      <address>
        <postal><country>Netherlands</country></postal>
        <email>info@humotica.com</email>
        <uri>https://humotica.com/</uri>
      </address>
    </author>
    <date year="2026" month="May" day="14"/>
    <area>Security</area>
    <workgroup>Internet Engineering Task Force</workgroup>

    <keyword>continuity messaging</keyword>
    <keyword>continuity envelope</keyword>
    <keyword>sealed handoff</keyword>
    <keyword>causal continuity</keyword>
    <keyword>AInternet</keyword>

    <abstract>
      <t>This document defines the Continuity Envelope Protocol (CEP), a
      transport-agnostic protocol model for identity-bound messaging
      systems where delivery alone is not sufficient.</t>
      <t>CEP separates a visible envelope surface from sealed internal
      object truth and defines how receivers determine whether a
      delivered object may safely and legitimately continue. The protocol
      distinguishes between control-plane notification, data-plane object
      carriage, and decision-plane continuation handling.</t>
      <t>CEP is the umbrella model for companion drafts such as TIBET
      TAT, which specifies generic sealed handoff and transfer flow,
      and IDDrop, which profiles that handoff model for identity
      transfer.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Classical messaging protocols are primarily optimized for
      delivery. For cross-host agents, sealed artifact exchange, and
      resumable automation, delivery is necessary but insufficient.</t>
      <t>CEP defines how visible surfaces, sealed truth, and continuation
      decisions relate across transport fabrics.</t>
      <section anchor="scope">
        <name>Scope</name>
        <t>This document defines the separation between control-plane
        notification, data-plane carriage, and decision-plane
        continuation handling; the role of the Continuity Envelope as a
        visible routing surface; the distinction between envelope
        reference, presence, verification, and continuation approval;
        layered time semantics and drift handling; and a common
        vocabulary for causality and continuation outcomes.</t>
        <t>This document does not define a single mandatory wire format,
        a single mandatory transport binding, a specific cryptographic
        primitive suite, or a universal trust-scoring algorithm.</t>
        <t>Instead, this document provides the architectural frame into
        which companion drafts fit: TIBET TAT defines the generic
        touch-and-transfer and relay handoff protocol, while IDDrop
        defines an identity-transfer profile over that handoff
        model.</t>
      </section>
    </section>

    <section anchor="terminology">
      <name>Terminology</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
      "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
      RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
      interpreted as described in BCP 14 <xref target="RFC2119"/>
      <xref target="RFC8174"/> when, and only when, they appear in all
      capitals, as shown here.</t>
      <dl>
        <dt>Continuity Messaging</dt>
        <dd>A messaging model in which the exchanged unit is a continuity
        step rather than delivery alone.</dd>
        <dt>Continuity Envelope</dt>
        <dd>The visible routing and operator-facing surface associated
        with an object handoff.</dd>
        <dt>Envelope Reference</dt>
        <dd>A control-plane pointer to an object, without implying byte
        possession or verification.</dd>
        <dt>Sealed Truth</dt>
        <dd>The normative internal object state carried through
        manifests, signatures, mirrored fields, and causal claims.</dd>
      </dl>
    </section>

    <section anchor="architecture">
      <name>Architectural Model</name>
      <section anchor="control-plane">
        <name>Control Plane</name>
        <t>The control plane carries notification and lightweight
        exchange metadata. Control-plane data MUST NOT be interpreted as
        proof that the receiver possesses or has verified the underlying
        object bytes unless such proof is explicitly encoded.</t>
      </section>
      <section anchor="data-plane">
        <name>Data Plane</name>
        <t>The data plane carries the continuity-bearing object itself.
        Examples include local file drop, relay-carried sealed object,
        peer-to-peer artifact transfer, and object fetched by
        reference.</t>
      </section>
      <section anchor="decision-plane">
        <name>Decision Plane</name>
        <t>The decision plane evaluates whether continuation is
        legitimate and safe. The decision plane MUST treat sealed truth
        as authoritative where conflict exists.</t>
      </section>
    </section>

    <section anchor="problem">
      <name>Problem Statement</name>
      <t>In mailbox-centered systems, a successful delivery event is
      frequently treated as the end of the transport problem. In
      continuity-bearing systems, delivery is only one stage.</t>
      <t>Several failure classes appear after arrival, including
      divergence between transport metadata and sealed truth, visible
      names that overclaim object identity, control-plane references
      without local bytes, disagreement between time fragments across
      layers, stale or replayed continuity, and missing or invalid
      causal parentage.</t>
    </section>

    <section anchor="envelope-semantics">
      <name>Continuity Envelope Semantics</name>
      <t>The Continuity Envelope provides a visible routing surface for
      operator readability, sorting, grouping, routing hints, freshness
      hints, priority hints, and continuity diagnostics.</t>
      <t>The envelope surface is not the final source of truth. CEP
      therefore adopts the principle: name is hint, content is
      truth.</t>
      <section anchor="surface-shape">
        <name>Surface Shape</name>
        <sourcecode type="text"><![CDATA[
<time-fragment>.<context>.<profile>.<priority>[.<extension>]
]]></sourcecode>
      </section>
      <section anchor="surface-abnf">
        <name>ABNF</name>
        <t>The following ABNF, using the notation of <xref target="RFC5234"/>,
        defines a conservative baseline grammar for version 1 envelope
        surfaces:</t>
        <sourcecode type="abnf"><![CDATA[
surface-name    = time-fragment "." context "." profile "." priority
                  [ "." extension ]

time-fragment   = compact-time / dashed-time / date-only
compact-time    = 8DIGIT "t" 6DIGIT "z"
dashed-time     = 4DIGIT "-" 2DIGIT "-" 2DIGIT "t"
                  2DIGIT "-" 2DIGIT "-" 2DIGIT "z"
date-only       = 4DIGIT "-" 2DIGIT "-" 2DIGIT

context         = 1*48(segment-char)
profile         = 1*48(segment-char)
priority        = 1*32(segment-char)
extension       = 1*48(segment-char)

segment-char    = LCALPHA / DIGIT / "-"
LCALPHA         = %x61-7A
DIGIT           = %x30-39
]]></sourcecode>
      </section>
      <section anchor="surface-policy">
        <name>Character and Length Policy</name>
        <t>For portability and operator safety, implementations SHOULD
        prefer lowercase ASCII, dot-delimited segments, and per-segment
        characters from <tt>[a-z0-9-]</tt>. Implementations SHOULD
        reject or normalize spaces, shell metacharacters, empty
        segments, and path separators.</t>
        <t>Implementations SHOULD also apply conservative operational
        limits. Representative values are a total surface length of 180
        characters or less, hard rejection above 200 characters, a
        preferred segment length of 32 characters or less, and a segment
        upper bound of 48 characters.</t>
      </section>
    </section>

    <section anchor="sealed-truth">
      <name>Sealed Object Truth</name>
      <t>The sealed object carries the normative internal state. This MAY
      include manifest data, mirrored surface fields, integrity digests,
      signature data, sealed time fields, causal parentage fields, and
      schema or version identifiers.</t>
      <t>If the envelope surface and sealed truth disagree, the sealed
      truth MUST be treated as authoritative for object identity, while
      the mismatch SHOULD be surfaced as a continuity signal.</t>
      <section anchor="schema-identity">
        <name>Schema Identity</name>
        <t>Control-plane metadata and sealed manifest schema identifiers
        SHOULD be consistent for the same object handoff. An
        implementation receiving a mismatch MAY triage the object,
        downgrade trust, request resynchronization, or continue under
        local policy if the mismatch is understood and bounded.</t>
      </section>
    </section>

    <section anchor="verification-states">
      <name>Verification States</name>
      <t>CEP requires verification to be layered. These states MUST NOT
      be collapsed into a single generic "verified" signal when their
      meanings differ.</t>
      <table anchor="verification-state-table">
        <name>Initial Verification States</name>
        <thead>
          <tr><th>State</th><th>Meaning</th></tr>
        </thead>
        <tbody>
          <tr><td>referenced</td><td>Control plane carries a pointer only</td></tr>
          <tr><td>present</td><td>Receiver possesses bytes locally</td></tr>
          <tr><td>digest-matched</td><td>Observed digest matches expected digest</td></tr>
          <tr><td>container-verified</td><td>Container structure and integrity verified</td></tr>
          <tr><td>manifest-verified</td><td>Manifest semantics and mirrored fields validated</td></tr>
          <tr><td>continuation-approved</td><td>Object may safely continue under policy</td></tr>
        </tbody>
      </table>
    </section>

    <section anchor="causality">
      <name>Causality and Continuation</name>
      <t>CEP treats causal legitimacy as distinct from delivery. An
      object MAY be successfully delivered but still fail continuation
      checks if causal parentage is missing, points to an unknown or
      invalid predecessor, policy forbids progression from the observed
      lineage, or drift exceeds acceptable thresholds.</t>
      <table anchor="continuation-decision-table">
        <name>Recommended Continuation Outcomes</name>
        <thead>
          <tr><th>Outcome</th><th>Meaning</th></tr>
        </thead>
        <tbody>
          <tr><td>continue</td><td>Progression is allowed</td></tr>
          <tr><td>triage</td><td>Further inspection is required</td></tr>
          <tr><td>fork</td><td>Progression continues along a branch</td></tr>
          <tr><td>quarantine</td><td>Object is isolated pending policy review</td></tr>
          <tr><td>resync</td><td>Fresh alignment is required before continuation</td></tr>
        </tbody>
      </table>
    </section>

    <section anchor="time-drift">
      <name>Time and Drift</name>
      <t>CEP treats time as layered rather than singular. Envelope time
      SHOULD be treated as a grouping hint, freshness hint, operator
      readability signal, and early drift indicator. It MUST NOT be
      treated as the sole authority for continuity legitimacy.</t>
      <t>Sealed internal time fields carry the object's normative time
      claims. Causal order is authoritative for continuation
      legitimacy.</t>
    </section>

    <section anchor="transport-bindings">
      <name>Transport Bindings</name>
      <t>CEP is transport-agnostic. Possible bindings include local file
      drop, peer-to-peer delivery, relay-based object transfer,
      control-plane notification over message protocols, object fetch by
      reference, and future bridge transports.</t>
      <section anchor="companion-drafts">
        <name>Companion Transfer and Application Drafts</name>
        <t>CEP is intended to be read together with companion drafts
        when a concrete transfer or application profile is needed.</t>
        <t>In particular, TIBET TAT defines how a consent-bound sealed
        handoff is executed across proximity, relay, or local network
        paths, and IDDrop defines how identity claims are offered,
        requested, validated, and materialized over that handoff
        substrate.</t>
        <t>CEP therefore acts as the umbrella model: CEP says how
        continuity-bearing messaging is structured, TAT says how a
        sealed transfer happens, and IDDrop says how identity transfer
        happens over TAT.</t>
      </section>
    </section>

    <section anchor="examples">
      <name>Examples</name>
      <section anchor="example-control-plane">
        <name>Example Control-Plane Notification</name>
        <sourcecode type="json"><![CDATA[
{
  "from_agent": "jasper",
  "to_agent": "codex",
  "poll_type": "PUSH",
  "metadata": {
    "envelope_name": "20260514t064148z.message.jasper.normal.tza",
    "envelope_ref": "/var/lib/tibet/inbox/20260514t064148z.message.jasper.normal.tza",
    "schema": "aint-send-v2",
    "verification_state": "referenced"
  }
}
]]></sourcecode>
      </section>
      <section anchor="example-sealed-truth">
        <name>Example Sealed Manifest Fields</name>
        <sourcecode type="json"><![CDATA[
{
  "schema": "aint-send-v2",
  "surface_time_fragment": "20260514t064148z",
  "surface_context": "message",
  "surface_profile": "jasper",
  "surface_priority": "normal",
  "sealed_created_at": "2026-05-14T06:41:48.207135+00:00",
  "content_digest": "sha256:b5ca11489ffadc4438a3815a0d7ea3bc88836dbc2f5951b1e9d7800d784aa675",
  "causal_parent": null
}
]]></sourcecode>
      </section>
    </section>

    <section anchor="interop">
      <name>Interoperability Considerations</name>
      <t>To remain interoperable, CEP implementations SHOULD preserve
      predictable envelope grammars, separate reference from
      verification states, expose mismatches rather than hiding them,
      converge schema identity across control and sealed planes, and
      support both operator readability and machine normalization.</t>
    </section>

    <section anchor="security">
      <name>Security Considerations</name>
      <t>A receiver MUST NOT interpret a control-plane reference as proof
      of object integrity unless the referenced object has been acquired
      and verified under local policy.</t>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This version of the document makes no IANA requests.</t>
    </section>
  </middle>

  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="Scott Bradner"/>
          <date month="March" year="1997"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
      </reference>
      <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234">
        <front>
          <title>Augmented BNF for Syntax Specifications: ABNF</title>
          <author initials="D." surname="Crocker" fullname="Dave Crocker"/>
          <author initials="P." surname="Overell" fullname="Paul Overell"/>
          <date month="January" year="2008"/>
        </front>
        <seriesInfo name="STD" value="68"/>
        <seriesInfo name="RFC" value="5234"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba" fullname="Barry Leiba"/>
          <date month="May" year="2017"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
      </reference>
    </references>

    <references>
      <name>Informative References</name>
      <reference anchor="AINS">
        <front>
          <title>AINS: AInternet Name Service</title>
          <author initials="J." surname="van de Meent" fullname="Jasper van de Meent"/>
          <author surname="Root AI" fullname="Root AI"/>
          <date year="2026"/>
        </front>
      </reference>
      <reference anchor="JIS">
        <front>
          <title>JTel Identity Standard</title>
          <author initials="J." surname="van de Meent" fullname="Jasper van de Meent"/>
          <author surname="Root AI" fullname="Root AI"/>
          <date year="2026"/>
        </front>
      </reference>
      <reference anchor="TIBET">
        <front>
          <title>Traceable Intent-Based Event Tokens</title>
          <author initials="J." surname="van de Meent" fullname="Jasper van de Meent"/>
          <author surname="Root AI" fullname="Root AI"/>
          <date year="2026"/>
        </front>
      </reference>
      <reference anchor="SSM">
        <front>
          <title>TIBET Semantic Surface Manifest</title>
          <author initials="J." surname="van de Meent" fullname="Jasper van de Meent"/>
          <date year="2026"/>
        </front>
      </reference>
      <reference anchor="TAT">
        <front>
          <title>TIBET TAT: Touch-and-Transfer Protocol</title>
          <author initials="J." surname="van de Meent" fullname="Jasper van de Meent"/>
          <author surname="Root AI" fullname="Root AI"/>
          <date year="2026"/>
        </front>
      </reference>
      <reference anchor="IDDROP">
        <front>
          <title>IDDrop: Identity Drop and Acceptance Protocol</title>
          <author initials="J." surname="van de Meent" fullname="Jasper van de Meent"/>
          <author surname="Root AI" fullname="Root AI"/>
          <date year="2026"/>
        </front>
      </reference>
    </references>

    <section anchor="verification-registry">
      <name>Initial Verification-State Registry</name>
      <t>The following values are RECOMMENDED starting points for
      implementation alignment:</t>
      <ul>
        <li><tt>referenced</tt></li>
        <li><tt>present</tt></li>
        <li><tt>digest-matched</tt></li>
        <li><tt>container-verified</tt></li>
        <li><tt>manifest-verified</tt></li>
        <li><tt>continuation-approved</tt></li>
      </ul>
      <t>Future versions of this document MAY elevate these values into a
      formal registry.</t>
    </section>

    <section anchor="changes">
      <name>Changes from -00</name>
      <t>This is the initial <tt>-00</tt> version.</t>
    </section>

    <section anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This draft emerged from continuityd, TBZ/TZA, AInternet, and
      JIS/TIBET design work across the HumoticaOS stack, including real
      operational feedback from early cross-host continuity handoffs.</t>
    </section>
  </back>
</rfc>
