Files
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

88 lines
15 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 880 540" width="880" height="540" style="background:#ffffff">
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333"/></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999"/></marker></defs>
<rect x="28.5" y="55" width="155" height="240" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="106.0" y="78" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">① 專案文件化</text>
<line x1="36.5" y1="92" x2="175.5" y2="92" stroke="#999999" stroke-width="2"/>
<rect x="36.5" y="110" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="106.0" y="121.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">read_file</text>
<text x="38.5" y="139" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">README.md,</text>
<text x="38.5" y="153" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">ARCHITECTURE.md</text>
<rect x="36.5" y="180" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="106.0" y="191.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">glob</text>
<text x="38.5" y="214" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">**/*.py, **/*.ts</text>
<rect x="36.5" y="250" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="106.0" y="261.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">write_file</text>
<text x="38.5" y="284" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">→ 生成 CLAUDE.md 專案指南</text>
<line x1="185.5" y1="175.0" x2="193.5" y2="175.0" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="195.5" y="55" width="155" height="240" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="273.0" y="78" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">② 需求理解</text>
<line x1="203.5" y1="92" x2="342.5" y2="92" stroke="#999999" stroke-width="2"/>
<rect x="203.5" y="110" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="273.0" y="121.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">ask_user</text>
<text x="205.5" y="144" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">&quot;最佳化目標是延遲還是吞吐?&quot;</text>
<rect x="203.5" y="180" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="273.0" y="191.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">grep</text>
<text x="205.5" y="214" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">&quot;latency|throughput&quot; src/</text>
<rect x="203.5" y="250" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="273.0" y="261.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">read_file</text>
<text x="205.5" y="284" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">src/config.py (當前引數)</text>
<line x1="352.5" y1="175.0" x2="360.5" y2="175.0" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="362.5" y="55" width="155" height="240" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="440.0" y="78" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">③ 設計文件</text>
<line x1="370.5" y1="92" x2="509.5" y2="92" stroke="#999999" stroke-width="2"/>
<rect x="370.5" y="110" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="440.0" y="121.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">write_file</text>
<text x="372.5" y="144" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">design.md (方案對比)</text>
<rect x="370.5" y="180" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="440.0" y="191.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">ask_user</text>
<text x="372.5" y="214" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">提交設計 → 等待審批</text>
<rect x="370.5" y="250" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="440.0" y="261.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold"></text>
<text x="372.5" y="284" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">人類審查後 → 繼續</text>
<line x1="519.5" y1="175.0" x2="527.5" y2="175.0" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="529.5" y="55" width="155" height="240" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="607.0" y="78" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">④ 編碼與測試</text>
<line x1="537.5" y1="92" x2="676.5" y2="92" stroke="#999999" stroke-width="2"/>
<rect x="537.5" y="110" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="607.0" y="121.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">edit_file</text>
<text x="539.5" y="144" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">old_str→new_str 修改程式碼</text>
<rect x="537.5" y="180" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="607.0" y="191.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">bash</text>
<text x="539.5" y="214" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">pytest tests/ -v</text>
<rect x="537.5" y="250" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="607.0" y="261.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">edit_file</text>
<text x="539.5" y="284" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">修復失敗測試 → 重跑</text>
<line x1="686.5" y1="175.0" x2="694.5" y2="175.0" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="696.5" y="55" width="155" height="240" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="774.0" y="78" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">⑤ 審查與交付</text>
<line x1="704.5" y1="92" x2="843.5" y2="92" stroke="#999999" stroke-width="2"/>
<rect x="704.5" y="110" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="774.0" y="121.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">bash</text>
<text x="706.5" y="144" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">ruff check src/ (lint)</text>
<rect x="704.5" y="180" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="774.0" y="191.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">read_file</text>
<text x="706.5" y="214" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">自審: 可讀性/安全/效能</text>
<rect x="704.5" y="250" width="139" height="22" rx="11" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="774.0" y="261.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">edit_file</text>
<text x="706.5" y="284" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">更新 ARCHITECTURE.md</text>
<line x1="30" y1="320" x2="850" y2="320" stroke="#999999" stroke-width="2" stroke-dasharray="8,4"/>
<text x="440.0" y="340" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">閉環反饋機制</text>
<rect x="80" y="365" width="500" height="46" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="330" y="380" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">測試失敗 → 修改程式碼 → 重新測試</text>
<text x="330" y="399" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">④內迴圈: 平均 2-3 輪收斂</text>
<rect x="80" y="415" width="500" height="46" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="330" y="430" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Lint 錯誤 → 即時修復 → 再檢查</text>
<text x="330" y="449" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">⑤內迴圈: 編輯後自動觸發</text>
<rect x="80" y="465" width="500" height="46" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="330" y="480" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">審查發現問題 → 回到④修改</text>
<text x="330" y="499" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">⑤→④回退: 保證交付質量</text>
<rect x="610" y="365" width="250" height="38" rx="4" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="735" y="384" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Agent 狀態列: cwd, git branch</text>
<rect x="610" y="415" width="250" height="38" rx="4" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="735" y="434" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Agent 狀態列: 未暫存變更</text>
<rect x="610" y="465" width="250" height="38" rx="4" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="735" y="484" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">工具輸出: 頭尾截斷</text>
<rect x="610" y="515" width="250" height="38" rx="4" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="735" y="534" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">持久化終端會話</text>
<text x="440.0" y="565" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="bold">計劃先於行動 · 驗證貫穿始終 · 文件與程式碼共同演化</text>
</svg>