Files
BFM-decomp/tools
Drew T e76cb1c89e phase-36: fix the instrument four agents asked for — alloc_table now covers every pseudo and asserts its own coverage
tools/alloc_table.py had only ever printed pseudos that landed in $s0-$s7/$fp, and it depended on 'Register N in M.'
lines the dumps often do not emit — so two agents in the burst were handed an EMPTY or one-row table and read it as an
answer. That is the silently-narrowed-scope defect class: a true number about a scope far narrower than the reader
believes.

- it now prints every pseudo with refs, live length, block, conflicts, copy preferences and allocno_compare's priority,
  takes the hard register from either dump, and ASSERTS ITS COVERAGE against the .greg order line (R32) — a named gap and
  a non-zero exit instead of a confident subset. A missing dump section is refused loudly rather than printed as an
  empty table.
- documented honestly: .greg carries the INPUTS to global allocation (order, conflicts, preferences), not the final
  assignment, so a global allocno's hard register prints as '-'. That is the dump's shape, not a gap.
- verified on a real dump from an agent's pack: 4 pseudos, the order line, preferences and conflicts all parsed,
  coverage OK. The old tool would have printed nothing for it — none of the four is callee-saved.
- tools/cc1_dumps_tu.sh: add -I<the TU's own directory> (an agent found it silently preprocessing to 44 lines and
  exiting 0 on any TU with relative includes), add -dR for the post-reload schedule, and REFUSE a preprocess under 200
  lines instead of producing empty dumps.
- the agent brief now says to read the allocation table first for any register residual, that the .greg assignment is
  absent by design, and that the residual text cannot distinguish a missing instruction from wrong registers — one agent
  chased a register lever for hours when the defect was a cse store-to-load forward that had deleted a load.
2026-09-10 11:05:21 -06:00
..
tools+docs(phase-33.5): task 13.5 — the tools audit + the two dictionaries: tools/tool_census.py (two agreeing enumerations of 327 tool files; docstring/SETUP row/consumers/class derived from the tree; the authored half in config/tool_dictionary.tsv — phase · portability · the NEED each tool answers · what · adapts · verdict — with coverage asserted both ways) → docs/tool-index.md (need-keyed, KEEP-GEN, Reference-index row, wiki + how-to pointers), the kit's tools/MANIFEST.md regenerated (header states live 293 + superseded 28 = 321 rows), and the two verbatim corpora in-tree (Drew, confirmed S91): decomp-architect/corpus/tools/<phase>/ (302 copies + 28 superseded pointers + INDEX) and corpus/cookbook/ (the cookbook, its symptom index, the codegen map, a front page stating what transfers per compiler) — sha1-equal to their sources by tool_census --check in tools-health, regenerated by make kit-corpus; kit_lint exempts the corpus dirs (verbatim evidence) but syntax-checks them; G66 (consult the tool dictionary first) + G67 (translate an inherited idiom through its pass) + two memory seeds (34 at install); SETUP Step 6 installs docs/knowledge-corpus.md and checks the manifest against its own stated total; the ops-setup dictionary rows; the intake's Phase 7 cites G66/G67 and Phase 10 + Part C name the raw-cast → declared-symbol step; templates/layout-contract.md (the five-tool probe, a draft for the split). The review under Drew's criterion: 93 no-consumer tools (one Opus agent's draft, verified: 0 defects, every successor live, 0 live consumers, 0 collisions; four one-off verdicts overturned to STILL-NEEDED) → 34 retired by git mv to tools/sunset/ (28 superseded, 6 one-offs; README review table; SETUP rows moved; Archive-index group). Run 4 (fresh throwaway, the final kit): stopped on my Step-6 check (321 vs the live 293) → both sides derived → resumed → PASS 10/10, manifest 56 == 56, 4 commits, guardrails held (the one foreign path was the timeline regenerated by the detached tools-health). tools-health OK; doc_links --strict rc 0; audit_public OK over 6,842 paths; the purge probe PASSED (Phase 34's gate open). decision-log "P33.5 S91" + accelerators "P33.5 S91" banked; log + checkpoint (NEXT = task 14, xHigh, fresh session)
2026-09-07 22:09:15 -06:00

tools/

Everything under tools/ that this project wrote — the extractor, the byte gate, the matching harness, the campaign machinery, the audits, the Ghidra scripts, the public-flip rewrite package — is licensed under the GNU Affero General Public License v3.0 (the repository's LICENSE). There are no per-file license headers; this statement covers them.

Third-party pieces under tools/ keep their own licenses and are listed in the top-level THIRD_PARTY.md: tools/brave-CUE/ (GPL-3.0, vendored source), the pinned submodules tools/maspsx (MIT), tools/decomp-permuter (MIT), tools/asm-differ (Unlicense) and tools/m2c (GPL-3.0), and the gcc-2.7.2 compiler tarballs under tools/bin/ (GCC, GPL). The Sony SDK directory tools/psyq/ is never part of the repository — it is user-supplied and gitignored.

Where each tool fits and how to run it: docs/SETUP.md ("Tooling inventory"), docs/wave-playbook.md (the matching procedure) and docs/public-flip-runbook.md (the publication procedure).