feat: skills - expand auto-tmux prompt tooling

This commit is contained in:
tukuaiai
2026-05-19 02:37:16 +08:00
parent 3efbaf91a7
commit 643fd1b8e5
13 changed files with 441 additions and 2 deletions
+11
View File
@@ -6,6 +6,7 @@
- [`auto-tmux.sh`](./auto-tmux.sh) - 统一命令入口,支持拓扑、读取、发送、巡检、救援、录制、等待和 AI 工作台初始化。
- [`swarm-state.sh`](./swarm-state.sh) - 蜂群状态、任务、锁和报告管理。
- [`render-swarm-prompt.sh`](./render-swarm-prompt.sh) - commander、worker、reviewer 提示词渲染。
- [`auto-tmux-smoke-test.sh`](./auto-tmux-smoke-test.sh) - 创建临时 tmux 会话,端到端验证脚本能力。
## 常用命令
@@ -17,6 +18,9 @@ skills/auto-tmux/scripts/auto-tmux.sh help
# 查看 tmux 拓扑
skills/auto-tmux/scripts/auto-tmux.sh topology
# 诊断环境
skills/auto-tmux/scripts/auto-tmux.sh doctor --session ai-hub
target="$(tmux list-panes -t ai-hub:worker1 -F '#S:#I.#P' | head -n 1)"
# 读取指定 pane 最近 80 行
@@ -28,6 +32,9 @@ skills/auto-tmux/scripts/auto-tmux.sh send -t "$target" --text "make test" --ent
# 扫描某个 session 的错误
skills/auto-tmux/scripts/auto-tmux.sh scan --session ai-hub --pattern "ERROR|Traceback"
# 受控广播,先 dry-run
skills/auto-tmux/scripts/auto-tmux.sh broadcast --session ai-hub --text "pwd" --enter --dry-run
# 生成证据快照
skills/auto-tmux/scripts/auto-tmux.sh snapshot --session ai-hub --dir /tmp/auto-tmux-snapshot
@@ -38,6 +45,9 @@ skills/auto-tmux/scripts/swarm-state.sh report --dir /tmp/ai_swarm
# 端到端自测
skills/auto-tmux/scripts/auto-tmux-smoke-test.sh
# 渲染 worker prompt
skills/auto-tmux/scripts/render-swarm-prompt.sh worker --target "$target" --task "只运行 make test"
```
## 安全约束
@@ -46,4 +56,5 @@ skills/auto-tmux/scripts/auto-tmux-smoke-test.sh
- `send` 会先打印目标 pane 最近上下文,再发送按键。
- 危险命令默认拒绝,必须显式 `--force`
- 批量操作必须使用明确的 session/window/pane 目标。
- 批量广播必须先 `--dry-run`,确认目标列表后再真实发送。
- 多 worker 协作时用 `swarm-state.sh lock-acquire` 声明文件、目录或服务锁。