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 (2026-03-26):
- ✅ Development 100% complete.
- ✅ Production Ready (Grade A).
- ✅ New Features: Short Swipe Customization, Profile System, Media Clipboard (v4).
- ✅ 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.
.claude/skills/ contains task-specific reference docs. ALWAYS read the relevant skill BEFORE starting work on a matching topic — they encode hard-won lessons and exact procedures the main context doesn't reproduce.
| Trigger phrase | Skill file |
|---|---|
| "release", "tag", "publish", "version bump", "F-Droid", "fastlane", "changelog" | .claude/skills/release-process.md |
| "clipboard", "pinned", "todo", "tag" (clipboard) | .claude/skills/clipboard-panel-architecture.md, clipboard-tag-system.md, clipboard-todo-system.md |
| "IME toast", "feedback", "pulse" | .claude/skills/ime-visual-feedback.md |
| "key routing", "edit mode", "search mode" in IME | .claude/skills/ime-key-routing.md |
| "ew-cli", "instrumented test", "emulator.wtf" | .claude/skills/ew-cli-testing.md |
| "dictionary", "VocabularyTrie", "predictor" | .claude/skills/dictionary-pipeline.md |
| "settings", "SharedPreferences" | .claude/skills/settings-preferences.md |
| "wiki", "Astro", "site docs" | .claude/skills/wiki-documentation.md |
| "emoji panel" | .claude/skills/emoji-panel.md |
| "content pane layout" | .claude/skills/content-pane-layout.md |
Release-specific reminder: When user says any release-related word, READ .claude/skills/release-process.md FIRST. It documents the fastlane changelog model (fastlane/metadata/android/en-US/changelogs/{baseCode}{abi}.txt), the F-Droid API queries for current state, and the version-code math. Do NOT confuse metadata/fdroid/tribixbite.cleverkeys.yml (build recipe) with the fastlane changelogs (release notes).
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.clipboard-privacy.md: Clipboard privacy features.
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.
TESTING POLICY:
- NEVER test locally via ADB (screencap, input, am start, etc.). ADB is for build-install only.
- ALWAYS write instrumented tests (ew-cli) or pure JVM tests when testing is possible.
- If a scenario cannot be tested via instrumented or pure tests, ask the user to test manually.
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"