diff --git a/openspec/changes/generic-float-predictions-docs/.openspec.yaml b/openspec/changes/generic-float-predictions-docs/.openspec.yaml new file mode 100644 index 0000000..454f4e0 --- /dev/null +++ b/openspec/changes/generic-float-predictions-docs/.openspec.yaml @@ -0,0 +1,3 @@ +schema: spec-driven +created: 2026-09-16 +skip_specs: true diff --git a/openspec/changes/generic-float-predictions-docs/proposal.md b/openspec/changes/generic-float-predictions-docs/proposal.md new file mode 100644 index 0000000..8b8dd39 --- /dev/null +++ b/openspec/changes/generic-float-predictions-docs/proposal.md @@ -0,0 +1,19 @@ +## Why + +The `development-explained` book (notably ch02 common-core-contracts) documents `predict -> Array1` 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`-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`. diff --git a/openspec/changes/generic-float-predictions-docs/tasks.md b/openspec/changes/generic-float-predictions-docs/tasks.md new file mode 100644 index 0000000..150c5dd --- /dev/null +++ b/openspec/changes/generic-float-predictions-docs/tasks.md @@ -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` 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.