|
| 1 | +# RAZE-TUI Roadmap |
| 2 | + |
| 3 | +This roadmap outlines the development plan for RAZE-TUI, a polyglot TUI framework using Rust, Zig, and Ada/SPARK. |
| 4 | + |
| 5 | +## Current Status (v0.1.0-dev) |
| 6 | + |
| 7 | +### Completed |
| 8 | + |
| 9 | +- [x] **Rust Core** - Complete state management and type system |
| 10 | + - TuiState with dimensions, running flag, version tracking |
| 11 | + - Event system (Key, Mouse, Resize, Quit events) |
| 12 | + - Widget type enumeration (Label, Input, Button, Panel, List) |
| 13 | + - Color system (default, ANSI 256, RGB modes) |
| 14 | + - Style system (foreground, background, bold, italic, underline) |
| 15 | + - Rect for layout calculations |
| 16 | + - Full test coverage |
| 17 | + - `#![no_std]` + `#![forbid(unsafe_code)]` for safety |
| 18 | + |
| 19 | +- [x] **Zig Bridge** - FFI layer complete |
| 20 | + - All core FFI exports with C ABI |
| 21 | + - State lifecycle (init, shutdown, is_running) |
| 22 | + - Dimension management (get/set width/height) |
| 23 | + - Event polling infrastructure |
| 24 | + - String buffer interop for Ada |
| 25 | + - Version tracking for change detection |
| 26 | + - Unit tests passing |
| 27 | + |
| 28 | +- [x] **Ada TUI** - FFI bindings complete |
| 29 | + - All C function imports |
| 30 | + - Ada wrapper procedures/functions |
| 31 | + - SPARK contract annotations (Pre/Post conditions) |
| 32 | + - Type-safe dimension and version handling |
| 33 | + |
| 34 | +- [x] **CI/CD Pipeline** |
| 35 | + - GitHub Actions workflow for all three languages |
| 36 | + - Pinned action versions (SHA hashes) for supply chain security |
| 37 | + - Multi-stage build (Rust -> Zig -> Ada) |
| 38 | + - GitLab/Bitbucket mirroring |
| 39 | + |
| 40 | +- [x] **Security & Governance** |
| 41 | + - Comprehensive SECURITY.md policy |
| 42 | + - Provenance tracking (.well-known/provenance.json) |
| 43 | + - Dual license (MIT OR AGPL-3.0-or-later) |
| 44 | + - AI training consent requirements |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Phase 1: Terminal Backend |
| 49 | + |
| 50 | +### 1.1 Terminal Detection & Initialization |
| 51 | +- [ ] Detect terminal capabilities (colors, Unicode support) |
| 52 | +- [ ] Raw mode handling in Zig |
| 53 | +- [ ] Alternate screen buffer support |
| 54 | +- [ ] Signal handling (SIGWINCH for resize, SIGINT/SIGTERM) |
| 55 | + |
| 56 | +### 1.2 Input Handling |
| 57 | +- [ ] Keyboard input parsing (standard keys, function keys, modifiers) |
| 58 | +- [ ] Mouse input support (clicks, scroll, movement) |
| 59 | +- [ ] Paste detection (bracketed paste mode) |
| 60 | +- [ ] UTF-8 input handling |
| 61 | + |
| 62 | +### 1.3 Output Rendering |
| 63 | +- [ ] ANSI escape sequence generation |
| 64 | +- [ ] Double buffering for flicker-free updates |
| 65 | +- [ ] Dirty region tracking (minimal redraws) |
| 66 | +- [ ] Unicode/grapheme cluster support |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +## Phase 2: Widget System |
| 71 | + |
| 72 | +### 2.1 Layout Engine |
| 73 | +- [ ] Flexbox-style layout constraints |
| 74 | +- [ ] Absolute positioning |
| 75 | +- [ ] Percentage-based sizing |
| 76 | +- [ ] Min/max constraints |
| 77 | +- [ ] Margin and padding |
| 78 | + |
| 79 | +### 2.2 Core Widgets |
| 80 | +- [ ] Label (static text, word wrap, alignment) |
| 81 | +- [ ] Input (single-line text input, cursor, selection) |
| 82 | +- [ ] Button (focusable, click handling) |
| 83 | +- [ ] Panel (bordered container, title) |
| 84 | +- [ ] List (scrollable, selectable items) |
| 85 | + |
| 86 | +### 2.3 Advanced Widgets |
| 87 | +- [ ] Table (columns, sorting, selection) |
| 88 | +- [ ] Tree (expandable nodes) |
| 89 | +- [ ] Tabs (tabbed interface) |
| 90 | +- [ ] Progress bar |
| 91 | +- [ ] Scrollbar |
| 92 | +- [ ] Modal dialogs |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## Phase 3: Event System |
| 97 | + |
| 98 | +### 3.1 Event Dispatch |
| 99 | +- [ ] Bubble/capture event phases |
| 100 | +- [ ] Focus management |
| 101 | +- [ ] Tab navigation |
| 102 | +- [ ] Event handlers in Ada |
| 103 | + |
| 104 | +### 3.2 Async Integration |
| 105 | +- [ ] Tokio integration for Rust async |
| 106 | +- [ ] Timer events |
| 107 | +- [ ] Background task spawning |
| 108 | +- [ ] Channel-based communication |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Phase 4: SPARK Verification |
| 113 | + |
| 114 | +### 4.1 Proof Annotations |
| 115 | +- [ ] Preconditions for all public APIs |
| 116 | +- [ ] Postconditions for state changes |
| 117 | +- [ ] Loop invariants where applicable |
| 118 | +- [ ] Data flow contracts |
| 119 | + |
| 120 | +### 4.2 Verification Targets |
| 121 | +- [ ] Prove absence of runtime errors |
| 122 | +- [ ] Prove memory safety properties |
| 123 | +- [ ] Prove state machine correctness |
| 124 | +- [ ] Document proof limitations |
| 125 | + |
| 126 | +--- |
| 127 | + |
| 128 | +## Phase 5: Polish & Release |
| 129 | + |
| 130 | +### 5.1 Documentation |
| 131 | +- [ ] API reference (all three languages) |
| 132 | +- [ ] Architecture guide |
| 133 | +- [ ] Tutorial: Building a simple TUI app |
| 134 | +- [ ] Examples directory |
| 135 | + |
| 136 | +### 5.2 Testing |
| 137 | +- [ ] Integration tests across FFI boundary |
| 138 | +- [ ] Property-based testing (Rust) |
| 139 | +- [ ] Fuzzing for input parsing |
| 140 | +- [ ] Performance benchmarks |
| 141 | + |
| 142 | +### 5.3 Packaging |
| 143 | +- [ ] Cargo publish (raze-core) |
| 144 | +- [ ] Zig package manager support |
| 145 | +- [ ] Alire package (Ada) |
| 146 | +- [ ] Release binaries |
| 147 | + |
| 148 | +--- |
| 149 | + |
| 150 | +## Future Considerations |
| 151 | + |
| 152 | +- **Accessibility**: Screen reader support, high contrast themes |
| 153 | +- **Theming**: User-configurable color schemes |
| 154 | +- **i18n**: Internationalization and RTL support |
| 155 | +- **Alternative backends**: Windows Console API, terminfo |
| 156 | +- **GUI target**: Optional graphical backend using same widget tree |
| 157 | + |
| 158 | +--- |
| 159 | + |
| 160 | +## Contributing |
| 161 | + |
| 162 | +Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. |
| 163 | + |
| 164 | +Priority areas: |
| 165 | +1. Terminal backend implementation |
| 166 | +2. Widget implementations |
| 167 | +3. SPARK proof annotations |
| 168 | +4. Documentation and examples |
| 169 | + |
| 170 | +--- |
| 171 | + |
| 172 | +*Last updated: 2025-12-17* |
0 commit comments