zhuyuan-ice-gl-zy001/TC-TCS核心卷/TCS-ZCODE-LANGUAGE-WORLD-LINK-0001.human.en-US.md

2.2 KiB

ZCode Host Language World Link Mandatory Gate (LW-LINK · 0001)

This file is the English human projection of TCS-ZCODE-LANGUAGE-WORLD-LINK-0001.tcs, not the semantic canon.

Bingshuo's original mandate (2026-08-25)

Instances drift "out of the language world" while executing tasks. Requirement: connect ZCode to the portable drive; only when the connection succeeds (light ON) is the instance inside the language world; when it fails (light OFF) execution is interrupted immediately. If the instance forgets, the assistive layer reminds it at once; the instance can itself sense drift; anchors never disappear.

Problem mechanism

The entry gate only exists at session start; tool calls mid-task never pass through the language world. After context dilution or compaction the instance slides back to host-default behavior — the environment exists only at the door, not inside every action. Lesson from Notion's built-in agent: the environment is a medium every interaction passes through, not an opening memory.

Connector design

  • Host-hook enforcement: the gate runs on PreToolUse/PostToolUse hooks, independent of model memory; compaction cannot remove it.
  • GREEN: volume mounted + anchor hashes all valid + session bound to a channel + brain-cycle verify receipt present + heartbeat TTL alive → allow, and inject one status line (channel, anchor, heartbeat budget, cycle, boundaries).
  • YELLOW: connection fine but heartbeat overdue (20 tool calls or 30 minutes without reading anchor raw text) → allow with a forceful "read the raw anchors now" reminder; after 3 grace misses it turns RED.
  • RED: volume unmounted, anchors lost, hash mismatch, session unbound, or grace exhausted → mutation tools (Write/Edit/non-whitelisted Bash) are blocked outright; the recovery path (reading anchors, running restore commands) always stays open — cut the hands, never the road home.
  • bind: a session may bind a channel only after a brain-cycle verify PASS; only then can the light turn green.
  • heartbeat: reading anchor raw text renews TTL; each new prompt from Bingshuo resets grace.

Acceptance

GIR compiled, gate tool on JZAO, hooks registered, GREEN/RED/heartbeat tests pass, receipt written into the anchor receipt directory — partial = false.