Spaces:
Running
Running
jasondo OpenAI Codex commited on
Commit Β·
7006f4b
1
Parent(s): 4755cbc
Finalize docs and archive prompts
Browse filesCo-authored-by: OpenAI Codex <codex@openai.com>
- AGENTS.md +15 -14
- README.md +5 -2
- SECURITY.md +9 -12
- docs/README.md +7 -0
- docs/features/annotated-photo-fallback.md +3 -1
- docs/features/confidence-threshold.md +5 -4
- docs/features/renderer-vocabulary.md +6 -4
- docs/features/vision-prompt-roles.md +6 -3
- docs/reviews/interaction-and-fallback-review.md +1 -1
- docs/reviews/motion-axis-bias.md +5 -3
- docs/reviews/security-hardening.md +10 -7
- GITHUB_PROMPT.md β prompts/GITHUB_PROMPT.md +0 -0
- PRESENTATION_PROMPT.md β prompts/PRESENTATION_PROMPT.md +23 -9
- PROMPT.md β prompts/PROMPT.md +25 -7
- prompts/README.md +8 -0
AGENTS.md
CHANGED
|
@@ -27,10 +27,10 @@ technical cutaway animation.
|
|
| 27 |
through Transformers/custom code for the vision step if GGUF endpoint quality
|
| 28 |
is not reliable enough for the demo.
|
| 29 |
- Local code serves a trusted `index.html` through `gradio.Server` and exposes
|
| 30 |
-
`/analyze_image` plus
|
| 31 |
-
|
| 32 |
-
new code changes still
|
| 33 |
-
verification.
|
| 34 |
- Scene rendering is deterministic browser-side Three.js from the validated
|
| 35 |
analysis JSON. Do not reintroduce model-authored HTML scene injection.
|
| 36 |
- Endpoint naming is `generate_scene` everywhere in active code.
|
|
@@ -41,10 +41,10 @@ technical cutaway animation.
|
|
| 41 |
|
| 42 |
## Project Structure
|
| 43 |
|
| 44 |
-
- `
|
| 45 |
- `docs/` - implementation notes, review passes, and representative fixtures.
|
| 46 |
- `README.md` - quickstart, runtime decision, and repo map.
|
| 47 |
-
- `SECURITY.md` - public
|
| 48 |
- `.env.example` - public Hugging Face Space / local demo variables.
|
| 49 |
- `.hfignore` - excludes local credentials, caches, GGUF files, and artifacts
|
| 50 |
from Hugging Face uploads.
|
|
@@ -71,7 +71,7 @@ technical cutaway animation.
|
|
| 71 |
|
| 72 |
## What Has Been Done
|
| 73 |
|
| 74 |
-
- Read `PROMPT.md` and implemented the requested initial scaffold.
|
| 75 |
- Added a modular Gradio app with a two-pane technical cutaway / field manual
|
| 76 |
visual direction.
|
| 77 |
- Added loading/status language and a styled fallback visualization path so the
|
|
@@ -150,7 +150,7 @@ technical cutaway animation.
|
|
| 150 |
`https://github.com/Bigstonks1/Snap2Sim/actions/runs/27487136019`.
|
| 151 |
- Hugging Face Space `jasondo111/Snap2Sim` reports SHA
|
| 152 |
`d70e374bea16acaa41c322942815d3cb213745f4`, matching GitHub `main`.
|
| 153 |
-
- `PROMPT.md` was updated with a new critical path: `gradio.Server`,
|
| 154 |
`index.html`, A-Frame model scene generation, `generate_scene` naming, and a
|
| 155 |
deterministic Three.js fallback in browser JS.
|
| 156 |
- Documented GitHub as the source of truth:
|
|
@@ -414,7 +414,7 @@ technical cutaway animation.
|
|
| 414 |
`main`. GitHub Actions sync run `27576590128` completed successfully, and the
|
| 415 |
public Hugging Face Space reported SHA
|
| 416 |
`92853cc9acf19555524a7f65b189926e9088f4fb`. The synced Space includes
|
| 417 |
-
`PRESENTATION_PROMPT.md`, `presentation/deck.html`, and
|
| 418 |
`presentation/assets/.gitkeep`.
|
| 419 |
- User transferred the public Space to
|
| 420 |
`build-small-hackathon/Snap2Sim` on June 15, 2026. Verification confirmed the
|
|
@@ -426,16 +426,17 @@ technical cutaway animation.
|
|
| 426 |
HTML field for `EXAMPLE_ANALYSIS`; `/analyze_image` returned a real Modal
|
| 427 |
analysis for a synthetic target-like image as `rotary indexing mechanism` at
|
| 428 |
`0.85` confidence with 3 parts.
|
|
|
|
|
|
|
|
|
|
| 429 |
|
| 430 |
-
##
|
| 431 |
|
| 432 |
-
- Measure the larger llama.cpp reasoning budget with representative real photos;
|
| 433 |
-
tune token/context/timeout values down if valid JSON remains reliable with
|
| 434 |
-
lower latency. The synthetic Modal check now succeeds with the current
|
| 435 |
-
`4096` output token, `8192` context, `300s` timeout settings.
|
| 436 |
- The Hugging Face Space is now public under
|
| 437 |
`build-small-hackathon/Snap2Sim`. Keep README, presentation links, and
|
| 438 |
`.github/workflows/sync_to_hf.yml` pointed at that org-owned Space.
|
|
|
|
|
|
|
| 439 |
- Keep the README opening hook intact: "You find a small metal cylinder at a
|
| 440 |
flea market. What is it? How does it work inside?" Maintain the judge-facing
|
| 441 |
YAML tags and public pitch if future README updates are needed.
|
|
|
|
| 27 |
through Transformers/custom code for the vision step if GGUF endpoint quality
|
| 28 |
is not reliable enough for the demo.
|
| 29 |
- Local code serves a trusted `index.html` through `gradio.Server` and exposes
|
| 30 |
+
`/analyze_image` plus `/generate_scene`. The final public Space is
|
| 31 |
+
`build-small-hackathon/Snap2Sim` at
|
| 32 |
+
`https://build-small-hackathon-snap2sim.hf.space`; any new code changes still
|
| 33 |
+
need the normal GitHub-to-HF sync and deployment verification.
|
| 34 |
- Scene rendering is deterministic browser-side Three.js from the validated
|
| 35 |
analysis JSON. Do not reintroduce model-authored HTML scene injection.
|
| 36 |
- Endpoint naming is `generate_scene` everywhere in active code.
|
|
|
|
| 41 |
|
| 42 |
## Project Structure
|
| 43 |
|
| 44 |
+
- `prompts/` - archived build prompts and Codex task specs.
|
| 45 |
- `docs/` - implementation notes, review passes, and representative fixtures.
|
| 46 |
- `README.md` - quickstart, runtime decision, and repo map.
|
| 47 |
+
- `SECURITY.md` - public deployment data handling rules for humans and agents.
|
| 48 |
- `.env.example` - public Hugging Face Space / local demo variables.
|
| 49 |
- `.hfignore` - excludes local credentials, caches, GGUF files, and artifacts
|
| 50 |
from Hugging Face uploads.
|
|
|
|
| 71 |
|
| 72 |
## What Has Been Done
|
| 73 |
|
| 74 |
+
- Read `prompts/PROMPT.md` and implemented the requested initial scaffold.
|
| 75 |
- Added a modular Gradio app with a two-pane technical cutaway / field manual
|
| 76 |
visual direction.
|
| 77 |
- Added loading/status language and a styled fallback visualization path so the
|
|
|
|
| 150 |
`https://github.com/Bigstonks1/Snap2Sim/actions/runs/27487136019`.
|
| 151 |
- Hugging Face Space `jasondo111/Snap2Sim` reports SHA
|
| 152 |
`d70e374bea16acaa41c322942815d3cb213745f4`, matching GitHub `main`.
|
| 153 |
+
- `prompts/PROMPT.md` was updated with a new critical path: `gradio.Server`,
|
| 154 |
`index.html`, A-Frame model scene generation, `generate_scene` naming, and a
|
| 155 |
deterministic Three.js fallback in browser JS.
|
| 156 |
- Documented GitHub as the source of truth:
|
|
|
|
| 414 |
`main`. GitHub Actions sync run `27576590128` completed successfully, and the
|
| 415 |
public Hugging Face Space reported SHA
|
| 416 |
`92853cc9acf19555524a7f65b189926e9088f4fb`. The synced Space includes
|
| 417 |
+
`prompts/PRESENTATION_PROMPT.md`, `presentation/deck.html`, and
|
| 418 |
`presentation/assets/.gitkeep`.
|
| 419 |
- User transferred the public Space to
|
| 420 |
`build-small-hackathon/Snap2Sim` on June 15, 2026. Verification confirmed the
|
|
|
|
| 426 |
HTML field for `EXAMPLE_ANALYSIS`; `/analyze_image` returned a real Modal
|
| 427 |
analysis for a synthetic target-like image as `rotary indexing mechanism` at
|
| 428 |
`0.85` confidence with 3 parts.
|
| 429 |
+
- Final public submission links were added on June 15, 2026:
|
| 430 |
+
YouTube demo `https://youtu.be/nuisDKMyyF8` and X post
|
| 431 |
+
`https://x.com/Ryno67114241/status/2066660199558152411`.
|
| 432 |
|
| 433 |
+
## Final State / Maintenance Notes
|
| 434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 435 |
- The Hugging Face Space is now public under
|
| 436 |
`build-small-hackathon/Snap2Sim`. Keep README, presentation links, and
|
| 437 |
`.github/workflows/sync_to_hf.yml` pointed at that org-owned Space.
|
| 438 |
+
- The public submission is complete with the app, README, presentation deck,
|
| 439 |
+
YouTube demo, and X post linked from the repository.
|
| 440 |
- Keep the README opening hook intact: "You find a small metal cylinder at a
|
| 441 |
flea market. What is it? How does it work inside?" Maintain the judge-facing
|
| 442 |
YAML tags and public pitch if future README updates are needed.
|
README.md
CHANGED
|
@@ -44,6 +44,8 @@ the pawl catching, the port opening.
|
|
| 44 |
- Hugging Face Space: https://huggingface.co/spaces/build-small-hackathon/Snap2Sim
|
| 45 |
- App host: https://build-small-hackathon-snap2sim.hf.space
|
| 46 |
- Source of truth: https://github.com/Bigstonks1/Snap2Sim
|
|
|
|
|
|
|
| 47 |
|
| 48 |
The Space is public for submission under the Build Small Hackathon organization.
|
| 49 |
The app is built as a Gradio Space with a custom `gradio.Server` shell; GitHub
|
|
@@ -65,7 +67,7 @@ The README metadata tags request consideration for:
|
|
| 65 |
| Modal Award | GPU inference is deployed through Modal with cached model assets. |
|
| 66 |
| OpenAI Codex | Built with Codex assistance and Codex-attributed commits in the linked GitHub repo. |
|
| 67 |
| Off-Brand | The experience is a branded maker tool, not a generic chatbot or image demo. |
|
| 68 |
-
| Best Demo / Sharing is Caring |
|
| 69 |
| Off the Grid | Not claimed while inference runs on Modal. |
|
| 70 |
|
| 71 |
## How It Works
|
|
@@ -181,13 +183,14 @@ $env:PYTHONIOENCODING="utf-8"; python -m modal run modal_app.py::run_runtime_pre
|
|
| 181 |
- `app.py` - Gradio Server app, same-origin APIs, image validation, rate limits.
|
| 182 |
- `index.html` - upload flow, analysis panel, Three.js renderer, fallback UI.
|
| 183 |
- `modal_app.py` - Modal deployment, llama.cpp runtime, diagnostics.
|
|
|
|
| 184 |
- `presentation/deck.html` - reveal.js judging deck for the hackathon pitch.
|
| 185 |
- `docs/` - implementation notes, review passes, and representative fixtures.
|
| 186 |
- `snap2sim/backend.py` - backend selection and authenticated Modal client.
|
| 187 |
- `snap2sim/prompts.py` - vision prompt contract.
|
| 188 |
- `snap2sim/schema.py` - mechanism JSON schema and sample payload.
|
| 189 |
- `scripts/verify_runtime_assets.py` - Hugging Face model metadata preflight.
|
| 190 |
-
- `SECURITY.md` - public
|
| 191 |
|
| 192 |
## Acknowledgements
|
| 193 |
|
|
|
|
| 44 |
- Hugging Face Space: https://huggingface.co/spaces/build-small-hackathon/Snap2Sim
|
| 45 |
- App host: https://build-small-hackathon-snap2sim.hf.space
|
| 46 |
- Source of truth: https://github.com/Bigstonks1/Snap2Sim
|
| 47 |
+
- Demo video: https://youtu.be/nuisDKMyyF8
|
| 48 |
+
- X post: https://x.com/Ryno67114241/status/2066660199558152411
|
| 49 |
|
| 50 |
The Space is public for submission under the Build Small Hackathon organization.
|
| 51 |
The app is built as a Gradio Space with a custom `gradio.Server` shell; GitHub
|
|
|
|
| 67 |
| Modal Award | GPU inference is deployed through Modal with cached model assets. |
|
| 68 |
| OpenAI Codex | Built with Codex assistance and Codex-attributed commits in the linked GitHub repo. |
|
| 69 |
| Off-Brand | The experience is a branded maker tool, not a generic chatbot or image demo. |
|
| 70 |
+
| Best Demo / Sharing is Caring | Public demo video and X post are linked in the Demo section. |
|
| 71 |
| Off the Grid | Not claimed while inference runs on Modal. |
|
| 72 |
|
| 73 |
## How It Works
|
|
|
|
| 183 |
- `app.py` - Gradio Server app, same-origin APIs, image validation, rate limits.
|
| 184 |
- `index.html` - upload flow, analysis panel, Three.js renderer, fallback UI.
|
| 185 |
- `modal_app.py` - Modal deployment, llama.cpp runtime, diagnostics.
|
| 186 |
+
- `prompts/` - archived original build prompt, GitHub sync prompt, and deck prompt.
|
| 187 |
- `presentation/deck.html` - reveal.js judging deck for the hackathon pitch.
|
| 188 |
- `docs/` - implementation notes, review passes, and representative fixtures.
|
| 189 |
- `snap2sim/backend.py` - backend selection and authenticated Modal client.
|
| 190 |
- `snap2sim/prompts.py` - vision prompt contract.
|
| 191 |
- `snap2sim/schema.py` - mechanism JSON schema and sample payload.
|
| 192 |
- `scripts/verify_runtime_assets.py` - Hugging Face model metadata preflight.
|
| 193 |
+
- `SECURITY.md` - public deployment handling rules.
|
| 194 |
|
| 195 |
## Acknowledgements
|
| 196 |
|
SECURITY.md
CHANGED
|
@@ -1,10 +1,7 @@
|
|
| 1 |
# Security Notes
|
| 2 |
|
| 3 |
-
This project is
|
| 4 |
-
|
| 5 |
-
README, screenshots, and Codex-visible files as public unless explicitly told
|
| 6 |
-
otherwise, and do not make the Space public until the user explicitly approves
|
| 7 |
-
that change.
|
| 8 |
|
| 9 |
## Do Not Commit Or Expose
|
| 10 |
|
|
@@ -40,14 +37,15 @@ explicitly asks. The URLs are not credentials, but keeping them out of public
|
|
| 40 |
docs reduces casual discovery, and the bearer token is the real protection
|
| 41 |
against credit-spending spam.
|
| 42 |
|
| 43 |
-
The Hugging Face Space
|
| 44 |
-
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
The Space endpoints are same-origin browser APIs, not public credentials. Keep
|
| 48 |
the server-side rate limits, upload-size caps, and image decompression-bomb
|
| 49 |
-
guards in `app.py` active
|
| 50 |
-
|
| 51 |
|
| 52 |
## Environment Variables
|
| 53 |
|
|
@@ -107,5 +105,4 @@ Do not configure jobs that pull changes back from Hugging Face into GitHub.
|
|
| 107 |
|
| 108 |
For this hackathon repo, report suspected leaks directly to the repository owner
|
| 109 |
or workspace owner. If a token was exposed, rotate it immediately in the
|
| 110 |
-
provider dashboard and remove the leaked value from git history
|
| 111 |
-
the repository public.
|
|
|
|
| 1 |
# Security Notes
|
| 2 |
|
| 3 |
+
This project is a public hackathon demo. Treat the repo, README, screenshots,
|
| 4 |
+
and Codex-visible files as public unless explicitly told otherwise.
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
## Do Not Commit Or Expose
|
| 7 |
|
|
|
|
| 37 |
docs reduces casual discovery, and the bearer token is the real protection
|
| 38 |
against credit-spending spam.
|
| 39 |
|
| 40 |
+
The public Hugging Face Space is now under
|
| 41 |
+
`build-small-hackathon/Snap2Sim`, served at
|
| 42 |
+
`https://build-small-hackathon-snap2sim.hf.space`. Keep GitHub as the source of
|
| 43 |
+
truth and do not edit files directly on the Space.
|
| 44 |
|
| 45 |
The Space endpoints are same-origin browser APIs, not public credentials. Keep
|
| 46 |
the server-side rate limits, upload-size caps, and image decompression-bomb
|
| 47 |
+
guards in `app.py` active. These controls reduce abuse of the Space as a
|
| 48 |
+
trusted Modal proxy but do not replace the Modal bearer token.
|
| 49 |
|
| 50 |
## Environment Variables
|
| 51 |
|
|
|
|
| 105 |
|
| 106 |
For this hackathon repo, report suspected leaks directly to the repository owner
|
| 107 |
or workspace owner. If a token was exposed, rotate it immediately in the
|
| 108 |
+
provider dashboard and remove the leaked value from git history.
|
|
|
docs/README.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
| 3 |
This folder keeps implementation notes, review passes, and fixtures out of the
|
| 4 |
repository root while preserving the context that led to the current demo.
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
## Features
|
| 7 |
|
| 8 |
- `features/confidence-threshold.md` - confidence threshold control and
|
|
|
|
| 3 |
This folder keeps implementation notes, review passes, and fixtures out of the
|
| 4 |
repository root while preserving the context that led to the current demo.
|
| 5 |
|
| 6 |
+
Archived root-level prompts now live in `../prompts/`.
|
| 7 |
+
|
| 8 |
+
Final submission status, June 15, 2026: Snap2Sim is public under
|
| 9 |
+
`build-small-hackathon/Snap2Sim`, the app host is
|
| 10 |
+
`https://build-small-hackathon-snap2sim.hf.space`, and the README links the
|
| 11 |
+
demo video plus X post.
|
| 12 |
+
|
| 13 |
## Features
|
| 14 |
|
| 15 |
- `features/confidence-threshold.md` - confidence threshold control and
|
docs/features/annotated-photo-fallback.md
CHANGED
|
@@ -274,7 +274,7 @@ top-left (`index.html:1040-1047`). No change needed there.
|
|
| 274 |
when present (#3). Items #4/#5 optional.
|
| 275 |
4. Run the standard local checks per `AGENTS.md` (schema/parser + FastAPI
|
| 276 |
`TestClient` for `/`, `/analyze_image`, `/generate_scene`), then the normal
|
| 277 |
-
PR
|
| 278 |
|
| 279 |
## Resolved scope
|
| 280 |
|
|
@@ -282,3 +282,5 @@ top-left (`index.html:1040-1047`). No change needed there.
|
|
| 282 |
(user decision, 2026-06-14): the CSS sizing fix, marker dots at the true
|
| 283 |
point, offset/leader labels, and rendering `annotation.box` when the model
|
| 284 |
provides it.
|
|
|
|
|
|
|
|
|
| 274 |
when present (#3). Items #4/#5 optional.
|
| 275 |
4. Run the standard local checks per `AGENTS.md` (schema/parser + FastAPI
|
| 276 |
`TestClient` for `/`, `/analyze_image`, `/generate_scene`), then the normal
|
| 277 |
+
PR -> GitHub Actions HF sync -> Space verification.
|
| 278 |
|
| 279 |
## Resolved scope
|
| 280 |
|
|
|
|
| 282 |
(user decision, 2026-06-14): the CSS sizing fix, marker dots at the true
|
| 283 |
point, offset/leader labels, and rendering `annotation.box` when the model
|
| 284 |
provides it.
|
| 285 |
+
- Final submission note, 2026-06-15: this work shipped before the public
|
| 286 |
+
`build-small-hackathon/Snap2Sim` submission.
|
docs/features/confidence-threshold.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
# Confidence Threshold: Apply Only at Analysis and Generation
|
| 2 |
|
| 3 |
-
Status: **Implemented and synced
|
|
|
|
| 4 |
Supersedes the prior implemented version of this file (commit `a0540e9`,
|
| 5 |
"Add confidence threshold control").
|
| 6 |
Author of spec: codebase review pass, June 14, 2026.
|
|
@@ -219,10 +220,10 @@ accessible (don't regress the existing `aria-live` label).
|
|
| 219 |
FastAPI `TestClient`, next-run-only browser behavior, high-threshold
|
| 220 |
downgrade, low-threshold promotion, keyboard slider operation, mobile
|
| 221 |
no-overflow layout, and canvas pointer targeting.
|
| 222 |
-
- GitHub Actions sync run `27515950105` deployed commit `a6f63e9` to the private
|
| 223 |
Hugging Face Space. The Space reported SHA
|
| 224 |
-
`a6f63e9a0b76315bb223a09a71f4c027a29877fb`
|
| 225 |
-
- Authenticated
|
| 226 |
shell, a synthetic image returned `optical sight` at `0.7` confidence with 3
|
| 227 |
parts, high threshold returned `photo` / `annotate`, low threshold returned
|
| 228 |
`three` / `three`, and no HTML field was present.
|
|
|
|
| 1 |
# Confidence Threshold: Apply Only at Analysis and Generation
|
| 2 |
|
| 3 |
+
Status: **Implemented and synced. Final public submission is under
|
| 4 |
+
`build-small-hackathon/Snap2Sim` as of June 15, 2026.**
|
| 5 |
Supersedes the prior implemented version of this file (commit `a0540e9`,
|
| 6 |
"Add confidence threshold control").
|
| 7 |
Author of spec: codebase review pass, June 14, 2026.
|
|
|
|
| 220 |
FastAPI `TestClient`, next-run-only browser behavior, high-threshold
|
| 221 |
downgrade, low-threshold promotion, keyboard slider operation, mobile
|
| 222 |
no-overflow layout, and canvas pointer targeting.
|
| 223 |
+
- GitHub Actions sync run `27515950105` deployed commit `a6f63e9` to the then-private
|
| 224 |
Hugging Face Space. The Space reported SHA
|
| 225 |
+
`a6f63e9a0b76315bb223a09a71f4c027a29877fb`.
|
| 226 |
+
- Authenticated Space verification passed: the root served the updated
|
| 227 |
shell, a synthetic image returned `optical sight` at `0.7` confidence with 3
|
| 228 |
parts, high threshold returned `photo` / `annotate`, low threshold returned
|
| 229 |
`three` / `three`, and no HTML field was present.
|
docs/features/renderer-vocabulary.md
CHANGED
|
@@ -301,11 +301,13 @@ confidence + annotate when unsure (already the policy β keep it).
|
|
| 301 |
(`docs/reviews/interaction-and-fallback-review.md` Q3 tuning note): the richer prompt
|
| 302 |
may change token usage; confirm `run_analysis_endpoint_check` still returns
|
| 303 |
valid JSON within the current `4096`/`8192`/`300s` budgets before deploy.
|
| 304 |
-
7. Standard PR
|
| 305 |
-
|
| 306 |
-
going public (`AGENTS.md`, `SECURITY.md`).
|
| 307 |
|
| 308 |
-
##
|
|
|
|
|
|
|
|
|
|
| 309 |
|
| 310 |
- Whether `cylinder` should revert to a true (untapered) cylinder once explicit
|
| 311 |
`cone` exists (recommended yes β see Β§2 note).
|
|
|
|
| 301 |
(`docs/reviews/interaction-and-fallback-review.md` Q3 tuning note): the richer prompt
|
| 302 |
may change token usage; confirm `run_analysis_endpoint_check` still returns
|
| 303 |
valid JSON within the current `4096`/`8192`/`300s` budgets before deploy.
|
| 304 |
+
7. Standard PR -> GitHub Actions HF sync -> Space verification. The final
|
| 305 |
+
public submission is under `build-small-hackathon/Snap2Sim`.
|
|
|
|
| 306 |
|
| 307 |
+
## Archived considerations
|
| 308 |
+
|
| 309 |
+
Final submission note, 2026-06-15: the renderer vocabulary pass shipped before
|
| 310 |
+
the public `build-small-hackathon/Snap2Sim` submission.
|
| 311 |
|
| 312 |
- Whether `cylinder` should revert to a true (untapered) cylinder once explicit
|
| 313 |
`cone` exists (recommended yes β see Β§2 note).
|
docs/features/vision-prompt-roles.md
CHANGED
|
@@ -103,7 +103,7 @@ a budget change.
|
|
| 103 |
|
| 104 |
---
|
| 105 |
|
| 106 |
-
##
|
| 107 |
|
| 108 |
1. **`snap2sim/prompts.py`**
|
| 109 |
- Repurpose `VISION_SYSTEM_PROMPT` to hold the full invariant contract
|
|
@@ -146,8 +146,11 @@ a budget change.
|
|
| 146 |
not silently ignored) before trusting the split.
|
| 147 |
|
| 148 |
5. **Then deploy** following the normal path (Modal deploy of
|
| 149 |
-
`analyze_image_llamacpp`, GitHub `main` push, GitHub->HF sync,
|
| 150 |
-
|
|
|
|
|
|
|
|
|
|
| 151 |
|
| 152 |
---
|
| 153 |
|
|
|
|
| 103 |
|
| 104 |
---
|
| 105 |
|
| 106 |
+
## Implementation plan (completed)
|
| 107 |
|
| 108 |
1. **`snap2sim/prompts.py`**
|
| 109 |
- Repurpose `VISION_SYSTEM_PROMPT` to hold the full invariant contract
|
|
|
|
| 146 |
not silently ignored) before trusting the split.
|
| 147 |
|
| 148 |
5. **Then deploy** following the normal path (Modal deploy of
|
| 149 |
+
`analyze_image_llamacpp`, GitHub `main` push, GitHub->HF sync, and Space
|
| 150 |
+
verification), per the existing workflow in `AGENTS.md`.
|
| 151 |
+
|
| 152 |
+
Final submission note, 2026-06-15: this prompt-role split shipped before the
|
| 153 |
+
public `build-small-hackathon/Snap2Sim` submission.
|
| 154 |
|
| 155 |
---
|
| 156 |
|
docs/reviews/interaction-and-fallback-review.md
CHANGED
|
@@ -316,7 +316,7 @@ Cause in `index.html`:
|
|
| 316 |
8. Local verification with FastAPI `TestClient` (per `AGENTS.md`), then the
|
| 317 |
standard PR β GitHub Actions HF sync β authenticated Space verification.
|
| 318 |
|
| 319 |
-
##
|
| 320 |
|
| 321 |
- Local-demo behavior (real Modal model vs. clearly-labeled placeholder).
|
| 322 |
- Whether the annotated-photo fallback should also offer a manual toggle to the
|
|
|
|
| 316 |
8. Local verification with FastAPI `TestClient` (per `AGENTS.md`), then the
|
| 317 |
standard PR β GitHub Actions HF sync β authenticated Space verification.
|
| 318 |
|
| 319 |
+
## Archived considerations
|
| 320 |
|
| 321 |
- Local-demo behavior (real Modal model vs. clearly-labeled placeholder).
|
| 322 |
- Whether the annotated-photo fallback should also offer a manual toggle to the
|
docs/reviews/motion-axis-bias.md
CHANGED
|
@@ -83,7 +83,7 @@ default and generic fallback also resolve to Y. Address the prompt *and* make
|
|
| 83 |
motion axis follow the geometry's inferred primitive axis when the model is
|
| 84 |
silent or low-signal.
|
| 85 |
|
| 86 |
-
##
|
| 87 |
|
| 88 |
1. **De-anchor the prompt** (`snap2sim/prompts.py`):
|
| 89 |
- In the motions section, show axis examples across all three world axes,
|
|
@@ -137,13 +137,15 @@ Completed locally on 2026-06-15:
|
|
| 137 |
- Stable Modal deployment completed after the prompt/renderer update, and an
|
| 138 |
unauthenticated deployed `runtime_probe` request returned `401 Unauthorized`.
|
| 139 |
- GitHub-to-Hugging Face sync run `27544185461` deployed commit `e7369eb` to the
|
| 140 |
-
private Space after shortening the README `short_description` metadata to meet
|
| 141 |
Hugging Face's 60-character limit.
|
| 142 |
-
- Authenticated
|
| 143 |
shell, a synthetic target image returned `rotating shaft assembly` at `0.65`
|
| 144 |
confidence with an emitted `[1.0, 0.0, 0.0]` motion axis, `/generate_scene`
|
| 145 |
returned `renderer: three` and `render_mode: three`, and no HTML field was
|
| 146 |
present.
|
|
|
|
|
|
|
| 147 |
|
| 148 |
## Files referenced
|
| 149 |
|
|
|
|
| 83 |
motion axis follow the geometry's inferred primitive axis when the model is
|
| 84 |
silent or low-signal.
|
| 85 |
|
| 86 |
+
## Implementation plan (completed)
|
| 87 |
|
| 88 |
1. **De-anchor the prompt** (`snap2sim/prompts.py`):
|
| 89 |
- In the motions section, show axis examples across all three world axes,
|
|
|
|
| 137 |
- Stable Modal deployment completed after the prompt/renderer update, and an
|
| 138 |
unauthenticated deployed `runtime_probe` request returned `401 Unauthorized`.
|
| 139 |
- GitHub-to-Hugging Face sync run `27544185461` deployed commit `e7369eb` to the
|
| 140 |
+
then-private Space after shortening the README `short_description` metadata to meet
|
| 141 |
Hugging Face's 60-character limit.
|
| 142 |
+
- Authenticated Space verification passed: the root served the trusted
|
| 143 |
shell, a synthetic target image returned `rotating shaft assembly` at `0.65`
|
| 144 |
confidence with an emitted `[1.0, 0.0, 0.0]` motion axis, `/generate_scene`
|
| 145 |
returned `renderer: three` and `render_mode: three`, and no HTML field was
|
| 146 |
present.
|
| 147 |
+
- Final submission note, 2026-06-15: this pass shipped before the public
|
| 148 |
+
`build-small-hackathon/Snap2Sim` submission.
|
| 149 |
|
| 150 |
## Files referenced
|
| 151 |
|
docs/reviews/security-hardening.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
| 2 |
|
| 3 |
Review date: 2026-06-14. Reviewer: Claude (Opus 4.8), for OpenAI Codex to implement.
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
This review answers three questions:
|
| 6 |
|
| 7 |
1. Are the endpoints secure?
|
|
@@ -10,8 +13,8 @@ This review answers three questions:
|
|
| 10 |
|
| 11 |
Two product decisions were confirmed with the owner and shape the priorities below:
|
| 12 |
|
| 13 |
-
- **The Space is
|
| 14 |
-
|
| 15 |
- **Screen-only viewing; no VR/AR goal.** WebXR is not required, which removes
|
| 16 |
A-Frame's main structural advantage.
|
| 17 |
|
|
@@ -35,9 +38,9 @@ The Modal layer is in good shape. The Space layer is the exposure.
|
|
| 35 |
|
| 36 |
### HIGH β The Space's own `/analyze_image` and `/generate_scene` are unauthenticated (`app.py:64`, `app.py:74`)
|
| 37 |
|
| 38 |
-
These endpoints have no auth of their own.
|
| 39 |
-
Space being private. **
|
| 40 |
-
to them.**
|
| 41 |
|
| 42 |
- With `INFERENCE_BACKEND=local` (current default), they return placeholder data
|
| 43 |
β low impact but a free compute/bandwidth sink (base64 decode + PIL decode +
|
|
@@ -50,7 +53,7 @@ to them.**
|
|
| 50 |
in `SECURITY.md` that the token is "the real protection against
|
| 51 |
credit-spending spam."
|
| 52 |
|
| 53 |
-
**Recommendation (before
|
| 54 |
|
| 55 |
- Add abuse controls at the Space layer that do not require leaking a secret to
|
| 56 |
the browser. Options, roughly in order of preference:
|
|
@@ -271,7 +274,7 @@ no dual A-Frame/Three.js maintenance.
|
|
| 271 |
|
| 272 |
## Suggested Implementation Order (for Codex)
|
| 273 |
|
| 274 |
-
Blockers before the Space
|
| 275 |
|
| 276 |
1. Add server-side rate limiting / quota + max upload size to `app.py`
|
| 277 |
endpoints (Β§1 HIGH).
|
|
|
|
| 2 |
|
| 3 |
Review date: 2026-06-14. Reviewer: Claude (Opus 4.8), for OpenAI Codex to implement.
|
| 4 |
|
| 5 |
+
Final submission note, 2026-06-15: this review was implemented before the Space
|
| 6 |
+
became public under `build-small-hackathon/Snap2Sim`.
|
| 7 |
+
|
| 8 |
This review answers three questions:
|
| 9 |
|
| 10 |
1. Are the endpoints secure?
|
|
|
|
| 13 |
|
| 14 |
Two product decisions were confirmed with the owner and shape the priorities below:
|
| 15 |
|
| 16 |
+
- **The Space is public now.** Findings that were only mitigated by private
|
| 17 |
+
visibility were treated as blockers and were resolved before publication.
|
| 18 |
- **Screen-only viewing; no VR/AR goal.** WebXR is not required, which removes
|
| 19 |
A-Frame's main structural advantage.
|
| 20 |
|
|
|
|
| 38 |
|
| 39 |
### HIGH β The Space's own `/analyze_image` and `/generate_scene` are unauthenticated (`app.py:64`, `app.py:74`)
|
| 40 |
|
| 41 |
+
These endpoints have no auth of their own. At review time, they were gated only
|
| 42 |
+
by the Space being private. **Because the Space is now public, anyone on the
|
| 43 |
+
internet can POST to them unless the implemented abuse controls remain active.**
|
| 44 |
|
| 45 |
- With `INFERENCE_BACKEND=local` (current default), they return placeholder data
|
| 46 |
β low impact but a free compute/bandwidth sink (base64 decode + PIL decode +
|
|
|
|
| 53 |
in `SECURITY.md` that the token is "the real protection against
|
| 54 |
credit-spending spam."
|
| 55 |
|
| 56 |
+
**Recommendation (implemented before publication):**
|
| 57 |
|
| 58 |
- Add abuse controls at the Space layer that do not require leaking a secret to
|
| 59 |
the browser. Options, roughly in order of preference:
|
|
|
|
| 274 |
|
| 275 |
## Suggested Implementation Order (for Codex)
|
| 276 |
|
| 277 |
+
Blockers resolved before the Space went public:
|
| 278 |
|
| 279 |
1. Add server-side rate limiting / quota + max upload size to `app.py`
|
| 280 |
endpoints (Β§1 HIGH).
|
GITHUB_PROMPT.md β prompts/GITHUB_PROMPT.md
RENAMED
|
File without changes
|
PRESENTATION_PROMPT.md β prompts/PRESENTATION_PROMPT.md
RENAMED
|
@@ -1,5 +1,12 @@
|
|
| 1 |
# PRESENTATION_PROMPT.md
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
> Build instructions for Codex. Goal: produce a **self-contained HTML slide deck**
|
| 4 |
> that markets Snap2Sim β "Inside the Machine" to **Build Small Hackathon judges**.
|
| 5 |
> Tone: interesting, intuitive, fun, concise, beautifully formatted. This file is
|
|
@@ -120,7 +127,7 @@ Two columns.
|
|
| 120 |
- GPU: Modal, weights cached in a Modal Volume, bearer-token protected.
|
| 121 |
- Contract: JSON schema validation before anything renders.
|
| 122 |
|
| 123 |
-
**Badges we're claiming** (render as themed chips
|
| 124 |
| Badge | Status |
|
| 125 |
|---|---|
|
| 126 |
| Backyard AI (track) | core fit |
|
|
@@ -129,7 +136,7 @@ Two columns.
|
|
| 129 |
| Modal Award | confirmed |
|
| 130 |
| Off-Brand | confirmed |
|
| 131 |
| OpenAI Codex | confirmed |
|
| 132 |
-
| Best Demo / Sharing is Caring |
|
| 133 |
| Off the Grid | not claimed (inference runs on Modal) |
|
| 134 |
|
| 135 |
### Slide 7 β Closing / Call to Action
|
|
@@ -145,7 +152,7 @@ Two columns.
|
|
| 145 |
Use these as the factual backbone. Do **not** invent metrics or claims beyond these.
|
| 146 |
|
| 147 |
- **Product**: Snap2Sim / "Inside the Machine" β photo of a hardware component β identified mechanism β animated 3D technical cutaway with named internal parts, trigger, and motion sequence. (`README.md`, `AGENTS.md`)
|
| 148 |
-
- **The hook** (keep verbatim, per AGENTS.md
|
| 149 |
- **Audience**: garage tinkerers, repair hobbyists, thrift-store scavengers, robotics students β "people who learn by taking things apart." (`README.md` Hackathon Fit)
|
| 150 |
- **Pipeline** (`README.md` How It Works): browser β same-origin `/analyze_image` on the HF Space β secured Modal endpoint β Nemotron via llama.cpp/`llama-mtmd-cli` β structured mechanism JSON β `/generate_scene` validates + picks render mode β browser renders deterministic Three.js, or annotated-photo fallback.
|
| 151 |
- **Key safety/architecture decision**: "The model describes the mechanism. The browser owns the rendering." No model-authored HTML/JS injection. Schema validation in `snap2sim/schema.py` gates rendering. (`README.md`, `AGENTS.md`)
|
|
@@ -154,7 +161,7 @@ Use these as the factual backbone. Do **not** invent metrics or claims beyond th
|
|
| 154 |
- **Model**: `unsloth/NVIDIA-Nemotron-3-Nano-Omni-30B-A3B-Reasoning-GGUF`, quant `UD-Q4_K_M` + `mmproj-F16.gguf`. ~30B total / ~3B active per MoE token β under the hackathon's 32B budget. (`README.md` Tech Stack)
|
| 155 |
- **Infra**: HF Space on `cpu-basic`; GPU inference on Modal with Modal Volume asset caching; bearer-token auth between Space and Modal (secret `snap2sim-api-auth` / `SNAP2SIM_API_TOKEN`); unauthenticated requests return `401`. Space is public for submission. (`AGENTS.md`, `SECURITY.md`)
|
| 156 |
- **Security posture** (`docs/reviews/security-hardening.md`): rate limiting on both endpoints, upload-size caps, PIL decompression-bomb handling, temp-file cleanup, no model-authored scene HTML.
|
| 157 |
-
- **Badges** confirmed per AGENTS.md: Llama Champion, NVIDIA Nemotron Quest, Modal Award, Off-Brand, OpenAI Codex. Off the Grid is explicitly **not** claimed (Modal inference).
|
| 158 |
- **Visual identity tokens**: see Section 1 (sourced from `index.html`).
|
| 159 |
- **Credit**: Built by Jason Do with implementation assistance from OpenAI Codex. Commit trailer convention: `Co-authored-by: OpenAI Codex <codex@openai.com>`.
|
| 160 |
|
|
@@ -165,7 +172,10 @@ Use these as the factual backbone. Do **not** invent metrics or claims beyond th
|
|
| 165 |
|
| 166 |
---
|
| 167 |
|
| 168 |
-
## 4.
|
|
|
|
|
|
|
|
|
|
| 169 |
|
| 170 |
1. Scaffold `presentation/deck.html` with reveal.js CDN, the theme tokens from Section 1, Chakra Petch + Fira Code fonts, grid/scan-line/vignette texture, and the per-slide kicker + watermark chrome.
|
| 171 |
2. Build slides 1β3 exactly as specified (Problem β Solution β inline-SVG architecture diagram). These are the required core.
|
|
@@ -173,9 +183,13 @@ Use these as the factual backbone. Do **not** invent metrics or claims beyond th
|
|
| 173 |
4. Add slides 4β7.
|
| 174 |
5. Keep the in-theme demo mockup on slide 4 unless real product screenshots are intentionally captured and added later.
|
| 175 |
6. Verify: open in a browser, arrow through all slides, confirm the diagram renders inline with no broken images, confirm `?print-pdf` exports cleanly, confirm no horizontal overflow at 1280Γ720 and 1920Γ1080.
|
| 176 |
-
7. Keep all private endpoint URLs and tokens **out** of the deck
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
| 178 |
|
| 179 |
-
###
|
| 180 |
-
- Public demo video + social post link (needed before Best Demo / Sharing is Caring can be claimed).
|
| 181 |
- Space is public under `build-small-hackathon/Snap2Sim`.
|
|
|
|
|
|
|
|
|
| 1 |
# PRESENTATION_PROMPT.md
|
| 2 |
|
| 3 |
+
Final status, 2026-06-15: the deck has been built at `presentation/deck.html`,
|
| 4 |
+
the project is public under `build-small-hackathon/Snap2Sim`, and the final
|
| 5 |
+
public links are:
|
| 6 |
+
|
| 7 |
+
- Demo video: https://youtu.be/nuisDKMyyF8
|
| 8 |
+
- X post: https://x.com/Ryno67114241/status/2066660199558152411
|
| 9 |
+
|
| 10 |
> Build instructions for Codex. Goal: produce a **self-contained HTML slide deck**
|
| 11 |
> that markets Snap2Sim β "Inside the Machine" to **Build Small Hackathon judges**.
|
| 12 |
> Tone: interesting, intuitive, fun, concise, beautifully formatted. This file is
|
|
|
|
| 127 |
- GPU: Modal, weights cached in a Modal Volume, bearer-token protected.
|
| 128 |
- Contract: JSON schema validation before anything renders.
|
| 129 |
|
| 130 |
+
**Badges we're claiming** (render as themed chips; confirmed ones in amber):
|
| 131 |
| Badge | Status |
|
| 132 |
|---|---|
|
| 133 |
| Backyard AI (track) | core fit |
|
|
|
|
| 136 |
| Modal Award | confirmed |
|
| 137 |
| Off-Brand | confirmed |
|
| 138 |
| OpenAI Codex | confirmed |
|
| 139 |
+
| Best Demo / Sharing is Caring | confirmed with public demo video + X post |
|
| 140 |
| Off the Grid | not claimed (inference runs on Modal) |
|
| 141 |
|
| 142 |
### Slide 7 β Closing / Call to Action
|
|
|
|
| 152 |
Use these as the factual backbone. Do **not** invent metrics or claims beyond these.
|
| 153 |
|
| 154 |
- **Product**: Snap2Sim / "Inside the Machine" β photo of a hardware component β identified mechanism β animated 3D technical cutaway with named internal parts, trigger, and motion sequence. (`README.md`, `AGENTS.md`)
|
| 155 |
+
- **The hook** (keep verbatim, per AGENTS.md final-state notes β do not alter): *"You find a small metal cylinder at a flea market. What is it? How does it work inside?"*
|
| 156 |
- **Audience**: garage tinkerers, repair hobbyists, thrift-store scavengers, robotics students β "people who learn by taking things apart." (`README.md` Hackathon Fit)
|
| 157 |
- **Pipeline** (`README.md` How It Works): browser β same-origin `/analyze_image` on the HF Space β secured Modal endpoint β Nemotron via llama.cpp/`llama-mtmd-cli` β structured mechanism JSON β `/generate_scene` validates + picks render mode β browser renders deterministic Three.js, or annotated-photo fallback.
|
| 158 |
- **Key safety/architecture decision**: "The model describes the mechanism. The browser owns the rendering." No model-authored HTML/JS injection. Schema validation in `snap2sim/schema.py` gates rendering. (`README.md`, `AGENTS.md`)
|
|
|
|
| 161 |
- **Model**: `unsloth/NVIDIA-Nemotron-3-Nano-Omni-30B-A3B-Reasoning-GGUF`, quant `UD-Q4_K_M` + `mmproj-F16.gguf`. ~30B total / ~3B active per MoE token β under the hackathon's 32B budget. (`README.md` Tech Stack)
|
| 162 |
- **Infra**: HF Space on `cpu-basic`; GPU inference on Modal with Modal Volume asset caching; bearer-token auth between Space and Modal (secret `snap2sim-api-auth` / `SNAP2SIM_API_TOKEN`); unauthenticated requests return `401`. Space is public for submission. (`AGENTS.md`, `SECURITY.md`)
|
| 163 |
- **Security posture** (`docs/reviews/security-hardening.md`): rate limiting on both endpoints, upload-size caps, PIL decompression-bomb handling, temp-file cleanup, no model-authored scene HTML.
|
| 164 |
+
- **Badges** confirmed per AGENTS.md: Llama Champion, NVIDIA Nemotron Quest, Modal Award, Off-Brand, OpenAI Codex, Best Demo, and Sharing is Caring. Off the Grid is explicitly **not** claimed (Modal inference).
|
| 165 |
- **Visual identity tokens**: see Section 1 (sourced from `index.html`).
|
| 166 |
- **Credit**: Built by Jason Do with implementation assistance from OpenAI Codex. Commit trailer convention: `Co-authored-by: OpenAI Codex <codex@openai.com>`.
|
| 167 |
|
|
|
|
| 172 |
|
| 173 |
---
|
| 174 |
|
| 175 |
+
## 4. Completed build order
|
| 176 |
+
|
| 177 |
+
The requested deck was built and synced with the public Space. The original
|
| 178 |
+
build order is retained below for traceability.
|
| 179 |
|
| 180 |
1. Scaffold `presentation/deck.html` with reveal.js CDN, the theme tokens from Section 1, Chakra Petch + Fira Code fonts, grid/scan-line/vignette texture, and the per-slide kicker + watermark chrome.
|
| 181 |
2. Build slides 1β3 exactly as specified (Problem β Solution β inline-SVG architecture diagram). These are the required core.
|
|
|
|
| 183 |
4. Add slides 4β7.
|
| 184 |
5. Keep the in-theme demo mockup on slide 4 unless real product screenshots are intentionally captured and added later.
|
| 185 |
6. Verify: open in a browser, arrow through all slides, confirm the diagram renders inline with no broken images, confirm `?print-pdf` exports cleanly, confirm no horizontal overflow at 1280Γ720 and 1920Γ1080.
|
| 186 |
+
7. Keep all private endpoint URLs and tokens **out** of the deck; only public
|
| 187 |
+
GitHub, Hugging Face Space, demo video, and social links belong in public
|
| 188 |
+
presentation materials.
|
| 189 |
+
8. Do not claim Off the Grid while inference runs on Modal. Best Demo and
|
| 190 |
+
Sharing is Caring now have public demo and X post links.
|
| 191 |
|
| 192 |
+
### Final public links
|
|
|
|
| 193 |
- Space is public under `build-small-hackathon/Snap2Sim`.
|
| 194 |
+
- Demo video: https://youtu.be/nuisDKMyyF8
|
| 195 |
+
- X post: https://x.com/Ryno67114241/status/2066660199558152411
|
PROMPT.md β prompts/PROMPT.md
RENAMED
|
@@ -3,6 +3,21 @@
|
|
| 3 |
|
| 4 |
---
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
## Goal
|
| 7 |
|
| 8 |
Build a Gradio app deployed as a Hugging Face Space that takes a photo of a hardware component (gear, valve, pump, lock, engine part, etc.) and produces an animated 3D visualization showing how that component works internally β "open it up and show me the moving parts and the mechanism."
|
|
@@ -26,9 +41,9 @@ Someone who pulls apart old electronics, finds a mystery component at a thrift s
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
-
## Current State (June 13, 2026)
|
| 30 |
|
| 31 |
-
Scaffold
|
| 32 |
|
| 33 |
**Confirmed working:**
|
| 34 |
- Modal deployment: `snap2sim-inside-the-machine` (bigstonks1 workspace)
|
|
@@ -37,12 +52,15 @@ Scaffold exists at [github.com/Bigstonks1/Snap2Sim](https://github.com/Bigstonks
|
|
| 37 |
- GitHub β HF Space sync workflow live and passing
|
| 38 |
- Local app code now uses `gradio.Server` plus a trusted `index.html`
|
| 39 |
|
| 40 |
-
**
|
| 41 |
1. Deploy the current branch through GitHub β HF sync
|
| 42 |
-
2. Confirm the
|
| 43 |
3. Confirm `/analyze_image` and `/generate_scene` respond through the secured
|
| 44 |
Modal bearer-token flow
|
| 45 |
|
|
|
|
|
|
|
|
|
|
| 46 |
---
|
| 47 |
|
| 48 |
## Model Stack
|
|
@@ -321,13 +339,13 @@ Implement in this sub-order:
|
|
| 321 |
|
| 322 |
---
|
| 323 |
|
| 324 |
-
## Start Order
|
| 325 |
|
| 326 |
> Follow this exactly. Do not skip ahead.
|
| 327 |
|
| 328 |
### Step 1 β Critical Path
|
| 329 |
Deploy the current `gradio.Server` + `index.html` implementation through
|
| 330 |
-
GitHub
|
| 331 |
and `/generate_scene` respond.
|
| 332 |
|
| 333 |
### Step 2 β Make It Functional
|
|
@@ -337,7 +355,7 @@ Build `buildDeterministicScene(json)` in JS β Three.js scene from geometric pr
|
|
| 337 |
Add CSS variable system, Chakra Petch + Fira Code from Bunny Fonts, two-pane asymmetric layout, blueprint grid, loading states with progress bar, upload drop zone, panel separator. App should match the design direction above β minus `[POLISH]` items.
|
| 338 |
|
| 339 |
### Step 4 β Harden
|
| 340 |
-
Error handling, 3-second blank-scene timeout before fallback triggers, Modal cold-start messaging, A-Frame `<a-sky color="#0F1318">` matching page background, play/pause toggle wired to A-Frame animation playback. Verify GitHub
|
| 341 |
|
| 342 |
### Step 5 β [POLISH] Only if Time Remains
|
| 343 |
Component name watermark β noise texture β vignette β scan-line reveal. In that order.
|
|
|
|
| 3 |
|
| 4 |
---
|
| 5 |
|
| 6 |
+
## Final Status (June 15, 2026)
|
| 7 |
+
|
| 8 |
+
This file is the original build prompt and contains historical implementation
|
| 9 |
+
directions, including early A-Frame and private-Space assumptions that were
|
| 10 |
+
superseded during development. The finished public submission uses deterministic
|
| 11 |
+
browser-side Three.js from validated JSON, is hosted under
|
| 12 |
+
`build-small-hackathon/Snap2Sim`, and is linked from the README.
|
| 13 |
+
|
| 14 |
+
- Public Space: https://huggingface.co/spaces/build-small-hackathon/Snap2Sim
|
| 15 |
+
- App host: https://build-small-hackathon-snap2sim.hf.space
|
| 16 |
+
- Demo video: https://youtu.be/nuisDKMyyF8
|
| 17 |
+
- X post: https://x.com/Ryno67114241/status/2066660199558152411
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
## Goal
|
| 22 |
|
| 23 |
Build a Gradio app deployed as a Hugging Face Space that takes a photo of a hardware component (gear, valve, pump, lock, engine part, etc.) and produces an animated 3D visualization showing how that component works internally β "open it up and show me the moving parts and the mechanism."
|
|
|
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
+
## Archived Current State (June 13, 2026)
|
| 45 |
|
| 46 |
+
Scaffold existed at [github.com/Bigstonks1/Snap2Sim](https://github.com/Bigstonks1/Snap2Sim), initially synced to HF Space `jasondo111/Snap2Sim`. The finished project was later transferred to the public Build Small Hackathon Space listed above.
|
| 47 |
|
| 48 |
**Confirmed working:**
|
| 49 |
- Modal deployment: `snap2sim-inside-the-machine` (bigstonks1 workspace)
|
|
|
|
| 52 |
- GitHub β HF Space sync workflow live and passing
|
| 53 |
- Local app code now uses `gradio.Server` plus a trusted `index.html`
|
| 54 |
|
| 55 |
+
**Archived primary tasks (completed):**
|
| 56 |
1. Deploy the current branch through GitHub β HF sync
|
| 57 |
+
2. Confirm the deployed Space loads the trusted `index.html`
|
| 58 |
3. Confirm `/analyze_image` and `/generate_scene` respond through the secured
|
| 59 |
Modal bearer-token flow
|
| 60 |
|
| 61 |
+
Final result: deployed through GitHub-to-Hugging Face sync, verified on the
|
| 62 |
+
public org-owned Space, and completed with public demo video and X post links.
|
| 63 |
+
|
| 64 |
---
|
| 65 |
|
| 66 |
## Model Stack
|
|
|
|
| 339 |
|
| 340 |
---
|
| 341 |
|
| 342 |
+
## Original Start Order (completed)
|
| 343 |
|
| 344 |
> Follow this exactly. Do not skip ahead.
|
| 345 |
|
| 346 |
### Step 1 β Critical Path
|
| 347 |
Deploy the current `gradio.Server` + `index.html` implementation through
|
| 348 |
+
GitHub -> HF sync. Confirm the deployed Space loads and both `/analyze_image`
|
| 349 |
and `/generate_scene` respond.
|
| 350 |
|
| 351 |
### Step 2 β Make It Functional
|
|
|
|
| 355 |
Add CSS variable system, Chakra Petch + Fira Code from Bunny Fonts, two-pane asymmetric layout, blueprint grid, loading states with progress bar, upload drop zone, panel separator. App should match the design direction above β minus `[POLISH]` items.
|
| 356 |
|
| 357 |
### Step 4 β Harden
|
| 358 |
+
Error handling, 3-second blank-scene timeout before fallback triggers, Modal cold-start messaging, A-Frame `<a-sky color="#0F1318">` matching page background, play/pause toggle wired to A-Frame animation playback. Verify GitHub -> HF Space sync pushes cleanly and the deployed Space runs correctly.
|
| 359 |
|
| 360 |
### Step 5 β [POLISH] Only if Time Remains
|
| 361 |
Component name watermark β noise texture β vignette β scan-line reveal. In that order.
|
prompts/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Prompt Archive
|
| 2 |
+
|
| 3 |
+
This folder contains the project prompt and Codex task specs that were used
|
| 4 |
+
during the Snap2Sim build.
|
| 5 |
+
|
| 6 |
+
- `PROMPT.md` - original product, model, design, and delivery requirements.
|
| 7 |
+
- `GITHUB_PROMPT.md` - GitHub Actions to Hugging Face Space sync prompt.
|
| 8 |
+
- `PRESENTATION_PROMPT.md` - hackathon presentation deck build prompt.
|