You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8c9bfbf
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+52-3Lines changed: 52 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,6 +268,8 @@ Every key below can be changed in `.klaub.toml` under `[keys]` ([configuration](
268
268
|`2` or `F3`| The structure tree on the left: modules, files and symbols |
269
269
|`3`| The flat list of changed files on the left |
270
270
|`F4`| The code focused (`Enter` on a list gets there too) |
271
+
|`4`| The Decisions window, one technical decision to a screen |
272
+
|`5`| The Flow window: a form that asks the agent for a diagram, and the diagram |
271
273
|`Tab`, `Shift+Tab`| Next and previous mode |
272
274
|`Esc`| Go back (from the code, to the list you came from) |
273
275
@@ -315,6 +317,18 @@ The screen is a list on the left and the code of the selected unit on the right.
315
317
|`M`| Next module |
316
318
|`x`| Clear filters |
317
319
320
+
### Ask the agent about what you are looking at
321
+
322
+
Inside `klaub wrap`, `t` on any screen puts a description of what is on it into the agent's input and takes you to the agent, so you only type the question after `My question:` and press Enter yourself. `Shift+→` brings you back.
323
+
324
+
| On the screen | What the agent receives |
325
+
| --- | --- |
326
+
| The queue, the tree, the file list, the code | The unit (symbol and file), how it changed, its priority and findings, the version and lines on screen, the line your cursor is on, and the `git diff` and `git show` that show the change and the previous file |
327
+
| A decision | The whole card (context, what was decided, why, alternatives, consequences, the question, where in the code) and what you have answered so far. On the summary, every decision with its answer |
328
+
| The Flow window | The diagram's steps in reading order with the selected one marked, and the relations. In the form, the choices made so far |
329
+
330
+
The text tells the agent not to change or run anything before your question. It is one line, cut in the middle if it is long so the end (the question and your answer) always arrives. It is the one text Klaub puts in the agent without asking first, because it is meant to be one key; set `[integration] ask_agent_confirms = true` to be asked each time, with the destination and the text.
331
+
318
332
### Around the agent
319
333
320
334
These work after `klaub wrap`. Press the prefix (`Ctrl+B` by default), release it, then the key.
@@ -331,6 +345,40 @@ These work after `klaub wrap`. Press the prefix (`Ctrl+B` by default), release i
331
345
332
346
An optional mouse mode (`[ui] mouse = true`) adds wheel scrolling and clicks on rows and code lines.
333
347
348
+
### Flow
349
+
350
+
The Flow window draws how the change runs as a diagram: a box for each step and connectors between them, the steps the change touched outlined, the certainty of each step and relation marked. Without a diagram the window is a form, and what you choose there shapes the request:
351
+
352
+
| Choice | Options |
353
+
| --- | --- |
354
+
| Focus | Free text: what the diagram should concentrate on. Empty covers the whole change |
355
+
| Type | Code flow, abstract (components and responsibilities), data flow, sequence of interactions |
356
+
| Level of detail | High level, medium, low level (functions and the branches that decide the path) |
357
+
| Reach | Only what changed, changes and neighbours, end to end (user, frontend, API, storage, outside systems, even other repositories) |
358
+
| Size | About 8, 15 or 30 steps at most |
359
+
| Starts at | Automatic, a user action, an HTTP request, a job or event |
360
+
| Error paths, Outside systems, Mark what changed | Yes or no each |
361
+
362
+
`↑/↓` move between the choices, `←/→` change one, `Enter` on Focus types the focus. `g` puts the request in the agent's input after you confirm; it carries everything the agent needs (the change, your choices, the shape of the file), so nothing has to be installed, and Enter is never pressed for you. When the agent saves `.klaub/flows/<snapshot-id>.json` the diagram appears by itself. In the diagram the arrows follow the connectors, `Enter` opens the code of a changed step, `e` brings the form back to ask for another diagram and `L` reads the file again. `klaub flow prompt` prints the same request with the choices as flags (`--focus`, `--kind`, `--detail`, `--reach`, `--size`, `--start`, `--errors`, `--no-externals`, `--no-mark-changes`).
363
+
364
+
### Decisions
365
+
366
+
The Decisions window asks the agent for the technical decisions of the change, told so that you can decide without knowing the code or what the product does there. If the file does not exist, `g` offers to put the request in the agent's input. The request carries everything the agent needs (the change, what to list, the shape of the file and how to write each field), so nothing has to be installed; you read it there and press Enter yourself. when the agent saves `.klaub/decisions/<snapshot-id>.json`, the window fills in by itself. Klaub does not write the decisions: it validates the file against the snapshot and shows nothing that fails or belongs to another state of the code.
367
+
368
+
One decision fills the screen, with its question always visible at the bottom.
369
+
370
+
| Key | What it does |
371
+
| --- | --- |
372
+
|`→` or `Enter`, `←` or `Backspace`| Next decision, back |
373
+
|`a`, `d`| Approve, reject (the same key again takes it back) |
374
+
|`c`| Comment, with or without a verdict (`Enter` saves, `Ctrl+J` starts a new line) |
375
+
|`j`/`k`, `PgDn`/`PgUp`| Scroll a long card |
376
+
|`End`| Jump to the summary |
377
+
|`f`| From the summary: hand the rejected and commented decisions back to the agent, after you confirm |
378
+
|`g`| Ask the agent for the decisions |
379
+
380
+
After the last card the summary lists every decision with its answer. Rejected decisions and comments can be put in the agent's input (inside `klaub wrap`) or printed with `klaub decisions feedback` to paste anywhere. Your answers are stored in the review file.
381
+
334
382
## Command reference
335
383
336
384
| Command | What it does |
@@ -341,7 +389,8 @@ An optional mouse mode (`[ui] mouse = true`) adds wheel scrolling and clicks on
341
389
|`klaub reviews list\|show\|export`| List stored reviews, print one, export as JSON, Markdown or SARIF |
342
390
|`klaub feedback ID`| Print the feedback of a finished review |
343
391
|`klaub tests list\|run`| List test associations, or run the configured command after confirming |
344
-
|`klaub flow status\|context\|validate\|prompt`| Work with flow diagrams |
392
+
|`klaub flow status\|context\|validate\|prompt`| Work with flow diagrams. `prompt` takes the same choices as the Flow window as flags |
393
+
|`klaub decisions status\|context\|validate\|prompt\|feedback`| Work with the technical decisions: check a file, print the request for the agent, print your answers for the agent |
345
394
|`klaub doctor`| Check Git, the terminal, grammars, the cache, directories and SSH |
346
395
|`klaub crashes list\|show`| Read crash reports saved on this machine. Nothing is ever sent |
347
396
|`klaub completions SHELL`| Print a shell completion script |
@@ -375,15 +424,15 @@ Run `klaub wrap claude` or `klaub wrap codex` in your repository, let the agent
375
424
376
425
### Why does Klaub not use an LLM?
377
426
378
-
A reviewer you cannot explain is hard to trust, and a second model is one more thing to check. Klaub parses your code, matches symbols across versions, builds a call graph and applies fixed rules, so the same change gives the same queue and every score has a reason. The trade is honest: it cannot find a bug that needs understanding what the code is for.
427
+
A reviewer you cannot explain is hard to trust, and a second model is one more thing to check. Klaub parses your code, matches symbols across versions, builds a call graph and applies fixed rules, so the same change gives the same queue and every score has a reason. The trade is honest: it cannot find a bug that needs understanding what the code is for. The one place a model is involved is the Decisions window, and there it is your agent that writes the file, not Klaub: Klaub only validates it and records what you answer.
379
428
380
429
### Does Klaub send my code anywhere?
381
430
382
431
No. Klaub makes no network requests, has no telemetry and needs no account. Comments and reviews are files under `.klaub/` in your repository, and crash reports stay on your machine.
383
432
384
433
### Will Klaub press Enter or submit anything in my agent?
385
434
386
-
Never. Putting text in the agent's input always shows you the destination and the exact text first, and it sends one line as a bracketed paste, so it cannot be read as a submission. You press Enter yourself.
435
+
Never. Putting a request or your answers in the agent's input shows you the destination and the exact text first, and everything is sent as one line in a bracketed paste, so it cannot be read as a submission. The `t` shortcut that adds what you are looking at as context skips that question unless you turn it on, and it works the same way: one line, no Enter. You press Enter yourself.
|`services::decisions`| Domain service | Decisions document validation (the schema is `domain::decisions`), the tally of answers, the request for the agent and the text that hands the rejected and commented decisions back. |
76
77
|`services::review`| Domain service | Comments, anchors and relocation, state machine, follow-up decisions, feedback payload. |
77
78
|`app`| Application | Use cases that orchestrate ports and services into an analysis and a review session. |
78
79
|`adapters::git`| Driven adapter |`SnapshotProvider` and workspace reading through the Git CLI. |
@@ -93,6 +94,7 @@ Ports live in `domain::ports`. Each has an in-memory fake in tests.
Copy file name to clipboardExpand all lines: docs/configuration.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Every key has a default, so an empty file (or none) is valid. The schema lives i
30
30
|`ui.mouse`|`false`| The wheel scrolls, a click on a tab switches to it, a click on a row selects it and a second click opens it. Off by default because capturing the mouse stops the terminal's own text selection until you hold the modifier it offers (usually `Shift`, or `Option` in iTerm2). The mouse only does what a key already does. |
31
31
|`ui.hold_to_peek`|`false`| Hold `B` (the `peek_previous` key) while reading code to see the previous version, and let go to come back. It needs a terminal that reports key releases (the kitty keyboard protocol: kitty, Ghostty, WezTerm, recent iTerm2 and foot). Where that is missing, which includes tmux, the key says so and `v` still toggles. While it is on, the terminal sends keys as escape codes except inside text fields, which keep ordinary input so compose and `AltGr` characters still type. |
32
32
|`integration.submit_mode`|`"manual"`| The only mode. Klaub never presses `Enter` in the agent. |
33
-
|`integration.paste_requires_confirmation`|`true`|Putting text in the agent's input always asks first. |
33
+
|`integration.ask_agent_confirms`|`false`|The `t` shortcut, which puts what is on screen in the agent's input for you to ask about it, does it with one key. `true`asks first, showing the destination and the text. |
34
34
|`integration.tmux_prefix`|`"C-b"`| The prefix of the session chords. Moving between the agent and the reviewer needs no prefix: `Shift+←` goes to the agent and `Shift+→` to the reviewer. The rest are `Prefix+R`, `Prefix+A`, `Prefix+d`, `Prefix+Q` and `Prefix+?`. |
The keys that only mean something inside some modes move the same way. A moved key answers to its new character in the modes it works in, and its old character stops acting there:
51
51
@@ -56,6 +56,13 @@ The keys that only mean something inside some modes move the same way. A moved k
56
56
|`open_file`|`o`| Code |
57
57
|`inspect_contract`|`i`| Code |
58
58
|`toggle_inspector`|`K`| Code |
59
+
|`approve`, `reject`|`a`, `d`| Decisions |
60
+
|`comment`|`c`| Decisions |
61
+
|`send_decisions`|`f`| Decisions |
62
+
|`ask_decisions`|`g`| Decisions |
63
+
|`ask_flow`|`g`| Flow |
64
+
|`edit_flow`|`e`| Flow |
65
+
|`reload_flow`|`L`| Flow |
59
66
60
67
```toml
61
68
[keys]
@@ -113,6 +120,14 @@ The weights of the explainable score. Every key is an integer and the review sho
113
120
114
121
`disabled` is a list of rule ids that are off, the way to silence a rule everywhere.
115
122
123
+
## `[decisions]`
124
+
125
+
| Key | Default | Meaning |
126
+
| --- | --- | --- |
127
+
|`enabled`|`true`| Look for `.klaub/decisions/<snapshot-id>.json`. |
128
+
|`directory`|`".klaub/decisions"`| Relative to the worktree. |
129
+
|`max_file_bytes`|`1048576`| Larger decisions files are rejected. |
130
+
116
131
## `[coverage]`, `[flows]`
117
132
118
133
| Key | Default | Meaning |
@@ -122,4 +137,4 @@ The weights of the explainable score. Every key is an integer and the review sho
122
137
|`flows.enabled`|`true`| Look for `.klaub/flows/<snapshot-id>.json`. |
123
138
|`flows.directory`|`".klaub/flows"`| Relative to the worktree. |
124
139
|`flows.max_file_bytes`|`1048576`| Larger flow files are rejected. |
125
-
|`flows.missing_prompt`|`"confirm"`|`confirm`: a missing diagram offers a request for the agent, prepared only after you confirm. `never`: no offer. |
140
+
|`flows.missing_prompt`|`"confirm"`|`confirm`: the Flow window can put a request for the agent in its input, only after you confirm. `never`: it cannot. |
Copy file name to clipboardExpand all lines: docs/internationalization.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ language = "pt" # "auto" (the default), "en", "pt" or "es"
26
26
| --- | --- |
27
27
| Every screen, hint, prompt and status message of the reader, the command palette and the help | The findings, their evidence and the reasons behind a priority (they come from the analysis rules) |
28
28
| Messages and prompts of `klaub review`, `reviews`, `session`, `tests`, `crashes`, `version`, `wrap` and `doctor`| Everything machine-readable: JSON output (including the `detail` of `klaub doctor --format json`), review documents, Markdown and SARIF exports |
29
-
|`klaub --help` and `klaub <command> --help`| The feedbackand flow requests Klaub pastes into the agent, and the text of errors that come from Git, tmux or the file system |
29
+
|`klaub --help` and `klaub <command> --help`| The feedback, flow and decisions requests Klaub pastes into the agent, and the text of errors that come from Git, tmux or the file system |
30
30
| Yes/no prompts: `s`, `sim` (Portuguese) and `s`, `si`, `sí` (Spanish) are accepted next to `y` and `yes`| clap's own words in the usage line (`[OPTIONS]`, `<COMMAND>`), `[default: ...]` and its parse errors |
31
31
32
32
Keys do not change with the language. The reader's hints name the same keys in every language.
0 commit comments