Pokémon TCG AI Battle — Repository Timeline
Semantic timeline of the pokemon-tcg repository reconciled with the wiki: from the MLX handoff through the sidecar pivot, Parquet, curriculum incidents, rating and ETL work, the August 14 blueprint/handoff wave and the current develop snapshot.
Pokémon TCG AI Battle — Repository Timeline
Purpose
Chronological reading of the ~/workdir/pokemon-tcg repository history. The current verified snapshot is 144 reachable commits on develop, from 2026-07-25 through 20d7d0d on 2026-08-14. The earlier count of 147 is retained only as a dated historical snapshot and is not reproducible at the current HEAD. This page is not a raw git log dump: each phase explains the concrete diff and links to the Wiki page that records its evidence boundary.
Provenance: git log --all in the pokemon-tcg repository at the referenced dates. Every hash below is a real commit — click it in gitk/git show to see the diff.
Timeline
Phase 0 — Handoff (2026-07-25)
The MLX handoff workspace is created and the vendored PyTorch reference is committed. The published implementation plan (Phases A–F) is added as TASK.md.
1f80640 2026-07-25 chore: initialize MLX handoff workspace
b0462e1 2026-07-25 docs: vendor PyTorch reference project
dfffee7 2026-07-25 chore: add implementation plan for MLX migration (Phases A–F)
Reference wiki: pokemon_tcg_mlx_migration (the migration contract this executes).
Phase A — Canonical MLX contract (2026-07-25)
Centralized token schema, fixed a semantic collision in the opponent-unit token type, versioned architecture config in every checkpoint, added a synthetic dataset generator for smoke tests, and verified the whole contract with an integration test.
517ee0f feat(A.1): centralize token-type schema in rl/token_schema.py
704b127 fix(A.2): correct opp unit token-type collision in MLX policy
596643a feat(A.3): versioned architecture config in checkpoints
3e4da66 feat(A.4): synthetic dataset generator for smoke tests
9422dad test(A.5): Phase A integration — canonical contract verified
Wiki: pokemon_tcg_mlx_migration Phase A.
Phase B — Semantic P0 fixes (2026-07-25)
Two commits closed the six B-tier semantic bugs identified in the migration handoff: additive attention mask (replacing the boolean), MHA bias parity with the PyTorch reference, padding_idx=0 semantics, static-table immutability, categorical value expected-value output, and a proper cross-entropy validation loss (replacing the earlier log(raw_logit)).
2daf8be fix(B.1-B.3): additive attention mask, MHA bias, padding_idx=0
0d1e5f4 fix(B.4-B.6): static table immutability, categorical value, proper CE loss
Wiki: pokemon_tcg_mlx_migration Phase B and pokemon_tcg_agent_architecture.
Phase C — FP16-native trainer (2026-07-25)
One squashed commit landed the FP16 model + FP16 data path with FP32 loss, reductions, accumulation and optimizer moments; gradient accumulation with post-accumulation clip and single optimizer step per microbatch group; complete checkpoint payload with model, optimizer state, arch config, scheduler position, seed, and dataset manifest.
9e92d1d feat(C): FP16-native trainer with gradient accumulation and complete checkpoints
Wiki: pokemon_tcg_mlx_migration Phase C, pokemon_tcg_training_pipeline (current state).
Phase D — Data compaction, episode metadata, val split (2026-07-25)
Option-bucket compaction (finite compiled shapes for the option surface), an episode_meta sidecar recording episode_id/side/step_id/new_episode/etc., and an episode-level val split so train and val are episode-disjoint by construction.
277a5b5 feat(D): option compaction, episode metadata, episode-level val split
Wiki: pokemon_tcg_mlx_migration Phase D. The episode_meta.npy sidecar mentioned here is later absorbed into the Parquet row schema — see 2026-08-03 below.
Package structure, config module, data manager (2026-07-26)
Codebase becomes an installable package with entrypoints (tcg-train, tcg-build-bc, tcg-evaluate, tcg-tournament, tcg-build, tcg-data, tcg-dashboard). A centralized TrainConfig dataclass + configs/train_config.json / train_config.schema.json land. Config-driven pipeline with smoke/staging/train configs.
c2d9937 chore: proper package structure with pyproject entrypoints
2e8fd34 feat: centralized config module + Kaggle data manager with entrypoints
a853c13 feat: config-driven pipeline with smoke/staging/train configs
Wiki: pokemon_tcg_train_config_reference.
Phase E and F — MLX agent, autoregressive multi-select, TBPTT (2026-07-26)
Phase E lands the MLX-only inference agent with autoregressive multi-select and a submission-packaging script. Phase F adds the memory API with persistent scratch registers and TBPTT support (with subsequent fixes for episode/side boundaries, value_and_grad typing, memory_in broadcast, chunk-boundary reset).
428be76 feat(E): MLX-only agent with autoregressive multi-select + submission script
75ae036 feat(F): memory API with persistent registers + TBPTT support
d4da903 fix: use value_and_grad for TBPTT loss function
f5a4bc8 fix: reset TBPTT memory at episode/side group boundaries
6f7067b fix: carry only last timestep memory between TBPTT chunks
85f65dd fix: broadcast memory_in to batch size in _encode
b216f4f fix: read tbptt_chunk from config, not just CLI
Wiki: pokemon_tcg_tbptt_training_contract, pokemon_tcg_torch_inference (for the autoregressive multi-select semantics, which persist into the current PyTorch runtime).
Tournament + Elo split (2026-07-26)
Tournament identifies deck IDs and saves card usage for local matches; card Elo computation is filtered by source (no more mixing remote and local); dashboard shows both remote and local; INITIAL_ELO corrected from 1000 to 600; tournament auto-updates remote card/deck data when missing.
c695840 fix: card Elo computation filters by source — no more remote/local mixing
910e9d0 fix: dashboard shows both remote and local card/deck Elo
15bf88e fix: INITIAL_ELO changed from 1000 to 600
033e64c fix: tournament identifies deck_ids and saves card_usage for local matches
8b63658 feat: tournament auto-updates remote card/deck data if missing
Wiki: pokemon_tcg_sqlite_schema_current (source enum), pokemon_tcg_tournament_system.
Deck sweep, dashboard, replay viewer (2026-07-27)
Tournament gains sweep-decks + vs-self mode always active; a dashboard-based deck builder ships with dual Elo view, strength estimation, deck comparison, and use-deck flow; a replay-visualization tool + schema handoff docs land.
01cd7f1 feat: tournament sweep-decks and vs-self always active
ba83af3 feat: dashboard deck builder — dual Elo, strength estimation, compare, use-deck
52678e2 feat: add replay visualization tool and schema documentation for game analysis
3cc581e feat: add handoff replay schema documentation and update game state tracking
Wiki: pokemon_tcg_tournament_system (sweep semantics), pokemon_tcg_dashboard_and_tournament, pokemon_tcg_replay_data_model.
Prospective planner era (2026-07-29)
At the July 29 historical endpoint, the prospective (would-KO + RoPE-ND
planner) sidecar was designed, built, wired into inference and stress-tested.
This is a historical state, not the current runtime: the sidecar was removed
by a942373 on August 3 while the would-KO trio and several auxiliary ideas
survived in the primary pipeline. Multiple commits made up that historical
phase: fix temporal BC + self-contained inference; complete compact would-KO
prospective pipeline; rebuild results DB from normalized replay evidence; ship
PyTorch-only recurrent prospective inference; train temporal planner with
bounded FP16 batches; parallelize prospective rollout generation; fix
prospective reward balancing and action coverage; refresh the operational
contract.
939b57b fix temporal BC training and self-contained inference
2996583 complete compact would-ko prospective pipeline
5beaac9 rebuild results database from normalized replay evidence
45a6f43 ship pytorch-only recurrent prospective inference
ca91b74 train temporal planner with bounded fp16 batches
770364b add real prospective RoPE-ND planner foundation
acbbea0 parallelize prospective rollout generation
10c3750 fix prospective reward balancing and action coverage
98b906f docs: refresh pokemon operational contract
8aae2cb mlx
b9c2154 almost there
The commits with informal messages ("mlx", "almost there") carry the plumbing that connected the planner to the trainer and to the inference agent.
Wiki: pokemon_tcg_would_ko_prospective_search (would-KO stays; RoPE-ND and planner are historical), pokemon_tcg_prospective_v2 (historical planner design). This whole direction gets rolled back in 2026-08-03 — see below.
Corpus expansion (2026-07-31)
99aa7ec expanded zips only for research
More Kaggle replay zips are downloaded into data/bc_replay_zip/. No code change; corpus grows.
The pivot — sidecar removed, aux heads + meta features + Parquet (2026-08-03)
The single most consequential commit in the timeline. The prospective sidecar (a separate second model) is removed in favor of integrated auxiliary heads on the primary model; per-row meta features (agent bucket, deck bucket, day scalar) are added; the dataset writer moves from .npy shards to day-partitioned Parquet.
a942373 sidecar removed, aux heads + meta features + parquet pipeline
Then the pipeline is smoke-validated end-to-end with strict semantics, competition-day feature, and streaming TBPTT that reads directly from Parquet without materializing.
504118d smoke pipeline validated: strict semantics, competition_day, streaming TBPTT
Wiki: pokemon_tcg_parquet_dataset (current format), pokemon_tcg_agent_architecture (aux heads, meta buckets, day scalar), pokemon_tcg_data_pipeline (marked historical for the NPY era), pokemon_tcg_prospective_v2 (marked historical for the sidecar design).
Silent WIP (2026-08-04)
29f5cb9 idk bro
Diff-only reading: intermediate plumbing between the Parquet landing and the KV cache landing. Not a semantic milestone.
KV cache era (2026-08-06)
Two large commits reshape data retention and instrumentation:
e772fe0 train loader: KV-style parquet cache, async prefetch,
top-elo/per-day filters, tensorboard
fa38caa train loader: hierarchical KV cache (hot/transient + SSD spill),
opt-step protection, val streaming
The first commit introduces:
- an in-process cache over decoded Parquet row groups (the "KV cache" naming),
- a ThreadPoolExecutor prefetch worker (single, N+1 lookahead),
--top-elo Nand--max-rows-per-day Nfilters,- full per-optimizer-step tensorboard instrumentation.
The second commit replaces the flat cache with the three-tier hierarchical design (hot pinned / transient LRU / SSD spill), adds the in_opt_step() reentrant eviction suppression, and refactors val to stream through its own cache instance (eliminating the ~22 GiB val materialization).
Wiki: pokemon_tcg_kv_cache_hierarchical (current design), pokemon_tcg_top_elo_curriculum_filter (the filter added here), pokemon_tcg_training_pipeline (tensorboard instrumentation).
BC curriculum ablation suite (2026-08-06 to 2026-08-07)
The experiments/ directory convention and a resume-aware driver land:
bb72620 experiments: BC curriculum ablation suite + tournament JSON reports
This adds:
experiments/bc_curriculum_suite.sh— resume-aware, phased driver (train → per-run tournament → intra-suite round-robin → aggregate),--sweep-source {remote,local}, multi-value--opponent,--skip-baselines,--report-jsonontournament.py.
Two follow-up fixes:
e8d6a4a experiments: purge KV cache SSD spill after each training run
853ab34 experiments: use bash arithmetic for-loop in round-robin
The first cleans the .cache_spill/ directories that were filling the disk between runs (70 GiB accumulated across nine runs); the second replaces $(seq A B) with a C-style for-loop because macOS BSD seq A B with A > B emits a descending sequence instead of empty, causing one phantom self-pair matchup.
Wiki: pokemon_tcg_bc_curriculum_ablation (full methodology and findings), pokemon_tcg_tournament_system (CLI additions).
Config cleanup and docs (2026-08-07)
Deprecated fields removed from the training config:
--prefetch/prefetchfield — the pyarrow Scanner reads ahead intrinsically; cross-batch retention is the hierarchical KV cache's job.slab_rows— the MLX trainer has no fixed-size mmapped slabs anymore; the Parquet row group is the physical I/O unit.model_dir— unused.
Along with a project CLAUDE.md phase log summarizing the current state:
290d6f9 CLAUDE.md: current phase log — BC curriculum ablation complete, arch validated
Wiki: pokemon_tcg_train_config_reference (deprecations documented), pokemon_tcg_training_pipeline (canonical current pipeline page).
The research and governance consolidation (2026-08-08 to 2026-08-13)
The history between the August 7 ablation-suite cleanup and the August 14 handoff is not an empty gap. It contains the curriculum sweep orchestrator, the Stage 3 incident, the manuscript corpus, the local-rating and schema work, the sampling/ETL analysis and the first RoPEND/MoE blueprint. Several commits have informal subjects, so the semantic reading below is based on their file diffs rather than their messages alone.
Curriculum orchestration and rule evolution
00b3704 2026-08-08 aiaaaaaiaiaiaia cariok
f90ac1e 2026-08-11 feat(curriculum): add 3-model 5-deck sweep orchestrator, ETA tracking, and atomic Elo updates
6dc5a0c 2026-08-11 docs: add dialectical pair programming directive to GEMINI.md
4844ef9 2026-08-11 docs: update GEMINI.md with current project state and communication directives
1545f48 2026-08-11 docs: add Zero Polling Directive to GEMINI.md
c330547 2026-08-11 docs: systematic memory audit and ASD-STE100 rule refinement in GEMINI.md
fccf2dd 2026-08-11 docs: holistic non-append-only synthesis of GEMINI.md memory rules
f90ac1e adds the executable curriculum-v1 sweep orchestration surface, including model/deck combinations, ETA reporting and atomic Elo updates. The GEMINI.md sequence records operating rules and memory-governance changes; it is project history and instruction provenance, not evidence that a new model architecture shipped.
Stage 3, rating and manuscript layer
86aa528 2026-08-12 stage 3 torneio
0dec40f 2026-08-12 maths fixes
26b1e87 2026-08-12 best deck so far
d9c67a7 2026-08-12 docs and mini fixies on training
89deb7d 2026-08-12 diretrizes novas e changes no elo local
9bc5021 2026-08-12 idk - stages?
The 86aa528 diff adds the Abelian-group Elo formulation, Stage 3 tournament changes and database/rating modifications. 0dec40f changes the trainer's mathematical reduction path and is part of the later auxiliary-loss incident reconstruction. 26b1e87 changes the selected agent/deck.csv, preserving the “best deck” as an artifact choice rather than a model-architecture result. d9c67a7 adds the integrated monograph and all nine manuscript chapters while also changing training and tournament code. 9bc5021 stores Stage 1–3 FP32 archives. These commits are why the manuscript, deck and loss narratives must be read as a coupled historical layer with separate implementation and evaluation evidence.
Blueprint, schema and zero-trust ETL lineage
459f9d6 2026-08-13 a lot of lot
f697ce9 2026-08-13 before dawn
328d4f9 2026-08-13 idk bro, im tired
eb83bef 2026-08-13 weel weel weeel weel weel
14ec607 2026-08-13 Yaaay
dbf298a 2026-08-13 refactor(etl): 3-tier idempotency sync, bulk elo decoupling & katex directives
459f9d6 adds the first Magnum Opus/MoE blueprint, validation probes, leaderboard/deck artifacts and strict-FP32-related checks. f697ce9 introduces the separate RoPEND theory and stochastic-Elo documents. 328d4f9 adds the physical SQLite schema and rewrites catalog/ETL helpers. eb83bef adds ETL auditing, platform-coverage, timezone and normalization documents plus database rules. 14ec607 adds the follow-me rule and adjusts results/statistics behavior. dbf298a then records the explicit three-tier idempotency, bulk-Elo separation and KaTeX directive change.
This phase is the bridge between implementation evidence and the later handoff. It contains real code and data changes, but the RoPEND/MoE material remains a blueprint until a live implementation path and acceptance evidence exist.
Phase G — Handoff, blueprint and convergence wave (2026-08-13 to 2026-08-14)
The project then moved from implementation-focused maintenance into a documented research handoff. The sequence added the ETL/idempotency and Elo maintenance edits, the master RFC, the Metanoia suite, PageRank/Abelian research, cross-harness transcript ledger, milestone blueprints, E2E test scaffolding and the Odyssey Diary. These artifacts describe intended gates and research direction; they do not prove that the proposed runtime exists.
dbf298a 2026-08-13 refactor(etl): 3-tier idempotency sync, bulk elo decoupling & katex directives
14ec607 2026-08-13 Yaaay
955149b 2026-08-14 docs: create comprehensive technical handoff RFC for multi-agent adversarial research
cec2eab 2026-08-14 docs: add 3-level deep specifications for neural engine, dataset pipeline, empirical ablations & update master RFC
c104f5b 2026-08-14 feat(metanoia): add 4-part metanoia suite, modernize skills & integrate provenance ledger into master RFC
41438ec 2026-08-14 docs(metanoia): add Spec 05 on HALT protocol, Jungian metanoia, hypersigils & Gemma 4 tokenization mechanics
4321ad2 2026-08-14 feat(wikifita): install wikifita skill, author Metanoia Spec 06 & update master RFC
936d301 2026-08-14 docs(pagerank): author PageRank & Abelian Graph Invariance monograph & update master RFC
f988eb0 2026-08-14 feat(blueprints): commit multi-agent project blueprints, test infra & survey artifacts
ea9317a 2026-08-14 chore(git): ignore all *.db, *.db-shm, and *.db-wal binaries; sync GEMINI.md state
12595d4 2026-08-14 docs: add cross-harness adaptation guide and complete transcript filesystem ledger
a71318e 2026-08-14 docs: register sociological compute quota context and sovereign handoff horizon
20d7d0d 2026-08-14 docs: add AGENTS.md Odyssey Diary and multi-agent convergence contract
The current source-tree check after this wave finds no tracked RoPEND, MoE, vehicle-draft or Apex implementation. M1/M2/M3 gates remain pending or in progress in .agents/; M4/M5 remain planned in PROJECT.md. See pokemon_tcg_current_state_reconciliation.
Low-signal commits and evidence boundary
The repository contains additional informal commits between semantic milestones, including 1eb6129, 71861bf, 10421a7, 9c955dd, 1c828f8, 831fdf1, dc43ec6, 6b32768, 5ac5277, a505d22, 28c7008, fc8bdc1, 6d1598a, 15a5dda, 398178b, b27d2ba, 29f5cb9 and several August 12–13 operational snapshots. They remain reachable in the 144-commit history. Where their diffs are purely checkpoint, configuration, cleanup or transient experiment changes, this page groups them under the surrounding phase rather than inventing a semantic milestone from an informal commit subject.
The rule is conservative: a low-information subject does not make the diff irrelevant, and a large diff does not make its proposal implemented. The detailed source map in pokemon_tcg_docs_corpus_provenance and the current reconciliation page provide the file-level join points.
Cross-branch consolidation note
The git log --all listing contains many pairs of adjacent commits with identical messages between 2026-07-26 and 2026-07-27:
712c66a / 7d674e9 "chore: update training configuration parameters ..."
01cd7f1 / 715b854 "feat: tournament sweep-decks and vs-self always active"
ba83af3 / 4ed530f "feat: dashboard deck builder — dual Elo ..."
...
These are the result of a merge from a parallel branch (mlx-port at the time) into the active line, preserving both sides of the branch history. The trees are equivalent per pair; the second hash exists so git log --all sees the branch pointer. Not a data-loss risk.
Phases that landed vs the migration plan
| Migration plan phase | Delivered | Live-state page |
|---|---|---|
| A — Canonical MLX contract | ✅ 2026-07-25 (commits 517ee0f–9422dad) | pokemon_tcg_mlx_migration |
| B — Semantic P0 fixes | ✅ 2026-07-25 (commits 2daf8be, 0d1e5f4) | pokemon_tcg_agent_architecture |
| C — FP16 trainer | ✅ 2026-07-25 (9e92d1d) | pokemon_tcg_training_pipeline |
| D — Data compaction + episode meta + val split | ✅ 2026-07-25 (277a5b5), absorbed into Parquet 2026-08-03 (a942373) | pokemon_tcg_parquet_dataset |
| E — Inference semantics (full logs, autoregressive multi-select) | ✅ 2026-07-26 (428be76) | pokemon_tcg_torch_inference |
| F — Minimal recurrence + TBPTT | ✅ 2026-07-26 (75ae036 + fixes) | pokemon_tcg_tbptt_training_contract |
| Post-plan: sidecar experiment | ✅ 2026-07-29, then ❌ removed 2026-08-03 (a942373) | pokemon_tcg_prospective_v2 (historical) |
| Post-plan: Parquet + aux heads + meta | ✅ 2026-08-03 (a942373, 504118d) | pokemon_tcg_parquet_dataset |
| Post-plan: hierarchical KV cache | ✅ 2026-08-06 (fa38caa) | pokemon_tcg_kv_cache_hierarchical |
| Post-plan: BC curriculum ablation | ✅ 2026-08-06/07 (bb72620, e8d6a4a, 853ab34) | pokemon_tcg_bc_curriculum_ablation |
The six migration phases and the earlier post-plan experiments landed as recorded above. The later handoff wave is a separate planning and research layer. It must not be counted as delivery of the future RoPEND/MoE, elite-dataset, PageRank-isomorphism, 500-match or Apex acceptance gates.
Where each wiki page draws its evidence
| Wiki page | Anchor commits |
|---|---|
| pokemon_tcg_agent_architecture | Phase A+B (517ee0f–0d1e5f4), a942373 (aux heads + meta), 75ae036 (scratch persistence) |
| pokemon_tcg_training_pipeline | 9e92d1d (historical FP16), a942373 (parquet+aux), fa38caa (KV cache), e772fe0 (tensorboard), 290d6f9 (phase log), 20d7d0d (current FP32 reconciliation) |
| pokemon_tcg_kv_cache_hierarchical | e772fe0 (KV cache initial), fa38caa (hierarchical), e8d6a4a (spill cleanup) |
| pokemon_tcg_parquet_dataset | a942373 (parquet writer), 504118d (streaming TBPTT reads) |
| pokemon_tcg_sqlite_schema_current | c695840 (source split), 033e64c (deck IDs + card usage), 15bf88e (initial elo), live PRAGMA table_info |
| pokemon_tcg_tournament_system | 01cd7f1 (sweep), bb72620 (JSON reports + multi-opponent + skip-baselines), 853ab34 (round-robin loop fix) |
| pokemon_tcg_torch_inference | 428be76 (autoregressive multi-select), 45a6f43 (pytorch-only inference), 290d6f9 (contract snapshot) |
| pokemon_tcg_top_elo_curriculum_filter | e772fe0 (filter introduced), pokemon_tcg_bc_curriculum_ablation (findings) |
| pokemon_tcg_bc_curriculum_ablation | bb72620 (suite), fa38caa + e8d6a4a (cache stability during runs) |
| pokemon_tcg_train_config_reference | Config series (2e8fd34, cc1c90b, 1424e33), plus 2026-08-07 deprecation cleanup |
| pokemon_tcg_tbptt_training_contract | 75ae036 (memory API), fixes d4da903, f5a4bc8, 6f7067b, b216f4f |
| pokemon_tcg_current_state_reconciliation | 20d7d0d current source snapshot, f988eb0 milestone scaffolding, dbf298a/14ec607 ETL and rule maintenance |
| pokemon_tcg_docs_corpus_provenance | 955149b through 20d7d0d handoff, manuscript, Metanoia, blueprint and transcript-ledger commits |
| pokemon_tcg_stage3_training_failure_postmortem | 0dec40f auxiliary-loss change, Stage 3/4 logs, 459f9d6 FP32 correction and Antigravity reports |
| pokemon_tcg_implementation_specification | 05c4435 target services, deterministic workflows and acceptance contract; live status checked at 20d7d0d |
| pokemon_tcg_schema_evolution | 05c4435 current-versus-relational-v2 design; physical boundary checked against rl/results_db.py at 20d7d0d |
| pokemon_tcg_arena_future_architecture | 05c4435 synchronous arena and future application/worker seam; no distributed runtime at 20d7d0d |
| pokemon_tcg_entity_normalization | eb83bef heuristic document plus Antigravity scratch probes; no tracked production resolver |
| pokemon_tcg_manuscript_chapter_lineage | d9c67a7 nine chapters and integrated monograph, cec2eab empirical companion |
Cross-references
- pokemon_tcg_ai_battle — project hub
- pokemon_tcg_mlx_migration — the migration contract this timeline executes
- pokemon_tcg_training_pipeline — canonical current-state pipeline
- pokemon_tcg_bc_curriculum_ablation — the ablation the recent commits produced
- pokemon_tcg_docs_corpus_provenance — complete source-file and Git provenance map
- pokemon_tcg_manuscript_chapter_lineage — chapter-level manuscript provenance
- pokemon_tcg_entity_normalization — normalization analysis and uncertainty boundary
- pokemon_tcg_glossary — vocabulary