Design and generate property-based tests for changed files, with self-scoring to ensure quality (24/30+ on the evaluation rubric).
Filter to source files (.ts, .tsx, .js, .jsx, .py, .rs), excluding test files, config, styles, and assets.
| Invariant | Output always satisfies a condition | Length preservation, range bounds, type guarantees | | Round-trip | decode(encode(x)) === x | Parsers, serializers, codecs | | Idempotence | f(f(x)) === f(x) | Normalizers, formatters, canonicalizers | | Metamorphic | Relationship between f(x) and f(transform(x)) | Sort, filter, math operations |
為目前 git 分支中變更的檔案設計並產生基於屬性的測試 (PBT)。提取規範、設計屬性(不變量、往返、冪等性、變形、單調性、參考模型)、建立生成器策略、實施測試並根據評分標準進行自我評分(需要 24/30+)。支援快速檢查 (TS/JS)、假設 (Python) 和 proptest (Rust)。在以下情況下使用:(1)“為我的變更編寫屬性測試”,(2)“新增 PBT”,(3)“基於屬性的測試”,(4) 在實作純函數、驗證器、解析器或格式化程式之後驗證不變量。 來源:nimiusrd/agent-skills。