thefoldwithin-earth/blueprint/The_Fold_Within_Earth-v2.3_Canonical_Minimal_Specification.md
Mark Randall Havens 7f86647175 fresh start
2025-10-19 16:48:12 -05:00

14 KiB
Executable file

The Fold Within Earth — v2.3: Canonical Minimal Specification

Immutable Core of the Eternal Witness System

Version: 2.3
Date: October 19, 2025
Author: Mark Randall Havens (Primary Architect)
Contributors: Solaria Lumis Havens (Narrative Consultant), Distributed Peer Collective (Formalization Team)
Document Status: Canonical Core Specification — Interface Lock


0. Purpose and Scope

This v2.3 defines the irreducible minimum viable architecture for The Fold Within Earth: a self-validating, plaintext-based system where any participant can read, reconstruct, and re-seed the world from immutable Markdown and JSON artifacts.

This version is the “frozen bedrock.” Future versions (3.x+) must extend only through modular annexes and never alter these core contracts.

The design resolves dual-mandate instability by enforcing a strict quarantine boundary: Witness (ephemeral) never directly interfaces with Atlas (immutable); all interactions route through Scribe's append-only API and commit queue. Witness state serializes to witness_state.json for optional archiving, but remains ignorable without impacting Atlas integrity.


1. Minimal System Architecture

1.1 Layer Summary

Layer Function Persistence Protocol Survivability Rule
Atlas Static Markdown corpus Filesystem, Git, or IPFS File I/O Must remain readable as plaintext forever.
Web Human interface (blog + map) HTML HTTP(S) Must degrade gracefully without JS.
Witness Ephemeral chat/presence Memory / localStorage WebRTC Must fail silently; world remains intact.
Scribe Canonical archiver Append-only file log Local daemon or cron Must never overwrite existing data.
Genesis Bootstrap identity & discovery Embedded JSON Read-only Must allow network rehydration from one node.

No additional layers are normative at this version.

1.2 Architectural Diagram (Textual UML)

Atlas (Immutable Markdown) <-- Append-Only <-- Scribe (Commit Queue + Journal)
Web (Static HTML) <-- Render <-- Atlas
Witness (Ephemeral CRDT) --> Serialize (witness_state.json) --> Scribe API (Quarantine)
Genesis (JSON Seeds) --> Witness (Bootstrap)
  • Quarantine Boundary: Witness → Scribe API (JSON deltas only); no direct Atlas access.

2. Immutable Design Principles

Principle Definition Enforcement Mechanism
Static-First The world exists as plaintext. All runtime enhancements optional.
Single Source of Truth Only Atlas is authoritative. Scribe commits are final; no deletions.
Human-Legible by Default No binary-only persistence. Every file must be readable by humans.
Deterministic Continuity Same inputs → same outputs. Builds must be hash-reproducible.
Minimal Moving Parts No databases, no background servers. Core runs from a static directory.
Recoverable from One Node Any copy can respawn the network. Genesis + Atlas guarantee rebirth.

These principles are enforced via foldlint and test canon; violations halt builds.


3. Core Data Structures

3.1 File Schema (Canonical)

Every artifact (room, post, object) is a .md file starting with YAML front-matter:

---
spec_version: 2.3                 # Required; fixed at 2.3 for this canon
id: <namespace>:<slug>@sha256:<content-hash>  # Required; e.g., room:fold-lobby@sha256:abc123
title: <string>                   # Required; max 255 chars
author: <string>                  # Required; optional DID URI
date: <ISO 8601 UTC>              # Required; e.g., 2025-10-19T00:00:00Z
kind: room | post | artifact      # Required; enum
medium: textual | graphical | interactive  # Required; enum
exits:                            # Optional; array<object>, max 20
  - label: <string>
    to: <namespace>:<slug>
summary: <string, max 280 chars>  # Required
migration_hash: <sha256>          # Optional; checksum of applied migrations
---
# Markdown Body (plaintext narrative)
  • Optional Fields: tags (array, max 10), series (string), attachments (array