Skip to content

feat(maintain-analytics): OLS trend forecast — rising / cooling / steady + next-week prediction#83

Merged
QodeXcli merged 1 commit into
mainfrom
feat/maintain-forecast
Jul 1, 2026
Merged

feat(maintain-analytics): OLS trend forecast — rising / cooling / steady + next-week prediction#83
QodeXcli merged 1 commit into
mainfrom
feat/maintain-forecast

Conversation

@QodeXcli

@QodeXcli QodeXcli commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Strengthens the Maintain analytics with a real forecast, not just a naive rate.

forecastTrend(runs, nowMs, weeks) fits an ordinary-least-squares line to the weekly opened-cleanups series and predicts next week. It answers a question the last-28-days count can't: is the self-improvement loop accelerating, cooling off, or holding steady?

Returns { weeklyAvg, slope, direction: rising | falling | steady, nextWeek } — and stays honest: a flat/empty history is steady with nextWeek: 0, no invented momentum.

  • maintain-stats.ts: forecastTrend (PURE, +3 tests — rising / steady-on-empty / cooling)
  • Dashboard Maintain panel: Trend forecast line (rising ↑ / cooling ↓ / steady → · avg ~N/wk · next week ≈ M)
  • qodex maintain-report: same Forecast line under the sparkline

Full suite 1443 green, tsc clean.

…t loop rising, cooling, or steady?

Adds forecastTrend(runs, nowMs, weeks): fits an ordinary-least-squares line to the weekly
opened-cleanups series and predicts next week — a stronger, honest signal than the naive
last-28-days count. Reports {weeklyAvg, slope, direction: rising|falling|steady, nextWeek}.

- maintain-stats.ts: forecastTrend (PURE, unit-tested — rising / steady-on-empty / cooling).
- dashboard: "Trend forecast" line (rising ↑ / cooling ↓ / steady → · avg ~N/wk · next week ≈ M).
- qodex maintain-report: same Forecast line under the 8-week sparkline.
@QodeXcli QodeXcli merged commit d1902d4 into main Jul 1, 2026
2 checks passed
@QodeXcli QodeXcli deleted the feat/maintain-forecast branch July 1, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant