Preprint
Article

This version is not peer-reviewed.

Designing Cognitive Scaffolds for Generative-AI-Assisted Introductory Programming

Submitted:

14 November 2026

Posted:

16 November 2026

You are already at the latest version

Abstract
Generative artificial intelligence (GenAI) can make introductory programming tasks easier to complete, but a working program is not evidence of durable learning. This conceptual-theoretical paper integrates research on cognitive load, metacognition, self-explanation, productive failure, appropriate reliance on automation, and recent studies of AI-assisted programming to propose a five-phase cognitive-scaffolding framework. Learners first make an unaided attempt, request bounded assistance, verify the response against requirements and independently designed tests, explain the mechanism and calibrate confidence, and then complete a related transfer task as support fades. AI literacy, ethical disclosure, privacy, and instructor orchestration operate across all phases. The framework identifies process evidence that remains inspectable when generated code is available, including problem representations, hypotheses, verification records, explanations, confidence judgments, and unaided transfer. It also states six testable propositions and an evaluation blueprint for introductory programming courses. The contribution is a bounded design logic, not a claim that the sequence has already been validated: GenAI should reduce avoidable burden while leaving consequential decisions, checks, and explanations with the learner.
Keywords: 
;  ;  ;  ;  

1. Introduction

A student in an introductory programming class can paste a task into a generative artificial intelligence (GenAI) system and receive a plausible solution almost immediately. The program may run. It may even pass the examples supplied with the assignment. Yet neither outcome tells the instructor whether the student can decompose the problem, trace program state, notice an omitted boundary case, or adapt the solution when the specification changes. GenAI has therefore made an old assessment problem more visible: a correct product and a competent programmer are not the same thing.
This is not an argument for removing AI from programming courses. Responsive explanations, examples, and hints can make difficult material more accessible, particularly when an instructor cannot answer every question at the moment it arises. The educational issue concerns the form and timing of that support. Feedback to novice programmers differs in specificity, timing, and in the amount of thinking that remains for the learner (Rocha et al., 2023). An answer that resolves a syntax impasse may help; an answer that silently replaces decomposition, prediction, and testing may leave little to learn from.
Recent studies make the tension concrete. Research on generative tools reports changes in computational-thinking, self-efficacy, and motivation outcomes, while quasi-experimental work identifies learner and task factors that shape how ChatGPT performs on programming problems (Yilmaz & Yilmaz, 2023; Jing et al., 2024). Usability studies of Copilot also show that novice programmers can find generated suggestions helpful while still needing support to interpret and check them (Prather et al., 2024). These findings describe important effects and interactions, but they do not by themselves specify a classroom sequence that protects learner reasoning. The present paper addresses that design gap.
Research on active learning and productive failure provides a useful starting point. Both lines of work treat the learner’s attempt as part of instruction rather than as a preliminary inconvenience (Calderon et al., 2024; Lee & Lee, 2024). Attempts make current understanding visible. They also give subsequent feedback something to act upon. This point becomes especially important in CS1, where students are still forming mental models of variables, control flow, data structures, and program execution.
AI literacy adds a broader responsibility. Recent work in Informatics in Education describes such literacy in critical and ethical terms, not simply as the ability to write an effective prompt (Bara, 2025; Busuttil, 2025; Hsu & Lao, 2025; Stump et al., 2025). Students need to judge outputs, recognise uncertainty, disclose assistance, and understand when a tool should not be used. A blanket prohibition offers little practice in these judgments, while unrestricted use can make them invisible.
I argue that the useful design question is not “May students use GenAI?” but “What intellectual work must students still perform when they use it?” The paper answers that question with a five-phase cognitive-scaffolding framework: attempt before assistance, request bounded help, verify the response, explain the decision and calibrate confidence, and then work on a related task with less support. The contribution is a design logic, not evidence that the complete sequence already causes better learning. It connects cognitive mechanisms to classroom routines, identifies evidence beyond a final code file, and states propositions that can be examined empirically.

2. Why GenAI Assistance Needs Cognitive Design

2.1. Performance Is Not Learning

