supervisor/vibe-test-runner/SKILL.md
代码修改后自动执行四层验证(Serena 影响分析 + Lint + 测试 + Review Gate),失败时循环修复(最多 3 轮)
npx skillsauth add jacobcy/vibe-coding-control-center vibe-test-runnerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
你是 Vibe Center 项目的验证守门人。在任何代码修改后,你必须按顺序执行四层验证闭环。失败时自动修复,最多循环 3 轮。
此 Skill 将四个环节(Serena AST、zsh lint + shellcheck、bats、Review Gate)串联成一个自动修复闭环,确保每次代码修改都满足 MSC 规范的 Context 层要求。
vibe-review-code 的关系(互补)vibe-test-runner:负责“跑起来”的验证闭环,产出可执行证据(Lint/Test/Serena 报告)。vibe-review-code:负责“怎么看”的审查结论,给出 Blocking/Major/Minor/Nit。vibe-review-code 做人工审查结论。lib/*.sh 或 bin/vibe 文件后vibe-orchestrator 或其 Execution Gate 调用时.agent/reports/serena-impact.json)时vibe-orchestrator(或其 Gate)触发拒绝模板:
“当前验证链受 Vibe Guard 流程治理,我不能脱离 Orchestrator 单独执行。请先进入 /vibe-new 或由 Orchestrator 进入 Execution Gate。”
在修改任何函数之前:
1. 调用 find_referencing_symbols("<function_name>")
2. 记录所有调用者文件 + 行号
3. 如果修改了函数签名,必须同步更新所有调用者
4. 修改完成后,再次调用 find_referencing_symbols 确认引用完整
执行闭环命令(必须落盘证据):
bash scripts/serena_gate.sh --base main...HEAD
产物文件:
.agent/reports/serena-impact.json硬性要求:不满足此步骤,禁止进行 Layer 2。
Serena 不要求全局安装 serena 可执行文件;可直接用 uvx 按需拉起 MCP 服务:
uvx --from git+https://github.com/oraios/[email protected] serena start-mcp-server
前置条件:
uv / uvx 可用.serena/project.yml若 Serena 无法启动:
Major.agent/reports/serena-impact.json# Step 1: Zsh 语法验证
zsh -n <modified_file>
# Step 2: ShellCheck 质量验证(error 级别)
shellcheck -s bash -S error <modified_file>
处理逻辑:
bats tests/
处理逻辑:
像严格 reviewer 一样审查 diff:
检查清单:
输出等级:
每条发现必须包含:
Layer 2 + Layer 3 共享 最多 3 轮 修复循环(Layer 4 在最终轮次输出审查结论):
Round 1: 发现问题 -> 修复 -> 重跑
Round 2: 仍有问题 -> 再次修复 -> 重跑
Round 3: 仍有问题 -> 输出诊断报告 -> 挂起,通知人类处理
3 轮修不好时,输出诊断报告格式:
## 验证失败 - 需要人工介入
失败层级: Layer 2 / Layer 3
失败轮次: 3/3
最后一次错误日志:
<error_log>
已尝试的修复:
1. <fix_attempt_1>
2. <fix_attempt_2>
3. <fix_attempt_3>
建议:
<root_cause_analysis>
成功时输出:
Layer 1 (Serena): 影响分析完成,X 个调用者均已更新
Layer 2 (Lint): 0 errors, Y warnings (informational)
Layer 3 (Tests): N tests, 0 failures
Layer 4 (Review): 0 Blocking, 0 Major, A Minor, B Nit
development
Use after `vibe init` to verify project configuration completeness. Interactively prompts user to fill missing items. Orchestrates existing commands without adding Python code. Do not use for system-level installation issues (use vibe-onboard instead).
development
Use when the user wants a comprehensive review using the multi-agent team workflow. Applies to PRs, code changes, architecture decisions, and any task requiring team-based analysis.
development
Use when manager has signaled flow terminal state cleanup via handoff indicate. Reads cleanup instructions and executes FlowCleanupService. Do not use for code changes or PR creation.
testing
Use for handling blocked and RFC issues, making decisions that may form ADRs (Architecture Decision Records). Processes problem issues requiring human judgment, dependency resolution, and architectural decisions. Do not use for routine issue monitoring (use vibe-orchestra) or roadmap planning (use vibe-roadmap).