Skip to content
Skillpedia
Testing20k · #10430

Hardening

What it does

Sharpens software tests by checking the general rule behind example tests across many generated inputs. It is for developers who want to find bugs their examples miss.

When to use it

  • ✓When your tests pass but you suspect they miss edge cases.
  • ✓When you want to check a function's rule across many random inputs.
  • ✓When a failing case needs to be reduced to the smallest example that breaks it.

Skill link

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Hardening/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Hardening/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Our date parsing tests pass, but I think we miss edge cases. Can you harden them with property tests?”

5 new skills a week. 1 minute to read.

How it works

The skill states the general claim behind your example tests and runs it against many generated inputs. If something fails, it shrinks the failure to the smallest input that still breaks, and then the bug or the property is fixed.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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

  • Testing Doctrine Rule #12 — names fast-check as the property-testing primitive (LIFEOS/DOCUMENTATION/Testing/TestingDoctrine.md).
  • ISA format — the bun-property ISC type with property | generator | runs columns (LIFEOS/DOCUMENTATION/ISA/ISAFormat.md § ISC Type Vocabulary). A bun-property row is a first-class assert: it counts toward every-ISC-an-assert coverage (H8) and bunker test runs it like any deterministic row.
  • Algorithm — hardening is elected during verification when a run's criteria warrant property depth; spend is discovered from the work.
  • System prompt — Verification Is the Mechanism section at top (LIFEOS/LIFEOS_SYSTEM_PROMPT.md).

    The Bunker CLI is maintainer-private and not in the public release; run code rows with bun test ./<path> and suite rows with bun skills/Assay/Tools/EvalRunner.ts.

Gotchas

No skill-wide gotchas; the fast-check ones live in Intents/PropertyTest.md § Gotchas.

Examples

  • "Property-test the slug parser" → PropertyTest → round-trip and idempotence properties in a .property.test.ts file at 1000 runs, a bun-property row in the ISA, and any failure shrunk with its seed pinned.
  • "What bugs are my example tests missing?" → PropertyTest → the pure functions (parsers, serializers, transforms) that have only example coverage, listed as property-test candidates.
FAQ

Does it replace my example tests?

No. It keeps the examples it sharpens and adds property tests alongside them.

Which functions can it test this way?

Functions with a clear general rule. Impure functions or ones with no clear input shape are left to example tests.

What tool does it use?

It uses fast-check, a property-based testing library.

Details

Original description by the author

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.

repo: danielmiessler/LifeOS

Popularity

GitHub stars
20k
Ranking position
#10430
License
MIT
Updated
10/28/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills