feat: code-review-tea — Gitea/tea fork of Anthropic's code-review plugin #10

Open
alee wants to merge 11 commits from plugin/code-review-tea into main
Owner

Summary

Project-local Claude Code plugin that forks Anthropic's code-review plugin (credit: Boris Cherny, boris@anthropic.com, from claude-plugins-official) from the GitHub CLI (gh) to the Gitea CLI (tea), so code review works against this self-hosted Gitea instance.

The upstream plugin is GitHub/gh-only (its allowed-tools, PR-fetching, and comment-posting all call gh), so it can't run here as-is. This fork swaps the five gh contact points for tea equivalents and changes code-link URLs from GitHub's blob/SHA/path#L to Gitea's src/commit/SHA/path#L. The review pattern (5 parallel agents → 0–100 confidence scoring → ≥80 filter → posted comment) is unchanged.

Files

  • .claude/plugins/code-review-tea/.claude-plugin/plugin.json — manifest, credits Boris Cherny/Anthropic
  • .claude/plugins/code-review-tea/commands/code-review.md — the 8-step review command (gh→tea)
  • .claude/plugins/code-review-tea/commands/RESOLVED_INVOCATION.md — verified tea calls from the smoke test
  • .claude/plugins/code-review-tea/README.md — credit, why-fork, usage, differences-from-upstream table
  • CLAUDE.md — one-line "Code Review" section pointing at the plugin
  • docs/superpowers/plans/2026-06-27-code-review-tea-plugin.md — the implementation plan

Loading (repo-local plugins are not auto-discovered)

claude --plugin-dir .claude/plugins/code-review-tea   # per-session
claude plugin init code-review-tea                     # persistent, user-scope

Invoke as /code-review-tea:code-review (namespaced).

Verification

  • claude plugin validate .claude/plugins/code-review-tea → passes (one cosmetic warning: the contributors credit field is ignored, kept for provenance)
  • End-to-end smoke test on a live throwaway Gitea PR (#9, now closed): pushed a bug → 5-lens review → 3 findings → scored → 2 survived ≥80, 1 filtered → posted comment #78 via tea api -F body=@- with src/commit/<sha>#L links resolving HTTP 200. Comment still readable at #9 (comment)

Corrections baked in during the build (vs. a naive port)

  • -F (typed field) not -f (which posts literal @-) for comment body
  • /repos/ prefix required on the comment endpoint
  • tea pulls --fields diff returns empty in 0.14.1 → diff via git diff origin/<base>...origin/<head>
  • SHA must be remote-present (local-only SHA 404s even on a public repo)
  • commands/ at plugin root, not inside .claude-plugin/
## Summary Project-local Claude Code plugin that forks Anthropic's `code-review` plugin (credit: Boris Cherny, `boris@anthropic.com`, from `claude-plugins-official`) from the GitHub CLI (`gh`) to the Gitea CLI (`tea`), so code review works against this self-hosted Gitea instance. The upstream plugin is GitHub/`gh`-only (its `allowed-tools`, PR-fetching, and comment-posting all call `gh`), so it can't run here as-is. This fork swaps the five `gh` contact points for `tea` equivalents and changes code-link URLs from GitHub's `blob/SHA/path#L` to Gitea's `src/commit/SHA/path#L`. The review pattern (5 parallel agents → 0–100 confidence scoring → ≥80 filter → posted comment) is unchanged. ## Files - `.claude/plugins/code-review-tea/.claude-plugin/plugin.json` — manifest, credits Boris Cherny/Anthropic - `.claude/plugins/code-review-tea/commands/code-review.md` — the 8-step review command (gh→tea) - `.claude/plugins/code-review-tea/commands/RESOLVED_INVOCATION.md` — verified `tea` calls from the smoke test - `.claude/plugins/code-review-tea/README.md` — credit, why-fork, usage, differences-from-upstream table - `CLAUDE.md` — one-line "Code Review" section pointing at the plugin - `docs/superpowers/plans/2026-06-27-code-review-tea-plugin.md` — the implementation plan ## Loading (repo-local plugins are not auto-discovered) ``` claude --plugin-dir .claude/plugins/code-review-tea # per-session claude plugin init code-review-tea # persistent, user-scope ``` Invoke as `/code-review-tea:code-review` (namespaced). ## Verification - `claude plugin validate .claude/plugins/code-review-tea` → passes (one cosmetic warning: the `contributors` credit field is ignored, kept for provenance) - End-to-end smoke test on a live throwaway Gitea PR (#9, now closed): pushed a bug → 5-lens review → 3 findings → scored → 2 survived ≥80, 1 filtered → posted comment #78 via `tea api -F body=@-` with `src/commit/<sha>#L` links resolving HTTP 200. Comment still readable at https://git.adlee.work/alee/vigilar/pulls/9#issuecomment-78 ## Corrections baked in during the build (vs. a naive port) - `-F` (typed field) not `-f` (which posts literal `@-`) for comment body - `/repos/` prefix required on the comment endpoint - `tea pulls --fields diff` returns empty in 0.14.1 → diff via `git diff origin/<base>...origin/<head>` - SHA must be remote-present (local-only SHA 404s even on a public repo) - `commands/` at plugin root, not inside `.claude-plugin/`
alee added 11 commits 2026-06-27 18:21:38 +00:00
Dev-only tooling to loop phone-recorded mp4s as local RTSP streams
(MediaMTX + ffmpeg) so the real camera pipeline can be exercised
without physical cameras.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Task-by-task plan for the dev-only RTSP simulator: gitignore entries,
MediaMTX downloader, syntax-check test guard, the sim script itself,
and a human acceptance walk-through.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Loops phone-recorded mp4 files as local RTSP streams via MediaMTX +
ffmpeg so Vigilar's camera pipeline can be exercised end-to-end
without physical cameras. Reads camera ids from vigilar.toml,
expects videos/<id>.mp4 for each, writes a vigilar.sim.toml with
rtsp_urls rewritten to the local endpoints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Incorporate findings from Task 2 verification:
- -F (typed field) reads @-/@file; -f posts literal '@-'. Use -F.
- Endpoint requires /repos/ prefix: /repos/{owner}/{repo}/...
- tea pulls --fields diff returns empty in tea 0.14.1 -> use git diff
- SHA must be remote-present (PR headSha); local-only SHA 404s
- tea api prints JSON to stdout; -o is file-output not format

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per Claude Code plugin docs (code.claude.com/docs/en/plugins):
- commands/ belongs at plugin ROOT, not inside .claude-plugin/ (only
  plugin.json goes in .claude-plugin/). Moved via git mv.
- Repo-local .claude/plugins/<name>/ is NOT auto-discovered. Load via
  `claude --plugin-dir` or `claude plugin init`.
- Plugin commands are namespaced: invoke as /code-review-tea:code-review,
  not /code-review-tea.
- Bake verified Task 2 facts into RESOLVED_INVOCATION content: -F not -f,
  /repos/ prefix required, tea pulls --fields diff empty (use git diff),
  SHA must be remote-present.

Plan only (no plugin source changed beyond the dir move).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
Owner

### Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

--- ### Code review No issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with [Claude Code](https://claude.ai/code) ---
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin plugin/code-review-tea:plugin/code-review-tea
git checkout plugin/code-review-tea
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alee/vigilar#10