Dev review diagrams

From Nebulavenus/forge-gpu · View interactive version

Dev review diagrams is an AI agent skill from the GitHub repository Nebulavenus/forge-gpu. Validate diagram correctness against the lesson README before pushing

How to use this skill

Skill file

Pre-push validation skill that cross-checks every diagram function against the

lesson README to catch correctness issues before they reach CodeRabbit review.

When to use this skill:

The user provides:

If missing, infer from the current branch name or most recent lesson directory.

Steps

1. Identify all diagrams for the lesson

Read scripts/forge_diagrams/__main__.py and find the lesson's entry in the

DIAGRAMS dict. List every (filename, function) pair registered for the

lesson key.

If the lesson has no registered diagrams, report "No diagrams registered for

this lesson" and exit.

2. Read the lesson README

Read the full lessons/<category>/<NN-name>/README.md. For each diagram file

referenced in the README (via ![...](assets/<name>.png)), note:

3. Cross-check each diagram function

For each diagram function, read its source code in the relevant per-lesson file

under scripts/forge_diagrams/<track>/lesson_NN.py and verify:

Geometry and math accuracy

y = sin(x), the code must plot np.sin(x), not np.cos(x))

diagram must not show Z-up)

an axis-aligned one

labeled correctly

in the README

Labels and annotations

"view-space depth", the axis label must not say "world-space Z")

that could confuse readers (e.g. "fragment" vs "pixel" must match)

Algorithm and pipeline correctness

vs decrement, src-alpha vs one-minus-src-alpha)

Docstring accuracy

actually plots (not a copy-paste from a different diagram)

4. Run each diagram

Execute each diagram and verify it generates without errors:

python scripts/forge_diagrams --lesson <lesson-key>

If any diagram raises an exception, report the error with traceback.

5. Report results

Present a checklist per diagram:

Diagram Review — Lesson NN: Name
==================================

1. diagram_name.png (function: diagram_diagram_name)
   [PASS] Geometry matches README equations
   [PASS] Axis labels match README terminology
   [PASS] Docstring matches actual content
   [FAIL] README says "3 cascade levels" but diagram only shows 2
   [PASS] Generates without errors

2. another_diagram.png (function: diagram_another)
   [PASS] All checks passed

Overall: 1 issue found — fix before pushing

For each failure, include:

What this skill does NOT do

/dev-create-diagram handle that

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.