# Hardening

Hardens LifeOS tests via property-based testing with fast-check.

- Repository: https://github.com/danielmiessler/LifeOS (19669 stars)
- Category: Design
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add danielmiessler/LifeOS --skill Hardening -g -a claude-code -y`
Codex: `npx skills add danielmiessler/LifeOS --skill Hardening -g -a codex -y`
Cursor: `npx skills add danielmiessler/LifeOS --skill Hardening -g -a cursor -y`
Gemini CLI: `npx skills add danielmiessler/LifeOS --skill Hardening -g -a gemini-cli -y`

## Description

Hardens LifeOS tests via property-based testing with fast-check. USE WHEN harden, hardening, property test, property based testing, PBT, fast-check, strengthen tests, find bugs example tests miss, universal quantified claim, shrink counterexample, what bugs am I missing, test the tests. NOT FOR new feature tests (bun test directly), grading agent output (Assay), UI verification (Interceptor), finding security vulnerabilities, or building new functionality.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Hardening Skill

Hardening sharpens tests that already exist without adding new functionality: it turns the universal claim behind a set of example tests into a fast-check property, runs it across generated inputs, and shrinks any failure to the minimal counterexample.

One intent ships. Mutation testing, complexity scoring, duplication scanning, and acceptance-test mutation were once listed here as planned; none is built, and this file no longer advertises them (external review of the v7.40.4 payload, 2026-09-03: a routing table that promises unbuilt intents is the "confidently documented, never existed" class).

## Ideal State

- Every property written states the universal claim behind existing example tests, runs across generated inputs drawn from the function's real input domain, and keeps the examples it sharpens.
- Every failure ends shrunk to a minimal counterexample with its seed, and ends in either a fixed bug or a corrected property.
- What hardening lands is recorded where the system reads it: a `bun-property` row in the ISA's Test Strategy, and a C/R/L Learning entry when a counterexample taught something.
- Functions that cannot carry a universal claim (impure, or no candidate shape) are left to example tests rather than forced into a property.

## Intent Routing

| Intent | Trigger | File |
|----------|---------|------|
| PropertyTest | property test, property based testing, PBT, fast-check, universal quantified claim, shrink counterexample, pure functions, parsers, serializers, data transforms, invariants | `Intents/PropertyTest.md` |

## Integration Points

The rest: https://github.com/danielmiessler/LifeOS/blob/HEAD/LifeOS/install/skills/Hardening/SKILL.md
