跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

goat-qa

Use when evaluating test coverage gaps, planning test strategy, or assessing testing risk for code changes.

blundergoat · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add blundergoat/goat-flow --skill goat-qa

技能说明


name: goat-qa description: "Use when evaluating test coverage gaps, planning test strategy, or assessing testing risk for code changes." goat-flow-skill-version: "1.16.0"

/goat-qa

Shared Conventions

Read .goat-flow/skill-docs/skill-preamble.md before starting. On full-depth, also read .goat-flow/skill-docs/skill-conventions.md.

When to Use

goat-qa maps changed code or a codebase area to coverage and prioritized must/should/skip guidance. It neither writes nor runs tests.

Boundary Commands

  • NEVER: Run or write tests, verify fixes, review code, or certify merges.
  • ALWAYS: Map code risk to tests read; return tiers with Verification Integrity.
  • DEFER TO: Direct test execution, /goat-debug, /goat-review, /goat-plan, or the dispatcher.
ExcuseReality
"CI is green so coverage is fine"Scanner scored 100% while preflight failed with 8 errors. CI tests what was thought of; gap analysis looks for what wasn't.
"Unit tests cover it"Structural tests that import and snapshot pass at high coverage but miss every behavioural edge. STRUCTURAL is not BEHAVIOURAL.

Coverage Depth

LevelMeaning
NONENo current automated assertion or manual plan found for the named behaviour after a bounded search
STRUCTURALImports, constructs, snapshots, or collaborator choreography only - no behaviour assertion
PARTIAL-BEHAVIOURALHappy path or narrow behaviour only; error/edge paths untested
BEHAVIOURALMeaningful output, side-effect, error-path, or invariant coverage

Exhaustive priority matrix

Use this matrix in Standard and Audit modes so every risk/coverage pair lands in exactly one tier:

RiskNONESTRUCTURALPARTIAL-BEHAVIOURALBEHAVIOURAL
CRITICALBlockingBlockingBlockingDefer
HIGHBlockingBlockingHigh-valueDefer
MEDIUMHigh-valueHigh-valueHigh-valueDefer
LOWDeferDeferDeferDefer

Standard maps Blocking to Must test, High-value to Should test, and Defer to Safe to skip. Audit uses the matrix labels directly.

Test Selection Contract

Before assessing a proposed or existing test, read .goat-flow/skill-docs/playbooks/test-selection.md. Apply its four-part value gate: plausible regression, user or business impact, current overlap and why other coverage is insufficient, and a stable observable contract. Priority and disposition are separate: the matrix says when evidence matters; the playbook says what to do with a candidate.

Creation dispositions are ADD UNIT, ADD INTEGRATION, ADD END-TO-END/MANUAL, SKIP, or UNRESOLVED. Existing-test dispositions are KEEP, CONSOLIDATE, MOVE LEVEL, PRUNE CANDIDATE, or UNRESOLVED. Failing the creation gate never authorizes deletion. Unresolved evidence keeps an existing test in place and names the next check. CONSOLIDATE and MOVE LEVEL retain the original until trustworthy replacement coverage passes; PRUNE CANDIDATE explains why no replacement is required.

Mock collaborator call counts, call order, non-calls, and simulated cooperation remain STRUCTURAL unless the interaction is a named public protocol; they earn no integration confidence. Prefer consolidation when nearby cases lack distinct regression stories. Every recommendation carries the playbook's compact record. goat-qa stays report-only: ordinary ACT must re-read current code and coverage before any separately approved add, move, consolidation, or prune action.

Step 0 - Intake

Mode detection - scope wins over vocabulary:

  • Explicit request to preserve a verified fix, prevent regression, or add regression guards → Regression Guard mode
  • Explicit diff, PR, branch, changed-file, or recent-change scope → Standard mode (quick depth), even when the request also says "audit", "coverage", or "gaps"
  • Explicit codebase area, directory, module, or risk-class coverage audit with no recent-change scope → Audit mode (full depth)
  • Bare "audit", "coverage", or "gaps" with no change or area scope → ask whether the user means recent-change Standard or no-diff area Audit

Depth mapping: Regression Guard reads cited evidence plus code/tests; Standard reads changes; Audit reads a no-diff area. Scope semantics outrank dispatcher depth.

Gather: scope, existing test plan (if any), audience. Check instruction Essential Commands or package.json for test/lint commands.

Standard Scope-Size Gate: Count changed files before deep analysis. If too large, rank a load-bearing/interface slice; proceed after confirmation.

Footgun check: Run the preamble's target-area learning-loop retrieval. Emit matches or an explicit miss; never broad-load a bucket.

PR / issue link: benchmark acceptance criteria. With gh, read the PR and diff; otherwise record no-intent-spec, lowering safe to skip confidence.

No existing tests: mark coverage NONE: "No automated tests; verification falls to human and AI reviewers."

CHECKPOINT: Regression Guard: "Mapping [N] invariants against [prior fix evidence / unavailable evidence]." Standard: "Analysing [N] changed files against [existing test plan / no test plan]." Audit: "Auditing [scope] against [existing tests / no tests]." Proceed unless scope, audience, or test plan is ambiguous.

Phase 1 - Change Risk Analysis

Read every changed file. For each, understand WHAT changed and WHY it's risky.

Diff analysis - not just file names. Read the actual diff, not just --stat; one auth line can outrank 200 CSS lines.

Classify each change:

RiskWhat it meansExamples
CRITICALIf this breaks, users are directly affected or security is compromisedAuth logic, payment flow, data mutation, permission checks, API contracts
HIGHBusiness logic or integration that affects correctnessCalculations, state transitions,
阅读完整来源 ↗