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
Copy file name to clipboardExpand all lines: README.md
+35-8Lines changed: 35 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ Each example includes the exact command to run from the repository root.
109
109
110
110
## Config
111
111
112
-
Hunk reads config from:
112
+
You can persist preferences to a config file:
113
113
114
114
-`~/.config/hunk/config.toml`
115
115
-`.hunk/config.toml`
@@ -124,15 +124,35 @@ wrap_lines = false
124
124
agent_notes = false
125
125
```
126
126
127
-
## Live sessions and agent workflows
127
+
## Working with Agents
128
128
129
-
Hunk can load inline rationale from a sidecar and lets you steer a live review window from another terminal or agent process.
129
+
Hunk supports two agent workflows:
130
130
131
-
-`hunk diff --agent-context <file>` or `hunk patch --agent-context <file>` shows inline agent rationale beside the diff
132
-
-`hunk session ...` inspects, navigates, reloads, and annotates a running Hunk session
133
-
-`skills/hunk-review/SKILL.md` helps coding agents steer a live Hunk review and write inline Hunk annotations
131
+
- steer a live Hunk window from another terminal with `hunk session ...` (recommended)
132
+
- load agent comments from a file with `--agent-context`
134
133
135
-
Normal Hunk sessions start and register with the local loopback session daemon automatically. In most cases, use `hunk session ...` and ignore `hunk mcp serve`.
134
+
### Steer a live Hunk window
135
+
136
+
Use the Hunk review skill: [`skills/hunk-review/SKILL.md`](skills/hunk-review/SKILL.md).
137
+
138
+
A good generic prompt is:
139
+
140
+
- "Load the Hunk skill and use it for this review."
141
+
142
+
That skill teaches the agent how to inspect a live Hunk session, navigate it, reload it, and leave inline comments.
143
+
144
+
### How remote control works
145
+
146
+
When a Hunk TUI starts, it registers with a local loopback daemon. `hunk session ...` talks to that daemon to find the right live window and control it.
147
+
148
+
Use it to:
149
+
150
+
- inspect the current review context
151
+
- jump to a file, hunk, or line
152
+
- reload the current window with a different `diff` or `show` command
153
+
- add, list, and remove inline comments
154
+
155
+
Most users only need `hunk session ...`. Use `hunk mcp serve` only for manual startup or debugging of the local daemon.
`hunk session reload ... -- <hunk command>` swaps what a live session is showing without opening a new TUI window.
150
170
151
-
Use `hunk mcp serve` only for manual startup or debugging of the local session daemon.
171
+
### Load agent comments from a file
172
+
173
+
Use `--agent-context` to attach agent-written comments or rationale from a JSON sidecar file. For a compact real example, see [`examples/3-agent-review-demo/agent-context.json`](examples/3-agent-review-demo/agent-context.json).
0 commit comments