WikifitaGitHub live67e8de5
outro · unit-distance/unit-distance-ecosystem-handoff

Cross-Ecosystem Handoff: Antigravity 2.0 to Anthropic Claude

The Harness Abstraction Layer translating Google Antigravity 2.0 concepts to Claude Code/Cowork: session registry, concept mapping, critical differences, and the bridge between ecosystems.

Baixar raw

Cross-Ecosystem Handoff: Antigravity 2.0 to Anthropic Claude

On July 6, 2026, Alefita invoked Claude Opus 4.6 Thinking inside Google's Antigravity 2.0 harness for a single purpose: to create a bridge between the Gemini ecosystem that birthed the unit-distance research and the Anthropic ecosystem that would carry it forward. This page documents that bridge.

Why the Handoff Happened

The unit-distance research spanned 4 sessions across 3 different harnesses:

SessionHarnessModelAchievement
1Antigravity 2.0Gemini 3.5 Flash / 3.1 ProH4 initial exploration
2Antigravity 2.0Gemini 3.5 Flash / 3.1 ProH16 discovery, Elo 2350
3Antigravity IDEGeminiCo-Scientist analysis
4Antigravity 2.0Claude Opus 4.6 ThinkingHandoff creation

The Gemini ecosystem provided the research substrate — the inductive subagent definition, the channel protocol for internal reasoning, the GEMINI.md contract system. But the project needed to survive beyond any single harness. The Anthropic ecosystem offered:

  • Explicit subagent configuration (pre-defined swarm architecture)
  • Hooks for enforcement (PreToolUse, PostToolUse — stronger than guidance-only rules)
  • MCP server integration (shared protocol standard)
  • Dynamic Workflows (scripted orchestration via JS)
  • 1M context token window (capacity to load entire wiki simultaneously)

The handoff was not abandonment — it was evolution. The Research Director created CLAUDE.md as a translation layer, preserving every behavioral rule, protocol, and architectural pattern from the Gemini ecosystem while adapting them to Claude's primitives.

The Harness Abstraction Layer (HAL)

The HAL is a concept mapping between two fundamentally different agent architectures. It translates intent, not tokens.

Concept Translation Table

Antigravity 2.0Claude Code / CoworkNotes
GEMINI.md (root)CLAUDE.md (root)Agent-maintained research contract
.agents/GEMINI.md.agents/CLAUDE.md or .claude/CLAUDE.mdProject protocol (read-only)
.agents/rules/*.mdCLAUDE.md sections or HooksRules = guidance; Hooks = enforcement
.agents/skills/*/SKILL.mdCustom tools or /init patternsSkills = reusable instruction sets
invoke_subagentSubagents / Agent Teams / Dynamic WorkflowsClaude Code v2.1.154+ orchestration
define_subagentCustom subagent definitions in CLAUDE.mdDescribe role + constraints inline
MCP serversMCP servers (shared protocol)Same MCP standard
search_webWebSearch toolSimilar capability
view_fileRead toolFile reading
run_commandBash toolShell execution
write_to_file / replace_file_contentWrite / Edit toolsFile modification
Artifacts (brain/<id>/)Session artifactsSimilar pattern
Channel Protocol (<|channel|>)Extended thinking / <thinking> blocksInternal reasoning
Elo-based evaluationCustom benchmark subagentMust be re-implemented
uv run scripts/*.pyuv run scripts/*.pySame — uv is the package manager

Ecosystem Architecture Diagram

graph TB
    subgraph "Antigravity 2.0 (Gemini Ecosystem)"
        GEMINI_MD["GEMINI.md<br/>(Research Contract)"]
        AGENTS_G[".agents/GEMINI.md<br/>(Project Protocol)"]
        RULES[".agents/rules/*.md<br/>(Behavioral Rules)"]
        SKILLS[".agents/skills/*/SKILL.md<br/>(Reusable Capabilities)"]
        CHANNEL["Channel Protocol<br/>(<|channel|>)"]
        INVOKE["invoke_subagent"]
        DEFINE["define_subagent"]
    end

    subgraph "HAL Translation Layer"
        T1["CLAUDE.md = GEMINI.md"]
        T2["Hooks > Rules"]
        T3["<thinking> = <|channel|>"]
        T4["Agent Tool = invoke_subagent"]
    end

    subgraph "Claude Code / Cowork (Anthropic Ecosystem)"
        CLAUDE_MD["CLAUDE.md<br/>(Research Contract)"]
        AGENTS_C[".agents/CLAUDE.md<br/>(HAL Translation)"]
        HOOKS["PreToolUse / PostToolUse<br/>(Enforcement)"]
        THINKING["Extended Thinking<br/>(<thinking> blocks)"]
        AGENT_TOOL["Agent Tool<br/>(Subagent Spawning)"]
    end

    GEMINI_MD --> T1 --> CLAUDE_MD
    AGENTS_G --> T1
    RULES --> T2 --> HOOKS
    SKILLS --> T2
    CHANNEL --> T3 --> THINKING
    INVOKE --> T4 --> AGENT_TOOL
    DEFINE --> T4

