strategic-testing

Decides whether code changes warrant new tests and selects proportionate verification levels.

1.2k|117|Updated Mar 22, 2025
One-click install
npx skills add https://github.com/FranciscoMoretti/sparka --skill strategic-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strategic-testing
Source: https://github.com/FranciscoMoretti/sparka/tree/main/.agents/skills/strategic-testing
Command: npx skills add https://github.com/FranciscoMoretti/sparka --skill strategic-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams often waste effort writing tests for trivial changes or skip tests for behavior that genuinely needs protection. This Skill provides a decision framework for judging when a test adds real value and when existing checks already cover the risk.

Core Features & Use Cases

  • Test Necessity Triage: Evaluates whether a change protects domain invariants, public interfaces, persisted data, security boundaries, or integration seams before recommending a test.
  • Redundant Test Avoidance: Skips tests for mechanical edits, implementation details, and changes already verified by types, linting, or schema validation.
  • Proportionate Test Selection: Chooses the smallest test level (unit, integration, etc.) that still protects the behavior.
  • Use Case: When reviewing a pull request that adds a new API endpoint, use this Skill to decide which behaviors deserve tests and which are already covered by schema validation.

Quick Start

Ask the AI to review your proposed change and decide whether it warrants new tests and at what level.

Frequently Asked Questions about strategic-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide whether to write a test for a code change?

Identify the realistic failure the test would prevent and check whether existing coverage, types, linting, or schema validation already catch it. Add a test only when it protects meaningful behavior or a stable contract that current checks could miss.

What kinds of code changes deserve new tests?

Prioritize tests for domain invariants, important edge cases, public interfaces, persisted data, security boundaries, and integration seams. These areas carry behavior that other verification layers typically cannot protect.

When should I skip writing tests?

Skip tests for mechanical edits, implementation details, and changes already covered by existing tests or verified by the type system, linter, or schema validation. If the failure case is weak, the maintenance cost is not justified.

How do I choose between unit and integration tests?

Choose the smallest test level that still protects the behavior in question. Use a unit test when the risk lives in isolated logic, and move to integration tests only when the behavior spans component or system boundaries.

Can this replace a code coverage tool?

No. Coverage tools measure which lines execute, while this Skill judges whether a test protects meaningful behavior. Use it alongside coverage metrics to avoid chasing percentage targets with low-value tests.