teach-back
Make sure you understand the code your agent writes.
Your agent writes code faster than you can read it. You ship it, it works, and three weeks later it breaks and nobody knows how it works. Developers call this comprehension debt.
Teach-Back pays it down. It keeps track of every file the agent writes or patches. When you're ready, it quizzes you on that code: three short questions about what the new code actually does. Your own model writes the questions from the real change and grades your answers. When you miss one, it explains the right answer.
/teachback
Teach-Back: 3 questions on the 9 lines the agent wrote in upload.py.
Question 1 of 3 (upload.py): What happens on the third failed upload?
Answer with /teachback <your answer>, or /teachback skip.
/teachback it stops and raises the IOError
✅ Correct. Line 9 re-raises the error when attempt == 2, so the caller sees it.
Question 2 of 3 (upload.py): How long does it wait between attempts?
...
2.5/3: you understand this change. 9 lines marked as understood.
Lines the agent wrote: 1,240. Quizzed: 900. Understood: 860 (69% of everything it wrote).
Use it
/teachback start a quiz on what the agent wrote since your last one
/teachback <answer> answer the current question
/teachback skip see the answer and move on
/teachback stop end the quiz; the change waits for your next one
/teachback score lines the agent wrote, how many you were quizzed on, how many you understood
hermes teachback your score from the shell
What the questions are about
The questions ask about behaviour, not trivia: "what happens when…", "why does…", "what would break if…". There are no questions about variable names or line numbers. The last question is always about an edge case or a failure path, because that's where agent-written code tends to surprise you.
Answers are graded correct, partly or wrong:
- Correct gets 1 point, partly gets ½, and wrong or skipped gets 0.
- At least two thirds of the points marks the change as understood.
How it works
- It records as the agent works. A
post_tool_callhook stores each successfulwrite_file(the content) andpatch(the old and new text). Apre_llm_callhook stores your latest request, so the questions know what the code was for. Failed calls and other tools are ignored. - It writes the quiz when you ask.
/teachbacksends the change set to your active model through Hermes's own plugin model access (ctx.llm), with up to 12,000 characters shared fairly between files. That's one call to write the questions, then one short call per answer to grade it. - Changes are kept per session until they've been quizzed. Tiny changes (under 3 lines) aren't worth a quiz.
What it touches
- Model calls: one to write each quiz and one per answer, through
ctx.llmwith your configured provider. They cost what your provider charges. Teach-Back never sees your credentials. - What the model receives: the code the agent wrote, plus the first 500 characters of your request.
- Stores locally: the pending changes, your recent requests and your score, in
<hermes home>/plugin-data/teach-back/teach-back.json. - No network of its own, no telemetry, no dependencies.
To start over, delete teach-back.json.
Settings
plugins:
entries:
teach-back:
settings:
questions: 3 # 1 to 5 per quiz
min_lines: 3 # smallest change worth a quiz
max_change_chars: 12000 # how much of the change the model sees
timeout: 120 # seconds per model call
Limits
- It only knows
write_fileandpatch. Code the agent writes with shell commands isn't tracked. - The questions are only as good as your model. A small or slow model writes weaker questions.
- A quiz in progress lives in memory, so restarting Hermes mid-quiz ends it.
Development
pytest tests
20 tests cover recording writes and patches, the full quiz flow, grading and scoring, skip and stop, model failures, session separation, the score and the CLI.
License
MIT
README from the reviewed commit ef4c651; it updates when the author re-pins.

salch-cred


