What do you want to change?
Add an --author <name> filter to hunk session comment list so the CLI can return only comments written by one specific author.
Why?
The comment add and comment apply subcommands already let callers tag a comment with --author <name> (or the author field in the stdin JSON for apply), and comment list already supports --file <path> and --type <live|all|ai|agent|user> filters. The one missing dimension is author.
In a typical agent-assisted review a coding agent and a human both leave notes on the same session, and the JSON output of hunk session comment list --json ends up mixed. Right now the only way to pull out one author's notes is to pipe the JSON through jq:
hunk session comment list --json | jq '.[] | select(.author=="pi")'
That works, but it pushes what is conceptually a one-flag filter into every consumer that needs it. A native --author <name> flag mirrors the same ergonomics as --file and --type and keeps --json consumers thin.
How? (optional)
- Add
.option("--author <name>", "filter comments to one author") to the session comment list commander setup, parse it like the other string filters, and forward it through SessionCommentListCommandInput.
- In the daemon/list handler, drop comments whose
author does not match the flag (case-sensitive, exact match — same shape as --type).
- Treat a missing
author field as a separate value: add a companion --no-author (or --author="") flag that returns only comments without an author. Two flags keeps the matcher unambiguous and mirrors how comment clear already uses --include-user / --all.
- Add unit coverage next to
src/core/cli.test.ts for the new flag, plus a daemon-level test that the returned list honors the filter.
- Update
docs/agent-workflows.md (or the equivalent CLI reference) with one example: hunk session comment list --author pi --json.
What do you want to change?
Add an
--author <name>filter tohunk session comment listso the CLI can return only comments written by one specific author.Why?
The
comment addandcomment applysubcommands already let callers tag a comment with--author <name>(or theauthorfield in the stdin JSON forapply), andcomment listalready supports--file <path>and--type <live|all|ai|agent|user>filters. The one missing dimension is author.In a typical agent-assisted review a coding agent and a human both leave notes on the same session, and the JSON output of
hunk session comment list --jsonends up mixed. Right now the only way to pull out one author's notes is to pipe the JSON throughjq:That works, but it pushes what is conceptually a one-flag filter into every consumer that needs it. A native
--author <name>flag mirrors the same ergonomics as--fileand--typeand keeps--jsonconsumers thin.How? (optional)
.option("--author <name>", "filter comments to one author")to thesession comment listcommander setup, parse it like the other string filters, and forward it throughSessionCommentListCommandInput.authordoes not match the flag (case-sensitive, exact match — same shape as--type).authorfield as a separate value: add a companion--no-author(or--author="") flag that returns only comments without anauthor. Two flags keeps the matcher unambiguous and mirrors howcomment clearalready uses--include-user/--all.src/core/cli.test.tsfor the new flag, plus a daemon-level test that the returned list honors the filter.docs/agent-workflows.md(or the equivalent CLI reference) with one example:hunk session comment list --author pi --json.