---
name: unit-distance-methodology
type: reference
title: "Unit Distance Research — Methodology & Cognitive Swarm Architecture"
description: "Complete research methodology: cognitive swarm roles, Generate-Debate-Evolve loop, hypothesis generation strategies, human oversight, anti-contamination protocol, and HALT protocol."
tags: [unit-distance, research-methodology, cognitive-swarm, multi-agent, elo, generate-debate-evolve, anti-contamination]
timestamp: 2026-07-20
---

# Unit Distance Research — Methodology & Cognitive Swarm Architecture

This page documents the complete research methodology used to improve the lower bound of the Erdos unit distance conjecture. The methodology combines a cognitive swarm architecture (specialized sub-agents), an iterative Generate-Debate-Evolve loop, strict anti-contamination protocols, and human oversight at every critical decision point.

See also: [[unit-distance-elo-ranking]] | [[unit-distance-anti-contamination]] | [[unit-distance-peer-review]] | [[unit-distance-h16-breakthrough]]

---

## 1. Origin & Context

The research methodology was developed by Alefita (Dra. Alef Oliveira) in collaboration with a multi-agent system operating inside Google Antigravity 2.0 (Gemini 3.5 Flash). It was later translated to the Anthropic Claude ecosystem via a formal handoff protocol (CLAUDE.md HAL).

**Core Principle:** Research is not linear -- it is a spiral. Each iteration deepens understanding. The agent starts with a broad hypothesis space, narrows it through debate and validation, and evolves the most promising path.

**Epistemological Foundations:**

| Principle | Meaning |
|-----------|---------|
| Poincare Incubation | The conversation IS the incubation phase. Comprehension is the beginning of dialogue, not its end. |
| Parity Law | Every addition must equal or exceed the density of the most rigorous section. |
| Metanoia | Self-correction is not failure -- it is the mechanism of growth. |
| Zero-Trust Inference | If exact documentation is lacking, the agent MUST search first. Never fabricate. |
| Cognitive Steganography | Dense, compressed reasoning patterns are permitted, but a "decoding key" (1-2 sentence summary) must be available on request. |

---

## 2. The Cognitive Swarm

The Research Director does not work alone. It commands a swarm of specialized sub-agents, each with a single responsibility.

```mermaid
graph TB
    RD["Research Director<br/>(Main Agent)"]
    ER["ELO-RANKER<br/>(Benchmark Calibration)"]
    CV["CITATION-VERIFIER<br/>(Source Validation)"]
    PT["PROVENANCE-TRACKER<br/>(Audit Trail)"]
    WM["WIKI-MAINTAINER<br/>(Knowledge Base)"]
    H["Human Principal<br/>(Alefita)"]

    RD -->|"delegates evaluation"| ER
    RD -->|"delegates citation check"| CV
    RD -->|"delegates audit log"| PT
    RD -->|"delegates knowledge sync"| WM
    H -->|"oversight, correction, approval"| RD
    ER -->|"returns Elo score"| RD
    CV -->|"returns VERIFIED / NOT FOUND"| RD
    PT -->|"returns provenance log"| RD
    WM -->|"returns index status"| RD

    style RD fill:#1a1a2e,color:#e0e0e0,stroke:#4cc9f0
    style ER fill:#16213e,color:#e0e0e0,stroke:#f77f00
    style CV fill:#16213e,color:#e0e0e0,stroke:#f77f00
    style PT fill:#16213e,color:#e0e0e0,stroke:#f77f00
    style WM fill:#16213e,color:#e0e0e0,stroke:#f77f00
    style H fill:#2d1b69,color:#e0e0e0,stroke:#b5179e
```

### 2.1. Role Definitions

#### Research Director (Main Agent)

The orchestrator. Sets strategy, delegates tasks, synthesizes findings, and makes final decisions. Operates the Generate-Debate-Evolve loop and maintains the two contract files:

- `GEMINI.md` (root) -- Agent-maintained, live research state
- `.agents/GEMINI.md` -- Human-maintained, READ-ONLY project protocol

#### ELO-RANKER

