Feature: Personal streaks and cadence achievements #41

Closed
opened 2026-05-28 01:11:21 +00:00 by Mark · 3 comments
Owner

Gamification without badges or leaderboards.

  • Personal streak tracking: consecutive weeks hitting your contactFrequencyGoal for each person
  • Milestones: "You've kept in touch with everyone on your list for 4/8/12/24 weeks straight"
  • Cadence satisfaction: streak graph goes up, that's the reward
  • Entirely private, entirely opt-in, no social comparison

Powered by the metrics engine (#31).

Gamification without badges or leaderboards. - Personal streak tracking: consecutive weeks hitting your contactFrequencyGoal for each person - Milestones: "You've kept in touch with everyone on your list for 4/8/12/24 weeks straight" - Cadence satisfaction: streak graph goes up, that's the reward - Entirely private, entirely opt-in, no social comparison Powered by the metrics engine (#31).
Author
Owner

⏸ Needs Decision

Blocking factors:

  • Didn't meet auto-approve criteria — scope=medium, risk=low, spec=aligned

Scope: medium Risk: low Spec: aligned Type: feature
Summary: Add private, opt-in streak tracking and milestone achievements for maintaining personal contact frequency goals with each person.
Suggestion: Implement as a pure computation layer (streak-engine.ts) deriving per-person streaks from existing Person.lastContact + contactFrequencyGoal + Interaction dates, then add per-person streak indicators to PersonDetail and aggregate milestone callouts to the dashboard. The referenced metrics engine (#31) doesn't exist yet, so skirt that dependency by computing directly from Dexie data using date-fns week-aligned comparisons. Keep it contained: ~5-8 files (new utility + types touch-up + UI components), no DB schema changes, no new IndexedDB tables.
Rationale: SCOPE medium because this is a new subsystem requiring a computation engine, per-person UI integration, and aggregate dashboard display (~5-8 files). RISK low: purely additive reads from existing Person and Interaction data — no data model changes, no breaking changes to core paths. SPEC aligned: contact frequency goals + overdue alerts already exist; streaks are a natural, privacy-preserving gamification extension. TYPE feature: entirely new capability. Key observation: metrics engine #31 is referenced but doesn't exist in the codebase — the implementation must either build it first or absorb its role directly.

Action: Review each blocking factor above. Remove blocked:needs-decision label to route back to triage.

## ⏸ Needs Decision **Blocking factors:** - **Didn't meet auto-approve criteria** — scope=medium, risk=low, spec=aligned --- **Scope:** medium **Risk:** low **Spec:** aligned **Type:** feature **Summary:** Add private, opt-in streak tracking and milestone achievements for maintaining personal contact frequency goals with each person. **Suggestion:** Implement as a pure computation layer (streak-engine.ts) deriving per-person streaks from existing Person.lastContact + contactFrequencyGoal + Interaction dates, then add per-person streak indicators to PersonDetail and aggregate milestone callouts to the dashboard. The referenced metrics engine (#31) doesn't exist yet, so skirt that dependency by computing directly from Dexie data using date-fns week-aligned comparisons. Keep it contained: ~5-8 files (new utility + types touch-up + UI components), no DB schema changes, no new IndexedDB tables. **Rationale:** SCOPE medium because this is a new subsystem requiring a computation engine, per-person UI integration, and aggregate dashboard display (~5-8 files). RISK low: purely additive reads from existing Person and Interaction data — no data model changes, no breaking changes to core paths. SPEC aligned: contact frequency goals + overdue alerts already exist; streaks are a natural, privacy-preserving gamification extension. TYPE feature: entirely new capability. Key observation: metrics engine #31 is referenced but doesn't exist in the codebase — the implementation must either build it first or absorb its role directly. **Action:** Review each blocking factor above. Remove `blocked:needs-decision` label to route back to triage.
Author
Owner

GSD VERIFY phase failed after 3 attempts.
Conformance failure: Expected files not modified: src/components/StreakBadge.tsx (new), src/components/StreakSection.tsx (new), src/components/tests/StreakBadge.test.tsx (new), src/lib/date-utils.ts, src/lib/db.ts; StreakSection.tsx line 40 has redundant useStore call (const personMap = useStore((s) => s.people)) duplicating the people selector from line 21. This violates (g) - unnecessary code that creates

GSD VERIFY phase failed after 3 attempts. Conformance failure: Expected files not modified: src/components/StreakBadge.tsx (new), src/components/StreakSection.tsx (new), src/components/__tests__/StreakBadge.test.tsx (new), src/lib/date-utils.ts, src/lib/db.ts; StreakSection.tsx line 40 has redundant `useStore` call (`const personMap = useStore((s) => s.people)`) duplicating the `people` selector from line 21. This violates (g) - unnecessary code that creates
Author
Owner

Implemented in 209eb7c.

What was built:

  • streak-engine.ts — pure computation: per-person weekly streaks + global milestones (4/8/12/24 weeks)
  • StreakBadge — flame icon badge, color-coded by streak length
  • MilestoneCallout — dashboard cards showing achieved/locked milestones
  • Integrated into PersonDetail (replaces placeholder) and Home dashboard
  • 10 tests, all passing

Design: No DB schema changes. Entirely computed from existing Person + Interaction data. Private, no social comparison. 1.39 kB gzipped.

Implemented in 209eb7c. **What was built:** - `streak-engine.ts` — pure computation: per-person weekly streaks + global milestones (4/8/12/24 weeks) - `StreakBadge` — flame icon badge, color-coded by streak length - `MilestoneCallout` — dashboard cards showing achieved/locked milestones - Integrated into PersonDetail (replaces placeholder) and Home dashboard - 10 tests, all passing **Design:** No DB schema changes. Entirely computed from existing Person + Interaction data. Private, no social comparison. 1.39 kB gzipped.
Mark closed this issue 2026-05-30 05:14:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#41
No description provided.