Sub topic 8
Chaining Stacks Without Overloading an Anchor
This chapter assumes you can already write a single habit stack ("After I [anchor], I will [behavior]"). It also assumes you know how to pick a specific, reliable anchor and shrink a behavior to under a minute. Here you will learn how to link several stacks into a sequence. You will also learn how to tell when one anchor is carrying too much.
What a chain is
A chain is a series of habit stacks in which the new behavior of one stack becomes the anchor of the next. You attach only the first link to an existing routine. After that, each completed behavior cues the one after it.
A single stack looks like this:
- After I pour my morning coffee, I will write down one task for today.
A chain extends it:
- After I pour my morning coffee, I will write down one task for today.
- After I write down one task for today, I will drink a glass of water.
- After I drink a glass of water, I will put on my running shoes.
Only link 1 depends on something that already happens by itself. Links 2 and 3 depend on the habit before them.
Why chaining works
Chaining uses the same cue, routine and reward loop as a single stack. Each finished behavior is a clear, specific event, so it works as a cue. You don't need a clock, a phone alert or willpower to start the next step. The step you just finished is the reminder.
Chaining also saves anchors. Most people have only a handful of truly reliable routines, such as waking up, brushing teeth, making coffee, starting the commute and eating dinner. If every new habit needed its own routine, you would run out quickly. A chain lets one reliable routine start a short sequence.
The same code, run as a chain
The chain above can be written as data and printed as sentences. This is the same structure as the earlier examples, with the behavior of each row repeated as the anchor of the next row.
chain = [
("pour my morning coffee", "write down one task for today"),
("write down one task for today", "drink a glass of water"),
("drink a glass of water", "put on my running shoes"),
]
for anchor, behavior in chain:
print(f"After I {anchor}, I will {behavior}.")Notice that the second element of each pair equals the first element of the next pair. That repeated phrase is what makes it a chain. If the phrases differ, you have separate stacks rather than a linked sequence.
The main risk: a chain is only as strong as its weakest link
If link 2 fails, links 3 and beyond lose their cue. They do not fail because you stopped caring. They fail because nothing triggers them. This is the main weakness of chains, and it affects how you build them.
Suppose you skip the glass of water one morning. The cue for putting on your running shoes was "after I drink a glass of water". That cue never happened, so the shoes step never fires.
Three practical rules follow from this.
- Put the most important habit early. If you must choose, the habit you care about most should be link 1 or link 2. Later links are more likely to be lost.
- Keep every link tiny. A link that takes ten minutes is much more likely to be skipped than one that takes twenty seconds. Each skip breaks everything after it.
- Keep chains short. Two to four links is a sensible range for a new chain. Add more only after the chain has held for several weeks.
What "overloading an anchor" means
An anchor is overloaded when it is asked to cue more than it can reliably do. This happens in three ways.
Too many stacks on one anchor
You might attach several separate habits to the same routine:
- After I pour my morning coffee, I will meditate for ten minutes.
- After I pour my morning coffee, I will stretch.
- After I pour my morning coffee, I will review my budget.
- After I pour my morning coffee, I will read one page.
The anchor now has four jobs and no order. Each habit competes with the others, and you have to decide what comes first. That decision is a point of friction, and it is exactly the kind of decision a stack is supposed to remove.
A chain that is too long
A ten-link chain sounds efficient on paper. In practice, the chance that every link holds on a busy day is low. One interruption, such as a phone call or a child asking for breakfast, removes the rest of the sequence.
Links that are too big
The total time of a chain is the sum of its links. Four links of twenty seconds each take about a minute and a half. Four links of fifteen minutes each take an hour, and that hour has to fit into a routine that was only a few minutes long. When the sequence no longer fits the context, the anchor stops working.
Checking a chain for overload
Before you commit to a chain, count and time it. A short script makes the check concrete.
chain = [
("pour my morning coffee", "write down one task for today", 30),
("write down one task for today", "drink a glass of water", 20),
("drink a glass of water", "put on my running shoes", 15),
]
MAX_LINKS = 4
MAX_SECONDS_PER_LINK = 60
problems = []
if len(chain) > MAX_LINKS:
problems.append(f"Chain has {len(chain)} links; limit is {MAX_LINKS}.")
for index, (anchor, behavior, seconds) in enumerate(chain):
if seconds > MAX_SECONDS_PER_LINK:
problems.append(
f"Link {index + 1} takes {seconds}s; limit is {MAX_SECONDS_PER_LINK}s."
)
if index > 0 and anchor != chain[index - 1][1]:
problems.append(f"Link {index + 1} is not triggered by link {index}.")
total = sum(seconds for _, _, seconds in chain)
print(f"Total time: {total}s")
print("Problems:", problems if problems else "none")The script checks three things: the number of links, the size of each link, and whether each anchor really is the previous behavior. The limits (four links, sixty seconds) are starting points, not rules from research. Change them to suit your own mornings.
Branching instead of stacking everything in a line
Sometimes you want several habits around one routine. A single long chain is not the only option. You can spread habits across different anchors, or choose a different anchor for each part of the day.
| Situation | Weak design | Stronger design |
|---|---|---|
| Five new habits, one morning routine | One chain of five links after coffee | Two short chains: two links after coffee, and two after brushing teeth |
| A habit that needs a different place | Link it to a behavior in another room | Give it its own anchor in the right place |
| A habit you care about a lot | Put it at the end of a long chain | Put it first, or give it its own anchor |
| A habit that varies in length | Chain more links after it | End the chain after it |
The last row matters. If a behavior might take two minutes one day and twenty the next, nothing should be chained after it, because the following links will start at unpredictable times or never.
Order the links by context
Each link should be compatible with the place, time and mood of the link before it. Chain steps that share a room and a body position. Moving from the kitchen to the bedroom to the front door adds travel, and travel is a chance to get distracted.
For the example chain, the first three steps happen in the kitchen: pour coffee, write a task, drink water. Putting on running shoes works if the shoes are by the kitchen door. If they are in a bedroom closet, the last link includes a walk and a search. Move the shoes, or move the link.
Adding links safely
Build a chain slowly. A reasonable process is:
- Start with one stack on a reliable anchor. Run it until it feels automatic. This often takes a few weeks.
- Choose a second behavior that fits the same place and is tiny.
- Write it as a new stack whose anchor is the first behavior.
- Run the pair for at least a week before adding a third link.
- Check each week whether any link is being skipped. If one is, fix it before extending.
This is slower than writing a full chain on day one. It also means that when a link fails, you know which one, because only one link is new.
Repairing a broken chain
When a chain stops working, find the first link that is regularly skipped. Everything after it is a symptom.
- The skipped link is too big. Shrink it to a version that takes under a minute.
- The skipped link is in the wrong place. Move the supplies or reorder the chain so related steps sit together.
- The previous behavior is unclear. "After I finish breakfast" is vague. "After I put my bowl in the sink" is a clear event.
- The chain is simply too long. Cut it into two chains with separate anchors.
- The link has no reward. A short, immediate sense of success, such as a quiet "done", helps each link feel complete. An earlier chapter covered this in detail.
You can also add a fallback. If you skip a link, restart the chain at the next link on purpose rather than abandoning the whole sequence. For example: "If I skip the water, I will still put on my running shoes after I write down my task." That rewrites the anchor of the last link so that it no longer depends on the skipped step.
def restart_from(chain, skipped_index):
"""Return a repaired chain that skips one link and reconnects the rest."""
repaired = []
for index, (anchor, behavior) in enumerate(chain):
if index == skipped_index:
continue
if index == skipped_index + 1:
anchor = chain[skipped_index][0]
repaired.append((anchor, behavior))
return repaired
chain = [
("pour my morning coffee", "write down one task for today"),
("write down one task for today", "drink a glass of water"),
("drink a glass of water", "put on my running shoes"),
]
for anchor, behavior in restart_from(chain, 1):
print(f"After I {anchor}, I will {behavior}.")The output shows two stacks: coffee leads to the task, and the task leads directly to the running shoes. The water link is gone and the chain is whole again.
Summary of design rules
- Attach only the first link to an existing routine.
- Make each later anchor the exact behavior before it.
- Keep chains to about two to four links at first.
- Keep every link under a minute where possible.
- Put the habit you value most early in the chain.
- Keep links in one place and one mood.
- Add one link at a time and test it for a week.
- If a link is regularly skipped, repair it before adding more.
Exercise
You wrote this chain: (1) After I brush my teeth, I will floss one tooth. (2) After I floss one tooth, I will do ten push-ups. (3) After I do ten push-ups, I will read for twenty minutes. (4) After I read for twenty minutes, I will write in my journal. (5) After I write in my journal, I will pack my gym bag. After two weeks you only manage links 1 and 2. Name two design problems and propose a repaired design.
Show answer
First, the chain has five links, which is longer than the two to four recommended for a new chain. Second, link 3 (reading for twenty minutes) is far too large and variable, so it is regularly skipped, and links 4 and 5 lose their cue. A repaired design: keep "After I brush my teeth, I will floss one tooth" and "After I floss one tooth, I will do ten push-ups" as the chain. Move reading to a separate anchor, such as "After I sit down on the couch in the evening, I will read one page". Move the journal and gym bag to a different anchor, such as "After I put my dinner plate in the sink, I will write one line in my journal." Then add the gym bag step as a second link only once the journal habit holds.
Exercise
A chain has the links "After I pour my coffee, I will write a task" and "After I eat breakfast, I will drink a glass of water". Is this a chain? What should you change?
Show answer
It is not a chain. The anchor of the second stack ("eat breakfast") is not the behavior of the first stack ("write a task"), so the two stacks are independent and each depends on its own anchor. To chain them, rewrite the second as "After I write a task, I will drink a glass of water". Alternatively, keep them as two separate stacks if breakfast is the better place for drinking water.