Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
schema: spec-driven
created: 2026-09-16
skip_specs: true
19 changes: 19 additions & 0 deletions openspec/changes/generic-float-predictions-docs/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Why

The `development-explained` book (notably ch02 common-core-contracts) documents `predict -> Array1<f64>` and `SKTargetView::Continuous(f64)` as the contract. Once the code contract becomes generic over `SKFloat`, the book contradicts the implementation and teaches the lossy `f64`-only pattern.

## What Changes

- Rewrite ch02 sections `SKTargetView`, `SKPredictor`, `SKFeatureTransformer` family diagram, and `SKSupervisedScorer` examples to the generic `F: SKFloat` contract with the regressor/classifier split.
- Update every `Array1<f64>`-as-prediction snippet, Mermaid contract diagram (`predict features -> Array1 f64`), and KaTeX-free prose that claims dtype-independence of predictions.
- Add a short "Which float should I use?" guide (`f32` vs `f64`: memory, SIMD/GPU throughput, precision) plus a migration note for the breaking change.
- Verify with `mdbook build docs` and a rendered-page check; keep Mermaid `accTitle`/`accDescr`, KaTeX math, and English prose per the documentation guide.

## Capabilities

(none — documentation-only change; behavior is specified by `generic-float-predictions`.)

## Impact

- Affected docs: `docs/src/development-explained/ch02-common-core-contracts.md`, related tutorial/chapter snippets referencing `predict`/`SKTargetView`, Mermaid diagrams, `docs/book.toml` untouched.
- No Rust code, no API, no dependency changes. Merged into `docs/documentations` per repo workflow, not `main`.
19 changes: 19 additions & 0 deletions openspec/changes/generic-float-predictions-docs/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## 1. Book rewrite

- [x] 1.1 Rewrite ch02 `SKTargetView` / `SKPredictor` / scorer sections to the generic `F: SKFloat` contract with the regressor/classifier split.
- [x] 1.2 Update the contract family Mermaid diagram (`predict -> Array1 f64`) plus `accTitle`/`accDescr`; replace float-label examples with `i64` labels.
- [x] 1.3 Add "Which float should I use?" guide (f32 vs f64) and breaking-change migration note, in English with KaTeX only for real formulas.

Note: the `Array1<f64>` Welford accumulators, normal-equation state, and SGD
`f64` state in the transformer/linear/streaming tutorials are internal
accumulation precision, not prediction outputs, and were deliberately left
untouched.

## 2. Verification

- [x] 2.1 Run `mdbook build docs`, open the rebuilt ch02 page, and confirm diagrams render and prose reads correctly.
- [ ] 2.2 Confirm the change merges into `docs/documentations`, not `main`.

Note on 2.1: the rebuilt ch02 page was verified in the built HTML
(`SKRegressorPredictor` present, `accTitle` present, no `Array1 f64`
remainder, new section present). Note on 2.2: merge happens via the doc PR.