DEV Community

Cover image for A fix for AI spaghetti code
Will
Will

Posted on

A fix for AI spaghetti code

I got tired of looking at really iffy code created by AI.

Usually the the first few commits are fine, but as the code-base grows, the code gets really hard for a human to read and even worse to maintain.

The tell is, on the micro level (e.g. a specific function), the code looks nice. When you zoom out and look at the folder structure, domains, separation of concerns, then it gets really messy if it was vibe coded.

So I built a tool that gives AI guardrails to make sure it builds it right. Works really well and it's 7,000 installs in just a few weeks.

Have a look at it here:

GitHub logo skyf0xx / hedgehog

An opinionated AI software engineering workflow built for BMAD

Turn AI from a code generator into a reliable software engineer ⭐

Total downloads

AI can write code in seconds.

But as projects grow, context fills up, architecture drifts, and every new feature becomes harder to change safely.

Hedgehog gives AI a disciplined way to build software: TDD. Opinionated architecture. Small, verifiable steps.

Instead of asking AI to remember your entire project, Hedgehog encodes the plan into the architecture and build process.

The codebase carries the context, not the model.

Cleaner code, fewer tokens, faster builds ⭐⭐⭐⭐

Hedgehog - build software the right way, one step at a time

How it works

Hedgehog combines:

  • BMAD for planning — turn an idea into a clear brief, requirements, and architecture
  • An opinionated stack — remove unnecessary technical decisions, and settle the necessary ones once
  • TDD and progressive layering — build one tested layer at a time
  • Mechanical enforcement — use tooling and phase gates instead of trusting the AI to follow instructions
  • Small context

Top comments (0)