ctx v0.19.0
monthday + seasonal dimensions — Cyclic Phase Model ~95%
Closes two gaps in the GottZ Cyclic Phase Model: monthday (day-of-month, ~30-cycle) and seasonal (day-of-year, 365-cycle).
Principle
Every cyclic time variance must be dimensionally captured. The original vision spec had naming bugs:
- "monthly" was meant as day-of-month, not month-of-year
- "yearly" was meant as day-of-year (seasonal), not year-number
year stays linear/monotonic (not cyclic). Only day-of-year is cyclic (seasonal patterns like Christmas recur annually).
What's new
Two new cyclic dimensions:
| Dimension | Cycle | σ | Semantics |
|---|---|---|---|
monthday |
~30 days | 0.10 | Monatsanfang, Gehaltstag, 1.-5. des Monats |
seasonal |
365 days | 0.08 | Weihnachten, Jahrestage, "letztes Jahr um diese Zeit" |
Schema (Migration 019)
- Two new partial B-Tree indexes (
idx_temporal_monthday,idx_temporal_seasonal) - Backfill from existing
source_datevalues viaEXTRACT(DAY/DOY FROM ...) - No schema changes — derived from existing data
Engine
DimensionPhase: +monthday(v-1)/30, +seasonal(v-1)/365QueryPhase: +monthdayt.Day(), +seasonalt.YearDay()DimensionSigma: +monthday=0.10, +seasonal=0.08yearexplicitly removed fromDimensionSigma(not cyclic)
Parser matchers
- matchAnnualHoliday: Weihnachten, Silvester, Neujahr →
{month: 0.4, seasonal: 0.6}(dual-anchor) - matchMonthSegment: Monatsanfang / Monatsmitte / Monatsende →
{monthday: 1.0}(pure cyclical) - Priority 8a/8b in
NormalizeTemporalRules
Results
- Backfill: 158 blocks × 2 new dimensions = 316 new EAV rows
- Live: "Weihnachten" → cyclic_dims=[month, seasonal], 25 matches, 1ms latency
- Live: "Monatsanfang" → cyclic_dims=[monthday], 41 matches, 0ms
- Tests: +30 unit tests,
test.sh16/16,eval.sh43/43, no regression
Still missing (v0.20.0)
daily dimension (hour-of-day) requires schema change: content_dates DATE[] → content_times TIMESTAMPTZ[].
Installation
With Go:
go install github.com/GottZ/ctx/cmd/ctx@v0.19.0Full Changelog: v0.18.0...v0.19.0