HackyJS CoursesMerge Gates: Hardening a GitHub Org for AI-Written Code

// module 07 · AI agents on developer machines

Instruction files are advice; Cursor and other agents

`CLAUDE.md`, `AGENTS.md`, `.cursor/rules` and `.github/copilot-instructions.md` tell an agent how to behave. They are worth writing, and they are not controls: the model can ignore them, the developer can switch them off, anyone with write access can edit them, and prompt injection competes with them for the model's attention. We show all of that with one fake `.env` and three runs, then give you a short org template. The second half compares what an org can centrally enforce on Cursor, GitHub Copilot and OpenAI Codex, using only what each vendor's docs say, and ends where every agent ends: the server side.

  • Lesson 26 of 34

Learning Objectives

  • Explain four reasons an instruction file is not an enforced control
  • Write a short security section for `CLAUDE.md` / `AGENTS.md` that supports the controls you enforce elsewhere
  • Deploy organization-wide instructions to Claude Code machines and say what they can't do
  • Compare the central controls Claude Code, Cursor, GitHub Copilot and Codex document for policy delivery, sandbox, commands, secrets, MCP and hooks
  • Name the server-side controls that hold regardless of which agent wrote the change

This lesson is for enrolled learners

Log in, then enroll to read the full lesson, run its lab and take the quiz.