summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-09 17:48:18 +0100
committerskal <pascal.massimino@gmail.com>2026-02-09 17:48:18 +0100
commit82fcfd2656a9f7085c54407d9c390a7d413c4b5a (patch)
treebc933a060fea9a885912c44a319dd280dbfa6736
parent3e35ab0cdb35b9547290cb5afed99b0bbd49f06f (diff)
docs: Streamline top-level project files
Move implementation details to design docs, keep TODO.md and PROJECT_CONTEXT.md concise and high-level. Improves readability. Changes: - TODO.md: Condensed from 162 to 52 lines - PROJECT_CONTEXT.md: Grouped design docs by category - Recently Completed: Date-grouped format Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
-rw-r--r--PROJECT_CONTEXT.md73
-rw-r--r--TODO.md150
2 files changed, 66 insertions, 157 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md
index 49b67c4..165fe60 100644
--- a/PROJECT_CONTEXT.md
+++ b/PROJECT_CONTEXT.md
@@ -43,54 +43,59 @@
## Next Up
-- **Task #5: Spectral Brush Editor** [IN PROGRESS]
- - Web-based tool for procedurally tracing audio spectrograms
- - Replace large .spec assets with tiny C++ code (50-100× compression)
- - See TODO.md and `doc/SPECTRAL_BRUSH_EDITOR.md`
+**Active:**
+- Task #5: Spectral Brush Editor [IN PROGRESS] - Procedural spectrogram tool (50-100× compression)
-- **Visuals & Content**
- - Task #52: Procedural SDF Font
- - Task #53: Particles Shader Polish
- - Task #55: SDF Random Planes Intersection
+**Visuals:**
+- Task #52: Procedural SDF Font
+- Task #53: Particles Shader Polish
+- Task #55: SDF Random Planes Intersection
-- **Project Structure**
- - Task #77: Workspace System (Medium priority)
+**Structure:**
+- Task #77: Workspace System - Self-contained demo workspaces
-- **Tooling & Optimization**
- - Task #54: Tracy Integration
- - Task #76: External Library Size Measurement (Low priority)
+**Tooling:**
+- Task #54: Tracy Integration
+- Task #76: External Library Size Measurement
+
+**Details:** See `TODO.md` and individual design docs
---
-## Design Docs Quick Reference
+## Design Docs Reference
-For detailed documentation, use Read tool to load specific docs:
+**Core Systems:**
+- `doc/ASSET_SYSTEM.md` - Build-time asset packer, 16-byte alignment
+- `doc/SEQUENCE.md` - .seq timeline format with BPM notation
+- `doc/TRACKER.md` - Audio pattern system, unit-less timing
+- `doc/3D.md` - Hybrid SDF raymarching with BVH acceleration
-- **doc/TRACKER.md**: Audio pattern system with unit-less timing
-- **doc/3D.md**: Hybrid SDF raymarching with BVH acceleration
-- **doc/ASSET_SYSTEM.md**: Build-time asset packer with 16-byte alignment
-- **doc/BUILD.md**: Multi-platform builds (Debug/STRIP_ALL/FINAL_STRIP)
-- **doc/SPECTRAL_BRUSH_EDITOR.md**: Web tool for tracing spectrograms
-- **doc/SEQUENCE.md**: .seq timeline format with BPM notation
-- **doc/MASKING_SYSTEM.md**: Auxiliary texture registry
-- **doc/SCENE_FORMAT.md**: Binary scene format (SCN1)
-- **doc/SIZE_MEASUREMENT.md**: External library size measurement strategy
-- **doc/WORKSPACE_SYSTEM.md**: Multi-demo workspace organization
-- **doc/test_demo_README.md**: 16s audio/visual sync test tool
-- **doc/HOT_RELOAD.md**: Debug-only file change detection
-- **doc/CONTEXT_MAINTENANCE.md**: Context hygiene protocol
+**Formats:**
+- `doc/SCENE_FORMAT.md` - Binary scene format (SCN1)
+- `doc/MASKING_SYSTEM.md` - Auxiliary texture registry
----
+**Tools & Workflow:**
+- `doc/BUILD.md` - Multi-platform builds (Debug/STRIP_ALL/FINAL_STRIP)
+- `doc/SPECTRAL_BRUSH_EDITOR.md` - Procedural spectrogram tool
+- `doc/WORKSPACE_SYSTEM.md` - Multi-demo organization
+- `doc/HOT_RELOAD.md` - Debug-only file change detection
+- `doc/SIZE_MEASUREMENT.md` - External library size measurement
+- `doc/test_demo_README.md` - 16s audio/visual sync test
-## Recently Completed (February 2026)
+**Meta:**
+- `doc/CONTEXT_MAINTENANCE.md` - Context hygiene protocol
-- **Hot-Reload File Watcher** (Feb 9) - Debug-only file change detection with `--hot-reload` flag. Watches config files (assets, sequences, music) and notifies on changes. 0 bytes overhead in release builds.
+---
-- **WGSL Uniform Buffer Validation (Task #75)** (Feb 9) - Standardized uniform buffer layout. Validation tool integrated into build. All effects use `CommonPostProcessUniforms` (binding 2) + effect-specific params (binding 3). Added `UNIFORM_BUFFER_GUIDELINES.md`.
+## Recently Completed
-- **Uniform Buffer Alignment (Task #74)** (Feb 9) - Fixed WGSL `vec3<f32>` alignment issues. Demo runs with 0 validation errors.
+**Feb 9, 2026:**
+- Hot-reload file watcher (debug-only, 0 bytes overhead)
+- WGSL uniform buffer validation (Task #75)
+- Uniform buffer alignment fixes (Task #74)
-- **Shader Parametrization (Task #73)** (Feb 8) - Full uniform parameter system with .seq syntax. FlashEffect, ChromaAberrationEffect, GaussianBlurEffect support dynamic parameters. Size: ~400-500 bytes.
+**Feb 8, 2026:**
+- Shader parametrization system (Task #73)
---
diff --git a/TODO.md b/TODO.md
index 79046f8..9d17d64 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,161 +1,65 @@
# To-Do List
-This file tracks prioritized tasks with detailed attack plans.
+**High-level task tracker.** See individual design docs for implementation details.
-**Note:** For completed tasks, see `doc/COMPLETED.md`.
+**Completed tasks:** `doc/COMPLETED.md`
---
## Priority 1: Spectral Brush Editor (Task #5) [IN PROGRESS]
-**Goal:** Web-based tool for procedurally tracing audio spectrograms. Replaces large `.spec` binary assets with tiny procedural C++ code (50-100× compression).
+Web-based tool for procedurally tracing audio spectrograms. Replaces large `.spec` assets with tiny C++ code (50-100× compression).
-**Design Document:** See `doc/SPECTRAL_BRUSH_EDITOR.md` for complete architecture.
+**Design:** `doc/SPECTRAL_BRUSH_EDITOR.md`
-**Core Concept:** Bezier curves trace time-frequency paths. Gaussian profiles shape "brush strokes" around curves.
+**Phases:** C++ Runtime → Editor Core → File I/O → Extensions
-**Workflow:** `.wav` → Load in editor → Trace with Bezier curves → Export `procedural_params.txt` + C++ code
-
-### Phase 1: C++ Runtime (Foundation)
-- [ ] Files: `src/audio/spectral_brush.h`, `src/audio/spectral_brush.cc`
-- [ ] Define API (`ProfileType`, `draw_bezier_curve()`, `evaluate_profile()`)
-- [ ] Implement linear Bezier interpolation
-- [ ] Implement Gaussian profile evaluation
-- [ ] Implement home-brew deterministic RNG
-- [ ] Add unit tests (`src/tests/test_spectral_brush.cc`)
-- [ ] **Deliverable:** Compiles, tests pass
-
-### Phase 2: Editor Core
-- [ ] Files: `tools/spectral_editor/index.html`, `script.js`, `style.css`, `dct.js`
-- [ ] HTML structure (canvas, controls, file input)
-- [ ] Canvas rendering (dual-layer: reference + procedural)
-- [ ] Bezier curve editor (click, drag, delete control points)
-- [ ] Profile controls (Gaussian sigma slider)
-- [ ] Real-time spectrogram rendering
-- [ ] Audio playback (IDCT → Web Audio API)
-- [ ] Undo/Redo system
-- [ ] Keyboard shortcuts (1=play procedural, 2=play original, Space, Ctrl+Z, Delete)
-- [ ] **Deliverable:** Interactive editor, can trace .wav files
-
-### Phase 3: File I/O
-- [ ] Load .wav (decode, FFT/STFT → spectrogram)
-- [ ] Load .spec (binary format parser)
-- [ ] Save procedural_params.txt (human-readable, re-editable)
-- [ ] Generate C++ code (ready to compile)
-- [ ] Load procedural_params.txt (re-editing workflow)
-- [ ] **Deliverable:** Full save/load cycle works
-
-### Phase 4: Future Extensions (Post-MVP)
-- [ ] Cubic Bezier interpolation (smoother curves)
-- [ ] Decaying sinusoid profile (metallic sounds)
-- [ ] Noise profile (textured sounds)
-- [ ] Composite profiles (add/subtract/multiply)
-
-**Design Decisions:** Linear Bezier (Phase 1), cubic later. Soft parameter limits. Home-brew RNG. Single function per sound initially.
-
-**Size Impact:** 50-100× compression (5 KB .spec → ~100 bytes C++ code)
+**Impact:** 5 KB .spec → ~100 bytes C++ code
---
## Priority 2: Workspace System (Task #77)
-**Goal:** Reorganize project into self-contained workspaces to support parallel demo development.
-
-**Design Document:** See `doc/WORKSPACE_SYSTEM.md` for complete architecture.
-
-**Core Concept:** Each demo gets its own workspace directory with timeline, music, assets, and shaders. Common resources shared via `assets/common/`.
+Self-contained workspaces for parallel demo development. Each workspace contains timeline, music, assets, and shaders.
-**Proposed Structure:**
-```
-/workspaces/
- /main/ # Main production demo
- workspace.cfg
- timeline.seq
- music.track
- assets.txt
- /assets/
- /shaders/
- /test/ # Test demo
- ...
-/assets/common/ # Shared resources
- /shaders/
- /audio/
-```
+**Design:** `doc/WORKSPACE_SYSTEM.md`
-**Benefits:**
-- Clear project organization
-- Parallel development without conflicts
-- Easy workspace switching (`-DDEMO_WORKSPACE=main`)
-- Scales to multiple demos
+**Structure:** `/workspaces/{main,test,...}` + `/assets/common/` for shared resources
-**Implementation:** 12-16 hours (5 phases)
+**Benefit:** Clean separation, easy switching (`-DDEMO_WORKSPACE=main`), scales to multiple demos
-**Priority:** Medium (workflow improvement)
+**Effort:** 12-16 hours
---
## Priority 3: 3D System Enhancements (Task #18)
-**Goal:** Establish pipeline for importing complex 3D scenes to replace hardcoded geometry.
+Pipeline for importing complex 3D scenes to replace hardcoded geometry.
-**Progress:** C++ pipeline for loading object-specific data (plane_distance) is in place. Shader integration for SDFs pending.
+**Status:** C++ object data loading complete. Shader SDF integration pending.
---
-## Priority 3: WGSL Modularization (Task #50) [RECURRENT]
-
-**Goal:** Refactor `ShaderComposer` and WGSL assets to support granular, reusable snippets. Ongoing task for shader code hygiene.
-
-### Sub-task: Split common_uniforms.wgsl (Low Priority)
-**Current:** `common_uniforms.wgsl` contains 4 structs (CommonUniforms, GlobalUniforms, ObjectData, ObjectsBuffer)
+## Priority 4: WGSL Modularization (Task #50) [RECURRENT]
-**Goal:** Split into separate files:
-- `common_uniforms/common.wgsl` - CommonUniforms only
-- `common_uniforms/global.wgsl` - GlobalUniforms only
-- `common_uniforms/object.wgsl` - ObjectData + ObjectsBuffer
+Ongoing shader code hygiene. Refactor for granular, reusable snippets.
-**Benefit:** Shaders only include what they need, reducing compiled size
-
-**Impact:** Minimal (most shaders only use CommonUniforms)
-
-**Priority:** Low (nice-to-have)
-
-### Sub-task: Type-safe shader composition (Low Priority)
-**Problem:** Recurrent error of forgetting `ShaderComposer::Get().Compose({}, code)` and using raw `code` directly. Runtime error only (crashes demo, tests may pass).
-
-**Solution:** Use strong typing to make it compile-time error:
-```cpp
-class ComposedShader {
- private:
- std::string code_;
- friend class ShaderComposer;
- explicit ComposedShader(std::string code) : code_(std::move(code)) {}
- public:
- const char* c_str() const { return code_.c_str(); }
-};
-```
-
-**Changes:**
-- `ShaderComposer::Compose()` returns `ComposedShader` instead of `std::string`
-- All shader creation functions take `const ComposedShader&` instead of `const char*`
-- Cannot pass raw string to shader functions (compile error)
-
-**Benefits:** Impossible to forget composition (type mismatch). Self-documenting API. Compile-time error.
-
-**Trade-offs:** More verbose code. Small overhead (extra std::string copy, negligible).
-
-**Priority:** Low (recurrent but rare, easy to catch in testing)
+**Sub-tasks:**
+- Split `common_uniforms.wgsl` into separate files (Low priority)
+- Type-safe shader composition to prevent raw string usage (Low priority)
---
-## Phase 2: Size Optimization (Final Goal)
+## Future: Size Optimization (64k Target)
+
+Final phase tasks for reaching 64KB binary size:
-- [ ] **Task #34: Full STL Removal** - Replace remaining `std::vector`, `std::map`, `std::string` with custom containers
-- [ ] **Task #22: Windows Native Platform** - Replace GLFW with Win32 API
-- [ ] **Task #28: Spectrogram Quantization** - Research optimal frequency distribution
-- [ ] **Task #35: CRT Replacement** - Investigation and implementation of CRT-free entry
-- [ ] **Task #76: External Library Size Measurement** - STRIP_EXTERNAL_LIBS mode with stub implementations to measure core demo size vs external library overhead. See `doc/SIZE_MEASUREMENT.md`.
+- **Task #22:** Windows Native Platform (replace GLFW with Win32)
+- **Task #28:** Spectrogram Quantization (optimize frequency distribution)
+- **Task #34:** Full STL Removal (custom containers)
+- **Task #35:** CRT Replacement (CRT-free entry)
+- **Task #76:** External Library Size Measurement (see `doc/SIZE_MEASUREMENT.md`)
---
-For untriaged future goals and ideas, see `doc/BACKLOG.md`.
+**Backlog:** `doc/BACKLOG.md` for untriaged ideas