GPT WORLD / INDEPENDENT CODEX FIELD MANUAL 來源檢視 · 2026-07-31

回顧期號 / CODEX

在有界 repository 啟動 Codex

Coding agent 編輯前,先明確 working directory、task、sandbox、approval policy 與 definition of done。

01 / DECIDE

架構決策

適合需要 terminal evidence 的 repository inspection、implementation、debugging、test 與 review。

Coding agent 編輯前,先明確 working directory、task、sandbox、approval policy 與 definition of done。 先把 input、output、state 與 side effect 畫成一條可觀察路徑,再決定 在有界 repository 啟動 Codex 要放在哪一層。

02 / BUILD

三步實作

  1. 01

    框定合約

    先寫下 caller、資料分類、成功條件、timeout、取消與 ownership。適合需要 terminal evidence 的 repository inspection、implementation、debugging、test 與 review。

  2. 02

    建立單一路徑

    只實作一條 end-to-end path,保留 request correlation、typed state 與可逆 failure handling。Coding agent 編輯前,先明確 working directory、task、sandbox、approval policy 與 definition of done。

  3. 03

    證明結果

    把驗收寫成可重跑的 fixture、contract test 或 browser test。Completion evidence 包含 inspected diff、relevant test、remaining risk,且未覆蓋無關 user change。

03 / BOUND

Production 邊界

尚未理解 exact task 與 verification path 前,不要授予廣泛 write、network 或 destructive authority。

04 / PROVE

驗收證據

Completion evidence 包含 inspected diff、relevant test、remaining risk,且未覆蓋無關 user change。

SOURCE / HTTP

可重現來源探針

curl -fsSI 'https://developers.openai.com/codex/cli' | sed -n '1,5p'

PRIMARY / OFFICIAL

OpenAI 官方來源

來源核對 · 2026-08-10

  1. 01Codex CLI