Hardening
Build and shipSkill · 1 workflow

Hardening

Finds bugs your example tests miss by checking a rule across many inputs.

You say
  • property-test Lumen's calendar import parser Shown in the terminal
  • what bugs are my Lumen tests missing?
  • shrink this failing case to its smallest input

You getTests that check one rule across many inputs, with any bug they find cut to its smallest case.

Terminal · Hardening at work
studio · lumen · claude Rex 0.4.2 · 8 sessions · 2 need you
lumen · claude lumen · dev server lazygit attic · claude
8 sessions · 2 need you · 1 stopped
>Property-test Lumen's calendar import parser. The example tests all pass, but I want to know what they miss.
⏺Skill(Hardening)
⎿Routed to PropertyTest
⏺Write(importCalendar.property.test.ts)
⎿4 properties · 1,000 runs each
⏺Bash(bun test importCalendar.property.test.ts)
⎿1 fail · shrunk to one all-day event · seed 48213
⏺Update(src/onboarding/importCalendar.ts)
⎿+1 −1 · rerun: 4 of 4 properties pass
◆LIFEOS 4m 12s◆

Saving and re-reading events broke on a case the examples missed: an all-day event on a daylight-saving day came back a day early.

Changed files importCalendar.ts · importCalendar.property.test.ts
  1. + fc.assert(fc.property(arbEvent, ev => expect(parse(serialize(ev))).toEqual(ev)), { numRuns: 1000 })
  2. + // seed 48213: all-day event on 2027-03-14, the daylight-saving change
  3. - const day = DateTime.fromISO(ev.dtstart, { zone }).startOf('day');
  4. + const day = DateTime.fromISO(ev.dtstart, { zone: ev.allDay ? 'utc' : zone }).startOf('day');
4 properties · 4,000 inputs · 1 bug fixed · added to Lumen's test plan
Juno: All-day events now keep their date, and the four properties run with the Lumen tests from now on.
⏵⏵ auto mode on (shift+tab to cycle)

An invented run. Sam asks what his calendar import tests miss, and Hardening writes property tests, shrinks the one failure to a single event and fixes the bug.

01
Workflow
12
Ways to ask
Not for new feature tests (bun test directly), grading agent output (Assay), UI verification (Interceptor), finding security vulnerabilities, or building new functionality

Inside the Skill

The thinking, frameworks, and architecture that distinguish this skill from a generic version of the same task.

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.

Workflows & Routing · 1

Each workflow is one job the skill runs. The trigger phrases route your request to the right one — this is the skill's routing table.

  1. 01
    PropertyTest Intents/PropertyTest.md

    property test, property based testing, PBT, fast-check, universal quantified claim, shrink counterexample — pure functions, parsers, serializers, data transforms, invariants

How to Invoke

Say any of these to your assistant and LifeOS activates the Hardening skill automatically:

  • "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"

Or invoke explicitly:

Skill("Hardening")

Want LifeOS to do this for you?

Install LifeOS on your machine — your assistant gets the Hardening skill plus 96 others, all hooked into one Life OS.