···11# Polymodel
2233-Polymodel is an AT Protocol-native model/project sharing app — roughly Thingiverse on atproto — and a demo of a highly integrated Polytoken/Jira/Confluence agent workflow.
33+Polymodel is an AT Protocol-native model/project sharing app — roughly Thingiverse on atproto
4455## Product direction
66···1212- browser STL viewing as a core interaction;
1313- Dioxus web UI backed by Rust and Jacquard 0.12.
14141515-STL viewer (decided):
16151717-- `three-d` is the chosen STL viewer (see the Confluence decision note). Renders STL on a Dioxus-owned canvas via WebGL2; the renderer session is retained across model switches and the STL loads on demand from `public/models/`.
1818-- `kiss3d` was evaluated and rejected: no WebGL2/WebGPU adapter surfaced at runtime in the browser target (PM-21).
19162017## Source of truth
2118···3229- Create isolated work with jj workspaces, and immediately start a fresh change before editing: `jj new -m "PM-12: concise summary"`.
3330- Use ticket-derived names like `pm-12-short-summary`.
3431- Check your own changes with `jj diff` before reporting completion.
3535-- Use `jj describe` only to update the description of an already-isolated change; do not use it as a substitute for `jj new` at task start.
3636-- `main` marks the default workspace head — the trunk merged work lands on. Merge a workspace's change back into the default line by rebasing it onto `main`, then advancing `main` and the default head:
3232+- `main` usually marks the default workspace head — the trunk merged work lands on. Merge a workspace's change back into the default line by rebasing it onto `main`, then advancing `main` and the default head:
3733 ```sh
3834 jj rebase -r <workspace>@ -d main # rebase the workspace change onto main
3935 jj bookmark set main -r <workspace>@ # advance main to the merged change
···5450just serve
5551```
56525757-Before review or handoff, run at least `just fix` and the narrowest relevant tests. Use `just test-all` for substantial changes.
5353+Before review or handoff, run at least `just fix` and all relevant tests. Use `just test-all` for substantial changes.
58545955In a fresh checkout or jj workspace, run `just check` once before `just fix`: `src/env.rs` is generated by `build.rs` from `POLYMODEL_*`, and `cargo fmt` fails to resolve the `env` module until a build has produced it.
6056···7066- **Design guidance: use the `frontend-design` skill for any UI work** (Dioxus RSX, routes, `assets/styling/*.css`, layout/color/type/motion/state/copy). It carries the adapted Impeccable design method for Polymodel's committed blueprint identity and product register. Companions: `DESIGN.md` (repo root, the blueprint design system as machine-readable tokens mirroring `theme.css`), `tools/design-detector/` (deterministic no-install linter — `node tools/design-detector/detect.mjs --json assets/styling/` or a rendered route; scans CSS/HTML, not `.rs`), and Confluence [*Front-end design guidance*](https://radiant-industries.atlassian.net/wiki/spaces/PM/pages/655362) in space `PM` (durable human-facing version).
7167- Dioxus asset declarations use source paths, but served asset URLs are flattened into `/assets/`. For example, declare a font with `asset!("/assets/fonts/proza-libre/ProzaLibre-Regular.woff2", ...)`, but reference it from CSS as `url("/assets/ProzaLibre-Regular.woff2")`. Verify font and model asset paths in browser network output when changing asset declarations.
7268- Keep generated lexicon/API code out of routine formatting churn. `crates/polymodel-api` is generated and is ignored by `rustfmt.toml`; do not include generated reformatting in ordinary feature slices unless the task is explicitly about regeneration or codegen output.
7373-- Do not commit Playwright MCP scratch output. `.playwright-mcp/` contains local browser logs/snapshots from manual checks and should stay ignored/untracked.
7469- If a front-end slice needs a renderable primitive/demo surface, prefer a non-root route such as `/foundation`. Keep `/` as the product shell so implementation scaffolding does not become the primary product surface.
7570- Use flex column for simple vertical page shells. Reserve CSS grid for actual two-dimensional layouts; grid containers combined with `min-height: 100vh` can create surprising stretched rows and large visual gaps.
7671- During visual/layout debugging, use screenshots plus accessibility snapshots with boxes and computed-style inspection. Screenshots show symptoms; boxes/computed styles identify the CSS rule causing the layout.
···1019610297- Investigate code and docs before asking factual questions.
10398- Ask the operator for product/demo intent and workflow tradeoffs.
104104-- Keep Jira updated at workflow gates. When adding Jira comments with restricted visibility through Atlassian MCP tools, use role visibility `{ "type": "role", "value": "Member" }`; the value is singular, and observed rejected values include `Administrators`, `Members`, and `Viewers`.
105105-- Do not put secrets in repo files.
9999+- Keep Jira updated at workflow gates. When adding Jira comments with restricted visibility through Atlassian MCP tools, use role visibility `{ "type": "role", "value": "Member" }`.
106100107101## Code style
108102
+1-18
README.md
···1010- feeds for recent projects, hot projects, and per-profile project streams;
1111- an in-browser STL viewer.
12121313-It is also a workplace demo for a highly integrated agent workflow built around Polytoken, Jira, Confluence, jj workspaces, and strong review gates.
1414-1515-Jira project/Confluence space key: `PM`.
1616-1717-## STL viewer
1818-1919-Decision: three-d.
1313+It is also a testbed for a highly integrated agent workflow built around Polytoken, Jira, Confluence, jj workspaces, and strong review gates.
20142121-- [`three-d`](https://github.com/asny/three-d): chosen STL viewer. Renders on a Dioxus-owned canvas via WebGL2; the renderer session is retained across model switches and STL assets load on demand from `public/models/`.
2222-- [`kiss3d`](https://github.com/dimforge/kiss3d): rejected — no WebGL2/WebGPU adapter surfaced at runtime in the browser target (PM-21).
2323-2424-The viewer choice should be decided with a small spike that loads an STL, renders orbit controls, and fits cleanly into Dioxus.
25152616## Development
2717···4030just test-all # pre-review local validation
4131just serve # Dioxus dev server
4232```
4343-4444-## Workflow
4545-4646-- Jira is both the human source of truth and the agent working truth for implementation tasks.
4747-- Confluence is the durable design/demo narrative space.
4848-- jj workspaces are the default isolation mechanism for agent work.
4949-- Polytoken skills and project vars live under `.polytoken/`.
50335134## Stack
5235