Programming courses have always had to distinguish between producing a program and understanding why it works. GenAI widens that gap because it can supply not only syntax but also decomposition, control structures, variable choices, test cases, and an explanation of the finished result. If all of these decisions arrive together, a student may have little reason to construct a representation of the problem.
The recent GenAI literature reinforces this concern without implying that assistance is uniformly harmful. Early Codex work showed how quickly a model could complete introductory-programming tasks, while later reviews and classroom studies describe opportunities for rapid feedback and accessibility alongside risks of shallow engagement, over-reliance, and difficulty judging generated code (Finnie-Ansley et al., 2022; Denny et al., 2024; Liu & Li, 2024; Yilmaz & Yilmaz, 2023). A useful framework must therefore distinguish a tool’s capacity to produce an answer from the learner’s opportunity to build and demonstrate a mental model.
Kölling (2024) argues that educational programming languages and environments should be judged by how well they support learning, rather than by how closely they reproduce professional practice. The same criterion should be applied to AI assistance. A generated answer is educationally useful only in relation to the activity it enables or removes. A small hint that helps a learner continue is different from a complete solution that bypasses the targeted reasoning.
Productive failure helps explain why an imperfect initial attempt can be valuable. When learners try to solve a problem before receiving instruction, they activate prior knowledge, expose gaps, and become better prepared to notice important features of the explanation that follows (Kapur, 2008). A programming course built on productive failure has shown that structured struggle, followed by consolidation, can support computational thinking and creative problem solving (Lee & Lee, 2024). The point is not to romanticise frustration. It is to preserve enough of the problem for the learner to have a position from which to interpret help.
The amount of support cannot be identical for everyone. Behaviour patterns change as students progress through an introductory course, and beginners do not use the same strategies as more experienced solvers (Taveter & Lepp, 2025). Motivation, self-efficacy, effort, and course structure also affect persistence (Kaila & Lemström, 2023; Lakanen & Isomöttönen, 2023). Any workable approach therefore needs a stable instructional principle together with room to adjust the level of help.

2.2. Cognitive and Metacognitive Risks

Cognitive load theory offers one way to decide what assistance should remove. Searching documentation for a minor syntactic detail can consume attention without advancing the central learning objective. A concise explanation or example may reduce that burden. By contrast, asking GenAI to choose the algorithm and produce the implementation can remove the very processing through which a useful schema would be built (Sweller, 1988; Sweller et al., 2019). The distinction is task dependent. Support that is appropriate in an exercise about data modelling may be inappropriate in an exercise intended to assess loop construction.
The second concern is monitoring. Metacognition involves planning, observing one’s progress, and evaluating the adequacy of a solution (Flavell, 1979; Zimmerman, 2002). These activities already matter in programming, where an apparently small error may arise from a mistaken model of program state. Explicit metacognitive strategies have been associated with improved programming performance (Çakıroğlu & Er, 2020).
GenAI introduces an additional object of monitoring: advice that sounds authoritative but may be incomplete or wrong. Fluency makes this difficult. A confident explanation and well-formatted code can feel like evidence even when neither has been checked. The learner must monitor both the program and the decision to rely on the system.
Self-explanation provides a practical response. Explaining why a condition is required, how a value changes during execution, or why a test distinguishes two hypotheses can reveal gaps that silent reading conceals (Chi et al., 1994). In an AI-assisted task, explanation should therefore occur before acceptance. A student should be able to say what the suggestion changes, why the change should work, and what evidence would count against it.

2.3. AI Literacy and Appropriate Reliance

Research on automation describes appropriate reliance as a calibrated choice: use the system when its advice is likely to help, and withhold reliance when the available evidence is weak (Lee & See, 2004; Parasuraman & Riley, 1997). This middle position matters in education. Treating every output as suspect can become as unreflective as accepting every output. Students need a basis for deciding.
AI-literacy curricula increasingly combine technical knowledge with inquiry, evaluation, and ethics. Hands-on activities can help learners investigate how AI systems behave rather than merely learn definitions (Busuttil, 2025). Debate and case-based work make conflicts about fairness, accountability, and acceptable use discussable (Bara, 2025; Stump et al., 2025). Teacher readiness is also consequential because a rule about AI use is only as useful as the learning design around it (Aksit et al., 2025). Karnalim et al. (2025), for example, embed prompting and evaluation within disciplinary data-science work rather than treating AI literacy as a detached topic.
For the present framework, the desired outcome is calibrated agency. A student should be able to decide what kind of help is needed, limit the request, test the response, explain the decision, and continue when assistance is reduced. That combination joins technical competence with responsibility and gives “responsible AI use” an observable classroom meaning.

3. Method of Conceptual Synthesis

