This file provides guidance and important rules working with code in this repository.
- Use a progressive disclosure approach for agent coding in this repository: start from high-level information in the Basic Memory knowledge base first, and only locate/read specific files or symbols when necessary, instead of expanding a large amount of context at once.
- Notes live in
memory/(markdown with YAML frontmatter:title/type/permalink), tracked in git. - Prefer Basic Memory MCP tools (
search_notes/read_note/write_note/edit_note) only when their project resolves to this repository'smemory/directory. Verify the project binding before writing; when no matching project is available, read and edit the local markdown files directly. - Notes use the
utilhttpclient-steamapi/permalink prefix to distinguish them from the source repository.
- Project overview, provenance, Steam request lifecycle, host requirements and backend limitation:
project_overview - C/C++ formatting toolchain, commands and check scope:
CppFormatting
- Build:
CMakeLists.txt(links the sharedSteamAPIBridgetarget),cmake/,scripts/build-UtilHTTPClient_SteamAPI-x86-{Debug,Release}.bat - Library sources:
src/UtilHTTPClient_SteamAPI.cpp(client, request family, response family, URL parsing and the exports at the end of the file),src/dllmain.cpp - Public API / interface:
include/Interface/IUtilHTTPClient.h— shared with the libcurl backend, so a change here affects both repositories - Steamworks: read-only
STEAMSDK_SOURCE_PATHheaders; SteamAPIBridge resolves the host runtime.STEAMAPIBRIDGE_SOURCE_PATHoverrides the bridge's fixed FetchContent commit. No steam_api.lib link. - Tests:
tests/SmokeTests.cpp, run by CTest (BUILD_TESTINGdefaults toONin the scripts) - Docs:
README.md,README.zh-CN.md; dependency terms live in the upstream repositories - External sources, all read-only inputs:
METAHOOK_SOURCE_PATH,SCOPEEXIT_SOURCE_PATH; pins are fetched only when the corresponding override is empty. The build uses C++20 and a static CRT, for Windows x86 only - Build output:
build/x86/<configuration>/; install output:install/x86/<configuration>/. Neither is tracked, and nothing is deployed into a game
- Read notes first, then locate a single file/symbol; do not read the whole repository at once.
- Prefer correctly scoped Basic Memory MCP tools for knowledge retrieval; otherwise use the local notes before reading source.
- Prefer Context7 for external dependency/library usage (query on demand).
- Preserve the exported interface versions (
UtilHTTPClient_SteamAPI_007andUtilHTTPClientFactory_SteamAPI_007), theIUtilHTTPClientvtable layout and the shared header's ABI unless an interface change is explicitly requested; the libcurl backend and its consumers must keep compiling against the same header. - Keep the Steam-side contracts intact:
RunFrame()is a pool janitor only (Steam drives transfers through callbacks), the request destroys itsIUtilHTTPCallbacks, and a synchronous wait depends on the host pumpingSteamAPI_RunCallbacks(). - Known gaps are documented behavior, not bugs to silently paper over:
SetFollowLocation()is unsupported by the backend,GetResponseErrorMessage()is always empty, and the async wait/response methods are stubs. If one changes, updatememory/project_overview.mdand both READMEs together. - Do not modify external dependency trees or fetched vendor sources, including the
thirdparty/SteamSDKsubmodule and the Steamworks import library. Explicit source trees are read-only inputs. - Run both x86 Debug and Release build scripts for relevant changes; they configure, build, run CTest and install. Keep tests focused on public behavior and DLL integration.
- Build, install and dependency-cache directories are ignored. Do not commit, push or publish without authorization.