BEFORE STARTING ANY SESSION:
- CHECK
README.md- Production status and overview. - CHECK
memory/todo.md- Active Task List (The single source of truth). - CHECK
docs/TABLE_OF_CONTENTS.md- Master navigation for project docs. - CHECK
docs/specs/- Feature specifications for the area you are working on.
CURRENT STATUS (2025-12-11):
- ✅ Development 100% complete.
- ✅ Production Ready (Grade A).
- ✅ New Features: Short Swipe Customization, Profile System (Layout Import/Export).
- ✅ Documentation updated and consolidated.
SPEC-DRIVEN DEVELOPMENT WORKFLOW:
- Check Spec: Is there a spec in
docs/specs/for this feature? - Create Spec: If missing, create from
docs/specs/SPEC_TEMPLATE.md - Implement: Follow spec's implementation plan.
- Test: Use spec's testing strategy.
- Update: Mark TODOs complete in
memory/todo.md.
CleverKeys is a complete Kotlin rewrite of Julow/Unexpected-Keyboard featuring:
- Pure ONNX neural prediction (NO CGR, NO fallbacks).
- Advanced gesture recognition with sophisticated algorithms.
- Modern Kotlin architecture with significant code reduction.
- Reactive programming with coroutines and Flow streams.
- Enterprise-grade error handling and validation.
memory/todo.md- Current pending tasks and verified working features.docs/TABLE_OF_CONTENTS.md- Index of all documentation.docs/history/session_log_dec_2025.md- Recent completed work log.
Located in docs/specs/
short-swipe-customization.md: Per-key gesture customization.profile_system_restoration.md: Layout import/export with gestures.neural-prediction.md: ONNX AI model architecture.core-keyboard-system.md: Main keyboard logic.
IMPLEMENTATION STANDARDS:
- NEVER use stubs, placeholders, or mock implementations.
- NEVER simplify functionality to make code compile.
- ALWAYS implement features properly and completely.
- ALWAYS do things the right way, not the expedient way.
src/main/kotlin/tribixbite/keyboard2/
├── core/ # Core keyboard functionality
├── neural/ # ONNX neural prediction (NO CGR)
├── data/ # Data models
├── config/ # Configuration system
├── ui/ # User interfaces
├── customization/ # Customization logic (Short Swipes, Profiles)
├── utils/ # Utilities
└── testing/ # Quality assurance
# Test compilation
./gradlew compileDebugKotlin
# Full build & install (ALWAYS use this for testing)
./build-on-termux.sh
# Run tests
./gradlew testNEVER install debug APK for testing. Always use release builds:
build/outputs/apk/release/CleverKeys-v*.apk✅build/outputs/apk/debug/CleverKeys-v*.apk❌
Debug logging is controlled by BuildConfig.ENABLE_VERBOSE_LOGGING which is set
in build.gradle - release builds can have debug logging enabled when needed.
This gives best of both worlds: release performance + debug visibility.
# Check for compilation errors
./gradlew compileDebugKotlin --continue
# Tail logs for debugging
logcat -s "CleverKeys" "System.err" "AndroidRuntime"