consolidate-test-suites

确定持久性测试覆盖率归属并清理临时测试探针的工具。用于在修复测试相关缺陷或进行架构变更时,或在完成添加测试、测试夹具、快照、诊断信息或临时断言的工作之前,选择所属层级、复用标准测试套件、合并独有信号并移除任务遗留的探针残留,同时避免干扰现有工作流。

仓库最近推送
GitHub Stars
141
Forks
17
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "consolidate-test-suites":https://skillpi.com/zh/skills/deepskill-302e22332e93b29a67fc2491bf8f97cd932b43e612433837b1eed7c26a5336ed。安装前核对上游来源和版本:https://github.com/instructa/agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

确定持久性测试覆盖率归属并清理临时测试探针的工具。用于在修复测试相关缺陷或进行架构变更时,或在完成添加测试、测试夹具、快照、诊断信息或临时断言的工作之前,选择所属层级、复用标准测试套件、合并独有信号并移除任务遗留的探针残留,同时避免干扰现有工作流。

0 下载

介绍来源: third_party · instructa · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: consolidate-test-suites
description: Decide where durable test coverage belongs and clean up temporary test probes. Use while testing a bug fix or architectural change, or before finishing work that added tests, fixtures, snapshots, diagnostics, or temporary assertions. Select one owning layer, reuse canonical suites, merge unique signal, and remove task-created probe residue without disturbing pre-existing work.

Consolidate Test Suites

Purpose: place each invariant in one owning test layer only.

Definitions:

  • Invariant: the rule that must stay true.
  • Owning layer: the lowest layer that truly owns and can prove that rule.
  • Canonical suite: the normal existing suite for that owning layer.
  • Probe: temporary test code, fixture, script, snapshot, diagnostic, assertion, instrumentation, or helper created to investigate or reproduce one task.

Default: reuse an existing canonical suite. Do not create a new standalone regression test unless the exception rule below allows it.

Probes are useful working material, not permanent coverage by default. Before finishing, classify every probe created for the current task as PROMOTE, MERGE, or DROP.

Hard Rules

  • You MUST identify the invariant before adding or moving any test.
  • You MUST identify one primary owning layer: unit, integration, or end-to-end.
  • You MUST first try to place coverage in an existing canonical suite for that layer.
  • You MUST prefer editing an existing test file over creating a new test file.
  • You MUST NOT add the same invariant in multiple layers unless each layer covers a different failure mode. If you keep more than one layer, name the distinct failure mode for each.
  • You MUST NOT add tests that lock in implementation details unless that implementation unit itself owns the invariant.
  • You MUST NOT create a standalone regression test because it is faster or easier.
  • If you cannot name the invariant and the owning layer, STOP. Report that placement is not justified.
  • You MUST remove current-task probes that are not promoted or merged, including temporary code inserted into a permanent test or production file.
  • You MUST preserve tests and dirty changes that predate the current task. Never delete or rewrite them merely to reduce test count.
  • If the request is review-only, report probe dispositions and cleanup recommendations without modifying files.

Required Decision Order

Choose the first option that fits:

  1. Add to an existing test in an existing file in the owning layer.
  2. Add a new test to an existing canonical file in the owning layer.
  3. Create a new file inside the existing canonical suite in the owning layer.
  4. Create a standalone regression-style test only if the Exception Rule passes.

Owning Layer Rules

Choose unit when:

  • one module owns the rule, and
  • the bug reproduces without I/O, transport, persistence, retries, IPC, orchestration, or lifecycle coupling.

Choose integration when:

  • the rule lives at a boundary between components, or
  • the bug depends on serialization, persistence, ordering, replay, retries, IPC, process lifecycle, or multi-component coordination.

Choose end-to-end only when:

  • the user-visible contract cannot be trusted from lower-layer tests alone.

Tie-breakers:

  • If torn between unit and integration, choose integration.
  • Never choose end-to-end to compensate for uncertainty.
  • Never choose a higher layer just because it is easier to reproduce there.

Exception Rule for Standalone Regression Tests

A standalone regression-style test is allowed only if ALL are true:

  • no existing canonical suite can express the case cleanly
  • the reproduction is deterministic
  • the case has durable incident or contract value
  • adding it to the canonical suite would make that suite less clear

If any condition is false, fold the coverage into the canonical suite.

Probe Lifecycle

Use temporary probes when they materially help reproduce, diagnose, or falsify a suspected bug. Keep their lifecycle lightweight:

  1. Before editing tests, inspect the existing test-related status and diff so pre-existing work is distinguishable from task-created probes. Keep this baseline in the working context; do not create tracking files for it.
  2. Once the behavior is accepted, compare each task-created probe with the nearest canonical suite and choose exactly one disposition:
    • PROMOTE: keep the smallest version because it protects a unique durable invariant at the stable owning boundary.
    • MERGE: move only its unique signal into an existing canonical test, then remove the redundant probe.
    • DROP: remove it because it is diagnostic-only, redundant, speculative, implementation-coupled, flaky, slow, or low-value.
  3. Parameterize or extend an existing behavior test when several examples prove the same invariant. Test count and coverage percentage are not reasons to keep another test.
  4. Remove every unpromoted task-created probe before final verification. If its ownership is uncertain, preserve it and report the uncertainty instead of guessing that it is safe to delete.

Promote a probe only when it is deterministic, protects an accepted observable contract, would catch a meaningful regression, adds signal not already owned elsewhere, and has maintenance cost proportional to its risk. When cheap and safe, confirm that the proposed test fails against the faulty behavior and passes against the fix; do not build extra infrastructure merely to produce that proof.

Duplicate Cleanup

After placing coverage:

  1. Search for tests that assert the same invariant.
  2. Keep the strongest owned location.
  3. Merge any unique assertions into that location.
  4. Delete or simplify weaker duplicates.
  5. Rename tests by behavior and owner, not by ticket number or bug history.

Delete or rewrite pre-existing tests only when the task includes suite consolidation and duplicate coverage has been demonstrated. Routine bug-fix work may clean up only the probes it created.

Verification

Before finishing:

  1. Run the narrowest relevant test target first.
  2. Run required typecheck, build, or lint steps for touched code.
  3. Report exactly what was run and whether it passed.

Default Output Format

Use this format by default:

Invariant: <rule that failed>

Owning layer: <unit | integration | end-to-end>

Target suite/file: <path or suite name>

Action: <reuse existing test | add to existing suite | create file in canonical suite | keep standalone regression>

Why this layer owns it: <one short paragraph>

Duplicates to merge/delete: <list or "none">

Current-task probes: <PROMOTE / MERGE / DROP for each, or "none">

Probe cleanup completed: <removed paths or inline code, or "none">

Verification run: <commands and result>

Residual risk: <what is still not covered, if anything>

版本历史

  1. v1.0.0 GitHub ↗
    原版更新说明

    First Agent Plugins v1 release of `regenrek.agentic-engineer-core`. - portable root `plugin.json` - six fully validated Agent Skills - provider compilation verified for Codex, Claude Code, and Cursor - no legacy `.plugin/plugin.json` or `x-agentrig` metadata Bundle SHA-256: `eae83ad0d813ec89bf4e2bb0128c8e7cb09c888e54d1ef661bd184147b884664`

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值72/100

亮点

  • 提供完整的测试套件整合方法论
  • 适用于测试优化和架构变更场景
  • 具有明确的实用价值和操作指导
触发精准92/100

亮点

  • 触发词精准完整,覆盖多种使用场景
  • 边界清晰,不易误触或漏触
结构规范95/100

亮点

  • 结构完整,逻辑清晰
  • 包含详细的执行流程和决策规则
  • 文档组织良好,易于理解
执行可靠78/100

待提升项

  • 缺少具体工具调用示例 原报告严重程度:轻微

    文档提供了详细的规则和流程,但缺少具体的工具调用示例和错误处理代码

    改进建议:建议添加具体的工具调用示例和错误处理代码,以提高执行可靠性

亮点

  • 提供了详细的规则和决策流程
  • 覆盖了主要异常情况
  • 有明确的验证步骤
证据可验 (前四项均值)84/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。