Skip to content

How a turn works

  1. You send a message. The prompt hook adds the classification instruction and the next free code numbers to the model’s context. When your message answers a question, the hook records the answer, and it names the questions still open. A question that has gone the question recheck count of your messages unanswered goes on its own Recheck line with its date and title, so the model checks it is still worth asking. At the standard or autonomous autonomy level, it adds one line naming the level. At the sketch or rich richness level, it adds one line naming that level, and attaches the sketch rules from styles/richness/sketches.md when the session has not had them, after a compaction, and when the level returns from text. With the Claude Motion option off, it adds one line at every richness level saying no reply uses Motion. When the model changes to one that takes a different note, or after a compaction, the hook also adds a short note for that model, from a note for its version when one exists and otherwise for its family. After a compaction, it also lists each owed item the ledger still has open, the oldest 12, with its body, a question’s options and recommendation, and a preview of a step’s command block, each on one line and shortened to 200 characters, and a note that kref --json prints a step’s stored block unchanged, so the resumed turn does not depend on the summary’s account of what was owed.
  2. The model classifies your message and runs katharsis-exchange-style.sh <type>. The script prints the guidance file for that type.
  3. The model writes the reply that the guidance file describes.
  4. The Stop hooks run:
    • The first records a turn that skipped the classification step.
    • The second writes each coded item to the ledger.
    • The third checks that the reply opens with its finding.
    • The fourth checks the reply’s claims against the session’s tool results, and shows one Katharsis check: line for each claim they contradict.

The autonomy level sets which actions the model takes without asking you first. Open /config, search for autonomy, and pick a value on the Autonomy level row. The setting’s key is katharsis.autonomy.

Level What changes
guided (default) Nothing. The style’s “When a call is mine” test applies as written, so a push, a PR, or a message to a colleague is your call.
standard Further publishing inside a scope you approved this session goes ahead, such as another push to a branch you approved pushing, or an update to a PR you approved opening, by adding commits. Starting something new that publishes, such as opening a new PR, and messaging people, including a comment, a review reply, or a review request on a PR, stay your call.
autonomous Everything standard allows, and also pushing a branch the work created and opening or updating a PR from it by adding commits go ahead once the work is verified, by the repo’s own checks where it has them. A push to the default branch or to someone else’s branch, and opening or updating a PR against a repo you can’t push to, such as a third-party project reached through a fork, including a push to the branch that PR is from, are not among these additions. Every other action that is your call at guided stays your call, such as merging, deleting data the model did not create this session, force-pushing shared history, spending money, and messaging people, including a comment, a review reply, or a review request on a PR.

“Your call” means the model asks first unless it can infer your answer from what you said, the repo’s conventions, or preferences you stated earlier. Deleting data it did not create this session and force-pushing shared history wait for your own words at every level, and no level’s additions include a force-push, even to a branch the work created.

At standard or autonomous, the prompt hook (hooks/register.ts) adds one line to each turn’s context naming the level, and the style’s “Autonomy level” section says what the level moves. At guided, the hook adds nothing. At every level, the model checks the repo’s conventions before asking. Beyond what the level itself lets go ahead, neither standard nor autonomous widens a permission you gave for a named action past the actions and repos it names. Your own instruction files and the repo’s win where they disagree with what standard or autonomous lets go ahead.

At guided, the drawer suggests standard once your answers show you usually take the model’s recommendation.

The richness level caps which sketches a reply may carry when its content has a shape. Open /config, search for richness, and pick a value on the Richness level row. The setting’s key is katharsis.richness.

Level What changes
text (default) Nothing: the style carries no sketch rules, and the prompt hook adds nothing to the turn’s context for this option.
sketch A reply whose point is a shape that a numbered list or a table cannot show can carry an inline text sketch of at most 12 lines in all: a call tree that branches, a directory tree with depth, pseudocode with conditions or loops, or a diff sketch of an existing structure. A sketch is plain text that reads without a renderer, and its lines sit outside the type’s word ceiling. A sketch your message asks for is drawn even when a list or a table could carry the shape.
rich Everything sketch allows, and a shape too dense for 12 lines is rendered as a diagram instead of cut: scripts/katharsis-artifact.sh draws it with D2 (with the TALA layout when D2 lists it) or the Mermaid CLI, writes an HTML page under ~/.claude/katharsis-data/pages/, and opens it. The reply carries the diagram’s takeaway and the page’s path. With neither renderer installed, or when a render fails, the reply draws the inline sketch. A change over time that none of those forms can show, such as a TUI flow, or an animation you ask for, becomes a short local video when vhs or ffmpeg is on your PATH or setup has created the Katharsis Remotion project: scripts/katharsis-artifact.sh path reserves an empty file under ~/.claude/katharsis-data/pages/, the model writes a vhs tape beside it or a Remotion composition inside that project, never in your working directory, and runs the tool with its output at that file as an ordinary Bash command with its own permission prompt, after the file write that shows a tape’s commands or a composition’s code, and the script’s open opens the video. With no video tool, or when the tool fails, the reply uses a Claude Motion animation when the session offers Motion and the Claude Motion option is on, and otherwise the diagram or the sketch.

At sketch and rich, the content decides whether a sketch appears: a reply whose point has no shape carries none, a shape that a numbered list or a table carries gets that list or table, the answer line stays prose, and a sketch never repeats a fact the prose states. At sketch or rich, the prompt hook (hooks/register.ts) adds one line to each turn’s context naming the level. It also attaches the sketch rules in styles/richness/sketches.md on the first turn at either level, again after a compaction, whose summary drops them, and again when the level returns from text. At text, the hook adds nothing for this option, and neither output style carries sketch rules at any level beyond the question-round section’s pointer to styles/richness/sketches.md for a question page.

A question page goes out only when your message asks for one, at any level. scripts/katharsis-artifact.sh ask puts the body the model wrote for the round into the page shell under ~/.claude/katharsis-data/pages/ and opens it. The page has a tab per question, options you pick by clicking or with Enter or Space, links from an option to each question its pick affects, and a Copy answers button that copies your picks one per line, as the drawer’s send posts them. The page covers the latest open round. A reply that asks the round still carries it in full, and a page for a round an earlier reply asked comes with one line naming the page and no restated questions. The question-round section of both output styles names that trigger and has the model read styles/richness/sketches.md itself when the sketch rules are not in the session’s context; that file’s paragraphs on question pages apply at every level. ask refuses a body that holds a script, an inline event handler, a <style>, <link>, <meta>, or <base> element, or a reference to a remote resource, a link off this machine included, and writes nothing then; a reply that asks the round carries it without a page. The page’s Content-Security-Policy loads scripts and stylesheets only from local files and images only from data: URLs, so a remote reference the refusals miss still loads nothing over the network. A link you follow still leaves the page, as any link does.

At the rich richness level, when the session offers a Motion artifact type, a reply can animate a change over time with Claude Motion: one that prose, a numbered list, a table, a sketch, or a rendered diagram cannot show, such as a TUI flow, or an animation you ask for, when no local video carries it. A local video comes first, because it costs no plan usage and stays on your machine. Each animation publishes a private artifact and counts against your plan usage. The option is on by default: open /config, search for motion, and turn off the Claude Motion row to keep Motion out of Katharsis replies. The setting’s key is katharsis.motion. With the option off, the prompt hook (hooks/register.ts) adds one line to each turn’s context, at every richness level, saying no reply uses Motion, even one you ask for, and that a reply declining an animation says the option is off. With the option on, the hook adds nothing, and with no Motion type offered, rich behaves as it does without the option.

