I've been working on an idea: creating an online editor that isn't just a chat window, but a true "pair programmer" integrated into the development environment. The goal is to facilitate development with a tool that understands project context, executes complex tasks, and most importantly, is reliable.
You can try it here: llm-codeforge - Now Works only with gemini
Repository: CodeForge-AI
One of the main challenges I wanted to address is how to make AI interaction more structured and context-aware.
Here are some of the concepts I based my project on:
1. Context is King: the Virtual File System (VFS)
To make the AI "see" the project, the application manages an entire virtual file system in memory, persisted on IndexedDB. This allows the assistant to have a complete and up-to-date view of the folder structure and files - a fundamental prerequisite for any meaningful operation.
2. A "Contract" with the AI: JSON Schema Validation
Interaction with LLMs can be unpredictable. To mitigate this problem, I defined a very strict JSON schema that the AI must respect for each response. Every output is validated through AJV. If validation fails, the system sends automatic feedback to the AI, asking it to correct its response. This transforms the interaction from a hope into a contract, increasing reliability.
Beyond this, I divided responses with a multi-part pattern that isolates various parts of the message, avoiding complex JSON parsing issues.
3. A Framework for Structured Prompts (2WHAV "Light")
To make creating complex prompts more efficient, I created a "light" version of the 2WHAV framework. This internal tool helps expand a simple user request into a detailed technical specification that the AI can follow. The idea is to provide the assistant with a clear action plan from the start, instead of a vague idea.
4. An Action Loop for Complex Tasks
The assistant doesn't just respond. It can execute a series of "tools" (like list_files, read_file) and actions (create_file, update_file). This happens within a loop that allows the AI to break down a complex problem into smaller steps, such as sequentially modifying multiple files to implement a new feature.
5. User Experience at the Center
Technology is fascinating, but it must be useful. Every error that appears in the live preview console is clickable. One click and the error is immediately copied into the AI's input, ready to be analyzed. A small detail that reduces friction and makes the debugging process smoother, while auto-correction is a work in progress.
Conclusion
Building this application is a fascinating journey into software engineering applied to AI. The goal isn't to create a "magic box," but a tool robust and predictable enough to provide useful help and usable code.
The road is still long and challenges abound, but as a POC, I think it's a good result.
What do you think? What are the biggest challenges in integrating AI into our development workflows?



Top comments (0)