docs(plugin): document code-review-tea fork and CLAUDE.md note

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-06-27 14:11:04 -04:00
parent 571eb45b3e
commit df4233f08f
3 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
# code-review-tea
Project-local fork of Anthropic's `code-review` plugin, adapted from the GitHub CLI (`gh`) to the Gitea CLI (`tea`).
## Credit
This plugin is a fork of **Anthropic's `code-review` plugin** (author: **Boris Cherny**, `boris@anthropic.com`), from the `claude-plugins-official` marketplace. The upstream plugin is GitHub/`gh`-only. All credit for the review design — the 5 parallel specialized agents, confidence-based scoring, and false-positive filtering — belongs to the original. This fork changes only the Gitea contact points.
## Why a fork
Vigilar is hosted on a self-hosted Gitea instance (`git.adlee.work`), not GitHub. The upstream `code-review` plugin is hard-wired to `gh` (its `allowed-tools`, PR-fetching, and comment-posting all call `gh`), so it cannot run against this repo as-is. This fork substitutes the five `gh` contact points with `tea` equivalents and changes code-link URLs from GitHub's `blob/SHA/path#L` format to Gitea's `src/commit/SHA/path#L` format.
## Usage
On a branch with an open Gitea pull request against `main`:
/code-review-tea:code-review
Claude will:
- Verify the PR is reviewable (skip closed/draft/trivial/already-reviewed)
- Gather relevant CLAUDE.md files
- Summarize the change
- Launch 5 parallel review agents (CLAUDE.md compliance, bug scan, git-history context, prior-PR comments, in-code-comment compliance)
- Score each finding 0100 for confidence
- Filter to findings ≥80
- Post a single review comment back to the Gitea PR via `tea api`
## Requirements
- `tea` CLI (v0.14.1+) installed and logged in as `alee` against `https://git.adlee.work`
- The `alee` login need NOT be the default — the command passes `--remote origin` to resolve context
- An open Gitea pull request to review
## Load (this plugin is NOT auto-discovered)
A plugin placed in `<repo>/.claude/plugins/<name>/` is not auto-discovered by Claude Code. Load it explicitly:
# per-session (recommended):
claude --plugin-dir .claude/plugins/code-review-tea
# persistent, user-scope (across all your projects):
claude plugin init code-review-tea # installs to ~/.claude/skills/code-review-tea/
## Differences from upstream
| Area | Upstream (GitHub) | This fork (Gitea) |
|---|---|---|
| CLI | `gh` | `tea` |
| PR metadata | `gh pr view` | `tea pulls <idx> --fields ... -o json` |
| Diff | `gh pr diff` | `git diff origin/<base>...origin/<head>` (local; `tea pulls --fields diff` returns empty in 0.14.1) |
| Comment post | `gh pr comment --body` | `tea api /repos/{owner}/{repo}/issues/<idx>/comments -F body=@-` (`-F` typed field reads stdin; `/repos/` prefix required) |
| Code link | `github.com/o/r/blob/SHA/path#L` | `git.adlee.work/alee/vigilar/src/commit/SHA/path#L` (SHA must be remote-present) |
| Inline line comments | (upstream posts one summary comment) | NOT attempted — single summary comment only (Gitea inline-comment API needs `tea api` review endpoints; out of scope) |
See `commands/RESOLVED_INVOCATION.md` for the verified `tea` calls.