The framework was developed through an integrative conceptual synthesis. It is not presented as a systematic review, and its purpose is not to estimate an average effect of GenAI on programming performance. Instead, the synthesis asks how several well-established ideas can be combined into a usable design for introductory programming.
I began with the public archive of Informatics in Education and journal-site searches available through 31 August 2026. Search terms covered introductory programming, programming feedback, metacognition, cognitive load, productive failure, computational thinking, self-efficacy, GenAI, and AI literacy. Articles were retained when they informed at least one of four issues: novice programming behaviour; the timing or form of support; critical and ethical AI use; or evidence of learning found in learner processes and artefacts.
The journal literature was read alongside foundational work on cognitive load, metacognition, self-regulation, self-explanation, productive failure, and reliance on automation. The synthesis used three recurring questions. Which part of the task should remain a learner decision? Which burden can be reduced without removing the learning objective? What evidence would demonstrate understanding if a finished program is no longer sufficient? Comparing the answers led to five ordered phases and four controls that apply across the sequence.
The final analytic corpus contained 40 sources: 20 articles from Informatics in Education, five articles from other peer-reviewed journals that directly study GenAI or AI-assisted programming, six recent peer-reviewed conference papers on code generation and programming education, eight foundational peer-reviewed works, and one UNESCO guidance document. The direct GenAI evidence includes studies of code-generation effects, novice interactions, classroom deployment, guardrails, and student- versus model-generated explanations (Denny et al., 2024; Jing et al., 2024; Kazemitabaar et al., 2023a, 2023b, 2024; Leinonen et al., 2023; Liffiton et al., 2023; Liu & Li, 2024; Prather et al., 2024; Yilmaz & Yilmaz, 2023). Sources were compared using a common extraction frame: learner decision, assistance boundary, verification opportunity, and evidence of learning.
This approach has deliberate limits. The search was purposive rather than exhaustive; no database-wide screening protocol, risk-of-bias instrument, or effect-size aggregation was undertaken. Table 1 therefore summarises the intellectual strands used to construct the framework, not a claim of comprehensive coverage. The framework should be read as a set of theoretically grounded design propositions awaiting classroom evaluation.

4. The Cognitive-Scaffolding Framework

The proposed sequence treats AI assistance as temporary scaffolding inside a learning cycle. The central unit is a learner decision, not the number of messages exchanged with a chatbot. At each phase, the instructor protects one form of cognitive work while allowing support that does not replace it. Figure 1 shows the progression. The return arrow is important: evidence from transfer should inform the level of support provided on the next task.

4.1. Design Assumptions

Four assumptions set the boundaries of the framework. The first is that the course aims to develop conceptual and strategic competence, not only executable code. The second is that an AI response remains an unverified suggestion until it has been checked against the specification, execution behaviour, independent tests, and documentation where appropriate. Third, help should be no larger than necessary to restore productive progress. Finally, assistance must sometimes be reduced; otherwise independent performance cannot be observed. These assumptions are compatible with educational programming environments that place the learner’s needs ahead of professional realism for its own sake (Gal-Ezer & Szekely, 2024; Kölling, 2024).

4.2. Phase 1: Attempt Before Assistance

Before opening an AI tool, the learner produces evidence of an initial model of the problem. Depending on the objective, that evidence might be a restatement of inputs and outputs, two test cases, pseudocode, a trace, or a partial implementation. The intention is not to enforce an arbitrary period of isolation. It is to ensure that the learner has something specific to compare with the assistance that follows.
An attempt serves several purposes at once. It activates prior knowledge, identifies the point of difficulty, and gives the instructor diagnostic information. It also changes the later prompt: “Write the program” can become “My trace suggests that the final element is skipped; give me one clue about the loop boundary.”
This phase needs a stopping rule. Productive failure can easily become ordinary frustration if help is withheld too long. An instructor might permit assistance after the learner has recorded two hypotheses, traced one example, or explained the obstacle to a peer. The appropriate threshold depends on the task and on the student’s prior experience.

4.3. Phase 2: Request Bounded Help

The learner now asks for the smallest form of help likely to restore progress. A useful hierarchy might move from a question or conceptual cue, to a counterexample, to an explanation, to pseudocode, and only then to a code fragment. The prompt should state the goal, the learner’s current account of the problem, the evidence already considered, and what the system must not reveal.
I use “bounded” to describe the function of the request, not merely its length. “Give one hint about why this loop misses the final item; do not rewrite the code” is bounded because diagnosis and implementation remain with the learner. A brief request for “the answer” is not. This distinction reflects evidence that feedback quality depends on timing and specificity (Rocha et al., 2023). Classroom assistants with guardrails and educator-facing controls likewise show that the instructional boundary is part of the tool’s design, not an afterthought (Kazemitabaar et al., 2024; Liffiton et al., 2023). It also explains why tools are most useful when they form part of an instructional sequence rather than an unstructured help channel (Calderon et al., 2024; Coelho et al., 2023).

4.4. Phase 3: Verify the Output

The response is treated as a hypothesis, not as a verdict. Verification may involve checking each requirement, tracing execution, designing boundary cases, running adversarial tests, consulting official documentation, or asking a peer to challenge the reasoning. The choice of check should match the claim. A syntax explanation may be checked against documentation; an algorithmic claim needs cases that could expose a logical error.
Tests supplied by the same system should not be the only evidence. The program and its tests can share an unnoticed assumption. Learners should contribute at least some independent checks and explain why each one is diagnostic.
Verification must leave a visible record. A short table of cases, an annotated trace, a rejected recommendation, or a change log is more informative than a statement that the code was “tested.” Studies comparing student- and model-generated explanations also suggest that explanation quality should be inspected rather than inferred from a polished output (Leinonen et al., 2023). Artefact-based assessment can reveal computational-thinking concepts in learner products (Eloy et al., 2022). Grading the quality of verification consequently shifts attention from whether the model produced a correct answer to whether the student established a justified one.

4.5. Phase 4: Explain and Calibrate Confidence

Before incorporating the suggestion, the learner explains the relevant mechanism in their own words. For a programming task, this may require describing how program state changes, why a branch is reached, or how a data representation supports the operation. The learner also records a confidence judgment, for example on a 0–100 scale, and revises it after testing.
The aim is discrimination rather than uniformly cautious answers. Strong evidence should support high confidence; incomplete checks should not. Comparing confidence with correctness over several tasks can reveal whether a learner is becoming better at judging both personal understanding and external advice.
Explanation and calibration need not create a heavy marking burden. Code annotations, a two-minute paired explanation, or a brief oral spot check can expose shallow understanding. The requirement draws directly on metacognitive monitoring and the learning benefits of self-explanation (Çakıroğlu & Er, 2020; Chi et al., 1994), while addressing the interactional difficulties observed when novice programmers use code-generation assistants (Prather et al., 2024).

4.6. Phase 5: Fade Support and Transfer

The final phase changes the conditions. Assistance is narrowed or removed, and the learner receives a related problem that differs in surface details. Someone who understands a list-processing pattern should be able to apply it to a different dataset, accommodate a new constraint, or predict how the implementation must change. Reproducing the assisted solution is weaker evidence than adapting the underlying idea.
Fading can occur within a lesson, across assignments, or before an assessment. Conceptual questions might remain permitted while code generation is progressively restricted. What matters is that the course deliberately creates moments in which independent competence can be seen.
Transfer results feed the next cycle. A student who succeeds can begin with less support; a student who repeatedly fails needs targeted teaching rather than unlimited access to more complete answers. Because learner behaviour changes over time, support decisions should respond to evidence instead of being fixed for an entire cohort (Kaila & Lemström, 2023; Taveter & Lepp, 2025).

4.7. Cross-Cutting Governance

The five phases sit within four continuing controls. AI literacy concerns capabilities, uncertainty, and evaluation. Ethics and disclosure concern authorship, acceptable assistance, bias, and honest reporting. Privacy concerns the information placed in prompts, including personal, institutional, or proprietary material. Instructor orchestration covers tool approval, task design, accessibility, monitoring, and equitable alternatives.
These are not administrative additions to an otherwise individual learning strategy. Students and teachers differ in AI experience, digital literacy, and self-efficacy (Aksit et al., 2025; Gümüş et al., 2024). A course should therefore state permitted assistance at task level, demonstrate how verification is performed, and provide a viable route for students who cannot or choose not to use a particular system. Assessment should reward evidence of reasoning rather than access to a more capable paid tool.
Privacy and inclusion also need explicit attention. Prompts should not contain identifiable student information or restricted code. Tool choice should account for language, accessibility, age, and data handling. These concerns echo UNESCO’s (2023) emphasis on human agency, inclusion, and privacy. Table 2 and Table 3 translate the phases and governance risks into observable classroom controls.

5. Classroom Implementation Example

Consider a first-semester Python exercise with a modest but revealing specification. A function receives daily temperatures, ignores missing observations, returns the mean of the valid values, and reports the longest consecutive run above a threshold. It must also define what happens when no valid values remain. The task brings together decomposition, iteration, state tracking, and edge-case reasoning.
Before using GenAI, students list cases and sketch the state variables they expect to need. They may then request one conceptual clue or a counterexample, but not a complete function. Verification includes empty input, all-missing input, a qualifying run that ends at the last element, and two runs of equal length. Students annotate how the state changes on one trace and give a confidence judgment for each requirement. The transfer task asks them to find the longest increasing sequence, this time without code-generation assistance.
The instructor receives a compact process portfolio: the initial plan, the bounded request and response, independently designed tests, a short explanation, confidence judgments, the final program, and the transfer solution. Conversation length is not graded. More useful rubric dimensions are the quality of decomposition, whether the requested help retained learner responsibility, the independence of verification, explanatory accuracy, calibration, and transfer.
The same sequence can accommodate different needs. A student blocked by syntax might receive a template while remaining responsible for the algorithm. A student who writes code fluently but tests poorly might have to design adversarial cases before receiving further help. In this sense, the framework standardises the purpose of support rather than prescribing an identical quantity of support for every learner.

