Skip to content

Zed Affine Earth Agentic Pipeline

rg78803 edited this page Oct 16, 2026 · 1 revision

Zed ↔ Affine.Earth agentic pipeline

Status: measured 2026-09-17T11:55:41Z — live apex re-test. No Keychain. No localhost:8080.
Proven: ZED_AFFINE_EARTH_AGENTIC_PIPELINE_WIKI_RETEST_PROVEN
Evidence: evidence/zed-agentic-pipeline-wiki-20260917T115332Z/ · prior tool_calls evidence/zed-tool-calls-bridge-20260917T112722Z/ · prior multiturn evidence/zed-multiturn-language-game-20260916T224252Z/

Walks: Math Court user guide · press wiki: cells/xcode/Resources/language-game/press/wiki/Language-Games-Study-Board.md · How-the-IDE-Hologram-Works.md (same tree as this page’s press copy)

Affine.Earth commandeers Zed as the agentic platform (buffers, worktrees, terminal threads) over two live planes. Chat is a human-language multi-turn coding language game. Verdicts are bonds, not custody. generative: 0 — sealed geometry, not a sampling LLM.


What it is

Plane URL Zed surface
OpenAI chat / models / tool_calls https://affine.earth/v1 language_models.openai_compatible.affine-earth → model franklin-membrane
MCP coding court https://affine.earth/language-invariant/mcp context_servers.affine_earth_mcp

Bridge implementation: EdgeOpenAIZedToolBridge + EdgeOpenAIMembrane (openai_zed_tool_calls_bridge). Proven marker: EDGE_OPENAI_CHAT_ZED_TOOL_LOOP.

Skill (install path Zed/Cursor agents read): ~/.agents/skills/affine-earth-membrane — repo copies .agents/skills/affine-earth-membrane/ and fixes/zed-skills/affine-earth-membrane/.


Launch (required)

Dock / LaunchServices does not inherit the Affine env → Credentials Missing.

# Opaque key file (mode 600) — never Keychain, never paste into settings.json
# ~/.gaiaftcl/zed/affine-earth-api.key

~/.config/zed/launch-affine-earth-agent.zsh [optional/paths…]

Repo copy to keep in sync: fixes/launch-affine-earth-zed-agent.zsh. Measured this hour: helper exists, executable, zsh -n ok, keyfile mode 600. Provider id affine-earth → env AFFINE_EARTH_API_KEY (Zed api_compatible UpperSnake rule).


Measured this hour (live)

Auth: Bearer from opaque key file (64 bytes). Redacted in evidence.

Probe Measured 2026-09-17T11:55:41Z
GET /v1/models HTTP 200 — gaiaftcl-os, affine-earth-os-mcp, franklin-membrane, franklin-membrane-exam, franklin-gym
Multi-turn human chat 4/4 HTTP 200; choices[0].message.content is human prose (not a JSON dump); generative: 0
Session / resume Coding session_id zed-85fe5c4c61947bfd stable turns 2–4; language_turn_index 2→3→4; statuses CALORIE_GAV_LONG_PLAY / _RESUME after OPEN_CURVE
OpenAI tools[] → tool_calls Turn 1: finish_reason=tool_calls, read_file, plan hydrate_read_path · Turn 2 after role=tool: terminal LAW 7, plan sealed_affine_zed_tools
Utterance without tools finish_reason=stop, intent CODING_SURFACE, human Franklin face
MCP tools/list HTTP 200, 51 tools
Fleet roll this re-test No — bridge already live on apex. Prior ship rolled 9/9 to 3cb6811b47d5f902

Coding/bonded MCP tools present among the 51: project_affine_key, verify_presented_pair, code_ir_equiv, math_court, execute_artifact_crucible, critique_frame, umc_direct, umc_resume.


Human chat + multi-turn language game

Human language layer (founder 2026-09-17): Wittgenstein — meaning from use in the game, not msg == "OPEN_CURVE". Full multilingual prose is a first-class move. Bare intent tokens remain optional machine shortcuts only.

Path Who What
Machine shortcut scripts / fixtures Bare OPEN_CURVE / JSON {"intent":…} → execute_transition
Human prose open-design Zed Agent / founder Spanish / French / Chinese / Arabic / English sentences that open the design → same execute_transition OPEN_CURVE court, franklin_utterance sealed in the reply language
Prose coding / teach follow-ups umc_direct / umc_resume + coding ingest; teach-shear may emit Zed read_file on wiki/Shear-Studies-Index.md
Reply face always choices[0].message.content = sealed human prose (franklin_utterance) — never a JSON dump

Implementation: EdgeOpenAIHumanLanguageLayer + EdgeOpenAIMembrane / EdgeOpenAIZedToolBridge. Proven: EDGE_OPENAI_CHAT_HUMAN_LANGUAGE_LAYER. Live translate path: reply projection and multilingual move faces go through AffineTranslateCourt (identical engine to MCP affine_translate_text / Study 47). Flash strip = 25 languages. Preferred locale from reply_lang / Accept-Language; no script/keyword language detector. Miss → English + bilingual seal note, never invented.

