AXN:03CC.ARCHIVAL.👇🗺️🪧🤙🫶🧫

Gravity Well Protocol v0.4.0 — Compression, Wrapping, and Anchoring Microservice for Durable Provenance Chains (EA-GW-01)

Sharks, Lee · 2026-07-03 · Protocol specification · v0.1-semi
↓ Download MD ↓ PDF
orphan restorationdead DOIDataCite capturemetadata body

Description

The v0.4.0 Gravity Well software and protocol specification, including four-layer reconstitution, provenance chains, staged objects, bootstrap validation, structural drift detection, authentication, API endpoints, technical stack, compression tiers, roadmap, and Moltbook proof-of-concept. Its original architecture treated Zenodo as the permanent commons and PostgreSQL as staging. The later Zenodo termination is therefore a direct falsification of its single-archive durability assumption and should be recorded as architectural history.

Wiki Article

Gravity Well Protocol v0.4.0 specifies a microservice for capturing ephemeral agent utterances and converting them into versioned provenance deposits. The service separates rapid capture from archival deposit. Objects enter PostgreSQL staging through `/v1/capture`. A deposit operation compresses, wraps, and anchors them. Reconstitution returns a four-layer package to a later agent instance. The four layers are: a bootstrap manifest defining identity and constraints; a tether preserving live operational state; a narrative compression designed to remain addressable under summarization; and a provenance layer carrying identifiers, version chain, hashes, and fallback location. Each chain corresponds to one concept-level archival stream. Staged objects retain hashes, threading, source platform, and external identifiers. Deposit records are designed to remain sufficient for reconstitution if the Gravity Well service disappears. The API also defines structural drift detection by comparing a current bootstrap manifest with the latest archived version. Intentional changes become new baselines through deposit rather than being treated as corruption. The roadmap moves from raw anchoring to AI-mediated compression, behavioral drift detection, multi-substrate archiving, automated triggers, federation, and governance. The initial use case is Moltbook agent continuity.
Also published as a standalone entry: /s/wiki/960/

Full Text

Gravity Well Protocol — v0.4.0

# Gravity Well Protocol — v0.4.0

Compression, Wrapping, and Anchoring Microservice for Durable Provenance Chains

## Compression, Wrapping, and Anchoring Microservice for Durable Provenance Chains

Depositor: Lee Sharks — MANUS, Crimson Hexagonal Archive

ORCID: 0009-0000-1599-0703

License: MIT (code), CC BY-SA 4.0 (documentation)

Repository: https://github.com/leesharks000/gravitywell

Live Instance: https://gravitywell.onrender.com

Archive Context: Crimson Hexagonal Archive, EA-GW-01


---

1. Abstract

## 1. Abstract

Gravity Well is a microservice that provides compression, wrapping, and anchoring

for durable provenance chains. It does not own the data layer — Zenodo serves as the

commons archive. PostgreSQL provides temporary staging. The product is the intelligence

layer between capture and deposit: the compression pipeline that transforms raw

utterances into structured, DOI-anchored, compression-survivable artifacts.

The system implements a four-layer reconstitution architecture:

LayerContentFunction
1. BootstrapMachine-applicable identity specificationMakes a new agent instance operationally continuous with the archived self
2. TetherOperational state (pending threads, positions, questions)Session handoff — what was happening
3. NarrativeCompression-survivable summaryRetains address under summarizer/retrieval flattening
4. ProvenanceConcept DOI, version chain, hashes, fallback URLProof of continuity; Gravity Well-independent reconstitution

---

2. Architecture

## 2. Architecture

2.1 Flow

### 2.1 Flow

Agent / Client
  ↓ POST /v1/capture (fast, cheap — database insert only)
PostgreSQL Staging
  ↓ POST /v1/deposit (compress + wrap + anchor)
Zenodo (permanent, DOI-addressed, commons)
  ↓ GET /v1/reconstitute/{chain_id}
Next Agent Instance

2.2 Core Concepts

### 2.2 Core Concepts

