test-patterns

Designs risk-led testing strategies and reviews existing test suites for rebalancing.

Updated Jun 14, 2026
One-click install
npx skills add https://github.com/AdamKrysztopa/architectural-decisions --skill test-patterns-adamkrysztopa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-patterns
Source: https://github.com/AdamKrysztopa/architectural-decisions/tree/main/skills/test-patterns
Command: npx skills add https://github.com/AdamKrysztopa/architectural-decisions --skill test-patterns-adamkrysztopa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams routinely over-invest in slow E2E suites, under-test critical boundaries, or accept generated tests with no trustworthy oracle. This Skill derives a testing strategy from named risks and evidence costs instead of shape dogma, and audits existing suites to find the single highest-leverage fix. ## Core Features & Use Cases - Greenfield strategy interview: Walks a gated decision tree across quality practices, unit/integration/contract/E2E levels, and stochastic evaluation to produce an evidence portfolio with costs and reopening signals, persisted as a decision file. - Existing suite review: Inspects real test code and CI configuration, classifies tests by resources touched rather than directory names, and recommends exactly one highest-leverage rebalancing move — including a plain "no change justified" verdict when warranted. - Oracle independence gate: Evaluates generated, recorded, or snapshotted tests against an independent-oracle checklist to reject coverage theatre. - Use Case: Ask "why is CI slow and still missing bugs?" and receive a dated review report classifying your suite, naming misplaced evidence, and proposing one concrete move such as replacing mocked persistence tests with real-database boundary tests. ## Quick Start Ask the agent to review my test suite and recommend the highest-leverage rebalancing move.

Frequently Asked Questions about test-patterns

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

FAQPage Schema
How do I decide between unit, integration, and E2E tests?

Name the concrete failure each test must catch, then pick the cheapest evidence that reliably exposes it. Escalate to broader layers only when a named failure cannot be detected at a cheaper boundary, and record the cost of every layer chosen.

How do I review a slow or flaky test suite?

Read the actual test code and CI configuration, classifying tests by the resources they touch rather than directory names. Then identify missing, duplicated, or misplaced evidence and recommend one highest-leverage rebalancing move instead of a rewrite.

When should I use contract tests instead of E2E tests?

Use contract tests when producer and consumer deploy independently and interface drift is a real risk. If both sides ship together in one deployable, a shared type or narrow integration test is cheaper and equally truthful.

Can generated tests from AI tools be trusted?

Only when the expected behavior comes from a source independent of the implementation, such as a specification, invariant, or human-reviewed example. Tests whose expected outputs were inferred from the code under test are coverage theatre and should be rejected or strengthened.

How do I test an LLM or agent-based system?

Split the system: test the deterministic scaffold (tool dispatch, parsing, retries, guardrails) with ordinary assertions, and evaluate semantic quality against curated cases and metrics. Treat an LLM judge as a measuring instrument requiring calibration against human-labelled examples.

When is it valid to conclude a test suite needs no changes?

When inspection shows the evidence is proportionate to the named risks, the review records the existing portfolio, the gates deliberately not opened, and their reopening signals. A clean bill of health is a complete outcome, not a failure to find work.