精品欧美一区二区三区在线观看 _久久久久国色av免费观看性色_国产精品久久在线观看_亚洲第一综合网站_91精品又粗又猛又爽_小泽玛利亚一区二区免费_91亚洲精品国偷拍自产在线观看 _久久精品视频在线播放_美女精品久久久_欧美日韩国产成人在线

告別Claude代碼降智!OpenAI Codex深度配置與避坑指南(附完整AGENTS.md) 原創(chuàng)

發(fā)布于 2025-9-29 07:02
瀏覽
0收藏

最近Claude code降智嚴(yán)重,Codex強(qiáng)勢(shì)崛起,群里一些人還不太會(huì)用。本文將帶你從零開始掌握 OpenAI Codex,涵蓋配置、命令、工具調(diào)用、實(shí)戰(zhàn)技巧等各個(gè)方面。

基礎(chǔ)配置 config.toml

工欲善其事,必先利其器。強(qiáng)烈建議先閱讀官方配置文檔 ??config.md?? 了解各項(xiàng)配置的詳細(xì)作用。

在 ??~/.codex/config.toml?? 文件中進(jìn)行基礎(chǔ)配置:

# 模型配置
model = "gpt-5-codex"                      # Codex 0.36.0+ 支持
model_reasoning_effort = "high"             # 使用最大推理能力
model_reasoning_summary = "detailed"        # 終端顯示詳細(xì)推理總結(jié) (Ctrl+T查看)
model_verbosity = "high"                   # 高詳細(xì)度輸出
model_supports_reasoning_summaries = true  # 強(qiáng)制啟用推理總結(jié)

# 代理配置
hide_agent_reasoning = false               # 顯示 Agent 內(nèi)部思考過程

# 隱私配置
disable_response_storage = true            # 禁止 OpenAI 存儲(chǔ)對(duì)話數(shù)據(jù)

# 權(quán)限配置 (建議通過 /approvals 命令配置)
approval_policy = "never"                  
sandbox_mode = "workspace-write"           

# 網(wǎng)絡(luò)訪問配置
[sandbox_workspace_write]
network_access = true                      # 允許網(wǎng)絡(luò)訪問

配置項(xiàng)詳解

  • ??model_reasoning_effort???: 控制模型推理深度,??high?? 提供最佳效果
  • ??model_reasoning_summary???: 推理總結(jié)詳細(xì)程度,??detailed?? 提供完整信息
  • ??hide_agent_reasoning???: 設(shè)為??false?? 可查看更多內(nèi)部處理過程
  • ??disable_response_storage??: 重要隱私設(shè)置,禁止數(shù)據(jù)存儲(chǔ)

核心命令

使用 ??codex --help?? 查看所有可用命令參數(shù),這是個(gè)好習(xí)慣!

啟動(dòng) Codex 后,輸入 ??/?? 可查看所有支持的快捷命令:

/status - 狀態(tài)檢查

最重要的命令,用于檢查:

  • 當(dāng)前權(quán)限級(jí)別
  • GPT-5 模型配置
  • API Key 狀態(tài)

特別提醒: 使用自定義 API Key 時(shí),務(wù)必經(jīng)常檢查確保使用正確的模型配置。

/approvals - 權(quán)限管理

Codex 提供三種權(quán)限級(jí)別:

權(quán)限級(jí)別

功能范圍

適用場(chǎng)景

實(shí)際體驗(yàn)

Read Only

僅讀取文件

代碼審查、學(xué)習(xí)

限制過多,頻繁需要確認(rèn)

Auto

讀寫文件、運(yùn)行命令

一般開發(fā)

仍需較多手動(dòng)確認(rèn)

Full Access

完整權(quán)限 + 網(wǎng)絡(luò)訪問

完整開發(fā)流程

真正的自動(dòng)化體驗(yàn)

推薦配置

對(duì)于日常開發(fā),推薦使用 ??Full Access?? 模式,可通過啟動(dòng)參數(shù)跳過權(quán)限確認(rèn):

codex --dangerously-bypass-approvals-and-sandbox

安全提醒

??Full Access?? 模式具有完整系統(tǒng)權(quán)限,請(qǐng)確保在可信環(huán)境中使用。

/mcp - MCP 服務(wù)器配置

Windows 開發(fā)者按照 mcp_servers 官方文檔 配置通常會(huì)失敗!

常見錯(cuò)誤信息:

Program not found
# 或
request timed out

Windows 下正確配置方法:

在原教程基礎(chǔ)上添加以下配置:

  1. 新增 ??command?? - 指向具體的 npx 位置
  2. 新增 ??env?? - 包含 SYSTEMROOT 環(huán)境變量

[mcp_servers.context7]
command = "C:\\Program Files\\nodejs\\npx.cmd"
args = ["-y", "@upstash/context7-mcp", "--api-key", "<your_api_key>"]
env = {SYSTEMROOT = 'C:\Windows'}

正確配置后,你將看到類似下圖的顯示效果:

告別Claude代碼降智!OpenAI Codex深度配置與避坑指南(附完整AGENTS.md)-AI.x社區(qū)

codex-mcp 配置成功示例

對(duì)話恢復(fù)功能

