curate_brief.js: declare taken-over free functions in a header, keep decompilation notes, full include paths

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-20 00:41:48 -05:00
1 parent d5c7b29bad
commit a7061306fa
1 file changed
+3 -1
+3 -1
View File
@@ -21,6 +21,8 @@ Read these before starting:
Conventions added since wave A, which every agent this wave follows: Conventions added since wave A, which every agent this wave follows:
- Manager is taken over (src/manager.h). Reach the subsystems through g_manager by the generated member name without the leading underscore: g_manager->stringTable, g_manager->optionsConfig, g_manager->itemConfig, g_manager->entityConfig, g_manager->modManager ... Read manager.h for the exact names. - Manager is taken over (src/manager.h). Reach the subsystems through g_manager by the generated member name without the leading underscore: g_manager->stringTable, g_manager->optionsConfig, g_manager->itemConfig, g_manager->entityConfig, g_manager->modManager ... Read manager.h for the exact names.
- A taken-over class gets no generated stubs. Every method your header declares but you do not write yet gets a one-line definition calling reconstruction_missing("Class::Method 00xxxxxx") from src/log.h, so the build keeps linking and stops there with a clear message. - A taken-over class gets no generated stubs. Every method your header declares but you do not write yet gets a one-line definition calling reconstruction_missing("Class::Method 00xxxxxx") from src/log.h, so the build keeps linking and stops there with a clear message.
- A free function you take over (not a class method) must also be declared in one of your headers: the generator drops it from classes.h once src/ carries its address, so its other callers need your header.
- Never delete decompilation write-ups (docs/, *.md with addresses). When you retire an old module, move its notes into notes/systems/ instead.
- Comments: a comment starting with an address takes that function over. So does every address in a parenthesised list on a comment, like "(0040b000, 0040b1d0, 00a1a5c0 to 00a1a630)" (ranges included). - Comments: a comment starting with an address takes that function over. So does every address in a parenthesised list on a comment, like "(0040b000, 0040b1d0, 00a1a5c0 to 00a1a630)" (ranges included).
- src/data.h has resource_path(path) (lowercased, under resources/) for any non-JSON resource, and data_path(path) for converted XML. .anm2 files are Anm2Ed JSON documents, already handled by src/anm2.h. - src/data.h has resource_path(path) (lowercased, under resources/) for any non-JSON resource, and data_path(path) for converted XML. .anm2 files are Anm2Ed JSON documents, already handled by src/anm2.h.
@@ -47,7 +49,7 @@ How to take over a class:
- Behaviour must match the original exactly: same results, same order of effects, same edge cases. Where the original crashes or has undefined behaviour, pick a safe behaviour and say so in one comment line. - Behaviour must match the original exactly: same results, same order of effects, same edge cases. Where the original crashes or has undefined behaviour, pick a safe behaviour and say so in one comment line.
- Data: XML is converted by the import tool into JSON under resources/ (lowercase paths, ".json" appended). Read it through src/data.h: data_load, node_children, node_tag, node_attr, node_text. Element order is preserved and attribute values are the original strings. A file with several roots becomes {"tag":"#document","children":[...]}. Convert values exactly as the original did. resources/ holds the real converted game files: look at them. - Data: XML is converted by the import tool into JSON under resources/ (lowercase paths, ".json" appended). Read it through src/data.h: data_load, node_children, node_tag, node_attr, node_text. Element order is preserved and attribute values are the original strings. A file with several roots becomes {"tag":"#document","children":[...]}. Convert values exactly as the original did. resources/ holds the real converted game files: look at them.
- Other classes: call whatever classes.h declares for classes nobody has taken over (they are stubs for now). Do NOT edit src/ files other than your own: other agents are rewriting other classes at the same time. If a round 1 file outside your assignment calls something you changed, list the needed call-site change in your report. - Other classes: call whatever classes.h declares for classes nobody has taken over (they are stubs for now). Do NOT edit src/ files other than your own: other agents are rewriting other classes at the same time. If a round 1 file outside your assignment calls something you changed, list the needed call-site change in your report.
- Every file you write must compile with no warnings: clang++ -std=c++20 -fsyntax-only -Wall -Wextra -I src -isystem ${R}/gen_\${i} -isystem external/simdjson/singleheader -isystem external/sdl/include src/<file>.cpp - Every file you write must compile with no warnings: clang++ -std=c++20 -fsyntax-only -Wall -Wextra -I src -isystem ${R}/gen_\${i} -isystem external/simdjson/singleheader -isystem external/sdl/include -isystem external/lua -isystem external/stb src/<file>.cpp
- First regenerate your private header with python3 -I scripts/source_tree.py ${R}/gen_\${i} classes.tsv dump zhl_vtables.tsv. Rerun it after creating your .h, because the generator drops the classes your header defines. - First regenerate your private header with python3 -I scripts/source_tree.py ${R}/gen_\${i} classes.tsv dump zhl_vtables.tsv. Rerun it after creating your .h, because the generator drops the classes your header defines.
- Round 1 files that depend on your old API may stop compiling. That is expected, so only check your own files. - Round 1 files that depend on your old API may stop compiling. That is expected, so only check your own files.
- Style details from CLAUDE.md: - Style details from CLAUDE.md: