Skip to content

add: terminal error watcher with automatic AI debug context generation #5

@akadeepesh

Description

@akadeepesh

What kind of feature is this?

New CLI flag or option

What problem does this solve?

Debugging with AI tools currently requires a large amount of manual context preparation.

When a runtime, build, or compilation error appears, developers usually need to:

  • clean noisy terminal output
  • identify the relevant files
  • manually copy stack traces
  • select related source files
  • create a reproducible prompt for ChatGPT/Claude

This process is repetitive and time-consuming, especially during rapid iteration.

Example workflow today:

npm run dev

Terminal output:

TypeError: Cannot read properties of undefined
at LoginForm.tsx:42

The developer must then manually:

  • inspect stack traces
  • determine related files
  • package context
  • explain the issue to an AI assistant

This creates unnecessary friction in AI-assisted debugging workflows and often results in:

  • incomplete debugging context
  • oversized uploads
  • noisy prompts
  • repeated AI retries
  • poor reproduction quality

Proposed solution

Introduce a background terminal watcher mode that automatically detects errors, extracts useful debugging information, and generates an AI-ready debug context package.

Example usage:

contextzip watch

Proposed workflow:

  1. Watch terminal/process output in real time

  2. Detect runtime/build/test errors

  3. Clean and reduce noisy logs by:

    • removing repeated stack frames
    • filtering framework noise
    • collapsing irrelevant output
  4. Identify likely relevant files using:

    • stack traces
    • filenames
    • import relationships
    • framework-aware heuristics
  5. Automatically generate either:

    • a compact prompt.txt for small issues
    • or a debug-context.zip for larger issues

Example generated structure:

debug-context/
├── prompt.txt
├── terminal-error.txt
├── relevant-files/
├── reproduction.txt
└── metadata.json

The goal is to reduce the manual effort required to transform raw terminal failures into high-quality AI debugging context.

If this is a new framework — what should be excluded?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions