원클릭으로
dev-asset-lesson
Add an asset pipeline lesson — hybrid Python + C track for asset processing, procedural geometry, and web frontend
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add an asset pipeline lesson — hybrid Python + C track for asset processing, procedural geometry, and web frontend
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 audio lesson — sound playback, mixing, spatial audio, DSP effects, with SDL GPU scenes and forge UI
Run a quality review pass on a lesson before publishing, catching recurring issues found across project PR history
| name | dev-asset-lesson |
| description | Add an asset pipeline lesson — hybrid Python + C track for asset processing, procedural geometry, and web frontend |
| argument-hint | [number] [topic-name] [description] |
Create a new asset pipeline lesson. This is a hybrid track — the pipeline
orchestrator is Python, performance-critical processing uses compiled C tools
(meshoptimizer, MikkTSpace), and procedural geometry lives in a header-only C
library (common/shapes/forge_shapes.h).
The goal is not just pedagogical. Every library, tool, and pipeline
component built in an asset lesson must be production-quality — well-tested,
documented, and designed for reuse beyond the lesson. The project's own
PLAN.md has a "Project Integration" section where forge-gpu's existing
assets (models, textures, skyboxes) are processed through the pipeline we
build. So the pipeline, plugins, and C tools are not toy examples scoped to a
single lesson — they are the actual tooling this project depends on.
Concretely this means:
pipeline/, C libraries go in common/, C tools go in tools/. The
lesson directory contains the walkthrough, not the implementation.tests/pipeline/ for
Python, tests/test_*.c for C). Edge cases, error paths, and realistic
inputs — not just happy-path smoke tests.When to use this skill:
Smart behavior:
The user (or you) can provide:
If any are missing, infer from context or ask.
The asset pipeline track has three lesson types. Determine which type applies before scaffolding.
Pipeline scaffold, texture processing, asset bundles, web frontend. These add
functionality to the shared pipeline/ package at the repo root (not
lesson-local code). The lesson directory contains only the README, diagrams,
example config, and sample assets.
Directory structure:
pipeline/ # shared library (repo root) — code goes HERE
__init__.py
__main__.py
config.py, plugin.py, scanner.py, ...
plugins/
<type>.py # built-in plugins grow lesson by lesson
tests/
pipeline/ # tests for the shared library
test_<module>.py
lessons/assets/NN-topic-name/
README.md # lesson walkthrough pointing at pipeline/ code
pipeline.toml # example config for hands-on testing
assets/ # sample source files, diagrams
Not added to CMakeLists.txt — Python projects are not C targets.
pyproject.toml is at the repo root — one package for the whole pipeline.
Mesh processing with third-party C libraries (meshoptimizer, MikkTSpace). The C tool is a standalone executable that the Python pipeline invokes as a subprocess.
Directory structure:
lessons/assets/NN-topic-name/
README.md
main.c # standalone C tool
CMakeLists.txt # builds the tool, fetches dependencies
tests/
test_<tool>.c # C test suite
Added to CMakeLists.txt — C tools need a build target. Add under an "Asset Pipeline Lessons" section (create it if needed, after Physics Lessons or at the end before Tests).
Procedural geometry and other header-only libraries that live in common/.
These produce a library, a test suite, and optionally a GPU lesson that
renders the output.
Directory structure:
common/<lib>/
forge_<lib>.h # header-only library
README.md # API reference
lessons/assets/NN-topic-name/
README.md # lesson walkthrough (may also have a GPU demo)
PLAN.md # main.c decomposition (if GPU demo included)
main.c # GPU showcase program (optional)
CMakeLists.txt
shaders/ # if GPU demo
assets/
tests/
test_<lib>.c # comprehensive test suite
Added to CMakeLists.txt — register the test target and any GPU demo.
Follow the directory structure for the determined lesson type (A, B, or C).
Package conventions:
argparse or click for command-line interfacetomllib in 3.11+, or
tomli as fallback)snake_case for modules and functions, PascalCase for classesCreate pyproject.toml:
[project]
name = "forge-asset-pipeline"
version = "0.1.0"
description = "Asset processing pipeline for forge-gpu"
requires-python = ">=3.10"
dependencies = [
# Add per-lesson dependencies here
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"ruff>=0.4",
]
[project.scripts]
forge-pipeline = "pipeline.__main__:main"
FetchContent to pull third-party libraries (meshoptimizer, MikkTSpace)forge_math.h pattern: header-only, static inline,
thorough inline documentationSDL_malloc/SDL_free (not malloc/free)forge_math.h types (vec3, vec2, mat4, quat)tests/test_math.c patternREADME.mdStructure varies by lesson type but always includes:
README.md (root): Add a row to the asset lessons tablelessons/assets/README.md: Add a row to the lessons tablePLAN.md: Check off the asset lesson entryCMakeLists.txt (root): Add targets for C tools/libraries (Types B and C
only — Python lessons are not registered here)Python lessons:
uv sync --extra dev
uv run pytest tests/pipeline/
uv run ruff check pipeline/
uv run ruff format --check pipeline/
C tool/library lessons:
cmake -B build
cmake --build build --config Debug --target <test-target>
ctest --test-dir build -R <test-name>
Use a Task agent with model: "haiku" for build commands per project
conventions.
npx markdownlint-cli2 "**/*.md"
All GPU Lessons 39+ MUST use pipeline-processed assets via
forge_pipeline_load_mesh() / forge_pipeline_load_texture(). Physics
lessons use forge_shapes_*() for procedural bodies and
forge_pipeline_load_texture() for any textures. When adding pipeline
features, verify they don't break GPU lesson asset loading.
snake_case for functions and variables, PascalCase for classespathlib.Path for file paths (not string concatenation)dataclasses or attrs for structured datapyproject.toml in repo root)Follow the same conventions as all forge-gpu code:
ForgeShapes prefix for public types, forge_shapes_ for functions
(adjust prefix per library)PascalCase for typedefs, lowercase_snake_case for localsUPPER_SNAKE_CASE for #define constants#define or enum everythingSDL_malloc/SDL_free — not malloc/freeThe Python pipeline uses a plugin system where each asset type registers a processor. C tools are invoked as subprocesses by the Python plugin:
import subprocess
from pathlib import Path
class MeshPlugin(AssetPlugin):
"""Mesh processing plugin — invokes compiled C tool."""
name = "mesh"
extensions = [".gltf", ".glb", ".obj"]
def process(self, source: Path, config: dict) -> AssetResult:
result = subprocess.run(
["forge-mesh-tool", str(source), "--output", str(output)],
capture_output=True, text=True
)
if result.returncode != 0:
raise ProcessingError(result.stderr)
return AssetResult(source=source, output=output, metadata={...})
Every processing step must support incremental builds:
Use TOML for pipeline and per-asset configuration:
# pipeline.toml — project-level config
[pipeline]
source_dir = "assets/raw"
output_dir = "assets/processed"
bundle_dir = "assets/bundles"
[texture]
default_format = "bc7"
max_size = 2048
generate_mipmaps = true
[mesh]
deduplicate = true
generate_tangents = true
lod_levels = [1.0, 0.5, 0.25]
Asset pipeline lessons should be practical and tool-focused. Pipeline tooling is infrastructure that enables art and rendering — treat it with the same rigor as the rendering code it serves. The output of these lessons is not disposable teaching material; it is production tooling that forge-gpu itself will use to process its own assets.
lessons/assets/01-pipeline-scaffold/pipeline/ with __main__.py, config.py, scanner.py,
plugin.py--verbose outputlessons/assets/03-mesh-processing/main.c that reads glTF/OBJ, processes with meshoptimizer and
MikkTSpace, writes optimized binary outputplugins/mesh.py invokes the compiled tool as subprocessforge_shapes.h — parametric surface generation (sphere,
icosphere, cylinder, cone, torus, plane, cube, capsule), struct-of-arrays
layout, smooth vs flat normalscommon/shapes/forge_shapes.h, common/shapes/README.md,
lessons/assets/04-procedural-geometry/, tests/shapes/test_shapes.cFORGE_SHAPES_IMPLEMENTATION guardIn these cases, update existing documentation or plan for later.
pipeline/web/ — The frontend is a Vite + TypeScript
project served by the FastAPI backend in pipeline/server.py. The pipeline
is the lesson, not the frontend stack.forge_shapes.h and GPU demo
main.c will exceed 800 lines. Use the chunked-write pattern per
.claude/large-file-strategy.md.