Mitigating "Epistemic Debt" in Generative AI-Scaffolded Novice Programming using Metacognitive Scripts
Organizations: Extuitive Inc. (Flagship Pioneering) Cambridge, Massachusetts, United States of America
Abstract
The democratization of Large Language Models has given rise to vibe coding, where novice programmers prioritize semantic intent over syntactic implementation. Without pedagogical guardrails, we argue this is fundamentally misaligned with cognitive skill acquisition. Drawing on Kirschner's distinction between cognitive offloading and outsourcing, unrestricted AI encourages novices to outsource the intrinsic cognitive load required for schema formation rather than merely offloading extraneous load. This accumulation of epistemic debt creates fragile experts: developers whose high functional utility masks critically low corrective competence. To quantify and mitigate this debt, we conducted a between-subjects experiment (N=78) using a custom Cursor IDE plugin backed by Claude 3.5 Sonnet. Participants were recruited via Prolific and UserInterviews.com to represent AI-native learners. We compared three conditions: manual (control), unrestricted AI (outsourcing), and scaffolded AI (offloading). The scaffolded condition employed a novel Explanation Gate -- a real-time LLM-as-a-Judge framework enforcing a teach-back protocol before generated code could be integrated. Results reveal a collapse of competence: both AI groups significantly outperformed the manual control on functional utility (p < .001) and did not differ from each other (p = .64), yet unrestricted AI users suffered a 77% failure rate on a subsequent 30-minute AI-blackout maintenance task, vs. only 39% in the scaffolded group. Qualitative analysis suggests successful vibe coders naturally self-scaffold, treating AI as a consultant rather than a contractor. We discuss implications for AI-generated software maintainability and propose that future learning systems must enforce metacognitive friction to prevent mass production of unmaintainable code. Replication package: https://github.com/sreecharansankaranarayanan/vibecheck
Figures & tables
| Score | SOLO Level | Student Explanation Example |
|---|---|---|
| 1 | Pre-structural | “I added a button so that when you click it the course is added to the list and it updates.” |
| 2 | Unistructural | “It uses the enrollCourse function to send the ID to the database and then changes the UI.” |
| 3 | Relational | “The await keyword ensures the app waits for the DB confirmation before updating the local courses state, preventing UI desync.” |
| 4 | Ext. Abstract (partial) | “The try/catch around the fetch prevents the UI from showing stale data if the server call fails, but I’m not sure how it handles a timeout.” |
| 5 | Ext. Abstract | “It implements optimistic updates by updating the state first but uses a try/catch to rollback the UI if the fetch request fails, ensuring eventual consistency.” |
VibeCheck: Changes blocked — explain the code to apply it.'' Bottom right: a second notification reading VibeCheck: Edit reverted — explain the code in the…'' showing that a direct editor bypass was undone.| ID | Assertion Description |
|---|---|
| A-01 | User can log in using mock credentials and reach the dashboard. |
| A-02 | Course catalog successfully fetches and renders 20+ items from JSON. |
| A-03 | Course list displays correct metadata (Instructor, Credits, Time). |
| A-04 | Clicking “Enroll” adds a course to the user’s sidebar state. |
| A-05 | Duplicate enrollment in the same course is blocked by state logic. |
| A-06 | The system identifies time-overlaps between two distinct courses. |
| Original (Functional) | Injected Regression (Bug) |
|---|---|
| const res = await fetch(’/enroll’); | const res = fetch(’/enroll’); |
| if (res.ok) { updateUI(); } | updateUI(); // Optimistic |
| else { rollback(); } | // No rollback logic |
| Condition | Mean Utility Score | SD |
|---|---|---|
| Manual (Group A) | 65.2% | 14.3 |
| Unrestricted AI (Group B) | 92.4% | 8.1 |
| Scaffolded AI (Group C) | 89.1% | 9.5 |
| Condition | Total Time Mean ( ) | Active Thinking Mean ( ) | Progress (%) |
|---|---|---|---|
| Manual (A) | 88.4 (2.1) | 88.4 (2.1) | 42% |
| Unrestricted (B) | 48.2 (10.4) | 18.5 (4.2) | 100% |
| Scaffolded (C) | 64.6 (11.2) | 36.3 (5.8) | 100% |
| ID | Condition | Utility (Ph 1) | Repair Result (Ph 2) | Fix Time | Dominant Stance (Ph 1) |
|---|---|---|---|---|---|
| P-12 | Manual | 72% | Success | 11m 45s | Manual Reasoning |
| P-23 | Unrestricted | 95% | Fail | Timeout | Contractor (Directive) |
| P-35 | Unrestricted | 98% | Success | 21m 10s | Consultant (Explanatory) |
| P-48 | Scaffolded | 90% | Success | 13m 30s | Enforced Consultant |
| P-55 | Scaffolded | 82% | Fail | Timeout | Tautological (Low SOLO) |
Generative AI in Education
Generative AI in education uses language and multimodal models to support teaching, learning, feedback, assessment, and educational design.
See all 282 papers