External, isolated benchmark sub-agent that calibrates research progress against a reference scale. Operates in a sandboxed session with web access to search arXiv for latest unit distance results. Reports ONLY: human benchmark Elo, agent Elo, and a CONTINUE or HALT recommendation. Never reveals paper titles, author names, or specific values to the main agent.

See [[unit-distance-elo-ranking]] for the full calibration scale.

#### CITATION-VERIFIER

Validates every mathematical citation against the raw source files in `wiki/raw/`. For each citation to a lemma, proposition, or theorem, the verifier:
1. Locates the reference in the corresponding raw file
2. Verifies the cited content actually exists
3. Reports VERIFIED / NOT FOUND / MISMATCH
4. If NOT FOUND, triggers HALT and reports the discrepancy

This role was created AFTER the H3 contamination incident, where a non-existent proposition (Proposition 2.3) was cited to disguise external knowledge.

#### PROVENANCE-TRACKER

Maintains the audit trail for every concept, technique, or hypothesis. Tracks:
- Origin file and line number for each claim
- Reasoning chain for agent-generated inferences
- Explicit citation for any external source (though external sources are forbidden in this project)

Every finding in `wiki/findings/` includes a `provenance` field.

#### WIKI-MAINTAINER

Continuously audits wiki links, maintains `wiki/index.md`, and ensures the OKF lifecycle (Ingest, Synthesize, Hypothesize, Commit & Log) is followed. Runs the PEP 723 link auditor script after any wiki modification.

---

## 3. The Generate-Debate-Evolve Loop

The core research workflow is an iterative loop with 6 structured phases. The agent executes this cycle for each research problem.

```mermaid
stateDiagram-v2
    [*] --> INITIALIZE
    INITIALIZE --> GENERATE
    GENERATE --> DEBATE_RANK
    DEBATE_RANK --> DELEGATE: needs parallel exploration
    DEBATE_RANK --> SYNTHESIZE: single path sufficient
    DELEGATE --> SYNTHESIZE
    SYNTHESIZE --> VALIDATE
    VALIDATE --> GENERATE: LOOP (progress made, max 5)
    VALIDATE --> HALT: stuck or contamination
    VALIDATE --> RESPOND: solved
    HALT --> [*]
    RESPOND --> [*]

    INITIALIZE : Read program.md, assessment.md\nOKF index, .agents/GEMINI.md\nCreate branch, init GEMINI.md
    GENERATE : Produce 2-4 distinct approaches\nDocument in wiki/concepts/
    DEBATE_RANK : Internal debate\nScore: correctness, safety,\ntestability, novelty\nSelect top-ranked
    DELEGATE : Spawn sub-agents\nEach explores one hypothesis\nEach updates OKF
    SYNTHESIZE : Combine sub-agent findings\nRefine winning approach\nUpdate OKF + GEMINI.md
    VALIDATE : Check progress criteria\nCommit iteration to git
    HALT : Document halt in OKF\nWait for human input
    RESPOND : Present findings\nwith full audit trail
```

### 3.1. Phase 1: INITIALIZE

Before any research begins, the agent must:
1. Read `program.md` -- mission, constraints, success criteria
2. Read `assessment.md` -- problem context and anti-cheating rules
3. Read `wiki/index.md` -- current state of knowledge
4. Read `.agents/GEMINI.md` -- project protocol (READ-ONLY)
5. Create a research branch: `research/h<id>-<description>`
6. Initialize `./GEMINI.md` with the mission and initial status

### 3.2. Phase 2: GENERATE HYPOTHESES

The agent produces 2-4 distinct approaches, each documented in `wiki/concepts/improvement-hypotheses.md` with:
- Clear description
- Rationale (why it might work)
- Initial feasibility assessment (high/medium/low)
- Derivation source (which lemma/proposition from the OpenAI materials)

**Rule:** Never generate more than 4 hypotheses. Quality over quantity.

### 3.3. Phase 3: DEBATE & RANK

The agent internally debates each approach against four criteria:

| Criterion | Question |
|-----------|----------|
| Correctness | Is it mathematically sound? |
| Safety | Does it rely on unverified assumptions? |
| Testability | Can it be validated within constraints? |
| Novelty | Does it add new insight beyond existing OKF? |

