Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,47 @@ Live text output includes run ID, gate status, decision, outcome, PR, artifacts,
and post counts. JSON output includes `run`, `status`, `decision`, `message`,
`outbox`, `artifacts`, and `fail_on_triggered`.

### `cr respond`

```text
cr respond <PR> [flags]
```

Responds to human replies on `cr`'s own open review-comment threads, closing the
conversational loop on a finding without forcing a full re-review. The PR host
must match the active profile's `git.host`.

`cr respond` lists the pull request's inline review threads and selects the ones
that meet all of:

- the first comment is a `cr` finding (it matches the posting identity and
carries a codereview marker),
- the thread is still open (unresolved), and
- the latest comment is a human reply that `cr` has not already answered.

For each selected thread, a small-tier LLM classifier reads the original finding
plus the full thread and chooses one of `acknowledge_and_resolve` (post a brief
acknowledgement and resolve the thread because the finding is addressed or
conceded), `reply_only` (post a contextual answer and keep the thread open), or
`skip` (take no action). Threads with no new human reply never reach the
classifier, so repeated runs are idempotent without persisted per-thread state.

| Flag | Semantics |
|------|-----------|
| `--dry-run` | Plan thread replies and print the plan without posting. |
| `--no-post` | Alias for `--dry-run`. |
| `--no-resolve-threads` | Post replies but never resolve threads. Also implied by profile `resolve_threads: never`. |
| `--json` | Emit JSON. |

Text output includes the PR, mode, considered/replied/resolved/skipped counts,
and a per-thread breakdown. JSON output includes `pr_url`, `dry_run`, the same
counts, and a `threads` array with each thread's `decision`, `reply`, and
`resolved` state.

The classifier uses the profile's `small` model tier (falling back to `medium`
when `small` is unset, with a warning); a profile with neither configured is
rejected.

### `cr benchmark`

```text
Expand Down
3 changes: 2 additions & 1 deletion cmd/cr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/open-cli-collective/codereview-cli/internal/cmd/datacmd"
"github.com/open-cli-collective/codereview-cli/internal/cmd/exitcode"
"github.com/open-cli-collective/codereview-cli/internal/cmd/mecmd"
"github.com/open-cli-collective/codereview-cli/internal/cmd/respondcmd"
"github.com/open-cli-collective/codereview-cli/internal/cmd/reviewcmd"
"github.com/open-cli-collective/codereview-cli/internal/cmd/root"
"github.com/open-cli-collective/codereview-cli/internal/cmd/sessionscmd"
Expand Down Expand Up @@ -47,6 +48,6 @@ func buildRootCommand(stdin io.Reader, stdout, stderr io.Writer) (*cobra.Command
Stdout: stdout,
Stderr: stderr,
})
root.RegisterAll(cmd, opts, configcmd.Register, credentialcmd.Register, mecmd.Register, agentscmd.Register, reviewcmd.Register, sessionscmd.Register, datacmd.Register, benchmarkcmd.Register)
root.RegisterAll(cmd, opts, configcmd.Register, credentialcmd.Register, mecmd.Register, agentscmd.Register, reviewcmd.Register, respondcmd.Register, sessionscmd.Register, datacmd.Register, benchmarkcmd.Register)
return cmd, opts
}
1 change: 1 addition & 0 deletions cmd/cr/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestRun(t *testing.T) {
{name: "me command wired", args: []string{"me", "--help"}, wantCode: 0, wantStdout: "Resolve and cache", wantStdoutSubstring: true},
{name: "agents command wired", args: []string{"agents", "--help"}, wantCode: 0, wantStdout: "Inspect trusted review agents", wantStdoutSubstring: true},
{name: "review command wired", args: []string{"review", "--help"}, wantCode: 0, wantStdout: "Run an automated pull-request review", wantStdoutSubstring: true},
{name: "respond command wired", args: []string{"respond", "--help"}, wantCode: 0, wantStdout: "Respond to human replies", wantStdoutSubstring: true},
{name: "sessions command wired", args: []string{"sessions", "--help"}, wantCode: 0, wantStdout: "Manage named LLM sessions", wantStdoutSubstring: true},
{name: "data command wired", args: []string{"data", "--help"}, wantCode: 0, wantStdout: "Manage local review data", wantStdoutSubstring: true},
{name: "benchmark command wired", args: []string{"benchmark", "--help"}, wantCode: 0, wantStdout: "Validate, inspect, and run benchmark suites", wantStdoutSubstring: true},
Expand Down
Loading
Loading