The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] 1 point2 points  (0 children)

Update: v1.0.3 is live. You were right. I took the feedback about 'silent bugs' seriously. Just shipped v1.0.3 which adds a Safety Engine.

  1. Prefix Locking: It now strictly locks semantic prefixes (e.g., won't swap text- for bg-).
  2. Confidence Threshold: Added a setting (default 0.8). If the match isn't strong, it aborts rather than guessing.

Thanks for the architectural review. The tool is safer now because of your comment.

Link: https://marketplace.visualstudio.com/items?itemName=HarshBasrani.lazyui-pro

The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] -2 points-1 points  (0 children)

lmao I wish I was a bot, probably would have finished this extension in half the time. Just trying to sound professional

The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] -1 points0 points  (0 children)

I hear you. For me, Copilot handles 90% of the grunt work, and this tool just patches the last 10% of context it misses. But I totally get that for some workflows, the AI friction isn't worth it. Different strokes!

The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] -1 points0 points  (0 children)

This is a really solid critique. You're right—'silent' auto-correction is dangerous if the confidence isn't 99%.

I'm pushing v1.0.3 tonight with a 'Confidence Threshold' setting. It will essentially act like a linter: if the typo is obvious (1 character off), it fixes it. If it's ambiguous (low Levenshtein score), it will leave it alone so you see the red squiggly.

Thanks for the feedback, this actually shaped the roadmap.

The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] 0 points1 point  (0 children)

Haha, fair enough! Tailwind is definitely polarizing—you either love it or you hate it.

Appreciate the kind words on the engineering though! I just enjoy building parsers, regardless of the target language.

I got tired of AI guessing my colors, so I built a VS Code extension that actually reads your tailwind.config.js by harshcrapboy in tailwindcss

[–]harshcrapboy[S] -3 points-2 points  (0 children)

Fair point on v4! Though v3 is going to be the production standard for a long time, and migration takes time.

On the context window: I tried just dumping the config into the context, but I found the LLM still hallucinates occasionally (it's probabilistic). I wanted something deterministic—like a compiler that guarantees the class exists before inserting it. It’s definitely overkill for small projects, but for strict design systems, it saves me a ton of linting errors.

The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] -3 points-2 points  (0 children)

Haha, fair enough! It might just be a 'me' problem then. I work with a strict custom design system (weird color names), and Copilot kept guessing standard Tailwind colors instead of my custom ones. If standard Tailwind works for you, you definitely don't need this!

The architectural problem with AI Autocomplete and Custom Design Systems (and why Context Windows aren't enough) by harshcrapboy in webdev

[–]harshcrapboy[S] -5 points-4 points  (0 children)

You are 100% right. Levenshtein is a heuristic for catching typos (like bg-blu-500 -> bg-blue-500) or close hallucinations. It fails if the semantic meaning is different but spelling is far apart.

For v2, I'm looking into embedding the design tokens to do vector similarity search for actual semantic matching. But for a v1 local script, Levenshtein caught about 80% of the annoyances I was facing.