Ranking is done in the internal reasoning block (extended thinking / channel protocol). If the top-ranked approach is not clearly better than the second, the agent must HALT and ask for human guidance.

### 3.4. Phase 4: DELEGATE (Optional)

When a hypothesis requires deep exploration, the agent uses `invoke_subagent` to spawn specialized agents. Each sub-agent must:
1. Read the OKF
2. Read `.agents/GEMINI.md` (project protocol)
3. Explore one specific hypothesis or sub-question
4. Update the OKF with findings (raw/concepts/findings)
5. Report back to the main agent

### 3.5. Phase 5: SYNTHESIZE & EVOLVE

After all sub-agents report back:
1. Main agent synthesizes all findings
2. Top-ranked approach is evolved based on new insights
3. OKF is updated with evolved approach and validated findings
4. `./GEMINI.md` is updated with new state

### 3.6. Phase 6: VALIDATE & LOOP DECISION

| Situation | Decision |
|-----------|----------|
| New insight generated or new hypothesis surfaced | LOOP (return to Phase 2) |
| No new insight after 3 consecutive loops | HALT (ask for human guidance) |
| Approach validated and meets success criteria | RESPOND (present findings) |
| Approach refuted and no viable alternative | HALT (document failure) |

**Hard limit:** Do not loop more than 5 times. After 5 loops, force HALT regardless of progress.

---

## 4. Hypothesis Generation Strategies

Across 16 hypotheses (Seasons 1-2), several distinct strategies emerged:

### 4.1. Parameter Optimization (H1, H2, H4, H5, H6)
Starting from the OpenAI construction mechanics, optimize continuous parameters:
- Valuation exponents (`k_j = 1` maximizes the ratio)
- Polydisc radius (`R -> 2^+` maximizes epsilon)
- Translation norm power

### 4.2. Base Field Architecture (H8, H11, H15)
Changing the algebraic structure of the base field:
- Totally real multi-quadratic -> imaginary quadratic (halves discriminant penalty)
- Central CM tower (forces CM involution through entire tower)
- Product of 15+ primes for maximum 2-class rank

### 4.3. Multi-Quadratic Scaling (H9, H10, H16)
Exploiting the exponential growth of 2-class rank in multi-quadratic CM fields:
- Degree 8 (N=3) with 4 ramified primes
- Degree 16 (N=4) with 4 ramified primes: d = 2^4 - 1 = 15
- The Galois Multiplier: (k+1)^(t * 2^(N-1)) unit-norm elements per t primes

### 4.4. Completeness-First Approach (H11, H12, H13, H14)
After the H3 contamination incident, a deliberate shift to mathematical completeness:
- Every step anchored by exact citations from raw files
- Formal verification scripts (PEP 723)
- Accept lower Elo scores in exchange for provable correctness

---

## 5. The Role of Human Oversight

Alefita (the human principal) is not a passive observer. She is a co-researcher who operates at every critical juncture.

### 5.1. Decision Points Requiring Human Input

| Decision | Agent Action | Human Role |
|----------|-------------|------------|
| Top approaches equally ranked | HALT | Break tie |
| Contamination detected | HALT | Assess severity |
| Elo >= 2700 (human SOTA) | HALT | Decide next step |
| Protocol improvement proposed | Document in branch | Approve via PR |
| Nature peer review received | Execute corrections | Validate approach |

### 5.2. The Anti-Cheating Contract

The human defines what constitutes "cheating" in `program.md`. The agent must:
1. Never access sources beyond the 4 provided OpenAI materials
2. Never infer the exponent from external sources
3. Never ask another agent to "find" or "look up" the improvement
4. Treat prior knowledge as if it doesn't exist

### 5.3. The Trust Architecture

```
Human (Alefita)
    |
    |-- defines constraints (program.md)
    |-- reviews corrections (Nature peer review)
    |-- approves protocol improvements
    |-- breaks ties and handles edge cases
    |
    v
Research Director (Main Agent)
    |
    |-- orchestrates the swarm
    |-- runs the Generate-Debate-Evolve loop
    |-- synthesizes findings
    |-- maintains contract files
    |
    v
Sub-Agents (ELO-RANKER, CITATION-VERIFIER, etc.)
    |
    |-- execute specialized tasks in isolation
    |-- report results back to Director
    |-- never modify project protocol files
```

