Establish codebase context for agents
A new engineer on your team keeps getting subtly wrong code from the agent — it invents helper functions that already exist, ignores your Result-type error convention and throws instead, and edits a generated file it should never touch. The agent isn't the problem; the context it's given is. As the senior on the team, what would you put in place so any agent run in this repo starts with the right codebase context — conventions, the interfaces it must use, working examples, and an explicit 'do not touch' list?
find_forbidden_edits(changed_paths: list[str], protected_patterns: list[str]) → list[str][["src/api/user.ts","src/generated/schema.ts","src/generated_helpers.ts"],["src/generated/","*.gen.ts"]]out["src/generated/schema.ts"][["db/migrations/0001_init.sql","vendor/lib/a.js","README.md"],["db/migrations/","vendor/","README.md"]]out["README.md","db/migrations/0001_init.sql","vendor/lib/a.js"]Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.