AI Coding Guide

AI-Assisted Software Engineering

Common Pitfalls & Recovery

By Richard Osborne, CTO at Visual Hive

Last updated:

TLDR

Most AI coding failures are predictable and preventable. The big ones: skipping the brainstorm, no quality rules, tasks too big, not enforcing the 8/10 minimum, circular debugging without starting fresh. Knowing the failure patterns lets you catch them before they become expensive.

Failure Pattern 1: Skipping the Brainstorm

Symptoms: Started building immediately. Now 3 weeks in and the scope is unclear, the architecture has been refactored twice, and the sprint plan doesn't match what's been built.

Recovery: Stop building. Open Claude. Describe the current state. Have the brainstorm you should have had at the start. Generate or update your foundation docs. Resume with clarity.

Failure Pattern 2: Weak Quality Rules

Symptoms: Tests are inconsistent (some tasks have them, many don't). Code style varies. AI keeps doing something you told it not to.

Recovery: Tighten your .clinerules. "Write tests" → "Unit tests are mandatory for all business logic. Minimum 3 tests per function. No exceptions." Then run a phase audit to find the gaps and fix them.

Failure Pattern 3: Tasks Too Big

Symptoms: AI produces 500+ lines for a single task. Some things work, some don't. Confidence score is 6/10. Not sure what to fix first.

Recovery: Split the task into subtasks, each with its own spec. Start a fresh conversation for each subtask. Apply the 8/10 rule to each one before moving to the next.

Failure Pattern 4: Ignoring the 8/10 Threshold

Symptoms: Multiple tasks at 6–7/10 "because we'll fix it later." Now you're on Task 15 and half the earlier tasks are broken in ways that affect everything built on top of them.

Recovery: Stop forward progress. List all tasks below 8/10. Fix them before continuing. Yes, it's painful. But it's less painful than building a tower on a cracked foundation.

Failure Pattern 5: Circular Debugging

Symptoms: Been trying to fix the same bug for 2+ hours. AI keeps suggesting variations of the same broken approach. Each fix introduces a new problem.

Recovery: Ask AI to write a context rescue document. Start a completely fresh conversation. Provide just the task doc, not the debugging history. Fresh eyes with no baggage.

Failure Pattern 6: Documentation Drift

Symptoms: ARCHITECTURE.md describes the schema that existed 3 sprints ago. AI generates code based on outdated schemas. Errors. Hours of debugging.

Recovery: Run a documentation audit (fresh Claude conversation). Ask it to compare the docs to the current codebase. Update everything. Add "update docs" to your task completion checklist.

Failure Pattern 7: AI Takes Over Decisions

Symptoms: Not sure how a feature works. AI made architecture choices you don't understand. Can't explain what the code does to anyone else.

Recovery: You're the architect. Ask AI to explain every major decision. Update ARCHITECTURE.md with explanations. If something was a bad choice, document why and either fix it or add a note that it needs fixing.

The Universal Recovery Protocol

  1. Stop adding new features
  2. Assess current state — what works, what doesn't, what's unclear
  3. Update your foundation docs to match reality
  4. Run a phase audit on the current codebase
  5. Create tasks for every fix needed
  6. Fix systematically, applying the 8/10 rule to each fix
  7. Resume with clarity

This protocol has saved projects that looked unsalvageable. The key is stopping the bleeding before it gets worse.

Building something with AI?

Talk to Visual Hive →