chore(monorepo): import hmwebviewer history at a717900

git-subtree-dir: apps/viewer-3d
git-subtree-mainline: 5e10bb1be4
git-subtree-split: a71790070d
This commit is contained in:
2026-07-29 09:04:52 +09:00
78 changed files with 15921 additions and 0 deletions
@@ -0,0 +1,13 @@
---
description: Bootstrap the hmwebviewer project from the architecture spec (Phase 0). Run once when PLAN.md is not started.
---
Read `CLAUDE.md`, `PLAN.md`, `3d_viewer_architecture_spec.pdf` (extract via `pdftotext -layout`), then execute Phase 0 of PLAN.md:
1. Scaffold Vite + TypeScript project. Install `three` + `@types/three`.
2. Place Draco + KTX2 decoder assets under `public/draco` and `public/basis` (or wire CDN fallback). Pin to the installed three.js version.
3. Create a minimal `src/viewer/ThreeDViewer.ts` with a WebGLRenderer scene (camera, lights, resize loop) rendering a test cube.
Verify each step with real output: `npm run dev` serves, `npm run build` exits 0, console clean. Update PLAN.md (P0-* → done) and append to PROGRESS.md.
Arguments: $ARGUMENTS (optional override, e.g. package manager `pnpm`/`npm`).
@@ -0,0 +1,13 @@
---
description: Read PLAN.md + PROGRESS.md and pick the next ready task. Claims it and tells you (or an agent) what to do.
---
Read `PLAN.md` and `PROGRESS.md`. Find the first `todo` task whose `depends_on` are all `done`.
- If found: print the task ID, name, file scope, acceptance criteria, and which specialist agent should own it. Recommend spawning that agent (or doing it inline if small).
- If a candidate is `blocked`: surface the blocker and the task it waits on.
- If none ready: say so explicitly and list what must complete first.
Do not start implementing — this command only selects and reports. (Use `/bootstrap` for Phase 0, or delegate to the owning agent for the task.)
Arguments: $ARGUMENTS (optional — restrict to a phase, e.g. `phase 1`).
@@ -0,0 +1,13 @@
---
description: Run the offline asset optimization pipeline (gltf-transform Draco + KTX2) on a GLB file. Optionally pre-render a 360 WebP placeholder.
---
Asset path required: $ARGUMENTS (e.g. `/optimize-asset samples/robot.glb`)
Steps:
1. Confirm `tools/preprocess.mjs` exists; if not, delegate to the `asset-pipeline` agent to build it first.
2. Run the compressor on the input GLB → output to `samples/<name>.optimized.glb`. Print before/after sizes and the reduction %.
3. If a second arg `--prerender` is given, also run the 360° pre-render pipeline to produce `public/previews/<name>.webp`.
4. Verify the optimized GLB still loads in the viewer (load test).
If `gltf-transform` or `toktx` (KTX2 encoder) is missing, report the install command and stop — do not silently skip.
+17
View File
@@ -0,0 +1,17 @@
---
description: Append a status entry to PROGRESS.md summarizing what you just did.
---
Append a new entry to the TOP of the `## Work log` section in `PROGRESS.md`. Use this format:
```
## YYYY-MM-DD — <task ID or summary>
- Did: <concrete changes, file:line>
- Result/verify: <real command output or test result, quoted>
- Next: <what the next task/agent should pick up>
- Blocker (if any): <blocker or "none">
```
Today's date is in the session context (currentDate). Also flip the matching task row in `PLAN.md` to `done` (or `in_progress(@you)` if mid-task).
Arguments: $ARGUMENTS — free text summary; if omitted, infer from recent work.
@@ -0,0 +1,13 @@
---
description: Build + smoke-test the viewer: typecheck, production build, and a headless load of a sample asset to confirm perceived load < 3s.
---
Run, in order, quoting real output:
1. Typecheck / lint (e.g. `npm run build` — Vite runs tsc + bundle). Must exit 0.
2. Production build artifact exists under `dist/`.
3. Headless load smoke: serve `dist/`, load a sample asset (server path) via Puppeteer/playwright OR a node script using the viewer, measure time-to-first-render. Assert < 3000ms perceived.
4. (If a local-file path exists) simulate a drop of a sample GLB and confirm load + revoke.
Append timings to PROGRESS.md. If any step fails, do not mark the work done — report the failure output.
Arguments: $ARGUMENTS — optional asset path or flag to skip headless (`--no-headless`).