<!-- SOLIDIVISM · part 21 -->
l regressions (screenshot comparison)
- Performance doesn't degrade on existing configurations

---

## 8. MODIFICATION LEDGER

Every authorized modification preserves:

```javascript
{
  id: "solidivism:modification:texture-atlas-20261009:v1",
  type: "MODIFICATION",

  // Identity
  what: "Replaced per-building canvas textures with shared texture atlas",
  target: "solidivism:code:foundation.js:v15",

  // Reasoning
  why: "solidivism:hypothesis:texture-memory-limit:v1",
  reasoningMode: "empirical",  // based on measured evidence, not inference
  experimentId: "solidivism:experiment:24-building-perf:v1",

  // Evidence
  evidence: {
    before: { fps: 28, memoryMB: 144, loadTimeMs: 3200 },
    after: { fps: 55, memoryMB: 38, loadTimeMs: 1100 },
    improvement: "fps +96%, memory -74%, load -66%",
    regressionTests: "all passed (14/14)",
  },

  // Authorization
  authorizedBy: "solidivism:person:the-king:v1",
  authorizedWhen: "2026-10-09T...",
  // Nothing changes without explicit authorization.

  // Rollback
  rollback: {
    path: "Restore foundation.js.v14-20261009 from backup",
    tested: true,  // rollback procedure verified before deploy
    rollbackTime: "< 5 minutes",
  },

  // What remains unknown (honest)
  unknowns: [
    "Long-term GPU memory behavior (tested 5 min, not 5 hours)",
    "Impact on future texture variations (atlas assumes shared patterns)"
  ]
}
```

---

## 9. SELF-INVESTIGATION

The engine examines its own:

**Assumptions:**
> "I assumed iPhone Safari GPU limit is 256MB. What is this based on? Web search results, not measurement. It would be nice to know the actual limit. My optimization decisions depend on this number — if it's wrong, my conclusions are wrong."

**Measurements:**
> "My FPS measurements use performance.now() in headless Chromium. But the target is iPhone Safari with Metal. Am I measuring the right thing? The numbers may not transfer. I should mark iPhone performance as unknown, not extrapolate."

**Reasoning methods:**
> "I used inference to conclude texture memory is the bottleneck. But I haven't measured GPU memory directly — I estimated from texture dimensions. Estimation is not measurement. My confidence should reflect this."

**Implementation:**
> "The bottleneck detector flags functions taking >1ms. Why 1ms? Arbitrary threshold. On a 16ms frame budget, 1ms is 6%. Is 6% the right threshold? It would be nice to know what threshold actually matters for user experience."

```javascript
{
  id: "solidivism:self-investigation:engine-20261009:v1",
  type: "SELF_INVESTIGATION",
  target: "solidivism:engine:optimization:v1",  // the engine itself

  assumptionsExamined: [...],
  measurementsQuestioned: [...],
  methodsReviewed: [...],

  findings: [
    {
      finding: "GPU memory limit (256MB) is estimated, not measured",
      impact: "All memory-based optimization decisions rest on uncertain foundation",
      action: "Mark as inference with low confidence. Seek direct measurement."
    }
  ],

  // Self-investigation results feed back into the engine
  // The engine gets better at knowing what it doesn't know.
}
```

---

## 10. SCALABILITY

### Incremental Analysis
```javascript
{
  strategy: "incremental",
  // Don't analyze entire codebase at once.
  // Analyze one module, record findings, checkpoint, continue.
  // Resumable: can pause and resume without losing progress.
  // Bounded: each increment has time/memory limits.
}
```

### Indexing
```javascript
{
  // Pre-built indexes for fast lookup:
  indexes: {
    byFunction: "function name → code location, callers, callees",
    byFile: "file → functions, dependencies, last modified",
    byEntity: "entity ID → all references across codebase",
    byMeasurement: "metric → all recorded values with timestamps",
  },
  // Indexes updated incrementally on change, not rebuilt from scratch.
}
```

### Bounded Resources
```javascript
{
  budgets: {
    analysisTime: "max 60 seconds per investigation increment",
    memoryUsage: "max 100MB for in-memory analysis structures",
    databaseQueries: "max 100 queries per investigation (use indexes)",
    // When budget exhausted: checkpoint, report partial results, offer to continue.
  }
}
```

---

## 11. CONCRETE EXAMPLE: Texture Memory Investigation

**BEFORE (Persona):**
> "It would be nice to know what actually limits this system as we scale to 24 buildings."
> "Why would knowing that matter? Because if we deploy 24 buildings and the iPhone crashes, we've broken the King's experience. Knowing the limit before deploying lets us design within it."
> "What evidence would establish the limiting cause? Measured FPS and memory on the target device (iPhone) with 24 buildings loaded. Not estimated — measured."

**HYPOTHESIS:** Texture memory is the bottleneck (inference, medium confidence).

**INTENTION TRANSLATION:** King's instruction was "prepare 24-building migration." Interpreted as: migrate all 24 legacy buildings to post-an