The Algorithm
Musk's five-step production optimization mantra that he repeats at every meeting
The Algorithm is Musk's five-step process for optimizing production, developed during Tesla's brutal factory hell periods in 2017-2018. He recites it like a mantra at every production meeting across all his companies. His executives sometimes mouth the words along with him. The sequence is critical: question requirements, delete parts and processes, simplify what remains, accelerate cycle time, then automate. Most organizations make the fatal mistake of starting with automation or optimization before questioning whether the thing being automated should even exist. The Algorithm also comes with eight corollaries covering hands-on management, the danger of comradery, hiring for attitude, and treating all non-physics rules as mere recommendations.
- The sequence matters: always question before deleting, delete before simplifying, simplify before accelerating, accelerate before automating
- Every requirement must be traceable to a named individual, not a department
- Requirements from smart people are the most dangerous because they are least likely to be questioned
- If you do not end up adding back at least 10% of deleted parts, you did not delete enough
- A common mistake is to simplify and optimize a part or process that should not exist
- All technical managers must spend at least 20% of their time doing hands-on technical work
- Comradery is dangerous because it makes people reluctant to challenge each other's work
- A maniacal sense of urgency is the operating principle
- The only immutable rules are those dictated by the laws of physics—everything else is a recommendation
- Question every requirementEach requirement should come with the name of the person who made it. Never accept that a requirement came from a department. Question it no matter how smart the person is. Then make the requirements less dumb.Pro tipRequirements from smart people are the most dangerous because people are less likely to question them. Always question, even if the requirement came from the CEO.WarningAnswering 'the legal department' or 'the safety department' when asked who made a requirement is not acceptable. You need the actual person's name.
- Delete any part or process you canAggressively remove parts, processes, and steps. You may have to add them back later. In fact, if you do not end up adding back at least 10% of them, then you did not delete enough.Pro tipDefault to deletion. It is easier and cheaper to add something back than to carry unnecessary complexity forward indefinitely.WarningMost people are too conservative with deletion because they fear the consequences. The real risk is keeping things that add no value.
- Simplify and optimizeOnly after deleting unnecessary parts should you simplify and optimize what remains. A common mistake is to simplify and optimize a part or a process that should not exist at all.Pro tipIf you find yourself doing clever optimization work, step back and ask whether the thing being optimized should exist in the first place.WarningDoing this step before step two is the most common mistake. You end up with a beautifully optimized process that should have been deleted entirely.
- Accelerate cycle timeEvery process can be speeded up. But only do this after you have followed the first three steps.Pro tipMusk spent enormous time at Tesla accelerating processes that he later realized should have been deleted. Let his mistake save you the same pain.WarningSpeed without the prior steps just means you are producing waste faster.
- AutomateAutomation comes last. The big mistake at Tesla's Nevada and Fremont factories was beginning by trying to automate every step before requirements had been questioned, parts deleted, and bugs shaken out.Pro tipAutomate only after the process is clean, simple, and proven. Automating a broken process locks in the brokenness.WarningTesla's Model 3 production hell was largely caused by premature automation. Robots were doing tasks that humans could do better or that did not need to be done at all.
During production hell, robots were carefully applying fiberglass mats to reduce noise and vibration in the battery pack. Musk questioned the requirement and discovered it added minimal value. The entire process—robot, mat supply chain, installation time—was deleted, saving time and cost per vehicle.
When SpaceX's Raptor engine development was stuck, Musk applied The Algorithm in nightly meetings, declaring that any remotely questionable tubes, sensors, and manifolds would be deleted. He converted most parts from expensive Inconel alloy to cheap stainless steel, preferring fast failure over slow analysis.
The Algorithm crystallized during Tesla's Model 3 production hell in 2017-2018, when Musk slept on the factory floor and discovered that many of the automated systems he had installed were solving problems that should not have existed in the first place. Robots were carefully applying fiberglass mats that turned out to be unnecessary. Conveyors were transporting parts through processes that added no value. The painful lesson—that he had spent enormous time and money accelerating and automating steps that should have been deleted—became the ordering principle of The Algorithm.