DaniyalAjmal/habit_tracker — reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python habit tracker that runs from the command line.
I want to be able to create daily or weekly habits, check them off, delete them, and list what I’m tracking. It should save everything locally in a SQLite database so I don’t lose my habits when I close the program. Please include a few sample habits with about four weeks of fake history so I can test it right away.
I also want basic analytics, like showing all habits, filtering daily versus weekly habits, finding the longest streak overall, checking the streak for one habit, and showing habits that are currently broken or missed. The streak logic should handle daily and weekly habits properly.
Keep the code clean and beginner friendly, with separate files for the habit object, tracker logic, database storage, analytics, predefined sample data, and the command line entry point. Please add tests for the important behavior and make sure they pass.
Want more depth? Deep Reverse