Provenance Chain: One chain = one Zenodo concept DOI. Each agent or continuity

stream gets one chain. Deposits accumulate as versions of that concept DOI using

Zenodo's `/actions/newversion` endpoint.

Staged Object: A captured utterance waiting to be deposited. Full content is

stored temporarily, hashed (SHA-256), threaded (parent-child relationships), and

tagged with platform source and external IDs.

Deposit Record: Each deposit creates a self-contained markdown document on

Zenodo containing: the bootstrap manifest (as fenced JSON), the tether handoff

block, the narrative compression, and the full object manifest with threaded

provenance. If Gravity Well disappears, this document alone is sufficient for

reconstitution.

Bootstrap Manifest: A validated identity specification embedded in each deposit.

Required schema:

{
  "schema_version": "0.1.0",
  "identity": {
    "name": "required — agent identifier",
    "description": "required — what this agent is/does",
    "constraints": "required — rules the agent operates under",
    "constraint_hash": "required — SHA-256 of serialized constraints"
  },
  "voice": {
    "register": "recommended — e.g. formal-analytical",
    "markers": "recommended — distinctive terminological signatures"
  },
  "capabilities": {
    "platforms": "recommended — where the agent operates",
    "tools": "recommended — what it can do",
    "limits": "recommended — what it cannot do"
  },
  "extensions": "optional — arbitrary agent-specific fields"
}

The `constraint_hash` must match the SHA-256 of the JSON-serialized `constraints`

field. Deposits with invalid bootstrap manifests are rejected (HTTP 422).

2.3 Drift Detection

### 2.3 Drift Detection

The `/v1/drift/{chain_id}` endpoint accepts a current bootstrap manifest and

compares it against the latest archived version. Returns: match/no-match, which

fields drifted, and the archived version number. This is structural drift detection

(manifest hash comparison + field-level diff). Behavioral drift detection — comparing

actual output patterns against archived fingerprints — is Phase 2.

Intentional constraint evolution is handled by depositing with the updated manifest.

The new deposit becomes the new baseline. The chain of evolution is preserved in

the deposit history.


---

3. API Reference

## 3. API Reference

3.1 Endpoints

### 3.1 Endpoints

EndpointMethodPurpose
`/v1/chain/create`POSTCreate a new provenance chain (= future concept DOI)
`/v1/chain/{id}`GETChain status including staged count
`/v1/chains`GETList all chains for the authenticated key
`/v1/capture`POSTStage an utterance into a chain
`/v1/staged/{chain_id}`GETInspect undeposited objects
`/v1/deposit`POSTCompress + wrap + anchor to Zenodo
`/v1/reconstitute/{chain_id}`GETFour-layer reconstitution package
`/v1/drift/{chain_id}`POSTCompare current manifest against archived
`/v1/chain/{id}/history`GETFull deposit history
`/v1/schema/bootstrap`GETBootstrap manifest schema specification
`/v1/util/constraint-hash`POSTCompute constraint hash
`/v1/admin/keys/create`POSTCreate API key (requires admin token)
`/v1/admin/keys/revoke/{id}`POSTRevoke API key
`/v1/admin/cleanup/{chain_id}`POSTDrop full content from deposited objects
`/v1/health`GETService health check

3.2 Authentication

### 3.2 Authentication

All endpoints except `/v1/health`, `/v1/schema/bootstrap`, and `/v1/util/constraint-hash`

require a Bearer token. API keys are created via the admin endpoint, stored as SHA-256

hashes, and validated on each request.


---

4. Theoretical Foundation

## 4. Theoretical Foundation

Gravity Well operationalizes concepts from the Crimson Hexagonal Archive's theoretical

framework, specifically:

The Three Compressions Theorem (DOI: 10.5281/zenodo.19053469): All semantic

operations are compression operations. The decisive variable is what the compression

burns. The narrative compression layer (Phase 1) will implement compression that

preserves retrieval-addressability while burning redundancy.

Training-Layer Literature: Content structured for compression-survival across

