<!-- SOLIDIVISM · part 1 -->
===== FILE: public/solidivism/EPISTEMOLOGICAL-PROPOSAL.md =====
# SOLIDIVISM EPISTEMOLOGICAL FOUNDATION UPGRADE
## Architectural Proposal for Review — DO NOT DEPLOY

**Requested by:** THE PROGRAMMER / GPT-6 Architectural Transfer
**Date:** October 8, 2026
**Status:** PROPOSAL ONLY — Live system untouched

---

## 1. CURRENT ARCHITECTURE AUDIT

### What Exists (Live at epistles.xyz/solidivism/)

**3D Foundation (`foundation.js`, ~900 lines):**
- Module: `Solidivism` closure
- Scene: THREE.Scene, PerspectiveCamera, WebGLRenderer
- Entities: 8 post-and-canopy buildings, 1 control room, 1 avatar, 1 floor
- Systems: collision (wall segments), input (keyboard + joystick), camera follow, procedural avatar animation
- Textures: canvas-generated (motherboard, tactical, door, labels)

**Demo Page (`index.html`):**
- Entry overlay, HUD, joystick, toolbar (3 buttons)
- Calls: init → setupInput → addBuilding × 8 → createControlRoom

**What Does NOT Exist:**
- No entity identification system (buildings are array indices)
- No event logging (actions vanish after execution)
- No provenance (who built what, when, why — only in MEMORY.md, unstructured)
- No causal links (can't trace instruction → code change → observed result)
- No uncertainty representation
- No versioning (only manual .bak files)

### Integration Points (non-breaking)
1. `addBuilding()` — entity creation point (assign ID here)
2. `checkCollision()` — event point (log here)
3. `animate()` — time-series point (snapshots here)
4. Module return object — API extension point
5. `index.html` — bootstrap point

### Preservation Constraints
- Do NOT change: rendering, avatar, input, camera math, locked spawn orientation
- Do NOT break: existing `addBuilding()` signature
- DO extend: return object with new accessors

---

## 2. IDENTITY REGISTRY DESIGN

### Entity Types
PERSON, AGENT, SESSION, INSTRUCTION, CODE, BUILDING, AVATAR, EVENT, EVIDENCE, DECISION, HYPOTHESIS

### ID Format
```
solidivism:<type>:<slug>:<version>
Example: solidivism:building:forge:v3
```

### Schema
```javascript
{
  id: "solidivism:building:forge:v3",
  type: "BUILDING",
  slug: "forge",
  version: 3,
  created: "2026-10-08T21:30:00Z",
  createdBy: "solidivism:agent:solid:v1",
  supersedes: "solidivism:building:forge:v2",
  status: "active",  // active | superseded | deprecated
  originalAuthor: null,  // null = unknown, never fabricated
  notes: "Post-and-canopy design"
}
```

### Rules
- New version on material change; old marked superseded, never deleted
- `registry.resolve("solidivism:building:forge")` → latest active
- In-memory Map + localStorage JSON + server export

---

## 3. EVENT AND EVIDENCE LEDGER

### Event Schema
```javascript
{
  id: "solidivism:event:evt-20261008-214433-001:v1",
  timestamp: "2026-10-08T21:44:33.123Z",
  actor: "solidivism:agent:solid:v1",
  action: "code.deploy",
  target: "solidivism:code:foundation.js:v14",
  context: { session: "...", instruction: "..." },
  before: null,  // null = unknown
  after: null,
  inquiry: {
    who: "solidivism:agent:solid:v1",
    what: "Deployed motherboard floor texture",
    when: "2026-10-08T21:44:33Z",
    where: "epistles.xyz/solidivism/, foundation.js",
    why: "solidivism:instruction:motherboard-floor:v1",
    how: "Canvas 512x512, RepeatWrapping 8x8"
  },
  confidence: "high",  // high | medium | low | unknown
  gaps: []  // unknown fields listed here
}
```

### Evidence Schema
```javascript
{
  id: "solidivism:evidence:browser-test-20261008-2133:v1",
  kind: "browser_test",  // | screenshot | code_inspection | user_report
  subject: "solidivism:building:forge:v1",
  claim: "Buildings are visible",
  observation: "Dark Tron-style scene with red neon buildings",
  source: "browser-task:handoff",
  supports: "solidivism:hypothesis:rebuild-fixes-rendering:v1",
  contradicts: null,
  confidence: "high",
  derivedFrom: []
}
```

### Rules
- Append-only. Corrections are new events referencing originals.
- Deletion prohibited. Deprecation is a new event.

---

## 4. RECURSIVE SIXFOLD INQUIRY

WHO, WHAT, WHEN, WHERE, WHY, HOW applied to every entity.
Answers referencing entity IDs can be expanded recursively.
Terminates at: explicit `unknown`, max depth (5), or circular reference.

```javascript
Solidivism.inquire(entityId, depth)  // Full tree
Solidivism.inquire(entityId, "why", depth)  // WHY chain only
```

Example:
```
Inquiry: solidivism:building:forge:v3
  WHY? → solidivism:instruction:future-no-walls:v1
    WHO gave it? → solidivism:person:the-king:v1
    WHAT was said? → "4 corner posts... slope as if standing under a future rocket ship"
    WHEN? → 2026-10-08T22:33:00Z
```

---

## 5. ORIGIN AND INTENT RECORD

```javascript
{
  id: "solidivism:origin:foundation.js-addBuilding:v3",
  codeId: "solidivism:code:foundation.js:v14",
  function: "addBuilding",
  author: "solidivism:agent:solid:v1",
  authorType: "agent",  // person | agent | unknown
  intent: {
    stated: "Replace walled 