feat: skills - verify auto-tmux report packs

This commit is contained in:
tukuaiai
2026-05-19 14:30:59 +08:00
parent 03980e9fb0
commit 4860192ab6
10 changed files with 76 additions and 6 deletions
+3 -1
View File
@@ -30,6 +30,7 @@ skills/auto-tmux/
│ ├── record-summary.sh
│ ├── check-jsonl.sh
│ ├── review-checklist.sh
│ ├── verify-report-pack.sh
│ ├── completion.bash
│ ├── safety-check.sh
│ ├── render-swarm-prompt.sh
@@ -75,6 +76,7 @@ skills/auto-tmux/
- `scripts/record-summary.sh` 是复盘摘要层,将 pane 录制日志整理为 Markdown。
- `scripts/check-jsonl.sh` 是轻量 JSONL 字段门禁层,不替代完整 JSON parser。
- `scripts/review-checklist.sh` 是报告包审计层,为 reviewer 生成固定检查清单。
- `scripts/verify-report-pack.sh` 是报告包统一验证层,组合 manifest、JSONL 和审计清单门禁。
- `scripts/completion.bash` 是本地补全层,补全 `auto-tmux.sh``swarm-state.sh`
- `scripts/safety-check.sh` 是安全预检层,检查待发送 payload 的危险命令、敏感信息和大小。
- `scripts/render-swarm-prompt.sh` 是提示词渲染层,生成 commander/worker/reviewer 协议文本。
@@ -89,4 +91,4 @@ skills/auto-tmux/
- 上游来源:`tools/external/.tmux``tools/external/tmux`
- 下游使用:`SKILL.md``references/` 中的命令示例。
- 验证入口:`skills/auto-skill/scripts/validate-skill.sh skills/auto-tmux --strict`
- 脚本验证:`skills/auto-tmux/scripts/validate-auto-tmux.sh``bash -n skills/auto-tmux/scripts/auto-tmux.sh``bash -n skills/auto-tmux/scripts/swarm-state.sh``bash -n skills/auto-tmux/scripts/swarm-brief.sh``bash -n skills/auto-tmux/scripts/swarm-watch.sh``bash -n skills/auto-tmux/scripts/swarm-archive.sh``bash -n skills/auto-tmux/scripts/swarm-board.sh``bash -n skills/auto-tmux/scripts/swarm-deps-graph.sh``bash -n skills/auto-tmux/scripts/swarm-export.sh``bash -n skills/auto-tmux/scripts/swarm-timeline.sh``bash -n skills/auto-tmux/scripts/swarm-blockers.sh``bash -n skills/auto-tmux/scripts/swarm-results.sh``bash -n skills/auto-tmux/scripts/swarm-report-pack.sh``bash -n skills/auto-tmux/scripts/swarm-assign.sh``bash -n skills/auto-tmux/scripts/swarm-health.sh``bash -n skills/auto-tmux/scripts/remote-readonly.sh``bash -n skills/auto-tmux/scripts/record-summary.sh``bash -n skills/auto-tmux/scripts/check-jsonl.sh``bash -n skills/auto-tmux/scripts/review-checklist.sh``bash -n skills/auto-tmux/scripts/completion.bash``bash -n skills/auto-tmux/scripts/safety-check.sh``bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh``bash -n skills/auto-tmux/scripts/swarm-dispatch.sh``skills/auto-tmux/scripts/auto-tmux-smoke-test.sh`
- 脚本验证:`skills/auto-tmux/scripts/validate-auto-tmux.sh``bash -n skills/auto-tmux/scripts/auto-tmux.sh``bash -n skills/auto-tmux/scripts/swarm-state.sh``bash -n skills/auto-tmux/scripts/swarm-brief.sh``bash -n skills/auto-tmux/scripts/swarm-watch.sh``bash -n skills/auto-tmux/scripts/swarm-archive.sh``bash -n skills/auto-tmux/scripts/swarm-board.sh``bash -n skills/auto-tmux/scripts/swarm-deps-graph.sh``bash -n skills/auto-tmux/scripts/swarm-export.sh``bash -n skills/auto-tmux/scripts/swarm-timeline.sh``bash -n skills/auto-tmux/scripts/swarm-blockers.sh``bash -n skills/auto-tmux/scripts/swarm-results.sh``bash -n skills/auto-tmux/scripts/swarm-report-pack.sh``bash -n skills/auto-tmux/scripts/swarm-assign.sh``bash -n skills/auto-tmux/scripts/swarm-health.sh``bash -n skills/auto-tmux/scripts/remote-readonly.sh``bash -n skills/auto-tmux/scripts/record-summary.sh``bash -n skills/auto-tmux/scripts/check-jsonl.sh``bash -n skills/auto-tmux/scripts/review-checklist.sh``bash -n skills/auto-tmux/scripts/verify-report-pack.sh``bash -n skills/auto-tmux/scripts/completion.bash``bash -n skills/auto-tmux/scripts/safety-check.sh``bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh``bash -n skills/auto-tmux/scripts/swarm-dispatch.sh``skills/auto-tmux/scripts/auto-tmux-smoke-test.sh`
+1
View File
@@ -37,6 +37,7 @@ bash -n skills/auto-tmux/scripts/remote-readonly.sh
bash -n skills/auto-tmux/scripts/record-summary.sh
bash -n skills/auto-tmux/scripts/check-jsonl.sh
bash -n skills/auto-tmux/scripts/review-checklist.sh
bash -n skills/auto-tmux/scripts/verify-report-pack.sh
bash -n skills/auto-tmux/scripts/completion.bash
bash -n skills/auto-tmux/scripts/safety-check.sh
bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh
+4 -1
View File
@@ -51,6 +51,7 @@ bash -n skills/auto-tmux/scripts/remote-readonly.sh
bash -n skills/auto-tmux/scripts/record-summary.sh
bash -n skills/auto-tmux/scripts/check-jsonl.sh
bash -n skills/auto-tmux/scripts/review-checklist.sh
bash -n skills/auto-tmux/scripts/verify-report-pack.sh
bash -n skills/auto-tmux/scripts/completion.bash
bash -n skills/auto-tmux/scripts/safety-check.sh
bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh
@@ -175,6 +176,7 @@ skills/auto-tmux/scripts/record-summary.sh --dir /tmp/auto-tmux-records --out /t
skills/auto-tmux/scripts/check-jsonl.sh /tmp/ai-swarm-results.jsonl --require-key type --require-key id --require-key status
skills/auto-tmux/scripts/review-checklist.sh --pack /tmp/ai-swarm-report-pack --out /tmp/ai-swarm-report-pack/review-checklist.md
skills/auto-tmux/scripts/review-checklist.sh --pack /tmp/ai-swarm-report-pack --strict
skills/auto-tmux/scripts/verify-report-pack.sh --pack /tmp/ai-swarm-report-pack
```
**等待 pane 出现完成信号**
@@ -307,6 +309,7 @@ skills/auto-tmux/scripts/swarm-dispatch.sh --role worker --target <session>:<win
- `scripts/record-summary.sh`: 汇总 pane 录制日志并生成复盘摘要
- `scripts/check-jsonl.sh`: 轻量检查 JSONL 行和必需字段
- `scripts/review-checklist.sh`: 为 report pack 生成 reviewer 审计清单
- `scripts/verify-report-pack.sh`: 统一验证 report pack 的 manifest、JSONL 和审计清单
- `scripts/completion.bash`: Bash completion,补全 `auto-tmux.sh``swarm-state.sh`
- `scripts/safety-check.sh`: 发送/粘贴/分发前检查危险命令、敏感信息和过大 payload
- `scripts/render-swarm-prompt.sh`: commander/worker/reviewer 提示词渲染脚本
@@ -331,6 +334,6 @@ skills/auto-tmux/scripts/swarm-dispatch.sh --role worker --target <session>:<win
4. ≥3 个端到端示例,含输入/步骤/验收。
5. 长文档放在 `references/` 并可导航;无文档堆砌。
6. 不确定项给出验证路径;禁止虚构 tmux 行为。
7. `bash -n skills/auto-tmux/scripts/auto-tmux.sh``bash -n skills/auto-tmux/scripts/swarm-state.sh``bash -n skills/auto-tmux/scripts/swarm-brief.sh``bash -n skills/auto-tmux/scripts/swarm-watch.sh``bash -n skills/auto-tmux/scripts/swarm-archive.sh``bash -n skills/auto-tmux/scripts/swarm-board.sh``bash -n skills/auto-tmux/scripts/swarm-deps-graph.sh``bash -n skills/auto-tmux/scripts/swarm-export.sh``bash -n skills/auto-tmux/scripts/swarm-timeline.sh``bash -n skills/auto-tmux/scripts/swarm-blockers.sh``bash -n skills/auto-tmux/scripts/swarm-results.sh``bash -n skills/auto-tmux/scripts/swarm-report-pack.sh``bash -n skills/auto-tmux/scripts/swarm-assign.sh``bash -n skills/auto-tmux/scripts/swarm-health.sh``bash -n skills/auto-tmux/scripts/remote-readonly.sh``bash -n skills/auto-tmux/scripts/record-summary.sh``bash -n skills/auto-tmux/scripts/check-jsonl.sh``bash -n skills/auto-tmux/scripts/review-checklist.sh``bash -n skills/auto-tmux/scripts/completion.bash``bash -n skills/auto-tmux/scripts/safety-check.sh``bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh``bash -n skills/auto-tmux/scripts/swarm-dispatch.sh``bash -n skills/auto-tmux/scripts/validate-auto-tmux.sh` 通过。
7. `bash -n skills/auto-tmux/scripts/auto-tmux.sh``bash -n skills/auto-tmux/scripts/swarm-state.sh``bash -n skills/auto-tmux/scripts/swarm-brief.sh``bash -n skills/auto-tmux/scripts/swarm-watch.sh``bash -n skills/auto-tmux/scripts/swarm-archive.sh``bash -n skills/auto-tmux/scripts/swarm-board.sh``bash -n skills/auto-tmux/scripts/swarm-deps-graph.sh``bash -n skills/auto-tmux/scripts/swarm-export.sh``bash -n skills/auto-tmux/scripts/swarm-timeline.sh``bash -n skills/auto-tmux/scripts/swarm-blockers.sh``bash -n skills/auto-tmux/scripts/swarm-results.sh``bash -n skills/auto-tmux/scripts/swarm-report-pack.sh``bash -n skills/auto-tmux/scripts/swarm-assign.sh``bash -n skills/auto-tmux/scripts/swarm-health.sh``bash -n skills/auto-tmux/scripts/remote-readonly.sh``bash -n skills/auto-tmux/scripts/record-summary.sh``bash -n skills/auto-tmux/scripts/check-jsonl.sh``bash -n skills/auto-tmux/scripts/review-checklist.sh``bash -n skills/auto-tmux/scripts/verify-report-pack.sh``bash -n skills/auto-tmux/scripts/completion.bash``bash -n skills/auto-tmux/scripts/safety-check.sh``bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh``bash -n skills/auto-tmux/scripts/swarm-dispatch.sh``bash -n skills/auto-tmux/scripts/validate-auto-tmux.sh` 通过。
8. `skills/auto-tmux/scripts/auto-tmux-smoke-test.sh` 通过或在无 tmux 环境下明确跳过。
9. 运行 `skills/auto-tmux/scripts/validate-auto-tmux.sh``skills/auto-skill/scripts/validate-skill.sh skills/auto-tmux --strict` 通过。
@@ -47,6 +47,7 @@
| `record-summary.sh` | 汇总 pane 录制日志 | 只读,输出默认脱敏 |
| `check-jsonl.sh` | 轻量检查 JSONL 行和必需字段 | 无 jq 依赖,不替代完整 JSON parser |
| `review-checklist.sh` | 为 report pack 生成 reviewer 审计清单 | 只读报告包目录 |
| `verify-report-pack.sh` | 统一验证 report pack | 组合 manifest、JSONL 和审计清单门禁 |
| `completion.bash` | Bash 子命令和常用参数补全 | 只定义 shell completion |
| `swarm-dispatch.sh` | 渲染并可选下发提示词 | 默认只写文件,发送需 `--send` |
| `validate-auto-tmux.sh` | 执行技能专属质量门禁 | 覆盖脚本、文档索引、strict 和 smoke |
@@ -202,6 +203,7 @@ skills/auto-tmux/scripts/record-summary.sh --dir /tmp/auto-tmux-records --out /t
skills/auto-tmux/scripts/check-jsonl.sh /tmp/ai-swarm-results.jsonl --require-key type --require-key id --require-key status
skills/auto-tmux/scripts/review-checklist.sh --pack /tmp/ai-swarm-report-pack --out /tmp/ai-swarm-report-pack/review-checklist.md
skills/auto-tmux/scripts/review-checklist.sh --pack /tmp/ai-swarm-report-pack --strict
skills/auto-tmux/scripts/verify-report-pack.sh --pack /tmp/ai-swarm-report-pack
```
## AI 蜂群协作建议
@@ -295,6 +297,7 @@ bash -n skills/auto-tmux/scripts/remote-readonly.sh
bash -n skills/auto-tmux/scripts/record-summary.sh
bash -n skills/auto-tmux/scripts/check-jsonl.sh
bash -n skills/auto-tmux/scripts/review-checklist.sh
bash -n skills/auto-tmux/scripts/verify-report-pack.sh
bash -n skills/auto-tmux/scripts/completion.bash
bash -n skills/auto-tmux/scripts/safety-check.sh
bash -n skills/auto-tmux/scripts/render-swarm-prompt.sh
@@ -47,13 +47,14 @@
| 39 | `842cd2d` | JSONL 字段门禁 | `check-jsonl.sh` |
| 40 | `2824c06` | JSONL 格式治理 | `jsonl-schema.md` |
| 41 | `a74be2c` | 交付包审计清单 | `review-checklist.sh` |
| 42 | `本轮` | 审计清单结果门禁 | `review-checklist.sh --strict` |
| 42 | `01b4a6f` | 审计清单结果门禁 | `review-checklist.sh --strict` |
| 43 | `本轮` | report pack 自检命令 | `verify-report-pack.sh` |
## 后续候选方向
| 优先级 | 方向 | 说明 |
|:---|:---|:---|
| P3 | report pack 自检命令 | 为报告包新增一条统一 verify 命令 |
| P3 | report pack 自检文档 | 为 reviewer 写最短验收路径 |
## 每轮验收清单
+2
View File
@@ -26,6 +26,7 @@ scripts/
├── record-summary.sh # 汇总 pipe-pane 录制日志
├── check-jsonl.sh # 轻量 JSONL 字段门禁
├── review-checklist.sh # report pack reviewer 审计清单
├── verify-report-pack.sh # report pack 统一验证入口
├── completion.bash # Bash completion
├── safety-check.sh # 发送/粘贴/分发前的 payload 安全预检
├── render-swarm-prompt.sh # commander/worker/reviewer 提示词渲染
@@ -59,6 +60,7 @@ scripts/
- 录制摘要脚本只读 record 日志,输出默认脱敏,不修改日志源文件。
- JSONL 检查脚本只能做轻量字段门禁,不替代完整 JSON parser。
- 审计清单脚本只读报告包目录,不修改报告源文件。
- 报告包验证脚本只组合本目录已有只读门禁,不修改报告包内容。
- completion 文件只能定义 shell completion,不执行 tmux 写操作。
- 安全预检脚本只能读取文本或文件,不控制 tmux,不写状态目录。
- 状态脚本只能写入显式状态目录,不保存密钥、Token、密码或私密项目内容。
+2
View File
@@ -23,6 +23,7 @@
- [`record-summary.sh`](./record-summary.sh) - 汇总 `record start` 产生的 pane 日志,生成复盘摘要。
- [`check-jsonl.sh`](./check-jsonl.sh) - 轻量检查 JSONL 行和必需字段。
- [`review-checklist.sh`](./review-checklist.sh) - 为 report pack 生成 reviewer 审计清单。
- [`verify-report-pack.sh`](./verify-report-pack.sh) - 统一验证 report pack 的 manifest、JSONL 和审计清单。
- [`completion.bash`](./completion.bash) - Bash completion,补全 `auto-tmux.sh``swarm-state.sh` 子命令。
- [`safety-check.sh`](./safety-check.sh) - 发送、粘贴或分发前检查危险命令、敏感信息和过大 payload。
- [`render-swarm-prompt.sh`](./render-swarm-prompt.sh) - commander、worker、reviewer 提示词渲染。
@@ -116,6 +117,7 @@ skills/auto-tmux/scripts/check-jsonl.sh /tmp/ai-swarm-results.jsonl --require-ke
# 生成 report pack 审计清单
skills/auto-tmux/scripts/review-checklist.sh --pack /tmp/ai-swarm-report-pack --out /tmp/ai-swarm-report-pack/review-checklist.md
skills/auto-tmux/scripts/review-checklist.sh --pack /tmp/ai-swarm-report-pack --strict
skills/auto-tmux/scripts/verify-report-pack.sh --pack /tmp/ai-swarm-report-pack
# 启用当前 shell 的补全
source skills/auto-tmux/scripts/completion.bash
+1 -1
View File
@@ -153,7 +153,7 @@ cmd_doctor() {
status_line "WARN" "tmux server has no reachable session yet"
fi
for script in auto-tmux.sh swarm-state.sh swarm-brief.sh swarm-watch.sh swarm-archive.sh swarm-board.sh swarm-deps-graph.sh swarm-export.sh swarm-timeline.sh swarm-blockers.sh swarm-results.sh swarm-report-pack.sh swarm-assign.sh swarm-health.sh remote-readonly.sh record-summary.sh check-jsonl.sh review-checklist.sh safety-check.sh render-swarm-prompt.sh swarm-dispatch.sh auto-tmux-smoke-test.sh validate-auto-tmux.sh; do
for script in auto-tmux.sh swarm-state.sh swarm-brief.sh swarm-watch.sh swarm-archive.sh swarm-board.sh swarm-deps-graph.sh swarm-export.sh swarm-timeline.sh swarm-blockers.sh swarm-results.sh swarm-report-pack.sh swarm-assign.sh swarm-health.sh remote-readonly.sh record-summary.sh check-jsonl.sh review-checklist.sh verify-report-pack.sh safety-check.sh render-swarm-prompt.sh swarm-dispatch.sh auto-tmux-smoke-test.sh validate-auto-tmux.sh; do
if [[ -x "$script_dir/$script" ]]; then
status_line "OK" "script executable: $script"
else
@@ -116,6 +116,7 @@ scripts=(
"$script_dir/record-summary.sh"
"$script_dir/check-jsonl.sh"
"$script_dir/review-checklist.sh"
"$script_dir/verify-report-pack.sh"
"$script_dir/safety-check.sh"
"$script_dir/render-swarm-prompt.sh"
"$script_dir/swarm-dispatch.sh"
@@ -168,10 +169,11 @@ run_gate "swarm-report-pack attachment" bash -c '
grep -Fq "\"type\": \"auto-tmux-swarm-report-pack\"" "$tmp/out/manifest.json"
grep -Fq "\"attachments\"" "$tmp/out/manifest.json"
grep -Fq "remote-tmux.txt" "$tmp/out/attachments/remote/remote-tmux.txt"
"$2" --pack "$tmp/out" >/dev/null
"$1" --dir "$tmp/swarm" --out "$tmp/out-tar" --attach "$tmp/remote" --tar >/dev/null
test -f "$tmp/out-tar.tar.gz"
rm -rf "$tmp"
' _ "$script_dir/swarm-report-pack.sh"
' _ "$script_dir/swarm-report-pack.sh" "$script_dir/verify-report-pack.sh"
run_gate "swarm-assign help" "$script_dir/swarm-assign.sh" --help
run_gate "swarm-health help" "$script_dir/swarm-health.sh" --help
run_gate "remote-readonly help" "$script_dir/remote-readonly.sh" --help
@@ -195,6 +197,7 @@ run_gate "review-checklist strict failure" bash -c '
grep -Fq "missing required files" /tmp/auto-tmux-review-check.log
rm -rf "$tmp" /tmp/auto-tmux-review-check.log
' _ "$script_dir/review-checklist.sh"
run_gate "verify-report-pack help" "$script_dir/verify-report-pack.sh" --help
run_gate "safety-check help" "$script_dir/safety-check.sh" --help
run_gate "safety-check clean text" "$script_dir/safety-check.sh" --text "make test"
if "$script_dir/safety-check.sh" --text "rm -rf /tmp/example" >/tmp/auto-tmux-validate-gate.log 2>&1; then
@@ -222,6 +225,7 @@ require_contains "$skill_dir/SKILL.md" "scripts/remote-readonly.sh"
require_contains "$skill_dir/SKILL.md" "scripts/record-summary.sh"
require_contains "$skill_dir/SKILL.md" "scripts/check-jsonl.sh"
require_contains "$skill_dir/SKILL.md" "scripts/review-checklist.sh"
require_contains "$skill_dir/SKILL.md" "scripts/verify-report-pack.sh"
require_contains "$skill_dir/SKILL.md" "scripts/completion.bash"
require_contains "$skill_dir/SKILL.md" "scripts/safety-check.sh"
require_contains "$skill_dir/SKILL.md" "scripts/swarm-dispatch.sh"
@@ -256,6 +260,7 @@ require_contains "$script_dir/README.md" "metadata.jsonl"
require_contains "$script_dir/README.md" "record-summary.sh"
require_contains "$script_dir/README.md" "check-jsonl.sh"
require_contains "$script_dir/README.md" "review-checklist.sh"
require_contains "$script_dir/README.md" "verify-report-pack.sh"
require_contains "$script_dir/README.md" "completion.bash"
require_contains "$script_dir/README.md" "safety-check.sh"
require_contains "$script_dir/AGENTS.md" "validate-auto-tmux.sh"
@@ -275,6 +280,7 @@ require_contains "$script_dir/AGENTS.md" "remote-readonly.sh"
require_contains "$script_dir/AGENTS.md" "record-summary.sh"
require_contains "$script_dir/AGENTS.md" "check-jsonl.sh"
require_contains "$script_dir/AGENTS.md" "review-checklist.sh"
require_contains "$script_dir/AGENTS.md" "verify-report-pack.sh"
require_contains "$script_dir/AGENTS.md" "completion.bash"
require_contains "$script_dir/AGENTS.md" "safety-check.sh"
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# verify-report-pack: verify an auto-tmux report pack with local gates.
set -euo pipefail
usage() {
cat <<'EOF'
verify-report-pack: verify an auto-tmux report pack
Usage:
verify-report-pack.sh --pack DIR
Checks:
- required report pack files via review-checklist --strict
- root manifest type
- results.jsonl required fields
EOF
}
die() {
printf 'error: %s\n' "$*" >&2
exit 1
}
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pack_dir=""
while [[ $# -gt 0 ]]; do
case "$1" in
--pack)
pack_dir="${2:-}"
shift 2
;;
-h|--help)
usage
exit 0
;;
*)
die "unknown option: $1"
;;
esac
done
[[ -n "$pack_dir" ]] || die "missing --pack"
[[ -d "$pack_dir" ]] || die "pack dir not found: $pack_dir"
"$script_dir/review-checklist.sh" --pack "$pack_dir" --strict >/dev/null
grep -Fq '"type": "auto-tmux-swarm-report-pack"' "$pack_dir/manifest.json" || die "invalid manifest type"
"$script_dir/check-jsonl.sh" "$pack_dir/results.jsonl" --require-key type --require-key id --require-key status >/dev/null
printf 'report pack ok: %s\n' "$pack_dir"