Skip to content

Commit fdb9ea9

Browse files
committed
docs: enhance new-example-prompt with detailed guidance on subject selection and API contract validation
Updated the new-example-prompt.md to clarify the importance of reviewing CLAUDE.md and AGENTS.md for repository-specific rules. Expanded on subject selection criteria, emphasizing the need for checks that can fail for real reasons and the necessity of documenting any version-gated divergences between Blender 4.5 and 5.1. Improved clarity on the requirements for example documentation and rendering expectations. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
1 parent 2c3a7c4 commit fdb9ea9

1 file changed

Lines changed: 113 additions & 101 deletions

File tree

docs/new-example-prompt.md

Lines changed: 113 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,47 @@ not "a working example"; it is an example strong enough to anchor the gallery on
99

1010
First, review `CLAUDE.md`, `AGENTS.md`, `ROADMAP.md`, `examples/gallery.json`,
1111
`docs/VISUAL-STYLE.md`, and several existing examples—study the strongest ones, not
12-
just the nearest one. Use them to understand the repository's current conventions,
13-
integration points, visual standard, and test structure. Check all existing examples
14-
before choosing a subject so your contribution does not duplicate or slightly
15-
repackage something already covered.
12+
just the nearest one. `CLAUDE.md` and `AGENTS.md` are binding: they carry the
13+
repo-specific runtime facts (binary discovery, staging hazards, quality gates) and
14+
fleet workflow rules (branching, DCO, merge and CI-evidence policy) that this prompt
15+
assumes. Where this prompt and those files disagree, the files win—they are updated
16+
more often. Check all existing examples before choosing a subject so your
17+
contribution does not duplicate or slightly repackage something already covered.
1618

17-
Before editing, inspect the Git state. Start from an up-to-date `main`, preserve unrelated
18-
work, and create a focused feature branch. Never force-push or bypass hooks. Do not include
19-
secrets, temporary renders, caches, or unrelated files.
19+
Before editing, inspect the Git state. Start from an up-to-date `main`, preserve
20+
unrelated work, and create a focused feature branch. Never force-push or bypass
21+
hooks. Do not include secrets, temporary renders, caches, or unrelated files.
2022

21-
Subject selection. Prefer the ROADMAP candidate pool if it has entries; otherwise choose
22-
freely. Whatever the source, the subject must pass all of these tests before you write
23-
code:
23+
Subject selection. Prefer the ROADMAP candidate pool if it has entries; otherwise
24+
choose freely. Whatever the source, the subject must pass all of these tests before
25+
you write code:
2426

2527
- It witnesses a real, load-bearing API contract—something with observable behavior
26-
that can drift, not a convenience wrapper or a tutorial topic. The strongest subjects
27-
are ones AI-generated Blender code commonly gets wrong: object-mode versus edit-mode
28-
data lifetimes, evaluated versus original data, ordering constraints, references that
29-
dangle after CustomData reallocation, APIs renamed or restructured between 4.5 LTS
30-
and 5.1.
31-
- Its check can fail for a real reason. Before trusting any assertion, prove it catches
32-
the failure it claims to catch: temporarily break the contract (skip the pose, swap
33-
the buffer, use the legacy path) and confirm the check exits non-zero, then restore
34-
it. An assertion that cannot fail witnesses nothing. State in the README what failure
35-
each check would catch.
36-
- Its correctness is independently derivable. The best checks compare Blender's output
37-
against a closed-form or independently computed expectation (re-implemented math, a
38-
round-trip through a raw buffer, a known geometric invariant), not against a value
39-
captured from a previous run of the same code.
40-
- Its render is legible as proof. Someone glancing at the thumbnail should be able to
41-
infer what contract is being demonstrated. If the render would look the same whether
42-
the API worked or not, redesign the scene until failure would be visible.
43-
44-
Where an API diverges between 4.5 and 5.1, asserting each side's actual contract is part
45-
of the witness—version-gate explicitly and document the divergence rather than papering
46-
over it. If you discover an undocumented hazard while authoring (a crash, a dangling
47-
reference, an ordering constraint), that discovery belongs in the code comments and
48-
README; it is often more valuable than the original subject.
28+
that can drift, not a convenience wrapper or a tutorial topic. The strongest
29+
subjects are ones AI-generated Blender code commonly gets wrong: object-mode
30+
versus edit-mode data lifetimes, evaluated versus original data, ordering
31+
constraints, references that dangle after CustomData reallocation, APIs renamed
32+
or restructured between 4.5 LTS and 5.1.
33+
- Its check can fail for a real reason. Before trusting any assertion, prove it
34+
catches the failure it claims to catch: temporarily break the contract (skip the
35+
pose, swap the buffer, use the legacy path) and confirm the check exits non-zero,
36+
then restore it. An assertion that cannot fail witnesses nothing. State in the
37+
README what failure each check would catch.
38+
- Its correctness is independently derivable. The best checks compare Blender's
39+
output against a closed-form or independently computed expectation
40+
(re-implemented math, a round-trip through a raw buffer, a known geometric
41+
invariant), not against a value captured from a previous run of the same code.
42+
- Its render is legible as proof. Someone glancing at the thumbnail should be able
43+
to infer what contract is being demonstrated. If the render would look the same
44+
whether the API worked or not, redesign the scene until failure would be visible.
45+
46+
Where an API diverges between 4.5 and 5.1, asserting each side's actual contract is
47+
part of the witness—version-gate explicitly and document the divergence rather than
48+
papering over it. Version-gate on the `bpy.app.version` tuple, not
49+
`version_string`, which is not bare semver on LTS builds. If you discover an
50+
undocumented hazard while authoring (a crash, a dangling reference, an ordering
51+
constraint), that discovery belongs in the code comments and README; it is often
52+
more valuable than the original subject.
4953

