From 0dfbaadc31b68babd4e577d39b6284e979e4a319 Mon Sep 17 00:00:00 2001 From: Jinnie Kim Date: Sat, 3 Oct 2026 23:26:43 -0700 Subject: [PATCH 1/2] docs: update AGENTS.md Assisted-by: Claude Code / Opus-5.5 Signed-off-by: Jinnie Kim --- AGENTS.md | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b546d44814..b2cd012f7a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,7 +20,7 @@ render time. C++17 codebase. - `src/liboslexec/` — Shader execution engine. Loads `.oso`, optimizes shader groups, JIT-compiles to native via LLVM. Key files: `backendllvm.cpp`, `llvm_gen.cpp`, `llvm_ops.cpp`, `instance.cpp`. Contains `wide/` - subdirectory for SIMD batched execution (SSE2/AVX/AVX-512) + subdirectory for SIMD batched execution (SSE2/AVX/AVX2/AVX-512) - `src/liboslquery/` — Query compiled shader metadata and parameters - `src/liboslnoise/` — Noise function implementations - `src/libbsdl/` — BSDF/closure library @@ -69,8 +69,6 @@ By default, builds into `./build` and installs into `./dist`. - Test output lands in `build/testsuite//`; references in `testsuite//ref/` -- Read `testsuite/TESTSUITE-README.md` before updating references or - diagnosing failures - For platform-specific diffs, add a variant ref (e.g. `out-win.txt`) rather than overwriting - Be conservative loosening image diff thresholds — use the minimum needed @@ -79,9 +77,10 @@ By default, builds into `./build` and installs into `./dist`. ## Code formatting and file conventions -- `clang-format` enforced (`.clang-format`); CI rejects non-conforming code — - run `make clang-format` before committing -- Lines ~80 cols; ASCII only in code and comments; `#pragma once` for headers +- `clang-format` enforced (`.clang-format`: WebKit-based, 80-char line limit, + 4-space indent); CI rejects non-conforming code — run `make clang-format` + before committing +- ASCII only in code and comments; `#pragma once` for headers - New files: standard copyright + SPDX notice - `CamelCase` classes, `snake_case` locals, `ALL_CAPS` macros, `m_foo` private members @@ -139,7 +138,7 @@ classes and headers from OIIO: `char*` strings. - Prefer `OSL::span` rather than passing raw pointers + a separate length, or passing a raw pointer with an implied (but not explicitly passed) length. - `OSL::cspan` is a synonmym when the underlying data is const/non-mutable. + `OSL::cspan` is a synonym when the underlying data is const/non-mutable. `OSL::span` or `OSL::cspan` can be used to represent contiguous untyped data. These are our equivalent of C++ `std::span`. - Use these guidelines always for new code, but do not churn existing code @@ -152,14 +151,9 @@ classes and headers from OIIO: OSL source → (Flex/Bison) → AST → (liboslcomp) → `.oso` bytecode → (liboslexec) → LLVM IR → JIT native code -## Code Style - -- clang-format config in `.clang-format` (WebKit-based, 80-char line limit, 4-space indent) -- Run `make clang-format` before submitting changes - ## Key Dependencies -- **LLVM 14+** (JIT compilation), **OpenImageIO 2.5+** (textures, image I/O, utilities), **Imath 3.1+** (math types), **Flex/Bison** (parser generation), **pybind11** (Python bindings, optional) +- **LLVM 14+** (JIT compilation), **OpenImageIO 3.0+** (textures, image I/O, utilities), **Imath 3.1+** (math types), **Flex/Bison** (parser generation), **pybind11 2.7+** or **nanobind 2.8+** (Python bindings, optional) ## Commits and PRs @@ -182,16 +176,15 @@ to `docs/dev/specs/` and write that path to The speckit bash scripts expect a `specs/` directory at the project root. A symlink satisfies this without committing speckit infrastructure to the repo. -This symlink is set up by the setup-agents script, and is not committed to -the repo. All saved specs live in `docs/dev/specs`. +This symlink is set up by the `.agents/setup-agent` script, and is not +committed to the repo. All saved specs live in `docs/dev/specs`. ## AI policy -Refer to `docs/dev/AI_Policy.md`. - See `docs/dev/AI_Policy.md`. Key rule: if AI assistance contributed materially -to a patch, the commit must include `Assisted-by: / `. The human -author is responsible for understanding, testing, and defending all changes. +to a patch, the commit and PR description must include +`Assisted-by: / `. The human author is responsible for +understanding, testing, and defending all changes. ## References From 1967f8373ffb0a67c17b18a91fa65ce790e1c3dc Mon Sep 17 00:00:00 2001 From: Jinnie Kim Date: Sat, 3 Oct 2026 23:35:37 -0700 Subject: [PATCH 2/2] optional Assisted-by: Claude Code / Opus-5.5 Signed-off-by: Jinnie Kim --- AGENTS.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b2cd012f7a..481b043ad8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,7 +16,7 @@ render time. C++17 codebase. **Core libraries** - `src/liboslcomp/` — Shader compiler. Flex/Bison lexer+parser → AST → `.oso` - bytecode. Entry point: `oslcomp.h` + bytecode. Entry point: `src/include/OSL/oslcomp.h` - `src/liboslexec/` — Shader execution engine. Loads `.oso`, optimizes shader groups, JIT-compiles to native via LLVM. Key files: `backendllvm.cpp`, `llvm_gen.cpp`, `llvm_ops.cpp`, `instance.cpp`. Contains `wide/` @@ -70,8 +70,10 @@ By default, builds into `./build` and installs into `./dist`. - Test output lands in `build/testsuite//`; references in `testsuite//ref/` - For platform-specific diffs, add a variant ref (e.g. `out-win.txt`) rather - than overwriting -- Be conservative loosening image diff thresholds — use the minimum needed + than overwriting; a test passes if its output matches any file in `ref/` + with the same extension +- Be conservative loosening image diff thresholds (`failthresh`, `hardfail`, + `failpercent`, set per test in its `run.py`) — use the minimum needed - Check uploaded CI artifacts before changing references when local reproduction is unclear @@ -164,6 +166,9 @@ OSL source → (Flex/Bison) → AST → (liboslcomp) → `.oso` bytecode → (li - Add a subsystem tag when it helps, e.g. `fix(exr):` or `perf(IBA):`. - Write commit messages and PR descriptions that explain why the change is needed, what behavior changes, and any non-obvious implementation choices. +- After changing a dependency minimum version, a file or directory path, or a + build/test command, check `AGENTS.md` for statements about it and correct + any that are now wrong, as part of the same change. ## Spec-driven design