|
2 | 2 |
|
3 | 3 | Quick reference for AI assistants working on this project. |
4 | 4 |
|
| 5 | +## Quick Reference Links |
| 6 | + |
| 7 | +- **User Documentation**: See `README.md` for installation and usage |
| 8 | +- **Contributor Guide**: See `docs/README.md` for development workflow |
| 9 | +- **Feature Details**: See `docs/features/<feature-name>/` for requirements/design/tasks |
| 10 | + |
5 | 11 | ## Current Phase |
6 | 12 |
|
7 | 13 | **Phase 1: MVP** - β
Completed |
@@ -34,124 +40,32 @@ These are NOT technical debt - they represent well-architected future functional |
34 | 40 | - Adaptive Features (2): WeaknessDetector (fully tested, ready for UI) |
35 | 41 | - Scoring Utilities (1): calculate_accuracy() reference implementation |
36 | 42 |
|
37 | | -See `~/.claude/plans/soft-wishing-mccarthy.md` for complete inventory. |
38 | | - |
39 | 43 | ## Project Overview |
40 | 44 |
|
41 | 45 | Terminal-based typing trainer for AZERTY keyboards with real-time feedback and code-focused practice. |
42 | 46 |
|
43 | 47 | ## Documentation Structure |
44 | 48 |
|
45 | | -This project uses **feature-based documentation** organized in `docs/`: |
46 | | - |
47 | | -### Workflow: Requirements β Design β Tasks |
48 | | - |
49 | | -Each feature in `docs/features/<feature-name>/` contains: |
50 | | -- **requirements.md** - WHAT to build (EARS format: `WHEN [condition] THE SYSTEM SHALL [behavior]`) |
51 | | -- **design.md** - HOW to build it (technical architecture, algorithms, data flows) |
52 | | -- **tasks.md** - Implementation tracking (completed/pending tasks, organized by phase) |
53 | | - |
54 | | -### Steering Documents (Persistent Knowledge) |
55 | | - |
56 | | -Located in `docs/steering/`: |
57 | | -- **product.md** - Product vision, target users, key features, success metrics |
58 | | -- **tech.md** - Technology stack decisions, dependencies, rationale |
59 | | -- **structure.md** - Architecture patterns, module organization, design patterns |
60 | | - |
61 | | -### Features Overview |
62 | | - |
63 | | -**Phase 1 (Completed):** |
64 | | -- **typing-session/** (`src/engine/`) - Core typing engine, scoring, session management |
65 | | -- **session-storage/** (`src/data/`) - Stats persistence to JSON |
66 | | -- **tui-interface/** (`src/ui/`) - Terminal UI with ratatui |
67 | | -- **keyboard-layout/** (`src/keyboard/`) - AZERTY layout definitions |
68 | | - |
69 | | -**Phase 2 (Completed):** |
70 | | -- **home-row-lessons/** (`src/content/`) - All 6 progressive home row levels with menu selection |
71 | | -- **bigram-training/** (`src/content/`) - French (40 with accents), English (30), Code (10) bigram practice |
72 | | -- **trigram-training/** (`src/content/`) - French (25 with accents), English (20) trigram practice |
73 | | -- **code-symbols/** (`src/content/`) - Programming symbols for TypeScript, Rust, Python |
74 | | - |
75 | | -**Phase 2+ (Completed):** |
76 | | -- **adaptive-mode/** (`src/engine/analytics.rs`, `src/engine/adaptive.rs`, `src/content/adaptive_generator.rs`) - Personalized training with analytics |
77 | | - - Per-key and per-bigram statistics tracking |
78 | | - - Weakness detection (accuracy < 80%, speed > 75th percentile) |
79 | | - - Spaced repetition algorithm |
80 | | - - Adaptive content generation (60% weak, 30% moderate, 10% strong) |
81 | | - - Automatic analytics tracking after each session |
82 | | - - Appears in menu when β₯ 10 sessions completed |
83 | | - |
84 | | -**Phase 3 (Completed):** |
85 | | -- **keyboard-display/** (`src/ui/keyboard.rs`, `src/keyboard/azerty.rs`) - Visual AZERTY keyboard layout |
86 | | - - Full 5-row keyboard rendering (Number, Top, Home, Bottom, Modifier) |
87 | | - - Real-time next-key highlighting (cyan background) |
88 | | - - Shift state indication (both shift keys highlight) |
89 | | - - Proper AZERTY layout with base characters |
90 | | - - Modifier keys (Tab, Caps, Shift, Ctrl, Cmd, Option, Alt, Fn) |
91 | | - - Enter key as arrow [β] on home row |
92 | | - - Keyboard shortcuts: |
93 | | - - Tab: Toggle keyboard visibility |
94 | | - - Ctrl+F: Toggle finger color hints |
95 | | - - Ctrl+H: Toggle accuracy heatmap overlay |
96 | | - |
97 | | -**Phase 3.1 (Completed):** |
98 | | -- **layout-improvements/** (`src/ui/render.rs`) - Enhanced interface layout |
99 | | - - Reorganized layout: Header β Stats β Content β Keyboard β Instructions |
100 | | - - Stats block moved under header, before content |
101 | | - - Keyboard positioned after content (not fixed to bottom) |
102 | | - - Consistent margins (2 units) matching menu screens |
103 | | - - "ESC to quit" instructions at bottom |
104 | | - - Fixed keyboard shortcuts labels (Ctrl+F, Ctrl+H) |
105 | | - - Smooth keyboard toggle without layout shifts |
106 | | - |
107 | | -**Phase 3.2 (Completed):** |
108 | | -- **finger-training/** (`src/content/finger_generator.rs`) - Finger-specific practice lessons |
109 | | - - 24 lessons: 4 finger pairs (Pinky, Ring, Middle, Index) Γ 6 variants |
110 | | - - 3 difficulty levels: Home Row, Extended, All Keys |
111 | | - - Base and shift variants for each level |
112 | | - - Corrected French AZERTY finger mappings (16 fixes) |
113 | | - - Auto-generated drills with 3-phase pattern |
114 | | - - Shift drills use 50% lower, 40% upper, 10% symbols |
115 | | - - Heatmap disabled by default (Ctrl+H to enable) |
116 | | - |
117 | | -**Phase 3.3 (Completed):** |
118 | | -- **two-level-menu/** (`src/content/category.rs`, `src/app.rs`, `src/ui/render.rs`) - Hierarchical navigation system |
119 | | - - Two-screen navigation: Category selection β Lesson selection |
120 | | - - 5 lesson categories: Adaptive, Finger Training, Key Training, Languages, Code |
121 | | - - Category-based lesson filtering (simplified menu rendering) |
122 | | - - New `LessonCategoryType` enum and `LessonCategory` struct |
123 | | - - Category metadata: name, description, color coding |
124 | | - - Keyboard shortcuts: Numbers (1-5) for direct category selection |
125 | | - - Navigation flow: Category menu β Filtered lessons β Duration β Session |
126 | | - - ESC navigation: Lessons β Categories β Quit |
127 | | - - Maintains category context after session completion |
128 | | - |
129 | | -**Phase 3.4 (Completed):** |
130 | | -- **menu-grouping/** (`src/ui/render.rs`, `src/app.rs`) - Visual lesson grouping within categories |
131 | | - - Category-aware lesson grouping with visual separators |
132 | | - - **Languages category**: Grouped by language (French, English) with cyan separators |
133 | | - - **Finger Training category**: Grouped by finger pair (Pinky, Ring, Middle, Index) with green separators |
134 | | - - **Code category**: Grouped by type/language (Code Patterns, TypeScript, Rust, Python) with magenta separators |
135 | | - - Separators use category colors for visual consistency |
136 | | - - Automatic blank line spacing between groups |
137 | | - - Lesson ordering optimized for logical grouping |
138 | | - - Improves navigation and lesson discovery within large categories |
139 | | - |
140 | | -**Phase 3.5 (Completed):** |
141 | | -- **statistics-page/** (`src/ui/render.rs`, `src/app.rs`) - Comprehensive performance dashboard β
NEW |
142 | | - - Overall session statistics (sessions, keystrokes, WPM, accuracy) |
143 | | - - Mastery level breakdown (counts per classification: Mastered, Proficient, Learning, Beginner) |
144 | | - - Top 10 weaknesses list (< 80% accuracy with error details) |
145 | | - - Common mistype patterns (top 5 error patterns showing which keys are confused) |
146 | | - - Visual keyboard heatmap with accuracy-based color coding |
147 | | - - Accessible from main menu with 's' key |
148 | | - - Graceful placeholder when no analytics data exists |
149 | | - - Two-column layout optimized for terminal display (40% stats / 60% heatmap) |
150 | | - |
151 | | -**Complete documentation index**: See `docs/README.md` for navigation guide and feature details. |
152 | | - |
153 | | -### User Documentation |
154 | | -- **README.md** (root) - User-facing documentation and setup |
| 49 | +This project uses feature-based documentation. See [docs/README.md](docs/README.md) for: |
| 50 | +- Requirements β Design β Tasks workflow |
| 51 | +- Steering documents (product, tech, structure) |
| 52 | +- Feature documentation organization |
| 53 | + |
| 54 | +**77 lessons** across 5 categories: Adaptive, Finger Training, Key Training, Languages, Code |
| 55 | + |
| 56 | +| Feature | Module | Status | |
| 57 | +|---------|--------|--------| |
| 58 | +| Typing Engine | `src/engine/` | β
Phase 1 | |
| 59 | +| Home Row Lessons | `src/content/generator.rs` | β
Phase 2 | |
| 60 | +| Bigram/Trigram Training | `src/content/bigram_generator.rs` | β
Phase 2 | |
| 61 | +| Code Symbols | `src/content/code_generator.rs` | β
Phase 2 | |
| 62 | +| Adaptive Mode | `src/engine/analytics.rs`, `adaptive.rs` | β
Phase 2+ | |
| 63 | +| Visual Keyboard | `src/ui/keyboard.rs` | β
Phase 3 | |
| 64 | +| Finger Training | `src/content/finger_generator.rs` | β
Phase 3.2 | |
| 65 | +| Two-Level Menu | `src/content/category.rs`, `app.rs` | β
Phase 3.3 | |
| 66 | +| Statistics Dashboard | `src/ui/render.rs` | β
Phase 3.5 | |
| 67 | + |
| 68 | +See [docs/README.md#features-overview](docs/README.md#features-overview) for detailed feature descriptions. |
155 | 69 |
|
156 | 70 | ## Quick Commands |
157 | 71 |
|
@@ -180,71 +94,21 @@ git push origin v0.2.0 # Push tag to trigger automated release |
180 | 94 |
|
181 | 95 | ## CI/CD Workflows |
182 | 96 |
|
183 | | -### Continuous Integration (`.github/workflows/ci.yml`) |
184 | | - |
185 | | -Runs automatically on every push to `main` and all pull requests. |
| 97 | +### Continuous Integration |
| 98 | +Runs on every push to `main` and all PRs: formatting, linting, tests (129 passing), security audit. |
186 | 99 |
|
187 | | -**Jobs:** |
188 | | -- **Quality Checks**: Formatting (cargo fmt), linting (cargo clippy -D warnings), compilation (cargo check) |
189 | | -- **Test Suite**: Runs 129 tests on Ubuntu and macOS |
190 | | -- **Security Audit**: Scans dependencies for known vulnerabilities (non-blocking) |
191 | | - |
192 | | -**Status**: [](https://github.com/jrollin/typer-cli/actions/workflows/ci.yml) |
193 | | - |
194 | | -### Release Automation (`.github/workflows/release.yml`) |
195 | | - |
196 | | -Triggers on git tag push matching `v*.*.*` pattern. |
197 | | - |
198 | | -**Process:** |
199 | | -1. Generate changelog using git-cliff (conventional commits) |
200 | | -2. Create GitHub Release with changelog as release notes |
201 | | -3. Build cross-platform binaries: |
202 | | - - Linux x86_64 (`typer-cli-linux-x86_64`) |
203 | | - - macOS Intel (`typer-cli-macos-x86_64`) |
204 | | - - macOS ARM64 (`typer-cli-macos-arm64`) |
205 | | -4. Generate SHA256 checksums for all binaries |
206 | | -5. Upload binaries and checksums as release assets |
| 100 | +### Release Automation |
| 101 | +Triggers on git tag `v*.*.*`: |
| 102 | +- Generates changelog with git-cliff (conventional commits) |
| 103 | +- Builds cross-platform binaries (Linux, macOS Intel/ARM64) |
| 104 | +- Creates GitHub Release with binaries and checksums |
207 | 105 |
|
208 | 106 | **Creating a Release:** |
209 | 107 | ```bash |
210 | | -# 1. Ensure all changes are committed and CI passes |
211 | | -git add . && git commit -m "feat: your feature description" |
212 | | - |
213 | | -# 2. Create and push version tag |
214 | | -git tag v0.2.0 |
215 | | -git push origin v0.2.0 |
216 | | - |
217 | | -# 3. Monitor release workflow at: |
218 | | -# https://github.com/jrollin/typer-cli/actions |
219 | | - |
220 | | -# 4. Release will be available at: |
221 | | -# https://github.com/jrollin/typer-cli/releases |
| 108 | +git tag v0.2.0 && git push origin v0.2.0 |
222 | 109 | ``` |
223 | 110 |
|
224 | | -### Changelog Generation (`cliff.toml`) |
225 | | - |
226 | | -Uses [git-cliff](https://git-cliff.org) to generate conventional commit-based changelogs. |
227 | | - |
228 | | -**Commit Types:** |
229 | | -- `feat:` β Features section |
230 | | -- `fix:` β Bug Fixes section |
231 | | -- `docs:` β Documentation section |
232 | | -- `perf:` β Performance section |
233 | | -- `refactor:` β Refactoring section |
234 | | -- `test:` β Testing section |
235 | | -- `chore:`, `ci:` β Miscellaneous Tasks section |
236 | | - |
237 | | -**Preview changelog locally:** |
238 | | -```bash |
239 | | -# Install git-cliff |
240 | | -cargo install git-cliff |
241 | | - |
242 | | -# Preview next release |
243 | | -git cliff --latest --strip header |
244 | | - |
245 | | -# Generate full changelog |
246 | | -git cliff -o CHANGELOG.md |
247 | | -``` |
| 111 | +See `.github/workflows/` for complete workflow details. |
248 | 112 |
|
249 | 113 | ## Project Structure |
250 | 114 |
|
@@ -292,54 +156,15 @@ src/ |
292 | 156 |
|
293 | 157 | Stats saved to: `~/.config/typer-cli/stats.json` |
294 | 158 |
|
295 | | -**Stats Structure:** |
296 | | -- `sessions`: Array of completed session records |
297 | | -- `adaptive_analytics`: Optional analytics data (appears after first session) |
298 | | - - `key_stats`: Per-key performance (accuracy, speed, mistypes, mastery level) |
299 | | - - `bigram_stats`: Per-bigram performance |
300 | | - - `total_sessions`: Session counter |
301 | | - - `total_keystrokes`: Total keystrokes tracked |
302 | | - |
303 | | -## Roadmap |
304 | | - |
305 | | -- **Phase 1**: Home row practice (Level 1) β
|
306 | | -- **Phase 2**: All home row levels (Levels 1-6) with lesson selection menu β
|
307 | | -- **Phase 2**: Bigram training (French, English, Code patterns) β
|
308 | | -- **Phase 2**: Code symbols (TypeScript, Rust, Python) β
|
309 | | -- **Phase 2+**: Adaptive mode (personalized weak-key training) β
|
310 | | - - Analytics engine (per-key and per-bigram tracking) |
311 | | - - Weakness detection (accuracy < 80%, speed > 75th percentile) |
312 | | - - Spaced repetition algorithm (practice intervals by mastery level) |
313 | | - - Adaptive content generation (60/30/10 distribution) |
314 | | - - Automatic tracking after each session |
315 | | - - Conditional menu appearance (β₯ 10 sessions, β₯ 100 keystrokes) |
316 | | -- **Phase 3**: Visual keyboard display β
|
317 | | - - Full AZERTY keyboard layout rendering (Number, Top, Home, Bottom, Modifier rows) |
318 | | - - Real-time next-key highlighting and shift state indication |
319 | | - - Keyboard shortcuts: Tab (toggle visibility), Ctrl+F (finger colors), Ctrl+H (heatmap) |
320 | | - - Proper alignment and visual styling |
321 | | -- **Phase 3.1**: Layout improvements β
|
322 | | - - Reorganized interface layout (Header β Stats β Content β Keyboard β Instructions) |
323 | | - - Stats repositioned under header |
324 | | - - Keyboard flows after content (not fixed at bottom) |
325 | | - - Consistent margins across all screens |
326 | | - - Bottom instructions section ("ESC to quit") |
327 | | - - Fixed keyboard shortcut labels |
328 | | -- **Phase 3.2**: Finger-based training β
|
329 | | - - 24 finger lessons (4 pairs Γ 6 variants: 3 levels Γ 2 modes) |
330 | | - - Corrected French AZERTY finger mappings (16 fixes) |
331 | | - - Auto-generated drills with 3-phase pattern |
332 | | - - Shift variants with weighted distribution (50/40/10) |
333 | | - - Heatmap disabled by default |
334 | | -- **Phase 3.3**: Two-level menu system β
|
335 | | - - Hierarchical navigation with category selection |
336 | | - - 5 categories: Adaptive, Finger Training, Key Training, Languages, Code |
337 | | - - Category-based lesson filtering |
338 | | - - Improved UX with descriptions and color coding |
339 | | - - ESC navigation flow: Lessons β Categories β Quit |
340 | | -- **Phase 3+**: β³ FUTURE |
341 | | - - Enhanced adaptive UI (pre/post-session feedback, progress indicators) |
342 | | - - Analytics visualization (performance graphs, trend charts) |
343 | | - - Data export (JSON/CSV) |
344 | | - - Gamification (achievements, streaks) |
345 | | - - Themes and customization |
| 159 | +Contains session history and adaptive analytics (per-key stats, bigram stats, mastery levels). |
| 160 | + |
| 161 | +See [docs/features/session-storage/](docs/features/session-storage/) for complete schema. |
| 162 | + |
| 163 | +## Current Status |
| 164 | + |
| 165 | +**Phase**: 3.5 Complete (Statistics Dashboard) |
| 166 | +**Next**: Phase 3+ (Analytics visualization, data export, gamification) |
| 167 | +**Tests**: 129 passing |
| 168 | +**Lessons**: 77 total |
| 169 | + |
| 170 | +See [docs/README.md#project-status](docs/README.md#project-status) for complete roadmap. |
0 commit comments