Skip to content

Latest commit

 

History

History
109 lines (83 loc) · 3.72 KB

File metadata and controls

109 lines (83 loc) · 3.72 KB

CLAUDE.md - CleverKeys Development Context

🚨 SESSION STARTUP PROTOCOL - ALWAYS CHECK FIRST!

BEFORE STARTING ANY SESSION:

  1. CHECK README.md - Production status and overview.
  2. CHECK memory/todo.md - Active Task List (The single source of truth).
  3. CHECK docs/TABLE_OF_CONTENTS.md - Master navigation for project docs.
  4. 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:

  1. Check Spec: Is there a spec in docs/specs/ for this feature?
  2. Create Spec: If missing, create from docs/specs/SPEC_TEMPLATE.md
  3. Implement: Follow spec's implementation plan.
  4. Test: Use spec's testing strategy.
  5. Update: Mark TODOs complete in memory/todo.md.

🎯 PROJECT OVERVIEW

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.

📋 NAVIGATION GUIDE

Essential Files

  1. memory/todo.md - Current pending tasks and verified working features.
  2. docs/TABLE_OF_CONTENTS.md - Index of all documentation.
  3. docs/history/session_log_dec_2025.md - Recent completed work log.

Feature Specifications

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.

🚨 CRITICAL DEVELOPMENT PRINCIPLES

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.

📁 ARCHITECTURE OVERVIEW

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

🚀 DEVELOPMENT COMMANDS

BUILD:

# Test compilation
./gradlew compileDebugKotlin

# Full build & install (ALWAYS use this for testing)
./build-on-termux.sh

# Run tests
./gradlew test

IMPORTANT: Always Install RELEASE APK

NEVER 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.

DEBUGGING:

# Check for compilation errors
./gradlew compileDebugKotlin --continue

# Tail logs for debugging
logcat -s "CleverKeys" "System.err" "AndroidRuntime"