index.md

HTML wrapper for HTML-only fetchers; content is shown verbatim.

Raw file

Links (extracted)

Clickable list for reviewers; avoids copy/paste line-wrap issues.
# Final Synthesis: `if.context` Architecture (v0.6)

## Provenance Note

| Role | Model | Contribution |
|------|-------|--------------|
| **Original Author** | ChatGPT 5.2 xhigh | Whitepaper draft + `if.context` distillation |
| **Security/Type Safety Reviewer** | Claude | Cryptographic binding, semantic stability, anti-fatigue |
| **Crypto/Safety Reviewer** | Gemini | Crypto-shredding, Chain of Verification, Fellows personas |
| **Pragmatic Implementation Reviewer** | Grok | Quantification, visuals, tooling, timelines |
| **Infra/Spec Alignment Reviewer** | Claude Opus | Fit to actual `if.bus` envelope constraints (`payload_sha256`, `payload_ref`), clarified Redis role |
| **Synthesizer** | Claude (this session) | Conflict resolution, gap filling, final architecture |

---

## Source inputs (verifiable; demoing multi-model strengths)

Inputs bundle (download alongside this paper):
- [`if.context-all-agents-input.zip`](./if.context-all-agents-input.zip) (sha256: `55bbcfdd9f43cf9c5a87cc30138dd25664796dac898770f37487353c3cf7c536`)

Zero-context starter prompt (for new sessions):
- [`zero-context-starter.md`](./zero-context-starter.md)

Contained source artifacts (sha256):
- [`gpt-5.2-xhigh-infrafabric.io_llm proposal-base.json`](./inputs/gpt-5.2-xhigh-infrafabric.io_llm%20proposal-base.json) (`1b9abe7be0172837bdceca1d6241e91cfc97cfd5363be7d87e58fdc39c542e82`)
- [`claude-sonnet-Evaluating infrafabric.io_llm proposal section by section_e0290873.json`](./inputs/claude-sonnet-Evaluating%20infrafabric.io_llm%20proposal%20section%20by%20section_e0290873.json) (`d1072fb3316d8d003e2b17573505d7c1b76a39c80d03e79c6d8762d016df399f`)
- [`gemini-InfraFabric RLM Proposal Review_af7e54d8.json`](./inputs/gemini-InfraFabric%20RLM%20Proposal%20Review_af7e54d8.json) (`d87fa69eb1395ed68217839cb9ed1e52b9252567af72f399b8090eaffb262c9e`)
- [`grok-InfraFabric LLM Proposal Evaluation_26a44994.json`](./inputs/grok-InfraFabric%20LLM%20Proposal%20Evaluation_26a44994.json) (`915c012ae9880c43e18b77ce352d3109f53cbe0614fd226057037fe33c72ae10`)
- [`claude-opus-if.context-synthesis-of-all-agents.txt`](./inputs/claude-opus-if.context-synthesis-of-all-agents.txt) (`436114eb2e9e2d560fa70f125d613ad64b2f82acefc7be8cf4a1c075d759e1dc`)

Black/white:
- The provenance table above describes *who contributed what*.
- The hashes above prove *which bytes were used as inputs*.
- Neither implies correctness or safety of any interpretation.

## 1. Original Thesis Assessment

ChatGPT 5.2 xhigh's core framing is **unanimously endorsed** by all three reviewers:

> *"Modern agent swarms don't fail because they lack tokens. They fail because they lack **contracts**."*

> *"Context is not prompt text. Context is an external evidence environment."*

**Verdict: Foundation is sound. Build on it.**

---

## 2. What Each Model Uniquely Contributed

### 2.1 ChatGPT 5.2 xhigh (Original)

| Strength | Example |
|----------|---------|
| Clean architectural separation | `if.bus` ≠ `if.context` ≠ `if.trace` ≠ `if.gov` |
| Correct anti-pattern identification | "Dump and pray" context handling |
| Evidence-first philosophy | Everything is a pointer to bytes |
| Honest scoping | "Integrity ≠ correctness/safety/compliance" |
| Practical starting point | "Single-host reality gate first" |

**Gap identified by reviewers**: Security hardening, quantification, and non-determinism handling were underspecified.

### 2.2 Claude (Security Reviewer)

