feat(dispatch-helpers): G-1 cache 策略 + G-2 一键派单 + G-3 派单规范
G-1 cache 策略(docs/superpowers/dispatch-helpers/cache-strategy.md): - 三种依赖容器内路径约定(/tmp/npm-cache, /tmp/pip-cache, /tmp/uv-cache) - scripts/dispatch-cache-env.sh 注入 prompt 头部 - 给 xstudio 内核的 mount ~/.cache 请求文档 G-2 一键派单(scripts/dispatch-with-wait.sh): - 包装 wait-for-task.sh,提供 active 派单 + 同步等待接口 - 验证:超时 → EXIT=1,报告就位 → EXIT=0 G-3 派单规范(docs/superpowers/dispatch-helpers/prompt-protocol.md): - 派单"不要做"硬约束清单(11 条) - 派单"允许做"白名单 - 汇报约定 + host-side wrapper 模板 - 失效场景 + 内核维护者建议 Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
0c9dd5a833
commit
10587153d2
4 files changed
+282
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# dispatch-cache-env.sh — 注入缓存路径约定到 sandbox prompt 头部
|
||||
# 用法:bash scripts/dispatch-cache-env.sh >> /tmp/dispatch-prompt.txt
|
||||
set -euo pipefail
|
||||
|
||||
cat <<'EOF'
|
||||
# ============ Cache 约定(host → sandbox 注入)============
|
||||
# 容器内运行时,以下路径已配置好缓存(容器销毁即丢):
|
||||
export npm_config_cache=/tmp/npm-cache
|
||||
export PIP_CACHE_DIR=/tmp/pip-cache
|
||||
export UV_CACHE_DIR=/tmp/uv-cache
|
||||
# PGlite 数据存 .pglite/(已 .gitignore)
|
||||
# 后端构建不引 src/backend/dist(dev 模式用 ts-node-dev)
|
||||
# 前端构建不引 src/frontend/dist(dev 模式用 vite dev)
|
||||
# ===============================================
|
||||
EOF
|
||||
Reference in new issue
Block a user