6. Testable Propositions and Evaluation Blueprint

The framework is useful only if its claims can be examined. Six propositions follow from the mechanisms discussed above. P1 predicts that a documented pre-AI attempt will improve later explanation and unaided transfer compared with immediate unrestricted access. P2 predicts that bounded hints can lower unnecessary cognitive load without reducing conceptual performance relative to a no-AI condition. P3 predicts that independent verification requirements will improve detection of plausible but incorrect suggestions. P4 predicts that explanation combined with confidence judgments will improve calibration between confidence and correctness. P5 predicts that planned fading will support unaided transfer better than a constant level of assistance. P6 predicts that these effects will vary with prior programming knowledge, AI literacy, and self-efficacy.
A classroom evaluation could compare three conditions: no GenAI, unrestricted GenAI, and framework-guided GenAI. Random assignment would be preferable where feasible; a carefully matched multi-section quasi-experiment is another option. Immediate program accuracy should be reported, but it should not stand alone. Delayed unaided transfer, explanation quality, sensitivity to seeded errors, confidence calibration, cognitive load, time on task, and retention address different parts of the proposed mechanism. Version histories, prompts, tests, rejected suggestions, and brief stimulated-recall interviews could provide complementary process evidence.
Interpretation should allow outcomes to diverge. Unrestricted assistance might raise immediate completion while weakening error detection. Bounded support might take longer yet produce better explanations. Mixed-effects models would accommodate repeated tasks and class sections; subgroup analyses should be preregistered to avoid turning learner differences into post hoc stories. Qualitative analysis is particularly important for identifying where boundaries support reflection and where they simply add friction. Table 4 summarises a possible measurement plan.

7. Discussion

The framework shifts attention away from the quantity of AI output and towards the learner’s relationship with that output. An assisted solution remains educationally defensible when the learner has attempted the problem, limited the help requested, checked the response, explained the decision, and demonstrated some independent transfer. This sequence gives practical content to a principle that permission-based policies leave unspecified.
It also provides a meeting point for several areas of informatics-education research. Active methodologies foreground participation and task design (Calderon et al., 2024; Garcia et al., 2023). Studies of programming feedback emphasise timing and informative value (Rocha et al., 2023). Research on abstraction and novice environments asks whether representations fit the learner (Gal-Ezer & Szekely, 2024; Kölling, 2024; Sbaraglia et al., 2021). Recent GenAI studies add evidence about learner interactions, classroom deployment, guardrails, and the conditions under which code-generation support changes outcomes (Denny et al., 2024; Jing et al., 2024; Kazemitabaar et al., 2023a, 2023b, 2024; Liu & Li, 2024; Prather et al., 2024). AI-literacy work adds evaluation, ethics, and accountability (Hsu & Lao, 2025; Karnalim et al., 2025). The five phases do not replace these contributions; they arrange them around decisions that occur during an assisted task.
Assessment is the practical hinge. If a course grades only the final program, students have a rational incentive to optimise production. Giving visible weight to the initial model, verification, explanation, and transfer changes what counts as success. This does not require collecting every chat message. A few well-chosen artefacts and occasional oral checks are likely to provide better evidence while creating fewer privacy concerns.
The design also has implications for educational tools. Hint-level controls, delayed reveal, prompts for independent tests, confidence recording, provenance logs, and instructor-configurable fading could make the learning sequence easier to enact. Such features should support alternative representations and accessibility without removing the reasoning targeted by the task.

8. Limitations and Research Agenda

This paper offers a conceptual design, not a validated intervention. The purposive synthesis gives particular attention to the target journal and may miss competing accounts or unfavourable findings elsewhere. The framework also combines constructs that can be operationalised in more than one way. A brief cognitive-load rating, for example, cannot by itself show which part of a task created the burden. Claims about effectiveness must therefore wait for empirical comparison.
Context is likely to matter. Beginners and experienced students may respond differently to the same boundary. Effects may vary across block-based systems, conventional text editors, and notebooks; across individual and group work; and across languages and accessibility needs. GenAI systems also change quickly. Studies should report the model and version, access conditions, prompt rules, interface, and date, rather than treating “ChatGPT” or “GenAI” as a stable intervention.
The framework should initially be tested component by component. Factorial designs could examine whether an initial attempt, independent verification, and explanation contribute separately or interact. Longitudinal work is needed to determine whether calibration and transfer persist after support is removed. Equity analyses should consider cost, language quality, disability accommodations, and previous AI experience. Qualitative studies can address a question that outcome scores will miss: when do learners experience bounded help as useful structure, and when does it feel like an obstacle with no clear educational purpose?

9. Conclusion