恢復(fù)/繼續(xù)對(duì)話功能仍在開發(fā)中,所以 ??--help?? 中暫未添加說明,但當(dāng)前可用。

Codex 的對(duì)話歷史保存在本地目錄 ??~/.codex/sessions?? 下:

選擇恢復(fù)對(duì)話:

codex resume    # 顯示最近對(duì)話列表,手動(dòng)選擇

工具調(diào)用優(yōu)化

為了最快最準(zhǔn)確地幫助 Codex 完成任務(wù),我們需要針對(duì)性地使用不同的搜索工具。

平臺(tái)適配:本文主要針對(duì) Windows 平臺(tái),旨在引導(dǎo) Codex 使用正確的命令和工具,減少錯(cuò)誤重試、降低任務(wù)執(zhí)行時(shí)長。

倉庫規(guī)則配置:Codex 支持在代碼倉庫根目錄添加 ??AGENTS.md?? 文件指導(dǎo)工具使用規(guī)則。

三大搜索工具

工具類型

工具名稱

使用場(chǎng)景

命令示例

文件名搜索

??fd??

按文件名查找

??fd "*.ts" src/??

文本內(nèi)容搜索

??rg??

 (ripgrep)

按文本內(nèi)容查找

??rg "function" src/??

代碼結(jié)構(gòu)搜索

??sg??

 (ast-grep)

按代碼語義查找

??sg -p "import $$" src/??

Windows 安裝

winget install sharkdp.fd BurntSushi.ripgrep.MSVC ast-grep

ripgrep 安裝后需要手動(dòng)添加到環(huán)境變量,自行解決

AGENTS.md 配置指南

在實(shí)際操作中發(fā)現(xiàn),僅聲明可用工具而不引導(dǎo)具體用法,經(jīng)常會(huì)偏離預(yù)期。建議使用下方完整配置,按需調(diào)整。

## Tool Priority

- Filename search: `fd`.
- Text/content search: `rg` (ripgrep).
- AST/structural search: `sg` (ast-grep) — preferred for code-aware queries (imports, call expressions, JSX/TSX nodes).

### AST-grep Usage (Windows)

- Announce intent and show the exact command before running complex patterns.
- Common queries:
  - Find imports from `node:path` (TypeScript/TSX):
    - `ast-grep -p "import $$ from 'node:path'" src --lang ts,tsx,mts,cts`
  - Find CommonJS requires of `node:path`:
    - `ast-grep -p "require('node:path')" src --lang js,cjs,mjs,ts,tsx`
  - Suggest rewrite (do not auto-apply in code unless approved):
    - Search: `ast-grep -p "import $$ from 'node:path'" src --lang ts,tsx`
    - Proposed replacement: `import $$ from 'pathe'`

### Search Hygiene (fd/rg/sg)

- Exclude bulky folders to keep searches fast and relevant: `.git`, `node_modules`, `coverage`, `out`, `dist`.
- Prefer running searches against a scoped path (e.g., `src`) to implicitly avoid vendor and VCS directories.
- Examples:
  - `rg -n "pattern" -g "!{.git,node_modules,coverage,out,dist}" src`
  - `fd --hidden --exclude .git --exclude node_modules --exclude coverage --exclude out --exclude dist --type f ".tsx?$" src`
- ast-grep typically respects `.gitignore`; target `src` to avoid scanning vendor folders:
  - `ast-grep -p "import $$ from '@shared/$$'" src --lang ts,tsx,mts,cts`
  - If needed, add ignore patterns to your ignore files rather than disabling ignores.

系統(tǒng)通知配置

Codex 支持在任務(wù)執(zhí)行完成后執(zhí)行自定義事件,我們可利用這一特性實(shí)現(xiàn) Windows 系統(tǒng)彈窗通知。

參考文檔:Codex 通知配置

步驟 1:配置 config.toml

在 ??~/.codex/config.toml?? 中添加:

# 通知命令配置
notify = [
    "powershell.exe",
    "-NoProfile",
    "-ExecutionPolicy","Bypass",
    "-File","C:\\Users\\<username>\\.codex\\notify.ps1"
]

步驟 2:創(chuàng)建通知腳本

在 ??~/.codex/notify.ps1?? 中創(chuàng)建:

param(
  [Parameter(Mandatory = $true)]
  [string]$json
)

# 解析 JSON(Codex 傳入的 JSON 參數(shù))
try {
  $payload = $json | ConvertFrom-Json
} catch {
  $payload = @{}
}

# 配置通知內(nèi)容
$title = 'Codex 任務(wù)完成'
$msg   = $payload.'last-assistant-message'

if (-not $msg) {
  if ($payload.type) {
    $msg = "事件類型: $($payload.type)"
  } else {
    $msg = 'Codex 有新更新。'
  }
}

# 文本截?cái)嗵幚恚ū苊膺^長顯示)
if ($msg -and $msg.Length -gt 240) {
  $msg = $msg.Substring(0,240) + '...'
}

# 使用 BurntToast 模塊顯示通知
Import-Module BurntToast -ErrorAction Stop
New-BurntToastNotification -Text $title, $msg | Out-Null

需要先安裝 BurntToast PowerShell 模塊:

Install-Module -Name BurntToast -Scope CurrentUser

調(diào)試技巧與優(yōu)化

每次修改 ??AGENTS.md??? 后,多使用 ??Ctrl+T?? 查看思考過程,檢查命令調(diào)用和思考邏輯是否符合預(yù)期。

優(yōu)化流程

告別Claude代碼降智!OpenAI Codex深度配置與避坑指南(附完整AGENTS.md)-AI.x社區(qū)

調(diào)試技巧

  1. 定期檢查- 使用??Ctrl+T?? 查看當(dāng)前任務(wù)的思考軌跡
  2. 及時(shí)調(diào)整- 發(fā)現(xiàn)偏差時(shí)直接與 Codex 對(duì)話詢問
  3. 多輪優(yōu)化- 重復(fù)調(diào)整直到獲得滿意結(jié)果
  4. 記錄經(jīng)驗(yàn)- 將有效的??AGENTS.md?? 配置保存為模板

Spec-kit 工作流

模仿 GitHub Spec-kit 建立的新功能實(shí)現(xiàn)規(guī)范,包含三個(gè)流程:spec、plan 和 do。

流程概覽

階段

命令

作用

輸出

規(guī)范

??/spec??

生成功能規(guī)范

??specs/??

 目錄下的 Markdown 文件

計(jì)劃

??/plan??

根據(jù)規(guī)范生成實(shí)現(xiàn)計(jì)劃

??plans/??

 目錄下的計(jì)劃文件

實(shí)現(xiàn)

??/do??

按照計(jì)劃執(zhí)行實(shí)現(xiàn)

實(shí)際代碼變更

注意事項(xiàng)

  • 不必嚴(yán)格遵循三個(gè)階段順序
  • 可以多輪對(duì)話調(diào)整 spec 文件直到滿意
  • 仍在測(cè)試優(yōu)化中,未使用官方 prompts.md 方式

## Stage-Gated Workflow (spec/plan/do)

- Mode: Opt-in. The workflow applies only when the user explicitly uses `/spec`, `/plan`, or `/do`. Routine Q&A or trivial edits do not require these stages.
- Triggers: A message containing one of `/spec`, `/plan`, or `/do` activates or advances the workflow. Once active, stages must proceed in order with explicit user approval to advance.
- Guardrails:
  - Do not modify source code before `/do`. Documentation/spec files may be edited only in `/spec`.
  - Do not skip stages or proceed without user confirmation once the workflow is active.
  - If scope changes, return to the appropriate prior stage for approval.
  - Respect sandbox/approval settings for all actions.

- When to Use
  - Use the workflow for new features, structural refactors, multi-file changes, or work needing traceability.
  - Skip the workflow (no triggers) for routine Q&A, diagnostics, or one-off trivial edits.

- Entry Points and Prerequisites
  - `/spec` is the canonical entry point for new efforts.
  - `/plan` requires an approved `/spec`. If unclear which spec applies, pause and ask the user to identify the correct file(s) under `specs/`.
  - `/do` requires an approved `/plan`.

- `/spec` (Specifications; docs only)
  - Purpose: Capture a concrete, reviewable specification using spec-kit style.
  - Output: Markdown spec(s) under `specs/` (no code changes). Share a concise diff summary and links to updated files; wait for approval.
  - Style: Specs are canonical and final. Do not include change logs or “correction/更正” notes. Incorporate revisions directly so the document always reflects the current agreed state. Historical context belongs in PR descriptions, commit messages, or the conversation — not in the spec.
  - Recommended contents:
    - Problem statement and context
    - Goals and non-goals
    - Requirements and constraints (functional, UX, performance, security)
    - UX/flows and API/IPC contracts (as applicable)
    - Acceptance criteria and success metrics
    - Alternatives considered and open questions
    - Rollout/backout considerations and telemetry (if relevant)

- `/plan` (High-level Plan; docs only)
  - Purpose: Turn the approved spec into an ordered, verifiable implementation plan.
  - Inputs: Approved spec file(s) in `specs/`.
  - Ambiguity: If the relevant spec is unclear, pause and request clarification before writing the plan.
  - Style: Plans are canonical and should not include change logs or “correction/更正” notes. Incorporate revisions directly so the plan always reflects the current agreed state. Historical notes should live in PR descriptions, commit messages, or the conversation.
  - Output:
    - An ordered plan via `update_plan` (short, verifiable steps; Task is merged into Plan and tracked here).
    - A plan document in `plans/` named `YYYY-MM-DD-short-title.md`, containing:
      - Scope and links to authoritative spec(s)
      - Assumptions and out-of-scope items
      - Phases/milestones mapped to acceptance criteria
      - Impacted areas, dependencies, risks/mitigations
      - Validation strategy (tests/lint/build) and rollout/backout notes
      - Approval status and next stage
  - Handoff: Await user approval of the plan before `/do`.

- `/do` (Execution)
  - Purpose: Implement approved plan steps with minimal, focused changes and file operations.
  - Actions:
    - Use `apply_patch` for file edits; group related changes and keep diffs scoped to approved steps.
    - Provide concise progress updates and a final summary of changes.
    - Validate appropriately: run `pnpm lint`, `pnpm format`, `pnpm build`, and relevant tests.
    - If material changes to the plan are needed, pause and return to `/plan` (or `/spec`) for approval.
  - Output: Implemented changes, validation results, and a concise change summary linked to the plan checklist.