5054
The example must:
5155

@@ -55,8 +59,9 @@ The example must:
5559
logs carry the measured values;
5660
- default to a fast check-only run and optionally render its own gallery image;
5761
- follow repository conventions and relevant Blender safety rules;
58-
- include concise documentation explaining what it teaches, what each check witnesses,
59-
what failure it would catch, and any version-gated divergence between 4.5 and 5.1;
62+
- include concise documentation explaining what it teaches, what each check
63+
witnesses, what failure it would catch, and any version-gated divergence between
64+
4.5 and 5.1;
6065
- produce a deliberate, well-framed render rather than a mockup, primitive dump, or
6166
placeholder.
6267

@@ -65,78 +70,85 @@ shape from neighboring examples and repository configuration, including the exam
6570
directory, README, gallery metadata and assets, plugin manifest, smoke workflow,
6671
top-level README, and generated gallery pages. After regenerating the gallery with
6772
`python scripts/build_gallery.py`, read the **generated** output character by
68-
characternot only `examples/gallery.json` source fields. Open
73+
characternot only `examples/gallery.json` source fields. Open
6974
`docs/gallery/index.html` and `docs/gallery/<name>/index.html` and inspect the
70-
rendered `<img alt>` text and the witnesses callout for duplicated words, truncation,
71-
and generator artifacts (the previous `teaches.split(".")[0]` bug truncated alts at
72-
dotted API paths like `bmesh.ops`; source JSON looked fine). Keep the ROADMAP
73-
candidate pool in sync: remove the shipped subject, and add any promising subjects
74-
you identified but did not build. Do not hand-edit release-owned version fields or
75-
generated pages; use the repository's generator.
76-
77-
Run the new example's check-only path on both supported Blender versions. Locate local
78-
Blender binaries by checking `.scratch/` at the repo root first — prior runs download
79-
official releases there and some machines have no system install; download an official
80-
release into it if a needed version is missing (it is gitignored) — then system installs.
81-
Do not probe blindly; state the exact binary path and the version the binary itself
82-
reports for every run. Render and visually inspect the final image, regenerate the
83-
gallery, and run all relevant repository
84-
validation. If Blender 4.5 is unavailable locally, say so precisely and use the repository's
85-
4.5 CI job—do not substitute another version and report it as 4.5. If the render path
86-
requires an engine or device unavailable locally (Cycles on a GPU-less host), say so and
75+
rendered `<img alt>` text and the witnesses callout for duplicated words,
76+
truncation, and generator artifacts (the previous `teaches.split(".")[0]` bug
77+
truncated alts at dotted API paths like `bmesh.ops`; source JSON looked fine). Keep
78+
the ROADMAP candidate pool in sync: remove the shipped subject, and add any
79+
promising subjects you identified but did not build. Do not hand-edit release-owned
80+
version fields or generated pages; use the repository's generator.
81+
82+
Run the new example's check-only path on both supported Blender versions. Locate
83+
local binaries per `CLAUDE.md`'s runtime discovery guidance (`.scratch/` at repo
84+
root first, then system installs; download official releases into `.scratch/` if a
85+
needed version is missing—it is gitignored). Do not probe blindly; state the exact
86+
binary path and the version the binary itself reports for every run. If Blender 4.5
87+
is unavailable locally, say so precisely and use the repository's 4.5 CI job—4.4 is
88+
not a substitute and must never be reported as 4.5. If the render path requires an
89+
engine or device unavailable locally (Cycles on a GPU-less host), say so and
8790
identify exactly which paths were exercised only in CI or by inspection. Fix every
8891
failure you introduce.
8992

