Skip to content

refactor: introduce reviewer assistants#169

Merged
HonestMajority merged 5 commits intomainfrom
introduce-reviewer-assistant
May 6, 2026
Merged

refactor: introduce reviewer assistants#169
HonestMajority merged 5 commits intomainfrom
introduce-reviewer-assistant

Conversation

@HonestMajority
Copy link
Copy Markdown
Owner

@HonestMajority HonestMajority commented May 6, 2026

This broadens the existing researcher model into a general assistant abstraction with researcher and reviewer kinds. It adds reviewer creation paths in the CLI and TUI, migrates researcher storage toward assistants, and updates the surrounding config, Telegram, git, use case, docs, and tests to use the new terminology.

Validated locally with cargo fmt -- --check, cargo clippy --all-targets -- -D warnings, and cargo test.

HonestMajority and others added 5 commits May 6, 2026 10:35
…r kinds

Replace the standalone `researcher` module with a kind-discriminated
`assistant` abstraction. Researchers keep their pre-existing behavior;
new `Reviewer` kind is long-lived, message-based, and scoped to one or
more `(repo, branch)` worktrees. Reviewers reply to their PM via
`agman send-message`, produce no on-disk artifacts, and have no GitHub
integration.

Highlights:
- `~/.agman/researchers/` → `~/.agman/assistants/` migration runs at
  startup and rewrites each `meta.json` to the new kind shape.
- New `agman create-assistant`/`list-assistants`/`archive-assistant`
  commands plus `create-reviewer` / `list-researchers` /
  `archive-researcher` aliases for muscle memory.
- Reviewer spawn dispatches: existing worktree → adopt as-is; local
  branch without worktree → bail loudly; otherwise fetch origin and
  create a fresh worktree (`agman_created = true`) so archive cleanup
  knows what to remove.
- Send-message routing accepts both `researcher:` and `reviewer:`
  prefixes; both resolve to `assistants/<project>--<name>/inbox.jsonl`.
- Telegram switcher labels: `R:<name>` for researchers, `Rv:<name>`
  for reviewers.
- Outbound-review surface deleted: `review` flow, `reviewer` /
  `pr-reviewer` prompts, `review-pr` stored command,
  `TaskMeta.review_after`, the `v`-keybind ReviewWizard, and all
  threading. Inbound-review surface (PR-poller, address-review,
  `review_addressed`) is untouched.
… wizard

Completes the TUI half of the Assistant abstraction by renaming the
Researcher* views, fields, and handlers to their kind-agnostic Assistant
counterparts and reworking the create wizard to support both kinds:

- View::ResearcherList/Wizard → View::AssistantList/Wizard
- app.researchers / refresh_researchers → app.assistants /
  refresh_assistants (now driven by use_cases::list_assistants)
- AssistantWizard adds a kind picker (step 0) + a (repo, branch) row
  editor for the reviewer path; researcher path keeps Name → Description
- draw_assistant_list groups items by kind (Researchers / Reviewers)
  with empty groups omitted; status sub-grouping (running / stopped /
  archived) preserved within each kind
- Stall key uses the kind-specific prefix so the warning indicator stays
  in sync with the inbox poller
- Status-bar hints updated: "researchers" → "assistants" on ProjectList
  and TaskList; the stale "v review" hint on TaskList is removed since
  the review wizard was deleted in the prior commit

The freed `v` slot on TaskList is intentionally left unbound, per plan.
Backend types (Assistant, AssistantKind, start_assistant_session, etc.)
are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@HonestMajority HonestMajority merged commit b97fc4c into main May 6, 2026
1 check passed
@HonestMajority HonestMajority deleted the introduce-reviewer-assistant branch May 6, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant