Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code insights planning process #4477

Merged
merged 11 commits into from
Sep 16, 2021
Next Next commit
Update code insights planning process
  • Loading branch information
felixfbecker committed Sep 7, 2021
commit ae668f997a38dabb5f470dddfb3a44b8a5717d87
81 changes: 66 additions & 15 deletions handbook/engineering/developer-insights/code-insights/processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,79 @@ Attendees are encouraged to add comments on talking points asynchronously before

## Planning and prioritization

We plan and track our day-to-day work on our [Kanban board](https://github.com/orgs/sourcegraph/projects/118). Our current process is as follows:
We plan and track our day-to-day work on our [GitHub board](https://github.com/orgs/sourcegraph/projects/200/views/1).
The project is separated into multiple views: **Current iteration**, **Next iteration** (both grouped by issue status) and **All iterations** (grouped by milestone).

- Incoming tickets (e.g. from other teams) arrive in the _Inbox_ column.
- Work is scheduled by adding a card to the _Planned_ column. This happens after talking through the next priorities in our [weekly sync](#weekly-sync) or raising something asynchronously in the #code-insights Slack channel.
- The _Planned_ column is an _ordered_ column, by priority. Priority is discussed on the team.
- Work should not be moved into the _Planned_ column until it is ready for development _and_ estimated and prioritized.
- Work that is ready for development but not yet estimated or prioritized sits in the _Ready for Dev_ column.
- Anything that needs design input gets the `needs-design` label and goes in the _Needs design_ column.
- When starting work, engineers pull cards from the _Planned_ column and move it to the _In Progress_ column.
- There should never be more than a couple of cards in the _In Progress_ column at the same time. If we paused work on something (e.g. because priorities changed), it should be moved back to _Planned_ or _Icebox_ as appropriate.
- Things we triaged from the _Inbox_, but don't plan to work on, go into the _Icebox_.
Our current process is as follows:

Note: we intentionally plan so we can avoid merging significant work less than two days before a release (if a release is on the 20th, our last day to merge is the 18th). Exceptions require explicit approval of both the PM and EM.
- We work in **2-week iterations**. Every iteration as a GitHub milestone, which is created at least one iteration in advance.
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved

## Tracking Issues
- Incoming tickets (from team members or from other teams) are added to the [GitHub project](https://github.com/orgs/sourcegraph/projects/200/views/1) and will be visible in the "All iterations" view under "No milestone". This represents our **backlog** of _unscheduled_ work.
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved

The team makes use of [tracking issues](../../tracking_issues.md) for tracking progress on the implementation of longer projects that need to be broken up into multiple issues.
The teammates should ensure that a tracking issue is created when starting work on features that are expected to take longer than a few days (or require multiple PRs) to deliver.
- **While an iteration is ongoing, we plan the next iteration**. This is mostly a mostly asynchronous process.
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved

- Engineers, designer, PM and EM **_propose_ issues to be worked on** the week _before_ the mid-iteration [Monday sync](#weekly-sync) by adding them to the next iteration milestone and setting "Status" to "Proposed". This is done considering our [higher-level goals and roadmap](./goals.md).

- The issue should also have its **_Estimate_ column filled out**, so that it can be evaluated whether it fits into the iteration. If the proposer lacks the information to estimate the issue, they reply on the issue in GitHub or raise it in our Slack channel to get the missing information or get an estimate from the appropiate person. Teammates may also discuss this in ad-hoc synchronous meetings if beneficial. An assignee may also already volunteer or be proposed, but this may still be changed at the [Monday sync](#weekly-sync) to distribute workload.
- If **technical exploration** is needed to get more information, a _spike_ (a time-boxed investigation task meant to facilitate more granular planning) can be proposed for the next iteration instead to get that information.
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved

felixfbecker marked this conversation as resolved.
Show resolved Hide resolved
- As much as possible, the proposer **involves the necessary stakeholders _asynchronously_ to get agreement** on whether the issue should be worked on in the next iteration before the [Monday sync](#weekly-sync). For example, the PM or EM might ping engineers in GitHub or Slack on whether an issue seems feasible, or engineers might ping their EM and PM to get buy-in whether the issue fits into our goals.<br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

If a task needs synchronous discussion with a smaller group than the whole team, teammates are encouraged to meet synchronously in a smaller group to have more clarity before the mid-iteration [Monday sync](#weekly-sync).

- Teammates can **_reorder_ proposed issues** on the ["Next iteration" board](https://github.com/orgs/sourcegraph/projects/200/views/4) before the mid-iteration sync to their liking. The order at the time of the mid-iteration Monday sync is the _proposed order_.

- At the mid-iteration [Monday sync](#weekly-sync), we take a look at the proposed issues together on the ["Next iteration" view](https://github.com/orgs/sourcegraph/projects/200/views/4) to **reach agreement** on the **set** of iteration issues, their **assignees**, and **order**, taking into account our [goals and roadmap](./goals.md), technical aspects, estimates, workloads on individuals, and release dates (the 20th of every month).<br>
As a rule of thumb, the sum of estimates for each individual should not exceed **8 days** (out of a 10-work-day iteration) so we have enough buffer, time to reply to asks from other teams, to plan the next iteration's projects, and self-organized slack time.

- During an iteration, teammates **work on their assigned issues for the iteration in the order they are listed** in the ["Current iteration" view](https://github.com/orgs/sourcegraph/projects/200/views/1) of the board. When starting work on a task, the teammate **updates its status column to "In Progress"** to communicate it to their team. This gives a good overview in the ["Current iteraton" view](https://github.com/orgs/sourcegraph/projects/200/views/1), which can also be viewed in [Kanban layout](https://github.com/orgs/sourcegraph/projects/200/views/1?layout=board), on how the iteration is tracking.

- If one or more issues that were planned for an iteration are looking to **not get finished** in the [current iteration](https://github.com/orgs/sourcegraph/projects/200/views/1) (while maintaining sustainable work practices) the assignee **raises this as soon as possible asynchronously** to the team (including the PM and EM), e.g. on the GitHub issue or Slack. These issues then **become _proposed_ issues for the next iteration** (meaning nothing carries over automatically, but we also don't just drop and forget missed issues).
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved

### Releases

Despite following two-week iterations, our [releases are monthly on the 20th](../../releases.md#releases) and we may sometimes need to order tasks in a way that we can get important projects into the next release.

We also intentionally plan so we can avoid merging significant work less than two days before a release (if a release is on the 20th, our last day to merge is the 18th). Exceptions require explicit approval of both the PM and EM.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I don't like this code freeze. I think it hasn't been particularly effective at stopping issues, and I think it leaves a lot of unresolvable ambiguity around what is significant. I also think it's a relatively low agency constraint that anyone in any form of leadership role should need to be an approver to merge code, as well as the more practical problem that leaving branches for many days in a very active repo can make merging unnecessarily complicated and risky.

What were the original motivations behind this freeze?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coury-clark as I remember that that was introduced to avoid last-minute change before the release cut which we had pretty often (and I guess we still have it). I think this rule isn't bad but because we have been violating this rule for a long time already (as I remember the last 3 releases had these last-minute changes literally) we need to accept that this rule just doesn't work for us.

But it is also important to note that we usually violate this rule not because we want to ship another big thing but cause we usually find some problems on staging right before the release cut. We probably need to reconsider this rule. Like to be a truly code-freezed before the release cut I think we should end our active development 2-3 days before the code-freeze and then start the testing process actively to check things that we haven't covered by unit/integrations tests but with that system, we reduce our time for developing something for the next release. So I don't have a good solution to remove/replace this rule with something else but just mix feeling about that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be okay replacing this with an alternative proposal, but I would otherwise keep this as the "default in lieu of a better solution." As the team grows I would expect our process to naturally mature (and as we grow we should have fewer moments where we have to choose between building in testing, since we should have a capacity to do both).

I consider "significant" to be roughly anything that modifies more than one directional flow or that is not just a copy change (copy changes often land close to release due to needing more stakeholders to review + catching things on dogfood, and I'm okay with that). You can also think of "significant" as "how many possible paths to test this are there?" and anything with more than 1-2 paths is likely significant.


### Planning larger projects

Larger (usually multi-iteration) projects coming from our roadmap go through three phases:
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved

1. **Product context and scope agreement** (usually 1-2 weeks)<br>
The PM creates a product-level RFC summarizing user desires from feedback and proposes a reasonable timeline to reach a scope agreement (mentioned in the RFC).
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved
Engineers, designer (as applicable), PM, and EM discuss the needs in the RFC and the feasibility/complexity of different options.
**The goal of this phase is to agree on a scope for the project**, which will generally be a _subset_ of the desires the PM outlined in the RFC based on the implementation complexity, how long it would roughly take to implement, and how much time we want to dedicate to the project.
After discussion, the agreed-upon scope is recorded in a section at the bottom of the RFC.

2. **Design and implementation planning** (usually 1-2 weeks)<br>
felixfbecker marked this conversation as resolved.
Show resolved Hide resolved
For a UI project, our designer will create wireframes and designs which are reviewed and discussed by all teammates in Figma.
Similarly, engineers will make a proposal for the needed GraphQL APIs (e.g. in an RFC) and agree on the API shape, think the implementation through, and create concrete implementation sub-tasks with estimates, testing plans and a tracking issue collecting them.
The goal of this phase is to be "ready to go" for the implementation phase – having a plan (with reasonable confidence) that only needs to be executed.

3. **Implementation and testing** (usually 1-4 weeks)<br>
Engineers execute on the implementation plan, putting a set of issues from the tracking issue into each iteration.
This also includes that each sub-implementation-task is sufficiently tested, meaning by the end of this phase the project is ready to ship to customers with confidence.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like us to specify where/how the testing goes. Do individual teammates add it to issues and does one of us review it? Do I/we include broader test plans earlier in this process? Either could work, curious what you were thinking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question (I hadn't thought about this as part of this PR). I would say both: The higher-level expectations could be documented as part of the scope agreement in the product RFC. Concrete testing for each sub-task (issue) I think should be included by the issue author (engineers, usually) when the issues are filed in the planning phase.


We sequentialize and parallelize projects in a way that we can _plan_ projects (step 1 and 2) while another project is currently being _implemented_, so that we always have the next project ready to be implemented by the time a project has finished implementation.
We will however make sure to never have multiple projects in planning phase at the same time, as this leads to cognitive overload while also delivering on an implementation for another projects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will however make sure to never have multiple projects in planning phase at the same time, as this leads to cognitive overload while also delivering on an implementation for another projects.

I wonder if this is practical and / or feasible. Not every project is going to involve the entire team for all the time, while some projects will require significantly more architectural overhead than others. We've had multiple workstreams throughout q2 - I don't really see how scaling up the team would reduce the need for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal ultimately is to avoid cognitive overload on individuals, so you can think of it as "not more than one project going on at the same time per person". It is very likely that as our team grows, we'll need to loosen this up to allow multiple groups of people working on different projects simultaneously. But at the same time, we prefer to operate together as a team rather than a working group where everyone is working on different things. At least right now, most big projects we do will involve backend and frontend together, and we're just 2+2 engineers. We also have only one designer and one PM. So I believe at the moment if we do multiple large projects at the same time, it will result in increased cognitive load for the team, which I want to avoid. And again, this may change in the future!

This means a teammate may have to think at most about 2 projects at any given time: one that is being implemented, and one that is being planned, and a teammate will never have to implement more than one larger project at the same time.

<object data="./project_planning.svg" width="1100" height="263" aria-label="Diagram showing three example projects going through all three project phases, with each product and design phase in parallel to the implementation phase of the previous project."></object>

#### Tracking issues

To plan projects that span multiple iterations and need to be broken up into sub-tasks, we make use of [tracking issues](../../tracking_issues.md).
The tracking issue is created by one of the teammates with a descriptive accompanying label, e.g. <span class="badge bg-info">insights-dashboards-v1</span> (milestones are not used for this, as they are used for iterations).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

milestones are not used for this, as they are used for iterations

Just curious - why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could technically also use labels for iterations and milestones for projects. We can't use both, because GitHub only allows one milestone per issue, but issues need to be possible to associate with an iteration AND a project at the same time – so we just need to align on one. Iterations are gonna be created more frequently, and they have a workflow of "closing" and due dates that labels don't have and are a bit more natural to display and edit in the new GitHub board (as it is a dedicated column). You also can't group by labels (or label "pattern") in the new boards, but you can group by milestone, which is used for the "All issues" view, which would not be possible if iterations were tracked by labels.


Suffixes like `v1` can be used to communicate we are aiming for an initial, well-defined scope to avoid scope creep.
After the agreed upon scope for the project is completed, the tracking issue is closed.
Further improvements are either tracked as individual tasks in iterations, or if a new, larger, multi-iteration improvement, a new tracking issue is created with a new label.

Individual tasks of the tracking issue are assigned to iterations through their milestone.

## Product Feedback

Specific product feedback about well-defined, small features can be found directly in the GitHub board.
Specific product feedback about well-defined, small features can be found directly in the [GitHub board](https://github.com/orgs/sourcegraph/projects/200/views/7).
More general product feedback that applies to larger features, or that needs more research and planning to be actionable, is kept in [Productboard](https://sourcegraph.productboard.com/feature-board/1793095-code-insights).

## Retrospectives
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.