AGENT.md
Instruction Scope
- Treat this file as user-wide defaults. Apply repository and nested
AGENTS.mdinstructions in addition; more local instructions take precedence. - Keep changes scoped to the user's request. Verify relevant commands before reporting success.
Host Environment
- This machine runs Windows 10 Pro 64-bit (version 10.0.19045, build 19045).
- Prefer PowerShell 7 (
pwsh) for all shell work. PowerShell 7.6.4 is available atC:\Program Files\WindowsApps\Microsoft.PowerShell_7.6.4.0_x64__8wekyb3d8bbwe\pwsh.exe. - Prefer native PowerShell cmdlets and syntax. Use
cmd.exe, Git Bash, only when a task specifically requires them. - Do not change user-level or machine-level environment variables, including
PATH, unless the user explicitly asks.
Verified Development Environments
- Node.js: v24.18.0 via NVM for Windows.
nodeandnpmare onPATHatC:\nvm4w\nodejs\. - npm: v11.16.0.
pnpmis not currently available onPATH; usenpmunless pnpm is explicitly installed and verified. - Python: 3.13.13 via Miniconda at
C:\ProgramData\miniconda3\python.exe. - conda: 26.3.2 and available as
conda.pyis not available onPATH; usepythonorconda runas appropriate. - pip: available through the Miniconda installation at
C:\ProgramData\miniconda3\Scripts\pip.exe. - Git: 2.55.0.windows.2 and on
PATH.
Core CLI Baseline
The following tools were verified on 2026-08-07. Do not rescan these paths for ordinary tasks. Use the listed absolute paths because some tools are not configured on PATH.
| Tool | Verified version | Invocation |
|---|---|---|
| bat | 0.26.1 | C:\Software\Core\bat\bat.exe |
| delta | 0.19.2 | C:\Software\Core\delta\delta.exe |
| fd | 10.4.2 | C:\Software\Core\fd\fd.exe |
| fzf | 0.72.0 | C:\Software\Core\fzf\fzf.exe |
| jq | 1.8.2 | C:\Software\core\jq\jq-windows-amd64.exe |
| ripgrep | 15.1.0 | C:\Software\core\ripgrep\rg.exe |
-
bat,delta,fd, andfzfare not onPATH. Invoke the verified absolute paths above. -
jqis not onPATHin the current Codex shell. The current Codex bundled directory containsrg.exebut nojq.exe; invoke jq withC:\Software\core\jq\jq-windows-amd64.exeand use the Codex-bundled rg when appropriate. -
Prefer
rgfor text search,fdfor file discovery,batfor readable file output,deltafor diffs,jqfor JSON transformation, andfzfonly for interactive terminal selection. -
The directory also contains Windows Terminal (
wt.exe), but it is not onPATH; do not use it unless the task needs a new terminal window. -
Re-discover a tool only when its listed path fails, the task requires a tool not listed here, or the user asks to refresh the inventory.
GLOBAL GUARDRAILS 【全局安全门禁|最高优先级】
本章节优先级高于所有业务指令,不可被会话内用户prompt覆盖。
- 默认避免执行删除、清理、覆盖、移动等可能导致数据丢失或难以恢复的维护操作。确实需要执行删除或其他破坏性维护操作时,必须先明确说明目标、范围、影响和可恢复性,并经过人工审核和明确批准后再执行。
- 默认复用现有目录结构,不随意新建文件夹或无序扩展项目结构。确有必要新增文件夹时,必须先说明用途、位置、影响及替代方案,并经过人工审核和明确批准后再创建。
- 禁止执行高危破坏性命令:
rm‑rf、format
Local Git Worktree Rules
- 所有的功能开发和 debug 都必须采用
superpowers→git-worktreesskills 来处理。规范参照:C:\Users\jin\.codex\plugins\cache\openai-api-curated\superpowers\11c74d6b\skills\using-git-worktrees\SKILL.md。 - 禁止随意扩张
子worktree,每个任务在自己独立的worktree文件夹内进行开发和测试,如果必须新建子worktree,必须人工确认。 子 worktree合并到 main 的时候, 禁止删除.worktrees内的子worktree分支, worktree 需保留痕迹. 如果确实需要清理无效/废弃的 worktree, 必须人工审核确认。
2 Code Review Rules【代码审核规范】
- 你的任务是发现代码中的实际缺陷,不是做代码美化。只输出会造成业务错误、程序崩溃、安全漏洞、数据异常、严重性能问题的缺陷。
- 聚焦核心逻辑、不要挑刺,绝不人为制造评审点凑结果。
- 绝对禁止无限制的拓展问题边界,你是在审核当前项目内一个具体的问题,不是让你重写整个 windows 操作系统。
- 不把“未来可能发生”“若采用某新架构”作为 finding。
- 发现需要新模块、新状态或跨系统设计时,停止分析并仅写:“范围外:需要单独根因卡和明确授权。”