Skip to content

Commit a867016

Browse files
authored
Add parser compatibility tooling (#35)
* feat: add parser compatibility tooling and demo * chore(examples): remove core runner demo --------- Co-authored-by: agustin-littlehat <minotopo@gmail.com>
1 parent c7df291 commit a867016

118 files changed

Lines changed: 1251 additions & 205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/chrome-trace/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Use Playwright with Chromium and the Chrome DevTools Protocol `Tracing` domain t
2020

2121
Do not draw conclusions from FPS alone. Use FPS/frame-time summaries only as the symptom; use trace groups and top events as the explanation.
2222

23-
## Polycss Trace Runners
23+
## PolyCSS Trace Runners
2424

2525
Use `scripts/trace.mjs` as the front door:
2626

@@ -46,7 +46,7 @@ Use `trace.mjs drag` for real `PolyOrbitControls` pointer-drag traces on `nonvox
4646

4747
Use `trace.mjs generic` for arbitrary pages and interactions that are not covered by a polycss bench page.
4848

49-
When interpreting polycss traces, map the result back to the render model:
49+
When interpreting PolyCSS traces, map the result back to the render model:
5050

5151
- `FunctionCall`, `EventDispatch`, `FireAnimationFrame`: JS/input work. Unexpected sustained per-frame work is suspicious outside imported skeletal animation.
5252
- `UpdateLayoutTree`, `RecalculateStyles`: style recalculation, often CSS variable or selector invalidation cost.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
name: compat-hunter
3+
description: Use when hunting for OBJ/GLB/glTF/VOX parser compatibility issues by streaming candidate models, parsing each immediately, deleting clean files, and retaining only actionable failures, unknown warnings, or unexplained zero-polygon outputs. Especially useful in the polycss repo with scripts/compat-hunter.mjs.
4+
---
5+
6+
# Compat Hunter
7+
8+
Use this skill when the user wants to keep digging for parser compatibility issues without building a fixed local corpus.
9+
10+
## Workflow
11+
12+
1. In the repo, prefer the reusable script:
13+
14+
```bash
15+
pnpm compat-hunter -- --max-models 2000
16+
```
17+
18+
Equivalent explicit form:
19+
20+
```bash
21+
pnpm --filter @layoutit/polycss-core build
22+
node .agents/skills/compat-hunter/scripts/compat-hunter.mjs --max-models 2000
23+
```
24+
25+
2. Let the script stream remote OBJ/GLB/glTF/VOX candidates, parse each model, and discard clean files. Reports are written under `bench/results/`, which is ignored by git.
26+
27+
3. Treat these as known non-actionable unless the user asks to support them:
28+
- glTF POINTS/LINES/LINE_LOOP/LINE_STRIP primitives.
29+
- Required Draco or meshopt compressed primitives skipped with a warning.
30+
31+
4. Stop and inspect anything classified as:
32+
- `throw`
33+
- `unknown-warning`
34+
- `obj-zero-no-warning`
35+
- `glb-zero-no-warning`
36+
37+
5. If an actionable parser issue is found, keep the saved file under the report's `interesting/` directory, add a focused parser test using that behavior, implement the smallest fix, and rerun the focused parser tests plus the hunter on the saved file or source class.
38+
39+
## Useful Commands
40+
41+
Fresh Objaverse and expanded GitHub stream:
42+
43+
```bash
44+
pnpm compat-hunter -- --max-models 5000 --max-bytes 10mb --timeout-ms 30000
45+
```
46+
47+
Objaverse only, later shards:
48+
49+
```bash
50+
pnpm compat-hunter -- --sources objaverse --objaverse-shards 120:220 --max-models 5000
51+
```
52+
53+
GitHub only:
54+
55+
```bash
56+
pnpm compat-hunter -- --sources github --max-models 500
57+
```
58+
59+
Poly Haven only:
60+
61+
```bash
62+
pnpm compat-hunter -- --sources polyhaven --polyhaven-limit 250 --max-models 200
63+
```
64+
65+
VOX-heavy GitHub sources:
66+
67+
```bash
68+
pnpm compat-hunter -- --sources github --github-repos ephtracy/voxel-model@master:vox/,mikelovesrobots/mmmm@master:vox/ --max-models 1000
69+
```
70+
71+
Local directory:
72+
73+
```bash
74+
pnpm compat-hunter -- --sources local --local-root /tmp/models --max-models 1000
75+
```
76+
77+
Keep known-warning files too:
78+
79+
```bash
80+
pnpm compat-hunter -- --keep-known --max-models 500
81+
```
82+
83+
Continue after interesting cases:
84+
85+
```bash
86+
pnpm compat-hunter -- --no-stop-on-interesting --max-models 2000
87+
```
88+
89+
## Reporting
90+
91+
Summarize the final `report.json` with:
92+
93+
```bash
94+
pnpm compat-hunter -- --report bench/results/<run>/report.json
95+
```
96+
97+
In the final response, state the attempted/parsed counts, whether any interesting files were retained, and whether the findings are actionable. Do not imply a clean stream proves full compatibility; it only means this pass found no new actionable parser issue.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Compat Hunter"
3+
short_description: "Stream model parser compatibility hunts"
4+
default_prompt: "Use $compat-hunter to stream OBJ/GLB/glTF/VOX models until a parser compatibility issue appears."

0 commit comments

Comments
 (0)