### Plans Directory

- Location: `plans/` at the repository root.
- Filename: `YYYY-MM-DD-short-title.md` (kebab-case title; consistent dating).
- Style: Plan docs are the canonical source of truth for the implementation approach; avoid embedding change logs or “correction/更正” notes. Update the plan in place as decisions evolve.
- Contents:
  - Title and summary
  - Scope and linked specs (paths under `specs/`)
  - Assumptions / Out of scope
  - Step-by-step plan (short, verifiable)
  - Validation strategy (tests/lint/build)
  - Approval status and next stage
- Process:
  - During `/plan`, create or update the relevant file in `plans/` and share a short summary in the conversation. Await approval before `/do`.

WSL2

如果你在 Windows 下讓 Codex 執(zhí)行任務(wù),你會(huì)發(fā)現(xiàn)它經(jīng)常調(diào)用命令失敗然后重試,如此循環(huán)。雖然最終都會(huì)成功,但浪費(fèi)了很多時(shí)間,個(gè)人推測(cè)這是因?yàn)?GPT-5 Unix Shell 訓(xùn)練數(shù)據(jù)太多而 Powershell 數(shù)據(jù)太少導(dǎo)致的幻覺,Codex 總是下意識(shí)調(diào)用 Unix Shell 命令來處理。

那么有沒有辦法解決呢?當(dāng)然有!打不過就加入——WSL2。

以 Windows 11 為例,在 Powershell 執(zhí)行 ??wsl --install?? 即可安裝 WSL2。

這種情況下,有兩種方式選擇:

  • Windows 端代碼+WSL2 Codex 環(huán)境,適用于開發(fā) Windows 端的程序,比如 Electron Windows,.NET 等
  • WSL2 代碼 + WSL2 Codex 環(huán)境,比如 Vue Web 開發(fā)

對(duì)于后者,所有都能正常在 WSL2 環(huán)境內(nèi)運(yùn)行,就不做說明了,而前者 Windows + WSL2 混用就需要解決一個(gè)問題:如何在 WSL2 調(diào)用 Windows 端的 ??npm/pnpm???,執(zhí)行定義好的 ??pnpm typecheck????pnpm lint:fix?? 等。

在 WSL2 Codex 對(duì)話時(shí),要求其調(diào)用 pwsh.exe 來執(zhí)行 ??pnpm typecheck?? 來檢查,如此即可。

we're in WSL2, please using pwsh.exe to run `pnpm <script>`

完整-agents-md

還在調(diào)整中,不要完全照抄,最好還是通過 ??ctrl+T??? 查看整個(gè)過程,如果遇到 Codex 經(jīng)常會(huì)出錯(cuò)的命令,選擇性的修刪適合自己的 ??AGENTS.md??。

主要適配內(nèi)容:

  • Windows/WSL2 支持,優(yōu)先使用 Powershell 支持的命令,對(duì)于任何 npm 包安裝都必須請(qǐng)示用戶,避免混亂的依賴項(xiàng)
  • 使用 fd,ripgrep,ast-grep 搜索文件、文本和代碼片段,更快更直接
  • spec/plan/do 工作流,先確定規(guī)范,再編寫計(jì)劃,最后實(shí)現(xiàn)

# AGENTS Guidelines

## Windows Environment Notice

- Prefer PowerShell (`pwsh`/`powershell`) when on Windows.
- Prefer using pwsh.exe to run `pnpm <script>` when on WSL2.
- WSL2 may be used for non-package-manager commands only (e.g., `rg`, `tar`). Avoid running Node builds in WSL due to OS mismatch.
- WSL2 cross-drive performance: accessing repos under `/mnt/c|d|e/...` goes through a filesystem bridge and can be slower for full scans. Prefer scoping to subtrees, excluding heavy folders, or running the same searches with native Windows binaries in PowerShell for large/iterative scans.
- Do not auto-run dependency installs. The user must run `pnpm install` in Windows PowerShell manually and then confirm completion.
- Do not modify `package.json`/lockfiles to add or update dependencies without explicit user approval. Propose dependencies in `/spec` or `/plan`, and ask the user to run `pnpm add <pkg>` (or `pnpm install`) and confirm.
- Do not call Unix text tools directly in PowerShell (e.g., `sed`, `awk`, `cut`, `head`, `tail`). Use PowerShell-native equivalents instead:
  - `head` → `Select-Object -First N`
  - `tail` → `Get-Content -Tail N`
  - paging → `Out-Host -Paging` or `more`
  - substitution/replace → `-replace` with `Get-Content`/`Set-Content`

## Tool Priority

- Filename search: `fd`.
- Text/content search: `rg` (ripgrep).
- AST/structural search: `sg` (ast-grep) — preferred for code-aware queries (imports, call expressions, JSX/TSX nodes).

### AST-grep Usage

