Deepgrain Foundry: move from a claude.ai artifact to a local repository
The game as of artifact version 24, ready for local development with coding agents. - Source split from three large files into 52 small ones under src/sim, src/render and src/ui, joined in the order in src/manifest.json by build.py. The joined code is unchanged apart from comments; every headless suite gives the same output, and screenshots in both looks are pixel-identical to before. - Light tidying with no change in behaviour: one movement scan loop, shared hazard-stripe and belt shader helpers, unused code removed, a shared check helper for the test suites. - World files can be exported as an ordinary download outside claude.ai. - Tests: broken old scripts removed, experiments moved to tools/, test/run_all.py added. Tools: shot.py (repeatable screenshots), where.py, map.py. - Docs: AGENTS.md, CLAUDE.md, NOTES.md (the owner's to-do inbox), docs/PROJECT_MAP.md, DESIGN.md, TESTING.md, systems notes, the owner's requests and an agent log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K9kLmYADKSEjuwUN3rFxDA
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Agent log
|
||||
|
||||
What agents have done, newest first. Add an entry for every piece of work: the date, which
|
||||
note or request it was for, what changed, the files touched, the tests run, and anything left
|
||||
open or not verified. Keep each entry short; the git history has the details.
|
||||
|
||||
## 2026-10-23: export from claude.ai to a local repository (Claude, in claude.ai)
|
||||
|
||||
Request: split the source into small files, deduplicate and tidy a little, test fully, and
|
||||
write the notes, docs and agent instructions for local development.
|
||||
|
||||
- **Source split.**
|
||||
- `core.js` (3,688 lines), `main.js` (2,012) and `render.js` (938) became 52 files in
|
||||
`src/sim/`, `src/render/` and `src/ui/`, each with a header line. The build order lives in
|
||||
`src/manifest.json`.
|
||||
- Checked that the joined code was identical to before, apart from comments and blank lines.
|
||||
- Every headless suite gave the same output, line for line, before and after.
|
||||
- Screenshots of two scenes, in both looks, were pixel-identical before and after
|
||||
(`tools/shot.py --freeze`).
|
||||
- **Tidying, behaviour unchanged.**
|
||||
- One scan loop in `simMove` instead of two mirrored copies.
|
||||
- A `drawHazardRims` helper replaced 3 copies.
|
||||
- The belt and filter shader code shares `beltLineSD`, `bandRidge` and `bandColor`.
|
||||
- Removed unused `refundCost`, `wakeArea`, `brushFor`, and the `PARTS` / `PART_BY_ID` aliases.
|
||||
- The suites share `suite()` (check / done) from the harness, and failures now set the exit
|
||||
code.
|
||||
- **Tests.**
|
||||
- Six broken old scripts were deleted; they used functions removed long ago.
|
||||
- Experiments and reports moved to `tools/experiments/`.
|
||||
- `t_v2` / `t_v4` / `t_v9` were renamed `t_basics` / `t_world` / `t_conveyors`.
|
||||
- Added `test/run_all.py`.
|
||||
- **Tools.**
|
||||
- `tools/shot.py`: repeatable screenshots of a scene set up in JavaScript.
|
||||
- `tools/where.py`: maps built-page line numbers back to source files.
|
||||
- `tools/map.py`: the project map's index.
|
||||
- `tools/scenes/`: example scenes.
|
||||
- The game skips cursor previews when `GAME.hidePreviews` is set, for clean screenshots.
|
||||
- **World files outside claude.ai.**
|
||||
- Pause → Export world file only worked inside claude.ai, through its downloads hook.
|
||||
- It now falls back to an ordinary browser download (`exportWorld` in `src/ui/saves.js`).
|
||||
- `test/play.py` checks that an exported file downloads and imports back on the title screen
|
||||
as the same world.
|
||||
- **Build.** `build.py` writes `dist/index.html` (a full page), `dist/deepgrain-foundry.html`
|
||||
(the same without the document wrapper, as the claude.ai artifact used) and
|
||||
`dist/bundle-lines.json`.
|
||||
- **Docs.** `AGENTS.md`, `CLAUDE.md`, `README.md`, `NOTES.md`, `docs/PROJECT_MAP.md`,
|
||||
`docs/DESIGN.md`, `docs/TESTING.md`, `docs/systems/*`, `docs/history/requests.md`.
|
||||
- **Tests run.** All 11 headless suites pass, as do `test/play.py` (101 checks) and
|
||||
`test/t_smooth.py` (8 checks).
|
||||
- **Open.**
|
||||
- The owner reports that big piles on belts still only move at the top (NOTES.md); not yet
|
||||
reproduced.
|
||||
- The game's last claude.ai artifact was version 24.
|
||||
Reference in New Issue
Block a user