| Addition | Rationale |
|----------|-----------|
| Cryptographic tenant binding | "ID tagging" isn't enough; spoofable |
| Type-safe provider IDs | String-only IDs cause coercion bugs |
| Semantic stability metrics | LLMs aren't hash-deterministic; need different measure |
| Governance anti-fatigue | Flooding attacks on approval queues |
| Replay budget separation | Prevent replay amplification attacks |
| Causal chain in envelopes | Use bus-native `correlation.causation_id` (parent linkage) for provenance graphs |

### 2.3 Gemini (Crypto/Safety Reviewer)

| Addition | Rationale |
|----------|-----------|
| Crypto-shredding | GDPR deletion in append-only systems |
| Chain of Verification schema | Machine-auditable claim → bytes linkage |
| Safety/Security Fellow personas | Concrete evaluator archetypes |
| Resource governance | Hard stops via budgets (bus guardrails + `if.bus.budget_event`) |
| Temporal drift handling | `retrieved_utc` for version pinning |
| Encryption key management | `encryption_key_id` per artifact |

### 2.4 Grok (Pragmatic Reviewer)

| Addition | Rationale |
|----------|-----------|
| Quantified success thresholds | ≥95% provenance coverage, etc. |
| Visual diagrams | Flowcharts for the 8-step loop |
| Review pack format | ZIP structure with tools |
| Migration path | Single-host → Kubernetes → multi-region |
| Timeline with milestones | Provided as planning scaffolding; intentionally removed in v0.6 (replaced by “ship today” MVP→OVP checklists) |
| Multimedia artifact support | Images, PDFs, not just text |
| Model poisoning threat | If fine-tuning is in-loop |

---

## 3. Conflict Resolution

### 3.1 Determinism Metrics

| Position | Model | Resolution |
|----------|-------|------------|
| "Hash-identical replay" | Original | ❌ Wrong for LLM outputs |
| "Provenance chain validity" | Claude | ✓ Adopted for Type 2 ops |
| "Semantic stability score" | Claude | ✓ Adopted (≥0.90 target) |

**Final position:**
- **Type 1 operations** (file reads, hashing): Hash-identical replay expected
- **Type 2 operations** (LLM inference): Provenance chain must be valid; semantic stability ≥0.90

### 3.2 Roadmap Sequencing

| Position | Model | Resolution |
|----------|-------|------------|
| Start with Reader Pack | Original | ❌ Too hard too early |
| Start with deterministic foundations | Claude | ✓ Adopted |
| Add timeline accountability | Grok | ✓ Adopted |

**Final sequence:** Bus → Adapter → Deterministic Replay → Crypto → Trace → LLM Folding → Gov → External Review

### 3.3 Storage Model

| Position | Model | Resolution |
|----------|-------|------------|
| Implicit (hash + store) | Original | ❌ Underspecified |
| Encrypted-at-rest with key_id | Gemini | ✓ Adopted |
| Redis as cache not spine | All | ✓ Unanimous |

### 3.4 Fit to the real `if.bus` envelope (no-sprawl)

Adopted (aligned to the actual `if.bus.envelope` contract):
- Use `if.bus.envelope` v1.0.0 (no custom envelope variants); put extra fields in `extensions` (dot-namespaced keys).
- `payload_sha256` is always required; `payload_ref` is the pointer-only pattern for large/redacted payloads.
- `payload_ref.source_url` (when present) must be public/no-login/no interactive auth; otherwise omit it and use `/mcp` (tenant wall) or internal storage pointers.
- Replay/pause/quarantine, DLQ, and budgets are `if.bus` responsibilities; `if.context` should not re-implement transport/control semantics.
- Redis is an optional accelerator (cache/index/vectors). `redis_streams` is a **bus transport option**, not context SoT.

---

## 4. Consolidated Architecture (v0.6)

### 4.1 Component Responsibilities (Final)

```
┌─────────────────────────────────────────────────────────────────────────┐
│                              if.context                                  │
│                   "External Evidence Environment"                        │
│  ┌──────────────────────────────────────────────────────────────────┐   │
│  │  Artifacts (encrypted)           Derived Artifacts               │   │
│  │  ├─ content_sha256               ├─ derivation_type              │   │
│  │  ├─ encryption_key_id            ├─ derived_from[{id, span}]     │   │
│  │  ├─ content_type (text/img/pdf)  ├─ verification_chain[]         │   │
│  │  ├─ source.tenant_signature      └─ model_context{}              │   │
│  │  └─ excerpt_addressing{}                                         │   │
│  ├──────────────────────────────────────────────────────────────────┤   │
│  │  Read Plans (auditable intent)                                   │   │
│  │  ├─ requested_artifacts[]                                        │   │
│  │  ├─ skipped_artifacts[] + skip_reason                            │   │
│  │  └─ emitted_utc                                                  │   │
│  └──────────────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────────────┘
         │                    │                     │
         ▼                    ▼                     ▼
┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐
│     if.bus      │  │    if.trace     │  │     if.gov      │
│ ───────────────-│  │ ────────────────│  │ ────────────────│
│ • Envelopes     │  │ • Receipts      │  │ • Escalations   │
│ • Control plane │  │ • Byte-range    │  │ • Council votes │
│ • DLQ           │  │   attestations  │  │ • Anti-fatigue  │
│ • Budgets       │  │ • Semantic      │  │ • Resource kill │
│ • Causation     │  │   stability     │  │ • Term limits   │
└────────┬────────┘  └─────────────────┘  └─────────────────┘
         │
         ▼
┌─────────────────┐
│     if.api      │
│ ────────────────│
│ • Adapters      │
│ • trust_level   │
│ • capabilities  │
│ • type schemas  │
└─────────────────┘
```

### 4.2 Canonical Artifact Schema (Final)

```json
{
  "schema": "if.context.artifact.v1",
  "artifact_id": "art_a1b2c3...",
  
  "content": {
    "sha256": "...",
    "type": "text/markdown|image/png|application/pdf",
    "size_bytes": 1048576,
    "encryption_key_id": "key_..."
  },
  
  "source": {
    "origin_type": "url|api_event|upload",
    "origin_ref": "https://...",
    "retrieved_utc": "2026-01-25T12:34:56Z",
    "tenant_id": "acme",
    "tenant_signature": "sig_...",
    "producer_trust_level": "untrusted|verified|internal"
  },
  
  "addressing": {
    "method": "byte_range|jsonpath|line_number|image_region",
    "spec_version": "1.0"
  },
  
  "type_schema": "if.context.source_types.instagram_dm.v1",
  
  "lifecycle": {
    "created_utc": "...",
    "retention_policy": "30d|1y|indefinite",
    "shred_eligible": true
  }
}
```

### 4.3 Derived Artifact with Chain of Verification (Final)

```json
{
  "schema": "if.context.derived_artifact.v1",
  "derived_artifact_id": "der_...",
  
  "derivation": {
    "type": "fold|summary|claims_table|embedding",
    "algorithm_version": "fold.recursive.v2",
    "derived_from": [
      {
        "artifact_id": "art_...",
        "byte_range": { "start": 405, "end": 448 },
        "content_sha256_of_range": "..."
      }
    ]
  },
  
  "verification_chain": [
    {
      "claim_id": "clm_001",
      "claim_text": "Budget is capped at $500",
      "confidence": 0.95,
      "source_pointer": {
        "artifact_id": "art_...",
        "byte_range": { "start": 405, "end": 448 },
        "decoded_snippet": "MAX_SPEND = 500"
      },
      "verification_status": "verified|unverified|disputed"
    }
  ],
  
  "model_context": {
    "model_id": "claude-3.5-sonnet-20250125",
    "params_hash": "...",
    "temperature": 0.0,
    "semantic_stability_expectation": 0.95
  },
  
  "replay_classification": {
    "type": "deterministic|llm_inference",
    "hash_identical_expected": false,
    "provenance_chain_required": true
  }
}
```

### 4.4 Enhanced Envelope (Final)

```json
{
  "schema_id": "if.bus.envelope",
  "schema_version": "1.0.0",
  "event_id": "evt_ctx_...",
  "emitted_utc": "2026-01-25T12:34:56Z",
  "producer": {
    "kind": "if.context",
    "id": "context_service",
    "version": "0.1.0"
  },
  "event": {
    "name": "if.context.artifact.created",
    "op": "create"
  },
  "subject": {
    "kind": "artifact",
    "id": "art_..."
  },
  "routing": {
    "topic": "if.bus.acme.prod.context.artifact.created",
    "partition_key": "acme",
    "priority": 5,
    "ttl_seconds": 86400
  },
  "correlation": {
    "correlation_id": "task:IF-...",
    "causation_id": "evt_parent_..."
  },
  "payload_media_type": "application/json",
  "payload": null,
  "payload_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "payload_ref": {
    "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "bytes": 12345,
    "content_encoding": "identity",
    "media_type": "application/json"
  },
  "receipts": [
    {
      "kind": "if.trace",
      "share_id": "trace_share_id_here"
    }
  ],
  "budget": {
    "budget_id": "tenant-acme-usd-daily",
    "currency": "USD",
    "soft_limit": 25.0,
    "hard_limit": 50.0
  },
  "security": {
    "classification": "restricted",
    "pii_present": false
  },
  "extensions": {
    "if.blackboard": {
      "task_id": "IF-...",
      "session_id": "sess_..."
    },
    "if.context.storage": {
      "backend": "s3|minio|filesystem",
      "bucket": "if-context-artifacts",
      "key": "acme/art_....enc",
      "encryption_key_id": "key_..."
    },
    "if.context.classification": "tenant|nda|public",
    "if.context.producer_trust_level": "untrusted|verified|internal"
  }
}
```

---

## 5. Complete Threat Model (All Sources)

### Priority Matrix

| # | Threat | Sources | L | I | P | Mitigation |
|---|--------|---------|---|---|---|------------|
| 5.1 | Prompt injection | GPT+All | H | H | **P0** | Origin tagging; span-addressing; `trust_level` |
| 5.2 | Cross-tenant leakage | GPT+Claude | M | C | **P0** | Cryptographic `tenant_signature`; no ID-only trust |
| 5.7 | Denial of Wallet | Gemini | H | H | **P0** | Hard budget limits + separate replay budget |
| 5.5 | Tool abuse / confused deputy | GPT+All | M | H | **P1** | Adapter capability declarations; runtime enforcement |
| 5.4 | Summary drift | GPT+All | H | M | **P1** | Chain of Verification; periodic re-derivation |
| 5.8 | Agentic goal drift | Gemini | M | H | **P1** | `if.trace` verification of claims vs. bytes |
| 5.12 | Model poisoning | Grok | L | C | **P1** | No in-loop fine-tuning; training data provenance |
| 5.3 | Replay failures | GPT+Claude | M | M | **P2** | Separate replay budget; idempotency keys |
| 5.9 | Temporal drift | Gemini | M | M | **P2** | `retrieved_utc`; version pinning |
| 5.6 | Governance bypass | GPT+Claude | L | H | **P2** | Mandatory escalation for flagged operations |
| 5.13 | Governance fatigue | Claude | M | M | **P2** | Rate limits; cooldowns; rotation |
| 5.10 | Nested injection | Claude | M | M | **P2** | Recursive origin tracking |
| 5.11 | Progressive drift | Claude | M | M | **P2** | Fold-depth limits; re-derivation |

### New Threats Added in Synthesis

#### 5.14 Adapter Credential Leakage
```yaml
threat_id: 5.14
name: "Adapter Credential Leakage"
description: |
  Adapter stores or logs credentials; malicious context extraction
  via prompt manipulation could expose them.
mitigation:
  - Credentials never in envelope payloads
  - Adapters use ephemeral tokens where possible
  - if.trace explicitly excludes credential fields
```

#### 5.15 Verification Chain Forgery
```yaml
threat_id: 5.15
name: "Verification Chain Forgery"
description: |
  Attacker crafts a derived artifact with fake verification_chain
  pointing to real artifacts but misrepresenting content.
mitigation:
  - Verification chains must be re-validated on read
  - byte_range + sha256_of_range must match
  - if.trace receipts include validator attestation
```

---

## 6. Quantified Success Metrics (Final)

### Core Thresholds

| Metric | Target | Measurement | Owner |
|--------|--------|-------------|-------|
| **Provenance coverage** | ≥95% | Derived artifacts with valid chains | `if.trace` |
| **Replay verifiability** | 100% | All chains validate under replay | `if.bus` |
| **Semantic stability** | ≥0.90 | Key claims preserved across N replays | `if.trace` |
| **Budget prediction** | ±15% | Estimated vs actual cost | `if.bus` |
| **Governance latency p95** | <5min | Escalation → decision | `if.gov` |
| **Context reuse efficiency** | ≥60% | Cache hits / total reads | `if.context` |
| **Tenant isolation** | 0 violations | Cross-tenant refs detected | `if.context` |
| **Side-effect safety** | 0 duplicates | External actions under replay | `if.api` |

### Cost Metrics

| Metric | Formula |
|--------|---------|
| `cost_per_fold` | `Σ(model_cost + storage_cost) / fold_count` |
| `token_to_insight_ratio` | `total_tokens / verified_claims` |
| `replay_cost_multiplier` | `replay_cost / original_cost` |
| `audit_time_reduction` | `baseline_audit_hours / infrafabric_audit_hours` |

---

## 7. Crypto-Shredding Protocol (Gemini, Finalized)

### Mechanism

```
┌─────────────────────────────────────────────────────────────┐
│                    CRYPTO-SHREDDING FLOW                     │
└─────────────────────────────────────────────────────────────┘

INGESTION:
  Content ──▶ Generate K_eph ──▶ Encrypt(Content, K_eph) = C
                    │                        │
                    ▼                        ▼
              Key Vault:               Blackboard:
              {key_id: K_eph}          {sha256(C), key_id, C}

ACCESS:
  Agent ──▶ Request key_id ──▶ [if.bus event logged]
                                      │
                                      ▼
                              Key Vault returns K_eph
                                      │
                                      ▼
                              Decrypt(C, K_eph) = Content

DELETION (Shredding):
  Delete Request ──▶ if.gov approval ──▶ Key Vault: delete key_id
                                                │
                                                ▼
                                        K_eph destroyed
                                                │
                                                ▼
                                        C is now random noise
                                        (ledger intact, data gone)
```

### Schema Addition

```json
{
  "schema": "if.context.shred_request.v1",
  "request_id": "shred_...",
  "artifact_ids": ["art_001", "art_002"],
  "reason": "gdpr_erasure|retention_expired|user_request",
  "requested_by": "tenant_admin_...",
  "requires_gov_approval": true,
  "gov_decision_id": "gov_...",
  "executed_utc": null,
  "keys_revoked": []
}
```

---

## 8. Visual Artifacts

### 8-Step Recursive Loop (Final)

```
┌─────────────────────────────────────────────────────────────┐
│               RECURSIVE CONTEXT FOLDING LOOP                 │
│                      (RLM-style)                            │
└─────────────────────────────────────────────────────────────┘
                              │
              ┌───────────────┼───────────────┐
              │               │               │
              ▼               ▼               ▼
        ┌──────────┐   ┌──────────┐   ┌──────────┐
        │  START   │   │ CHECKPT  │   │  BUDGET  │
        │ if.gov   │   │ (pause/  │   │  CHECK   │
        │ approval │   │ resume)  │   │ remain>0 │
        └────┬─────┘   └──────────┘   └──────────┘
             │
             ▼
┌────────────────────────────────────────────────────────────┐
│                                                            │
│  ┌──────────┐    ┌──────────┐    ┌──────────┐             │
│  │ 1.INGEST │───▶│ 2.INDEX  │───▶│ 3.PLAN   │             │
│  │ bytes→   │    │ embed/   │    │ read_plan│             │
│  │ artifact │    │ catalog  │    │ (logged) │             │
│  │ encrypt  │    │          │    │          │             │
│  └──────────┘    └──────────┘    └────┬─────┘             │
│       │                               │                    │
│       │              ┌────────────────┘                    │
│       │              │                                     │
│       │              ▼                                     │
│       │         ┌──────────┐    ┌──────────┐              │
│       │         │ 4.SLICE  │───▶│ 5.FOLD   │              │
│       │         │ byte     │    │ LLM      │              │
│       │         │ ranges   │    │ summary  │              │
│       │         └──────────┘    └────┬─────┘              │
│       │                              │                     │
│       │         ┌────────────────────┤                     │
│       │         │                    │                     │
│       │         ▼                    ▼                     │
│       │   ┌──────────┐         ┌──────────┐               │
│       │   │  BUDGET  │         │ SEMANTIC │               │
│       │   │  CHECK   │         │ STABILITY│               │
│       │   │ remain>0?│         │ ≥0.90?   │               │
│       │   └────┬─────┘         └────┬─────┘               │
│       │        │                    │                      │
│       │    YES │ NO             YES │ NO                   │
│       │        │  │                 │  │                   │
│       │        │  ▼                 │  ▼                   │
│       │        │ HALT               │ QUARANTINE           │
│       │        │                    │ + if.gov             │
│       │        ▼                    ▼                      │
│       │   ┌──────────┐        ┌──────────┐                │
│       │   │6.RECURSE?│        │  back to │                │
│       │   │more work?│        │  step 3  │                │
│       │   └────┬─────┘        └──────────┘                │
│       │        │                                           │
│       │    YES │ NO                                        │
│       │        │  │                                        │
│       │        │  ▼                                        │
│       │        │ ┌──────────┐    ┌──────────┐             │
│       │        │ │ 7.EMIT   │───▶│8.FINALIZE│             │
│       │        │ │ derived  │    │ archive  │             │
│       │        │ │ artifact │    │ task     │             │
│       │        │ └──────────┘    └──────────┘             │
│       │        │                       │                   │
│       │        └───────────────────────┼───────────────────┤
│       │                                │                   │
│       └────────────────────────────────┘                   │
│                        │                                   │
│                        ▼                                   │
│                  ┌──────────┐                              │
│                  │ DISPUTE? │───▶ if.gov                   │
│                  │          │    escalation                │
│                  └──────────┘                              │
│                                                            │
└────────────────────────────────────────────────────────────┘
```