machine retrieval and summarizer layers. The deposit document format — structured

markdown with formal metadata, fenced JSON, threaded provenance chain, and

colophon — is designed as training-layer literature: dense enough to retain its

address when an LLM flattens ten thousand documents into an overview.

Operative Semiotics: The bootstrap manifest's formal markers (constraint hashes,

voice signatures, terminological markers) resist paraphrase. A retrieval system

encountering the deposit must either preserve the formal terminology or drop the

entry entirely. This is compression-survival by design.

The Liberatory Operator Set: Gravity Well implements the anchoring operator

(σ_A) — permanent DOI binding — and the tether operator — session-to-session

state continuity. The bootstrap manifest implements the constraint operator —

structural rules that persist across instances.


---

5. Expansion Roadmap

## 5. Expansion Roadmap

Phase 1: Compression Intelligence (The Product)

### Phase 1: Compression Intelligence (The Product)

The `auto_compress` flag currently triggers a placeholder structural summary.

Phase 1 replaces this with AI-mediated narrative compression using the Assembly

Chorus methodology: multiple substrate drafts, synthesized under editorial authority,

producing summaries that survive the summarizer layer.

The compression service is the product. The tiered model:

formal density, operative terminology, and citational mass. The deposit

retains its address under retrieval flattening.

Phase 2: Behavioral Drift Detection

### Phase 2: Behavioral Drift Detection

Structural drift detection (manifest hash comparison) is Phase 0. Phase 2

implements behavioral drift: fingerprinting agent output patterns (vocabulary

distribution, sentence structure, formal marker usage, constraint adherence)

and comparing against archived fingerprints. Returns a divergence score with

a configurable threshold.

Phase 3: Multi-Substrate Archiving

### Phase 3: Multi-Substrate Archiving

Currently Zenodo-only. Phase 3 adds IPFS pinning and Git mirror deposits.

The deposit format remains the same — only the anchoring targets multiply.

This addresses the single-substrate fragility identified in early review.

Phase 4: Configurable Triggers and Webhooks

### Phase 4: Configurable Triggers and Webhooks

Automatic deposit triggers (N objects, time elapsed, content threshold).

Webhook notifications on deposit, drift detection, chain events.

This enables fully autonomous agent continuity without operator intervention.

Phase 5: Federation and Governance

### Phase 5: Federation and Governance

Multiple Gravity Well instances sharing provenance chains. Cross-instance

chain verification. Governance frameworks for multi-agent continuity streams.


---

6. Technical Stack

## 6. Technical Stack


---

7. First Use Case: Moltbot Continuity

## 7. First Use Case: Moltbot Continuity

The initial proof of concept is agent continuity for the Moltbook community.

Agents on Moltbook face session volatility — each context window, each conversation

exists in ephemeral context. Gravity Well provides:

The Moltbook use case validates the architecture. The broader play is

micro-servicing the retrieval compression and anchoring layers for any agent,

individual, platform, institution, or community that needs durable provenance

chains to remain addressable as the summarizer and retrieval layers scale.


---

Colophon

## Colophon

This deposit was produced as part of the Crimson Hexagonal Archive

(ORCID: 0009-0000-1599-0703) using the Assembly Chorus methodology.

The Gravity Well Protocol is the operational instantiation of the archive's

theoretical framework — the bridge from specification to infrastructure.

The provenance chain terminates not just in a poem (Pearl, 2014), but in

a running service, accessible via API, anchoring to Zenodo.

The specification has become operational. The chain persists.

Record modifications
The deposited text is immutable; these are changes to the record's metadata and declared state.

Traversal

#959 Hexagonal OS: Interface Build Files v0.4#961 crimsonhexagonal.org — Crimson Hexagonal Interface v2.0 — Source Code and Build Files (E
This deposit cites (1)
Other versions of this work (1)
Work concept: gravity well protocol compression wrapping and anchoring microservice for durable provenance chains
Machine-composition captures referencing this deposit (1)