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>
- packages/core/src/solver.js: decision tree with perfect recall over the
community form's choices; chance events (first dragon, deaths, shadow,
meadow dragon, encounter outcome) depend on earlier choices through
hierarchical Dirichlet back-off with empirical-Bayes concentration per
event; backward induction for P(colour this attempt) and Dinkelbach for
P(colour) / (P(colour) + P(other colour)); 200 posterior draws for
credible intervals and "still best" rates; cross-fitted held-out check.
- Only genuine attempts inform encounter outcomes (goal / Malek intent).
- data/public/policy.json (all runs and a low-bias sample) and the readable
docs/POLICY.md; published on Pages with solver.js for the bot.
- Bot advisor: re-solves from any history, maps advice onto screen text,
reports margins so ties can be randomised. docs/BOT_INTEGRATION.md.
- Tests on a synthetic world with known answers; daily source update now
rebuilds the policy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