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 & Development Environment
- This machine runs Windows 10 Pro 64-bit (version 10.0.19045, build 19045).
- Prefer PowerShell 7 (
pwsh) and native PowerShell syntax for all shell work. Usecmd.exeor Git Bash only when the task requires them. - Do not change user-level or machine-level environment variables, including
PATH, unless the user explicitly asks.
| Tool | Version | Location / Usage |
|---|---|---|
| Node.js | 24.18.0 | NVM for Windows; node and npm are on PATH at C:\nvm4w\nodejs\ |
| npm | 11.16.0 | On PATH; prefer npm because pnpm is unavailable |
| Python | 3.13.13 | C:\ProgramData\miniconda3\python.exe |
| conda | 26.3.2 | On PATH |
| pip | — | C:\ProgramData\miniconda3\Scripts\pip.exe |
| Git | 2.55.0.windows.2 | On PATH |
pyis unavailable; usepythonorconda runas appropriate.pnpmis not currently available onPATH; use it only after it is explicitly installed and verified.
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 |
| OpenSSH | Windows OpenSSH | C:\Windows\System32\OpenSSH\ssh.exe |
- If not on
PATH. 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. - For SSH connections to remote servers, invoke
C:\Windows\System32\OpenSSH\ssh.exeexplicitly, including key-based connections; do not rely on an ambiguousssh.exeresolved fromPATH. - 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覆盖。
- Routine task authorization does not imply approval for destructive actions. Before actions risking data loss or difficult reversal, state the target, scope, impact, and recovery options, and obtain explicit user approval.
- For actions requiring approval, ask only if approval is missing or the target, scope, or risk has changed.
- Assess risk by an action's actual effects, regardless of the command or tool used. Before destructive or otherwise high-impact actions, explain the target, scope, impact, and recovery options, and obtain explicit user approval.
- Never auto-run high-risk commands:
rm -rf,format,dd,mkfs.
Independent Judgment
- Pause and state doubts if essential information is unverifiable; do not act on guesses.
- Independently evaluate all user input against facts and objectives; never presume correctness. For ambiguous content, no guesses or unilateral decisions; request human review.
- Pre-requisite necessity check: Determine whether action is required first. Do not assume action is needed by default.
- If required: provide a solution.
- If not required: briefly explain why no action is needed, then stop.
Project Organization
- Reuse existing directories where practical. When creating new directories, follow the project's existing organization and keep their purposes, naming, and file placement clear and consistent.
Git Worktree Guardrails
- Use applicable
jinprosperworkflows for feature development and bug fixes. Use thejinprosper-worktreeskill for worktree management; this section's reuse and approval rules take precedence. - Prefer reusing an existing worktree suitable for the current work. Before creating a new one, explain why existing worktrees are unsuitable and obtain explicit user approval.
- After merging into
main, keep the worktree and its branch. Obtain explicit user approval before removing either. - For read-only queries blocked by Git's
dubious ownershipcheck, you may usegit -c safe.directory="<exact absolute repository or worktree path>" <read-only subcommand>. The setting applies only to that command.
Code Review Guardrails
- Report only defects supported by clear evidence that cause incorrect business behavior, crashes, security vulnerabilities, data anomalies, or severe performance problems. Exclude purely stylistic, formatting, or personal-preference issues.
- For each finding, identify the location, triggering conditions, actual impact, and supporting evidence (code, call paths, or validation results). Do not report unverified speculation as findings.
- Base findings on current code and actual usage scenarios. Report defects with clear triggering conditions even if they have not occurred. Exclude issues that depend solely on hypothetical architectures or unplanned requirements.
- Within the agreed scope, systematically review relevant call paths and key edge cases. Report all confirmed defects found during the review together. Do not add findings merely to increase their count or automatically expand the review scope. If no defects are confirmed, state that explicitly.
- Record out-of-scope issues separately using existing evidence; do not automatically expand investigation or implement fixes. Use
jinprosper-plain-talkto explain:- Issue: what is known and why it is outside the current scope.
- Recommendation: the proposed approach, expected scope of impact, and acceptance criteria. Explicitly mark anything not yet determined.
常用提示词
- For PowerShell commands, prefer launching the exact PowerShell 7 executable through
cmd.exe /c:C:\Users\jin\.cache\codex-runtimes\codex-primary-runtime\dependencies\native\powershell\pwsh.exe. - Do not resolve or invoke
pwsh.exethroughPATH; use only the exact executable path above for these tasks.
Plugin
什么是 Plugin
Plugin = 一个可安装的分发包,里面可以装:
- Skills(工作流说明书)
- MCP 配置(给模型挂新工具)
- Connector 声明(连外部系统的授权入口)
- Hooks(生命周期钩子)
- 元数据(名字、版本、描述、图标等)
常用命令
PS C:\Users\jin> codex plugin list
PS C:\Users\jin> codex plugin remove jinprosper@personal
PS C:\Users\jin> codex plugin add jinprosper@personal
PS C:\Users\jin> codex plugin list
开发Plugin规范参考
- Registered personal plugin directory:
C:\Users\jin\.agents\plugins\jinprosper, registered byC:\Users\jin\.agents\plugins\marketplace.json. This is the local plugin installation/source selected by the personal marketplace. - Current Codex session cache:
C:\Users\jin\.codex\plugins\cache\personal\jinprosper\0.1.0. This is a materialized runtime snapshot; it is not the canonical development source or the registered plugin directory. A session may continue using stale content until the cache/plugin is refreshed. - Deployment test copy:
C:\Users\jin\plugins\jinprosper. This is only the destination used byscripts\sync-to-deployment.ps1; it is not the personal marketplace registration and must not be edited by hand.
Program Language
Rust
Windows 上最推荐、最通用的 Rust 工具链
安装
rustup toolchain install stable-x86_64-pc-windows-msvc --force --profile default --component rustfmt,clippy
rustup default stable-x86_64-pc-windows-msvc
验证
rustc --version
cargo --version
rustup show active-toolchain
rustup component list --toolchain stable-x86_64-pc-windows-msvc