consolidate-test-suites
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "consolidate-test-suites" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-302e22332e93b29a67fc2491bf8f97cd932b43e612433837b1eed7c26a5336ed. Verify the upstream source and version against https://github.com/instructa/agent-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Tool to determine ownership of persistent test coverage and to remove temporary test probes. Used when testing bug fixes or architecture changes, or before finishing work that added tests, fixtures, snapshots, diagnostics, or temporary assertions: select an ownership level, reuse standard test suites, merge unique signals, and remove task-created probe remnants without disrupting existing work.
Introduction source: third_party · instructa · 0.0.1 Reference
SkillPi interpretation
- Tasks
- 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.
- Inputs and outputs
- 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>
- Testing
- Not tested
Browse files
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:
- Add to an existing test in an existing file in the owning layer.
- Add a new test to an existing canonical file in the owning layer.
- Create a new file inside the existing canonical suite in the owning layer.
- 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:
- 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.
- 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.
- 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.
- 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:
- Search for tests that assert the same invariant.
- Keep the strongest owned location.
- Merge any unique assertions into that location.
- Delete or simplify weaker duplicates.
- 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:
- Run the narrowest relevant test target first.
- Run required typecheck, build, or lint steps for touched code.
- 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>
Version history
-
v1.0.0
GitHub ↗
Original release notes
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`
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的测试套件整合方法论
- 适用于测试优化和架构变更场景
- 具有明确的实用价值和操作指导
Highlights
- 触发词精准完整,覆盖多种使用场景
- 边界清晰,不易误触或漏触
Highlights
- 结构完整,逻辑清晰
- 包含详细的执行流程和决策规则
- 文档组织良好,易于理解
Areas to improve
-
缺少具体工具调用示例 Reported severity: Minor
文档提供了详细的规则和流程,但缺少具体的工具调用示例和错误处理代码
Recommendation: 建议添加具体的工具调用示例和错误处理代码,以提高执行可靠性
Highlights
- 提供了详细的规则和决策流程
- 覆盖了主要异常情况
- 有明确的验证步骤
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.