AGENT SKILL

property-based-testing

Incremental rollout policy for property-based testing that preserves readable example-based tests while adding invariant-focused randomized verification. Use when adding randomized testing, validating input ranges, or verifying mathematical properties. DO NOT USE FOR: example-based unit/integration tests or TDD workflow (use test-driven-development), React component tests (use ui-testing), or E2E browser tests (use webapp-testing).

使用场景测试与质量
License 许可
MIT
最近更新
2026-08-16
Stars
★ 3
Forks
0

01 前言 Front Matter

name
property-based-testing
description
Incremental rollout policy for property-based testing that preserves readable example-based tests while adding invariant-focused randomized verification. Use when adding randomized testing, validating input ranges, or verifying mathematical properties. DO NOT USE FOR: example-based unit/integration tests or TDD workflow (use test-driven-development), React component tests (use ui-testing), or E2E browser tests (use webapp-testing).

03 SKILL.md 正文

Property-Based Testing Skill

Use PBT as a complement to example-based tests.

Rollout Policy

  1. Start in domain logic with pure invariants first.
  2. Keep existing unit/integration tests as readability and regression anchors.
  3. Begin with small run counts in PR CI, then increase in scheduled or nightly runs.
  4. Require reproducible seeds in all failure reports.
  5. Avoid initial rollout in UI/adapters until core invariants are stable.

Guardrails

  • Do not replace readable example-based tests with PBT.
  • Keep properties behavior-focused, not implementation-coupled.
  • Treat flaky generators/shrinking issues as test defect and route for test refinement.
  • If infrastructure instability dominates, classify as harness/env defect and fix the harness before expanding PBT scope.

Adoption Guidance

  • Start with a small invariant set and expand gradually.
  • Add PBT where domain rules are stable and deterministic.
  • Scale run volume only after repeated stable results.

Gotchas

Trigger Gotcha Fix
Replacing readable example-based tests with PBT to be "more thorough" Example-based tests serve as readable documentation and regression anchors; removing them loses context PBT complements, never replaces, example-based tests
Writing a property that asserts internal computation steps Property breaks on any internal refactor, same flaw as testing implementation details Keep properties behavior-focused; test invariants (observable outcomes), not mechanisms
Adding PBT to UI or adapter layers before core domain invariants are stable Unstable core means properties change constantly; high churn Start in domain logic with pure invariants; expand outward after stability
Setting runs: 1000 in CI from the start Slow CI blocks the team immediately on PBT adoption Start small in CI (50–100 runs); increase in scheduled or nightly runs after stability confirmed
Not requiring reproducible seeds in failure reports Intermittent PBT failure looks flaky but is reproducible with the right seed Require seed capture in all failure reports from day one
Treating intermittent PBT failures as domain bugs without triage Root cause may be the generator or shrinking logic, not domain code Classify as test defect, route to test refinement before investigating domain code

04 同仓库更多 Skills

Grimblaz
Grimblaz/agent-orchestra

webapp-testing

Playwright end-to-end testing guidance for web apps, with practical patterns and setup steps. Use when creating or improving browser-based E2E coverage, test stability, and CI execution. DO NOT USE FOR: React component tests (use ui-testing), canvas game interaction (use browser-canvas-testing), TDD workflow (use test-driven-development), debugging failures (use systematic-debugging), or randomized property tests (use property-based-testing).

测试与质量前端开发
★ 3
Grimblaz
Grimblaz/agent-orchestra

verification-before-completion

Evidence-based verification checklist before marking work complete. Use before PRs, releases, marking tickets done, or any "I'm finished" declaration; also when naming a baseline commit for a differential suite claim, when designing a mutation campaign or red-run evidence, when making an absence claim, a universal claim, or a one-time demonstration offered as a standing guarantee, when attributing a measurement or claiming a sweep or verification loop is complete, and when stating what a check or a CI suite will do about a change. DO NOT USE FOR: post-merge cleanup or archival (use post-pr-review) or processing GitHub review comments (use code-review-intake).

★ 3
Grimblaz
Grimblaz/agent-orchestra

validation-methodology

Reusable validation and review methodology for staged validation, failure triage, and prosecution-depth setup. Use when running validation ladders, triaging failures, or executing adversarial review passes. DO NOT USE FOR: CE Gate orchestration, specialist dispatch ownership, or step execution flow (keep those in Code-Conductor).

★ 3
Grimblaz
Grimblaz/agent-orchestra

upstream-onboarding

Shared opening-phase protocol for upstream agents (Experience-Owner, Solution-Designer, Issue-Planner) and Code-Conductor when invoked on an existing GitHub issue. Renders a scaled context brief and runs a standards check on inherited work at each phase boundary. Use when a user-invocable agent receives a request referencing an existing GitHub issue and must load solution-authoring and upstream-onboarding at the opening phase. DO NOT USE FOR: subagent dispatches (which already operate within an assessed session context); post-merge review (use post-pr-review); research or non-tree subagents.

人力资源Skill与智能体开发
★ 3
Grimblaz
Grimblaz/agent-orchestra

ui-testing

Resilient React component testing strategies focusing on user behavior. Use when writing or reviewing component-level React tests, fixing flaky component tests, or establishing React testing patterns. DO NOT USE FOR: Playwright E2E tests (use webapp-testing), canvas game interaction (use browser-canvas-testing), TDD workflow (use test-driven-development), debugging failures (use systematic-debugging), UI component design (use frontend-design), or randomized property tests (use property-based-testing).

设计师测试与质量前端开发
★ 3
Grimblaz
Grimblaz/agent-orchestra

ui-iteration

Reusable screenshot-driven UI polish workflow for iterative visual refinement. Use when improving layout, hierarchy, spacing, feedback, or Tailwind-based presentation through repeated review-and-adjust passes. DO NOT USE FOR: functional bug fixing, accessibility-only audits, or major redesign strategy work (use Code-Smith or frontend-design).

设计师前端开发
★ 3