Idea · Aug 29, 2026
Bug Witness Investigation
An interrogation-style debugging game where CS students question AI witness characters to deduce a bug's root cause, building systematic diagnostic thinking through narrative gameplay.
What it would do
Inspired by the voice-driven murder mystery genre trending on Hacker News, Bug Witness Investigation casts each debugging scenario as a case. Three AI witness characters hold partial, non-overlapping knowledge: the function body knows what values it received and what execution path it took; the caller knows what it passed in and what it expected back; the test harness knows only what it observed externally. Students ask questions in natural language and each character answers truthfully within its knowledge scope while refusing to speculate beyond it. When students correctly identify the bug type and location and write the fix, a postmortem screen maps the error to a named CS1 or CS2 misconception. Instructors add new scenarios by pasting buggy and correct code into a guided form; the system generates the witness personas automatically from the code diff.
Key features
- Three witness archetypes per scenario (function body, caller, test harness) with disjoint knowledge scopes enforced by separate system prompts
- 25+ pre-built scenarios covering off-by-one errors, null dereference, mutation aliasing, type confusion, and missing base cases
- Postmortem screen linking the discovered bug to a named misconception with a suggested follow-up exercise
- Instructor scenario builder: paste buggy and correct code, answer three questions, and the tool generates the witness personas and scenario metadata