Skip to content

Commit 93ba58b

Browse files
docs: record showcase category conventions
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f828299 commit 93ba58b

5 files changed

Lines changed: 105 additions & 8 deletions

File tree

‎AGENTS.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ a `.cursor-plugin/plugin.json` manifest so the ecosystem drift checker
2020
classifies it as a `cursor-plugin`. This is content the AI loads when the user
2121
asks Blender questions or works on Blender add-ons in Cursor or Claude Code.
2222

23-
The content base is 16 skills, 9 rules, 3 templates, 27 snippets, and 59
24-
examples (counts are CI-enforced against README.md and the manifest). The full
25-
inventory tables and per-item purposes live in `CLAUDE.md`. Example anatomy
26-
and authoring rules: copy `examples/bmesh-gear/`; the render look is specified
23+
The content base is 16 skills, 9 rules, 3 templates, 27 snippets, 59
24+
examples, and 0 showcase pieces (counts are CI-enforced against README.md
25+
and the manifest). The full inventory tables and per-item purposes live in
26+
`CLAUDE.md`. Example anatomy and authoring rules: copy `examples/bmesh-gear/`;
27+
showcase conventions: `showcase/README.md`. The render look is specified
2728
in `docs/VISUAL-STYLE.md`; the canonical run prompt is
2829
`docs/new-example-prompt.md`.
2930

@@ -37,6 +38,8 @@ Blender-Developer-Tools/
3738
snippets/<snippet-name>.py # 27 standalone Python snippets
3839
examples/<name>/ # 59 runnable smoke-gated examples (+ gallery.json)
3940
examples/gallery_framing.py # shared Layer 1 framing measurement (render path only)
41+
showcase/<name>/ # budget-conformance props (sibling of examples/)
42+
showcase/gallery.json # this tree's gallery index; merged into docs/gallery/
4043
scripts/build_gallery.py # generates docs/gallery/ (stdlib only)
4144
scripts/site/ # vendored landing-page build (build_site.py + template)
4245
docs/gallery/ # committed generated gallery pages + hero assets

‎CLAUDE.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ rules/<rule-name>.mdc - Anti-pattern rules, 9 total
2222
templates/<template-name>/ - Starter projects, 3 total
2323
snippets/<snippet-name>.py - Standalone code patterns, 27 total
2424
examples/<name>/ - Runnable smoke-gated examples, 59 total (+ gallery.json)
25-
scripts/build_gallery.py - Regenerates docs/gallery/ from gallery.json (stdlib only)
25+
showcase/<name>/ - Budget-conformance props, 0 pieces (sibling of examples/; see showcase/README.md)
26+
scripts/build_gallery.py - Regenerates docs/gallery/ from examples/gallery.json + showcase/gallery.json
2627
scripts/site/ - Vendored landing-page build (Jinja2)
2728
docs/gallery/ - Committed generated gallery pages + hero renders
2829
VERSION - Source of truth for the repo version

