Skip to content
AI CraftsmanSUPERPOWERS
Blog
  • AI
  • Claude
  • DevEx

Your Cognitive Biases Are Writing Your Code

Acceleration bias, scope creep, sunk cost: the plugin that catches what you can't see.

Alexandre Mallet4 min read

Here's something nobody talks about when they discuss AI coding assistants: the prompts you write are not objective. They're filtered through your current emotional state, your deadline pressure, your attachment to the feature you've been building for three weeks, and a dozen other cognitive biases that you can't see because you're inside them.

Claude executes what you ask. If what you ask is distorted by bias, what you get back is distorted code. Faster, yes. But faster in the wrong direction.

AI Craftsman Superpowers includes a Bias Detector. Here's why that matters.

The Biases That Hurt Codebases Most

Acceleration bias is the most common. You're under deadline pressure. You ask Claude to "quickly wire this up" or "just make it work for now." Claude hears that. It optimizes for speed, not quality. The result is technically functional but architecturally compromised: missing validation, bypassing the domain layer, hardcoding values that should be configuration.

The damage isn't in the code itself. It's in the precedent. The next developer (or future you) sees the shortcut and either copies it or spends hours figuring out why it's there.

Scope creep happens when you're excited. You're building Feature A and you realize Feature B would be really nice to have. You add it to the prompt. Claude enthusiastically builds both. Now you have untested surface area, an undiscussed PR that will surprise your team, and a commit that's impossible to review cleanly.

Sunk cost is subtler. You've been building something for three days and you're starting to suspect it's the wrong approach. But you can't throw it away: you've invested too much. So you ask Claude to patch it, extend it, make it work somehow. Claude obliges. You end up with a Frankenstein that satisfies neither the original design nor a clean rewrite.

Confirmation bias in prompting: you describe a solution, not a problem. "Implement this using a Saga pattern" instead of "I need to coordinate these two aggregates across a transaction boundary." Claude implements exactly what you asked for, even if a simpler approach would have served better. It doesn't push back. That's your job, and you just abdicated it.

What the Detector Actually Does

The Bias Detector runs on every UserPromptSubmit hook. Before your message reaches Claude, the plugin analyzes it for patterns associated with known biases.

A few examples of what it catches:

  • "quickly", "just", "for now", "temp" → Acceleration bias signal
  • "also add", "while we're at it", "bonus" → Scope creep signal
  • "make it work", "patch this", "workaround" → Sunk cost or quality compromise signal
  • Describing implementation before problem → Confirmation bias signal

When a pattern fires, the hook doesn't block you. It adds a warning to the context that Claude sees:

⚠️ BIAS ALERT: Acceleration bias detected in prompt ("quickly", "just").
Consider: Is this a deadline situation? If so, document the compromise explicitly.
If not, remove these words: they change the quality target.

Claude sees this. It adjusts. More importantly, you see it. The act of having the bias named changes how you read your own prompt. Often you rewrite it.

The Cases That Matter Most

The bias detector earns its place in the moments you can't catch yourself.

It's 11pm before a demo. You type: "quickly add email validation to the registration form." The detector fires acceleration bias. You pause. You realize you were about to ask Claude to add a if (email.includes('@')) check instead of wiring up your actual Email value object. Two minutes of effort now versus an hour of cleanup next sprint.

Or: you've been refactoring the payment module for a week. Today's prompt includes "while we're at it, let's also update the invoice generation." The detector flags scope creep. You split the tasks. The PR stays reviewable. Your team can actually understand what changed and why.

These aren't dramatic saves. They're the small corrections that, accumulated over hundreds of prompts, keep a codebase from slowly becoming a graveyard of technical debt.

The Uncomfortable Truth

Cognitive biases are universal. They affect junior developers and senior architects equally. The difference is experienced developers have built internal checks: they pause before committing, they sleep on architecture decisions, they know which of their habits to distrust.

AI coding assistants remove friction by design. That's their value. But reduced friction also removes the natural pauses where self-correction happens.

The Bias Detector adds those pauses back, not as obstacles, but as mirrors. It shows you what you're asking before you commit to it.

Your biases aren't a flaw. They're human. But your codebase doesn't have to carry them.

The Bias Detector is one of 10 superpowers in AI Craftsman Superpowers. It runs entirely locally: no data leaves your machine.