diff --git a/conductor/tracks.md b/conductor/tracks.md index a1372ac..bae9481 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -4,8 +4,3 @@ This file tracks all major tracks for the project. Each track has its own detail --- -- [ ] **Track: Implement Meyer's Square training workflow with visual-only interaction and 'Ghost of Meyer' guidance.** -*Link: [./tracks/meyer_square_20260324/](./tracks/meyer_square_20260324/)* - ---- - diff --git a/conductor/tracks/meyer_square_20260324/index.md b/conductor/tracks/meyer_square_20260324/index.md deleted file mode 100644 index 3352f77..0000000 --- a/conductor/tracks/meyer_square_20260324/index.md +++ /dev/null @@ -1,5 +0,0 @@ -# Track meyer_square_20260324 Context - -- [Specification](./spec.md) -- [Implementation Plan](./plan.md) -- [Metadata](./metadata.json) diff --git a/conductor/tracks/meyer_square_20260324/metadata.json b/conductor/tracks/meyer_square_20260324/metadata.json deleted file mode 100644 index 270d0b8..0000000 --- a/conductor/tracks/meyer_square_20260324/metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "track_id": "meyer_square_20260324", - "type": "feature", - "status": "new", - "created_at": "2026-03-24T15:00:00Z", - "updated_at": "2026-03-24T15:00:00Z", - "description": "Implement Meyer's Square training workflow with visual-only interaction and 'Ghost of Meyer' guidance." -} \ No newline at end of file diff --git a/conductor/tracks/meyer_square_20260324/plan.md b/conductor/tracks/meyer_square_20260324/plan.md deleted file mode 100644 index b826b29..0000000 --- a/conductor/tracks/meyer_square_20260324/plan.md +++ /dev/null @@ -1,36 +0,0 @@ -# Implementation Plan: Meyer's Square Workflow - -## Phase 1: Data Structures & Core Logic -### Task: Implement Meyer's Square Data Structures -- [ ] Task: Define `MeyerSequence` and `MeyerNode` structs for 16-target geometry - - [ ] Create `MeyerNode` struct with (x, y) coordinates and technique type - - [ ] Define the 4 concentric 4-strike sequences using historical data -- [ ] Task: Implement `MeyerTrainingResource` to manage visual-only flow - - [ ] Add state to track current sequence, node, and technique - - [ ] Implement logic to cycle through sequences without keyboard input -- [ ] Task: Conductor - User Manual Verification 'Data Structures & Core Logic' (Protocol in workflow.md) - -## Phase 2: UI & Render Foundations -### Task: Add Workflow Toggle in Settings -- [ ] Task: Update `Settings` component to include a `TrainingWorkflow` enum (Circular, MeyerSquare) -- [ ] Task: Implement UI button in the side panel to toggle between workflows -- [ ] Task: Refactor `Target` rendering system to switch based on the active workflow -- [ ] Task: Conductor - User Manual Verification 'UI & Render Foundations' (Protocol in workflow.md) - -## Phase 3: "Ghost of Meyer" Visual Signatures -### Task: Implement Geometric Grid Rendering -- [ ] Task: Render the bounding square and thick central cross in "GHOST_BORDER" style -- [ ] Task: Render the 16 nodes as sharp, low-opacity markers in their concentric squares -- [ ] Task: Implement "Glow Intensity" logic to highlight the active sequence -### Task: Implement Technique Visual Signatures -- [ ] Task: Implement "Slash (Cut)" shader/system with decaying trail -- [ ] Task: Implement "Beam (Thrust)" telescoping line system -- [ ] Task: Implement "Shield (Parry)" strobing/blinking visual marker -- [ ] Task: Conductor - User Manual Verification 'Visual Signatures' (Protocol in workflow.md) - -## Phase 4: Integration & Training Flow -### Task: Finalize Training Loop for Meyer's Square -- [ ] Task: Connect the `MeyerTrainingResource` logic to the "Ghost" rendering systems -- [ ] Task: Ensure smooth transitions between sequences and nodes -- [ ] Task: Final polish of "Kinetic Brutalism" aesthetic for the Meyer workflow -- [ ] Task: Conductor - User Manual Verification 'Integration & Training Flow' (Protocol in workflow.md) diff --git a/conductor/tracks/meyer_square_20260324/spec.md b/conductor/tracks/meyer_square_20260324/spec.md deleted file mode 100644 index 0fe4f3b..0000000 --- a/conductor/tracks/meyer_square_20260324/spec.md +++ /dev/null @@ -1,41 +0,0 @@ -# Track: Meyer's Square Workflow Implementation - -## Overview -This track implements a second training workflow based on the 16th-century **Meyer's Square** (Carre Meyer) diagram. It replaces the circular 8-point system with a four-quadrant concentric grid. The interaction is **purely visual**, where a "Ghost of Meyer" guide indicates the path and technique (cut, thrust, parry) the user should execute. - -## Functional Requirements -### 1. Geometric Grid (Meyer's Square) -- Render a four-quadrant system with a stark bounding square and a thick central cross. -- Implement 16 target nodes arranged in four concentric square sequences (Outer, Outer-Mid, Inner-Mid, Inner). -- Each sequence consists of a 4-strike order crossing through the central intersection. - -### 2. "Ghost of Meyer" Visual Guidance -- Implement a **Temporal Kinetic Guide** (the "Ghost") that provides visual-only cues: - - **Slash (Cut)**: A high-intensity "Kinetic Slash" traveling from start to end with a decaying "blade-width" trail. - - **Beam (Thrust)**: A sharp, narrow "Focus Beam" telescoping outward from the center/previous node to the next. - - **Shield (Parry)**: A "Static Shield" or "Block" that appears on a line, strobing/blinking to signal a defensive hold. -- Distinguish the four sequences using **Glow Intensity** and pulse frequency rather than color. - -### 3. Training Logic (Technique Mode) -- The system cycles through the 16 nodes in their defined sequences. -- The "Ghost" changes shape (Slash, Beam, Shield) to signal the required technique for the next strike. -- No keyboard interaction required; the session is a continuous visual drill. - -### 4. UI/UX Transitions -- Add a "Workflow" toggle in the Settings panel to switch between `Circular` and `Meyer Square`. -- The UI should adapt the "Active Canvas" to display either the circular targets or the geometric Meyer grid. - -## Non-Functional Requirements -- **Performance**: Maintain smooth rendering of the "Ghost" paths and trails in Bevy. -- **Aesthetic**: Adhere to the "Kinetic Brutalism" style (high contrast, emissive red glow, sharp lines). - -## Acceptance Criteria -- [ ] User can switch between Circular and Meyer Square workflows in Settings. -- [ ] Meyer Square grid renders correctly with 16 nodes and central cross. -- [ ] "Ghost of Meyer" correctly visualizes Slash, Beam, and Shield techniques. -- [ ] The sequences follow the historically accurate 4x4 strike patterns. -- [ ] Training session progresses purely visually without keyboard input. - -## Out of Scope -- Keyboard input for Meyer's Square (visual-only MVP). -- Custom sequence creation (using historical sequences only). diff --git a/src/components.rs b/src/components.rs index bb05394..6a37e6d 100644 --- a/src/components.rs +++ b/src/components.rs @@ -68,3 +68,9 @@ pub struct CurriculumPageText; /// Marker for the curriculum document image display node. #[derive(Component)] pub struct CurriculumDocumentImage; + +/// Marker for the UI button that switches the training workflow. +/// +/// Used to identify the button that toggles between Circular and Meyer's Square workflows. +#[derive(Component)] +pub struct WorkflowModeButton; diff --git a/src/constants.rs b/src/constants.rs index 059a806..1205504 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -24,6 +24,49 @@ pub const CIRCLE_RADIUS: f32 = 300.0; /// standard HEMA target diagrams (e.g., Meyer's Square). pub const LABELS: [u8; 8] = [7, 1, 5, 3, 8, 4, 6, 2]; +/// The four concentric sequences of Meyer's Square. +/// +/// Organized from outer to inner, with each sequence containing a 4-strike order. +/// Coordinates are normalized from -1.0 to 1.0, with (0,0) at the center. +pub const MEYER_SEQUENCES: [crate::resources::MeyerSequence; 4] = [ + // Outer Sequence + crate::resources::MeyerSequence { + nodes: [ + crate::resources::MeyerNode { x: -1.0, y: 1.0, technique: crate::resources::TechniqueType::Cut }, + crate::resources::MeyerNode { x: 1.0, y: -1.0, technique: crate::resources::TechniqueType::Cut }, + crate::resources::MeyerNode { x: -1.0, y: -1.0, technique: crate::resources::TechniqueType::Cut }, + crate::resources::MeyerNode { x: 1.0, y: 1.0, technique: crate::resources::TechniqueType::Cut }, + ], + }, + // Outer-Mid Sequence + crate::resources::MeyerSequence { + nodes: [ + crate::resources::MeyerNode { x: -0.66, y: 0.66, technique: crate::resources::TechniqueType::Thrust }, + crate::resources::MeyerNode { x: 0.66, y: -0.66, technique: crate::resources::TechniqueType::Thrust }, + crate::resources::MeyerNode { x: -0.66, y: -0.66, technique: crate::resources::TechniqueType::Thrust }, + crate::resources::MeyerNode { x: 0.66, y: 0.66, technique: crate::resources::TechniqueType::Thrust }, + ], + }, + // Inner-Mid Sequence + crate::resources::MeyerSequence { + nodes: [ + crate::resources::MeyerNode { x: -0.33, y: 0.33, technique: crate::resources::TechniqueType::Parry }, + crate::resources::MeyerNode { x: 0.33, y: -0.33, technique: crate::resources::TechniqueType::Parry }, + crate::resources::MeyerNode { x: -0.33, y: -0.33, technique: crate::resources::TechniqueType::Parry }, + crate::resources::MeyerNode { x: 0.33, y: 0.33, technique: crate::resources::TechniqueType::Parry }, + ], + }, + // Inner Sequence + crate::resources::MeyerSequence { + nodes: [ + crate::resources::MeyerNode { x: -0.1, y: 0.1, technique: crate::resources::TechniqueType::Cut }, + crate::resources::MeyerNode { x: 0.1, y: -0.1, technique: crate::resources::TechniqueType::Cut }, + crate::resources::MeyerNode { x: -0.1, y: -0.1, technique: crate::resources::TechniqueType::Cut }, + crate::resources::MeyerNode { x: 0.1, y: 0.1, technique: crate::resources::TechniqueType::Cut }, + ], + }, +]; + // --- Kinetic Brutalism Color Palette --- /// Background: The primary void. diff --git a/src/logic.rs b/src/logic.rs index 6bc519f..fc9fe94 100644 --- a/src/logic.rs +++ b/src/logic.rs @@ -20,6 +20,7 @@ impl Plugin for TrainingPlugin { fn build(&self, app: &mut App) { app.add_systems(Update, ( update_sequence_logic, + update_meyer_sequence_logic, handle_session_controls, sync_rhythm_timer, sync_arrow_target, @@ -56,8 +57,9 @@ fn update_sequence_logic( mut current_number: ResMut, mut sequence_state: ResMut, mut rhythm_state: ResMut, + active_workflow: Res, ) { - if !sequence_state.running { + if !sequence_state.running || active_workflow.0 != TrainingWorkflow::Circular { return; } @@ -109,6 +111,48 @@ fn update_sequence_logic( } } +/// System to update the Meyer's Square training sequence logic. +/// +/// Cycles through the 16 nodes in their defined sequences. +fn update_meyer_sequence_logic( + time: Res