‎CONTRIBUTING.md‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,19 @@ templates/
3535
blender_manifest.toml
3636
__init__.py
3737
README.md
38+
showcase/
39+
README.md
40+
gallery.json
41+
<piece-name>/
42+
README.md
3843
```
3944

4045
- **`skills/`** - one directory per skill, each containing `SKILL.md` with YAML frontmatter (`name`, `description`, `standards-version`).
4146
- **`rules/`** - Cursor-style rules as `.mdc` files with YAML frontmatter (`description`, `alwaysApply`, `globs`, `standards-version`).
4247
- **`snippets/`** - small standalone `.py` files (5 to 50 lines) demonstrating a single canonical pattern.
4348
- **`templates/`** - copy-paste starting points; one directory per template.
49+
- **`showcase/`** - budget-conformance props, sibling of `examples/`. Not API
50+
contracts. Conventions: [`showcase/README.md`](showcase/README.md).
4451

4552
## Adding a Skill
4653

@@ -86,6 +93,21 @@ templates/
8693
1. Add a directory under `templates/`, e.g. `templates/headless-batch-script-template/`.
8794
2. Include all files needed for an immediate copy-paste starting point. For add-on templates, include `blender_manifest.toml`, `__init__.py`, and a brief `README.md`.
8895

96+
## Adding a Showcase Piece
97+
98+
Read [`showcase/README.md`](showcase/README.md) first. Showcase asserts
99+
budget conformance, never an API contract.
100+
101+
1. Add `showcase/<kebab-name>/` with a script, a README that includes an
102+
exit-code table, and a falsifier that breaks one pipeline stage so a
103+
**named** budget fails.
104+
2. List the directory in `.cursor-plugin/plugin.json` `"showcase"` and add a
105+
`tests/smoke/catalog.json` row. The runner takes opaque script paths.
106+
3. Add a `showcase/gallery.json` `pieces[]` entry, render a still, and run
107+
`python scripts/build_gallery.py`. Do not hand-edit `docs/gallery/` HTML.
108+
4. Update the README showcase-piece count. `validate-counts` checks it
109+
separately from the example total.
110+
89111
## Blender Version Targeting
90112

91113
Content targets **Blender 5.2 LTS** as primary, **Blender 5.1** as prior stable, and **Blender 4.5 LTS** as fallback. When the API differs, branch on `bpy.app.version` and document both paths. Example:
@@ -169,7 +191,7 @@ The drift-check workflow enforces these on every push and PR.
169191

170192
## Aggregate Counts
171193

172-
`README.md` declares aggregate counts (e.g. "8 skills, 4 rules, 1 template, and 10 snippets"). The `validate-counts` job in `.github/workflows/validate.yml` enforces these substrings against the filesystem on every push and PR. When you add or remove content, update the README counts in the same commit.
194+
`README.md` declares aggregate counts (e.g. "16 skills, 9 rules, 3 templates, 27 snippets, 59 examples, and 0 showcase pieces"). The `validate-counts` job in `.github/workflows/validate.yml` enforces these substrings against the filesystem on every push and PR. Showcase pieces are counted separately from examples. When you add or remove content, update the README counts in the same commit.
173195

174196
## Pull Request Process
175197

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
<p align="center">
2525
<a href="https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/">Examples Gallery</a>
2626
&nbsp;&bull;&nbsp; <a href="#quick-start">Quick start</a>
27-
&nbsp;&bull;&nbsp; <a href="#examples">Examples</a>
27+
&nbsp;&bull;&nbsp; <a href="#examples">Examples</a>
28+
&nbsp;&bull;&nbsp; <a href="showcase/">Showcase</a>
2829
&nbsp;&bull;&nbsp; <a href="skills/">Skills</a>
2930
&nbsp;&bull;&nbsp; <a href="rules/">Rules</a>
3031
&nbsp;&bull;&nbsp; <a href="templates/">Templates</a>
@@ -45,7 +46,8 @@ The content is consumed by AI coding agents (Cursor, Claude Code, any MCP-capabl
4546
| **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, engine export presets |
4647
| **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 |
4748
| **Templates** | A working Extensions Platform add-on starter, a headless batch script starter, and a GLB-in engine-ready asset pipeline |
48-
| **Snippets** | 24 small standalone Python files demonstrating canonical patterns |
49+
| **Snippets** | 27 small standalone Python files demonstrating canonical patterns |
50+
| **Showcase** | Budget-conformance props under [`showcase/`](showcase/). Not examples. Conventions: [`showcase/README.md`](showcase/README.md) |
4951

5052
## Quick start
5153

‎showcase/README.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Showcase
2+
3+
Budget-conformance props. **Not examples.**
4+
5+
An example witnesses one API contract and carries a falsifier that makes a
6+
real assertion fail. A recognizable crate witnesses no API contract.
7+
Forcing one into `examples/` produces a vacuous check. Showcase pieces
8+
assert that generated geometry meets **declared asset budgets**.
9+
10+
"It rendered without error" is not an assertion. A tolerance so wide
11+
nothing can violate it is not an assertion.
12+
13+
This directory is a sibling of `examples/`, not nested under it. The
14+
manifest key is `showcase`. Counts are separate from the example total.
15+
16+
## Conventions
17+
18+
Every piece is a directory `showcase/<name>/` with a script, a README that
19+
includes an exit-code table, a falsifier, a `catalog.json` row, a gallery
20+
entry in `showcase/gallery.json`, and a rendered still.
21+
22+
- **Deterministic.** Fixed seed (or no RNG). Identical output across runs
23+
on the same binary, and across Blender 4.5, 5.1, and 5.2. If a value
24+
legitimately cannot match across versions, the piece README names it,
25+
states a tolerance, and justifies it. DECIMATE COLLAPSE triangle counts
26+
are the usual suspect — prefer ratio bands, not exact counts.
27+
- **Budgets declared** in the script as named constants and documented in
28+
the piece README. Suggested axes: triangle count, material count, UV
29+
bounds, bounding-box dimensions, LOD ratios, collider triangle ceiling,
30+
export file written.
31+
- **Assertions recompute** those budgets from the generated result. They
32+
never restate constants the script set (`if n == DECLARED` where `n` was
33+
assigned `DECLARED` is not a check).
34+
- **Falsifier** breaks one pipeline stage so a **named** budget fails and
35+
the piece exits its documented code. Prove default and falsifier on
36+
4.5.11, 5.1.2, and 5.2.1.
37+
- **Exit codes** are file-local: `0` success, argparse `2`, `3` and above
38+
in check order. `9` is legal. FATAL `sys.exit(1)` is a crash, never a
39+
named check.
40+
- **Rendered still and gallery entry.** Showcase pieces are visual by
41+
definition. The pathology / sidecar exemption does not apply. Call
42+
`examples/gallery_framing.check_framing` on the `--output` path only.
43+
Do not pass `deviation=`. Do not move or modify `gallery_framing.py` —
44+
import it by resolving the repo root (see the shipping-crate script).
45+
- **Composition.** The README names which shipped skills and snippets the
46+
piece composes. Duplicated helpers stay inlined or copied; showcase
47+
scripts do not import snippets as a package.
48+
49+
## Layout
50+
51+
```text
52+
showcase/
53+
README.md # this file
54+
gallery.json # this tree's gallery index (pieces[])
55+
<name>/
56+
<name>.py
57+
README.md
58+
preview.webp
59+
```
60+
61+
Hero stills live at `docs/gallery/assets/<name>-hero.webp` like examples.
62+
`scripts/build_gallery.py` merges `showcase/gallery.json` into the same
63+
`docs/gallery/` site as examples, tagged `showcase`.
64+
65+
## Smoke
66+
67+
`tests/smoke/catalog.json` takes opaque script paths. A showcase row is
68+
enough; `blender-smoke.yml` has no path filter and runs the whole catalog
69+
on every PR. Measure wall-clock before adding the next piece.

0 commit comments

Comments
 (0)