Inspiration

Most AI coding assistants feel like black boxes. You type a prompt, wait for a spinner, and then get a blob of code dropped into your workspace. If it works, it feels like magic—until it fails, leaving you digging through broken dependencies, silent file writes, or hidden syntax errors.

We wanted to build an AI code generator that brings complete technical transparency to the process. BuildTrace was born from a simple premise: developer tools should never hide their work. Instead of acting like a black box, an AI generator should show you every step—from parsing the initial prompt and structuring the database schema, to writing files locally on disk and running real execution checks right in front of you.

What it does

BuildTrace is a single-window, local AI developer console built in Python using CustomTkinter. It takes a plain-language prompt and generates complete, runnable CLI software—starting with a multi-file Python and SQLite task manager.

Unlike standard chat interfaces, BuildTrace exposes every phase of generation across a transparent 3-panel dashboard:

  • Request Panel (Left): An interactive prompt control center where you configure your app parameters and inspect live LLM readiness badges.
  • Transparent Code Inspector (Top Right): Displays ordered, step-by-step build progress while streaming and parsing multi-file outputs (database.py, main.py, and README.md) directly into clean, tabbed code viewers.
  • Embedded Proof-by-Execution Terminal (Bottom Right): An interactive terminal container running standard subprocesses locally. It automatically initializes your app's SQLite database upon build completion and allows you to test CLI commands—like adding and listing tasks—in real time.

If an API key is missing or the network drops, BuildTrace smoothly transitions to a local offline template engine, guaranteeing that your generation workflow remains reliable under any condition.

How we built it

We designed BuildTrace systematically in 4 testable slices using a strict test-driven workflow:

  1. Host Architecture & UI (CustomTkinter): We structured the application as a single-window dark-mode console with a slate #111216 and obsidian #0B0C0E theme, designed specifically for low eye strain and high code legibility.
  2. Structured LLM Generation Engine: Built on OpenAI’s gpt-4o-mini API, we utilized strict JSON schema mode (response_format={"type": "json_object"}) to ensure multi-file payload generation. We backed this with local key validation that verifies all required files are present before touched on disk.
  3. Local Disk Operations & File Streaming: BuildTrace writes all generated files to an isolated target directory (./output/buildtrace_app/), keeping user workspace code cleanly separated from system logic.
  4. Subprocess Terminal Integration: The lower-right panel embeds an asynchronous subprocess.Popen execution runner. It streams stdout and stderr line-by-line into a custom text widget, allowing interactive CLI input directly within the app frame.
  5. Automated Verification: The entire codebase is backed by a 12-test automated unit and integration suite covering offline template parsing, credential detection via environment variables (OPENAI_API_KEY), database initialization, and terminal subprocess execution.

Challenges we ran into

  • Enforcing Strict Multi-File JSON Payloads: While JSON mode guarantees valid JSON syntax, it doesn't natively guarantee that the model populates every required file key (main.py, database.py, README.md). We solved this by building an inline validation layer that verifies payload schema completeness before initiating the disk-write phase.
  • Asynchronous Terminal Process Management: Capturing subprocess.Popen streaming output inside a GUI without freezing the Tkinter main thread was tricky. We implemented thread-safe asynchronous queueing to feed terminal output line-by-line into the UI without sacrificing responsiveness.
  • Clean Terminal Shell Formatting: Escaping complex command strings across different shell environments required careful handling of quote parsing and current working directory paths (cwd="./output/buildtrace_app").

Accomplishments that we're proud of

  • Complete Technical Transparency: Zero black-box magic. Every generation step is visible, inspectable, and verified against local disk storage.
  • 100% Demo Reliability: Thanks to our dual-engine architecture (Live OpenAI API + Offline Fallback Payload), BuildTrace offers bulletproof reliability regardless of network or API key status.
  • 12 Passing Automated Tests: We built the core application logic with strict test coverage, giving us complete confidence in our file-writing, schema-parsing, and terminal-running logic.
  • High-Contrast Developer UX: The console aesthetic—featuring dark slate surfaces, electric indigo highlights (#6366F1), and emerald step checkmarks (#10B981)—feels like a modern developer tool built for real engineering workflows.

What we learned

Building BuildTrace reinforced the importance of building in small, end-to-end vertical slices. By proving our offline file-writing logic and terminal subprocess execution in Slice 1 and 2 before wiring up network calls in Slice 3, we eliminated UI bugs early and kept our integration phase completely clean.

We also learned how crucial immediate feedback loops are when working with LLM-generated code. Showing raw execution tracebacks in red text right inside the terminal turns failed builds into immediate, actionable repair steps.

What's next for BuildTrace

  • Interactive Code Repair ("Regenerate & Repair"): Automatically feeding terminal exception tracebacks back into the LLM prompt to automatically fix runtime errors on the fly.
  • Expanded Project Templates: Adding support for automation scripts, REST APIs, and multi-page web applications.
  • Multi-Provider LLM Switching: Giving developers the flexibility to toggle between OpenAI, Anthropic, and locally hosted LLMs (via llama.cpp or Ollama).

Built With

Share this project:

Updates

Submission history