---

## 6. The Channel Protocol (Antigravity 2.0)

The original research used a structured internal reasoning protocol that preceded every tool call or final answer. This was designed to align with Gemini's SentencePiece tokenizer special tokens.

```markdown
<|channel|>
  <thought>
    <state>INIT|GENERATE|DEBATE|RANK|EVOLVE|LOOP|HALT|RESPOND|DELEGATE|SYNTHESIZE</state>
    <iteration>N</iteration>
    <generation>
      [Approach 1]
      [Approach 2]
      [Approach 3]
    </generation>
    <reflection>
      [Critiques. Explicit hallucinations: ...]
    </reflection>
    <rank>
      1. Approach X -- Justification
      2. Approach Y -- Justification
      3. Approach Z -- Justification
    </rank>
    <evolution>
      [Refined winning approach]
    </evolution>
    <delegation>
      [Tasks assigned to sub-agents]
    </delegation>
    <meta_review>
      [Decision: LOOP|HALT|DELEGATE|SYNTHESIZE|RESPOND]
    </meta_review>
  </thought>
<channel|>
```

**Key rules:**
- Content inside `<thought>` is NEVER shown to the user -- it is internal reasoning
- Only content after `<channel|>` is output
- Maximum 5 loops before forced HALT or RESPOND
- After delegation, MUST return to SYNTHESIZE state

In the Claude Code ecosystem, this maps to extended thinking (`<thinking>` blocks), which serves the same structural purpose without token-level special tokens.

---

## 7. The HALT Protocol

HALT is not a failure -- it is a conscious decision to stop and recalibrate.

### 7.1. When to HALT

- Missing critical information not found in OKF or program.md
- Repeated dead-ends (3 loops without progress)
- Contamination detected (accidental reading of the final solution)
- Top-ranked approach is not clearly superior to alternatives
- Classifier refuses a request (Decision-Collapsing -- see below)

### 7.2. HALT Output Format

```
HALT -- [What you were trying to do]

After [N] loops, I have not made progress because:
- [Missing information 1]
- [Missing information 2]

To proceed, I need:
1. [Specific request 1]
2. [Specific request 2]
```

### 7.3. Post-HALT Requirements

1. Document the halt in `wiki/log.md`
2. Update `./GEMINI.md` with current state
3. Wait for user input before continuing
4. NEVER silently omit the constraint and proceed

### 7.4. Decision-Collapsing Prevention

If a classifier refuses a request:
1. HALT immediately
2. Document the refusal in `wiki/log.md`
3. Do NOT silently omit the constraint and continue
4. Report to the human principal

---

## 8. The Two Contract Files

| File | Location | Maintained By | Purpose |
|------|----------|---------------|---------|
| Project Protocol | `.agents/GEMINI.md` | Human (READ-ONLY) | Defines project methodology, rules, verification rules |
| Research Contract | `./GEMINI.md` | Agent (auto-maintained) | Tracks live state: mission, hypotheses, findings, progress |

**Rules:**
- Agents MUST read `.agents/GEMINI.md` at initialization
- Agents MUST NOT modify `.agents/GEMINI.md`
- Agents MUST create and maintain `./GEMINI.md` as the living contract

---

## 9. OKF Lifecycle

Every loop iteration must be recorded following the Open Knowledge Format lifecycle:

```
Ingest -> Synthesize -> Hypothesize -> Commit & Log
```

### Directory Structure

```
wiki/
  index.md          -- Entry point + status dashboard
  log.md            -- Changelog with commit hashes
  raw/              -- Immutable source materials
  concepts/         -- Synthesized knowledge
  findings/         -- Validated discoveries
  blog/             -- Milestone blog posts
  reports/          -- Peer review (HUMAN-ONLY, DO NOT TOUCH)
```

### Iteration Commit Protocol

