> ## Documentation Index
> Fetch the complete documentation index at: https://felimet-hub.jmcores.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 附錄 C：詞彙表

> 全書術語的一句話定義，採台灣學術繁體中文，英文原名保留。供快速查閱與統一用詞。

export const GlossaryBrowser = ({lang = "zh", terms = [], categories = []}) => {
  const UI = lang === "en" ? {
    searchPH: "Search terms and definitions...",
    allCats: "All",
    noResults: "No matching terms found.",
    related: "Related",
    enLabel: "EN",
    count: n => n === 1 ? "1 term" : `${n} terms`
  } : {
    searchPH: "搜尋詞條或定義...",
    allCats: "全部",
    noResults: "沒有符合的詞條。",
    related: "相關",
    enLabel: "EN",
    count: n => `${n} 個詞條`
  };
  const ACCENT = "#bf7551";
  const ACCENT_L = "#cf8a68";
  const ACCENT_BG = "rgba(191,117,81,0.08)";
  const ACCENT_BDR = "rgba(191,117,81,0.35)";
  const safeTerms = Array.isArray(terms) ? terms : [];
  const safeCats = Array.isArray(categories) ? categories : [];
  const [query, setQuery] = useState("");
  const [cat, setCat] = useState("__all__");
  const [isDark, setIsDark] = useState(false);
  useEffect(() => {
    const detect = () => setIsDark(document.documentElement.classList.contains("dark"));
    detect();
    const obs = new MutationObserver(detect);
    obs.observe(document.documentElement, {
      attributes: true,
      attributeFilter: ["class"]
    });
    return () => obs.disconnect();
  }, []);
  const q = query.toLowerCase().trim();
  const filtered = safeTerms.filter(t => {
    const matchCat = cat === "__all__" || t.category === cat;
    if (!matchCat) return false;
    if (!q) return true;
    return (t.term || "").toLowerCase().includes(q) || (t.en || "").toLowerCase().includes(q) || (t.definition || "").toLowerCase().includes(q);
  });
  const highlight = text => {
    if (!q || !text) return text;
    const idx = text.toLowerCase().indexOf(q);
    if (idx === -1) return text;
    return <span>
        {text.slice(0, idx)}
        <mark style={{
      background: ACCENT_BG,
      color: ACCENT,
      borderRadius: "2px",
      padding: "0 1px"
    }}>
          {text.slice(idx, idx + q.length)}
        </mark>
        {text.slice(idx + q.length)}
      </span>;
  };
  const css = `
  .gb-root {
    --gb-bg:         #FAF8F3;
    --gb-surface:    rgba(0,0,0,0.025);
    --gb-border:     rgba(0,0,0,0.09);
    --gb-text:       #2b2722;
    --gb-dim:        #6f6a62;
    --gb-faint:      #8a8378;
    --gb-accent:     ${ACCENT};
    --gb-accent-l:   ${ACCENT_L};
    --gb-accent-bg:  ${ACCENT_BG};
    --gb-accent-bdr: ${ACCENT_BDR};
    --gb-card-bg:    #ffffff;
    --gb-input-bg:   #ffffff;
    font-size: 14px;
    border: 1px solid var(--gb-border);
    border-radius: 14px;
    background: var(--gb-bg);
    color: var(--gb-text);
    overflow: hidden;
  }
  .dark .gb-root {
    --gb-bg:         #1b1a18;
    --gb-surface:    rgba(255,255,255,0.03);
    --gb-border:     rgba(255,255,255,0.08);
    --gb-text:       #e7e3da;
    --gb-dim:        #a8a299;
    --gb-faint:      #706b64;
    --gb-accent:     ${ACCENT_L};
    --gb-accent-bg:  rgba(207,138,104,0.09);
    --gb-accent-bdr: rgba(207,138,104,0.35);
    --gb-card-bg:    #242220;
    --gb-input-bg:   #242220;
  }

  /* ── 搜尋列 ── */
  .gb-search-bar {
    padding: 13px 16px 10px;
    border-bottom: 1px solid var(--gb-border);
    background: var(--gb-surface);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .gb-search-icon {
    flex-shrink: 0;
    color: var(--gb-faint);
  }
  .gb-search-input {
    flex: 1 1 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--gb-text);
    outline: none;
    min-width: 0;
  }
  .gb-search-input::placeholder { color: var(--gb-faint); }
  .gb-count {
    font-size: 12px;
    color: var(--gb-faint);
    white-space: nowrap;
  }
  /* 清除按鈕 */
  .gb-clear-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 2px 5px;
    color: var(--gb-faint);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.12s;
  }
  .gb-clear-btn:hover { color: var(--gb-accent); }

  /* ── 分類 chip 列 ── */
  .gb-cats {
    display: flex;
    gap: 6px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--gb-border);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .gb-cats::-webkit-scrollbar { display: none; }
  .gb-cat {
    flex-shrink: 0;
    padding: 4px 11px;
    border-radius: 16px;
    border: 1px solid var(--gb-border);
    background: transparent;
    color: var(--gb-dim);
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.13s, background 0.13s, color 0.13s;
  }
  .gb-cat:hover {
    background: var(--gb-surface);
    color: var(--gb-text);
  }
  .gb-cat-on {
    border-color: var(--gb-accent-bdr);
    background: var(--gb-accent-bg);
    color: var(--gb-accent);
    font-weight: 700;
  }

  /* ── 詞條卡片列表 ── */
  .gb-terms {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .gb-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--gb-faint);
    font-size: 13.5px;
  }

  /* ── 詞條卡 ── */
  .gb-card {
    border: 1px solid var(--gb-border);
    border-radius: 10px;
    background: var(--gb-card-bg);
    overflow: hidden;
  }
  .gb-card-head {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 10px 14px 8px;
    flex-wrap: wrap;
  }
  .gb-term {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gb-text);
    font-family: "JetBrains Mono", "Fira Code", monospace;
  }
  .gb-en-badge {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gb-accent);
    background: var(--gb-accent-bg);
    border: 1px solid var(--gb-accent-bdr);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
  }
  .gb-cat-badge {
    font-size: 10px;
    letter-spacing: 0.03em;
    color: var(--gb-faint);
    background: var(--gb-surface);
    border: 1px solid var(--gb-border);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
  }
  .gb-definition {
    padding: 0 14px 10px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--gb-dim);
    border-top: 1px dashed var(--gb-border);
    margin-top: 2px;
    padding-top: 9px;
  }
  .gb-related {
    padding: 0 14px 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .gb-related-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gb-faint);
  }
  .gb-related-link {
    font-size: 12.5px;
    color: var(--gb-accent);
    text-decoration: none;
    background: var(--gb-accent-bg);
    border: 1px solid var(--gb-accent-bdr);
    border-radius: 4px;
    padding: 1px 7px;
    transition: background 0.12s;
  }
  .gb-related-link:hover { background: rgba(191,117,81,0.14); }

  /* ── 手機 ── */
  @media (max-width: 600px) {
    .gb-search-bar { padding: 10px 12px 8px; }
    .gb-cats { padding: 8px 12px; }
    .gb-terms { padding: 10px 12px; }
    .gb-card-head { padding: 9px 12px 7px; }
    .gb-definition { padding: 8px 12px; }
    .gb-related { padding: 0 12px 10px; }
  }
  `;
  return <div className="gb-root">
      <style>{css}</style>

      {}
      <div className="gb-search-bar">
        <svg className="gb-search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />
        </svg>
        <input type="text" className="gb-search-input" placeholder={UI.searchPH} value={query} onChange={e => setQuery(e.target.value)} aria-label={UI.searchPH} />
        <span className="gb-count">{UI.count(filtered.length)}</span>
        {query && <button type="button" className="gb-clear-btn" onClick={() => setQuery("")}>
            ×
          </button>}
      </div>

      {}
      {safeCats.length > 0 && <div className="gb-cats">
          <button type="button" className={"gb-cat" + (cat === "__all__" ? " gb-cat-on" : "")} onClick={() => setCat("__all__")}>
            {UI.allCats}
          </button>
          {safeCats.map(c => <button key={c.id} type="button" className={"gb-cat" + (cat === c.id ? " gb-cat-on" : "")} onClick={() => setCat(c.id)}>
              {c.label}
            </button>)}
        </div>}

      {}
      <div className="gb-terms">
        {filtered.length === 0 ? <div className="gb-empty">{UI.noResults}</div> : filtered.map(t => {
    const catObj = safeCats.find(c => c.id === t.category);
    return <div key={t.id} className="gb-card" id={t.id}>
                <div className="gb-card-head">
                  <span className="gb-term">{highlight(t.term)}</span>
                  {t.en && t.en !== t.term && <span className="gb-en-badge">{UI.enLabel} {highlight(t.en)}</span>}
                  {catObj && <span className="gb-cat-badge">{catObj.label}</span>}
                </div>
                {t.definition && <div className="gb-definition">{highlight(t.definition)}</div>}
                {t.related && t.related.length > 0 && <div className="gb-related">
                    <span className="gb-related-label">{UI.related}</span>
                    {t.related.map(r => <a key={r.label} href={r.href} className="gb-related-link">
                        {r.label}
                      </a>)}
                  </div>}
              </div>;
  })}
      </div>
    </div>;
};

