SKILL.md
SKILL.mdBrowse 2 files
3,317 tokens
13,931 bytes
Token encoding: o200k_base
Snapshot 24fd22b
1---2name: dream-loop3description: "Build stunning 3D scenes via a concept-art fidelity loop."4version: 1.0.05author: Anshu Chimala (adapted by Nous Research)6license: MIT7dependencies: []8platforms: [linux, macos]9metadata:10 hermes:11 tags: [3d, games, webgl, threejs, image-generation, visual-fidelity, creative]12 category: creative13 related_skills: [p5js, claude-design, manim-video]14 upstream: https://github.com/achimala/dream-loop15---16 17# Dream Loop Skill18 19An autonomous process for building extremely impressive visuals, especially 3D20scenes (games, apps, usually browser three.js/WebGL): generate photorealistic21concept art of the ideal result, build it, screenshot the live build, have a22judge score screenshot vs concept against a gated ladder, and iterate until23convergence. Goal: the most visually stunning result at an acceptable frame24rate for the target platform (e.g. 60 fps browser, 120 fps modern mobile).25 26This skill does NOT cover general web-app functionality, 2D UI design, or27non-visual quality — only the visual-fidelity loop.28 29## When to Use30 31- User says "dream loop" or asks for a game/scene/app built to a very high32 level of graphical fidelity.33- Follow-up refinement passes on an existing visual product (see Follow-up34 loops below).35 36## Prerequisites37 38- **Concept art**: the `image_generate` tool. If unavailable, stop and ask the39 user for a concept image (or an image-generation API to connect to).40- **Screenshots**: `browser_exec` — serve the build locally41 (`python3 -m http.server` for static builds), then `new_tab(url)`,42 `wait_for_load()`, `capture_screenshot()`.43- **Judging**: `vision_analyze` (see Judge section for the one-image-per-call44 workaround).45- **Optional**: Blender for asset modeling — see the `blender-3d-automation`46 skill. `delegate_task` for parallel asset work and fresh-context judging.47 48If you don't have the tools needed for the full loop, flag that to the user49early and stop.50 51## Quick Reference52 53| Stage | What happens | Artifacts (`.dream-loop/`) |54|---|---|---|55| 1. Target | Get/confirm the user's description | notes |56| 2. Concept | Generate "in-engine screenshot" concept art | `concept.png` |57| 3. Budget | Record time budget & start time (if given) | notes |58| 4. Build | Implement the concept as well as possible in one go | source, plans |59| 5. Screenshot | Capture live build at concept resolution | `round-N.png` |60| 6. Self-check | Rigorous side-by-side audit before judging | assessment log |61| 7. Judge | Ladder-scored comparison, actionable directives | verdict log |62| 8. Iterate/Exit | Address directives or exit per criteria | — |63 64## Procedure65 66### 1. The target concept67 68If the user provided a description of a game, scene, or app, proceed — don't69ask for clarification unless it's too vague to generate concept art from. If70they didn't, ask for it.71 72Put working context/files in `.dream-loop/` and gitignore it (unless told73otherwise).74 75### 2. Concept art76 77The concept is a realistic, high-quality, impressive target: the look of a78current AAA game running in real time. Physically plausible materials (wet79stone, brushed metal, cloth, glass) with real roughness and normal detail,80correct proportions, atmosphere (fog, haze, rain, dust, volumetric light),81cinematic lighting with a clear key and rich shadows. It should NOT be82stylized or an artistic rendition — it should look like a true screenshot of83the ideal result.84 85Avoid these failure modes when generating with `image_generate`:86 87- **Overbaked**: photographic clutter, film grain, hundreds of unique small88 objects, excessive detail on every surface that reads as noise. A real-time89 build with modeled assets won't match this, and it won't even look good.90- **Oversimplified**: cartoon or toy look, flat shading, blobby primitive91 shapes, empty surfaces. Boring; will not impress the user.92 93Aim for the middle ground: beautiful surfaces and materials that shaders94render well, strong atmosphere and lighting, an interesting palette, and95focused hero elements with fine detail that draws the eye (not every element96fighting for attention).97 98Prompt for "in-engine screenshot" more than "concept art" and discourage the99noisy/grainy look. Review the image with `vision_analyze`; if it hits a100failure mode, pass it back to `image_generate` in edit mode and ask it to fix101the issue. Save it as `.dream-loop/concept.png`.102 103If you generated the art (the user didn't supply it), pause and confirm it104matches the user's vision before starting the build loop.105 106### 3. Time budget107 108If the user gives a time budget, record the start time and check the clock109between rounds. Don't degrade visual fidelity to hit the budget — strive for110the absolute best result, and don't rush work to the judge. Parallelize or111distribute work (e.g. `delegate_task` for independent assets) to hit the112time goal, but no shortcuts: it's better to hit the time limit with113meaningful, beautiful progress than with something broadly complete but ugly.114 115If no time budget is given, run until an exit criterion — but warn upfront116that this may consume a lot of tokens.117 118### 4. Build loop119 120Look at the concept art and implement it in one go, making that first pass121count across every tier of the score ladder: composition, textures, lighting,122details. Sculpt and model assets carefully (or use external ones if allowed);123don't settle for basic procedural elements and flat surfaces unless the art124style calls for it. Write intermediate files/plans to `.dream-loop/`.125 126- If Blender is installed and the concept involves 3D assets, prefer modeling127 in Blender (see the `blender-3d-automation` skill). For complex assets,128 delegate to subagents via `delegate_task`.129- If the user allows external assets, prefer them over modeling unless the130 asset is simple. If unspecified, assume NO external assets from the web.131- Do not be lazy with key environmental details (scenery, flooring,132 buildings): simple shapes look blocky, shiny, flat, and fake. Tiny details133 and texturing matter and need custom sculpting.134- Use `image_generate` for textures, normal maps, skyboxes, etc. — better135 looking and faster than procedural ones.136 137### 5. Screenshot138 139Serve the build (e.g. `python3 -m http.server` in the build dir), then via140`browser_exec`: `new_tab('http://localhost:8000')`, `wait_for_load()`, allow141the scene to settle, `capture_screenshot()`. Target the same resolution and142aspect ratio as the concept art so the comparison is fair. Save as143`.dream-loop/round-N.png`.144 145### 6. Self-check before judging146 147Each time, review the candidate screenshot yourself before submitting. Do not148submit half-baked work. Compare screenshot and concept side by side and log an149honest assessment of judge-readiness; only submit if confident you've150significantly improved the score. Be rigorous and audit every pixel: big stuff151(missing/incorrect objects, wrong scale, perspective, positioning) and small152stuff (rendering glitches, flat untextured surfaces, ugly lighting, poor153contrast, washed-out or oversaturated color, speckles, ugly shadows). Scan154surface by surface, object by object, and list findings.155 156### 7. Judge157 158Judging should ideally be done by a fresh subagent with a clean context each159round (`delegate_task`), to keep it objective and cheap. Give the judge the160latest screenshot, the concept, and (from round 2 on) the previous round's161screenshot and verdict.162 163Mechanics: `vision_analyze` takes one image per call. Either have the judge164make sequential calls (concept, then screenshot, then compare from memory of165its own descriptions), or — better — stitch a labeled side-by-side composite166with ImageMagick (`convert concept.png shot.png +append compare.png`) or PIL167and analyze that single image.168 169Judge prompt:170 171> You are an art director reviewing a real-time render against its concept172> art. Compare the screenshot to the concept and score it 0-10 using this173> ladder. The ladder is gated: a frame cannot score above a tier's cap until174> every requirement of the tiers below it is fully met. Be strict about the175> gates.176>177> - **Tier 1, shape (0-3):** camera, framing, composition, and the position178> and rough scale of every major object match the concept. Layout, not179> finish: every major element present, in the right region of the frame180> (within ~10% of frame width/height), at roughly the right size (within181> ~25%). Right place and vaguely correct outline passes even if edges and182> surface are wrong; save precision nitpicks for Tier 4. Cap 3 until true.183> - **Tier 2, light and color (3-5):** key light direction and color, overall184> exposure (no clipping to black or white), shadow depth, palette,185> contrast, atmosphere. Attend to reflections, glows, etc. Ensure the scene186> is not too bright or dark relative to the concept. Judge the whole frame,187> not tiny details (Tier 4). Cap 5 until lighting/reflections/color/188> contrast are generally right.189> - **Tier 3, materials and surfaces (5-7):** every surface reads as the190> right material at a glance: textures, roughness, translucency, wetness,191> reflections. Assets must not look procedural, blocky, smooth/plastic;192> frame-dominating elements should be properly sculpted and detailed. Cap 7193> until true.194> - **Tier 4, fine detail (7-9):** the small things. Nitpick relentlessly;195> inspect every little object up close. Layout aligns near-perfectly;196> materials extremely convincing. Cap 9 until right.197> - **Tier 5, indistinguishable (9-10):** holds up side by side and zoomed198> in. Nitpick every pixel.199>200> If a previous verdict and screenshot are provided: you are one reviewer in201> a sequence, not the first. Maintain consistency. First mark each previous202> directive LANDED, PARTIAL, or NOT DONE against the new screenshot; carry203> forward anything PARTIAL or NOT DONE. Don't reverse a prior directive204> unless the result is clearly worse — and if you do, say so and why.205>206> Output format:207> 1. Score on the first line; "Tier N" (highest fully-passed gate) on the208> second.209> 1b. If given a previous verdict: the LANDED / PARTIAL / NOT DONE list.210> 2. "Blocking:" the specific failures of the *next* tier's gate. The builder211> must clear these before anything else counts. Name the element and the212> change, with magnitudes: "Rocks: replace the stacked ovoid boulders with213> one continuous fractured slab; cracks 2-5cm wide, dark interiors, add214> surface texture so they don't look flat/plastic" — not "the rocks look215> artificial".216> 3. Then at most 4 further directives from higher tiers, same style, ordered217> by points recoverable.218>219> No non-actionable feedback ("this looks synthetic") — name the specific220> causes. Every directive must be actionable this round. Don't round up: if a221> gate isn't fully passed, the cap holds.222 223### 8. Exit criteria224 225- **Score >= 8 and target FPS acceptable**: done. Show the user the latest226 screenshot; ask if they want more iterations.227- **Score >= 8 but FPS unacceptable**: optimize — lossless wins first, then228 minimal-visual-impact ones. Re-judge afterwards to confirm no regression.229- **Stall approaching** (best score hasn't improved a full point in 2 rounds,230 or the judge named the same gap 3 times): stop incremental tweaks. Step231 back and ask what about the *approach* is capping the score. Make one big232 structural change in a round: swap asset strategy (sculpt in Blender, pull233 real models/textures/HDRIs if allowed), rewrite the lighting model, rebuild234 the composition, change the camera. Self-check carefully — big changes235 break things. Only repeat parameter tuning if you can articulate why it236 would work this time.237- **Stalled** (already tried a big structural change, score flat 3 rounds,238 judge is nitpicking or demanding intractable things like raytracing on a239 GPU-less machine): stop, tell the user why you're blocked, give options.240- **Otherwise**: address all or most heavy-hitting gaps this round, not just241 the top one — rounds are expensive. Prioritize gaps that move the needle242 most (lighting, textures, mesh detail). Only revert if the score dropped a243 full point or more; small dips are judge noise, and reverting a whole round244 throws out good changes with bad. If one change clearly regressed, undo245 just that change. Loop.246 247## Follow-up loops248 249When building on an existing product (or the user re-invokes the skill for250refinements), don't create new concept art in a vacuum — it may diverge from251what exists. Instead capture a live screenshot of the current product and252prompt `image_generate` to render the best possible version of it (current253screenshot → AAA-graphics version of the same shot), then use that as the254target. Multiple screens can run parallel judge loops if asked, at higher255token cost.256 257## Pitfalls258 259- Overbaked or oversimplified concept art (see failure modes) — fix the260 concept before building against it.261- Submitting half-baked screenshots to the judge; the self-check gate exists262 for a reason.263- Screenshot at a different resolution/aspect than the concept — unfair264 comparison, noisy verdicts.265- Tunnel-visioning on incremental tweaks when the judge says you're off base.266- Judging both images in one `vision_analyze` call — it takes one image;267 composite them first.268- Screenshotting before the scene loads/settles — add a wait after269 `wait_for_load()` for asset streaming and animation warm-up.270 271## Verification272 273- `.dream-loop/concept.png` exists and passed the failure-mode review (and274 user confirmation, if generated).275- Each round has a screenshot, a logged self-assessment, and a judge verdict276 with score + tier + directives.277- Exit only via an explicit exit criterion; final screenshot shown to the278 user with the final score and FPS measurement.279 280---281Adapted from [dream-loop](https://github.com/achimala/dream-loop) by Anshu282Chimala (MIT). Upstream license vendored as `LICENSE.txt`.283 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.