Перейти к содержимому
Оригинал
Martin Alderson· [email protected] (Martin Alderson)·· 31.08.2026Оценка ИИ62

用让智能体出题测验的方式减少代码库认知债

Оригинальный заголовок: Reducing codebase cognitive debt through... quizzes?

Заголовок и краткое изложение на выбранном языке ожидают перевода.

Краткий обзор ИИ

作者提出用一段提示词让编码智能体就当前代码库出 5 道难度递增的题,答完后由它解释自己理解错的地方,提示词中要求使用 askuserquestiontool。作者认为这种方式比让智能体直接描述代码更有效,因为它掌握了自己所想与代码实际行为的差距;在复杂重构前先让智能体就方案出题,也能提前发现问题,同样的做法还可用于复杂表格或文档集,甚至可以要求通过 PR 测验后才允许智能体创建 PR。

Полный текст

Полный текст на выбранном языке ожидает перевода. Пока показан оригинал.

Like many, when I'm building with coding agents, one of the "worst" problems is the codebase feels like it is often evolving faster than I can keep up with it. This cognitive debt builds up quietly - nothing is broken, but you gradually have this feeling of not being totally on top of what is going on.

One remarkably effective technique I stumbled on is asking the agent to quiz you on the code base. A simple prompt like:

hi, please quiz me about this codebase.

i want 5 questions of increasing difficulty - then explain to me at the end what i got wrong about my understanding. use the askuserquestiontool

Produces a simple quiz you can answer.

Claude Code quizzing the user about the llama.cpp codebase

The best bit is chatting to the agent about the ones you got wrong. It has the context of what you thought versus what the code actually does, so it can explain the gap far better than it could if you'd just asked it to describe that part of the codebase itself.

You can of course use this for non code tasks too, e.g. complex spreadsheets or document sets.

I've had a lot of success with this - if I'm working on a complex refactor with a difficult plan, asking the agent to quiz me about the plan or part of the project in question before starting seems to make me catch issues more than trying to read pages upon pages of Claudish.

I've tended to find my perception of the cognitive debt is (usually!) far more than the reality, and this helps nullify the sinking feeling that the codebase/project is running far ahead of my understanding.

You could go a step further and enforce you passing a quiz about a PR too before you allow the agent to create one.

Sometimes with agents the best options are the simplest.

Источник: Martin Alderson · martinalderson.com