I have a problem

I have a major problem. When my employer asks me to build a three-story building that will manufacture a certain widget — I build a 20-story skyscraper that can manufacture StarTrek replicators, which in turn can pump out widgets 200 times as fast.

Why? It's part ego ("look everybody, look what a grand building I'm capable of creating!"), part autodidactism (learning new things feels as good to me as sex), and part perfectionism (I'm happy to spend 90 minutes formatting and copyediting a document, when 10 minutes is all that's called for).

Regardless of motivation, the fact is: MY EMPLOYER ONLY WANTS TO PAY FOR A THREE-STORY BUILDING. When I build a 20-story building, and I do it on the clock, I'm forcing my employer to foot the bill for something they never asked for.

It's difficult to control

Despite maturing in other areas of my life, this is one impulse I have struggled to control. On my cube wall, I have posted this sign:
Shipping is feature zero.
If the code never ships, the other features are useless.

DTSTTCPW
Do the simplest thing that could possibly work

YAGNI
You ain't gonna need it

First make it possible. Later, if necessary, make it pretty and fast.

Nonetheless, I constantly go off on little side excursions, working hard on things that are related to my current task, but are nonetheless not at all required to complete my current task.

I must stop conflating tangential-work with real work in my mind. Confusing the two is procrastinating, there's no two ways about it.

One way to approach my work

One way to solve this problem, is to approach my work with the mentality that I will get my task done without building any new tools — I will use ONLY the tools that area already available to me.

Once in a while, it may be judicious to automate a particular task. However, when I am in the throes of this compulsion, it is difficult/impossible for me to make the right decision most of the time. In this case, it is much safer to assume that NO task should be automated.

After I've proven, over several weeks or more, that I'm capable of controlling this compulsion, then I can probably reevaluate. In this middle of the compulsion though, I have to have strict rules.

The catch-phrase for this is "technological asceticism" — while it might be more comfortable to do your task if you had a bunch of automated tools, those tools are by no means necessary. You're perfectly capable of doing it the "old fashioned" way, even if that means some repetitive manual work.