<Info>
  全書術語的一句話定義，採台灣學術繁體中文，英文原名保留。事實主張依官方文件，快變動項標註截至 2026-05。
</Info>

<GlossaryBrowser
  lang="zh"
  categories={[
{ id: "basics",      label: "基礎與進階" },
{ id: "config",      label: "設定與機制" },
{ id: "risk",        label: "風險與評估" },
{ id: "custom",      label: "客製化與自動化" },
{ id: "eval",        label: "評估與案例" },
{ id: "cross",       label: "跨單元共通" },
]}
  terms={[
{
  id: "token",
  term: "token",
  en: "token",
  category: "basics",
  definition: "模型處理文字的最小單位（子詞），非字也非詞；影響成本與上下文佔用。中文常一字 1 至 2 個 token，密度高於英文。",
  related: [{ label: "tokenization", href: "#tokenization" }, { label: "上下文視窗", href: "#context-window" }],
},
{
  id: "tokenization",
  term: "tokenization",
  en: "tokenization",
  category: "basics",
  definition: "把輸入文字切成 token 序列的過程；不同模型用不同 tokenizer，粗估需以官方工具為準。",
  related: [{ label: "token", href: "#token" }],
},
{
  id: "context-window",
  term: "上下文視窗",
  en: "context window",
  category: "basics",
  definition: "模型一次能處理的 token 上限（含輸入與輸出），視窗滿了最舊內容被擠出。",
  related: [{ label: "上下文腐化", href: "#context-rot" }, { label: "上下文工程", href: "#context-engineering" }],
},
{
  id: "context-rot",
  term: "上下文腐化",
  en: "context rot",
  category: "basics",
  definition: "上下文接近滿載或中段時模型品質下降的現象；Chroma（2025）測 18 個模型均觀察到。",
  related: [{ label: "上下文視窗", href: "#context-window" }, { label: "lost in the middle", href: "#lost-in-middle" }],
},
{
  id: "lost-in-middle",
  term: "lost in the middle",
  en: "lost in the middle",
  category: "basics",
  definition: "長上下文中，模型對中段資訊的注意力顯著低於開頭與結尾的現象（Liu, et al., 2023）。",
  related: [{ label: "上下文腐化", href: "#context-rot" }],
},
{
  id: "context-engineering",
  term: "上下文工程",
  en: "context engineering",
  category: "basics",
  definition: "管理進入上下文視窗的一切（指令、知識、歷史、工具結果），以提升產出品質。Anthropic 定義為「在有限注意力預算內找最大化目標達成率的最小高訊號 token 組」。",
  related: [{ label: "上下文視窗", href: "#context-window" }, { label: "augmented LLM", href: "#augmented-llm" }],
},
{
  id: "hallucination",
  term: "幻覺",
  en: "hallucination",
  category: "basics",
  definition: "模型產生看似合理但不正確內容；源於生成式模型優化「像不像」而非「對不對」。",
},
{
  id: "temperature",
  term: "temperature",
  en: "temperature",
  category: "basics",
  definition: "縮放機率分布銳利度的取樣參數。趨近 0 趨同、趨近 1 趨發散；想可重現就壓低，想發想方案就調高。",
  related: [{ label: "top-p", href: "#top-p" }],
},
{
  id: "top-p",
  term: "top-p（nucleus sampling）",
  en: "top-p / nucleus sampling",
  category: "basics",
  definition: "只從累積機率達到 p 的候選 token 群裡取樣，動態裁掉長尾。",
  related: [{ label: "temperature", href: "#temperature" }],
},
{
  id: "system-prompt",
  term: "系統提示",
  en: "system prompt",
  category: "basics",
  definition: "平台或開發者設定的指令層，優先序高於使用者輸入，是規則檔的技術基礎。",
  related: [{ label: "CLAUDE.md", href: "#claude-md" }],
},
{
  id: "tool-use",
  term: "工具呼叫",
  en: "tool use / function calling",
  category: "basics",
  definition: "模型決定呼叫外部工具並把結果以 tool 角色回填上下文的機制；模型只「請求」，harness 才「執行」。",
  related: [{ label: "harness", href: "#harness" }, { label: "agentic loop", href: "#agentic-loop" }],
},
{
  id: "agentic-loop",
  term: "agentic loop",
  en: "agentic loop",
  category: "basics",
  definition: "觀察 → 決策 → 行動 → 再觀察的自主迴圈；是 agent 與單純對話的本質差異。",
  related: [{ label: "agent", href: "#agent" }, { label: "harness", href: "#harness" }],
},
{
  id: "harness",
  term: "harness",
  en: "harness",
  category: "basics",
  definition: "agent 的執行外殼，負責工具執行、權限邊界、狀態持久化、迴圈終止、觀測、kill switch；模型決定能力天花板，harness 決定你拿到幾成。",
  related: [{ label: "kill switch", href: "#kill-switch" }, { label: "agentic loop", href: "#agentic-loop" }],
},
{
  id: "augmented-llm",
  term: "augmented LLM",
  en: "augmented LLM",
  category: "basics",
  definition: "Anthropic 用語，指被檢索、工具、記憶等能力增強過的 LLM；harness 圍繞它運轉。",
  related: [{ label: "harness", href: "#harness" }, { label: "上下文工程", href: "#context-engineering" }],
},
{
  id: "kill-switch",
  term: "kill switch",
  en: "kill switch",
  category: "basics",
  definition: "被外部觸發終止 agent 行程的機制；不依賴被入侵的 process 自殺。",
  related: [{ label: "heartbeat dead-man switch", href: "#heartbeat-dms" }, { label: "harness", href: "#harness" }],
},
{
  id: "heartbeat-dms",
  term: "heartbeat dead-man switch",
  en: "heartbeat dead-man switch",
  category: "basics",
  definition: "長時間任務定期寫心跳，外部 supervisor 偵測心跳停滯就 kill 整個 process group 的死人開關。",
  related: [{ label: "kill switch", href: "#kill-switch" }],
},
{
  id: "prompt-engineering",
  term: "prompt engineering",
  en: "prompt engineering",
  category: "basics",
  definition: "把任務寫成模型可執行規格的設計法；結構化骨架、XML 標籤、Few-Shot、Automated Prompt Optimization（APO）。",
  related: [{ label: "Few-Shot", href: "#few-shot" }, { label: "APO", href: "#apo" }],
},
{
  id: "few-shot",
  term: "Few-Shot",
  en: "Few-Shot",
  category: "basics",
  definition: "在 prompt 中放 2 至 3 個範例，把抽象的風格或格式要求校準成模型可對齊的樣板。",
  related: [{ label: "prompt engineering", href: "#prompt-engineering" }],
},
{
  id: "apo",
  term: "APO（Automated Prompt Optimization）",
  en: "APO",
  category: "basics",
  definition: "以評估函式驅動的自動 prompt 迭代；代表實作為 OPRO（Yang, et al., 2023）與 DSPy（Khattab, et al., 2023）。",
  related: [{ label: "prompt engineering", href: "#prompt-engineering" }],
},
{
  id: "workflow",
  term: "workflow",
  en: "workflow",
  category: "basics",
  definition: "LLM 與工具被預先以程式路徑編排的系統；步驟與跳轉由你定義，模型只在每個節點內做事。",
  related: [{ label: "agent", href: "#agent" }, { label: "DAG", href: "#dag" }],
},
{
  id: "agent",
  term: "agent",
  en: "agent",
  category: "basics",
  definition: "LLM 自主決定流程與工具用法的系統；彈性高、可控性低。",
  related: [{ label: "workflow", href: "#workflow" }, { label: "agentic loop", href: "#agentic-loop" }],
},
{
  id: "dag",
  term: "DAG（directed acyclic graph）",
  en: "DAG",
  category: "basics",
  definition: "步驟的有向圖；畫出後可平行機會自己浮現（無路徑相連的節點可同時跑）。",
  related: [{ label: "workflow", href: "#workflow" }],
},
{
  id: "vibe-coding",
  term: "Vibe Coding",
  en: "Vibe Coding",
  category: "basics",
  definition: "憑感覺、低結構地讓 AI 寫程式；本 Playbook 主張以設定與驗證取代盲目接受。",
},
{
  id: "claude-md",
  term: "CLAUDE.md",
  en: "CLAUDE.md",
  category: "config",
  definition: "Claude 的記憶與規則檔，分 managed、user、project、local 四層；managed 不可被個人關閉。",
  related: [{ label: "AGENTS.md", href: "#agents-md" }, { label: "Rules", href: "#rules" }],
},
{
  id: "at-import",
  term: "@path 匯入語法",
  en: "@path import syntax",
  category: "config",
  definition: "在 CLAUDE.md 用 @path/to/file 匯入其他檔；最多 4 層遞迴；常用 @AGENTS.md 讓 Claude 與其他工具共讀同一份基線。",
  related: [{ label: "CLAUDE.md", href: "#claude-md" }, { label: "AGENTS.md", href: "#agents-md" }],
},
{
  id: "agents-md",
  term: "AGENTS.md",
  en: "AGENTS.md",
  category: "config",
  definition: "跨工具的開放規則檔標準，由 Linux Foundation 旗下 Agentic AI Foundation 治理；原生支援工具逾二十個，採用專案逾六萬（截至 2026-06）。",
  related: [{ label: "CLAUDE.md", href: "#claude-md" }],
},
{
  id: "rules",
  term: "Rules（.claude/rules/*.md）",
  en: "Rules",
  category: "config",
  definition: "模組化規則檔，frontmatter 寫 paths 可綁到 glob；觸及對應檔案時載入，否則不佔 context。",
  related: [{ label: "CLAUDE.md", href: "#claude-md" }, { label: "path-scoped rule", href: "#path-scoped-rule" }],
},
{
  id: "skill",
  term: "Skill（SKILL.md）",
  en: "Skill",
  category: "config",
  definition: "以目錄形式存在的可重用流程，隨需載入；description 寫得好壞決定模型會不會自動叫用。",
  related: [{ label: "漸進式揭露", href: "#progressive-disclosure" }, { label: "Hook", href: "#hook" }],
},
{
  id: "progressive-disclosure",
  term: "漸進式揭露",
  en: "progressive disclosure",
  category: "config",
  definition: "Skill 把昂貴內容拆到 references/ 與 scripts/，主檔只放必要入口；降低每次叫用的 context 成本。",
  related: [{ label: "Skill", href: "#skill" }],
},
{
  id: "hook",
  term: "Hook",
  en: "Hook",
  category: "config",
  definition: "事件驅動的確定性自動化機制（PreToolUse、PostToolUse、Stop、SessionStart 等，截至 2026-06 共 30 個事件），把「模型記得」升級成「系統保證」。",
  related: [{ label: "exit 2 攔截語義", href: "#exit-2" }, { label: "Skill", href: "#skill" }],
},
{
  id: "exit-2",
  term: "exit 2 攔截語義",
  en: "exit 2 intercept semantics",
  category: "config",
  definition: "hook 在 PreToolUse 階段 exit 2 等同拒絕該工具呼叫；模型會看到拒絕回饋並調整計畫。",
  related: [{ label: "Hook", href: "#hook" }],
},
{
  id: "subagent",
  term: "Subagent（子代理）",
  en: "Subagent",
  category: "config",
  definition: "擁有獨立 context window 的子任務執行容器；v2.1 起採內建（Explore、Plan、general-purpose）加自訂兩層結構。",
  related: [{ label: "isolation-worktree", href: "#isolation-worktree" }, { label: "agent", href: "#agent" }],
},
{
  id: "isolation-worktree",
  term: "isolation: worktree",
  en: "isolation: worktree",
  category: "config",
  definition: "Subagent 用 git worktree 物理隔離檔案系統，支援平行不衝突的子任務。",
  related: [{ label: "Subagent", href: "#subagent" }],
},
{
  id: "plugin",
  term: "Plugin",
  en: "Plugin",
  category: "config",
  definition: "打包 skills、agents、hooks、MCP 與 LSP 設定、背景監控的單元；透過市集或 git URL 分發，namespace 隔離避免同名衝突。",
  related: [{ label: "Marketplace", href: "#marketplace" }],
},
{
  id: "marketplace",
  term: "Marketplace（plugin 市集）",
  en: "Marketplace",
  category: "config",
  definition: "官方 claude-plugins-official 與社群 claude-community 兩個公開市集，附 /plugin install 安裝路徑。",
  related: [{ label: "Plugin", href: "#plugin" }],
},
{
  id: "harness-layers",
  term: "Harness 外殼的層次",
  en: "Harness shell layers",
  category: "config",
  definition: "OpenClaw 等案例研究歸納：Identity（SOUL.md）、Memory（MEMORY.md）、Heartbeat、Tool conventions、Bootstrap、User 等 Markdown 檔在工作區共同組裝 agent 人格與行為。",
  related: [{ label: "harness", href: "#harness" }, { label: "soul-md", href: "#soul-md" }],
},
{
  id: "mcp",
  term: "MCP（Model Context Protocol）",
  en: "MCP",
  category: "config",
  definition: "把外部工具與資料源接給模型的開放標準；一個 server 對外暴露 tools、resources、prompts 三類介面。",
  related: [{ label: "MCP transport", href: "#mcp-transport" }, { label: "MCP scope", href: "#mcp-scope" }],
},
{
  id: "mcp-transport",
  term: "MCP transport",
  en: "MCP transport",
  category: "config",
  definition: "client 與 server 間的傳輸協定；Claude Code 支援 stdio（本機行程）、http（含 streamable-http 別名）、sse（deprecated）、ws。",
  related: [{ label: "MCP", href: "#mcp" }],
},
{
  id: "mcp-scope",
  term: "MCP scope",
  en: "MCP scope",
  category: "config",
  definition: "MCP server 的設定範圍；local（個人、不共享）、project（進版控、需 user approval）、user（個人所有專案）。",
  related: [{ label: "MCP", href: "#mcp" }],
},
{
  id: "cli-first",
  term: "CLI-first",
  en: "CLI-first",
  category: "config",
  definition: "能用 CLI 完成的操作優先 CLI，MCP 作為 fallback；CLI 沒有 schema 預載成本、stdout 可裁、可 shell pipe 串接。",
  related: [{ label: "MCP", href: "#mcp" }],
},
{
  id: "prompt-injection",
  term: "提示注入",
  en: "prompt injection",
  category: "risk",
  definition: "把外部不可信內容誤當指令執行的攻擊；應用層的設計限制，不是模型 bug。",
  related: [{ label: "三重威脅", href: "#triple-threat" }, { label: "記憶污染", href: "#memory-poisoning" }],
},
{
  id: "triple-threat",
  term: "三重威脅（Willison triple threat）",
  en: "Willison triple threat",
  category: "risk",
  definition: "私密資料、不可信內容、對外通道三條件同存時，提示注入從「讓模型說怪話」升級為資料外洩工具。",
  related: [{ label: "提示注入", href: "#prompt-injection" }],
},
{
  id: "memory-poisoning",
  term: "記憶污染",
  en: "memory poisoning",
  category: "risk",
  definition: "跨 session 在記憶中植入載荷，未來 session 組裝時觸發；記憶狹窄、定期輪換是緩解。",
  related: [{ label: "提示注入", href: "#prompt-injection" }],
},
{
  id: "supply-chain-risk",
  term: "供應鏈風險",
  en: "supply chain risk",
  category: "risk",
  definition: "第三方 Skill、plugin、規則、hook 帶入的安全風險；Snyk ToxicSkills（2026-02）報告 3,984 個公開 skill 約 36% 含 prompt injection。",
  related: [{ label: "provenance", href: "#provenance" }, { label: "hidden unicode", href: "#hidden-unicode" }],
},
{
  id: "provenance",
  term: "provenance（來源可溯）",
  en: "provenance",
  category: "risk",
  definition: "元件來源是否具名、可追溯，作為信任訊號。",
  related: [{ label: "供應鏈風險", href: "#supply-chain-risk" }],
},
{
  id: "hidden-unicode",
  term: "hidden unicode / bidi 攻擊",
  en: "hidden unicode / bidi attack",
  category: "risk",
  definition: "藏在零寬字元（U+200B 等）與雙向控制碼（U+202A 至 U+202E）裡的不可見載荷；人類看不到，模型看得到。",
  related: [{ label: "供應鏈風險", href: "#supply-chain-risk" }],
},
{
  id: "saturation-check",
  term: "飽和檢查",
  en: "saturation check",
  category: "risk",
  definition: "benchmark 全數通過代表測試太簡單、缺乏鑑別力；需加 edge case 直到至少一個 model tier 失敗。",
},
{
  id: "blind-trust",
  term: "盲信",
  en: "blind trust",
  category: "risk",
  definition: "看起來合理就接受的可驗證性盲點；對可驗證主張一律驗證是解毒劑。",
},
{
  id: "path-scoped-rule",
  term: "path-scoped rule",
  en: "path-scoped rule",
  category: "custom",
  definition: "以 frontmatter paths: [\"src/**/*.ts\"] 限定規則只在符合 glob 的檔案觸及時載入的規則檔。",
  related: [{ label: "Rules", href: "#rules" }],
},
{
  id: "at-mention",
  term: "@-mention 顯式叫用",
  en: "@-mention explicit invocation",
  category: "custom",
  definition: "主對話用 @subagent-name 直接叫用某個 Subagent，不依賴模型依 description 自動觸發。",
  related: [{ label: "Subagent", href: "#subagent" }],
},
{
  id: "context-fork",
  term: "context: fork",
  en: "context: fork",
  category: "custom",
  definition: "Skill 把自己整段程序丟到一個 Subagent context 內執行；Subagent 用 skills: 預載程序到自己的 context。",
  related: [{ label: "Subagent", href: "#subagent" }, { label: "Skill", href: "#skill" }],
},
{
  id: "heartbeat-schedule",
  term: "heartbeat 排程",
  en: "heartbeat scheduling",
  category: "custom",
  definition: "OpenClaw 等 harness 採用的定時觸發機制；agent 在排程點被喚醒跑一輪 turn，模擬「在背景值守」。",
  related: [{ label: "heartbeat dead-man switch", href: "#heartbeat-dms" }],
},
{
  id: "soul-md",
  term: "soul-md / memory-md",
  en: "SOUL.md / MEMORY.md",
  category: "custom",
  definition: "OpenClaw 工作區的人格與記憶 Markdown 檔；agent 每次啟動讀自己的「靈魂」才開始工作。",
  related: [{ label: "Harness 外殼的層次", href: "#harness-layers" }],
},
{
  id: "nemoclaw",
  term: "NemoClaw / always-on agent",
  en: "NemoClaw / always-on agent",
  category: "eval",
  definition: "NVIDIA 為常駐代理設計的安全外殼；對應企業級 SLA、團隊共用基礎設施、統一審計的硬化模式。",
},
{
  id: "harness-viz",
  term: "Harness 可視化",
  en: "Harness visualization",
  category: "eval",
  definition: "OpenClaw 把人格、記憶、心跳、工具慣例等拆成可讀的 Markdown 檔，讓使用者能直接審查與修改 agent 設計。",
  related: [{ label: "Harness 外殼的層次", href: "#harness-layers" }],
},
{
  id: "config-layer",
  term: "設定層級",
  en: "config layer",
  category: "cross",
  definition: "使用者全域層、專案層、本地層的設定分層；層級高的優先序不一定高，由各工具規則決定。",
  related: [{ label: "CLAUDE.md", href: "#claude-md" }],
},
{
  id: "least-privilege",
  term: "最小權限原則",
  en: "least privilege",
  category: "cross",
  definition: "代理與工具只給任務實際需要的權限；超出即收回。",
  related: [{ label: "provenance", href: "#provenance" }],
},
{
  id: "credential-boundary",
  term: "憑證邊界",
  en: "credential boundary",
  category: "cross",
  definition: "代理專用 PAT、個人 PAT、機器帳號之間的隔離邊界。",
  related: [{ label: "最小權限原則", href: "#least-privilege" }],
},
{
  id: "pre-flight",
  term: "pre-flight 檢查",
  en: "pre-flight check",
  category: "cross",
  definition: "執行前的快速核對（權限、訓練退出、機密路徑掃描），避免事後收拾。",
},
{
  id: "hybrid-verification",
  term: "mixed 查證（hybrid verification）",
  en: "hybrid verification",
  category: "cross",
  definition: "通用概念直接寫，快變動事實（設定檔名、版本、機制）一律查官方文件。",
},
{
  id: "provenance-annotation",
  term: "provenance 標註",
  en: "provenance annotation",
  category: "cross",
  definition: "在引用、範例、連結旁邊標明來源、作者、日期、可信度。",
  related: [{ label: "provenance", href: "#provenance" }],
},
]}
/>

***

## 對應單元

* 基礎觀念全貌 → [01-1 為什麼要「正確地」使用 AI 工具](/code-agent/foundations/why-correct-usage)
* LLM 與 agent 機制 → [01-2 LLM 與 Agent 的運作基礎](/code-agent/foundations/llm-agent-basics)
* 上下文工程細節 → [01-4 上下文工程](/code-agent/foundations/context-engineering)
* 設定層級模型 → [02-1 設定的層級模型](/code-agent/configuration/config-layer-model)
* 隱私安全詞彙 → [附錄 B 隱私與安全設定 checklist](/code-agent/appendix/privacy-security-checklist)、[03-3 安全、隱私與供應鏈風險](/code-agent/judgment/security-privacy-supply-chain)
* 跨工具設定詞彙 → [02-6 其他工具設定對照](/code-agent/configuration/other-tools-comparison)
* 客製化詞彙 → [04-1 CLAUDE.md](/code-agent/customization/claude-md-memory) 至 [04-11 Agent Teams 與 Sub Agent](/code-agent/customization/team-vs-subagent)
* 案例研究詞彙 → [05-1 OpenClaw](/code-agent/case-studies/openclaw) 至 [05-4 三條路線比較](/code-agent/case-studies/three-approaches-comparison)

***

<div className="references">
  * \[1] Chroma, "Context Rot in Long-Context Language Models," 2025. \[Online]. Available: [https://research.trychroma.com](https://research.trychroma.com) （截至 2026-06 查證；含 18 個模型實測）
  * \[2] Liu, et al., "Lost in the Middle: How Language Models Use Long Contexts," 2023. \[Online]. Available: [https://arxiv.org/abs/2307.03172](https://arxiv.org/abs/2307.03172)
  * \[3] Anthropic, "Effective context engineering for AI agents," 2026. \[Online]. Available: [https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
  * \[4] Yang, et al., "Large Language Models as Optimizers," 2023. \[Online]. Available: [https://arxiv.org/abs/2309.03409](https://arxiv.org/abs/2309.03409)
  * \[5] Khattab, et al., "DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines," 2023. \[Online]. Available: [https://arxiv.org/abs/2310.03714](https://arxiv.org/abs/2310.03714)
  * \[6] Snyk, "ToxicSkills: 2026 Report on Malicious Skills in the Wild," 2026. \[Online]. Available: [https://snyk.io](https://snyk.io)
</div>