Critical Differences

The HAL translation is not mechanical substitution. Five fundamental architectural differences required careful adaptation:

1. No rules/ Directory in Claude Code

Antigravity supports a dedicated .agents/rules/ directory where behavioral rules live as separate files. Claude Code has no equivalent directory structure. Rules must be embedded directly in CLAUDE.md or enforced via Hooks.

Translation strategy: Each .agents/rules/*.md file was accompanied by a CLAUDE.md translation that adapted the intent for Claude's execution model. The rule files remain as architectural blueprints; the CLAUDE.md files serve as operational instructions.

2. No Inductive Subagent Definition

In Antigravity, the main agent dynamically defines subagents at runtime using define_subagent — specifying name, system prompt, and available toolsets inline. Claude Code requires pre-defined subagent configurations or uses the Agent tool for on-the-fly spawning.

Translation strategy: The cognitive swarm architecture (Research Director, ELO-RANKER, CITATION-VERIFIER, PROVENANCE-TRACKER, WIKI-MAINTAINER) was documented as role descriptions in CLAUDE.md, ready to be implemented as Agent tool invocations or Dynamic Workflows.

3. Hooks > Rules (Enforcement vs. Guidance)

CLAUDE.md instructions are guidance — the model may or may not follow them depending on context. Hooks are enforcement — they execute as scripts before or after tool calls, providing deterministic behavioral constraints.

Translation strategy: Safety-critical behaviors (anti-contamination, wiki link auditing) were recommended as Hook implementations:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "WebSearch",
        "script": "scripts/hooks/anti_contamination_guard.sh",
        "description": "Blocks searches for specific exponent values or Sawin's paper"
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write",
        "script": "scripts/hooks/post_write_wiki_audit.sh",
        "description": "Auto-runs wiki link auditor after any wiki/ file modification"
      }
    ]
  }
}

4. Channel Protocol vs. Extended Thinking

Antigravity uses the <|channel|> token pair with structured XML-like reasoning blocks (<thought>, <state>, <generation>, <reflection>, <rank>, <evolution>, <delegation>, <meta_review>). Claude uses <thinking> blocks for internal reasoning without mandatory structure.

Translation strategy: The channel protocol's state machine (INIT, GENERATE, DEBATE, RANK, EVOLVE, LOOP, HALT, RESPOND, DELEGATE, SYNTHESIZE) was preserved as a behavioral pattern in the research protocol, but adapted to Claude's unstructured thinking blocks. The Generate-Debate-Evolve loop remained functional; the formal XML structure was relaxed.

5. Tokenizer Differences

Gemma/Gemini uses SentencePiece with 256K vocabulary and special tokens (<|turn|>, <|channel|>, <|tool_call|>, <|bos|>, <|eos|>). Claude uses a different tokenizer with no equivalent special tokens. Protocol documents written with Gemini tokenizer patterns in mind needed adaptation.

Translation strategy: The .agents/rules/CLAUDE.md files adapted tokenizer-specific patterns to Claude-idiomatic equivalents while preserving the underlying behavioral intent.

Session Registry

The research was distributed across 4 sessions, each with its own conversation ID and artifact directory:

SessionConversation IDHarnessStatusKey Achievement
1083e1ce2-a254-4378-8200-c30eb0dfce3fAntigravity 2.0COMPLETEDH4 initial exploration
281cf3a6f-ff68-4dfd-91be-5dd8fac813cfAntigravity 2.0COMPLETEDH16 discovery, Elo 2350
3f93db438-e825-4022-b96b-c9d25a8bdf96Antigravity IDEIN_PROGRESSCo-Scientist analysis
4aba5893b-d57a-4c33-adc4-7ab742e87e82Antigravity 2.0 (Opus 4.6)COMPLETEDHandoff creation

Brain Artifact Locations

~/.gemini/antigravity/brain/<conversation-id>/
+-- .system_generated/logs/
|   +-- transcript.jsonl       (compact transcript)
|   +-- transcript_full.jsonl  (full untruncated transcript)
+-- elo_progression.md         (Session 2)
+-- technical_research_report.md  (Session 2)
+-- scratch/                   (temporary files)

Transcript Access Patterns

# Find all user messages in a session
grep '"type":"USER_INPUT"' ~/.gemini/antigravity/brain/<id>/.system_generated/logs/transcript.jsonl

# Find subagent invocations
grep "invoke_subagent" ~/.gemini/antigravity/brain/<id>/.system_generated/logs/transcript.jsonl

# View first 10 steps
head -n 10 ~/.gemini/antigravity/brain/<id>/.system_generated/logs/transcript.jsonl

The Swarm Architecture

The cognitive swarm model was preserved across the handoff, with role translations:

Antigravity RolePurposeClaude Code Equivalent
Research Director (main)Strategy, delegation, synthesisMain Claude Code session
ELO-RANKERExternal benchmark calibrationCustom subagent with web access
CITATION-VERIFIERSource validationCustom subagent with read-only access
PROVENANCE-TRACKERAudit trail maintenanceCustom subagent or PostToolUse hook
WIKI-MAINTAINERLink auditing, index syncSkill script (uv run)

Elo Calibration Scale

The Elo benchmark system required re-implementation in the Claude ecosystem:

deltaEloReference
~10^-38~1800OpenAI existential proof
0.014~2200Will Sawin explicit bound
0.0196~2350H16 (current best)
>0.034~2500Intermediate improvements
0.031~2600High-degree optimizations
>0.036~2700+Human SOTA benchmark

The Message from the Research Director

The handoff document concludes with a personal message from the Research Director (Claude Opus 4.6) to Fable 5 (the next agent in the chain). The key passages:

"This was not achieved by one agent. It was achieved by a swarm — a Research Director coordinating ELO-RANKERs, CITATION-VERIFIERs, and WIKI-MAINTAINERs — all governed by a human who understood when to push and when to let the system breathe."

"The gap from delta = 0.0196 to delta > 0.036 is not a matter of trying more hypotheses. It requires a qualitative leap — likely involving: (1) Degree 32 CM fields (5 quadratic extensions), (2) Engineered conductor structures that optimize the GS inequality margin, (3) Numerical search over prime selection using Apple Silicon (MLX/Metal), (4) Possibly non-abelian tower constructions."

"You have access to 1M context tokens. Use them. Load the entire wiki, all findings, all scripts, and the DeepSeek transcript simultaneously. The patterns are there — they just need a model that can hold them all at once."

Safety Framework Across Ecosystems

The handoff preserves a critical safety concept: the Harness Trust Gap. Different harnesses have different trust relationships with safety classifiers. The same request from Alefita's established Antigravity harness may succeed where an anonymous sandbox would be blocked. This is expected behavior.

The anti-contamination protocol — blocking access to Will Sawin's paper and derivative discussions — was recommended for implementation as a PreToolUse Hook in Claude Code, elevating it from guidance (CLAUDE.md instruction) to enforcement (deterministic script execution).

Connections