Portabilize hardcoded C:\Users\bowei paths across skill docs
Replace machine-specific C:\Users\bowei\... paths in 7 skill docs with %USERPROFILE% / $env:USERPROFILE (or $USERPROFILE in Git Bash blocks). Conda paths use a two-layout resolver (miniconda3\envs vs .conda\envs) or reference ~\skills_env.md CONDA_LANGGRAPH_PYTHON, since the conda location is machine-specific. Fixes paths that resolved wrong on non-bowei machines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -164,7 +164,7 @@ sign-extended and require no bit-width guess. When using hex columns, pass
|
|||||||
## Skill Script Location
|
## Skill Script Location
|
||||||
|
|
||||||
```
|
```
|
||||||
C:\Users\bowei\.claude\skills\fft-analyse\scripts\fft_analyse.py
|
%USERPROFILE%\.claude\skills\fft-analyse\scripts\fft_analyse.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Always use the **absolute path** when invoking from any working directory.
|
Always use the **absolute path** when invoking from any working directory.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ description: >
|
|||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
conda run -n langgraph python `
|
conda run -n langgraph python `
|
||||||
"C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
"$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
||||||
start --input-dir "E:\<proj>\Notes" --output-dir "E:\<proj>\fpga_runs"
|
start --input-dir "E:\<proj>\Notes" --output-dir "E:\<proj>\fpga_runs"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -41,10 +41,10 @@ conda run -n langgraph python `
|
|||||||
| Item | Value |
|
| Item | Value |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Root | `E:\LangGraph_Design\fpga-goldenref-flow` |
|
| Root | `E:\LangGraph_Design\fpga-goldenref-flow` |
|
||||||
| Conda env | `langgraph` (`C:\Users\bowei\.conda\envs\langgraph`) |
|
| Conda env | `langgraph` (path 见 `~\skills_env.md` 的 `CONDA_LANGGRAPH_PYTHON`) |
|
||||||
| Graph name | `fpga_goldenref_flow` (在 `langgraph.json` 里声明;进程内驱动直接 `build_graph()`) |
|
| Graph name | `fpga_goldenref_flow` (在 `langgraph.json` 里声明;进程内驱动直接 `build_graph()`) |
|
||||||
| Default input dir | `Notes/` (contains PR00.md, Task00.md) |
|
| Default input dir | `Notes/` (contains PR00.md, Task00.md) |
|
||||||
| Helper script | `C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py` |
|
| Helper script | `%USERPROFILE%\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py` |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ conda run -n langgraph python `
|
|||||||
Run the helper script using the `langgraph` conda environment:
|
Run the helper script using the `langgraph` conda environment:
|
||||||
```powershell
|
```powershell
|
||||||
conda run -n langgraph python `
|
conda run -n langgraph python `
|
||||||
"C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
"$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
||||||
start `
|
start `
|
||||||
--input-dir "E:\<project-path>\Notes" `
|
--input-dir "E:\<project-path>\Notes" `
|
||||||
--output-dir "E:\<project-path>\fpga_runs"
|
--output-dir "E:\<project-path>\fpga_runs"
|
||||||
@@ -100,7 +100,7 @@ Ask the user which model (use AskUserQuestion), offering **Opus 4.8 (default/rec
|
|||||||
**Fable 5**, **Sonnet 4.6**. Then resume with the choice:
|
**Fable 5**, **Sonnet 4.6**. Then resume with the choice:
|
||||||
```powershell
|
```powershell
|
||||||
conda run -n langgraph python `
|
conda run -n langgraph python `
|
||||||
"C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
"$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
||||||
resume --output-dir "E:\<project-path>\fpga_runs" `
|
resume --output-dir "E:\<project-path>\fpga_runs" `
|
||||||
--plan-model opus # or: fable | sonnet | a full id like claude-opus-4-8
|
--plan-model opus # or: fable | sonnet | a full id like claude-opus-4-8
|
||||||
```
|
```
|
||||||
@@ -137,7 +137,7 @@ Wait for the user's answer before proceeding to Step 3.
|
|||||||
**If the user approves:**
|
**If the user approves:**
|
||||||
```powershell
|
```powershell
|
||||||
conda run -n langgraph python `
|
conda run -n langgraph python `
|
||||||
"C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
"$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
||||||
resume --output-dir "E:\<project-path>\fpga_runs"
|
resume --output-dir "E:\<project-path>\fpga_runs"
|
||||||
```
|
```
|
||||||
(Default behaviour is approved — no extra flag needed.)
|
(Default behaviour is approved — no extra flag needed.)
|
||||||
@@ -145,7 +145,7 @@ conda run -n langgraph python `
|
|||||||
**If the user rejects:**
|
**If the user rejects:**
|
||||||
```powershell
|
```powershell
|
||||||
conda run -n langgraph python `
|
conda run -n langgraph python `
|
||||||
"C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
"$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
||||||
resume --output-dir "E:\<project-path>\fpga_runs" `
|
resume --output-dir "E:\<project-path>\fpga_runs" `
|
||||||
--rejected --feedback "<user feedback verbatim>"
|
--rejected --feedback "<user feedback verbatim>"
|
||||||
```
|
```
|
||||||
@@ -161,7 +161,7 @@ exit code 2 again with new plans — repeat Step 2.
|
|||||||
> 额度被占满,工作流已停在断点(状态已存 SQLite,不降级)。等 codex 空出来后从断点续跑:
|
> 额度被占满,工作流已停在断点(状态已存 SQLite,不降级)。等 codex 空出来后从断点续跑:
|
||||||
> ```powershell
|
> ```powershell
|
||||||
> conda run -n langgraph python `
|
> conda run -n langgraph python `
|
||||||
> "C:\Users\bowei\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
> "$env:USERPROFILE\.claude\skills\fpga-goldenref-flow\scripts\run_fpga_local.py" `
|
||||||
> continue --output-dir "E:\<project-path>\fpga_runs"
|
> continue --output-dir "E:\<project-path>\fpga_runs"
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ file, so `start`/`resume` survive across separate process calls.
|
|||||||
| Item | Value |
|
| Item | Value |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Project root | `E:\LangGraph_Design\FPGA-imx6-flow` |
|
| Project root | `E:\LangGraph_Design\FPGA-imx6-flow` |
|
||||||
| Conda env | `langgraph` (`C:\Users\bowei\.conda\envs\langgraph`) |
|
| Conda env | `langgraph` (path 见 `~\skills_env.md` 的 `CONDA_LANGGRAPH_PYTHON`) |
|
||||||
| Graph | `app.main_graph:build_graph` (in-process; no langgraph dev) |
|
| Graph | `app.main_graph:build_graph` (in-process; no langgraph dev) |
|
||||||
| Driver | `C:\Users\bowei\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py` |
|
| Driver | `%USERPROFILE%\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py` |
|
||||||
| Checkpoint | `<project>\runs\skill_checkpoint.sqlite` (keyed by `--thread-id`) |
|
| Checkpoint | `<project>\runs\skill_checkpoint.sqlite` (keyed by `--thread-id`) |
|
||||||
| Design source | `Notes/fpga-imx6-flow.excalidraw`, plan `Notes/Task00.md` |
|
| Design source | `Notes/fpga-imx6-flow.excalidraw`, plan `Notes/Task00.md` |
|
||||||
|
|
||||||
@@ -72,8 +72,8 @@ USB-Blast 处于连接状态时给板卡上电或断电(保护 JTAG 适配器
|
|||||||
> `conda run --no-capture-output`. The driver also re-configures its stdout to UTF-8.
|
> `conda run --no-capture-output`. The driver also re-configures its stdout to UTF-8.
|
||||||
|
|
||||||
```
|
```
|
||||||
PY = C:\Users\bowei\.conda\envs\langgraph\python.exe
|
PY = <CONDA_LANGGRAPH_PYTHON — see ~\skills_env.md>
|
||||||
RUN = C:\Users\bowei\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py
|
RUN = %USERPROFILE%\.claude\skills\fpga-imx6-flow\scripts\run_imx6_flow.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 0 — Confirm the environment (REQUIRED before driving)
|
## Step 0 — Confirm the environment (REQUIRED before driving)
|
||||||
@@ -83,8 +83,8 @@ Verify it before starting, so a missing env surfaces as a clear instruction rath
|
|||||||
than a cryptic import error mid-run:
|
than a cryptic import error mid-run:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$py = "C:\Users\bowei\.conda\envs\langgraph\python.exe"
|
$py = @("$env:USERPROFILE\miniconda3\envs\langgraph\python.exe","$env:USERPROFILE\.conda\envs\langgraph\python.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1
|
||||||
if (-not (Test-Path $py)) { Write-Host "[MISSING] langgraph env" } else {
|
if (-not $py) { Write-Host "[MISSING] langgraph env" } else {
|
||||||
& $py -c "import langgraph; from langgraph.checkpoint.sqlite import SqliteSaver; from langgraph.types import Command; print('[OK] langgraph + checkpoint-sqlite')"
|
& $py -c "import langgraph; from langgraph.checkpoint.sqlite import SqliteSaver; from langgraph.types import Command; print('[OK] langgraph + checkpoint-sqlite')"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
+5
-5
@@ -24,7 +24,7 @@ Claude 在执行前需先确认脚本的完整路径。使用 Glob 工具查找
|
|||||||
```
|
```
|
||||||
C:/Users/<当前用户>/.claude/skills/fpga_flash/scripts/gen_mcs.py
|
C:/Users/<当前用户>/.claude/skills/fpga_flash/scripts/gen_mcs.py
|
||||||
```
|
```
|
||||||
或直接使用默认路径:`C:/Users/bowei/.claude/skills/fpga_flash/scripts/`
|
或直接使用默认路径:`%USERPROFILE%/.claude/skills/fpga_flash/scripts/`
|
||||||
|
|
||||||
**scripts/ 目录内容:**
|
**scripts/ 目录内容:**
|
||||||
```
|
```
|
||||||
@@ -38,7 +38,7 @@ scripts/
|
|||||||
|
|
||||||
**调用方式(Bash 工具):**
|
**调用方式(Bash 工具):**
|
||||||
```bash
|
```bash
|
||||||
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/<script>.py" [参数...]
|
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/<script>.py" [参数...]
|
||||||
```
|
```
|
||||||
|
|
||||||
各脚本通过命令行参数接受变量(Vivado 安装目录、工程名、bit 文件路径、mcs 文件路径等),内部调用 Vivado `-mode batch -source <tcl模板> -tclargs <参数>` 完成执行,全程不产生临时文件。
|
各脚本通过命令行参数接受变量(Vivado 安装目录、工程名、bit 文件路径、mcs 文件路径等),内部调用 Vivado `-mode batch -source <tcl模板> -tclargs <参数>` 完成执行,全程不产生临时文件。
|
||||||
@@ -52,7 +52,7 @@ python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/<script>.py" [参数...
|
|||||||
调用 `check_flash_csv.py`,检查 `xicom_cfgmem_part_table.csv` 中是否已包含 `w25q128bv-spi-x1_x2_x4`:
|
调用 `check_flash_csv.py`,检查 `xicom_cfgmem_part_table.csv` 中是否已包含 `w25q128bv-spi-x1_x2_x4`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/check_flash_csv.py" \
|
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/check_flash_csv.py" \
|
||||||
--vivado-dir "D:/Xilinx/Vivado/2018.1"
|
--vivado-dir "D:/Xilinx/Vivado/2018.1"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/check_flash_csv.py" \
|
|||||||
用户确认后,**Claude 自动调用**:
|
用户确认后,**Claude 自动调用**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/gen_mcs.py" \
|
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/gen_mcs.py" \
|
||||||
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
|
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
|
||||||
--bit-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_top.bit" \
|
--bit-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_top.bit" \
|
||||||
--mcs-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_smod.mcs"
|
--mcs-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_smod.mcs"
|
||||||
@@ -104,7 +104,7 @@ python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/gen_mcs.py" \
|
|||||||
确认板卡已上电并连接 JTAG 后,**Claude 自动调用**:
|
确认板卡已上电并连接 JTAG 后,**Claude 自动调用**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/program_flash.py" \
|
python "$USERPROFILE/.claude/skills/fpga_flash/scripts/program_flash.py" \
|
||||||
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
|
--vivado-dir "D:/Xilinx/Vivado/2018.1" \
|
||||||
--flash-part "w25q128bv-spi-x1_x2_x4" \
|
--flash-part "w25q128bv-spi-x1_x2_x4" \
|
||||||
--bit-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_top.bit" \
|
--bit-file "E:/Xilinx_design/smod/SMOD_DTMB_CG/RU_golden/RU_golden.runs/impl_1/RU_golden_top.bit" \
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
需要在 `SKILL.md` 中的“执行规范”或相关步骤的命令示例中进行如下调整(在后续实施时可直接修改):
|
需要在 `SKILL.md` 中的“执行规范”或相关步骤的命令示例中进行如下调整(在后续实施时可直接修改):
|
||||||
|
|
||||||
1. **更改执行命令**:将所有示例中的 `python` 更改为 `python.exe`。
|
1. **更改执行命令**:将所有示例中的 `python` 更改为 `python.exe`。
|
||||||
*原版:* `python "C:/Users/bowei/.claude/skills/fpga_flash/scripts/gen_mcs.py" ...`
|
*原版:* `python "%USERPROFILE%/.claude/skills/fpga_flash/scripts/gen_mcs.py" ...`
|
||||||
*修改后:* `python.exe "C:/Users/bowei/.claude/skills/fpga_flash/scripts/gen_mcs.py" ...`
|
*修改后:* `python.exe "%USERPROFILE%/.claude/skills/fpga_flash/scripts/gen_mcs.py" ...`
|
||||||
|
|
||||||
2. **增加跨环境路径转换指令**:在 `SKILL.md` 头部或执行规范中增加一条针对 WSL 环境的强调说明:
|
2. **增加跨环境路径转换指令**:在 `SKILL.md` 头部或执行规范中增加一条针对 WSL 环境的强调说明:
|
||||||
> **【WSL 跨环境执行重点约束】**
|
> **【WSL 跨环境执行重点约束】**
|
||||||
@@ -39,7 +39,7 @@ OpenClaw 对 `SKILL.md` 的支持与 Claude Code 兼容。可以通过以下方
|
|||||||
|
|
||||||
在 WSL 中执行 OpenClaw 的 skill 安装命令,直接指向包含 `SKILL.md` 的目录。例如:
|
在 WSL 中执行 OpenClaw 的 skill 安装命令,直接指向包含 `SKILL.md` 的目录。例如:
|
||||||
```bash
|
```bash
|
||||||
openclaw skills install /mnt/c/Users/bowei/.claude/skills/fpga_flash
|
openclaw skills install /mnt/c/Users/<当前用户>/.claude/skills/fpga_flash
|
||||||
```
|
```
|
||||||
*(注:根据 OpenClaw `skills --help` 的提示,`install` 指令支持本地路径安装。)*
|
*(注:根据 OpenClaw `skills --help` 的提示,`install` 指令支持本地路径安装。)*
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ description: Use the LangGraph plan-review workflow from the current Claude Code
|
|||||||
|
|
||||||
# LangGraph Plan Review Workflow
|
# LangGraph Plan Review Workflow
|
||||||
|
|
||||||
Use this skill to run the LangGraph plan-review workflow. All scripts are bundled under the skill's own `scripts\` directory (`C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\`) — no dependency on `E:\LangGraph_Design\lab00`.
|
Use this skill to run the LangGraph plan-review workflow. All scripts are bundled under the skill's own `scripts\` directory (`%USERPROFILE%\.claude\skills\langgraph-plan-review\scripts\`) — no dependency on `E:\LangGraph_Design\lab00`.
|
||||||
|
|
||||||
## 运行方式:进程内驱动,无 dev server(2026-07 起)
|
## 运行方式:进程内驱动,无 dev server(2026-07 起)
|
||||||
|
|
||||||
@@ -16,8 +16,9 @@ Use this skill to run the LangGraph plan-review workflow. All scripts are bundle
|
|||||||
|
|
||||||
- **入口**:用 `langgraph` conda 环境的 python 跑 `clean_run.py`:
|
- **入口**:用 `langgraph` conda 环境的 python 跑 `clean_run.py`:
|
||||||
```powershell
|
```powershell
|
||||||
$PY = "C:\Users\bowei\.conda\envs\langgraph\python.exe"
|
# CONDA_LANGGRAPH_PYTHON from ~\skills_env.md; resolves either conda layout.
|
||||||
$RUN = "C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\clean_run.py"
|
$PY = @("$env:USERPROFILE\miniconda3\envs\langgraph\python.exe","$env:USERPROFILE\.conda\envs\langgraph\python.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1
|
||||||
|
$RUN = "$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\clean_run.py"
|
||||||
# 首次(到 write_plan 中断):
|
# 首次(到 write_plan 中断):
|
||||||
& $PY $RUN --task-id 10 --work-dir "<work_dir>" --notes-dir Notes --prompt "<原始请求>"
|
& $PY $RUN --task-id 10 --work-dir "<work_dir>" --notes-dir Notes --prompt "<原始请求>"
|
||||||
# resume(写完/改完 Task10.md 后;resume 值 base64(JSON)):
|
# resume(写完/改完 Task10.md 后;resume 值 base64(JSON)):
|
||||||
@@ -61,7 +62,7 @@ conda run -n langgraph langgraph --version
|
|||||||
| `langgraph-sdk` | Python client used by `run_workflow.py` to submit runs |
|
| `langgraph-sdk` | Python client used by `run_workflow.py` to submit runs |
|
||||||
| `httpx` | HTTP health-check in `run_workflow.py` |
|
| `httpx` | HTTP health-check in `run_workflow.py` |
|
||||||
|
|
||||||
**Codex auth** (if not already set up): `C:\Users\bowei\.codex\auth.json` must contain a valid ChatGPT OAuth token. Run `codex auth login` if the file is missing.
|
**Codex auth** (if not already set up): `%USERPROFILE%\.codex\auth.json` must contain a valid ChatGPT OAuth token. Run `codex auth login` if the file is missing.
|
||||||
|
|
||||||
## Invariants
|
## Invariants
|
||||||
|
|
||||||
@@ -72,8 +73,8 @@ conda run -n langgraph langgraph --version
|
|||||||
```powershell
|
```powershell
|
||||||
<resolved conda.exe> run -n langgraph python
|
<resolved conda.exe> run -n langgraph python
|
||||||
```
|
```
|
||||||
- Codex CLI is installed in the `langgraph` conda env as `codex.cmd` at `C:\Users\bowei\.conda\envs\langgraph\codex.cmd`. It must be invoked via `cmd /c` because `.cmd` files are not directly executable by Python subprocess on Windows.
|
- Codex CLI is installed in the `langgraph` conda env as `codex.cmd` (path = the langgraph env from `~\skills_env.md` `CONDA_LANGGRAPH_PYTHON`, with `python.exe` → `codex.cmd`). It must be invoked via `cmd /c` because `.cmd` files are not directly executable by Python subprocess on Windows.
|
||||||
- Codex auth uses ChatGPT OAuth tokens stored in `C:\Users\bowei\.codex\auth.json`. No API key is needed.
|
- Codex auth uses ChatGPT OAuth tokens stored in `%USERPROFILE%\.codex\auth.json`. No API key is needed.
|
||||||
- `run_langgraph.ps1` sets `CODEX_HOME` from `-CodexHome`, existing `CODEX_HOME`, or `<UserProfile>\.codex`.
|
- `run_langgraph.ps1` sets `CODEX_HOME` from `-CodexHome`, existing `CODEX_HOME`, or `<UserProfile>\.codex`.
|
||||||
- **Always use `review_task.py` as the Codex review shim.** Pass it via `--codex-review-command` as a JSON array with no spaces. This shim handles all Windows-specific codex invocation requirements: `cmd /c`, stdin prompt passing, `--skip-git-repo-check`, session resume, and explicit `cwd`.
|
- **Always use `review_task.py` as the Codex review shim.** Pass it via `--codex-review-command` as a JSON array with no spaces. This shim handles all Windows-specific codex invocation requirements: `cmd /c`, stdin prompt passing, `--skip-git-repo-check`, session resume, and explicit `cwd`.
|
||||||
- Keep all workflow files under `<Claude launch work_dir>\Notes` unless the user explicitly overrides `-NotesDir`.
|
- Keep all workflow files under `<Claude launch work_dir>\Notes` unless the user explicitly overrides `-NotesDir`.
|
||||||
@@ -92,13 +93,13 @@ Use `manage_dev_server.ps1` to start it before the first `run_langgraph.ps1` cal
|
|||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Start (idempotent — safe to call even if already running)
|
# Start (idempotent — safe to call even if already running)
|
||||||
C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 start
|
$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 start
|
||||||
|
|
||||||
# Stop (call once when workflow returns {"status":"done"})
|
# Stop (call once when workflow returns {"status":"done"})
|
||||||
C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 stop
|
$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 stop
|
||||||
|
|
||||||
# Status check
|
# Status check
|
||||||
C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 status
|
$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 status
|
||||||
```
|
```
|
||||||
|
|
||||||
- `start` waits up to 45 s for `http://127.0.0.1:2024/ok` to respond, then prints the Studio URL.
|
- `start` waits up to 45 s for `http://127.0.0.1:2024/ok` to respond, then prints the Studio URL.
|
||||||
@@ -116,7 +117,7 @@ C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps
|
|||||||
1. Determine `TaskId` from the user. If missing, ask for it.
|
1. Determine `TaskId` from the user. If missing, ask for it.
|
||||||
2. Start the dev server (idempotent):
|
2. Start the dev server (idempotent):
|
||||||
```powershell
|
```powershell
|
||||||
C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 start
|
$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 start
|
||||||
```
|
```
|
||||||
Wait for the "[dev-server] Ready" line in the output. Then **immediately tell the user** in your text response:
|
Wait for the "[dev-server] Ready" line in the output. Then **immediately tell the user** in your text response:
|
||||||
- that the dev server is running, and
|
- that the dev server is running, and
|
||||||
@@ -127,10 +128,12 @@ C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps
|
|||||||
> https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
|
> https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
|
||||||
3. Start or resume the LangGraph app:
|
3. Start or resume the LangGraph app:
|
||||||
```powershell
|
```powershell
|
||||||
# Use double backslashes (\\) in the JSON string so Windows paths are valid JSON.
|
# Build the JSON array with ConvertTo-Json so Windows backslashes are escaped for you.
|
||||||
# $task_path / $latest_discuss_path / etc. are Python Template placeholders — keep them literal.
|
# $task_path / $latest_discuss_path / etc. are Python Template placeholders — single-quote them literal.
|
||||||
$codexCmd = '["C:\\Users\\bowei\\.conda\\envs\\langgraph\\python.exe","C:\\Users\\bowei\\.claude\\skills\\langgraph-plan-review\\scripts\\review_task.py","$task_path","$latest_discuss_path","$codex_session_id","$work_dir"]'
|
$PY = @("$env:USERPROFILE\miniconda3\envs\langgraph\python.exe","$env:USERPROFILE\.conda\envs\langgraph\python.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1
|
||||||
C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\run_langgraph.ps1 `
|
$review = "$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\review_task.py"
|
||||||
|
$codexCmd = ConvertTo-Json -Compress @($PY,$review,'$task_path','$latest_discuss_path','$codex_session_id','$work_dir')
|
||||||
|
& "$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\run_langgraph.ps1" `
|
||||||
-TaskId <TaskId> `
|
-TaskId <TaskId> `
|
||||||
-Prompt "<original user request>" `
|
-Prompt "<original user request>" `
|
||||||
-CodexReviewCommand $codexCmd `
|
-CodexReviewCommand $codexCmd `
|
||||||
@@ -144,13 +147,13 @@ C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps
|
|||||||
|
|
||||||
**Why `review_task.py`**: Using the shim keeps all codex-specific logic in Python, and the JSON array stays simple.
|
**Why `review_task.py`**: Using the shim keeps all codex-specific logic in Python, and the JSON array stays simple.
|
||||||
|
|
||||||
`run_langgraph.ps1` base64-encodes the JSON command and resume payload before passing them through `conda run`, so normal PowerShell single-quoted JSON can be used. **Windows paths inside the JSON string must use `\\` (double backslash) to produce valid JSON**, e.g. `C:\\Users\\bowei\\...`. `run_langgraph.ps1` automatically sets `PYTHONIOENCODING=utf-8` so prompts containing Unicode (Chinese, etc.) pass through correctly.
|
`run_langgraph.ps1` base64-encodes the JSON command and resume payload before passing them through `conda run`, so normal PowerShell single-quoted JSON can be used. **Windows paths inside the JSON string must use `\\` (double backslash) to produce valid JSON** (`ConvertTo-Json` does this for you), e.g. `%USERPROFILE%\\...`. `run_langgraph.ps1` automatically sets `PYTHONIOENCODING=utf-8` so prompts containing Unicode (Chinese, etc.) pass through correctly.
|
||||||
5. Inspect the command output after each resume.
|
5. Inspect the command output after each resume.
|
||||||
- Check `"status"` to determine next action: `"waiting"` means perform the next `action_required`; `"done"` means the workflow is complete.
|
- Check `"status"` to determine next action: `"waiting"` means perform the next `action_required`; `"done"` means the workflow is complete.
|
||||||
- If a new `latest_discuss_path` is present in the output, read that discuss file for context.
|
- If a new `latest_discuss_path` is present in the output, read that discuss file for context.
|
||||||
6. Stop when the workflow returns `{"status":"done", ...}`:
|
6. Stop when the workflow returns `{"status":"done", ...}`:
|
||||||
```powershell
|
```powershell
|
||||||
C:\Users\bowei\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 stop
|
$env:USERPROFILE\.claude\skills\langgraph-plan-review\scripts\manage_dev_server.ps1 stop
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rejection File Rule
|
## Rejection File Rule
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ Codex CLI 是 OpenAI 发布的命令行代码审查工具,以 npm 全局包形
|
|||||||
在 PowerShell 中运行:
|
在 PowerShell 中运行:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$condaEnvPath = (C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph python -c "import sys; print(sys.prefix)").Trim()
|
$condaEnvPath = (& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n langgraph python -c "import sys; print(sys.prefix)").Trim()
|
||||||
$codexCmd = Join-Path $condaEnvPath "codex.cmd"
|
$codexCmd = Join-Path $condaEnvPath "codex.cmd"
|
||||||
if (Test-Path $codexCmd) {
|
if (Test-Path $codexCmd) {
|
||||||
Write-Host "[OK] Codex CLI 已安装: $codexCmd"
|
Write-Host "[OK] Codex CLI 已安装: $codexCmd"
|
||||||
@@ -176,12 +176,12 @@ if (Test-Path $codexCmd) {
|
|||||||
首先确认 npm 可用(Node.js 需已安装在 conda 环境或系统 PATH 中):
|
首先确认 npm 可用(Node.js 需已安装在 conda 环境或系统 PATH 中):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph npm --version
|
& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n langgraph npm --version
|
||||||
```
|
```
|
||||||
|
|
||||||
- **若 npm 可用**:执行安装:
|
- **若 npm 可用**:执行安装:
|
||||||
```powershell
|
```powershell
|
||||||
C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph npm install -g @openai/codex
|
& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" run -n langgraph npm install -g @openai/codex
|
||||||
```
|
```
|
||||||
安装完成后,再次执行 2c-1 检查 `codex.cmd` 是否出现。若仍不存在,报告错误并停止,请用户手动检查 npm 全局安装路径。
|
安装完成后,再次执行 2c-1 检查 `codex.cmd` 是否出现。若仍不存在,报告错误并停止,请用户手动检查 npm 全局安装路径。
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ C:\Users\bowei\miniconda3\Scripts\conda.exe run -n langgraph npm --version
|
|||||||
### 2c-3. 验证 Codex CLI 可执行
|
### 2c-3. 验证 Codex CLI 可执行
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$env:CODEX_HOME = "C:\Users\bowei\.codex"
|
$env:CODEX_HOME = "$env:USERPROFILE\.codex"
|
||||||
cmd /c "$codexCmd" --version
|
cmd /c "$codexCmd" --version
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ cmd /c "$codexCmd" --version
|
|||||||
|
|
||||||
### 2c-4. 验证 Codex Auth
|
### 2c-4. 验证 Codex Auth
|
||||||
|
|
||||||
Codex CLI 的认证 token 存储在 `$CODEX_HOME\auth.json`(默认 `C:\Users\bowei\.codex\auth.json`)。
|
Codex CLI 的认证 token 存储在 `$CODEX_HOME\auth.json`(默认 `%USERPROFILE%\.codex\auth.json`)。
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$codexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { "$env:USERPROFILE\.codex" }
|
$codexHome = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { "$env:USERPROFILE\.codex" }
|
||||||
@@ -226,7 +226,7 @@ if (Test-Path $authFile) {
|
|||||||
|
|
||||||
- **若 `$authOk = $true`**:继续进入 Step 3。
|
- **若 `$authOk = $true`**:继续进入 Step 3。
|
||||||
- **若 `$authOk = $false`**:停止并提示:
|
- **若 `$authOk = $false`**:停止并提示:
|
||||||
> "Codex CLI 尚未完成认证,或认证已失效。请在终端运行 `codex` 并按提示完成 ChatGPT OAuth 登录,登录成功后 auth.json 将自动写入 `C:\Users\bowei\.codex\`。完成后重新触发本技能或手动继续到 Step 3。"
|
> "Codex CLI 尚未完成认证,或认证已失效。请在终端运行 `codex` 并按提示完成 ChatGPT OAuth 登录,登录成功后 auth.json 将自动写入 `%USERPROFILE%\.codex\`。完成后重新触发本技能或手动继续到 Step 3。"
|
||||||
|
|
||||||
**在用户确认认证完成之前,不继续后续步骤。**
|
**在用户确认认证完成之前,不继续后续步骤。**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user