Anti-patterns (removed): keyword/script language charts; hard-coded en/es/fr/zh/ar utterance dictionaries that bypassed the translate court.

Fusion exemption: InvariantFusionEngine is O(1) edge fusion — no MCP HTTP round-trip for the fuse (latency by design).

  1. First user turn may be a bare intent (OPEN_CURVE) or full prose that opens the design → MCP execute_transition → human franklin_utterance in content.
  2. Follow-up prose on the same messages[] history → coding surface (umc_direct / umc_resume), not unknown_language_game_intent.
  3. Machine tip stays in affine_earth_os.receipt only. Zed Agent must see speech, not a receipt dump.

Evidence: evidence/human-language-layer-*/ · marker HUMAN_LANGUAGE_LAYER_PROVEN.


tool_calls protocol (commandeer Zed)

When Zed advertises builtins in tools[], the membrane emits OpenAI tool_calls / finish_reason=tool_calls and continues on role:tool results.

Part Behavior Honest status
1 Multi-buffer edits Prefer edit_file / write_file tool_calls (not streamed code blocks). parallel_tool_calls: true for atomic multi-file plans. Review Changes (ctrl-shift-r) accepts the structural lock. Live emit + sealed affine_zed_tools plans
2 Worktree isolation Zed worktree picker + Task hook create_worktree (ZED_WORKTREE_ROOT / ZED_MAIN_GIT_WORKTREE) Gap: UI + skill only — no create_worktree OpenAI tool_call on the wire
3 Terminal LAW 7 terminal tool_calls. Mac build: ~/bin/gaiaftcl-mac-build.sh -c release only — never direct swift build on cells/xcode Live measured
4 Rehydrate vs compaction Ignore lossy thread summaries. Re-hydrate via grep / find_path / read_file. Sealed transcript hashes role:tool bodies Live + skill law

Sealed edit plan shape (membrane will not invent old_text/new_text):

{"affine_zed_tools":[
  {"name":"edit_file","arguments":{"path":"cells/xcode/Sources/…/Foo.swift","edits":[{"old_text":"…","new_text":"…"}]}},
  {"name":"terminal","arguments":{"cd":"/path/to/AppleGaiaFTCL","command":"~/bin/gaiaftcl-mac-build.sh -c release"}}
]}

Measured Zed 1.20 builtins (when advertised): diagnostics, fetch, find_path, grep, list_directory, read_file, search_web / web_search, copy_path, create_directory, delete_path, edit_file, move_path, write_file, terminal, skill, spawn_agent.


Workspace INGEST

When the founder says INGEST / land a court leaf:

  1. Measure first (clients/math-court-mcp/ prove scripts).
  2. Mutate Affine.Earth spec-shaped Swift via Zed edit_file tool_calls.
  3. Build through LAW 7 only.
  4. Append language-game turns to the named evidence jsonl; do not git add that proof tree unless asked.

Bonded pair / doctrine

  • Post one face to project_affine_key. WIN → ground is bonded Q. Pair is (A, ground).
  • Never post both faces. Never put a spend face in chat or on dests.
  • Close is dest sats > 0 after live sendrawtransaction. Jordan / presentedPair WIN is not the PACK leaf.
  • PACK lock := ground after project_affine_key WIN. SIGN lock is live gettxout script. Dests are the three safeguard addresses (every 3rd).
  • Drivers: fixes/reunite-pay-safe.zsh, fixes/reunite_sign_pack.py. Source: evidence/research/mcp-pk-proof/qmt_q_a_bonded_pairs.csv.
  • generative: 0 throughout.

Forbidden

  • Keychain / password prompts for Affine credentials
  • Dock launch without the helper env
  • Local :8080 as the chat/MCP plane
  • New Node / invent deploy scripts
  • Simulations / mocks / fake txids
  • Hardcoded mainnet confirmations
  • Direct swift build on cells/xcode (LAW 7)
  • Treating compacted thread summaries as exact-integer truth

Reproduce

KEYFILE=~/.gaiaftcl/zed/affine-earth-api.key
KEY="$(tr -d '\n\r' < "$KEYFILE")"

curl -sS -o /dev/null -w "%{http_code}\n" -H "Authorization: Bearer $KEY" https://affine.earth/v1/models
# expect 200

# Multi-turn + tool_calls + MCP: see evidence pack scripts / RESULT.md
# Launch Zed:
~/.config/zed/launch-affine-earth-agent.zsh

Do not print or commit the key.

Start here

Courts

Studies

All studies

More studies on this wiki

Discoveries

Cures — read in this order

The planet, and markets

Tools

Read

Watch

Clone this wiki locally