AGENT SKILL

测试规范

当在 super-agent-v3 中编写、审查或修复测试,选择验证命令,或处理 guard/test 失败时使用。

使用场景测试与质量
License 许可
Apache-2.0
最近更新
2026-10-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
测试规范
aliases
[ "@测试规范", "@testing" ]
description
当在 super-agent-v3 中编写、审查或修复测试,选择验证命令,或处理 guard/test 失败时使用。

03 SKILL.md 正文

super-agent-v3 测试规范

基本原则

  • fix 类改动先锁 bug,再修复;测试、fixture、golden、snapshot 或可执行验收脚本必须能防回归。
  • Go 文件改完先跑单文件守卫:./scripts/test_with_guard.sh <file.go>。
  • 不用旧项目命令:没有独立后端子模块,不用其他仓库的子目录测试命令、旧守卫入口或旧提交门禁。
  • 禁止静默兜底测试:缺字段、错误配置、异常状态应断言 fail-fast。

验证矩阵

改动面 最低验证
Go 单文件 ./scripts/test_with_guard.sh <file.go>
Go 包 ./scripts/test_with_guard.sh <affected packages> -count=1
guard/archtest ./scripts/test_with_guard.sh ./internal/archtest -count=1 或 make guard
frontend-app cd frontend-app && npm run lint && npm test && npm run build
SQL/store make sqlc-verify
codemap make codemap-check
docs/skills-only python3 scripts/validate_super_agent_skills.py + git diff --check;涉及 provider mirror 时还要检查 canonical 与 mirror 一致

测试质量

  1. 优先真实边界:MCP/CLI/HTTP/DB/provider 能用真实进程或 contract harness 时不要只测 mock。
  2. 表驱动测试要覆盖成功、失败、空值、权限、状态迁移和幂等。
  3. 新增 helper 只服务测试可读性,不要为测试污染生产 API。
  4. baseline 或 guard diff 必须逐项解释;不要用 freeze 或调低阈值过关。

报告

最终报告写清楚:

  • RED 证据或为什么不可自然 RED。
  • GREEN 命令和退出状态。
  • 未跑命令及原因。
  • unrelated dirty 文件是否保持未触碰。

04 同仓库更多 Skills

lihah111222333-cloud
lihah111222333-cloud/Super-Dolphin-Agent-Cockpit

mcp-lsp-project-config

配置、安装、检查、修复或迁移项目级 mcp-lsp stdio MCP,覆盖 Codex、Claude Code 和 Google Antigravity,以及 Windows 原生、WSL 原生和 Windows 宿主通过 wsl.exe 桥接 Linux sidecar 的自动选型。用户提到项目 MCP、LSP MCP、.codex/config.toml、.mcp.json、.agents/mcp_config.json、Codex 中 LSP 工具有时直接暴露有时只在延迟工具目录、ALL_TOOLS 过滤为空、工具已显示但调用报 client is closing、EOF、Transport closed,或希望三个客户端共用仓库内 mcp-lsp 时使用。

Skill与智能体开发
★ 0
lihah111222333-cloud
lihah111222333-cloud/Super-Dolphin-Agent-Cockpit

注释规范

当在 super-agent-v3 中编写或审查 Go 函数级中文注释、React hooks/service/controller 注释,或处理注释守卫失败时使用。

★ 0
lihah111222333-cloud
lihah111222333-cloud/Super-Dolphin-Agent-Cockpit

字段守卫

当新增、删除、重命名或跨层传递结构化字段,以及修改 DTO、mapper、schema、API/RPC、事件、配置、store、序列化或前后端契约时自动使用;追踪生产源到全部消费端并建立 fail-fast 字段守卫。

后端与接口
★ 0
lihah111222333-cloud
lihah111222333-cloud/Super-Dolphin-Agent-Cockpit

后端

在 super-agent-v3 中编写、审查或重构 Go 后端代码时使用。

后端与接口Skill与智能体开发
★ 0
lihah111222333-cloud
lihah111222333-cloud/Super-Dolphin-Agent-Cockpit

前端

当在 super-agent-v3 中开发、审查或修复当前 React/Vite 前端 UI 时使用;前端源码只在 frontend-app。

前端开发
★ 0
lihah111222333-cloud
lihah111222333-cloud/Super-Dolphin-Agent-Cockpit

全量项目地图生成

当在 super-agent-v3 中生成、更新或校验 docs/doc/codemap 项目地图、AI index 或能力清单时使用。

★ 0