mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-03 22:27:45 +00:00
feat: skills - enforce auto-tmux report checklist
This commit is contained in:
@@ -174,6 +174,7 @@ skills/auto-tmux/scripts/auto-tmux.sh record stop -t <session>:<window>.<pane>
|
||||
skills/auto-tmux/scripts/record-summary.sh --dir /tmp/auto-tmux-records --out /tmp/auto-tmux-record-summary.md
|
||||
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
|
||||
```
|
||||
|
||||
**等待 pane 出现完成信号**
|
||||
|
||||
@@ -201,6 +201,7 @@ skills/auto-tmux/scripts/auto-tmux.sh record stop -t "$target"
|
||||
skills/auto-tmux/scripts/record-summary.sh --dir /tmp/auto-tmux-records --out /tmp/auto-tmux-record-summary.md
|
||||
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
|
||||
```
|
||||
|
||||
## AI 蜂群协作建议
|
||||
|
||||
@@ -46,13 +46,14 @@
|
||||
| 38 | `3b10fb6` | 结果摘要导出 | `swarm-results.sh --jsonl` |
|
||||
| 39 | `842cd2d` | JSONL 字段门禁 | `check-jsonl.sh` |
|
||||
| 40 | `2824c06` | JSONL 格式治理 | `jsonl-schema.md` |
|
||||
| 41 | `本轮` | 交付包审计清单 | `review-checklist.sh` |
|
||||
| 41 | `a74be2c` | 交付包审计清单 | `review-checklist.sh` |
|
||||
| 42 | `本轮` | 审计清单结果门禁 | `review-checklist.sh --strict` |
|
||||
|
||||
## 后续候选方向
|
||||
|
||||
| 优先级 | 方向 | 说明 |
|
||||
|:---|:---|:---|
|
||||
| P3 | 审计清单结果门禁 | 检查 report pack 必需文件缺失时输出 WARN/FAIL 摘要 |
|
||||
| P3 | report pack 自检命令 | 为报告包新增一条统一 verify 命令 |
|
||||
|
||||
## 每轮验收清单
|
||||
|
||||
|
||||
@@ -115,6 +115,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
|
||||
|
||||
# 启用当前 shell 的补全
|
||||
source skills/auto-tmux/scripts/completion.bash
|
||||
|
||||
@@ -7,12 +7,13 @@ usage() {
|
||||
review-checklist: render a reviewer checklist for an auto-tmux report pack
|
||||
|
||||
Usage:
|
||||
review-checklist.sh --pack DIR [--out FILE]
|
||||
review-checklist.sh --pack DIR [--out FILE] [--strict]
|
||||
|
||||
Defaults:
|
||||
--out stdout
|
||||
|
||||
This script is read-only for the report pack. It writes only when --out is set.
|
||||
Use --strict to fail when required files are missing.
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -23,6 +24,9 @@ die() {
|
||||
|
||||
pack_dir=""
|
||||
out_file=""
|
||||
strict="0"
|
||||
missing_count=0
|
||||
required_files=(index.md manifest.json board.md deps.md timeline.md blockers.md results.md results.jsonl assign.md export/manifest.json)
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
@@ -34,6 +38,10 @@ while [[ $# -gt 0 ]]; do
|
||||
out_file="${2:-}"
|
||||
shift 2
|
||||
;;
|
||||
--strict)
|
||||
strict="1"
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
@@ -56,6 +64,14 @@ exists_mark() {
|
||||
fi
|
||||
}
|
||||
|
||||
count_missing() {
|
||||
local file
|
||||
missing_count=0
|
||||
for file in "${required_files[@]}"; do
|
||||
[[ -e "$pack_dir/$file" ]] || missing_count=$((missing_count + 1))
|
||||
done
|
||||
}
|
||||
|
||||
render_checklist() {
|
||||
printf '# auto-tmux Report Review Checklist\n\n'
|
||||
printf -- '- pack_dir: `%s`\n' "$pack_dir"
|
||||
@@ -63,10 +79,13 @@ render_checklist() {
|
||||
|
||||
printf '## Required Files\n\n'
|
||||
local file
|
||||
for file in index.md manifest.json board.md deps.md timeline.md blockers.md results.md results.jsonl assign.md export/manifest.json; do
|
||||
for file in "${required_files[@]}"; do
|
||||
printf -- '- [%s] `%s`\n' "$(exists_mark "$file")" "$file"
|
||||
done
|
||||
|
||||
printf '\n## Strict Summary\n\n'
|
||||
printf -- '- missing_required_files: `%s`\n' "$missing_count"
|
||||
|
||||
printf '\n## Review Gates\n\n'
|
||||
printf -- '- [ ] `manifest.json` type is `auto-tmux-swarm-report-pack`.\n'
|
||||
printf -- '- [ ] `results.md` clearly lists DONE/FAIL/BLOCKED worker outcomes.\n'
|
||||
@@ -82,6 +101,8 @@ render_checklist() {
|
||||
printf '```\n'
|
||||
}
|
||||
|
||||
count_missing
|
||||
|
||||
if [[ -n "$out_file" ]]; then
|
||||
mkdir -p "$(dirname "$out_file")"
|
||||
render_checklist > "$out_file"
|
||||
@@ -89,3 +110,7 @@ if [[ -n "$out_file" ]]; then
|
||||
else
|
||||
render_checklist
|
||||
fi
|
||||
|
||||
if [[ "$strict" == "1" && "$missing_count" -gt 0 ]]; then
|
||||
die "strict review failed: missing required files=$missing_count"
|
||||
fi
|
||||
|
||||
@@ -177,7 +177,7 @@ cat > "$out_dir/index.md" <<EOF
|
||||
$(if [[ -n "$attachment_lines" ]]; then printf '%s' "- [attachments.md](./attachments.md)"; fi)
|
||||
EOF
|
||||
|
||||
run_report "review checklist" "$script_dir/review-checklist.sh" --pack "$out_dir" --out "$out_dir/review-checklist.md"
|
||||
run_report "review checklist" "$script_dir/review-checklist.sh" --pack "$out_dir" --out "$out_dir/review-checklist.md" --strict
|
||||
|
||||
rm -f /tmp/auto-tmux-report-pack.log
|
||||
if [[ "$make_tar" == "1" ]]; then
|
||||
|
||||
@@ -186,6 +186,15 @@ run_gate "check-jsonl required keys" bash -c '
|
||||
rm -f "$tmp"
|
||||
' _ "$script_dir/check-jsonl.sh"
|
||||
run_gate "review-checklist help" "$script_dir/review-checklist.sh" --help
|
||||
run_gate "review-checklist strict failure" bash -c '
|
||||
tmp="$(mktemp -d)"
|
||||
if "$1" --pack "$tmp" --strict >/tmp/auto-tmux-review-check.log 2>&1; then
|
||||
rm -rf "$tmp"
|
||||
exit 1
|
||||
fi
|
||||
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 "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
|
||||
|
||||
Reference in New Issue
Block a user