From eb5456e7c11f0842fb76e983b01234a5481cb0d3 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 27 Oct 2026 14:43:03 +0000 Subject: [PATCH] Move project config to data/ and configure-clangd.ps1 to scripts/ --- AGENTS.md | 4 ++-- CODING_RULES.md | 6 +++--- README.md | 2 +- compile.json => data/compile.json | 0 decomp.json => data/decomp.json | 0 data/toolchain.lock.json | 10 ++++++++++ configure-clangd.ps1 => scripts/configure-clangd.ps1 | 11 ++++++----- 7 files changed, 22 insertions(+), 11 deletions(-) rename compile.json => data/compile.json (100%) rename decomp.json => data/decomp.json (100%) create mode 100644 data/toolchain.lock.json rename configure-clangd.ps1 => scripts/configure-clangd.ps1 (81%) diff --git a/AGENTS.md b/AGENTS.md index 249cd49..7dd245d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -220,7 +220,7 @@ td batch Name the exact locally checked payload and include all dependencies. Maintenance batches are maintainer-only; they run the source gates, compile affected units/includers and compare effective code with a fresh main build. A changed function uses the normal revision/review path instead. -The server registers new source units in `compile.json` on merge. A queued batch is not a merge. +The server registers new source units in `data/compile.json` on merge. A queued batch is not a merge. The linked-code check does not validate data contents or reconstruct initialization/teardown. Prove those separately before submitting. An offset-asserted partial layout is not evidence of a @@ -241,7 +241,7 @@ annotation is removed from main. IDs remain reserved; unrelated symbols must not ## Ragnarok target -Use only this workspace’s configured server and clank-together MCP. The project is rodecomp, version 2026-02-19. Preserve existing stable IDs and permitted OFFSET/STATIC provenance comments, except OFFSET annotations attached to inline-only functions. Missing original evidence is a blocker to a verdict, not permission to invent behavior. The source contains subsystem libraries, not a completed standalone game. Clank compiles individual units from compile.json; it does not run CMake or CTest during checks. +Use only this workspace’s configured server and clank-together MCP. The project is rodecomp, version 2026-02-19. Preserve existing stable IDs and permitted OFFSET/STATIC provenance comments, except OFFSET annotations attached to inline-only functions. Missing original evidence is a blocker to a verdict, not permission to invent behavior. The source contains subsystem libraries, not a completed standalone game. Clank compiles individual units from data/compile.json; it does not run CMake or CTest during checks. ## td binary > td --help diff --git a/CODING_RULES.md b/CODING_RULES.md index 5c0cba8..0138c0d 100644 --- a/CODING_RULES.md +++ b/CODING_RULES.md @@ -112,7 +112,7 @@ static void BuildFullKeyName(const char* keyname, char* buffer) { - Read `td_disassemble` as ground truth and `td_decompile` as a starting point, not a specification. - Run `td_check` on each changed translation unit independently while fixing compilation errors. -- After changing a header, check its includers before submitting. Compile using `compile.json`; Clank does +- After changing a header, check its includers before submitting. Compile using `data/compile.json`; Clank does not run CMake, CTest or a complete application link during these checks. - Validate the exact proposed payload against clean current server main, without unrelated working-tree changes. Include the real prerequisite interfaces, implementations and affected callers, or land them first. @@ -201,7 +201,7 @@ the original instructions. ### Korean string literals -Sources are UTF-8; `compile.json` passes `/source-charset:utf-8 /execution-charset:.949`, so write Korean +Sources are UTF-8; `data/compile.json` passes `/source-charset:utf-8 /execution-charset:.949`, so write Korean literals as Hangul (`"유저인터페이스\\item\\%s.bmp"`), not CP949 escapes. Keep `\x` escapes for bytes that are not CP949 Hangul: other code pages (Shift-JIS, GBK, Big5 font names), byte-order marks and key codes. Never use `/utf-8`, and never save sources as CP949/EUC-KR. @@ -211,7 +211,7 @@ Never use `/utf-8`, and never save sources as CP949/EUC-KR. - This target is Windows x86. Keep code in its assigned existing translation unit and subsystem headers. - Preserve fixed Win32, DirectDraw, Direct3D, Lua and codec boundary ABIs where evidenced; apply the calling-convention rule below. Preserve ownership, field widths and failure behavior. -- Compile individual units with the configured Clank toolchain and `compile.json`, not a new build system. +- Compile individual units with the configured Clank toolchain and `data/compile.json`, not a new build system. - Missing original instructions are a blocker, not permission to invent a fallback or partial implementation. ### Calling conventions: implicit by default diff --git a/README.md b/README.md index 3cdc21b..b8f8af4 100644 --- a/README.md +++ b/README.md @@ -3,5 +3,5 @@ This tree is coordinated with Clank Together. Functions and data carry stable symbol IDs instead of addresses (`// FUNCTION: fn_01234`, `// GLOBAL: gl_00042`); the coordinator's symbol database holds their addresses in every client build, so a new client version needs new addresses, not a retagged tree. -`decomp.json` and `compile.json` pin the VS compiler and the exact command line of every source. +`data/decomp.json` and `data/compile.json` pin the VS compiler and the exact command line of every source. See `AGENTS.md` for how to contribute. diff --git a/compile.json b/data/compile.json similarity index 100% rename from compile.json rename to data/compile.json diff --git a/decomp.json b/data/decomp.json similarity index 100% rename from decomp.json rename to data/decomp.json diff --git a/data/toolchain.lock.json b/data/toolchain.lock.json new file mode 100644 index 0000000..e63b744 --- /dev/null +++ b/data/toolchain.lock.json @@ -0,0 +1,10 @@ +{ + "ragnarok": { + "family": "msvc", + "version": "19.29.30159", + "machine": "x86", + "image": "rodecomp/compiler:v142", + "clSha256": "73e2bb370bfc32c04df58752b00f97db388207f29f2b7d4f23f5273e9dbfb212", + "sdkVersion": "10.0.19041.0" + } +} diff --git a/configure-clangd.ps1 b/scripts/configure-clangd.ps1 similarity index 81% rename from configure-clangd.ps1 rename to scripts/configure-clangd.ps1 index b87e153..008cc90 100644 --- a/configure-clangd.ps1 +++ b/scripts/configure-clangd.ps1 @@ -2,10 +2,11 @@ param() $ErrorActionPreference = 'Stop' -$root = $PSScriptRoot.Replace('\', '/') -$project = Get-Content -LiteralPath "$PSScriptRoot/decomp.json" -Raw | ConvertFrom-Json -$compile = Get-Content -LiteralPath "$PSScriptRoot/$($project.compileCommands)" -Raw | ConvertFrom-Json -$workspace = Get-Content -LiteralPath "$PSScriptRoot/.td/config.json" -Raw | ConvertFrom-Json +$repoRoot = Split-Path -Parent $PSScriptRoot +$root = $repoRoot.Replace('\', '/') +$project = Get-Content -LiteralPath "$repoRoot/data/decomp.json" -Raw | ConvertFrom-Json +$compile = Get-Content -LiteralPath "$repoRoot/$($project.compileCommands)" -Raw | ConvertFrom-Json +$workspace = Get-Content -LiteralPath "$repoRoot/.td/config.json" -Raw | ConvertFrom-Json $runner = $workspace.runners.PSObject.Properties[$project.toolchain].Value if (-not $runner -or $runner.type -ne 'native' -or -not $runner.toolchainRoot) { @@ -50,7 +51,7 @@ $commands = @( } ) -$outputDirectory = Join-Path $PSScriptRoot 'build/editor-x86' +$outputDirectory = Join-Path $repoRoot 'build/editor-x86' [void](New-Item -ItemType Directory -Path $outputDirectory -Force) $output = Join-Path $outputDirectory 'compile_commands.json' $json = ConvertTo-Json -InputObject $commands -Depth 6