HN Debrief

AI Agent Guidelines for CS336 at Stanford

  • AI
  • Education
  • Developer Tools

The linked file is a set of instructions for coding agents used in Stanford's CS336 course. It tells the model to help students learn by explaining concepts, asking questions, and guiding debugging, while avoiding actions that would short-circuit the assignment such as directly producing the full solution or running commands on the student's behalf. People liked the basic posture because it accepts that students will use AI anyway and tries to channel that toward tutoring instead of pretending a ban will hold. The consensus was that this is useful as a norm-setting layer, especially when shipped as AGENTS.md or CLAUDE.md inside the assignment repo so tools pick it up automatically.

If you run training, onboarding, or education programs, treat agent guidelines as a behavioral default, not enforcement. Pair them with product hooks, audit trails, and assessments that reveal whether someone can actually explain and reproduce the work.

Discussion mood

Cautiously positive. People liked that the course is trying to guide AI use instead of banning it, but most were skeptical that a markdown file can enforce anything and argued that real accountability has to come from assessment design and tool-level controls.

Key insights

  1. 01

    Hooks beat long prompt files

    Tooling, not prose, is what keeps agent behavior on the rails. People using Claude Code said long instruction files get forgotten mid-session, and that if you need history capture, guardrails, or repeated behavior, hook scripts and environment constraints work far better than ever-longer system prompts. One person running a warehouse agent said the effective system prompt is about 100 tokens because the real alignment lives in the task and the available tools.

    If you need repeatable behavior from an agent in production or training, move requirements into the harness. Keep instruction files short and let the environment enforce logging, permissions, and workflow.

      Attribution:
    • wrs #1
    • allthetime #1
    • bob1029 #1
  2. 02

    Assessment has to expose understanding

    The practical answer is not to perfect the prompt but to make students demonstrate they can explain and reproduce the work. Oral exams, code walkthroughs, and heavily weighted in-person tests came up as the only credible way to separate real learning from polished AI-assisted output. That also matches how students behave. When there is an exam, they study differently.

    If you are teaching or certifying skill, add at least one assessment mode where the candidate has to reason live. Submitted artifacts alone are no longer enough evidence of competence.

      Attribution:
    • j_french #1
    • asdff #1
    • joshmayer #1
  3. 03

    AI tutoring can create fake studying

    A physics professor reported that help-session attendance collapsed and weaker students performed noticeably worse, even while stronger students stayed roughly fine. The argument was that chatty AI help can feel like productive practice while actually turning students into observers. Clear explanations are not the same as memory or transfer, and some friction is part of learning.

    Watch for passive consumption dressed up as tutoring in your own training programs. If learners are using AI heavily, require them to produce intermediate reasoning, predictions, or self-explanations before getting the next hint.

      Attribution:
    • MengerSponge #1 #2
  4. 04

    Repo files are useful as defaults

    Even skeptics admitted the delivery mechanism is smart. Putting AGENTS.md or CLAUDE.md inside the assignment repo means many coding agents will ingest the guidance automatically, so students do not need to remember to paste a policy into each session. Teams are already working around tool fragmentation with symlinks or by including one file from the other.

    If you want agent instructions to actually get seen, ship them with the codebase. Standardize one source of truth and mirror it across tool-specific filenames until clients converge.

      Attribution:
    • abahgat #1
    • israrkhan #1
    • cpeterso #1
  5. 05

    Learning mode already works for some users

    People were not just debating policy in the abstract. Several described using Claude Code's Learning mode or custom coaching variants to learn Django or Elixir by getting nudges, pseudo-code, and review feedback instead of full implementations. That makes the Stanford file look less like wishful thinking and more like a formalized version of a workflow some users already find effective.

    For onboarding and upskilling, consider a tutoring-style output mode before banning code generation outright. It can preserve momentum while still forcing the learner to write the final implementation.

      Attribution:
    • FistfulOfHaws #1
    • bcherny #1
    • lucamark #1

Against the grain

  1. 01

    Code generation is not a new educational threat

    The comparison to Charles Petzold's 'Does Visual Studio Rot The Mind?' pushed back on treating LLMs as a wholly new category. IDE scaffolding, parser generators, compilers, and codegen have all raised the same anxiety about abstraction eroding understanding. That framing does not make current concerns wrong, but it does suggest the harder problem is deciding which abstractions students should master before relying on the next layer up.

    Avoid making policy as if AI codegen is unprecedented. Define the specific lower-level skills students must still demonstrate, then allow higher-level tools around those boundaries.

      Attribution:
    • danielrmay #1
    • harrisi #1
  2. 02

    Let students use full AI power

    A minority view said the right move is to stop handicapping the tools and put all responsibility for learning outcomes on assessment. In that framing, universities should let students generate answers and code freely, because the workplace will, and because some students genuinely can learn by reverse-engineering a good answer once they have it. Research-university culture, in this view, should expect that independence rather than constrain it.

    If you adopt an open-AI policy, raise the bar on evaluation immediately. Assume the submission may be heavily machine-assisted and test whether the person can extend, debug, and defend it under pressure.

      Attribution:
    • baddash #1 #2
    • jltsiren #1

In plain english

AGENTS.md
A project file some teams use to give AI coding agents instructions about architecture, conventions, or workflow.
Claude Code
Anthropic’s coding agent product and command-line workflow for using Claude models on software tasks.
CLAUDE.md
Anthropic’s repository-specific instruction file for Claude Code, similar in purpose to AGENTS.md.
harness
The software layer around a model that handles prompts, tool calls, context management, retries, and other agent workflow behavior.
system prompt
The hidden top-level instruction given to an AI model that defines its role and rules.

Reference links

Referenced source material

Education and AI commentary

Tooling and ecosystem references

Related Hacker News discussion