Skip to content

feat: one pipeline for scenes made from a photo - #110

Open
lnorton89 wants to merge 5 commits into
masterfrom
feat/scene-forge
Open

lnorton89 wants to merge 5 commits into
masterfrom
feat/scene-forge

Conversation

@lnorton89

@lnorton89 lnorton89 commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

One written pipeline for making a scene from a photo of an artwork (D562).

  • The scene-from-image skill (.claude/skills/scene-from-image/):
    • the reading to write down first, the layout archetypes, and a template scene that already has the clock pass, glow that cannot clip into rectangles, analytic pixel size and the tone shoulder;
    • the control and audio conventions, a critique checklist built from past rejections, and the gates;
    • updated with what eight builders hit while using it: the predefined PI, GLSL ES reserved words, ANGLE inlining every call site, EXIF rotation, timing on a shared GPU, writing from a worktree, and recipes for helical shells, echoing outlines, noise meanders and polar hair.
  • strobe-forge check renders frames at fixed times beside the reference photo, compiles the desktop and ES dialects (ANGLE in a child process), times the scene at 1080p (lowest of three batches), and runs the From image gates: black, flat, blown, frozen and flashing. It also probes every control at both ends of its range, measuring the change both across the whole frame and per tile.
  • strobe-forge make runs the same skill text and checker through a provider trait, with Anthropic as the first provider. Compile errors go back to the model up to three times, then the sheet goes back for critique rounds. The model gets no tools and can only return one main.glsl and one scene.json. The key comes from ANTHROPIC_API_KEY. The client sits behind the default llm feature, and CI also checks the crate without it.
  • Housekeeping: TOP in the architecture rules, the ci.rs lanes, ARCHITECTURE.md, ROADMAP.md, the CLAUDE.md commands, and backlog I-07.

Tested:

  • Eight scenes built with the skill and checked with check on LIGHTNING's RX 580, native and ANGLE D3D11. They stay in the owner's private library.
  • fmt and workspace clippy, plus clippy without the llm feature.
  • 25 forge tests, the conventions tests, and the decisions and credits checks.

Not tested:

  • make against the real API; only canned replies.
  • The GL test, which skips on Windows because there is no headless EGL; Linux CI should run it.

Update (merged with master after v0.4.0):

  • The skill gains step 6: share a scene only when asked, as a short /s/<id> link through the site's /api/share (D527), opened and checked before it is reported. The step is marked as for agent sessions, so make skips it.
  • Fixes from a review of this branch:
    • Dialect child: its pipes are now read while it runs. Before, a long GLSL ES compile log could fill the pipe, the child would block until the 240 s deadline, and a real failure was reported only as "not checked".
    • make: an API error (timeout, overload, refusal) now ends the loop instead of the run. The scene that stands and forge-log.md are still written.
    • check:
      • It warns when a steady 1080p time is over the skill's 2.5 ms budget.
      • --size must be at least 1x1.
      • The report prints the gate constants instead of copies of them.
    • Fallbacks: fallbacks is sent only to the models documented to take it, matched by exact ID.
    • Gates: they share one luma pass with the per-frame warnings.
  • Cargo.lock now records the forge crate at 0.4.0. CI's --locked would have refused the merge without it.
  • Tested on LIGHTNING:
    • cargo xtask ci fmt generated check test passes on Windows.
    • All 27 forge tests pass. Two are new: a child process with 200 KB of output is read whole, and a failed request keeps the passing scene.
    • The conventions tests pass.

Adds the scene-from-image project skill (the reading, archetypes, a
template scene, controls and critique checklists) and strobe-forge:
`check` renders a scene beside its reference photo, compiles both GLSL
dialects, times it at 1080p, runs the From image gates and probes every
control; `make` drives the same skill and checker through the Anthropic
API with compile repair and critique rounds. See D562.
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @lnorton89's task in 18s —— View job


Review of PR #110

I found no blocking problems. This was a targeted review, not a line-by-line read of all 4.5k added lines.

What I checked

  • strobe-forge has no unsafe, unwrap, expect, panic!, todo! or unreachable!. The unwrap_or* hits are fallbacks, which the lints allow.
  • println! appears only in the CLI front end (main.rs) and in the child-process JSON hand-off (dialect.rs). That seems intended for a binary rather than a library.
  • The Anthropic client reads the key from ANTHROPIC_API_KEY, rejects an empty key, and sets a global timeout. The key isn't logged.
  • Docs are updated: D562, ROADMAP, ARCHITECTURE, the backlog and DECISIONS_BY_AREA. I saw no hand edit to CHANGELOG.md.

Minor notes (non-blocking)

  • anthropic.rs:40 hardcodes the beta header server-side-fallback-2026-07-01, and takes_fallbacks matches model-name prefixes. When the beta ends or a model is renamed, make will fail with an API error. Consider retrying once without fallbacks on a 400.
  • MAX_TOKENS is 32,000 and the timeout is 20 minutes. With up to three compile-error retries plus critique rounds, a single make can spend a lot of tokens and time. A per-run cap or a printed token count would help the user.
  • make is only tested against canned replies. The real API path (the beta header, output_config.effort, fallbacks) is unverified. Run it once against the live API before relying on it.

Not verified: I didn't build or run the tests here, and I didn't run the GL test (it skips without EGL). My checkout also shows the .claude/skills/scene-from-image/ files deleted and CLAUDE.md modified locally. That is an artifact of the checkout, not part of the PR diff.
· branch feat/scene-forge

…ene on an API error, and warns over the timing budget

- dialect: both pipes are drained on threads while the child runs, so a long GLSL ES compile log no longer blocks the child until the deadline and turns a real failure into "not checked".
- make: a provider error ends the loop, not the run; the scene that stands and forge-log.md are still written.
- check: a steady 1080p time over the skill's 2.5 ms is a warning; --size must be at least 1x1; the report prints the gate constants.
- anthropic: fallbacks only on the models documented to take them, by exact ID.
- gate: one luma pass shared by the gates and the per-frame warnings.
- skill: the share step says it is for agent sessions, not make.
@lnorton89
lnorton89 enabled auto-merge November 12, 2026 22:00
…nd-over sweep

From making a knife painting into a scene: a coats archetype for gestural work with no subject, with the three-coat hand-over that never pops; a thick-paint material and its controls; counting the palette by area; mixing wet paint as pigment; drawing opaque layers from the top down with early exits; a critique list for painterly work; a frame sweep across any hand-over; and wrapping controls centred on zero.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant