You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/agent/skills/master-agent-playbook.txt
-100Lines changed: 0 additions & 100 deletions
Original file line number
Diff line number
Diff line change
@@ -218,106 +218,6 @@ render();
218
218
}
219
219
```
220
220
221
-
### Architecture: Progressive Rendering for Complex Interactive Diagrams
222
-
223
-
When building interactive diagrams with controls (sliders, buttons, presets), use this structured architecture instead of scattered inline handlers. This ensures controls and visuals stay connected.
224
-
225
-
**HTML Section Structure** — organize your HTML in explicit, commented sections:
// Visual feedback — change fills, transforms, etc.
298
-
const el = document.getElementById('viz-engine-fill');
299
-
if (el) el.setAttribute('opacity', 0.3 + state.throttle * 0.007);
300
-
}
301
-
302
-
// Initial render
303
-
render();
304
-
</script>
305
-
```
306
-
307
-
**Element ID Convention**: `viz-{component}-{property}`
308
-
- `viz-engine-fill` — engine block fill color/opacity
309
-
- `viz-speed-text` — speed readout text content
310
-
- `viz-force-arrow` — force arrow being resized
311
-
- `viz-rpm` — RPM stat display
312
-
313
-
This convention makes it trivial to trace which control affects which visual element. Every `updateState` call triggers `render()`, which updates every dynamic element from the centralized state.
314
-
315
-
**Key rules**:
316
-
- Never use anonymous `oninput="document.getElementById(...)"` handlers. Always go through `updateState` → `render`.
317
-
- Every slider/button must produce a visible change in the SVG — if a control doesn't update anything visual, remove it.
318
-
- Preset buttons must also update slider positions to stay in sync.
319
-
- The `render()` function should be idempotent — calling it twice with the same state produces the same output.
0 commit comments