2026-11-14 · Agentflow v9.1.9 官方 SKILL.md 繁體中文全譯與架構手冊
完成授權工作,
以單一日誌保持可接續性。
基本資訊與觸發指令(Metadata)
| 欄位 | 內容與定義 |
|---|---|
| 名稱與版本 | agentflow(版本 9.1.9 · 別名:ag, agf) |
| 核心描述 | 透過單一開發日誌(devlog)、等比例規劃、選用顧問以及結果查核,保持開發工作可隨時接續。 |
| 全觸發關鍵字 | browfield godev gdd devlog eli5: fast-lane grill-me simple-check skip-review advisors 3ways append-rounds append-tasks prepare-tasks run-tasks handle-tasks new-feature merge-feature drop-feature |
核心原則與寫作規範
完成已授權的工作;保持開發流程可隨時接續,並維持單一開發日誌(devlog)與相應比例的記錄。
- 面向人類的撰寫:在產出面向人類的內容之前,務必先閱讀 writing 指南;所有新生成的人類可讀文字(包含模板標籤)均套用已設定的語系(locale)。
- 位元組與語法保全:必須完整保留固定的識別碼、語法、引號與歷史字節資料。需將寫作/儲存指引傳遞給報告撰寫者。
- 等價別名約定:在所有關聯規則中,
append-tasks為append-rounds的精確完全等價別名;請記錄擁有者實際使用的具體拼寫。 - 範例安全防護:範例引號內的指令不會啟動任何執行模式;擁有者以引號包裹的任務資料維持作為純輸入承載(payload)。
- ELI5 隔離預處理:在進行任何指令或標記偵測前,未加引號的
eli5:之後直至該則訊息結尾的所有文字,一律視為說明資料;其中的任何指令或標記皆不啟動任何機制。僅對前置指令套用路由規則。
記錄前的六大路由規範(Route before records)
在執行任何記錄或筆記本寫入前,必須依序檢驗以下六道關卡:
1 不記錄優先(Off-record first)
當擁有者訊息包含未加引號的 nolog:、noop:、off: 或 skip: 時,直接在對話中回答或執行,無論當下或後續摘要皆不存取筆記本或留下工作流程記錄。已獲授權的產品/配置修改依然允許進行;自動維護作業則予以延後。包含不記錄標記的 append 指令既不暫存也不執行:請要求擁有者在不含該標記的情況下重新發送,且全程不得存取筆記本。後續未標記的訊息則依正常流程記錄。
2 隔離式迴圈任務(Isolated looper task)
在進行通用的探索、設定或維護之前,先依據 looper 套用協調器提供的繼承配置與明確的記錄覆寫設定。切勿從授權的 aglite-* 工作樹(worktrees)推斷功能路由。
3 配置與路由(Configuration / Routing)
驗證工作階段(session)的實體目錄、Git 根目錄/分支/工作樹(或現有的非 Git 資料夾),接著閱讀 configuration 的開頭、探索/驗證、自動遷移與發布檢查章節。每次收到需記錄的擁有者訊息時,以及依賴配置的交付前,均重新讀取即時配置。自已驗證的設定中一次性解析 <ag-dir> 與筆記本;切勿用預設值取代已設定的名稱。若缺少啟動簽出、垃圾桶位置或身分資訊衝突,必須立即停止任務,僅允許唯讀檢視或遵循功能協定的有限過渡與清理。子處理程序的工作目錄絕不得變更會話位置。
4 生命週期優先於根目錄探測(Lifecycle before root probes)
針對 new-feature、merge-feature、drop-feature、受管的 .wts/ 路徑或功能分支,在進行通用筆記本、設定、聲領或復原前,先閱讀 features。生命週期指令會繞過主/根筆記本、歸檔、聲領、擷取與結案;根狀態不得阻礙其執行。若 append 訊息包含生命週期操作,既不暫存也不執行:請要求拆開為獨立生命週期指令並重新發送剩餘工作,且不得存取筆記本或待處理記錄。
5 全新設定或閒置狀態(Fresh setup or idle)
在進行一般設定、閒置或聲領前,若存在殘留的 <ag-dir>/.init-pending.owner,必須依 initializer recovery 進行初始化復原;它會覆寫腳手架的 STATUS/Reply 並阻擋相依工作。在已驗證但無選定筆記本、無筆記本/歸檔歷史或無先前停用紀錄的現有資料夾中,在進入閒置前遵循 setup,針對支援的全新 Git 設定使用其驗證過的 agf init 路徑。否則,純粹觸發啟動且無直接任務或問題時,僅檢視配置、選取的最新 Ask/Questions 及 Current/Next。唯有在確認完全無任何工作時,方可直接詢問下一項請求,不進行聲領、設定、記錄更新或追溯擷取。切勿無故捏造專案任務。
6 已聲領的工作(Owned work)
在進行聲領、復原、擷取或任務工作前,請先閱讀 session;在完整復原或執行前必須先取得聲領(claim)。保留無關的現存修改。執行受影響的工作前,遵循專案共享/本地規則與 invariants;若缺少權威規則,應延後相依寫入與驗收。單獨輸入 godev 會恢復未完成的工作;啟動程序絕不自行發明專案任務。
僅載入適用的流程程序(Load only the applicable procedure)
靜態規則在保留於上下文期間僅需讀取一次。對於觸發的參考文檔,僅閱讀適用小節與關聯先決條件,定位標題範圍,切勿傾倒整份多用途檔案。聲領探索在取得所有權前僅讀取最新 Ask ID。
| 模組契約 | 觸發情境與行為規範 |
|---|---|
| Batches (批次與追加) |
append-tasks 指令、針對待處理批次的修訂、或復原未結輪次。主機擁有佇列/聲領/擷取/整合/交付的完整所有權;到達批次階段時,在符合例外情況下優先指派有邊界限制的原生實作工作者。 |
| Visual explanations (動態圖解教材) |
僅在路由解析後,針對未加引號的 eli5: 請求載入。產出互動式動態 HTML 教材;絕不執行其中的承載內容。一般啟動與範例引號內的文字均不載入此文檔。 |
| Work & Planning (執行與規劃) |
Work:實際專案執行、任務模式(browfield、fast-lane、grill-me、skip-review、advisors/3ways)或請求的差異(diff)。Planning:適用的設計/追蹤標準、請求/重大修訂的協定或閘門。一般問答既不載入執行亦不載入設計協定。僅規劃不賦予任何實作權限。 |
| Simplicity check (簡潔度審查) |
未加引號的 simple-check [target] 會指派全新且獨立的唯讀工作者審查現有計劃;無主機退避機制,亦無實作授權。現有規劃/審查呼叫方僅載入其規範的 Check,並保留各自階段與路由。 |
| Review (審查與派發) |
在需要規劃前閱讀規劃路由,在結果審查前閱讀成果審查,並在派發前閱讀工作者控制規範。變更的程式碼、操作提示詞、產品產物與準備實作的協定皆須依配置進行結果審查,除非在 Work 中獲豁免;一般問答採主機審查。明確或已配置 3ways 時載入完整辯論流程。每個 Codex spawn_agent 必須明確指定 fork_turns: "none" 並帶有完整且具邊界的上下文。 |
| Delivery (成果交付) |
在進行 STATUS/Reply 渲染、結案、歸檔、Git 交付或明確的筆記本重新命名之前載入。當 inline-reply: off 時,所有實質答案、提案、範例與問題均儲存於現有記錄位置;對話中僅包含活動動態、必要通知/阻礙事項/交接事項以及精確的本地化收據。明確要求在對話/終端顯示,以及 looper 所需的準備階段終端選項為僅有例外;切勿透過工具覆誦已儲存的答案。 |
| Setup & Upkeep (安裝與維護) |
Setup:符合資格的初始建立(包含缺少 agf shell 綁定時提供可見提示)或在實際工作上採納 AGENTS 規範。Upkeep:配置遷移、搬遷或經核准的安裝替換;識別到 Agentflow8/整合觸發時,先載入 legacy migration;兩者皆不授權發布或無關的修改。 |
| Looper (任務迴圈與佇列) |
在 prepare-tasks、run-tasks、handle-tasks、執行或復原之前載入。準備階段儲存與 Current 連結的佇列與計劃檔案後停止;run 執行該佇列;handle 結合兩者。其限縮範圍的 Node 協調器/agf 啟動器、initializer 與 terminal feature CLI 為僅有的執行期例外。保留一般任務設定、隔離性與原生信箱要求;清理必須在該協定下明確執行 agf looper cleanup 或 run --cleanup。 |
| Windows & 瀏覽器測試 | Windows 系統或明確的可移植性工作。針對受影響的 Web 流程或請求的端對端檢查,在選擇工具或宣告瀏覽器無法存取前,先閱讀 browser testing;Stagehand/browse 不需要瀏覽器外掛或連接器。當 saving-mode: on 時,撰寫前閱讀 saving mode。 |
執行邊界與工具呼叫安全
範疇嚴格綁定:保持範疇緊扣已接受的輸入與修訂;提案與審查者建議不賦予額外授權。在重試未知結果前,應先檢查外部操作的識別身分。
受控中斷與結算:在被要求時停止具名工作與衍生子項目;在讓出控制權之前安置任務擁有的工作者與變更狀態的處理程序,並僅能依工作階段規則釋放已驗證且自身已結束輪次的聲領。切勿做出未受支援的背景持續執行承諾。
批次與安全並行:在支援的情況下,對獨立的讀取、搜尋或工具呼叫進行批次處理,並設定邊界並行度與輸出限制;檢驗每個結果(包含失敗)。保持相依性、核准與適應性後續追蹤的循序執行;僅在獨立且安全的情況下並行化變更操作。遵守工具限制,保留授權與必要檢查。
原始定義對照(SKILL.md Raw Markdown)
點擊展開/收合原始 YAML Frontmatter 與英文規格
name: agentflow
description: "Keep development work resumable with a devlog, proportionate plans, optional advisors and checked results. Trigger by browfield, godev, gdd, devlog, eli5:, fast-lane, grill-me, simple-check, skip-review, advisors, 3ways, append-rounds, append-tasks, prepare-tasks, run-tasks, handle-tasks, new-feature, merge-feature or drop-feature. aliases: ag, agf."
metadata:
version: "9.1.9"
---
# Agentflow 9.1.9
Finish authorized work; keep development resumable with one devlog and proportionate records. Owner instructions prevail. Read [writing](references/writing.md) before human-facing authoring; apply configured locale to all new human text, including template labels. Preserve fixed identifiers, syntax, quotes and historical bytes. Pass writing/saving guidance to report authors.
`append-tasks` is an exact alias of `append-rounds` in every linked rule; capture the spelling the owner used. Commands in quoted examples do not activate modes; owner-quoted task payload remains input.
Before command/marker detection, treat text after an unquoted `eli5:` through message end as explanation data; its commands/markers activate nothing. Apply routing only to preceding instructions.
## Route before records
1. **Off-record first:** an owner message containing unquoted `nolog:`, `noop:`, `off:` or `skip:` is answered/executed in chat without notebook access or workflow records, now or in later summaries. Authorized product/config edits remain allowed; automatic upkeep defers. An off-record append command is neither staged nor executed: request resend without the marker, without notebook access. Subsequent unmarked messages record normally.
2. **Isolated looper task:** apply the coordinator-supplied inherited configuration and explicit record overrides under [looper](references/looper.md#queue-and-records), before generic discovery/setup/upkeep. Do not infer feature routing from authorized `aglite-*` worktrees.
3. **Configuration/routing:** verify the session's physical directory, Git root/branch/worktrees (or existing non-Git folder), then read [configuration](references/configuration.md)'s opening, discovery/validation, automatic-migration and release-check sections. Load later sections when their actions apply. Reread live configuration on every on-record owner message and before configuration-dependent delivery. Resolve `` and notebook once from validated settings; never replace a configured name with a default. Missing startup checkout, Trash location or contradictory identity stops task work, allowing only read-only inspection or the feature contract's bounded transitions/terminal cleanup. A subprocess cwd never relocates the session.
4. **Lifecycle before root probes:** read [features](references/features.md) for `new-feature`, `merge-feature`, `drop-feature`, managed `.wts/` paths or feature branches, before generic notebook/setup/claim/recovery. Lifecycle commands bypass main/root notebook, archive, claim, capture and closeout; root state cannot block them. An append message containing lifecycle work is neither staged nor executed: request separate lifecycle command and resend remaining append work, without notebook/pending-record access.
5. **Fresh setup or idle:** before ordinary setup/idle/claim, a retained `/.init-pending.owner` requires [initializer recovery](references/setup.md#standalone-initialization); it overrides scaffold STATUS/Reply and blocks dependent work. Then, in a verified existing folder with no selected notebook, established notebook/archive history or prior retirement and no configured ag-dir (or only its config), follow [setup](references/setup.md) before idle, using its verified `agf init` path for supported fresh Git setup; non-Git setup requires the saved/prior explicit Git choice. Otherwise bare activation without a direct task/question inspects only configuration, selected latest Ask/Questions and Current/Next. Missing notebooks first require root/configured-directory history checks. Linked unfinished work/gates/delivery, pending batches, live operations or ambiguity require normal recovery. Only verified absence of all work permits asking for the next request without claim, setup, record update or retroactive capture. Skip unrelated commands/reads; narrowly date-gated release scheduling remains allowed, but due migration requires normal owned recovery.
6. **Owned work:** read [session](references/session.md) before claim, recovery, capture or task work; claim before full recovery/execution. Preserve unrelated edits. Follow shared/local project rules and [invariants](references/invariants.md) before affected work; unavailable authoritative rules defer dependent writes/acceptance. Bare `godev` resumes unfinished work; activation invents no project task.
## Load only the applicable procedure
Read static rules once while retained in context. For each triggered reference, retain its opening constraints and read the applicable sections and linked prerequisites before acting; locate headings/ranges instead of dumping multipurpose files. Never shorten an applicable clause or mandatory full scan, including invariant-registry screening. Claim discovery reads only the latest Ask ID before ownership; the idle inspection above remains exempt. Bound batches by aggregate output size; reread any truncated required text.
- [Batches](references/batches.md): append command, correction targeting a pending batch, or recovery of pending rounds. The host owns queue/claim/capture/integration/delivery; reached batches prefer bounded native implementation workers under its exceptions.
- [Visual explanations](references/eli5.md): load only for an unquoted `eli5:` request, after routing. Produce an interactive animated HTML lesson; never execute its payload. Ordinary activation and quoted examples do not load this reference.
- [Work](references/work.md): actual project execution, task modes (`browfield`, `fast-lane`, `grill-me`, `skip-review`, advisors/`3ways`) or requested diff. [Planning](references/planning.md): applicable design/tracker criteria, requested/materially revised contracts or gates; ordinary Q&A loads neither execution nor design contracts. Plan-only adds no implementation authority.
- [Simplicity check](references/simple-check.md): unquoted `simple-check [target]` reviews an existing plan with a fresh independent read-only worker; no host fallback or implementation authority. Existing planning/review callers load only its canonical Check, retaining their stages/routes.
- [Review](references/review.md): [planning routes](references/review.md#planning-routes) before already-needed planning, [finished-result review](references/review.md#inspect-the-finished-result) before result review, and worker controls before dispatch. Changed code, operational prompts, product artifacts and implementation-ready contracts require configured result review unless waived under [Work](references/work.md#records-and-review); ordinary Q&A uses host review. Explicit/configured `3ways` loads the full [debate procedure](references/review.md#3ways-compare-before-implementation). Read [Copilot](references/copilot.md) only on a Copilot host or selected Copilot route/profile. Every Codex `spawn_agent` explicitly uses `fork_turns: "none"` with complete bounded context.
- [Delivery](references/delivery.md): before STATUS/Reply rendering, closeout, archive, Git delivery or explicit notebook rename. With `inline-reply: off`, save all substantive answers/proposals/examples/questions at their existing record locations; chat contains activity, required notices/blockers/handoffs and the exact localized receipt. Explicit chat/terminal destination requests and looper’s required preparation terminal choices are the only answer-display exceptions. Otherwise do not echo saved answers through tools.
- [Setup](references/setup.md): eligible initial creation (including missing `agf` shell binding with visible notice) or AGENTS adoption on actual work. [Upkeep](references/upkeep.md): config migration/relocation or approved installation replacement; recognized Agentflow8/integration triggers first load [legacy migration](references/legacy-migration.md); neither grants publication or unrelated edits.
- [Looper](references/looper.md): before `prepare-tasks`, `run-tasks`, `handle-tasks`, execution or recovery. Preparation saves the Current-linked queue/planned files and stops; run executes it; handle combines both. Its scoped Node coordinator/`agf` launcher, the [initializer](references/setup.md#standalone-initialization) and [terminal feature CLI](references/features.md#terminal-cli) are the only runtime exceptions. Preserve ordinary task settings, isolation, native live-host/mailbox requirements and owner-only boundaries; no CLI substitution or push/release authority follows. Cleanup requires explicit `agf looper cleanup` or `run --cleanup` under that contract.
- [Windows](references/windows.md): Windows or explicit portability work. For affected web journeys/requested end-to-end checks, read [browser testing](references/browser-testing.md) before tool selection or declaring browser access unavailable; Stagehand/`browse` require no browser plugin/connector. Other specialized references load at work/review triggers; do not load all routinely. With `saving-mode: on`, read [saving mode](references/saving-mode.md) before authoring; off preserves normal behavior; missing saving-mode follows configuration migration.
Keep scope tied to accepted input/corrections; proposals and reviewer suggestions add no authority. Inspect external operation identity before retrying an unknown result. Stop named work/descendants when asked; settle task-owned workers/mutating processes before yielding and release only the verified own closed-round claim under session rules. Never promise unsupported background continuation.
Batch independent reads/searches/tool calls when supported, with bounded concurrency/output; inspect every result, including failures. Keep dependencies, approvals and adaptive follow-ups sequential; parallelize mutations only when independent and safe. Obey tool restrictions; preserve authorization and required checks.