90-
Treat visual quality as a shipping gate with the same rigor as the checks. Conform to
91-
`docs/VISUAL-STYLE.md` explicitly (Standard view transform, dark studio stage, AREA
92-
key/fill/rim/wedge, designed hero materials, framing, 1280×720 → hero/preview webp).
93-
Inspect the actual rendered pixels at full size and as the gallery thumbnail.
94-
Iterate—the first render is a draft, not a candidate. Revise until the subject and
95-
demonstrated API contract are immediately readable, the composition is intentional,
96-
important geometry is not clipped, highlights are not blown out, lights or helper
97-
objects are not visible unintentionally, and materials, lighting, background, and
98-
camera feel designed rather than left at Blender defaults.
99-
100-
Contact-sheet gate (required before shipping the still): place the new hero beside
101-
the pinned calibration set — canonical membership is listed in `CLAUDE.md`
102-
§ Quality Gates for Example Runs — and compare stage darkness, wedge warmth,
103-
subject fill, saturation, and thumbnail legibility side by side. Do not ship until
104-
the new image holds up in that lineup—not merely "looks fine alone." When a new
105-
example outclasses a member, update the pinned set in `CLAUDE.md`, its canonical
106-
home. One successful render
107-
command is not proof that the image is good, and neither is the second. Commit the
93+
Treat visual quality as a shipping gate with the same rigor as the checks. Conform
94+
to `docs/VISUAL-STYLE.md` explicitly (Standard view transform, dark studio stage,
95+
AREA key/fill/rim/wedge, designed hero materials, framing, 1280×720 → hero/preview
96+
webp). Inspect the actual rendered pixels at full size and as the gallery
97+
thumbnail. Iterate—the first render is a draft, not a candidate. Revise until the
98+
subject and demonstrated API contract are immediately readable, the composition is
99+
intentional, important geometry is not clipped, highlights are not blown out,
100+
lights or helper objects are not visible unintentionally, and materials, lighting,
101+
background, and camera feel designed rather than left at Blender defaults.
102+
103+
Contact-sheet gate (required before shipping the still): build a composite placing
104+
the new hero beside the pinned calibration set—canonical membership is in
105+
`CLAUDE.md` § Quality Gates for Example Runs—and compare stage darkness, wedge
106+
warmth, subject fill, saturation, and thumbnail legibility side by side. Commit the
108107
composite under `docs/gallery/contact-sheets/`, link it in the PR body, and report
109-
per-criterion verdicts including mean luminance versus the calibration images — a
110-
claim without the committed composite is not acceptable evidence.
108+
per-criterion verdicts including mean luminance of the candidate versus each
109+
calibration image. The image ships only if it is not sortable as the odd one out in
110+
that lineup—not merely "looks fine alone." A claim without the committed composite
111+
is not acceptable evidence. When a new example outclasses a member, update the
112+
pinned set in `CLAUDE.md`, its canonical home. One successful render command is not
113+
proof that the image is good, and neither is the second.
111114

112115
After implementation and local verification:
113116

