autospec-test

Enforce unit and E2E coverage gates on autospec pull requests.

3|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/berlinguyinca/autospec --skill autospec-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autospec-test
Source: https://github.com/berlinguyinca/autospec/tree/main/skills/autospec-test
Command: npx skills add https://github.com/berlinguyinca/autospec --skill autospec-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yq, jq, node, playwright, sqlite3, gh, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

This Skill prevents broken or under-tested changes from being merged by enforcing unit and E2E coverage gates, then auto-healing gaps with a bounded self-heal loop that blocks assertion-loosening rewrites.

Core Features & Use Cases

  • Phase 4 PR Test Gate: Runs unit tests and coverage thresholds, then runs E2E tests, UI element coverage, and behavior taxonomy coverage before auto-merge.
  • Self-Heal Loop: Automatically fixes missing or failing tests (and some product-bug-caused failures) within a configured time/iteration budget.
  • Assertion-Shift Guardrail: Blocks auto-merge when tests are loosened and only allows shifting changes when justified and co-edited with non-test sources.
  • Contract-Driven Safety & Isolation: Refuses to run unless forbidden URL patterns are configured (fail-closed) and supports strict isolation and optional scoped production mode.
  • Optional Stage 2.5 Invariants: When enabled in the contract, adds higher-signal invariant checks for UI affordances, UI/API window symmetry, interactive affordability, and contract symmetry.

Quick Start

Run autospec-test against a specific PR branch by calling /autospec-test with the PR number you want to validate.

Frequently Asked Questions about autospec-test

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

FAQPage Schema
How do I enforce unit and E2E coverage gates on pull requests before auto-merge?

To enforce unit and E2E coverage gates on pull requests, use a test validation tool that runs isolated unit tests and Playwright E2E tests sequentially, blocking auto-merge until coverage thresholds, UI element touch, and behavior taxonomy requirements are met.

Can I automatically fix failing Playwright tests without loosening assertion guardrails?

Yes, a bounded self-heal loop can automatically repair missing or failing Playwright tests and product gaps within a configured time budget. An assertion-shift guardrail strictly blocks auto-merge when tests are loosened, only allowing changes co-edited with non-test sources.

How does contract-driven testing handle forbidden URL patterns for CI quality?

Contract-driven testing enforces CI quality by operating fail-closed, strictly refusing to run unless forbidden URL patterns are configured. This ensures test isolation and safe execution during automated pull request validation.

Do I need to configure forbidden URLs before running contract-driven E2E tests?

Yes, you must configure forbidden URL patterns before running contract-driven E2E tests. The test runner applies a strict fail-closed policy and will refuse execution without this safety configuration to ensure isolated testing.

What is an assertion-shift guardrail in automated E2E testing?

An assertion-shift guardrail in automated E2E testing is a safety mechanism that blocks auto-merge when test assertions are loosened. It only permits assertion shifting when changes are explicitly justified and co-edited with non-test source code.

How do I validate a specific PR branch with Playwright and unit test coverage gates?

To validate a specific PR branch with Playwright and unit test coverage gates, call the test runner against the target PR number. It will execute sequential unit-then-E2E gating, evaluate UI element coverage, and apply an optional bounded self-heal loop in an isolated environment.