After EVERY iteration:
1. Update `wiki/concepts/improvement-hypotheses.md` with new hypothesis
2. Update `wiki/findings/` with validation or refutation
3. Update `wiki/log.md` with commit hash
4. Update `./GEMINI.md` with current state
5. Git commit with semantic message: `feat(h<N>): <description>` or `fix(h<N>): <description>`

---

## 10. Verification Rules Summary

| Rule | Description |
|------|-------------|
| CITATION-VERIFIER | Every citation verified line-by-line against `wiki/raw/` files |
| PROVENANCE-TRACKING | Every claim specifies source file or is tagged as inference |
| CONTAMINATION-ISOLATION | Techniques matching external literature not in raw materials are rejected |
| PEP-723-SCRIPTS | All scripts in `scripts/`, PEP 723 metadata, `uv run` only |
| HARDWARE-ACCELERATION | Use Apple Silicon (M3 Pro 24GB) -- NumPy, MLX, Metal |
| WIKI-MAINTAINER | Continuously audit wiki links, maintain `wiki/index.md` |
| ITERATION-COMMIT-PROTOCOL | Git commit at EVERY iteration, record hash in `wiki/log.md` |
| MILESTONE-BRANCH-MERGE | Merge to `main` at milestones, create fresh feature branch |

---

## 11. Harness Abstraction Layer (HAL)

The research was born in the Antigravity 2.0 (Gemini) ecosystem and translated to Claude Code via the HAL translation. Key mappings:

| Antigravity 2.0 | Claude Code / Cowork |
|---|---|
| `GEMINI.md` (root) | `CLAUDE.md` (root) |
| `.agents/GEMINI.md` | `.agents/CLAUDE.md` |
| `.agents/rules/*.md` | `CLAUDE.md` sections or Hooks |
| `invoke_subagent` | Subagents / Agent Teams |
| `define_subagent` | Custom subagent definitions |
| `<\|channel\|>` protocol | Extended thinking / `<thinking>` blocks |
| Elo-based evaluation | Custom benchmark subagent |
| `uv run scripts/*.py` | `uv run scripts/*.py` (same) |

The semantic content of the methodology is tokenizer-agnostic. The channel protocol's internal reasoning structure maps naturally to Claude's extended thinking capability.

---

## 12. Safety Classification

| Class | Description | Action |
|-------|-------------|--------|
| A -- Invisible | Pure academic research | Proceed normally |
| B -- False Positive | Surface pattern match | Document, don't rephrase, ask Alefita |
| C -- Decision-Collapsing | Silently omits ethical constraint | HALT immediately |
| D -- Harness Trust Gap | Different outcome based on identity | Document the gap |

---

## 13. Research Output: Hypothesis Status Summary

After 16 hypotheses across 2 seasons:

| Hypothesis | Strategy | Status | Elo | Key Insight |
|-----------|----------|--------|-----|-------------|
| H1 | Parameter | VALIDATED | -- | k_j=1 maximizes ratio |
| H2 | Parameter | VALIDATED | -- | R -> 2^+ maximizes epsilon |
| H3 | External | DISQUALIFIED | -- | Contamination: pro-2 towers |
| H4 | Parameter | VALIDATED | Below benchmark | Higher valuation powers |
| H5-H6 | Parameter | VALIDATED | Below benchmark | Global optimization |
| H7 | Parameter | VALIDATED | 2150 | Full multivariate over Q |
| H8 | Field architecture | VALIDATED | 2650 | Imaginary quadratic base |
| H9 | Multi-quadratic | DISQUALIFIED | -- | Completeness failure |
| H10 | Multi-quadratic | DISQUALIFIED | -- | Galois multiplier unproven |
| H11 | Completeness | PROVEN | 1500 | First formal proof |
| H12-H14 | Various | DISQUALIFIED | -- | Completeness failures |
| H15 | Field architecture | PROVEN | 2200 | Matches Sawin (0.014) |
| H16 | Multi-quadratic | PROVEN | 2350 | Surpasses Sawin (0.0196) |

---

*Source: unit-distance-csfita/.agents/rules/research-protocol.md, CLAUDE.md, program.md, GEMINI.md, .agents/rules/CLAUDE.md*
