<!-- SOLIDIVISM · part 29 -->
xamination is mandatory after conclusions.** Not optional. Every conclusion recorded triggers a `reflect()` pass.

### What the Persona Cannot Do

- Cannot mark significance as "consequence" without linking to a real decision entity
- Cannot mark confidence as "high" without verified evidence
- Cannot skip self-examination
- Cannot delete or modify its own prior reflections (append-only applies to self-exams too)

---

## SAFEGUARD 7: DEPLOYMENT READINESS (CONFIRMED)

Environment already supports everything Phase 1 needs:

| Requirement | Status | Action Needed |
|-------------|--------|---------------|
| PostgreSQL server | Active (v18.6) | None |
| Database | `epistles` exists | Create tables only |
| Node pg driver | Installed (^8.13.1) | None |
| Application role | Not yet created | Create `solidivism_app` role |
| Schema changes | None yet | Run DDL (new tables only) |
| Server config changes | None needed | None |
| New dependencies | None needed | None |

**Pre-implementation checklist (no changes yet):**
- [x] PostgreSQL active and reachable
- [x] Target database exists
- [x] Node driver available
- [x] No new packages needed
- [ ] Create restricted role (on authorization)
- [ ] Create tables (on authorization)
- [ ] Verify role permissions (on authorization)

---

## EXACT PHASE 1 CHANGE BOUNDARIES

### Files Modified

| File | Change | Lines | Reversible |
|------|--------|-------|------------|
| `foundation.js` | Add `observe()` function + 3 call sites | ~15 lines added, 0 modified | Yes: delete added lines |
| `foundation.js` | Add `epistemology: Epistemology` to return | 1 line added | Yes |
| `foundation.js` | Append Epistemology closure (new code at end) | ~400 lines added, 0 existing modified | Yes: delete appended block |
| `index.html` | Add `Epistemology.init()` after `Solidivism.init()` | 1 line added | Yes |
| Database | Create 3 tables + 1 role + triggers | DDL only, no existing tables touched | Yes: DROP TABLE (with backup) |

### Files NOT Modified

- No changes to rendering pipeline
- No changes to avatar construction
- No changes to input handling
- No changes to camera math
- No changes to collision logic
- No changes to existing `addBuilding()` behavior (only added optional param)
- No changes to any other epistles.xyz routes
- No changes to server.js (new API routes added, none modified)

### Lines of Existing Code Touched: ZERO

Phase 1 is purely additive to existing code. The only "modifications" are:
- 3 `observe()` call insertions (new lines, not changed lines)
- 1 return object addition (new property)
- 1 init call (new line)

Every existing line of 3D code remains byte-identical.

---

## REMAINING DEPLOYMENT RISKS

### Risk 1: localStorage Quota Exceeded
**Likelihood:** Low | **Impact:** Medium
If user is offline for extended session, event cache may exceed 5MB localStorage limit.
**Mitigation:** Circular buffer (keep most recent 5,000 events). Older unsynced events marked as "potentially lost" in next sync. PostgreSQL remains authoritative for what it received.

### Risk 2: Clock Skew Between Browser and Server
**Likelihood:** Medium | **Impact:** Low
`event_time` (client) may differ from `recorded_at` (server) by seconds or minutes.
**Mitigation:** Both timestamps stored. Queries default to `recorded_at` for ordering. `event_time` preserved for client-context.

### Risk 3: API Endpoint Abuse
**Likelihood:** Low | **Impact:** Medium
Public POST endpoint could be spammed with fake events.
**Mitigation (Phase 1):** Rate limiting (100 events/min per IP). Phase 2: authentication.
**Note:** Fake events are marked with `source: 'browser'` and can be filtered. They cannot modify existing records (append-only).

### Risk 4: Persona Generates Excessive Questions
**Likelihood:** Medium | **Impact:** Low
Unconstrained curiosity could generate thousands of question entities.
**Mitigation:** Question creation throttled (max 10/min). Questions require explicit trigger (not automatic for every observation).

### Risk 5: Backfill Data Quality
**Likelihood:** High | **Impact:** Low
Backfilled entities from investigation transfer will have many "medium" confidence levels due to compaction.
**Mitigation:** All backfilled records marked `source: 'backfill'`, `confidence` honestly assessed. They are starting points, not ground truth.

### Risk 6: Performance Impact of observe()
**Likelihood:** Low | **Impact:** Medium
If `observe()` is called too frequently (e.g., every frame), it could impact FPS.
**Mitigation:** Phase 1 has only 3 call sites, none in the per-frame loop. Collision observation throttled to 1/sec. Measured in T9.

---

## AUTHORIZATION REQUIRED

The following actions require The Programmer's explicit authorization:

1. Create `solidivism_app` database role
2. Create `solidivism_events`, `solidivism_entities`, `solidivism_edges` tables
3. Deploy modified `foundation.js` to staging (`/solidivism-staging/`)
4. Run backfill script for known entiti