defect-to-guard - Turn recurring defect classes into guarded invariants
Turns a recurring defect class into a costed guard proposal, then supports approved implementation without shipping the guard in the fix PR.
Tags
Updated: 2026-10-06Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Classify recurring defect classes
- Check existing guard coverage
- Prefer SSOT completeness checks
- Select the cheapest mechanism
- Show a concrete guard snippet
- Price guard benefits and costs
- Name the guard home
- Identify inert-feature risks
- Specify behavior-driving smoke tests
- Write repo-local line lints
- Dogfood lints against real trees
- Track guard rent and false reds
- Require baseline paydown PRs
Inputs
- Fixed defect
- Defect class
- Repository source tree
- Existing guard definitions
- Single source of truth
- Pull request context
- Defect frequency
- Escaping defect cost
- Guard catch fraction
- Check latency
- False-positive cost
- Guard maintenance cost
Outputs
- Costed Proposed guards entry
- Guard home declaration
- Concrete guard mechanism snippet
- Approved guard implementation
- Behavior-driving smoke test
- Repo-local checks/*.py lint
- Separate baseline paydown PR
Requirements
- Repository and pull request access
- Human approval for implementation
- CI environment for selected guard
- Real source tree for dogfooding
