Refactor: lay the repo out by section (core, collection, analysis, planner, site) (#8)

Moves only; no behaviour changes. Every file now lives under the part of the project it
belongs to, each section has a README, and docs/PRIVACY.md collects the rules all parts follow.

  core/        engine.js, graph.js, solver.js, python/clean.py
  collection/  sources/ (form, register, PDF check, daily update), bot/ (importer)
  analysis/    stats/ (Python statistics), network/ (build-graph.js), reports/ (POLICY.md)
  planner/     build-policy.js, policy-report.js
  site/        atlas/ (the page), build.js, qa/
  tests/       core/ (unit), parity/ (JS vs Python), fixtures/

Checked against the previous layout: tests pass; coded runs, test outputs, graph.json and
policy.json are byte-identical; the built site differs only in comments that name file paths.
The published file names Ken's bot downloads (solver.js, graph.js, data/policy.json) are unchanged.

Also removes the undefined/ folder of QA screenshots committed by mistake (the QA scripts now
default to a temp folder) and test.txt, and drops the unused npm workspaces.


Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ekcSchiano
2026-11-03 19:46:33 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent dcd5117373
commit 432e04c2c7
66 changed files with 201 additions and 2695 deletions
+15
View File
@@ -0,0 +1,15 @@
# planner
The route planner: the best route to every dragon, and what goes back to Ken's bot.
| File | What it does |
|---|---|
| `build-policy.js` | Solves the decision model (`core/solver.js`) for every colour and both goals ("this attempt" and "eventually"), with 200 posterior draws and a cross-fit check. Writes `data/public/policy.json`, which has a content id so each bot run can record which policy it followed. About 4 minutes. |
| `policy-report.js` | Writes the readable version, `analysis/reports/POLICY.md`. |
Run both with `npm run policy`. The site's valley map and The Odds read `policy.json`; the bot downloads it with
`solver.js` and `graph.js` (see `docs/BOT_INTEGRATION.md`).
**The loop with the bot.** The planner's routes go out to the bot; the bot's runs come back through
`collection/bot/`. Experiments the bot should run to fill gaps the community form cannot (for example the
answers at each bonding encounter) belong here; `experiments.json` is on the roadmap.