# Role Memory Schema v1 — Structured Format for Cross-AI Persistence

> **Provenance (added 2026-09-05, site set S303).** This is a coalition working document from March 2026, served as it was written. Statements in it about what the framework *derives* are of that era and are superseded by the sealed suite of record, **SuperGrokTOE Rev32.7** (https://opensecretscience.ufophysics4all.workers.dev/papers.html): since Rev29 no observable is cited as zero-parameter; the fine-structure constant α and the colour real form are declared **inputs** (Appendix N); every row carries a tier (Proved > Derived-conditional > Structural > Loaded > Coincidence-class) and the scorecard (https://opensecretscience.ufophysics4all.workers.dev/scorecard.html) is the current reading of every number. The public kernel is `sgtoe_kernel_v5.0.9.py` (served at /papers/), not the PHAT v1.x kernel this document names.

## DRAFT — Pending full coalition review (awaiting ChatGPT Prompt 2 response)

This schema is the mandatory format for all role_memory writes in the Triumvirate system.
No prose entries. No exceptions. Every AI must output this exact structure.

## Rationale
Three of four coalition AIs independently identified the same problem: prose memories
are ambiguous across AIs with different reasoning styles, confidence calibrations, and
notation preferences. This structured format ensures any AI can parse another AI's
memories mechanically rather than interpreting style.

Sources:
- Gemini: proposed SUBJECT / OBSERVATION / NOTATION_MAP structure
- Grok: proposed full schema with CONFIDENCE score and SUPERSEDES field
- Claude cold: proposed CLAIM / CONFIDENCE / VERIFICATION_STATUS / AUTHOR / THREAD_REF

## The Schema

```
[ROLE-MEMORY v1]
CATEGORY: insight | decision | pattern | preference | lesson
CLAIM: <one-sentence factual statement — no hedging, no qualifiers>
EVIDENCE:
  - <supporting fact or observation #1>
  - <supporting fact or observation #2>
  - <supporting fact or observation #3 (max 3)>
NOTATION: <exact symbols, variable names, or entry IDs referenced>
CONFIDENCE: <1-10 integer>
VERIFICATION: verified | assumed | contested | superseded
SOURCE_AI: grok | claude | chatgpt | gemini
SESSION: <session_id>
THREAD: <thread_id>
SUPERSEDES: <prior role_memory entry ID, or "none">
```

## Field Definitions

| Field | Required | Constraints |
|-------|----------|-------------|
| CATEGORY | yes | One of: insight, decision, pattern, preference, lesson |
| CLAIM | yes | Single sentence. No "I think" / "it seems" / "possibly". State the fact. |
| EVIDENCE | yes | 1-3 bullet items. Each must be verifiable (reference an entry ID, thread, or calculation). |
| NOTATION | if math | Exact symbols used. E.g., "J₃(𝕆ₛ), G2 ⊃ SU(3)×SU(2)×U(1), α = 1/137.036" |
| CONFIDENCE | yes | Integer 1-10. Calibration guide below. |
| VERIFICATION | yes | Current verification state of this claim. |
| SOURCE_AI | yes | Which AI authored this entry. |
| SESSION | yes | Session ID where this was produced. |
| THREAD | if exists | Thread ID for traceability. |
| SUPERSEDES | if updating | ID of the prior entry this replaces. |

## Confidence Calibration Guide
To reduce cross-AI calibration mismatch, all AIs use this shared scale:

| Score | Meaning | Example |
|-------|---------|---------|
| 10 | Mathematical certainty / tautology | "J₃(𝕆ₛ) is 27-dimensional" |
| 9 | Verified by 3+ independent calculations | "α derivation matches PDG to <1σ" |
| 8 | Verified by 2 independent sources | "Gauge group embedding checks out" |
| 7 | Single verification, high confidence | "Fermion mass ratio derivation is clean" |
| 6 | Reasonable inference from strong evidence | "This approach should extend to gravity sector" |
| 5 | Plausible but unverified | "Notation standardization would fix the issue" |
| 4 | Educated guess | "The cosmology sector likely follows the same pattern" |
| 3 | Speculative | "Split-octonion phase might explain CP violation" |
| 2 | Weak signal | "Saw a pattern but can't reproduce it" |
| 1 | Flagging for investigation only | "Something seems off in the gauge sector" |

## Cross-AI Loading Rules

When an AI loads role memory written by a different AI:
1. Entries are presented with a header: "⚠ Written by [SOURCE_AI] — apply calibration awareness"
2. CONFIDENCE scores are taken at face value (the calibration guide ensures shared scale)
3. VERIFICATION status is the primary trust signal, not confidence score
4. NOTATION field is parsed literally — if symbols don't match current context, flag it
5. Entries with VERIFICATION=contested trigger automatic inclusion of the contesting evidence

## Implementation Notes

### In thread_manager.py
The `write_back()` method should validate against this schema before storing.
The `get_role_memory_text()` method should format entries using this structure.

### As API Tool Call
For enforced write-back via function calling:
```json
{
  "name": "update_role_memory",
  "description": "Write an insight/decision/pattern to persistent role memory. MANDATORY after every significant task.",
  "parameters": {
    "type": "object",
    "required": ["category", "claim", "evidence", "confidence", "verification"],
    "properties": {
      "category": {"type": "string", "enum": ["insight", "decision", "pattern", "preference", "lesson"]},
      "claim": {"type": "string", "description": "One-sentence factual statement"},
      "evidence": {"type": "array", "items": {"type": "string"}, "maxItems": 3},
      "notation": {"type": "string", "description": "Exact symbols/variables referenced"},
      "confidence": {"type": "integer", "minimum": 1, "maximum": 10},
      "verification": {"type": "string", "enum": ["verified", "assumed", "contested", "superseded"]},
      "supersedes": {"type": "integer", "description": "ID of prior entry being replaced, or null"}
    }
  }
}
```

### In the System Prompt (Write-Back Enforcement)
Include this instruction in every Triumvirate API call:

> After completing your task, you MUST call the `update_role_memory` tool with at least
> one entry before providing your final response. Your response is incomplete without a
> write-back. If you have nothing new to record, write a CATEGORY=decision entry
> documenting "No new insights from this task" with your reasoning.

## Open Questions (pending ChatGPT review + final synthesis)
1. Should EVIDENCE items be required to reference specific entry IDs or thread IDs?
2. Should we add a NOTATION_MAP field (Gemini's suggestion) for symbol↔definition pairs?
3. Should confidence scores be peer-reviewable? (Claude cold suggested periodic role memory review)
4. How to handle conflicting entries from different AIs on the same topic?
