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

99 lines
16 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="12" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">① Project documentation</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="144.5" 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="159.0" 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.5" 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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">→ Generate CLAUDE.md</text>
<text x="38.5" y="299.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">project guide</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="10" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">② Requirement understanding</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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">&quot;Is the optimization</text>
<text x="205.5" y="159.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">goal latency or</text>
<text x="205.5" y="173.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">throughput?&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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">&quot;latency|throughput&quot;</text>
<text x="205.5" y="229.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">src/config.py (current</text>
<text x="205.5" y="299.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">parameters)</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="15" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">③ Design Document</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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">design.md (Scheme</text>
<text x="372.5" y="159.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Comparison)</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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Submit design → Wait</text>
<text x="372.5" y="229.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">for approval</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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">After human review →</text>
<text x="372.5" y="299.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Continue</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="13.5" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">④ Coding and Testing</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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">old_str→new_str modify</text>
<text x="539.5" y="159.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">code</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.5" 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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Fix failed tests →</text>
<text x="539.5" y="299.0" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Rerun</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="13" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">⑤ Review and Delivery</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.5" 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="211.95" font-family="'Courier New', Courier, monospace" font-size="7.0" fill="#333333" text-anchor="start" dominant-baseline="central">Self-review:</text>
<text x="706.5" y="222.1" font-family="'Courier New', Courier, monospace" font-size="7.0" fill="#333333" text-anchor="start" dominant-baseline="central">readability/security/performance</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.5" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Update 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">Closed-loop feedback mechanism</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">Test failure → Modify code → Retest</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">④ Inner loop: average 2-3 rounds to converge</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 error → Fix immediately → Recheck</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">⑤ Inner loop: automatically triggered after editing</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">Issues found in review → Go back to ④ to modify</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">⑤→④ rollback: ensure delivery quality</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 status bar: 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 status bar: unstaged changes</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">Tool output: head/tail truncation</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">Persistent terminal session</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">Plan before action · Verification throughout · Documentation and code co-evolve</text>
</svg>