Skip to content

0x-Decrypt/task-prioritiser

Repository files navigation

Smart Task Prioritizer

An AI-powered task prioritization tool that analyzes your to-do list and suggests the optimal order to tackle tasks based on deadlines, importance, and effort estimates.

License: MIT Python 3.7+ Code style: black

Features

  • 🧠 AI-powered prioritization using Gemini 2.5 Flash
  • Simple CLI interface for quick task input
  • 📊 Clear rationale for each prioritization decision
  • 🔧 Modular architecture for easy extension
  • 🚀 One-command setup and execution
  • 🛡️ Robust error handling with graceful fallback
  • Comprehensive testing with 32+ test cases

Quick Start

# Clone and setup
git clone https://github.com/0x-Decrypt/task-prioritiser.git
cd task-prioritiser
./setup.sh

# Configure your API key (get it from https://makersuite.google.com/app/apikey)
# Edit .env file and add: GEMINI_API_KEY=your_key_here

# Run the prioritizer
python app.py

Demo

📝 Smart Task Prioritizer
========================================

Task title: Finish project proposal
Deadline: tomorrow
Importance (1-5): 5
Estimated effort: 2h
✅ Added: Finish project proposal

Task title: Buy groceries
Deadline: today  
Importance (1-5): 2
Estimated effort: 30min
✅ Added: Buy groceries

🎯 Prioritized Task List
==================================================

1. Buy groceries
   🔥 Due TODAY | Importance: 2/5 | Effort: 30min
   💡 Quick task due today - complete for immediate satisfaction
   📊 Priority Score: 85.2

2. Finish project proposal
   ⏰ Due TOMORROW | Importance: 5/5 | Effort: 2h  
   💡 Critical importance with tight deadline; requires focused time
   📊 Priority Score: 92.8

Usage

Input Format

  1. Task title: Brief description of the task
  2. Deadline: Use formats like:
    • 2025-08-15 (YYYY-MM-DD)
    • today, tomorrow
    • 3 days, 1 week
  3. Importance: Scale of 1-5 (5 = most important)
  4. Effort: Time estimate:
    • 30 (minutes)
    • 2h (hours)
    • 90min (minutes with unit)

AI Analysis

The system considers:

  • Deadline urgency: Closer deadlines get higher priority
  • Importance level: More important tasks rise to the top
  • Effort required: Quick wins are factored for momentum
  • Logical sequencing: Dependencies and optimal flow

Configuration

Environment Setup

# Create .env file
GEMINI_API_KEY=your_gemini_api_key_here

Get your API key from: Google AI Studio

Advanced Configuration

The system automatically handles:

  • API failures with heuristic fallback
  • Input validation and error correction
  • Virtual environment management

Project Structure

task-prioritiser/
├── app.py              # Main application entry point
├── src/
│   ├── models/         # Task data models
│   ├── ai/            # AI prioritization engine  
│   ├── cli/           # Command line interface
│   └── utils/         # Utility functions & validation
├── tests/             # Comprehensive test suite
├── requirements.txt   # Minimal dependencies
├── setup.sh          # One-command setup script
├── .env.example      # Environment template
└── docs/             # Additional documentation

Development

Running Tests

# Run all tests
python -m unittest tests.test_models -v
python -m unittest tests.test_validation -v
python -m unittest tests.test_prioritizer -v

# Test installation
./test_installation.sh

Code Quality

  • Functions limited to ≤25 lines
  • Comprehensive type hints
  • Self-documenting variable names
  • 100% test coverage for core logic

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes (following our code style)
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

Troubleshooting

Common Issues

API Key Error

❌ GEMINI_API_KEY not configured

Solution: Edit .env file and add your Gemini API key

Import Errors

ModuleNotFoundError: No module named 'litellm'

Solution: Run ./setup.sh to install dependencies

Permission Denied

Permission denied: ./setup.sh

Solution: Run chmod +x setup.sh

License

MIT License - Copyright (c) 2025 0x-Decrypt

See LICENSE for full details.

Acknowledgments


Star this repo if you find it helpful!

📧 Questions? Open an issue

🤝 Contributing? See our contribution guide

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors