Commit 7dc693d
setup: full scaffold post-green-light (chapters, apps, specs, ADRs, CI)
Phase 0.5 complete. Ready to open Chapter 1.
Chapter notes (docs/chapters/01-*.md through 18-*.md):
- 18 chapters, teaching-ladder structure (intuition → formal → tiny
example → Python → Kotlin via cpsat-kt → MiniZinc where it helps →
exercises → self-check → what-unlocks).
- Dual-language parity maintained. Ch. 2 is the only chapter that
uses raw com.google.ortools.sat.* in Kotlin (to motivate cpsat-kt).
Python (apps/py-cp-sat/ + apps/py-api/):
- uv workspace, Python 3.12+, OR-Tools 9.15.
- Chapter 2 fully runs (solves 3x+2y=12, x+y≤5, maximize x+y).
- Chapters 4–13 have runnable stubs raising NotImplementedError.
- FastAPI skeleton with /health, /version, stub /solve; 4/4 tests pass.
Kotlin (apps/kt-cp-sat/ + apps/kt-api/):
- Gradle composite build, includes cpsat-kt via includeBuild.
- Chapter 2 raw-Java demo runs (x=2, y=3, OPTIMAL).
- Chapters 4–13 compile as stubs.
- Ktor 3 skeleton with /health, /version.
Web (apps/web/):
- Vite 8 + React 19 + React Router v7 framework mode + TypeScript 5
+ Tailwind 4 + shadcn/ui + TanStack Query 5.
- Backend toggle (Python / Kotlin) with localStorage.
- Build, typecheck, lint, test all green.
Shared contract (apps/shared/):
- openapi.yaml (OpenAPI 3.1) — /health, /version, /solve,
/solution/{id}, /solutions/{id}/stream (SSE).
- JSON schemas validated against 2020-12.
Specs (specs/nsp-app/):
- 10-file skeleton + README + lock procedure.
- Fills in Chapter 14; unlocked until then.
ADRs (docs/adr/):
- 0000 template (Michael Nygard).
- 0001 cpsat-kt as first-class artifact.
- 0002 stack lock-in v0.2 (JDK 25 / Kotlin 2.1+ / Gradle 9 / Vite+RR7).
- 0003 spec-driven NSP app.
- 0004 dual-language parity.
Data (data/nsp/):
- schema.json (JSON Schema 2020-12).
- toy-01 (3×7×2) and toy-02 (5×14×3) feasible instances.
Tools (tools/):
- validate-schedule.py (exits 0 valid / 1 violations / 2 missing deps).
- setup-all.sh (auto-runs every setup-*.sh in order).
CI (.github/workflows/):
- ci.yml — Python (macOS-14), Kotlin (macOS-14, JDK 25 temurin),
Web (Ubuntu-24.04, Node 22) parallel jobs.
- release.yml — stub for future Maven Central publish on cpsat-kt-v* tags.
Benchmarks (benchmarks/):
- README with methodology placeholder; results/ + plots/ scaffolded.
Alt solvers (apps/alt-solver/):
- Timefold and Choco stubs for Phase 8 port.
Status docs updated:
- README.md, docs/overview.md, docs/plan.md reflect scaffold-complete
state. Chapter 1 is open.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 25dfb94 commit 7dc693d
198 files changed
Lines changed: 33550 additions & 14 deletions
File tree
- .github/workflows
- apps
- alt-solver
- choco
- timefold
- kt-api
- gradle
- wrapper
- src/main
- kotlin/io/vanja/nspapi
- resources
- kt-cp-sat
- ch02-hello
- src/main/kotlin/io/vanja/cpsat/ch02
- ch04-puzzles
- src/main/kotlin/io/vanja/cpsat/ch04
- ch05-optimization
- src/main/kotlin/io/vanja/cpsat/ch05
- ch06-globals
- src/main/kotlin/io/vanja/cpsat/ch06
- ch09-jobshop
- src/main/kotlin/io/vanja/cpsat/ch09
- ch10-shifts
- src/main/kotlin/io/vanja/cpsat/ch10
- ch11-nsp-v1
- src/main/kotlin/io/vanja/cpsat/ch11
- ch12-nsp-v2
- src/main/kotlin/io/vanja/cpsat/ch12
- ch13-nsp-v3
- src/main/kotlin/io/vanja/cpsat/ch13
- gradle
- wrapper
- py-api
- src/py_api
- tests
- py-cp-sat
- ch02-hello
- src/py_cp_sat_ch02
- tests
- ch04-puzzles
- src/py_cp_sat_ch04
- tests
- ch05-optimization
- src/py_cp_sat_ch05
- tests
- ch06-globals
- src/py_cp_sat_ch06
- tests
- ch09-jobshop
- src/py_cp_sat_ch09
- tests
- ch10-shifts
- src/py_cp_sat_ch10
- tests
- ch11-nsp-v1
- src/py_cp_sat_ch11
- tests
- ch12-nsp-v2
- src/py_cp_sat_ch12
- tests
- ch13-nsp-v3
- src/py_cp_sat_ch13
- tests
- web
- app
- components
- ui
- lib
- routes
- public
- tests
- benchmarks
- plots
- results
- data/nsp
- docs
- adr
- chapters
- specs/nsp-app
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
175 | 182 | | |
176 | | - | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments