ワンクリックで
dev-final-pass
Run a quality review pass on a lesson before publishing, catching recurring issues found across project PR history
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run a quality review pass on a lesson before publishing, catching recurring issues found across project PR history
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Add PBR texture loading with separate roughness/metallic support to an SDL GPU project using forge_scene.h
Add Cook-Torrance PBR shading with GGX, Schlick-GGX, and Schlick Fresnel to an SDL GPU project alongside forge_scene.h
Add instanced grass rendering with segmented blades, wind animation, LOD density rings, and terrain LOD with geomorphing to an SDL GPU project
Add procedural noise texture generation to the asset pipeline — C tool, Python plugin, web UI with live preview
Add an asset pipeline lesson — hybrid Python + C track for asset processing, procedural geometry, and web frontend
Add an audio lesson — sound playback, mixing, spatial audio, DSP effects, with SDL GPU scenes and forge UI
| name | dev-final-pass |
| description | Run a quality review pass on a lesson before publishing, catching recurring issues found across project PR history |
| argument-hint | [lesson-number or lesson-name] |
| disable-model-invocation | false |
Run a systematic quality review on any lesson (GPU, math, engine, UI, physics,
audio, or asset pipeline) before creating a PR with /dev-create-pr. This skill
encodes recurring themes from PR review feedback across the project's history.
The user provides:
17 or normal-maps)If missing, infer from the current branch name or most recent lesson directory.
Work through each section below in order. For each check, read the relevant files and verify compliance. Report a summary at the end with pass/fail per section and specific issues found.
Be literal and exhaustive. This is C — no RAII, no garbage collector. Every resource you acquire must be released on every exit path, every struct field must be documented, every error must be handled. Do not rationalize away findings with "it's probably fine" or "the section comment covers it." If the check says every field, check every field. If it says every error path, trace every error path.
Use a Task agent (model: haiku) for builds, shader compilation, linting, and other command execution — never run those directly from the main agent.
Verify the lesson has all required pieces.
What to check:
lessons/<track>/NN-name/README.md existslessons/<track>/NN-name/main.c exists (GPU, physics, audio, engine
lessons) — asset lessons may use Python entry points insteadlessons/<track>/NN-name/CMakeLists.txt exists (C lessons only — asset
lessons that are pure Python do not need one)lessons/<track>/NN-name/assets/screenshot.png exists (GPU, physics,
audio lessons) — not just a placeholder.claude/skills/<topic>/SKILL.md exists (the matching skill)CMakeLists.txt includes add_subdirectory(lessons/<track>/NN-name)
(C lessons only)PLAN.md has the lesson checked off or addedShader directory: Only required if the lesson has its own shaders beyond
what forge_scene.h provides. GPU lessons using forge_scene.h for the
rendering baseline do not need a shaders/ directory unless they add
lesson-specific shaders.
This is the single most common PR finding. Every SDL function that returns
bool must be checked. Search all .c and .h files in the lesson
directory (not just main.c) for every SDL call and verify each one that
returns bool has error handling.
Functions that return bool (non-exhaustive):
SDL_InitSDL_ClaimWindowForGPUDeviceSDL_SetGPUSwapchainParametersSDL_SubmitGPUCommandBufferSDL_CancelGPUCommandBufferSDL_UploadToGPUBuffer (via command buffer submit)SDL_WindowSupportsGPUSwapchainCompositionSDL_SetGPUBufferName / SDL_SetGPUTextureNameRequired pattern:
if (!SDL_SomeFunction(args)) {
SDL_Log("SDL_SomeFunction failed: %s", SDL_GetError());
/* clean up any resources allocated so far */
return false; /* or SDL_APP_FAILURE */
}
What to check:
SDL_SubmitGPUCommandBuffer call checks the return valueSDL_SetGPUSwapchainParameters call checks the return valueSDL_Init return is checked in SDL_AppInitSDL_ClaimWindowForGPUDevice return is checkedSDL_GetError()How to search: Use Grep for patterns like SDL_Submit, SDL_SetGPUSwapchain,
SDL_Init(, SDL_Claim across all .c and .h files in the lesson directory
and verify each has an if (!...) wrapper.
Skip for: math lessons, engine lessons, UI lessons, asset lessons (no SDL GPU calls).
Every acquired command buffer must be either submitted or canceled. There is no automatic cleanup — an abandoned command buffer is a resource leak. This is C: if you acquire it, you release it, on every path.
Key SDL3 constraint: SDL_CancelGPUCommandBuffer is not allowed after
a swapchain texture has been acquired on that command buffer. After swapchain
acquisition, you must submit (even on error).
What to check:
SDL_AcquireGPUCommandBuffer has a matching submit or cancel on
every code path that follows — including early returns from failed
BeginRenderPass, failed ensure_* helpers, etc.SDL_CancelGPUCommandBuffer(cmd)SDL_SubmitGPUCommandBuffer(cmd) (submit the partial/empty command buffer)!swapchain_tex (minimized window) path submits the empty
command buffer and returns SDL_APP_CONTINUESkip for: math, engine, UI, asset lessons.
Every numeric literal that represents a tuning parameter, spec-defined default,
buffer size, or domain constant must be a #define or enum at the top of the
file (or in a shared header if reused).
What to check:
0.5f
alpha cutoff, 0.3f rotation speed, 50.0f light distance)/* glTF 2.0 sec 3.9.4 */)1e30f or FLT_MAX are named
(#define AABB_SENTINEL 1e30f)2.0f in formulas are acceptable only when
they are inherent to the math (e.g. 2.0 * dot(N, I) in reflection) — but
domain-specific multipliers should be namedWhen initialization fails partway through, all resources allocated before the failure point must be released. This is C — no destructors, no RAII, no GC. If you allocate it, you must free it on every exit path.
What to check:
gpu_primitive_count (or equivalent) is updated incrementally so cleanup
can release partial uploadsupload_gpu_buffer, create_white_texture) return
NULL on failure and don't leak internal resourcesinit_fail cleanup matches SDL_AppQuit cleanup — every resource freed
in SDL_AppQuit must also be freed in init_fail (including conditional
resources like #ifdef FORGE_CAPTURE)ensure_* functions that destroy-then-recreate handle partial failure
(some resources recreated, some not) without leakingSkip for: math, engine, UI, asset lessons (no GPU resources).
Public API (in common/ headers): Prefix_PascalCase for types
(e.g. ForgeGltfScene), prefix_snake_case for functions
(e.g. forge_gltf_load).
Internal typedefs (in lesson main.c): PascalCase for struct typedefs
(e.g. SceneVertex, VertUniforms, GpuPrimitive). This is the project
convention, confirmed in .coderabbit.yaml and consistent across all lessons.
Local variables and app_state: lowercase_snake_case.
What to check:
common/ use Forge prefix (e.g. ForgeGltfScene)VertUniforms, not vertUniforms or vert_uniforms)app_state struct uses lowercase_snake_case (exception: it holds
all per-session state and is always lowercase by convention)snake_case (not camelCase)#define constants use UPPER_SNAKE_CASEEvery struct field needs an inline comment — no exceptions, no "the section header covers it." Section headers group related fields; inline comments explain each individual field's purpose, units, format, or valid range.
What to check:
app_state fields each have an inline comment — not just section
headers. Every pipeline, texture, sampler, buffer, setting, and state
variable gets its own comment explaining what it is, its format/units
where applicable, and how it's usedGpuPrimitive, GpuMaterial, ModelData)
document each fieldWhen referencing specifications (glTF 2.0, Vulkan, etc.) or external standards, the wording must match the spec's normative language.
What to check:
The matching skill in .claude/skills/<topic>/SKILL.md must have all required
sections.
What to check:
name and descriptionWhat to check:
# Lesson NN — TitleLessons are written for readers who know nothing unless a previous lesson taught it. Every concept, API, tool, or term that appears for the first time must be briefly defined in the README — or the README must link to the specific earlier lesson or engine/math lesson that introduced it.
What to check:
What to check:
#define SDL_MAIN_USE_CALLBACKS 1SDL_AppInit, SDL_AppEvent,
SDL_AppIterate, SDL_AppQuitSDL_calloc for app_state allocationSDL_Log on all GPU callsSDL_fabsf, SDL_sinf, SDL_memset, etc.), and approved project wrappers
for C99 functions SDL lacks (forge_isfinite, forge_fmaxf, forge_fminf)Skip SDL_MAIN_USE_CALLBACKS check for: math, engine lessons that use
main() directly.
forge_scene.h usage (GPU, physics, audio lessons)All GPU lessons, all physics lessons, and all audio lessons must use
forge_scene.h for the rendering baseline (shadow map, Blinn-Phong, grid,
sky, camera, UI). This eliminates hundreds of lines of boilerplate and ensures
a consistent rendering foundation.
What to check:
main.c includes #define FORGE_SCENE_IMPLEMENTATION followed by
#include "scene/forge_scene.h"app_state contains a ForgeScene scene field instead of individual
pipelines, textures, and samplers for the baseline renderingforge_scene_begin_frame / forge_scene_begin_shadow_pass
/ forge_scene_begin_main_pass / forge_scene_end_frame patternshaders/ directory
(scene, grid, shadow, sky, UI shaders are provided by forge_scene.h)Skip this check for: math, engine, UI, asset lessons.
Run the linter and resolve all issues.
npx markdownlint-cli2 "lessons/<track>/NN-name/**/*.md" ".claude/skills/<topic>/SKILL.md"
Common issues from PR feedback:
c, bash, text, hlsl)$$\n...\n$$), not inline $$...$$If any Python scripts in scripts/ were added or modified:
uv run ruff check scripts/
uv run ruff format --check scripts/
ruff checkruff format --checkuv run ruff check --fix scripts/ && uv run ruff format scripts/ if neededIf any Python files in scripts/ or pipeline/ were added or modified:
uv run pyright
pyrightreportPrivateImportUsage)reportMissingImports)Never use bare C stdlib calls when an SDL_ equivalent exists. This is a cross-platform portability requirement.
What to check:
fabsf, sinf, memset, strcmp, malloc,
etc.) when an SDL equivalent exists. Grep for bare names in .c and .h
files and verify all matches use the SDL_ prefix.Verify the lesson compiles and shaders are up to date.
For GPU, physics, and audio lessons (C with shaders):
python scripts/compile_shaders.py NN -v
cmake --build build --target NN-name
For math/engine lessons (C without shaders):
cmake --build build --target NN-name
For asset lessons (Python):
uv run pytest tests/pipeline/ -v
Skip for: UI lessons (no standalone executable).
If the lesson has diagrams (check for assets/*.png files that are not
screenshots), verify each diagram function against the README:
For a thorough review, invoke /dev-review-diagrams with the lesson key.
If there are no diagrams for the lesson, skip this section.
Skip for: GPU lessons 01–38, math, engine, UI, asset lessons.
Code review (all GPU lessons 39+):
forge_shapes_*() or
forge_pipeline_load_mesh()forge_pipeline_load_texture()forge_gltf_load() or forge_obj_load())Manifest compliance (MANDATORY):
forge_target_assets(lesson_XX) — not add_dependencies
with manual copy commandsforge-assets.toml exists next to CMakeLists.txt declaring all
runtime asset dependencies (fonts, models, materials)add_custom_command for
copying fonts, models, textures, or running pipeline tools. No
file(GLOB) for textures. No direct forge_mesh_tool or
forge_scene_tool invocations.assets/ — only screenshots
and diagrams for the README. All runtime assets come from
${FORGE_PROCESSED_DIR} via the manifest.assets/models/,
assets/materials/, or assets/fonts/ — not to lesson-local dirsRuntime validation (run once per PR):
uv run python -m pipeline --verbose succeedsassets/ and processable by pipelineSkip for: GPU, math, engine, UI, asset lessons.
Physics and audio lessons use forge_scene.h for the rendering baseline and
forge_shapes_*() for procedural geometry. They do not load pipeline meshes
directly, but they must follow the shapes, texture, and manifest mandates.
What to check:
forge_shapes_*() from common/shapes/forge_shapes.hforge_pipeline_load_texture()ForgeSceneVertex conversion pattern — never
upload raw ForgeShape position/normal arrays directly via
SDL_CreateGPUBuffer. ForgeShape stores struct-of-arrays (separate
positions[] and normals[]), but forge_scene.h shaders expect
interleaved ForgeSceneVertex (array-of-structs with position + normal
per vertex). Uploading raw SoA data produces broken/spiky geometry.Manifest compliance (MANDATORY):
forge_target_assets(lesson_XX) — not bespoke copy commandsforge-assets.toml exists declaring font and any other asset dependenciesadd_custom_command for
copying fonts, no make_directory + copy_if_different patternsassets/ contains only screenshots and diagrams
The correct pattern (used by all existing physics lessons):
1. Convert ForgeShape to ForgeSceneVertex[] array
2. Upload via forge_scene_upload_buffer(scene, SDL_GPU_BUFFERUSAGE_VERTEX, ...)
3. Upload indices via forge_scene_upload_buffer(scene, SDL_GPU_BUFFERUSAGE_INDEX, ...)ForgeUiWindowState field, it must be initialized with
forge_ui_window_state_default(x, y, w, h) before use. Uninitialized
window state has zero dimensions and the panel will not render.After completing all checks, report a summary table:
Final Pass Results — Lesson NN: Name
=====================================
0. Required files ✅ PASS (all files present)
1. SDL bool returns ✅ PASS (N calls checked)
2. Command buffer life ✅ PASS (N paths checked)
3. Magic numbers ✅ PASS
4. Resource leaks ⚠️ WARN (1 potential leak in load_scene)
5. Naming conventions ✅ PASS
6. Intent comments ✅ PASS
7. Spec accuracy ✅ PASS
8. Skill completeness ✅ PASS
9. README structure ✅ PASS
10. Concept introduction ✅ PASS
11. main.c structure ✅ PASS
12. forge_scene.h usage ✅ PASS
13. Markdown lint ✅ PASS
14. Python lint ⏭️ SKIP (no scripts modified)
15. Pyright types ⏭️ SKIP (no scripts modified)
16. SDL stdinc compliance ✅ PASS
17. Build & shaders ✅ PASS
18. Diagram correctness ⏭️ SKIP (no diagrams)
19. Asset pipeline (39+) ⏭️ SKIP (lesson < 39)
20. Asset pipeline (phys/audio) ⏭️ SKIP (not physics/audio)
For each WARN or FAIL, list the specific file, line, and issue with a suggested
fix. Ask the user if they want you to apply the fixes before proceeding to
/dev-create-pr.