Silence render-disposed spam, unbreak bundled skills, drop board wake

Three independently ugly bugs that all fed the same log flood:

* Electron's `WebFrameMain.send` writes every "Render frame was disposed"
  to stderr via `console.error`. When the worker fans a second
  agent-event past a reloading renderer, we produced thousands of
  identical lines and stalled the main loop on stderr I/O. Added a
  `mainFrame.detached` guard so the send is short-circuited before
  Electron's own catch block fires, and installed a targeted filter in
  `suppress-warnings.ts` (now actually imported from the entry point)
  so the specific `console.error("Error sending from webFrameMain:"…)`
  noise never reaches the terminal. Any other payload still surfaces.

* `dispatchAgentMessage` accepted the human-reader sentinel as a wake
  target when an agent replied to `__board__` — `wakeAgentIfPossible`
  then called `db.getAgent("__board__")`, threw, and the dispatcher
  kept repeating on every send. Strip `HUMAN_SENDER_ID` at
  `resolveMessageWakeTargets`, and keep a defense-in-depth guard in the
  heartbeat so a stray caller (future automation fan-out) cannot
  reintroduce the crash.

* Pi's skills loader rejects any SKILL.md whose frontmatter `name`
  diverges from its parent directory. The four bundled `my-writing-style`
  copies declared `name: writing-style-skill`, so every install emitted
  a warning and dropped the skill. They also lived as orphan gitlinks
  (mode 160000 without .gitmodules), and the global `*.md` gitignore
  hid every other SKILL.md from version control. Fixed the frontmatter
  to match the dir, converted the dangling submodules to plain trees,
  and allowlisted `builtin-skills/**/*.md` so a fresh clone carries the
  catalogue instead of silently losing it.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-20 08:13:48 -04:00
1 parent 7a9a6779b0
commit e74dafcd36
287 files changed
+59858 -10

No files matched your search

