Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,23 @@ jobs:
- uses: actions/checkout@v4
- name: Lint include graph + report dependency count
run: python3 tools/laige-include-lint

api-manifest:
# M0-TOOL-01: runs on every PR (no ci:* condition). The checked-in
# public API manifest (laige-api.json, PRD §9.4, NFR-13.1) must stay
# in sync with the public headers: this job regenerates it from the
# current headers with laige-api-scanner and fails on any drift, so
# adding a public symbol without regenerating the manifest fails CI.
# The CTest suite runs the same check against the real tree in every
# P0 job as well (tests/api, test `api-real-tree`).
name: Public API manifest drift
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
- name: Build scanner
run: cmake --build build --target laige-api-scanner -j
- name: Check manifest drift
run: ./build/bin/laige-api-scanner --root . --check laige-api.json
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# macos-arm64 macOS arm64, AppleClang (macos-15)
# macos-intel macOS Intel, AppleClang (macos-14)
# include-lint Include-graph lint + dependency count (M0-CI-03)
# api-manifest Public API manifest drift check (M0-TOOL-01)
#
# The include-lint job (M0-CI-03; NFR-8.11, NFR-8.13) is platform-
# independent — it parses the #include edges of src/** (PRD §10.1 rules:
Expand Down Expand Up @@ -248,3 +249,23 @@ jobs:
- uses: actions/checkout@v4
- name: Lint include graph + report dependency count
run: python3 tools/laige-include-lint

api-manifest:
# M0-TOOL-01 (PRD §9.4, NFR-13.1): the checked-in public API manifest
# (laige-api.json) must stay in sync with the public headers. This
# job regenerates the manifest from the current headers with
# laige-api-scanner and fails on any drift, so adding a public symbol
# without regenerating the manifest fails CI. The CTest suite runs
# the same check against the real tree in every P0 job as well
# (tests/api, test `api-real-tree`).
name: Public API manifest drift
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
- name: Build scanner
run: cmake --build build --target laige-api-scanner -j
- name: Check manifest drift
run: ./build/bin/laige-api-scanner --root . --check laige-api.json
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,5 @@ if(LAIGE_BUILD_TESTS)
# library-only build does not need them).
add_subdirectory(tools/fuzz)
add_subdirectory(tools/bench) # M0-CORE-08: laige-bench
add_subdirectory(tools/api) # M0-TOOL-01: laige-api-scanner
endif()
64 changes: 64 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Laige documentation

Documentation index and navigation (DOC-001). The engine is at **M0**
(foundations): `laige-core` is the only populated module, and the
sections below mark what exists and what is still to land.

## Build & tools

- [Building Laige](getting-started/building.md) — the source of truth for
the canonical build commands, build trees, options, compiler policy
(NFR-8.10), sanitizer builds (NFR-8.2), and the current M0 status.
Tool commands are reserved there: `laige-fuzz`, `laige-bench`,
`laige-detcheck`, the `laige-api` manifest target, and the
include-graph lint.

## API contracts (per public header)

- [Result / Status / error codes](api/errors.md) — `laige::Result<T,E>`,
`laige::Status`, the stable `ErrorCode` registry (M0-CORE-01).
- [Structured logging](api/logging.md) — the `laige::log` facade, sinks,
rate limiting, crash handling (M0-CORE-02; AGENTS §14).
- [SimMath deterministic math](api/sim_math.md) — the op surface plus the
`fp32_pinned` and `fpx16_16` backends, NaN/Inf policy, pinned-math
flags (M0-CORE-03/04; ADR 0002).
- [Memory pools](api/pools.md) — `ArenaPool<T>` and `Pool<T>` with
generation-checked handles and `PoolStats` accounting (M0-CORE-05).
- [Bounded JSON](api/json.md) — `laige::JsonValue`, `parseJson`,
`serializeJson`, `JsonOptions` bounds (M0-CORE-07; ADR 0003).
- [Budget harness](api/budget_harness.md) — `Histogram`, `TimeIt`,
`budgetCheck`, the AGENTS §12 report format, and the `budgets.json`
schema (M0-CORE-08).
- [PRNG](api/prng.md) — `laige::Prng`: the splitmix64/LCG64 hybrid,
period, and determinism contract (M0-CORE-06).

## Architecture decisions (ADRs)

- [ADR index](decisions/README.md) — 0001 (name and license), 0002
(deterministic math), 0003 (config JSON), 0004 (GoogleTest
vendoring).

## Not yet written (honest status)

- `concepts/` — architecture, coordinates (ARCH-008; lands as
`docs/concepts/coordinates.md` with M0-DOC-02 — until then the
coordinate system is documented in the `Vec2`/`Vec3` comments of
`src/laige-core/include/laige/sim_math.h`), lifecycle, threading.
- `guides/` — task-oriented usage (first game, profiling, determinism).
- `debugging/` — debug mode (AGENTS §15 lands in M3), logging in
production, troubleshooting.
- `benchmarks/` — method, baselines, and the regression policy
(the harness exists — `laige-bench`, M0-CORE-08 — but the recorded
baselines land with M1 workloads).
- `compatibility/` — platform/compilers/formats matrix (the P0 matrix
is in [building.md](getting-started/building.md) for now).
- Per-module API docs for the M1+ modules (`laige-sim`, `laige-render`,
`laige-assets`, `laige-net`, `laige-server`, `laige-script`,
`laige-editor`) — they land with their modules.

## Related

- [Roadmap index](../roadmap/README.md) — the M0/M1/... step plan;
[M0 foundations](../roadmap/M0-foundations.md) is the current
milestone.
- `AGENTS.md` — the engineering contract this documentation implements.
11 changes: 11 additions & 0 deletions docs/getting-started/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ pinned set and the NaN/Inf policy):
runs in every build tree — in the ASan tree it is instrumented and is
the step's sanitizer gate (NFR-8.7; PRD §14: fuzz "every commit
(bounded), nightly (long)").
- `api-fixture-scan`, `api-check-fresh`, `api-check-stale`,
`api-unsupported-construct`, `api-root-error`, and `api-real-tree`
are the M0-TOOL-01 CTest entries (`tests/api`): the public API
manifest scanner (`tools/api/laige-api-scanner`) runs against a
synthetic fixture tree (the exact manifest bytes are asserted) and
against the real repository tree (`--check laige-api.json`), so a
public-header change that misses the manifest fails in every P0 job
— and in the dedicated `api-manifest` CI job, which regenerates the
manifest and fails on any drift (PRD §9.4, NFR-13.1). The manifest
contract (symbol kinds, doc association, exit codes, unsupported
constructs) is the header comment of `tools/api/laige-api.cpp`.
- Every configure verifies the vendored dependency lock
(`cmake/laige-deps-lock.cmake` against `deps.lock`); a tampered or
unlisted file under `deps/` fails the configure loudly. GoogleTest is the
Expand Down
Loading
Loading