SPTest is an advanced Android time management application with AI-powered scheduling, Chinese natural language processing, and continuous learning capabilities.
This is a testing project developed using Claude code and Superpowers plugin. Intended to explore the workflow of Superpowers, through brainstorming, creating a git worktree, writing plans, executing plans, subagent driven developing, and completing development work after multiple rounds of TDD. There is a significant improvement in the accuracy and practicality of agent development.
- Continuous Improvement: Learns from user feedback (1-5 star ratings)
- Pattern Recognition: Identifies optimal time slots for different task categories
- Adaptive Scheduling: Improves task duration predictions based on historical data
- Performance Analytics: Tracks system learning progress and scheduling success rates
- Chinese Speech-to-Text: Full voice input support with Chinese language model
- Real-time Processing: Instant voice result processing
- Permission Handling: Runtime audio permission requests
- Fallback Support: Seamlessly switches to text input if voice unavailable
- Time Expression Parsing: Supports both specific ("9็นๅฐ11็น") and general ("ๅจไธๆไธ") time expressions
- Smart Duration Calculation: Automatically calculates task duration from time ranges
- Category Detection: Identifies task types (meeting, coding, social, exercise, study)
- Priority Recognition: Understands Chinese priority keywords (็ดงๆฅ, ้่ฆ, ไธ่ฌ)
- Tag Extraction: Automatically extracts Chinese nouns as task tags
- Dual Task Lists: Separate views for Current and Completed tasks
- Long Press Delete: Task deletion with confirmation dialog
- Auto-Completion: Time-based task status updates
- Smart Scheduling: AI-powered optimal time slot suggestions
- Professional Layout: Two ScrollView sections with proper weight distribution
- Task Cards: Formatted display with all task details
- Visual Status: Different backgrounds for task states
- Number Rating: Intuitive 1-5 number button rating system
- Toast Messages: User-friendly feedback
- Kotlin: Primary programming language
- Jetpack Components: AppCompat, Room, WorkManager, Lifecycle
- Material Design: Modern UI/UX components
- Data Binding: Efficient view binding
- Custom Learning Algorithm: Bayesian-based feedback analysis
- Moving Average Updates: Smooth learning curve with 10% learning rate
- Pattern Recognition: Category-based task pattern learning
- Performance Tracking: Real-time system performance metrics
- JSON Storage: Efficient file-based data persistence
- Gson Serialization: Object serialization/deserialization
- User Preferences: Comprehensive settings management
- Learning Data: Historical feedback and performance tracking
- Custom Chinese Parser: Regex-based time expression parsing
- Android SpeechRecognizer: Built-in speech recognition API
- Flexible Time Understanding: Support for vague time expressions
- Android Studio: Hedgehog or later
- JDK: 17 or later
- Android SDK: API 34 (Android 14.0)
- Gradle: 8.7 or later
-
Clone the repository:
git clone <repository-url> cd SPTest
-
Sync Gradle dependencies:
- Open project in Android Studio
- Wait for Gradle sync to complete
-
Build the APK:
./gradlew.bat assembleDebug
-
Run on device/emulator:
- Connect Android device or start emulator
- Run app from Android Studio or install APK manually
Text Input:
- Type task description: "ๅจไบไธๅ9็นๅฐ11็นๅผไผ"
- Press "ๆทปๅ ไปปๅก" button
- Task is parsed and added to Current Tasks list
Voice Input:
- Press microphone button
- Speak task in Chinese: "ๅๆๅ่้คๆๅคฉๆไธ"
- Recognition result fills the input field
- Press "ๆทปๅ ไปปๅก" to create task
- "ๅจไบไธๅ9็นๅฐ11็นๅผไผ" โ Meeting scheduled for Friday 9-11 AM (120 minutes)
- "็ดงๆฅ๏ผๅฎๆๆฅๅๅคงๆฆ2ๅฐๆถ" โ High priority task with 2-hour duration
- "ๅจๆซๆธธๆณณ" โ Exercise task scheduled for weekend morning
- "ๅจไธๆไธๅๆๅ่้ค" โ Social task for Monday evening
Long Press Delete:
- Long press any task card
- Confirmation dialog appears
- Tap "ๅ ้ค" to remove task
Auto-Completion:
- Tasks automatically move to Completed list when time expires
- Expired tasks are marked as "COMPLETED"
Feedback Rating:
- Tap completed task to rate scheduling quality
- Select 1-5 stars (implemented as number buttons)
- Rating is saved and used to improve future scheduling
Flexible Time Handling:
- "่ฟไธชๅจๆซ" โ This weekend based on task category
- "ไธๅจ" โ Next week during preferred hours
- "ๆๅบ" โ End of month during work hours
- "ๆพไธชๆถ้ด" โ Tomorrow during optimal slot
AI Learning:
- System learns from each feedback rating
- Adjusts preferred times for task categories
- Improves duration predictions
- Tracks scheduling success rates
app/src/main/java/com/example/sptest/
โโโ MainActivity.kt # Main UI and controller
โโโ TimeManagerApp.kt # Application class
โโโ data/
โ โโโ LearningManager.kt # AI learning algorithm
โ โโโ StorageManager.kt # Data persistence system
โ โโโ Task.kt # Task data model
โ โโโ UserPreferences.kt # User settings and patterns
โ โโโ Schedule.kt # Schedule management
โโโ nlp/
โโโ ChineseTaskParser.kt # NLP engine
โโโ SimpleChineseTaskParser.kt # Simplified parser
Task Model:
data class Task(
val id: String,
val title: String,
val priority: Priority,
val duration: Int, // minutes
val category: String,
val scheduledTime: TimeSlot?,
val feedbackRating: Int,
// ... other fields
)User Preferences:
data class UserPreferences(
val workHours: WorkHours,
val taskPatterns: Map<String, TaskPattern>,
val learningData: LearningData
)Feedback Analysis:
- Stores each feedback entry with task context
- Updates success rate based on recent 20 entries
- Adjusts task patterns for each category
- Learns optimal time slots based on ratings
Pattern Updates:
- Learning Rate: 10% per feedback entry
- Moving Average: Smooth adaptation to prevent overfitting
- Category-Specific: Each task type learns independently
- Time Slot Optimization: Learns preferred times from successful schedules
build.gradle.kts:
plugins {
alias(libs.plugins.android.application)
id("org.jetbrains.kotlin.android") version "1.9.22"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.22"
id("com.google.devtools.ksp") version "1.9.22-1.0.17"
}
android {
compileSdk = 34
defaultConfig {
minSdk = 24
targetSdk = 34
}
}<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".TimeManagerApp"
android:theme="@style/Theme.SPTest">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>The system tracks key performance indicators:
- Average Rating: User satisfaction (1-5 scale)
- Completion Rate: Task completion success percentage
- Schedule Success Rate: AI scheduling accuracy
- Total Feedback: Number of feedback entries collected
These metrics are displayed in toast messages after each feedback submission.
Potential improvements:
- Cloud Sync: Backup and sync across devices
- Calendar Integration: Export tasks to system calendar
- Reminder Notifications: Push notifications for upcoming tasks
- Advanced NLP: Support for more complex Chinese expressions
- Multi-language Support: English and other languages
- Dark Mode: Enhanced theme support
Contributions are welcome! Please feel free to:
- Report issues
- Suggest features
- Submit pull requests
- Improve documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Android Jetpack: For modern Android development components
- Gson: For JSON serialization
- Java Time API: For accurate date/time calculations
- Chinese Language Processing Community: For inspiration on NLP techniques
SPTest combines traditional time management with cutting-edge AI to create an intelligent, learning-enabled scheduling system that understands Chinese natural language and continuously improves based on user feedback.
For questions, issues, or feature requests, please visit the project repository.