docs: add OpenClaw runtime env variable rules to USER and AGENTS

This commit is contained in:
aitest
2026-03-07 10:37:26 +09:00
parent 847d81c0cd
commit f7c6e6f673
2 changed files with 14 additions and 0 deletions

View File

@@ -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.

11
USER.md
View File

@@ -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 "柏方"