Work Sessions
Work sessions reveal how developers work — not just what they produce. By grouping commits into sessions, ShipLens identifies deep work periods, micro-tasking patterns, and overall coding rhythm.
How Sessions Are Detected
Consecutive commits from the same contributor are grouped into sessions based on time gaps:
If two consecutive commits are separated by ≤ 45 minutes, they belong to the same session. A gap longer than 45 minutes starts a new session.
Session Classification
Sessions are classified by their duration:
| Class | Duration | Description |
|---|---|---|
| Deep | ≥ 50 minutes | Extended focused work — architecture, complex features, debugging |
| Medium | 20–49 minutes | Moderate focus — feature work, code review, targeted fixes |
| Micro | < 20 minutes | Quick touches — typo fixes, config changes, small patches |
Metrics
For each contributor over a date range, the session analysis produces:
| Metric | Description |
|---|---|
total_sessions | Total number of detected sessions |
deep | Count of deep sessions (≥ 50 min) |
medium | Count of medium sessions (20–49 min) |
micro | Count of micro sessions (< 20 min) |
total_active_minutes | Sum of all session durations |
avg_session_minutes | Average session duration |
longest_session_minutes | Duration of the longest session |
commits_per_session | Average commits per session |
What Sessions Tell You
High Deep Session Ratio
A contributor with many deep sessions is getting extended periods of focused work. This generally correlates with:
- Complex feature development
- Effective meeting/interrupt management
- Strong time-blocking habits
High Micro Session Ratio
A contributor with mostly micro sessions might be:
- Context-switching frequently
- Doing primarily maintenance/ops work
- Interrupted often (meeting-heavy schedule)
- Handling quick hotfixes across multiple projects
Session Trends
Changes in session patterns over time can signal:
- Deepening sessions — Developer is getting more focused time (positive)
- Fragmenting sessions — Increasing interruptions or context-switching (worth discussing)
- Stable patterns — Consistent work habits (usually fine)
For managers
Session data is descriptive, not prescriptive. A developer doing 100% micro sessions might be an on-call engineer handling rapid incidents — that's valuable work. Use session data to understand patterns, not to mandate work styles.
Why 45 Minutes?
The 45-minute gap threshold was chosen based on research on developer context-switching:
- Developers typically need 15–20 minutes to re-establish context after an interruption
- A gap of 45+ minutes likely indicates a genuine break (lunch, meeting, task switch)
- Shorter thresholds (e.g., 15 min) would fragment natural coding pauses into separate sessions
- Longer thresholds (e.g., 2 hours) would merge genuinely separate work periods
