spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

Property-based testing

Open mofsesam opened this issue 1 year ago • 5 comments

Property-based testing like with https://hypothesis.readthedocs.io/en/latest/ can be very powerful, but good properties to test can be hard to come up with. AI assistance on finding good properties to test and writhing these tests would be welcome addition to the spec-kit process.

mofsesam avatar Sep 11 '25 07:09 mofsesam

@mofsesam - can you elaborate on what you envision the end-to-end developer experience to be here?

localden avatar Sep 11 '25 17:09 localden

This relates to https://github.com/github/spec-kit/issues/169 If passing tests define when you have a working solution, than good property based tests will boost your confidence that you also test for unknown-unknowns.

For "end-to-end developer experience to be here", I think tests should run through all the steps of spec-kit. If intent is changed in Specify, Plan for testing needs to change, new Tasks must be made with new tests, Implemented code must pass old/modified and new tests.

mofsesam avatar Sep 16 '25 08:09 mofsesam

This could tie in with these discussions:

  • https://github.com/github/spec-kit/discussions/159
  • https://github.com/github/spec-kit/discussions/160

This will help us guardrail against:

  • Temperature, sampling, and upstream model drift make identical prompts yield different outputs.
  • Many tasks don’t have a single “correct” answer; proxy metrics can miss quality regressions.
  • Real-world inputs evolve; a prompt that passes today may fail tomorrow.
flowchart TD
    A["Prompt template changed"] --> B["Property-based tests (Hypothesis)"]
    B --> C["Run TerminalBench benchmarks"]
    C --> D{"Degradation below threshold?"}
    D -- "Yes" --> E["GEPA Prompt Optimiser"]
    E --> B
    D -- "No" --> F["Release"]

adam-paterson avatar Sep 16 '25 09:09 adam-paterson

This issue has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Apr 03 '26 14:04 github-actions[bot]

This issue has been automatically closed due to inactivity (180 days total). If you believe this issue is still relevant, please reopen it or create a new issue.

github-actions[bot] avatar May 05 '26 00:05 github-actions[bot]