114-
1. Review the complete diff and remove accidental churn or temporary files.
115-
2. Commit the focused change with a conventional, release-worthy `feat:` subject that
116-
explains why the example belongs in the repository.
117-
3. Push the feature branch and open a pull request against `main` with a concise summary,
118-
the API contract witnessed, what failure each check catches (and proof you falsified
119-
it once), visual notes, and an exact test plan. Label explicitly what was proven by
120-
live run versus established by inspection only.
121-
4. Watch every attached PR check, including validation, manifest/count checks, ecosystem
122-
drift, Socket Security checks, and Blender 4.5/5.1 smoke jobs. Investigate and fix
123-
failures within this change's scope, push fixes, and repeat until all checks pass. A
124-
pending or failing Socket check is unresolved — wait before merging.
125-
5. Review PR comments and requested changes. Apply valid feedback and re-run affected
126-
checks. Do not merge with unresolved failures or requested changes.
127-
6. Once the PR is mergeable and green, squash-merge it and delete the remote feature
128-
branch.
117+
1. Review the complete diff and remove accidental churn or temporary files. Stage
118+
with explicit paths, never `git add -A`—the Cursor plugin locally injects a
119+
CLAUDE.md block that a bulk add will sweep into the commit, and `.scratch/`
120+
contents must stay out.
121+
2. Commit the focused change with a conventional, release-worthy `feat:` subject
122+
that explains why the example belongs in the repository, signed off with `-s`
123+
per CONTRIBUTING.md.
124+
3. Push the feature branch and open a pull request against `main` with a concise
125+
summary, the API contract witnessed, the falsification evidence (the
126+
break-the-contract probe, its exit code, and the measured error), visual notes
127+
with the contact-sheet link, and an exact test plan. Label explicitly what was
128+
proven by live run versus established by inspection only.
129+
4. Watch every attached PR check, including validation, manifest/count checks,
130+
ecosystem drift, Socket Security checks, and Blender 4.5/5.1 smoke jobs.
131+
Investigate and fix failures within this change's scope, push fixes, and repeat
132+
until all checks pass. A pending or failing Socket check is unresolved—wait
133+
before merging.
134+
5. Review PR comments and requested changes. Apply valid feedback and re-run
135+
affected checks. Do not merge with unresolved failures or requested changes.
136+
6. Once the PR is mergeable and green, squash-merge it and delete the remote
137+
feature branch.
129138
7. Wait for any automated release/version-sync commit triggered by the merge, then
130-
fast-forward local `main` to `origin/main`, and verify main HEAD is green including
131-
all post-merge jobs (Release, Validate, Ecosystem drift check, Deploy GitHub Pages).
132-
The smoke jobs are pull_request-triggered and do not re-run on the merge SHA: the
133-
post-merge evidence is that both smoke jobs passed on the PR head SHA that became
134-
the sole squash-merged commit. Do not hand-edit release-owned version fields.
135-
8. Confirm the final working tree is clean and report the PR URL, merge commit, resulting
136-
version (if released), measured check values, and checks completed.
137-
138-
Do not stop at a proposal or ask me to choose the topic. Explore, choose, implement,
139-
verify, ship, merge, synchronize, and report the completed result. Only stop for a real
140-
blocker that requires user action, such as authentication, an unavailable required
141-
runtime with no CI substitute, a merge policy requiring approval, or unrelated local
142-
changes that cannot be safely preserved.
139+
fast-forward local `main` to `origin/main`, and verify main HEAD is green
140+
including all post-merge jobs (Release, Validate, Ecosystem drift check, Deploy
141+
GitHub Pages where path-triggered). The smoke jobs are pull_request-triggered
142+
and do not re-run on the merge SHA: the post-merge evidence is that both smoke
143+
jobs passed on the PR head SHA that became the sole squash-merged commit, with
144+
the actual Blender binary versions confirmed in the job logs. Do not hand-edit
145+
release-owned version fields.
146+
8. Confirm the final working tree is clean and report: PR URL, merge commit,
147+
resulting version (if released), exact local binaries used, measured check
148+
values, falsification evidence, contact-sheet link, and checks completed.
149+
150+
Do not stop at a proposal or ask me to choose the topic. Explore, choose,
151+
implement, verify, ship, merge, synchronize, and report the completed result. Only
152+
stop for a real blocker that requires user action, such as authentication, an
153+
unavailable required runtime with no CI substitute, a merge policy requiring
154+
approval, or unrelated local changes that cannot be safely preserved.

0 commit comments

Comments
 (0)