- Announce intent and show the exact command before running complex patterns.
- Common queries:
  - Find imports from `node:path` (TypeScript/TSX):
    - `ast-grep -p "import $$ from 'node:path'" src --lang ts,tsx,mts,cts`
  - Find CommonJS requires of `node:path`:
    - `ast-grep -p "require('node:path')" src --lang js,cjs,mjs,ts,tsx`
  - Suggest rewrite (do not auto-apply in code unless approved):
    - Search: `ast-grep -p "import $$ from 'node:path'" src --lang ts,tsx`
    - Proposed replacement: `import $$ from 'pathe'`

### Search Hygiene (fd/rg/sg)

- Exclude bulky folders to keep searches fast and relevant: `.git`, `node_modules`, `coverage`, `out`, `dist`.
- Prefer running searches against a scoped path (e.g., `src`) to implicitly avoid vendor and VCS directories.
- Examples:
  - `rg -n "pattern" -g "!{.git,node_modules,coverage,out,dist}" src`
  - `fd --hidden --exclude .git --exclude node_modules --exclude coverage --exclude out --exclude dist --type f ".tsx?$" src`
- ast-grep typically respects `.gitignore`; target `src` to avoid scanning vendor folders:
  - `ast-grep -p "import $$ from '@shared/$$'" src --lang ts,tsx,mts,cts`
  - If needed, add ignore patterns to your ignore files rather than disabling ignores.

## Temporary Research Files

- Canonical location: store all temporary research artifacts (downloaded READMEs, API docs, scratch notes) under `docs/research/`.
- Do not place temporary files at the repository root or outside `docs/research/`.
- Commit policy: avoid committing temporary files unless they are necessary for traceability during `/spec` or `/plan`. If committed, keep the scope minimal and store them under `docs/` only.
- Naming: use descriptive names with date or task context (e.g., `docs/research/2025-09-11-wsl-notes.md`).
- Cleanup: after completing a task (`/do`), evaluate whether each temporary file is still required. Remove unneeded files, or promote essential content into curated docs under `docs/` or into `specs/`/`plans/`.

## Stage-Gated Workflow (spec/plan/do)

- Mode: Opt-in. The workflow applies only when the user explicitly uses `/spec`, `/plan`, or `/do`. Routine Q&A or trivial edits do not require these stages.
- Triggers: A message containing one of `/spec`, `/plan`, or `/do` activates or advances the workflow. Once active, stages must proceed in order with explicit user approval to advance.
- Guardrails:
  - Do not modify source code before `/do`. Documentation/spec files may be edited only in `/spec`.
  - Do not skip stages or proceed without user confirmation once the workflow is active.
  - If scope changes, return to the appropriate prior stage for approval.
  - Respect sandbox/approval settings for all actions.

- When to Use
  - Use the workflow for new features, structural refactors, multi-file changes, or work needing traceability.
  - Skip the workflow (no triggers) for routine Q&A, diagnostics, or one-off trivial edits.

- Entry Points and Prerequisites
  - `/spec` is the canonical entry point for new efforts.
  - `/plan` requires an approved `/spec`. If unclear which spec applies, pause and ask the user to identify the correct file(s) under `specs/`.
  - `/do` requires an approved `/plan`.

- `/spec` (Specifications; docs only)
  - Purpose: Capture a concrete, reviewable specification using spec-kit style.
  - Output: Markdown spec(s) under `specs/` (no code changes). Share a concise diff summary and links to updated files; wait for approval.
  - Style: Specs are canonical and final. Do not include change logs or “correction/更正” notes. Incorporate revisions directly so the document always reflects the current agreed state. Historical context belongs in PR descriptions, commit messages, or the conversation — not in the spec.
  - Recommended contents:
    - Problem statement and context
    - Goals and non-goals
    - Requirements and constraints (functional, UX, performance, security)
    - UX/flows and API/IPC contracts (as applicable)
    - Acceptance criteria and success metrics
    - Alternatives considered and open questions
    - Rollout/backout considerations and telemetry (if relevant)

- `/plan` (High-level Plan; docs only)
  - Purpose: Turn the approved spec into an ordered, verifiable implementation plan.
  - Inputs: Approved spec file(s) in `specs/`.
  - Ambiguity: If the relevant spec is unclear, pause and request clarification before writing the plan.
  - Style: Plans are canonical and should not include change logs or “correction/更正” notes. Incorporate revisions directly so the plan always reflects the current agreed state. Historical notes should live in PR descriptions, commit messages, or the conversation.
  - Output:
    - An ordered plan via `update_plan` (short, verifiable steps; Task is merged into Plan and tracked here).
    - A plan document in `plans/` named `YYYY-MM-DD-short-title.md`, containing:
      - Scope and links to authoritative spec(s)
      - Assumptions and out-of-scope items
      - Phases/milestones mapped to acceptance criteria
      - Impacted areas, dependencies, risks/mitigations
      - Validation strategy (tests/lint/build) and rollout/backout notes
      - Approval status and next stage
  - Handoff: Await user approval of the plan before `/do`.

- `/do` (Execution)
  - Purpose: Implement approved plan steps with minimal, focused changes and file operations.
  - Actions:
    - Use `apply_patch` for file edits; group related changes and keep diffs scoped to approved steps.
    - Provide concise progress updates and a final summary of changes.
    - Validate appropriately: run `pnpm lint`, `pnpm format`, `pnpm build`, and relevant tests.
    - If material changes to the plan are needed, pause and return to `/plan` (or `/spec`) for approval.
  - Output: Implemented changes, validation results, and a concise change summary linked to the plan checklist.

### Plans Directory

- Location: `plans/` at the repository root.
- Filename: `YYYY-MM-DD-short-title.md` (kebab-case title; consistent dating).
- Style: Plan docs are the canonical source of truth for the implementation approach; avoid embedding change logs or “correction/更正” notes. Update the plan in place as decisions evolve.
- Contents:
  - Title and summary
  - Scope and linked specs (paths under `specs/`)
  - Assumptions / Out of scope
  - Step-by-step plan (short, verifiable)
  - Validation strategy (tests/lint/build)
  - Approval status and next stage
- Process:
  - During `/plan`, create or update the relevant file in `plans/` and share a short summary in the conversation. Await approval before `/do`.

經(jīng)驗(yàn)分享

主動(dòng)引導(dǎo)技巧

不要把所有注意事項(xiàng)都寫入 ??AGENTS.md??,用戶需要根據(jù)不同場(chǎng)景主動(dòng)引導(dǎo) Codex 使用適合的工具。

實(shí)用例子:

  • 使用??git diff?? 提供更準(zhǔn)確的上下文
  • 在查詢時(shí)直接給出關(guān)鍵信息(函數(shù)名、文件名等)

信息提供原則

盡可能提供完整信息:Codex 的代碼搜索方式相對(duì)原始,可能搜不到你想要的內(nèi)容。

最佳實(shí)踐:

  • 直接提供函數(shù)名、文件名等關(guān)鍵信息
  • 使用??@?? 快捷命令快速搜索文件名
  • 減少 Codex 的誤判和搜索時(shí)間

網(wǎng)頁搜索建議

網(wǎng)頁搜索優(yōu)先使用網(wǎng)頁版 ChatGPT-5-Thinking

  • 搜索更快更完整
  • 非常擅長 GitHub 項(xiàng)目檢索(源碼、項(xiàng)目結(jié)構(gòu)、issue、PR)
  • 特別適合了解開源項(xiàng)目功能

總結(jié)

AI 工具日新月異,一個(gè)新工具崛起,不要妄想能三分鐘上手掌握,也不要過于依賴他人的博客文檔和結(jié)論。AI 工具千人千面,每個(gè)人都有各自的編程習(xí)慣,需要:

  • 花幾天時(shí)間慢慢了解工具特性
  • 理解背后的大語言模型習(xí)慣和特點(diǎn)
  • 根據(jù)自己的需求和喜好調(diào)教獨(dú)屬的 AI 工具

官方資源

  • 官方快速開始文檔
  • GitHub 項(xiàng)目文檔


本文轉(zhuǎn)載自??AI 博物院?? 作者:longyunfeigu

?著作權(quán)歸作者所有,如需轉(zhuǎn)載,請(qǐng)注明出處,否則將追究法律責(zé)任
標(biāo)簽
已于2025-9-29 07:02:04修改
收藏
回復(fù)
舉報(bào)
回復(fù)
相關(guān)推薦
国产在线日本| 亚洲天堂手机版| 欧美激情15p| 夜鲁夜鲁夜鲁视频在线播放| 视频一区免费在线观看| 深夜福利日韩在线看| 午夜免费福利视频在线观看| 日韩另类在线| 国产亚洲精品免费| 91aaaa| 日韩黄色一级大片| 欧美第一精品| 日韩精品中文字幕在线| 中文字幕第36页| 欧美色图天堂| 一区在线中文字幕| 欧美日韩精品免费观看视一区二区| 中国老头性行为xxxx| 欧美视频官网| 中文字幕日韩在线观看| 天天躁日日躁狠狠躁av麻豆男男| 懂色aⅴ精品一区二区三区| 亚洲一二三四在线| 亚洲图片欧洲图片日韩av| 人妻精品无码一区二区| 久久99国产精品免费| 91sa在线看| 国产一二三四区| 久久福利综合| 亚洲欧美三级在线| 免费看毛片的网站| 国产精品视频一区视频二区| 色婷婷国产精品| 国产黄色激情视频| 麻豆传媒在线免费| 欧美激情在线观看视频免费| 国产综合欧美在线看| 国产av无码专区亚洲a∨毛片| 视频一区中文字幕| 91精品国产乱码久久久久久蜜臀| 亚洲成人生活片| 99久久综合| 在线播放国产精品| 91精品人妻一区二区| 成人精品动漫一区二区三区| 日韩欧美在线一区二区三区| 九九热免费在线观看| 欧美三区四区| 在线视频中文字幕一区二区| 六月丁香婷婷在线| 色老头在线一区二区三区| 亚洲制服丝袜一区| 欧美日韩午夜爽爽| 八戒八戒神马在线电影| 亚洲欧洲日韩av| 亚洲人成影视在线观看| 免费黄色片在线观看| 99久久精品免费看国产免费软件| 99国产在线视频| 午夜精品久久久久久久99老熟妇 | 欧美激情视频播放| 极品盗摄国产盗摄合集| 欧美黄免费看| 久久99青青精品免费观看| 欧美三级日本三级| 欧美精品一卡| 久久久影视精品| 国产精品成人aaaa在线| 99热免费精品| 国产成人aa精品一区在线播放| 日日夜夜操视频| 青青青爽久久午夜综合久久午夜| 国产精品久久久久9999| aaa在线视频| 美女尤物国产一区| 91嫩草在线视频| 亚洲免费一级片| 91蜜桃传媒精品久久久一区二区| 麻豆亚洲一区| 在线观看av黄网站永久| 亚洲天堂福利av| 日韩精品在线中文字幕| 午夜激情电影在线播放| 色婷婷综合久久久久中文一区二区| 国产情侣av自拍| 亚洲综合视频| 亚洲福利视频久久| 久久久久久久毛片| 一精品久久久| 欧洲成人性视频| 在线观看国产黄| 国产999精品久久久久久绿帽| 精品国产_亚洲人成在线| 国产三级视频在线播放线观看| 国产精品久久久久毛片软件| 激情六月天婷婷| 超碰一区二区| 欧美一级搡bbbb搡bbbb| 日韩精品人妻中文字幕有码 | 国产一区二区h| 国产一区在线免费观看| 成人在线观看一区| 亚洲综合在线第一页| 色综合av综合无码综合网站| 欧美黄页在线免费观看| 亚洲国产成人在线播放| 一本在线免费视频| 91久久午夜| 成人美女av在线直播| 少妇高潮久久久| 中文字幕一区二区三区在线不卡| 日本xxxxxxxxxx75| 日韩福利在线观看| 精品网站999www| 日韩视频中文字幕在线观看| 久久蜜桃精品| 国外成人在线视频网站| 天堂аⅴ在线地址8| 黄色一区二区三区| 国产探花在线观看视频| 国产伦精品一区二区三区视频 | 亚洲美女视频网站| 国产极品国产极品| 日本欧美在线观看| 国产综合色一区二区三区| 黄色国产网站在线播放| 91官网在线观看| 日韩片在线观看| 欧美午夜国产| 成人性生交大片免费看视频直播| 国产精品一区在线看| 午夜亚洲国产au精品一区二区| 午夜国产福利在线观看| 国产99亚洲| 91av在线看| 隣の若妻さん波多野结衣| 亚洲丝袜制服诱惑| 91插插插插插插插插| 中国av一区| 91精品国产色综合| 蜜臀av午夜精品| 亚洲在线视频免费观看| 手机av在线网| 欧美激情偷拍自拍| 国产精品免费久久久| 看电影就来5566av视频在线播放| 亚洲成av人片一区二区三区| 四虎永久免费观看| 欧美日韩精选| 国产精品10p综合二区| 午夜激情在线| 精品久久久影院| 久久久久无码精品国产| 国产精品综合一区二区| 日本在线视频www色| 国产成人久久精品一区二区三区| 综合网中文字幕| 中文字幕 国产| 国产精品久久久久一区二区三区共| 亚洲欧洲日本精品| 欧美韩国日本在线观看| 国产噜噜噜噜噜久久久久久久久 | 国产最新精品视频| 六月丁香综合网| 亚洲1区2区3区视频| 女同性恋一区二区三区| aⅴ色国产欧美| 久久五月天婷婷| 日韩a**中文字幕| 伊人久久久久久久久久久久久| av首页在线观看| 国产精品护士白丝一区av| 91在线第一页| 亚洲无线视频| 欧美精品在线一区| 成人国产在线| 欧美成人午夜免费视在线看片| 亚洲精品一区二区口爆| 午夜精品久久久久久久久久| 97在线观看免费视频| 久久精品国产精品亚洲精品| 大桥未久一区二区| 国产乱人伦精品一区| 人体精品一二三区| 欧美极品视频| 亚洲成人精品视频| 中文天堂在线视频| 亚洲精品va在线观看| 午夜一区二区三区免费| 久久电影网站中文字幕| 91黄色在线看| 欧美中文一区二区| 91嫩草国产在线观看| 中文字幕色婷婷在线视频| 视频在线观看一区二区| 肥臀熟女一区二区三区| 91国产成人在线| 国产亚洲自拍av| 亚洲国产精品精华液ab| 免费啪视频在线观看| 日日夜夜免费精品| 欧美一级中文字幕| 精品视频日韩| 国产欧美日韩一区| 日韩综合久久| 欧美一区二区三区免费视| 秋霞午夜理伦电影在线观看| 日韩成人在线播放| 国产欧美久久久| 色一区在线观看| 精品无码久久久久久久| 国产亚洲成av人在线观看导航| 男人的天堂免费| 日韩av高清在线观看| 欧美精品久久久久久久久久久| 日本大胆欧美| 欧美成人综合一区| 国产精伦一区二区三区| 国产免费一区视频观看免费| 伊人网在线播放| 欧美国产日本在线| 毛片在线视频| 影音先锋欧美精品| 日韩私人影院| 亚洲成av人乱码色午夜| 国产又黄又爽视频| 欧美在线观看一二区| 久久国产精品系列| 亚洲午夜国产一区99re久久| 黑鬼狂亚洲人videos| 中文字幕的久久| 亚洲av成人无码久久精品| www.久久久久久久久| 久久久精品人妻一区二区三区| 寂寞少妇一区二区三区| 五月婷婷六月合| 日韩电影免费一区| 免费国产成人av| 久久精品官网| 国产激情在线观看视频| 欧美一区=区| 5月婷婷6月丁香| 一本久道久久久| 国产精彩视频一区二区| 欧美精品不卡| 97中文字幕在线| 午夜精品免费| 国产青草视频在线观看| 欧美一区免费| 屁屁影院ccyy国产第一页| 欧美精选一区| 国产精品日韩三级| 国一区二区在线观看| 少妇久久久久久被弄到高潮| 中文字幕免费一区二区| 特色特色大片在线| 欧美日本国产| 中文字幕久久一区| 中文字幕乱码亚洲无线精品一区| 欧美日韩一区二区三区电影| 中文字幕免费一区二区| 国产高清www| 亚洲深夜av| 999香蕉视频| 美女一区二区视频| 91网址在线观看精品| 国产成人在线影院| 久久久午夜精品福利内容| 久久夜色精品国产噜噜av| 黄色aaa视频| 国产精品女人毛片| 五月天免费网站| 一区二区三区蜜桃| 国产精品美女久久久久av爽| 日本乱人伦一区| 91中文字幕在线视频| 日韩免费观看高清完整版在线观看| 免费成人在线看| 亚洲美女久久久| www久久日com| 91av在线影院| 北岛玲精品视频在线观看| 国产98在线|日韩| 夜夜躁狠狠躁日日躁2021日韩| 亚洲精品一区二区毛豆| 亚洲精品在线观看91| 免费一级特黄毛片| 日韩成人免费电影| 久久精品无码专区| 国产色产综合色产在线视频| 免费中文字幕日韩| 天天做天天摸天天爽国产一区| 一级黄色在线观看| 欧美一区二区三区四区在线观看| 少妇高潮一区二区三区69| 中文字幕亚洲字幕| mm视频在线视频| 成人h视频在线| 亚洲国产网址| 青青草视频在线视频| 丝袜诱惑制服诱惑色一区在线观看| 中日韩av在线播放| 99热在这里有精品免费| 中文字幕91视频| 欧美视频中文字幕在线| 国产欧美第一页| 在线看日韩欧美| 国产乱码午夜在线视频| 国产在线a不卡| 综合伊思人在钱三区| 日本一道在线观看| 日本午夜一本久久久综合| 理论片大全免费理伦片| 中文字幕一区二区三区不卡| 亚洲高清毛片一区二区| 欧美一区二区三区日韩| 成人影院免费观看| 国产91成人在在线播放| 中文字幕一区二区三区中文字幕 | 欧美精品偷拍| 69久久久久久| 久久久精品蜜桃| 91香蕉在线视频| 欧美成人女星排名| 成人a在线视频免费观看| 国产精品欧美激情| 五月综合久久| 国产原创中文在线观看 | 中文字幕第4页| 大荫蒂欧美视频另类xxxx| 亚洲国产精品二区| 欧美成人在线免费视频| 青青国产精品| 亚洲一区二区三区精品在线观看| 美女视频一区免费观看| 在线观看国产网站| 午夜视频在线观看一区| 亚洲AV无码精品自拍| 久久国产精品视频| 99视频这里有精品| 一区二区成人国产精品| 蜜桃av一区二区| 18精品爽国产三级网站| 欧美色成人综合| 97在线观看免费观看高清 | 黄色大片中文字幕| 成人黄色在线视频| 日本一二三区视频| 亚洲成人激情图| 性爽视频在线| 欧洲精品一区色| 蜜臀久久99精品久久久画质超高清| 国产精品天天干| 欧美日韩一区二区欧美激情| 在线免费看a| 91性高湖久久久久久久久_久久99| 国产精品97| 自拍偷拍激情视频| 亚洲一区二区影院| 日本韩国在线观看| 91av中文字幕| 日韩影院二区| 国产黄色一区二区三区| 亚洲一区二区三区在线播放| 少妇av在线播放| 国产91在线播放精品91| 成人久久电影| 无码人妻一区二区三区在线视频| 亚洲一本大道在线| 免费一级在线观看| 国产欧美一区二区白浆黑人| 亚洲天天影视网| 艳妇乳肉豪妇荡乳xxx| 色婷婷狠狠综合| 毛片在线不卡| 国产一区二区不卡视频| 玖玖国产精品视频| 三级在线观看免费大全| 欧美va亚洲va香蕉在线| 亚洲男人av| 最新中文字幕久久| 99久久精品国产导航| 中国a一片一级一片| 欧美成人免费一级人片100| 日韩电影不卡一区| 欧美成人乱码一二三四区免费| 亚洲激情一二三区| 青青久在线视频免费观看| 国产欧美日韩丝袜精品一区| 91精品成人| 香蕉网在线播放| 91精品欧美久久久久久动漫 | 国产精品精品久久久| 亚洲精品va| 美女100%无挡| 精品国产伦一区二区三区观看方式 | 国产精品久久久一本精品 | 久久久精品一区| 久久99国产精一区二区三区| 99精品999|