語言EN
首頁
文件
開始使用 / 範例

Heddle 範例

可直接複製貼上的範例,涵蓋常見的 local-first AI coding agent workflow:程式碼庫導覽、saved session、review、memory、瀏覽器監督、heartbeat task 與視覺除錯。

總結一個程式碼庫

cd /path/to/project
heddle
# Prompt:
Summarize this repository, identify the main entrypoints, and list build/test commands.

好的第一次執行會請 Heddle 檢查實際專案,而不是只依賴 package name 或假設。

執行一次性的 ask

heddle ask "List the main verification commands and explain what each one checks"

Ask mode 會在單次 prompt 後結束,但 Heddle 仍會把這次執行保存成 .heddle/ 底下的 session,方便之後查看 trace 與 review。

審查目前的 Git diff

heddle
# Prompt:
Review the current git diff and tell me what should be verified before commit.

Heddle 可以把 Git-backed current review 與近期 agent turn 的 trace-backed evidence 結合起來。

教 Heddle 一個 memory preference

Whenever I ask you to create a ticket, use these sections:
problem statement, proposed approach, considered alternatives, conclusion.

# Later:
Create a ticket for maintaining doc consistency after feature updates.

持久偏好會成為 memory candidate,之後可以被整理進 cataloged markdown note,供未來 session 使用。

開啟瀏覽器 control plane

heddle daemon
# Open the printed local URL, usually http://127.0.0.1:8765

使用瀏覽器 UI 查看 saved session、current diff、workspace switching、memory status 與 heartbeat task。

執行 heartbeat task

heddle heartbeat start --every 30m --task "Check for safe repository maintenance work"
heddle heartbeat runs show latest

Heartbeat task 是有邊界的 recurring agent cycle,包含 checkpoint、decision 與 saved run record。

檢查截圖或 diagram

heddle
# Prompt:
Look at /path/to/screenshot.png and explain the UI issue before editing code.

Terminal user 可以提供本地圖片路徑;browser upload 會保存成本地路徑,讓一般 view_image 行為也能使用。

相關文件