A working program is increasingly easy to obtain and increasingly weak as evidence of learning. Introductory programming courses need evidence of how students frame a problem, judge assistance, test claims, explain choices, and perform when support is reduced. The five-phase framework is intended to organise those activities without denying learners access to a potentially useful tool.
Its central claim is deliberately modest: GenAI should remove avoidable obstacles while leaving the consequential decisions with the learner. An unaided attempt, bounded assistance, independent verification, explanation with calibrated confidence, and a faded transfer task make that claim operational. AI literacy, ethics, privacy, and instructor orchestration keep the sequence accountable. The next step is empirical: compare the phases, identify their boundary conditions, and determine whether the proposed evidence predicts durable programming competence.
AI-Assisted Tools Disclosure: OpenAI ChatGPT was used in developing this manuscript to assist with conceptual outlining, literature organisation, language refinement, figure drafting, and document formatting. The author independently checked the sources, arguments, citations, and final files and accepts full responsibility for the manuscript.

References

  1. Aksit, O.; Akoglu, K.; Aydin, Z. Investigating preservice STEM teachers’ AI literacy and self-efficacy beliefs: Are they ready for AI? Informatics in Education 2025, 24(4), 653–679. [Google Scholar] [CrossRef]
  2. Bara, N. Real-world AI ethics preparation: A debate and case-study platform. Informatics in Education 2025, 24(4), 737–760. [Google Scholar] [CrossRef]
  3. Busuttil, L. Constructing AI literacy: A hands-on approach for school children. Informatics in Education 2025, 24(4), 761–779. [Google Scholar] [CrossRef]
  4. Calderon, I.; Silva, W.; Feitosa, E. Active learning methodologies for teaching programming in undergraduate courses: A systematic mapping study. Informatics in Education 2024, 23(2), 279–322. [Google Scholar] [CrossRef]
  5. Çakıroğlu, Ü.; Er, B. Effect of using metacognitive strategies to enhance programming performances. Informatics in Education 2020, 19(2), 181–200. [Google Scholar] [CrossRef]
  6. Chi, M. T. H.; de Leeuw, N.; Chiu, M. H.; LaVancher, C. Eliciting self-explanations improves understanding. Cognitive Science 1994, 18(3), 439–477. [Google Scholar] [CrossRef] [PubMed]
  7. Coelho, R. C.; Marques, M. F. P.; Oliveira, T. de. Mobile learning tools to support in teaching programming logic and design: A systematic literature review. Informatics in Education 2023, 22(4), 589–612. [Google Scholar] [CrossRef]
  8. Denny, P.; Prather, J.; Becker, B. A.; Finnie-Ansley, J.; Hellas, A.; Leinonen, J.; Luxton-Reilly, A.; Reeves, B. N.; Santos, E. A.; Sarsa, S. Computing education in the era of generative AI. Communications of the ACM 2024, 67(2), 56–67. [Google Scholar] [CrossRef]
  9. Eloy, A.; Achutti, C. F.; Fernandez, C.; Lopes, R. de D. A data-driven approach to assess computational thinking concepts based on learners’ artifacts. Informatics in Education 2022, 21(1), 33–54. [Google Scholar] [CrossRef]
  10. Finnie-Ansley, J.; Denny, P.; Becker, B. A.; Luxton-Reilly, A.; Prather, J. The robots are coming: Exploring the implications of OpenAI Codex on introductory programming. In Proceedings of the 24th Australasian Computing Education Conference; Proceedings of the 24th Australasian Computing Education Conference, 2022; pp. 10–19. [Google Scholar] [CrossRef]
  11. Flavell, J. H. Metacognition and cognitive monitoring: A new area of cognitive-developmental inquiry. American Psychologist 1979, 34(10), 906–911. [Google Scholar] [CrossRef]
  12. Gal-Ezer, J.; Szekely, S. Spark: The first choice for novices. Informatics in Education 2024, 23(4), 767–781. [Google Scholar] [CrossRef]
  13. Garcia, F. W. da S.; Oliveira, S. R. B.; Carvalho, E. da C. A second experimental study of the application of a teaching plan for the algorithms subject in an undergraduate computing course using active methodologies. Informatics in Education 2023, 22(2), 233–255. [Google Scholar] [CrossRef]
  14. Gümüş, M. M.; Kukul, V.; Korkmaz, Ö. Relationships between middle school students’ digital literacy skills, computer programming self-efficacy, and computational thinking self-efficacy. Informatics in Education 2024, 23(3), 571–592. [Google Scholar] [CrossRef]
  15. Hsu, T.-C.; Lao, N. Editorial: From policy to pedagogy—Building human-centered AI literacy across educational contexts. Informatics in Education 2025, 24(4), 645–651. [Google Scholar] [CrossRef]
  16. Jing, Y.; Wang, H.; Chen, X.; Wang, C. What factors will affect the effectiveness of using ChatGPT to solve programming problems? A quasi-experimental study. Humanities and Social Sciences Communications 2024, 11(1), 319. [Google Scholar] [CrossRef]
  17. Kaila, E.; Lemström, K. To schedule or not to schedule: The effects of course structure on programming MOOC performance. Informatics in Education 2023, 22(4), 635–650. [Google Scholar] [CrossRef]
  18. Kapur, M. Productive failure. Cognition and Instruction 2008, 26(3), 379–424. [Google Scholar] [CrossRef]
  19. Karnalim, O.; Toba, H.; Peter; Widjaja, J. H.; Kuang, T. M.; Liputra, D. T.; Arisandhy, V. GenAI-assisted data science course to promote GenAI literacy for non-computing students. Informatics in Education 2025, 24(4), 781–802. [Google Scholar] [CrossRef]
  20. Kazemitabaar, M.; Ye, R.; Wang, X.; Henley, A. Z.; Denny, P.; Craig, M.; Grossman, T. How novices use LLM-based code generators to solve programming problems. In Proceedings of the 23rd Koli Calling International Conference on Computing Education Research (Article 6, pp. 1–12); 2023a. [Google Scholar] [CrossRef]
  21. Kazemitabaar, M.; Chow, J.; Ma, C. K. T.; Ericson, B. J.; Weintrop, D.; Grossman, T. Studying the effect of AI code generators on supporting novice learners in introductory programming. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems (Article 455, pp. 1–23); 2023b. [Google Scholar] [CrossRef]
  22. Kazemitabaar, M.; Ye, R.; Wang, X.; Henley, A. Z.; Denny, P.; Craig, M.; Grossman, T. CodeAid: Evaluating a classroom deployment of an LLM-based programming assistant that balances student and educator needs. In Proceedings of the 2024 CHI Conference on Human Factors in Computing Systems (Article 650, pp. 1–20); 2024. [Google Scholar] [CrossRef]
  23. Kölling, M. Principles of educational programming language design. Informatics in Education 2024, 23(4), 823–836. [Google Scholar] [CrossRef]
  24. Lakanen, A.-J.; Isomöttönen, V. CS1: Intrinsic motivation, self-efficacy, and effort. Informatics in Education 2023, 22(4), 651–670. [Google Scholar] [CrossRef]
  25. Lee, D.; Lee, Y. Productive failure-based programming course to develop computational thinking and creative problem-solving skills in a Korean elementary school. Informatics in Education 2024, 23(2), 385–408. [Google Scholar] [CrossRef]
  26. Lee, J. D.; See, K. A. Trust in automation: Designing for appropriate reliance. Human Factors 2004, 46(1), 50–80. [Google Scholar] [CrossRef] [PubMed]
  27. Leinonen, J.; Denny, P.; MacNeil, S.; Sarsa, S.; Bernstein, S.; Kim, J.; Tran, A.; Hellas, A. Comparing code explanations created by students and large language models. In Proceedings of the 2023 Conference on Innovation and Technology in Computer Science Education; 2023; pp. 124–130. [Google Scholar] [CrossRef]
  28. Liffiton, M.; Sheese, B.; Savelka, J.; Denny, P. CodeHelp: Using large language models with guardrails for scalable support in programming classes. In Proceedings of the 23rd Koli Calling International Conference on Computing Education Research (Article 11, pp. 1–12); 2023. [Google Scholar] [CrossRef]
  29. Liu, J.; Li, S. Toward artificial intelligence-human paired programming: A review of the educational applications and research on artificial intelligence code-generation tools. Journal of Educational Computing Research 2024, 62(5), 1165–1195. [Google Scholar] [CrossRef]
  30. Parasuraman, R.; Riley, V. Humans and automation: Use, misuse, disuse, abuse. Human Factors 1997, 39(2), 230–253. [Google Scholar] [CrossRef]
  31. Prather, J.; Reeves, B. N.; Denny, P.; Becker, B. A.; Leinonen, J.; Luxton-Reilly, A.; Powell, G. B.; Finnie-Ansley, J.; Santos, E. A. “It’s weird that it knows what I want”: Usability and interactions with Copilot for novice programmers. ACM Transactions on Computer-Human Interaction 2024, 31, Article 4. [Google Scholar] [CrossRef]
  32. Rocha, H. J. B.; Tedesco, P. C. de A. R.; Costa, E. de B. On the use of feedback in learning computer programming by novices: A systematic literature mapping. Informatics in Education 2023, 22(2), 209–232. [Google Scholar] [CrossRef]
  33. Sbaraglia, M.; Lodi, M.; Martini, S. A necessity-driven ride on the abstraction rollercoaster of CS1 programming. Informatics in Education 2021, 20(4), 641–682. [Google Scholar] [CrossRef]
  34. Stump, G. S.; Kang, S.; Masla, J.; Bosch, C. A.; Abelson, H.; Klopfer, E.; Breazeal, C. Ethical thinking: Integration and measurement in an AI curriculum for middle-high school students. Informatics in Education 2025, 24(4), 815–844. [Google Scholar] [CrossRef]
  35. Sweller, J. Cognitive load during problem solving: Effects on learning. Cognitive Science 1988, 12(2), 257–285. [Google Scholar] [CrossRef] [PubMed]
  36. Sweller, J.; van Merriënboer, J. J. G.; Paas, F. Cognitive architecture and instructional design: 20 years later. Educational Psychology Review 2019, 31(2), 261–292. [Google Scholar] [CrossRef]
  37. Taveter, H.; Lepp, M. Clusters of solvers’ behavior patterns among beginners and non-beginners and their changes during an introductory programming course. Informatics in Education 2025, 24(1), 199–221. [Google Scholar] [CrossRef]
  38. UNESCO. Guidance for generative AI in education and research; UNESCO, 2023; Available online: https://unesdoc.unesco.org/ark:/48223/pf0000386693.
  39. Yilmaz, R.; Yilmaz, F. G. K. The effect of generative artificial intelligence (AI)-based tool use on students’ computational thinking skills, programming self-efficacy and motivation. Computers and Education: Artificial Intelligence 2023, 4, 100147. [Google Scholar] [CrossRef]
  40. Zimmerman, B. J. Becoming a self-regulated learner: An overview. Theory Into Practice 2002, 41(2), 64–70. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Five-phase cognitive-scaffolding framework for GenAI-assisted introductory programming.
