Notes - xsyetopz/claudetto GitHub Wiki
This page tells how the notes slice of the core plugin claudetto works.
A user reads it to learn what a note above the prompt means and how to use its keys.
A contributor reads it before an edit of slices/notes/.
The slice makes no model call, so a note adds no request and no token to a turn.
A note is one line above the prompt, such as Repeated deny · Bash(rm:*) stopped 3 calls.
It stays for 2 prompts.
Only one note shows at a time, and a newer note replaces the older one.
- The same permission deny or ask three times in one session. The note names the rule and the settings file that holds it.
- The same check command fails three times in a row with the same failing test. The note names the test and the count.
- A
learn:block at the end of a main reply. The reply gives alearn:line, atag:line, and anexplain:block. The slice hides the block in the reply and shows<tag> · <line>.learn: noneshows nothing. - The
Stophook of Finish, for a reply that defers work or says done with no proof.
| Key | What it does |
|---|---|
1 |
Puts "Here is a note offered by a side agent:" and the note with its explanation into the prompt box. |
2 |
Turns notes off. |
3 |
Shows when notes are off, and turns them on again. |
The keys work while the band above the prompt has the focus, and 1 also works in an empty prompt box.
When you type past n notes in a row, the slice skips the next 2^(n-3) notes for n of 3 or more, up to SKIP_MAX (16).
A note whose line matches one of the last RECENT_MAX (50) lines shows nothing.
Using the insert key ends the run of ignored notes.
- A background task in flight for 30 minutes (
BACKGROUND_MS). The API gives no start time and no output time of a task. So at eachStopthe slice records the first time that it saw each ID ofbackground_tasks, drops the IDs that are gone, and tells once per task. The rule counts the time in flight alone, and a task that prints output still gets the note. - A user edit in a file that the agent edits next. At an allowed
EditorWrite, the slice runsgit statusfor the file. When it shows a change and no line of the edit ledger ofhygieneholds the hash of the file now, the note says that Claude did not make the change.
| Hook | Filter | What it does |
|---|---|---|
tool.check |
Bash, Edit, Glob, Grep, Read, WebFetch, Write
|
Counts denies and asks by rule, and checks an Edit or Write for a change of the user. |
classic.Stop |
hook_event_name: "Stop" |
Records the background tasks and tells of one in flight for 30 minutes. |
classic.PostToolUseFailure |
Bash |
Counts a failing check command. |
classic.PostToolUse |
Bash |
A passed check ends its streak. |
turn.step |
turnId (each step) |
Removes the learn: block from the shown and stored text of a main reply, and reads its note. |
turn.complete |
None | Takes the note of finish. |
turn.start |
None | Ages the shown note at each typed prompt of the main loop. |
ui.render |
AbovePrompt |
Draws the note and its keys. |
ui.render |
AssistantMessage |
Hides the learn: block. |