Skip to content
Merged
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
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ The repository is `herdr-review`. The plugin ID retains the legacy
`quantick.hunk-review` name so existing installations and keybindings keep
working. The runtime no longer invokes or requires Hunk.

## Agent-assisted setup

**Recommended:** let a coding agent inspect the machine, install or link the
plugin, preserve the existing Herdr configuration, add non-conflicting
shortcuts, and validate the result.

Paste this prompt into Codex, Claude, or another agent with terminal access:

```text
Set up Herdr Native Review on this machine.

Read and follow this guide first:
https://raw.githubusercontent.com/quantk/herdr-review/main/agent-guide.md

Inspect the existing environment, installed Herdr plugins, and Herdr config
before making changes. Preserve unrelated settings, avoid duplicate plugin
installations and keybindings, validate the final config, reload it, and report
exactly what changed.
```

The guide requires the setup agent to ask before installing OS-level
dependencies or replacing conflicting keys or plugin installations. It also
prevents the agent from opening a test review or inserting test text into an
agent that is already running.

Prefer to perform each step manually? Continue with the requirements and
installation below.

## Features

- Switches between working-tree, branch, and last-observed-agent-turn diffs.
Expand Down
25 changes: 23 additions & 2 deletions agent-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ herdr --version
bun --version
node --version
git --version
herdr plugin list --json
```

Requirements:
Expand All @@ -39,9 +40,14 @@ If a prerequisite is missing or incompatible, stop and explain exactly what is
needed. Do not install or upgrade it through an OS package manager without
approval.

Record any existing entry whose plugin ID is `quantick.hunk-review`, including
its version, enabled state, and local or GitHub source. Read
`~/.config/herdr/config.toml` when it exists and locate every assignment for
`f6` and `f7` before changing either the plugin or its shortcuts.

## 2. Install

For GitHub:
If `quantick.hunk-review` is not installed, install it from GitHub:

```sh
herdr plugin install quantk/herdr-review
Expand All @@ -51,7 +57,7 @@ Herdr runs the reviewed manifest build command (`npm ci --omit=dev`) before it
registers the plugin. Do not register a checkout whose dependency install
failed.

For a local checkout:
For a new local checkout:

```sh
cd "/absolute/path/to/herdr-review"
Expand All @@ -62,6 +68,21 @@ herdr plugin link "$PWD" --enabled
Resolve the checkout path; never invent it. `plugin link` does not run build
commands, so install dependencies first.

If the plugin is already installed, do not install or link a second copy.
Compare its source and version with the current repository manifest. Enable an
otherwise current disabled installation with:

```sh
herdr plugin enable quantick.hunk-review
```

The supported Herdr CLI has no separate `plugin update` command. Replacing an
older GitHub installation or switching between GitHub and local sources may
require `plugin uninstall` or `plugin unlink`, which can affect existing plugin
state. Explain the detected situation and get the user's approval before
replacing it; after approval, install or link the current source and verify that
the same plugin ID is registered only once.

Verify:

```sh
Expand Down