Context
Six predicate rewrites (converged, stable, improving, diverging, oscillating, equilibrium) need an unambiguous target. Without a shared spec, reviewers will argue six different definitions of "improving" on six different PRs.
Task
Write docs/predicates.md. For each predicate document:
- The windowed formula in pseudocode
- A canonical pass/fail trace (sequence of dHs → expected truth value at each step)
- The pointwise behavior it replaces (for the changelog)
- Partial-window behavior (count < N): default
false — match consumer intuition ("we haven't seen enough yet to claim anything")
The six
| Predicate |
Formula (window of last N dHs) |
converged |
full window AND all |dH_i| < dh_zero AND entropy < h_low |
stable |
full window AND all |dH_i| < dh_small AND entropy >= h_low AND no consecutive sign flips |
improving |
count ≥ 3 AND entropy_now < entropy_oldest AND bounce_count < K (suggest K = N/4) |
diverging |
mirror of improving (monotone non-decreasing) |
oscillating |
count ≥ 3 AND sign_flip_count ≥ ceil(N/3) |
equilibrium |
full window AND |mean(window)| < dh_zero AND variance(window) < dh_zero² |
Acceptance
docs/predicates.md exists with the six specs and example traces.
- Each spec cites the pointwise behavior it replaces.
- Linked from
README.md predicates section.
Why
Predicate rewrite PRs need an unambiguous target. This issue is also a good first contribution — pure spec writing, no C changes.
Context
Six predicate rewrites (
converged,stable,improving,diverging,oscillating,equilibrium) need an unambiguous target. Without a shared spec, reviewers will argue six different definitions of "improving" on six different PRs.Task
Write
docs/predicates.md. For each predicate document:false— match consumer intuition ("we haven't seen enough yet to claim anything")The six
converged|dH_i| < dh_zeroANDentropy < h_lowstable|dH_i| < dh_smallANDentropy >= h_lowAND no consecutive sign flipsimprovingentropy_now < entropy_oldestAND bounce_count < K (suggest K = N/4)divergingimproving(monotone non-decreasing)oscillatingequilibrium|mean(window)| < dh_zeroANDvariance(window) < dh_zero²Acceptance
docs/predicates.mdexists with the six specs and example traces.README.mdpredicates section.Why
Predicate rewrite PRs need an unambiguous target. This issue is also a good first contribution — pure spec writing, no C changes.