For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Add a Boids flocking simulation playground — 700 agents, spatial grid partitioning for O(n) neighbour lookup, four real-time sliders, dark canvas aesthetic.
Architecture: Simulation logic lives in pure _lib/ modules (spatialGrid.ts, boids.ts) with no React dependencies, making them fully testable. The canvas animation loop runs in a useEffect, reading slider values from a ref each frame so slider changes are instant without causing re-renders. A separate Controls component drives React state which stays in sync with the ref.
Tech Stack: React 19, Next.js 15 App Router, TypeScript, Tailwind CSS, Canvas 2D API, Jest + Happy DOM for tests.