본문으로 건너뛰기
Skillpedia
테스트20k · #10430

Hardening

하는 일

이 스킬은 예시 테스트 뒤에 있는 일반 규칙을 여러 생성 입력에 대해 확인해, 소프트웨어 테스트를 더 날카롭게 만듭니다. 예시가 놓치는 버그를 찾고 싶은 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓테스트는 통과하지만 경계 사례를 놓치고 있을 것 같을 때.
  • ✓함수의 규칙을 많은 무작위 입력에 대해 확인하고 싶을 때.
  • ✓실패한 사례를 그것을 깨뜨리는 가장 작은 예시로 줄여야 하는 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“날짜 파싱 테스트는 통과하지만 경계 사례를 놓치는 것 같아요. 속성 테스트로 강화해 주시겠어요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 예시 테스트 뒤에 있는 일반 주장을 명시하고, 그것을 많은 생성 입력에 대해 실행합니다. 실패하면 그것을 깨뜨리는 가장 작은 입력으로 줄이고, 그다음 버그나 속성을 고칩니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
자주 묻는 질문

예시 테스트를 대체하나요?

아니요. 강화한 예시는 그대로 두고, 속성 테스트를 그 옆에 추가합니다.

어떤 함수에 이 방식을 쓸 수 있나요?

명확한 일반 규칙이 있는 함수입니다. 순수하지 않은 함수나 명확한 입력 형태가 없는 함수는 예시 테스트에 맡깁니다.

어떤 도구를 쓰나요?

속성 기반 테스트 라이브러리인 fast-check를 씁니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
20k
순위
#10430
라이선스
MIT
업데이트
2026. 10. 28.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