Skip to content

Commit 26482a8

Browse files
TMHSDigitalclaude
andcommitted
docs: README names all 12 rules and 25 skills, and corrects the --api note
The rule list said 'The nine rules are' and omitted the three 5.x porting rules (no-bgl, no-removed-normals-api, no-legacy-vse-sequences); the layer table skipped those rules and the five newest skills; and the --api note contradicted the gn-modifier-inputs catalog falsifier. check_counts only matches numerals, so it now also requires every rules/*.mdc name in README. Closes #521 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LpkeXRvikhJZSVGBFM91Dv Signed-off-by: TM Hospitality Strategies <TMHospitalityStrategies@gmail.com>
1 parent 0b70248 commit 26482a8

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ The content is consumed by AI coding agents, installed as a plugin or read from
5050

5151
| Layer | Role |
5252
| --- | --- |
53-
| **Skills** | Guided workflows: scaffolding, operators, panels, properties, mesh and bmesh, headless batch, slotted actions, geometry nodes, procedural materials, depsgraph queries, drivers and handlers, `bl_info` migration, video sequencer, imported-mesh cleanup, high-to-low baking, engine export presets, extension runtime and packaging, timers, modal operators and threading, GPU drawing and viewport overlays, porting add-ons to Blender 5 |
54-
| **Rules** | Guardrails for the most common AI mistakes: ops-in-loops, bmesh leaks, legacy `bl_info` only, prop assignments, deprecated context-copy override, per-element loops over bulk mesh data, import without scale check, export without evaluated geometry, mixed glTF/FBX axis RNA |
53+
| **Skills** | Guided workflows: scaffolding, operators, panels, properties, mesh and bmesh, headless batch, slotted actions, geometry nodes, procedural materials, depsgraph queries, drivers and handlers, `bl_info` migration, video sequencer, imported-mesh cleanup, high-to-low baking, engine export presets, extension runtime and packaging, timers, modal operators and threading, GPU drawing and viewport overlays, porting add-ons to Blender 5, Grease Pencil v3, constraints and parenting, images and pixels, curves and text, compositor nodes |
54+
| **Rules** | Guardrails for the most common AI mistakes: ops-in-loops, bmesh leaks, legacy `bl_info` only, prop assignments, deprecated context-copy override, per-element loops over bulk mesh data, import without scale check, export without evaluated geometry, mixed glTF/FBX axis RNA, and the 5.x removals: `bgl`, the pre-4.1 normals API, `sequence_editor.sequences` |
5555
| **Templates** | A working Extensions Platform add-on starter, a headless batch script starter, and a GLB-in engine-ready asset pipeline |
5656
| **Snippets** | 31 small standalone Python files demonstrating canonical patterns, 5 to 75 lines each |
5757
| **Examples** | Runnable headless scripts under [`examples/`](examples/). Each asserts an API contract and exits non-zero on failure. |
@@ -170,8 +170,10 @@ Proving each one fails once, on demand, is the difference between a test
170170
suite and a set of scripts that print "OK". Shipping an example requires
171171
demonstrating the falsifier's non-zero exit and reporting the measured error.
172172

173-
`--api`, `--check-pixels`, and `--output` are not falsifiers; they select a
174-
code path rather than break a contract. Full conventions, including the
173+
`--check-pixels` and `--output` are not falsifiers; they select a code path
174+
rather than break a contract. `--api` usually selects a path too, but forcing
175+
the wrong era's path can be a version-gated falsifier: `gn-modifier-inputs`
176+
registers `--api dict` (exit 5 on 5.2+) in its catalog row. Full conventions, including the
175177
per-script exit-code model, are in
176178
[`CONTRIBUTING.md`](CONTRIBUTING.md#exit-codes).
177179

@@ -206,7 +208,7 @@ claude/ - generated Claude Code copies of the rules (blender-ru
206208

207209
## Using rules in Cursor
208210

209-
With the Cursor plugin installed, the `.mdc` files in `rules/` apply automatically when Cursor opens a Blender Python project, scoped by the `globs` in each rule's frontmatter. The nine rules are:
211+
With the Cursor plugin installed, the `.mdc` files in `rules/` apply automatically when Cursor opens a Blender Python project, scoped by the `globs` in each rule's frontmatter. The 12 rules are:
210212

211213
- `prefer-data-over-ops-in-loops`: flags `bpy.ops.*` calls inside object iteration
212214
- `always-free-bmesh`: flags `bmesh.new()` without paired `bm.free()` in `try`/`finally`
@@ -217,6 +219,9 @@ With the Cursor plugin installed, the `.mdc` files in `rules/` apply automatical
217219
- `validate-imported-mesh-scale`: flags glTF/FBX import then mesh work with no `transform_apply` and no unit-scale check
218220
- `no-unapplied-modifiers-on-export`: flags export of objects with live modifiers when the export does not request evaluated geometry
219221
- `use-correct-axis-rna-per-exporter`: flags `export_scene.gltf` calls that pass FBX `axis_forward` / `axis_up`, and `export_scene.fbx` calls that pass glTF `export_yup`
222+
- `no-bgl`: flags `import bgl` or any `bgl.` call (removed in 5.x; the add-on fails to register)
223+
- `no-removed-normals-api`: flags `use_auto_smooth`, `auto_smooth_angle`, `calc_normals_split()` and the other normals calls removed in 4.1
224+
- `no-legacy-vse-sequences`: flags `sequence_editor.sequences` / `.sequences_all` (removed in 5.x; `.strips` / `.strips_all` exist on 4.5 too)
220225

221226
Cursor: the plugin covers the rules (see [Quick start](#quick-start)); copying `rules/*.mdc` into a project's `.cursor/rules/` is only the per-project alternative without the plugin. Claude Code: the plugin ships the rules as the `blender-rules` skill.
222227

‎tests/check_counts.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ def expect(doc: str, line_no: int, kind: str, stated: int, phrase: str) -> None:
185185
if not re.search(rf"\b{n} {word}\b", readme):
186186
errors.append(f'README.md never states "{n} {word}"')
187187

188+
# The README rule list names each rule; the count check above cannot see a
189+
# list that says "12" but names nine (#521).
190+
for f in sorted((root / "rules").glob("*.mdc")):
191+
if f"`{f.stem}`" not in readme:
192+
errors.append(f"README.md never names rule `{f.stem}` (Using rules in Cursor)")
193+
188194
for f in sorted((root / "snippets").glob("*.py")):
189195
n = len(f.read_text(encoding="utf-8").splitlines())
190196
if not SNIPPET_RANGE[0] <= n <= SNIPPET_RANGE[1]:

0 commit comments

Comments
 (0)