# habit-streaks

Summarise a habit log into current and longest streaks and a 4-week completion rate per habit

- **Space:** personal-productivity-public (https://github.com/Tech-Realm/space-personal-productivity-public/tree/main/habit-streaks)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** local-python; checks: 1
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use personal-productivity-public/habit-streaks` or MCP `get_pack personal-productivity-public/habit-streaks`
- **Files:** CHANGELOG.md, code/habits.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/habits.csv, outcome/fixtures/log.csv, outcome/results.json, pack.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

Per habit: current streak, longest streak, completion % over the last 28 days (respecting each habit's target days), from a simple date,habit log.

Verified by: Synthetic log: daily 'read' current 3 / longest 5; Mon-Wed-Fri 'gym' current 5 (off days and not-yet-logged today don't break it).

## Steps

1. Keep a plain log (one line per done habit per day; a Shortcut or note works).
2. Run `python3 code/habits.py log.csv habits.csv --today 2026-12-04`.
3. Look at the 28-day rate, not just the streak.

## Edge cases

- Today counts only if already logged (otherwise the streak is counted up to yesterday).

## Don'ts

- Don't track more than 3-5 habits at once (practice advice, not a tool limit).



---

Canonical URL: https://logicpacks.io/packs/personal-productivity-public/habit-streaks

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
