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:
co-authored by
Claude Opus 5.5
parent
dcd5117373
commit
432e04c2c7
@@ -0,0 +1,16 @@
|
||||
# core
|
||||
|
||||
The shared model. Every other part uses it, so a change here touches everything: run `npm test` after any edit.
|
||||
|
||||
| File | What it does |
|
||||
|---|---|
|
||||
| `engine.js` | Turns a row of the community form (any version of it) into one coded run: the run format, every coding rule, missing answers, email redaction. Also the statistics the site shows. |
|
||||
| `python/clean.py` | The same coding rules in Python. `tests/parity/` fails if the two ever disagree. |
|
||||
| `graph.js` | The route graph: the bot's scene graph, the decision-variable graph shared by all sources, the crosswalk from the bot's on-screen text to form answers, Beta credible intervals. |
|
||||
| `solver.js` | The decision model: every choice and roll in a run, chance estimates with empirical-Bayes back-off, backward induction for each dragon, and the advisor the site and the bot use to get advice from any point in a run. |
|
||||
|
||||
All three JS files have no dependencies and run unchanged in Node and the browser. The site and Ken's bot load
|
||||
the published copies (`https://ekcschiano.github.io/threshing-atlas/solver.js` etc.), so their file names on the
|
||||
site must not change.
|
||||
|
||||
To change a coding rule, edit `codeRow()` in `engine.js` **and** `code_row()` in `python/clean.py`.
|
||||
Reference in New Issue
Block a user