Swimlanes are used to track parallel work streams within a common resource. The most typical use might be grouping composite work items with a parent. Another typical use is an expedited lane for emergency work items that can skip queues and preempt other work. Swimlanes generally indicate some kind of branching. That can be either work item branching or workflow branching.
Kanban systems can be used when the work generally follows some kind of common workflow. For many software development projects, this is an easy constraint. Most software involves some kind of problem definition, some kind of design activity, and some kind of verification. Most software development also involves the use of a limited set of technology applied to a limited set of systems within a limited problem domain, so that most of the work done falls into a few general types.
Most is not all, however, and sometimes work will appear that doesn’t fit neatly into any well-defined type. Or maybe it does have a type that we haven’t defined yet. If the work is non-value-added, we can chalk it up to overhead. If the work is value-added, we will want to track it like all of the other value-added work. A useful trick for managing that kind of work is to reserve a swimlane for ad-hoc workflow:
If you find yourself using the ad-hoc swimlane frequently, you might want to map the value stream of some of the work items to see if you can discover some latent or emerging workflow.
The simplest kind of kanban system is the CONWIP system, for CONstant Work In Process. The simplest kind of CONWIP system is no more than our fundamental kanban element:
The simplest CONWIP cardwall is a classic Agile cardwall with a limit on work-in-process:
An equally intuitive interpretation of CONWIP defines capacity simply as the number of people available to work, so that each person is the kanban:
CONWIP is a rule about work items, not a rule about workflow. We are free to define any workflow we like as long as we observe the global limit. This can be a helpful approach when we want to observe the flow of work, but expect a lot cycling between states, perhaps in an exploratory design mode:
The earliest Scrumban design was just such a CONWIP workflow, which we can represent directly in a simple cardwall. Here we have no limits on any specific column, but the total number of work items is limited by the yellow kanban cards, which are returned to the “Free” box when the task they contained is complete:
Breaking out a workflow implies a sense of sequence. If there is no real sequence, we could define a global “busy” state and reduce specific activities to a checklist. Exposing the workflow to visual control might suggest a need to level resource utilization or that we value reducing backflows as an improvement goal. Pooling the WIP limit suggests that the visual control is enough feedback to help the team achieve leveling. My personal preference is to work in this way where possible.
If a person can be the kanban, then how about a pair? If we combine pairing and kanban with a workflow or checklist, then we get something like Arlo Belshee’s Naked Planning:
I think the most interesting kind of CONWIP system is the Bucket Brigade. Everybody is allowed one card at a time, which can either be moving upstream or downstream. People can either pair (at the cost of some queueing) or work solo as much as they prefer. Constant WIP, zero queueing, full utilization, soft specialization, balanced workflow…what’s not to love?
If we can assign tasks and limit work by pairs, then why not do this with whole teams? That is essentially the approach of Microsoft’s Feature Crews with their quality gates.
Some value streams are too long or too complex to effectively manage with a single WIP limit. Many development teams exist within some larger organization that requires coordination between teams and competition for resources.
Where do features come from? Smaller shops may interact directly with the customer, but larger shops may have a more complex process for dealing with a large number of customers or with highly sensitive customers. If we peer inside the black box of the Product Owner, we might discover a whole team of people working to understand customers and define requirements: business analysts, product managers, usability researchers, product designers. Work-in-process on the business analysis side can just as easily go off the rails as development work. Have you ever seen an epic requirements specification or a bottomless product backlog and wondered where it came from? Your product owner might represent another group of people who feel pressure to produce and look busy. Value stream thinking encourages us to take an interest in what those people are up to and why.
Where do features go after we’ve built them? A large enterprise may have complex deployment requirements that involve integrating code into a manufacturing process or provisioning a datacenter. This work probably involves a different team than the development team, but they are still part of the value stream and their throughput affects everybody. Operations teams often have to deal with long lead times and different natural batch sizes than the development teams that feed them. Each group can benefit from understanding the status and availability of the other.
A small team may be able to self-regulate with visual control, but a long value stream may need more explicit control. Kanban gives us an easy solution by chaining together pooled segments. Within each segment, we manage by visual control, but between segments, we manage by kanban:
CONWIP systems allow us to regulate team workflow with a lighter touch. Pooling kanban across closely related functions and zooming out by one level of scale makes it easier to think about using kanban to manage large systems.
Any kanban-controlled workflow system can be described by combinations and variations1 of a basic pattern:
Sometimes we can simplify the diagram by replacing the kanban backflow with a simple capacity parameter2, but often it is better to show the flow of kanban explicitly. Many of the software development kanban systems we’ve seen are simple workflow systems composed by chaining this basic element:
I would like to think that any professional software engineer would be able to think up more interesting workflows than just a linear cascade. Then again, I would also like to think that any professional software engineer would understand the value of keeping things simple. I have personally come to prefer a more symmetrical call-stack style of flow for software development, because I believe that any person who requests custom work should also be responsible for approving the completion of that work. Consumers pull value from producers, not the other way around:
Petri nets are ideal for describing workflow systems because they are a) concurrent; b) formal, simulable, and sometimes even verifiable; and c) relatively easy to read by humans. Any Petri net that can be drawn without crossing edges can easily be made into a “card wall” for visual control3:
Sometimes a different workflow is needed, depending on the kind of thing being made:
Some tasks can be done in parallel by specialized resources:
When we split tokens, we may need to keep track of their common ancestor so that we can merge them again. Colored Petri nets let us associate composite work items across branches:
Sometimes a large work item can be decomposed into smaller work items of a similar type. We might think of a branching workflow to model this, but that is hard to do if we don’t know how many component work items will be created. Petri nets allow us to take another approach by generating new tokens in-place and then executing them concurrently on the same workflow branch:
When all of the unit work items are complete, they are integrated into their parent work item:
While that might look a little complicated, in practice it’s as simple as the “2-tier” style (or n-tier) cardwall that is often used for project management:
A state transition is a black box that may have some internal process. We might expose that process with a hierarchical model. Alternately, we might want to collapse extraneous diagram detail into a single supertransition. Hierarchy is a simple syntax extension to any workflow model.
Feedback should be considered implicit to any creative process, but it can complicate these models without much benefit to understanding4. In practice, kanban systems regulate feedback very well, because the limits serve as a ratchet function that gracefully responds to feedback and damps oscillation. A process operating at capacity will not accept new work, and a process operating over capacity will also not accept new work. Again, it’s awkward to model “over capacity” so we have to be mindful to treat our models for what they are: models.
Once we understand some of these basic design elements, we can use them to describe or design a wide variety of product development processes. A computer scientist armed with Petri nets and a bit of knowledge about queueing, networks, and processor scheduling has some wicked tools at his disposal for Value Stream Analysis.
1. Some variations involve rules about queue placement and timing of the kanban backflow. GKCS and EKCS are examples in the literature. I wrote about some of that here.
2. Whether or not you can simplify in this way depends on which queuing rules are used.
3. I debated using the blink tag for this point.
4. You can usually cheat by adding an “escape” transition to send all feedback to the beginning of the model and allow it to repropagate downstream without friction. Feedback is easier to account for in matrix representations than in graphic representations. Feedback in a dependency matrix looks like row elements or “rabbit ears” on the “wrong” side of the diagonal.
A staple of software engineering research is the effectiveness of design reviews and code inspections for discovering defects. Methodologists love inspections, but they seem to be difficult to sustain in practice. I’ve seen a few typical reasons for this:
Inspection is a specific skill that requires training and discipline. Naive, unstructured “code review” is worse than useless and eventually self-destructs.
Inspection is quick to be dropped under acute schedule pressure, and slow to restart as a habit once it has been broken.
Inspection works well for frequent small batches and badly for infrequent large batches.
Reason 1 is a matter of skill, and can be solved with education. Reasons 2 and 3 are process issues.
The “inspection gap” illustrates a curious aspect of human nature. There are certain behaviors that a group of people will agree should be practiced by its members. Individual members of the group, when asked, will say that they believe that members of the group should practice the behavior. But then, in practice, those same individuals do not practice that behavior or practice it inconsistently. If you point this out to them, they may agree that they should do it, or even apologize for not doing it, and then continue to not do it anyway.
In my mind, this is a good part of what Lean thinking has to offer. Lean methods like Visual Control recognize this aspect of human nature and provide people with enough structure and context to act in a way that is consistent with their own beliefs. If people using a Lean process agree that code inspections are a good idea, then it will not be hard to get them to agree to incorporate inspections into the process in a way that is hard to neglect. Lean strives to make it easier to do the right thing than do the wrong thing. Lean helps people align their actions with their values.
One practice that works well in most workflow systems is the simple checklist. Human attention is a delicate thing. People get distracted, make mistakes, and overlook things even when they know better. A checklist is a simple device to keep your intentions aligned with your actions. Doctors who use checklists deliver dramatically improved patient outcomes. Would you get on an airliner with a pilot who didn’t use a pre-flight checklist? Would you get on an airliner controlled by software that was written without using checklists?
Checklists and kanban are highly complementary because you can attach a checklist directly to a kanban ticket and make the checklist part of the completion transaction. Checklists improve confidence and trust, and expose tacit knowledge. Checklists relieve anxiety and reduce fear. Can you think of any part of your development process where you’d sleep better at night knowing that all of the important questions were answered correctly by somebody you trust?
Checklists work well for individual activities that do not require specific sequencing, but they don’t work as well for activities that require collaboration from people who have competing commitments. We can raise the stakes for everybody if we elevate our checklist item to the workflow and subject it to the pull discipline. That makes your problem everybody’s problem and gives your peers sufficient incentive to collaborate.
Inspections are a typical example at the scale of a single developer, but there are other practices and scales that we might consider. Failure Mode and Effects Analysis (FMEA) is another highly effective technique that many people agree with in principle but find difficult to implement in practice. FMEA is a systemic method and often targets components or subsystems that are much larger than “user story” scope . Security lifecycle and regulatory compliance activities may also fall into this category. An advantage of using composite workflow is that you can schedule activities that apply to different scales of work.
Process retrospectives can also be attached to workflow in this way. Compared to a more open-ended periodic retrospective, a workflow-bound retrospective asks a more specific question: How could we have created this work product more effectively? Such a workflow-based retrospective directly implements Deming’s Plan-Do-Study-Act cycle.
Are there any practices you would like to see your team use consistently, but have trouble fitting in to your schedule?
What is the Toyota Production System? When asked this question most people (80 percent) will echo the view of the average consumer and say: “It’s a kanban system”; another 15 percent may actually know how it functions in the factory and say: “It’s a production system”; only a very few (5 percent) really understand its purpose and say: “It’s a system for the absolute elimination of waste.”
Some people imagine that Toyota has put on a smart new set of clothes, the kanban system, so they go out and purchase the same outfit and try it on. They quickly discover that they are much too fat to wear it! They must eliminate waste and make fundamental improvements in their production systems before techniques like kanban can be of any help. The Toyota production system is 80 percent waste elimination, 15 percent production system, and only 5 percent kanban.
This confusion stems from a misunderstanding of the relationship between basic principles of production at Toyota and kanban as a technique to help implement those principles.