Core Platform Team/PET Work Processes/Clinic Duty

Current Clinic Duty Rotation

 * Brad Jorsch Senior Software Engineer  (UTC-5/-4)  bjorsch@wikimedia.org  IRC:
 * Petr Pchelko Senior Software Engineer  (UTC-8/-7)  ppchelko@wikimedia.org  IRC:     PPchelko (WMF)
 * Tim Starling Lead Platform Architect  (UTC+11/+10)  tstarling@wikimedia.org  IRC:     Tim Starling (WMF)

Purpose
The Clinic Duty Team will be tasked with progressing ongoing maintenance and tech debt tasks as well as handling inbound reactive and Unbreak Now (UBN) tasks. The goal of the team is to provide space to work on important maintenance and tech debt tasks that are not covered by existing projects, to ensure that inbound UBN and reactive tasks are handled in a timely manner and to provide urgent support needed by other teams.

The Clinic Duty (CD) team also provides an important tool for knowledge sharing across the team and to provide a learning entry point for Engineers to areas that they have not worked on in the past.

Responsibilities

 * Triages all inbound UBN and Reactive tasks supported by the triage meeting and EM
 * Handles selected UBN and Reactive tasks immediately once they are assigned
 * Completes maintenance and tech debt tasks to reduce the CPT backlog

Team Formation
The CD team will work in two weeks sprints supported by an Engineering Manager with 2 to 3 team members of CPT working primarily on CD during the sprint.

Rotation
After each sprint 1 to 2 of those on the CD team will rotate off onto one of the other ongoing project teams and 1 to 2 team members from ongoing project teams will rotate into the CD team.

No team member should remain on Clinic Duty for more than 2 successive sprints.

Advance Notice
Members should know at least a sprint in advance if they are going to rotate onto Clinic Duty, particularly for planning around holidays and vacations.

TODO: We should have a calendar system to track this

Task Triage
At least 1 Engineer from the Clinic Duty team must take part in the weekly Task Triage meeting.

The #core-platform-team board Inbox should be checked on a daily basis and any Unbreak Now(UBN) tasks should be immediately addressed.

UBN and Reactive Task
The CD team will be responsible for monitoring CPT Workboards and triaging inbound requests. UBN tasks and tasks that are determined to be high priority will take precedence over any ongoing work.

Reactive Task Types

 * Code Review requests not covered by any planned projects
 * Design/Architecture work not covered by any planned projects

Task Selection
Prior to the start of the sprint a Pre-Sprint Planning Meeting is held to choose a set of tasks from the backlog to provide work for the team when not handling UBN or reactive tasks.

Task Sources

 * The Code Health (Tec 13) column on the CPT Phab Project
 * The Security, Stability, Performance and Scalability (Tec 1) column on the CPT Phab Project
 * Engineer proposed tasks
 * CPT Workboards

Task Selection Criteria

 * Task must be prioritised
 * Task should be sized
 * Task should fit the skillset of the CD team members or provide a good learning opportunity for Engineers
 * Tasks chosen for the sprint should fit within 50-60% of the two week sprint to allow enough space for Reactive/UBN tasks and to allow completion/progress of the tasks

Scope of Tasks
The type of tasks worked on should be generally self enclosed specific tasks. We will limit scope by Epic, it is possible for us to work through an Epic tasks to complete it but Clinic Duty should not create new Epic Tasks.

Daily Task Triage
Each day there will be a 15-20 minute standup triage meeting that will consider only the #core-platform-team inbox.

UBN tasks will be moved immediately into the Clinic Duty sprint. Other tasks will be evaluated in terms of priority to determine if they should join the current sprint or be scheduled for a later sprint.

Clinic Duty members should review the #core-platform-team inbox before the meeting and apply evaluation criteria in advance where possible to help streamline the meeting.

Pre-Sprint Planning Meeting
The goal of this meeting is to select a set of tasks that can be worked on by the current CD team. The meeting is held the week before a new sprint begins and should involve the EM and the Engineers who will work on the next sprint.

The meeting is responsible for selecting the set of tasks that will be worked on during the sprint, ensuring that they are sized and meet the Task Selection Criteria.

Metrics
In order to measure the impact of the CD team work we want to try to get a snapshot of current state of

Potential Metrics

 * Number of backlog tasks
 * Number of unsized tasks
 * Number of unprioritised tasks
 * Number of tasks created vs resolved in last X days
 * Number of "untouched" tasks
 * Average age of tasks
 * Average response time on UBN/Reactive tasks
 * Average response time on CR requested from outside of CPT