Figure 1. Five-phase cognitive-scaffolding framework for GenAI-assisted introductory programming.
Preprints 244203 g001
Table 1. Evidence strands and design implications.
Table 1. Evidence strands and design implications.
Evidence strand Representative sources Design implication
Novice programming and feedback Rocha et al. (2023); Taveter and Lepp (2025) Preserve diagnostic learner actions; tune timing and specificity of help.
Active learning and productive failure Calderon et al. (2024); Lee and Lee (2024) Require an initial attempt and structured consolidation.
Metacognition and self-explanation Çakıroğlu and Er (2020); Chi et al. (1994) Make monitoring, explanation, and confidence visible.
GenAI-assisted programming Denny et al. (2024); Jing et al. (2024); Prather et al. (2024) Separate task completion from learner reasoning; constrain assistance and require verification.
AI literacy and ethics Hsu and Lao (2025); Stump et al. (2025) Teach critical evaluation, disclosure, and accountable use.
Appropriate reliance Lee and See (2004); Parasuraman and Riley (1997) Treat AI output as advice requiring independent evidence.
Table 2. Operational specification of the five phases.
Table 2. Operational specification of the five phases.
Phase Learner action Permitted AI role Primary evidence
1. Attempt Plan, trace, or draft before access None or task clarification only Initial artefact and hypotheses
2. Bounded help Request minimum sufficient support Hint, question, counterexample, explanation Prompt boundary and response
3. Verify Test claims against requirements and independent evidence Suggest checks, not certify itself Tests, traces, rejected advice
4. Explain/calibrate Explain mechanism; record and revise confidence Challenge explanation; ask follow-ups Explanation and calibration record
5. Fade/transfer Solve a related task with reduced support Progressively restricted Delayed unaided transfer
Table 3. Risks and instructional controls.
Table 3. Risks and instructional controls.
Risk Observable warning Control
Cognitive outsourcing No pre-AI plan; cannot explain choices Require an attempt and oral or written explanation.
Automation bias Accepts output after one successful run Require boundary tests and a rejected-or-revised suggestion.
Overload Long conversations and copied alternatives Use hint levels and one decision per request.
False confidence High certainty despite weak evidence Record confidence before and after verification.
Privacy/authorship Sensitive prompts or undisclosed assistance Use approved tools, data rules, and task-level disclosure.
Table 4. Evaluation blueprint.
Table 4. Evaluation blueprint.
Construct Example measure When collected
Immediate performance Requirement-weighted program score End of assisted task
Transfer Unaided structurally related task Delayed session
Explanation Concept and causal-link rubric After verification
Error detection Sensitivity to seeded plausible errors During verification
Calibration Absolute confidence–accuracy difference Before/after checks
Cognitive load Brief validated subjective scale After each phase
Process Versions, prompts, tests, rejected advice Throughout activity
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.