@@ -0,0 +1,209 @@
# Generation Guide
How to use a completed Design DNA JSON to generate designs in Phase 3. Covers all three dimensions.
## Priority Order
When generating a design from DNA JSON + content:
1. **Color & Typography** — define 80% of visual identity
2. **Spacing & Layout** — structural rhythm
3. **Shape & Elevation** — surface treatment
4. **Design Style qualitative fields** — mood, personality, composition approach
5. **Visual Effects** — special rendering layer (Canvas, WebGL, shaders, etc.)
6. **Motion & Interaction** — enhance after static layout and effects are solid
## Dimension 1: design_system → Code
### Tailwind CSS / Utility-First
```
color.primary.hex → --color-primary / bg-[hex]
typography.font_families → font-family config
spacing.scale → spacing config values
shape.border_radius → rounded-{sm|md|lg|full}
elevation.levels → shadow-{sm|md|lg}
```
### Plain CSS / CSS Variables
Generate a `:root` block with all design tokens:
```css
:root {
--color-primary: {color.primary.hex};
--color-secondary: {color.secondary.hex};
--color-accent: {color.accent.hex};
--font-heading: {typography.font_families.heading};
--font-body: {typography.font_families.body};
--radius-sm: {shape.border_radius.small};
--radius-md: {shape.border_radius.medium};
--radius-lg: {shape.border_radius.large};
--shadow-low: {elevation.levels.low};
--shadow-med: {elevation.levels.medium};
--shadow-high: {elevation.levels.high};
--ease: {motion.easing};
--duration-micro: {motion.duration_scale.micro};
--duration-normal: {motion.duration_scale.normal};
--duration-macro: {motion.duration_scale.macro};
/* ... map all tokens */
}
```
### Component Decisions
- `components.button_style` → button classes and variants
- `components.card_style` → card container treatment
- `components.navigation_pattern` → nav component choice
- `interaction_feel.hover_behavior` → :hover / :focus states
- `motion.easing` + `motion.duration_scale` → transition properties
## Dimension 2: design_style → Subjective Decisions
| DNA Field | Guides |
|---|---|
| aesthetic.mood | Overall emotional feeling — warm tones, cool precision, etc. |
| visual_language.whitespace_usage | padding/margin generosity |
| visual_language.contrast_level | How much elements pop vs. blend |
| composition.hierarchy_method | What tool to use for emphasis |
| composition.balance_type | Symmetric layout vs. dynamic asymmetry |
| imagery.graphic_elements | Decorative SVGs, gradients, patterns |
| brand_voice_in_ui.tone | Microcopy phrasing |
| interaction_feel.microinteraction_density | How many hover/click effects |
## Dimension 3: visual_effects → Special Rendering
### Technology Selection by Performance Tier
| Tier | Technologies | When to Use |
|---|---|---|
| **lightweight** | CSS animations, SVG SMIL, vanilla JS | `overview.performance_tier` = "lightweight" |
| **medium** | Canvas 2D, GSAP, Lottie, anime.js | `overview.performance_tier` = "medium" |
| **heavy** | Three.js, custom GLSL, Pixi.js, WebGL | `overview.performance_tier` = "heavy" |
### Implementation Patterns
#### Background Effects
```
"none" → skip
"gradient-animation" → CSS @keyframes on linear-gradient or conic-gradient
"noise-field" → Canvas 2D with Perlin/simplex noise
"mesh-gradient" → SVG <mesh> or canvas interpolation
"video-bg" → <video autoplay muted loop> with poster fallback
"generative-art" → Canvas 2D or WebGL generative algorithms
```
#### Particle Systems
When `particle_systems.enabled: true`:
- For `count` < 100 and no complex physics → vanilla JS + Canvas 2D
- For `count` >= 100 or complex interaction → consider Pixi.js or Three.js Points
- Map `interaction` ("mouse-repel", "mouse-attract") to pointer event handlers
- Use `requestAnimationFrame` loop; include destroy/cleanup on unmount
#### 3D Elements
When `3d_elements.enabled: true`:
- Default to Three.js unless DNA specifies otherwise
- Apply `lighting`, `camera`, `materials` from params
- Add `post_processing` effects via EffectComposer
- Handle resize with `ResizeObserver`
- Load via CDN: `https://cdn.jsdelivr.net/npm/three@latest/build/three.module.js`
#### Shader Effects
When `shader_effects.enabled: true`:
- Create vertex/fragment shaders based on `type`
- Pass `uniforms` from params (time, resolution, mouse position)
- For "noise-distortion": use noise functions matching `noise_type`
- Animate via `requestAnimationFrame` updating `u_time` uniform
#### Scroll Effects
- **Parallax**: Use `transform: translateY()` with scroll offset × layer speed
- **Scroll-triggered**: Use `IntersectionObserver` with `threshold` array
- **Scrub behavior**: If "scrubbed", animation progress = scroll progress. If "triggered", play once on enter.
#### Text Effects
```
"split-letter-animate" → Split text into <span> per char/word, stagger CSS animation
"typewriter" → CSS steps() or JS interval revealing chars
"glitch" → Layered clip-path + color offset animation
"gradient-fill" → background-clip: text with animated gradient
"3d-extrude" → text-shadow stack or WebGL text geometry
```
#### Cursor Effects
When `cursor_effects.enabled: true`:
- Hide default cursor: `cursor: none`
- Create custom cursor element following `pointermove`
- "magnetic-buttons": Apply transform pull on hover proximity
- "spotlight": Radial gradient mask following cursor
- "trail": Spawn fading elements on move
#### Glassmorphism / Neumorphism
```
"glass" → backdrop-filter: blur({blur_radius}); background: rgba(..., {transparency})
"neumorphic-light" → Dual box-shadow (light + dark offset) on light bg
"neumorphic-dark" → Dual box-shadow (inverted) on dark bg
"frosted-layers" → Stacked blur layers with varying opacity
```
#### Canvas Drawings
When `canvas_drawings.enabled: true`:
- Initialize canvas with `width/height` matching container
- Use `draw_method` to select rendering approach
- Animate with `requestAnimationFrame`
- Handle `responsiveness` via ResizeObserver
#### SVG Animations
When `svg_animations.enabled: true`:
- "path-draw": Animate `stroke-dashoffset` from path length to 0
- "morph-shapes": Interpolate `d` attribute between two paths
- "stroke-animation": Animate stroke properties (dasharray, width, color)
### Fallback Strategy
Always implement the fallback defined in `overview.fallback_strategy`:
```js
// Example: reduce to CSS on low-end devices
const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const isLowEnd = navigator.hardwareConcurrency <= 2;
if (prefersReduced || isLowEnd) {
// Apply fallback: static CSS version, disable canvas/WebGL
}
```
## Output Format
Generate output as a single self-contained HTML file with inline CSS and JS (unless user specifies a framework). Include:
1. CSS custom properties block from `design_system` tokens
2. Component styles from `design_system.components` + `design_style`
3. Layout structure per `design_system.layout`
4. Content populated from user-provided content
5. Visual effects implemented per `visual_effects` specification
6. Animations/transitions if `design_system.motion.philosophy` is not "none"
7. Fallback handling for effects
For heavy effects requiring external libraries, load via CDN `<script>` tags:
```html
<!-- Three.js -->
<script type="importmap">{"imports":{"three":"https://cdn.jsdelivr.net/npm/three@latest/build/three.module.js"}}</script>
<!-- GSAP -->
<script src="https://cdn.jsdelivr.net/npm/gsap@latest/dist/gsap.min.js"></script>
<!-- Lottie -->
<script src="https://cdn.jsdelivr.net/npm/lottie-web@latest/build/player/lottie.min.js"></script>
```
## Quality Checks
Before delivering, verify:
- [ ] Every color in output traces back to DNA palette
- [ ] Font families match DNA specification
- [ ] Spacing rhythm matches DNA scale
- [ ] Border radius matches DNA shape tokens
- [ ] Overall mood matches `design_style.aesthetic.mood`
- [ ] Component patterns match DNA `components` descriptions
- [ ] Contrast ratios meet WCAG AA minimum (4.5:1 body text, 3:1 large text)
- [ ] Visual effects match `visual_effects` specification (type, technology, params)
- [ ] Fallback strategy is implemented for effects
- [ ] `prefers-reduced-motion` is respected
- [ ] No effects render when their `enabled` flag is `false`
- [ ] Canvas/WebGL contexts are properly sized and handle resize
- [ ] Animation loops use `requestAnimationFrame` (no `setInterval`)
@@ -0,0 +1,366 @@
# Design DNA Schema
Three-dimensional design profile:
- **design_system** — measurable tokens
- **design_style** — qualitative perception
- **visual_effects** — special rendering such as Canvas, WebGL, 3D, particles, shaders, scroll effects, cursor effects, SVG animation, and glassmorphism
Every field below must appear in the final JSON output.
## Top-Level Structure
### `meta`
- `name`
- `description`
- `source_references`
- `created_at`
### `design_system`
The structural and measurable layer.
#### `design_system.color`
- `palette_type`
- `primary.hex`
- `primary.role`
- `secondary.hex`
- `secondary.role`
- `accent.hex`
- `accent.role`
- `neutral.scale`
- `neutral.usage`
- `semantic.success`
- `semantic.warning`
- `semantic.error`
- `semantic.info`
- `surface.background`
- `surface.card`
- `surface.elevated`
- `contrast_strategy`
#### `design_system.typography`
- `type_scale.display.size`
- `type_scale.display.weight`
- `type_scale.display.line_height`
- `type_scale.display.tracking`
- `type_scale.heading_1.size`
- `type_scale.heading_1.weight`
- `type_scale.heading_1.line_height`
- `type_scale.heading_1.tracking`
- `type_scale.heading_2.size`
- `type_scale.heading_2.weight`
- `type_scale.heading_2.line_height`
- `type_scale.heading_2.tracking`
- `type_scale.heading_3.size`
- `type_scale.heading_3.weight`
- `type_scale.heading_3.line_height`
- `type_scale.heading_3.tracking`
- `type_scale.body.size`
- `type_scale.body.weight`
- `type_scale.body.line_height`
- `type_scale.body.tracking`
- `type_scale.body_small.size`
- `type_scale.body_small.weight`
- `type_scale.body_small.line_height`
- `type_scale.body_small.tracking`
- `type_scale.caption.size`
- `type_scale.caption.weight`
- `type_scale.caption.line_height`
- `type_scale.caption.tracking`
- `type_scale.overline.size`
- `type_scale.overline.weight`
- `type_scale.overline.line_height`
- `type_scale.overline.tracking`
- `font_families.heading`
- `font_families.body`
- `font_families.mono`
- `font_style_notes`
#### `design_system.spacing`
- `base_unit`
- `scale`
- `content_density`
- `section_rhythm`
#### `design_system.layout`
- `grid_system`
- `max_content_width`
- `columns`
- `gutter`
- `breakpoints`
- `alignment_tendency`
#### `design_system.shape`
- `border_radius.small`
- `border_radius.medium`
- `border_radius.large`
- `border_radius.pill`
- `border_usage`
- `divider_style`
#### `design_system.elevation`
- `shadow_style`
- `levels.low`
- `levels.medium`
- `levels.high`
- `depth_cues`
#### `design_system.iconography`
- `style`
- `stroke_weight`
- `size_scale`
- `preferred_set`
#### `design_system.motion`
- `easing`
- `duration_scale.micro`
- `duration_scale.normal`
- `duration_scale.macro`
- `entrance_pattern`
- `exit_pattern`
- `philosophy`
#### `design_system.components`
- `button_style`
- `input_style`
- `card_style`
- `navigation_pattern`
- `modal_style`
- `list_style`
- `component_notes`
### `design_style`
The qualitative and perceptual layer.
#### `design_style.aesthetic`
- `mood`
- `visual_metaphor`
- `era_influence`
- `genre`
- `personality_traits`
- `adjectives`
#### `design_style.visual_language`
- `complexity`
- `ornamentation`
- `whitespace_usage`
- `visual_weight_distribution`
- `focal_strategy`
- `contrast_level`
- `texture_usage`
#### `design_style.composition`
- `hierarchy_method`
- `balance_type`
- `flow_direction`
- `grouping_strategy`
- `negative_space_role`
#### `design_style.imagery`
- `photo_treatment`
- `illustration_style`
- `graphic_elements`
- `pattern_usage`
- `image_shape`
#### `design_style.interaction_feel`
- `feedback_style`
- `hover_behavior`
- `transition_personality`
- `loading_style`
- `microinteraction_density`
#### `design_style.brand_voice_in_ui`
- `tone`
- `formality`
- `cta_style`
- `empty_state_approach`
- `error_tone`
### `visual_effects`
The special rendering and advanced visual behavior layer.
#### `visual_effects.overview`
- `effect_intensity`
- `performance_tier`
- `fallback_strategy`
- `primary_technology`
#### `visual_effects.background_effects`
- `type`
- `description`
- `technology`
- `params.color_palette`
- `params.speed`
- `params.density`
- `params.opacity`
- `params.blend_mode`
#### `visual_effects.particle_systems`
- `enabled`
- `type`
- `description`
- `technology`
- `params.count`
- `params.shape`
- `params.size_range`
- `params.movement_pattern`
- `params.color_behavior`
- `params.interaction`
- `params.spawn_area`
#### `visual_effects.3d_elements`
- `enabled`
- `type`
- `description`
- `technology`
- `params.renderer`
- `params.lighting`
- `params.camera`
- `params.materials`
- `params.geometry`
- `params.post_processing`
- `params.interaction_model`
#### `visual_effects.shader_effects`
- `enabled`
- `type`
- `description`
- `technology`
- `params.uniforms`
- `params.vertex_manipulation`
- `params.fragment_output`
- `params.noise_type`
- `params.distortion`
#### `visual_effects.scroll_effects.parallax`
- `enabled`
- `layers`
- `depth_range`
- `speed_curve`
#### `visual_effects.scroll_effects.scroll_triggered_animations`
- `enabled`
- `trigger_points`
- `animation_type`
- `scrub_behavior`
#### `visual_effects.scroll_effects.scroll_morphing`
- `enabled`
- `description`
#### `visual_effects.text_effects`
- `type`
- `description`
- `technology`
- `params.split_strategy`
- `params.animation_per_unit`
- `params.stagger`
- `params.effect_style`
#### `visual_effects.cursor_effects`
- `enabled`
- `type`
- `description`
- `params.shape`
- `params.size`
- `params.blend_mode`
- `params.trail`
- `params.interaction_zone`
#### `visual_effects.image_effects`
- `type`
- `description`
- `technology`
- `params.filter_pipeline`
- `params.hover_transform`
- `params.reveal_animation`
- `params.distortion_type`
#### `visual_effects.glassmorphism_neumorphism`
- `enabled`
- `style`
- `params.blur_radius`
- `params.transparency`
- `params.border_treatment`
- `params.shadow_type`
- `params.light_source_angle`
#### `visual_effects.canvas_drawings`
- `enabled`
- `type`
- `description`
- `technology`
- `params.draw_method`
- `params.animation_loop`
- `params.color_scheme`
- `params.responsiveness`
- `params.interaction`
#### `visual_effects.svg_animations`
- `enabled`
- `type`
- `description`
- `params.animation_method`
- `params.path_morphing`
- `params.stroke_animation`
- `params.filter_effects`
#### `visual_effects.composite_notes`
- Free-text notes for layered effects, implementation ambiguity, performance trade-offs, or screenshot-only observations
## Field Guidance
### `design_system` (Dimension 1: Structural / Measurable)
Concrete, token-level values. Extract exact values where visible; estimate from visual inspection otherwise.
- **`color.palette_type`**: "monochromatic", "complementary", "analogous", "triadic", "split-complementary"
- **`color.contrast_strategy`**: How text/background contrast is managed — "high contrast", "subtle layers", "dark-on-light dominant"
- **`typography.font_style_notes`**: e.g. "geometric sans with humanist touches"
- **`spacing.content_density`**: "compact", "comfortable", "spacious"
- **`spacing.section_rhythm`**: How vertical spacing varies between sections
- **`layout.alignment_tendency`**: "strict grid", "centered", "asymmetric", "mixed"
- **`shape.border_usage`**: "none", "subtle 1px", "bold borders", "only on inputs"
- **`elevation.shadow_style`**: "none", "soft diffused", "hard drop", "layered"
- **`elevation.depth_cues`**: "shadows", "overlapping layers", "blur/glass", "color intensity"
- **`motion.philosophy`**: "minimal functional", "playful bouncy", "cinematic", "none"
- **`components`**: Describe observed patterns — e.g. "ghost buttons with thick borders, rounded inputs with inner shadow"
### `design_style` (Dimension 2: Qualitative / Perceptual)
Subjective assessments. Use descriptive language.
- **`aesthetic.mood`**: Array of 3–5 mood words, e.g. ["calm", "professional", "warm"]
- **`aesthetic.genre`**: e.g. "corporate SaaS", "indie creative", "luxury editorial", "neo-brutalist"
- **`aesthetic.personality_traits`**: As if the design were a person, e.g. ["confident", "approachable", "meticulous"]
- **`visual_language.complexity`**: "minimal", "moderate", "rich", "maximal"
- **`visual_language.ornamentation`**: "none", "subtle accents", "decorative", "heavily ornamented"
- **`visual_language.focal_strategy`**: "single hero element", "distributed interest", "progressive reveal"
- **`composition.hierarchy_method`**: "scale contrast", "color weight", "spatial isolation", "typographic hierarchy"
- **`composition.balance_type`**: "symmetric", "asymmetric", "radial", "mosaic"
- **`interaction_feel.transition_personality`**: "snappy", "smooth glide", "bouncy elastic", "fade-subtle"
- **`brand_voice_in_ui.cta_style`**: "direct imperative", "friendly invitation", "urgent scarcity", "subtle suggestion"
### `visual_effects` (Dimension 3: Special Rendering / Visual Wizardry)
Effects beyond standard CSS. These often require Canvas, WebGL, SVG animation, shader programs, or JS animation libraries. When not directly observable from static code, describe them from screenshots or video.
- **`overview.effect_intensity`**: "none", "subtle-accent", "moderate", "heavy-immersive"
- **`overview.performance_tier`**: "lightweight" (CSS + simple JS), "medium" (Canvas 2D, SVG anim), "heavy" (WebGL, Three.js, shaders)
- **`overview.fallback_strategy`**: What happens on low-end devices — "disable effects", "reduce to CSS", "static snapshot"
- **`overview.primary_technology`**: "CSS only", "Canvas 2D", "WebGL/Three.js", "GSAP", "Lottie", "SVG SMIL", "Pixi.js"
- **`background_effects.type`**: "gradient-animation", "noise-field", "mesh-gradient", "video-bg", "generative-art", "none"
- **`particle_systems.type`**: "floating-dots", "confetti", "snow", "fireflies", "connected-nodes", "custom"
- **`particle_systems.params.interaction`**: "mouse-repel", "mouse-attract", "click-burst", "none"
- **`3d_elements.type`**: "hero-model", "product-viewer", "scene-bg", "text-extrusion", "abstract-geometry"
- **`3d_elements.params.post_processing`**: e.g. ["bloom", "FXAA", "depth-of-field", "chromatic-aberration"]
- **`shader_effects.type`**: "noise-distortion", "wave", "morph", "color-shift", "custom-GLSL"
- **`shader_effects.params.noise_type`**: "perlin", "simplex", "worley", "fbm"
- **`scroll_effects.parallax.layers`**: Number of depth layers, e.g. "3"
- **`scroll_effects.scroll_triggered_animations.animation_type`**: "fade-up", "scale-in", "clip-reveal", "counter", "draw-SVG"
- **`text_effects.type`**: "split-letter-animate", "typewriter", "glitch", "gradient-fill", "3d-extrude", "none"
- **`text_effects.params.split_strategy`**: "by-char", "by-word", "by-line"
- **`cursor_effects.type`**: "custom-cursor", "magnetic-buttons", "spotlight", "trail", "none"
- **`image_effects.type`**: "hover-distortion", "reveal-clip", "parallax-tilt", "rgb-shift", "none"
- **`image_effects.params.distortion_type`**: "barrel", "wave", "liquid", "glitch"
- **`glassmorphism_neumorphism.style`**: "glass", "neumorphic-light", "neumorphic-dark", "frosted-layers", "none"
- **`canvas_drawings.type`**: "generative-lines", "interactive-blobs", "data-visualization", "pattern-fill", "none"
- **`svg_animations.type`**: "path-draw", "morph-shapes", "logo-reveal", "decorative-loop", "none"
- **`composite_notes`**: Free-text description of how multiple effects layer together, performance trade-offs, or effects visible only in screenshots that cannot be fully captured in structured fields