docs: generalize skill-template references + add TESTING.md

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-10 10:00:44 +08:00
parent f3f59278b4
commit f0032b2201
9 changed files with 368 additions and 122 deletions

View File

@@ -33,6 +33,17 @@
{...}/{skill_slug}.db
```
## 测试时的运行时隔离
本模板的 `tests/_support.IsolatedDataRoot` 会在测试期间同时设置:
- `CLAW_DATA_ROOT` / `JIANGCHANG_DATA_ROOT` → 临时 tempfile 目录
- `CLAW_USER_ID` / `JIANGCHANG_USER_ID``_test`
退出时四个变量恢复,临时目录删除。所有 DB / 文件写入都被限制在临时目录内,不污染本机。
详见 `references/TESTING.md` 第 3 节。
## 编码与输出
- Windows 终端建议在 `scripts/main.py` 里做 UTF-8 stdout/stderr 包装