An open question that has gone 5 of your messages without an answer is checked against the current state. Open /config, search for recheck, and set the Question recheck row to another count. The setting’s key is katharsis.recheck, and the smallest value is 1. Each message you type adds a line to .typed-<session> in ~/.claude/katharsis-data/ with the time and the highest question number on record, and the prompt hook (hooks/register.ts) counts the messages typed after the reply that asked each open question, across a handoff chain too, so the message that led to a question never counts toward its age. A question under the count stays on the turn’s Open questions: line, which names only codes. A question at or past it goes on its own line, such as Recheck Q44 (asked 2026-10-23, 12 typed turns ago): "release 0.10.2 now or wait", with a line asking the model to check it. Turns the hook stamps itself, such as a task notification, do not count. A session that started before this option counts only the messages typed since.

The model then checks each one against the current state this turn and closes a question the work settled in a V line naming that check and what it found, or an AT line for work this turn, dismisses one no longer worth settling in an X line with the reason, dismisses one whose options are out of date and asks it again under a new number, and leaves a still-valid one unmentioned. The first message of a session resumed from a /punt file puts every open question on a Recheck line, whatever its age. A message such as “review open questions” asks for the same check, and the style, not the hook, reads that request: the model takes the open codes from the hook’s lines and each question’s date and title from kref --chrono Q. After a check you asked for, the reply’s answer line names by code the questions that stay open. A message that turns the check down, such as “don’t review the open questions yet”, is no request. The first turn after a compaction asks for the same check over every open question, naming each by code even past the owed list’s 12 items.

The fourth Stop hook compares what the reply says with what the tools showed, and never holds the reply for it:

  • Tests, a build, plugin validation, a linter, or CI said to pass when the last run failed, ran before a later code edit, or never ran. A command counts as a run only where it is the command, so rg pytest is not a test run. When no command the hook knows ran but some command’s output reads like a check’s result, the hook says nothing. A failed command with several steps counts against a check only when the check’s output shows a failure or the check is the last step. When two different commands for the same check ended differently, only a claim about all of them, such as “the tests pass”, is judged.
  • A ticked checklist line in a PR body or commit, which counts as the same claim unless the line shows the check failing. A line in the file --body-file or git commit -F names is read only when that file has not changed since the call returned, and --replay reads no such file.
  • A change the reply itself says it verified with nothing run after the last edit.
  • A count whose only source is grep -I, grep -c, or rg without -uu, which skip files or count lines instead of matches. An exact count that printed the same number clears it, and a line count is not flagged when you asked for lines.
  • A count of one literal word that grep -r or rg took under a folder and piped to wc -l, which the hook first recounts in every file under that folder, binary and hidden ones included. When its number differs and the files grep or rg skipped hold the whole difference, the notice names those files. When its number matches the reply’s, skipped files are not reported. Otherwise, and at a symlink or special file, or past 5,000 files, 32 MiB, or 3 seconds, you get only the line above. --replay never recounts.

A PreToolUse and PostToolUse hook on Bash watches calls that replace a file no earlier call in the session named, and runs without the hooks module. Before the call it copies the file, a regular file up to 256 KiB found through any symlinks in its path, unless the same command first moves or copies that file elsewhere. When lines of the old content are gone afterward, it saves the earlier copy under clobbered/<session>/, readable only by you, shows you one line with the cp command that restores it, and tells the model the same. A file the call left larger than 1 MiB is not compared. Once clobbered/ holds 64 MiB, it saves no new copy and says so. Each finding is appended to detections/<session>.jsonl, readable only by you. The record of a replaced file counts the lost lines and names the saved copy.

A Stop hook can hold a reply once and ask for the missing lines. It never asks for a rewrite.

Problem The hook asks for
A code’s claim changed with no erratum A line saying the code stands as on file, the corrected line with an E line, or the new item under a fresh code
The reply opens by describing what it’s about to do The finding on its own line
A Bash call replaced a file the session never read, the first reply after it doesn’t say so, and the file hasn’t been restored One line naming the loss and the saved copy

Each hook exits 0 when it can’t do its job, so a failing hook costs a ledger row, not a turn.