From f7c6e6f673769dcc5bb3c8ef2b89704ffc1bd0de Mon Sep 17 00:00:00 2001 From: aitest Date: Sat, 7 Mar 2026 10:37:26 +0900 Subject: [PATCH] docs: add OpenClaw runtime env variable rules to USER and AGENTS --- AGENTS.md | 3 +++ USER.md | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index a87cf94..76e046c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,6 +17,9 @@ Before doing anything else: 5. Always remember runtime separation at session start: - System Node is managed by nvm, but OpenClaw/skills use dedicated Node in `F:/openclaw-runtime` and are not affected by nvm switching. - System Python is managed by pyenv-win, but OpenClaw uses its own dedicated Python environment and is not affected by pyenv switching. + - Execution priority in OpenClaw context is: `OPENCLAW_NODE`/`OPENCLAW_PYTHON` > OpenClaw runtime/config > system `PATH`/nvm/pyenv. + - `F:/npm-global` must be in user `PATH` for global npm executables (like `openclaw.cmd`). + - `F:/npm-cache` is cache-only and should not be added to `PATH`. Don't ask permission. Just do it. diff --git a/USER.md b/USER.md index 46441fc..af0170c 100644 --- a/USER.md +++ b/USER.md @@ -6,6 +6,17 @@ - **Timezone:** Asia/Tokyo - **Notes:** Prefers task plans before execution, wants alternative options considered; at the start of each new session, first account for OpenClaw runtime separation (nvm/pyenv-win do not affect OpenClaw runtime). +## Environment Variable Rules (OpenClaw Runtime) + +- System `node` is managed by **nvm**; system `python` is managed by **pyenv-win**. +- OpenClaw and skills use dedicated runtime under `F:/openclaw-runtime` and are isolated from nvm/pyenv switching. +- Priority when executing skills/CLI in OpenClaw context: + 1. `OPENCLAW_NODE` / `OPENCLAW_PYTHON` + 2. OpenClaw config/runtime wiring + 3. System `PATH` / nvm / pyenv +- `F:/npm-global` should be included in user `PATH` for global npm executables (e.g., `openclaw.cmd`). +- `F:/npm-cache` is npm cache only and should **not** be added to `PATH`. + ## Context - Works via DingTalk group chat "柏方"