- correction #6: clone on ext4; Claude commits in WSL (auth-free); user pushes/pulls via GitHub Desktop on Windows over \\wsl.localhost; never git push from the WSL CLI; core.filemode=false to avoid cross-OS churn - mark B1 clone step done; B0/Blockers now only need the Anthropic sign-in - no gh auth required (gh installed but unused for auth)
8.1 KiB
CURRENT_PHASE — Phase 1: Repo governance + WSL RE stack + first import
Status: in progress · Started: 2026-06-10 · Plan approved: yes (harness plan mode)
This is the in-phase log (crash/compaction/handoff recovery point). Read it after
PROJECT_CONTEXT.mdand anyPhaseEnd_*.md. When Phase 1's milestone is confirmed, this content is absorbed intoPhaseEnd_Phase1.mdand this file is deleted.
Corrections to the constitution recorded this phase
These post-generation decisions override the original (Fable-5) PROJECT_CONTEXT.md where they conflict. The constitution's env sections were surgically corrected on 2026-06-10 to match; these are the authoritative statements:
- All-in-WSL (Linux-first). Everything runs inside WSL2 Ubuntu 24.04 on a single ext4 clone (
~/bfm-decomp): Claude Code, Ghidra (GUI via WSLg) + GhidrAssistMCP + ghidra_psx_ldr, build toolchain, PCSX-Redux. No Windows/WSL split, no two-clone, nowsl.exe, no/mntbuilds, no mirrored networking. MCP is local at127.0.0.1:8080. (Supersedes the original Windows-hybrid/two-clone design; rule H2 now = "build on ext4, one clone".) - H1 relaxed while private. ROM-derived content (asm/, assets/, extracted/, decompressed .CD) MAY be committed; accidental inclusion is not a violation. Compliance = pre-public history scrub + a rom→decoder regeneration tool. The raw multi-GB dump stays ignored (GitHub >100 MB limit; reproducible). Decision: commit freely + push to the private remote + scrub before public.
- All tools live under
tools/(incl.tools/binfor downloaded compilers,tools/psyq*for native PsyQ binaries). - Plan mode every phase (harness plan mode) before executing — Drew's standing preference.
- No
Co-Authored-Bytrailer on commits (overrides the harness default) — Drew's instruction 2026-06-11. - Git workflow = WSL-commit / GitHub-Desktop-push (decided 2026-06-13). The clone lives on ext4 in WSL (H2). Claude makes commits in WSL (local, auth-free — only name/email needed). The user reviews and pushes/pulls with GitHub Desktop on Windows, pointed at the repo over
\\wsl.localhost\Ubuntu-24.04\home\musashi\bfm-decomp. So no git credentials are configured in WSL andgit pushis never run from the WSL CLI (it would prompt for auth that isn't set up) — pushing is GitHub Desktop's job.core.filemode=falseis set in the clone to avoid cross-OS mode churn (supersedes thecore.filemode trueline in docs/SETUP.md §4.3 for this topology).ghis installed but unused for auth.
To formalize in PhaseEnd_Phase1.md under "Rules Added" (P10): the H1 relaxation, the all-in-WSL H2 restatement, tools-in-tools/, plan-mode-per-phase, no-commit-co-author, and the WSL-commit/GitHub-Desktop-push workflow.
Verified facts (this session)
- Install assets confirmed (web): Ghidra
ghidra_12.1_PUBLIC_20260513.zip(pin 12.1 exactly — 12.1.2 exists since 2026-06-05 but extensions only ship 12.1 assets); JDK 21 Temurin; GhidrAssistMCP v2.8.0 (ghidra_12.1_PUBLIC_20260530_GhidrAssistMCP.zip); ghidra_psx_ldr 2026.06.04 (ghidra_12.1_PUBLIC_20260604_ghidra_psx_ldr.zip). Extension assets are platform-independent Java → same filenames on Linux Ghidra. - Disc integrity (redump): Track-1 SHA1
b44f0f0a19936f23b26188b658e13201a6a9c211, CRC32c238191b, build date 1998-08-25. TheSLUS_007.26EXE hash is not publicly documented (expected); our extractor produces SHA1143dbb89f34491258bbc27810d0a12ec8b43a8dd(413,696 bytes), independently reproduced from raw sectors.--verify-discchecks Track-1 vs redump as the canonical proof. - PsyQ stamps (EXE scan): 12 genuine — 9× 4.0 (libnums 2,3,4,6,7,8,9,17,24), 1× 4.0.1x (16), 1× 4.2 (0), 1× 4.2.1x (12). ⇒ GCC 2.7.2 family. ghidra_psx_ldr detection at import is the final word.
Task checklist (approved plan)
A. Finalize repo, then hand off to WSL (this Windows session) — COMPLETE
- Extractor
tools/bfm_extractbuilt + adversarially verified (done early) - Constitution surgical correction (PROJECT_CONTEXT.md env sections → all-in-WSL + H1 note)
.gitignoreH1 relaxation (un-ignore asm/ assets/ extracted/ *.CD.dir; keep dump + build churn ignored)docs/SETUP.md→ Linux-first (verified pass; all facts preserved; redump disc-provenance added)- Extractor hardening +
--verify-disc(PASS: Track-1 SHA1 == redump b44f0f0a…) - Root research-file cleanup →
docs/history/(+ SUPERSEDED banner on starting-point doc) - Commit per task (clean handoff) — section-A commits on
main, not yet pushed (push from WSL where auth works)
B. Migrate to WSL (collaborative — user relaunches Claude Code in WSL)
B0. WSL environment bootstrap — DONE 2026-06-13 (from the Windows session, after the user enabled BIOS virtualization):
- WSL2 confirmed healthy (v2.7.8.0, kernel 6.18, WSLg present, default v2) — but no distro was installed; that was the gap the BIOS change exposed
Ubuntu-24.04installed (24.04.4 LTS "Noble") as the default WSL2 distro (--no-launch, no interactive first-run)- User
musashicreated (uid 1000): passwordless sudo via/etc/sudoers.d/90-musashi(visudo-validated), set as default login user via/etc/wsl.conf[user] default=musashi - Git identity set global:
user.name=Drew T,user.email=50529377+Druthulu@users.noreply.github.com,init.defaultBranch=main;gh2.45.0 +unzip6.0 installed - Claude Code 2.1.177 installed (native installer →
~/.local/bin/claude;~/.local/binappended to~/.bashrcPATH;claude --versionresolves in a fresh interactive shell) - USER — interactive: run
claudein a WSL terminal → sign into Anthropic (OAuth code/paste flow). Git needs no WSL auth — push/pull is GitHub Desktop on Windows (see correction #6).
B1. Establish the clone + sync:
- Seeded
~/bfm-decomp(ext4,/dev/sdd) from the local Windows repo (git clone /mnt/z/Storage/git/BFM-decomp ~/bfm-decomp; HEAD up to date with this log).originre-pointed tohttps://github.com/Druthulu/BFM-decomp.git;core.filemode=falseset. First push is via GitHub Desktop on Windows (Add Local Repository →\\wsl.localhost\Ubuntu-24.04\home\musashi\bfm-decomp→ Push), NOTgit pushfrom WSL. - Make the dump available in
disks/(one-shot copy onto ext4 — the dump is not in the repo) - Relaunch Claude Code inside WSL (in
~/bfm-decomp); this Windows session ends - Install RE stack in WSL (JDK 21, Ghidra 12.1, ghidra_psx_ldr, GhidrAssistMCP); start MCP server
C. First import + milestone (in WSL)
- Run extractor →
extracted/SLUS_007.26;--verify-discPASS (Track-1 == redump) - Import into Ghidra (WSLg): PSX loader, auto-analyze + PsyQ signatures, record PsyQ version, attach
psyq400.gdt, MCP type-resolution test - MCP round-trip:
/mcp~38 tools;get_binary_info; decompile0x80018730 - MILESTONE: MCP decompile of
0x80018730≈ LZSS decompressor; PsyQ version recorded → user confirm →PhaseEnd_Phase1.md
Next task
Section B — migrate to WSL (bootstrap + clone done; sign-in + relaunch next). The WSL2 environment is up and ~/bfm-decomp is cloned on ext4 with origin→GitHub (B0/B1). Remaining: the user signs into Anthropic by running claude in a WSL terminal (git needs no WSL auth — GitHub Desktop on Windows pushes, correction #6); push the current commits once via GitHub Desktop; copy the dump into disks/; relaunch Claude Code inside ~/bfm-decomp; then install the RE stack per docs/SETUP.md §2. Resume from this log inside the WSL clone.
Blockers / needs-user
- Anthropic sign-in (only the user can do this): run
claudein a WSL terminal → sign in (OAuth code/paste flow). Git needs no WSL auth. - GitHub Desktop (Windows): Add Local Repository →
\\wsl.localhost\Ubuntu-24.04\home\musashi\bfm-decomp→ Push to sync. If it warns "unsafe / dubious ownership," accept its one-click fix (Git-for-Windowssafe.directory). - Confirm the GitHub repo
Druthulu/BFM-decompis set to Private before any push. - RE-stack install + EXE import (Section C) require driving Ghidra's WSLg GUI; do them from the in-WSL Claude session.