A clear AI policy for programming assignments tells students which tools they may use, what help is allowed, and how to disclose it.

The most useful policies also explain how instructors will evaluate concerns fairly, since a detector score alone cannot prove who wrote code.

Start with learning goals

Before naming tools or restrictions, identify what each assignment is meant to teach.

If students are practicing syntax, debugging, or algorithm design, unrestricted AI-generated solutions may bypass the intended work.

If the goal is to evaluate system design or code review, using an assistant for routine syntax questions may be compatible with the assignment.

Different courses, projects, and stages of a course may have different goals.

A single blanket rule can be easy to state but hard to apply.

Instead, decide what students need to demonstrate and connect each AI-use rule to that learning objective.

For every assignment, ask:

  • Which skills must students demonstrate independently?
  • What forms of help are already allowed, such as documentation, tutoring, or collaboration?
  • Would AI assistance change the evidence an instructor needs to assess learning?
  • Could a limited, disclosed use of AI support the learning goal?

Define allowed, restricted, and prohibited uses

Students need examples, not just a phrase like “use AI responsibly.” Describe specific activities and assign each one a status.

For example, an instructor might allow asking an AI tool to explain an error message, restrict generating code that will be submitted, and prohibit entering confidential data into an external service.

The appropriate boundaries depend on the assignment, course rules, and institutional requirements.

Consider addressing common programming tasks individually:

  • Concept explanations: May students ask for an explanation of a programming concept or API?
  • Debugging: May they share an error message or code excerpt for troubleshooting?
  • Code generation: May AI produce snippets, tests, functions, or a complete solution?
  • Code transformation: May students ask for refactoring, translation, or optimization?
  • Review and feedback: May a tool critique code, suggest edge cases, or identify possible bugs?
  • Documentation and comments: Are AI-written explanations allowed, and must students verify them?

Clarify whether rules differ by assignment phase.

An instructor might allow AI-generated test cases while prohibiting generated implementation code, or permit brainstorming but require students to write and explain the final solution independently.

Explain how these examples apply to comparable cases.

Explain disclosure and record keeping

When AI assistance is permitted, specify how students should report it.

A short statement can name the tool, describe the task it helped with, and identify which suggestions the student used or changed.

If students must retain prompts, outputs, or earlier versions of their code, say so before the work begins and explain how to submit those records.

Keep the requirement proportional to the assignment.

A brief disclosure field may be sufficient for limited assistance; a substantial AI-supported project may warrant an appendix or process log.

The policy should make clear that disclosure is not, by itself, evidence of wrongdoing.

Its purpose is to make the student’s process visible and support accurate assessment.

Distinguish AI detection from code similarity

AI authorship classification and source-code similarity analysis address different questions.

An AI detector estimates whether text or code resembles material associated with AI-generated output.

A similarity or plagiarism tool compares code with other submitted, published, or indexed code.

Similarity can identify overlap that deserves review, but it does not establish why the overlap occurred; common examples, starter files, libraries, and collaboration can all matter.

Detection results should be treated as limited signals, not proof of authorship or misconduct.

A score cannot establish that a particular student used AI, and a low score cannot establish that they did not.

Turnitin has stated that its AI writing model does not reliably detect code.

Its AI writing report should not be confused with source-code similarity checking.

If an institution or instructor considers a source-code detection product, describe its role accurately and avoid promising certainty.

Codespy is an external source-code detector; mentioning it does not imply that a particular course has evaluated, adopted, or endorsed it.

Any result should be considered alongside the assignment requirements and other relevant evidence.

Set a fair process for concerns

Include a consistent process for reviewing possible violations.

Explain what may prompt a conversation, what evidence may be considered, and how a student can describe their work.

Relevant evidence might include version history, drafts, test results, explanations of design choices, or the student’s account of their workflow.

No single item should automatically determine the outcome.

Give students an opportunity to respond before decisions are made, and follow the institution’s academic integrity procedures.

Avoid treating unusual coding style, a detector score, or a student’s inability to explain one detail as standalone proof.

Policies vary by institution, so instructors should align course rules with applicable academic integrity, privacy, accessibility, and data-handling requirements.

Make the policy easy to apply

Place the policy where students will see it before beginning the assignment, such as the course syllabus and the assignment page.

Use plain language, define what counts as AI assistance, and include a compact table or checklist when multiple rules apply.

Revisit the guidance when tools or course expectations change, while avoiding retroactive changes to work already underway.

A useful assignment-specific policy can follow this template:

  • Learning goal: State the skill the assignment assesses.
  • Permitted assistance: List the AI-supported activities students may use.
  • Limits: Identify restricted or prohibited activities with concrete examples.
  • Disclosure: Tell students what to report and where to report it.
  • Review process: Explain how concerns will be examined and how students may respond.

Test the wording against realistic scenarios before sharing it: a student asks for help interpreting a compiler error, generates a test suite, or submits a function suggested by a chatbot.

If students or teaching assistants cannot tell how the rule applies, revise the examples.

Clear expectations let students focus on learning while giving instructors a more consistent basis for assessment.