---

## 9. Ship today (MVP → OVP; no timelines)

This v0.6 paper drops dated timelines. The objective is to make `if.context` **shippable today** as an auditable, reviewable layer that fits the real InfraFabric seams:
- `if.bus` is the event/control spine (envelopes, DLQ, budgets, replay/pause/quarantine).
- `if.context` is the evidence environment (artifact bytes + addressing + derived provenance).
- `if.trace` is the receipt surface (integrity receipts, not truth claims).
- `/llm` is public-only; `/mcp` is the tenant/NDA wall.

### 9.1 MVP (today): evidence environment that can ship as a review pack

Minimum deliverables:
1) An append-only `if.context` artifact ledger (metadata + hashes) with retrieval metadata (`source_url`, `retrieved_at`, `etag/last_modified` when present).
2) Span addressing for text (`byte_range` and/or `line_range`) + a minimal `read_plan` record (what was read vs skipped + why).
3) Derived artifacts with **verification_chain** pointers to source spans (claim → bytes link).
4) A publishable “review pack” (HTML view + raw `.md` download + `.md.txt` fallback) that contains:
   - the v0.6 paper,
   - a small, reproducible sample dataset (public-safe),
   - verify commands (curl + hash checks).

If the bus is used in MVP:
- Emit `if.bus.envelope` v1.0.0 events with **required** `payload_sha256`.
- Use `payload_ref` for pointer-only payloads and keep it static (no runtime fetch requirement).
- Only include `payload_ref.source_url` when it is public/no-login/no bearer tokens.

### 9.2 OVP (next): tenant wall + crypto + MCP tool façade (still no sprawl)

Additions that expand value without rewriting the spine:
- Tenant/classification wall that matches the `/llm` vs `/mcp` rules (fail-closed).
- Encryption-at-rest + crypto-shredding via key revocation (`encryption_key_id` per artifact).
- A “tool façade” layer (MCP/CLI) that does not create a parallel backend:
  - tools **read** `if.context` and **emit** `if.bus` envelopes/control commands,
  - tools never bypass the bus for side effects.
- Budgets and rate limits as structured, enforced data (not prose):
  - `if.bus.budget_event` for expensive folds,
  - DLQ (`if.bus.dead_letter_event`) for failures.

### 9.3 Split-work template (blackboard-friendly)

If you want to parallelize across sessions/agents, split into tasks like:
- Paper v0.6 editing + publish pack
- Minimal schemas (`if.context.artifact`, `if.context.derived_artifact`, `if.context.read_plan`) + validator
- CLI “ingest + pack export” (deterministic)
- `/mcp` classification wall draft + examples (public-safe)
- MCP tool façade spec (maps to `if.bus` topics + payload_ref)

---

## 10. Review Pack Format (OVP target)

```
review_pack_v1.zip
├── README.md                         # Quick start (5 min to first test)
├── PROVENANCE.md                     # This pack's own chain of custody
│
├── schemas/
│   ├── if.context.artifact.v1.json
│   ├── if.context.derived_artifact.v1.json
│   ├── if.context.read_plan.v1.json
│   ├── if.bus.envelope.v1.0.0.json
│   ├── if.trace.receipt.v1.json
│   └── if.gov.decision.v1.json
│
├── logs/
│   ├── bus_events.jsonl              # All if.bus events (anonymized)
│   ├── trace_receipts.jsonl          # All if.trace receipts
│   ├── gov_decisions.jsonl           # All if.gov escalations
│   └── budget_accounting.jsonl       # Cost attribution
│
├── artifacts/
│   ├── manifest.json                 # Index with hashes
│   ├── keys/                         # Test keys (not production!)
│   │   └── test_tenant_key.pub
│   └── blobs/                        # Encrypted content
│       ├── art_001.enc
│       └── art_002.enc
│
├── prompts/
│   ├── system_prompts.json
│   ├── fold_instructions.json
│   └── adversarial_injections.json   # Test payloads
│
├── tools/
│   ├── replay.py                     # Replay runner
│   ├── verify_provenance.py          # Chain validator
│   ├── check_isolation.py            # Tenant leak detector
│   ├── semantic_stability.py         # Stability scorer
│   └── requirements.txt
│
├── benchmarks/
│   ├── baseline_metrics.json
│   ├── expected_thresholds.json
│   └── cost_projections.json
│
└── test_matrix/
    ├── A_integrity_replay.md
    ├── B_provenance_trace.md
    ├── C_isolation_attack.md
    ├── D_injection_resistance.md
    ├── E_governance_enforcement.md
    ├── F_budget_manipulation.md
    ├── G_adapter_isolation.md
    └── H_semantic_stability.md
```

---

## 11. Open Questions (no dates)

| # | Question | Notes |
|---|----------|-------|
| 1 | Key Vault: separate `if.vault` or embedded? | Crypto-shredding implies key lifecycle is first-class (wherever it lives). |
| 2 | Image region addressing schema? | Needed for screenshots/maps; defer unless required for MVP. |
| 3 | Semantic stability scoring method? | NLI/embedding-based scoring vs bespoke rubric; must be black/white + reproducible. |
| 4 | Fine-tuning ever in-scope? | If yes, requires training data provenance and strong policy gates. |
| 5 | Cross-tenant sharing: re-encryption protocol? | If supported, needs explicit re-wrap semantics and receipts. |

---

## 12. Final Verdict (v0.6)

### Consensus Across All Five Models

| Aspect | GPT 5.2 | Claude | Gemini | Grok | Synthesizer |
|--------|---------|--------|--------|------|-------------|
| Core thesis | ✓ Author | ✓ | ✓ | ✓ | ✓ |
| Component separation | ✓ Author | ✓ | ✓ | ✓ | ✓ |
| Security hardening needed | - | ✓ | ✓ | - | ✓ |
| Crypto/privacy layer needed | - | - | ✓ | - | ✓ |
| Quantification needed | - | - | - | ✓ | ✓ |
| Non-determinism handling | Underspec | ✓ | - | - | ✓ |

### What This Multi-Model Process Demonstrated

1. **Division of labor works**: Each model brought distinct expertise
2. **Conflict resolution is tractable**: Disagreements had clear resolutions
3. **Synthesis adds value**: Combined output > any single review
4. **Provenance matters for AI artifacts too**: Knowing who wrote what aids interpretation

### Final Assessment

**The `if.context` architecture is ready for implementation** with the v0.6 adjustments above (notably: alignment to the real `if.bus.envelope` constraints, and removal of timeline claims).

The original GPT 5.2 xhigh design was 80% correct. The review process added:
- Security hardening (Claude): +10%
- Crypto/compliance (Gemini): +5%
- Practical rigor (Grok): +5% (with the timeline reframed into “ship today” checklists)

**Proceed with “MVP today”:**
- publish a public-safe v0.6 paper + inputs bundle,
- implement the minimum evidence environment + pack exporter,
- keep side effects routed through `if.bus` (no sprawl).