code-strollInteractive code review learning sessions for opencode
0
13
近 7 天 5
19.6
生态多维模型
4 个月前
2026-04-02
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["code-stroll@0.1.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["code-stroll@0.1.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D code-strollopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
Interactive code review learning mode for opencode.
What it does
Turns code review into a learning session. Presents diff changes grouped semantically, one chunk at a time, with Q&A and proactive explanations.
Requirements
- opencode installed in your project
- Git
Installation
- Add the plugin to your project's
opencode.json:
{
"plugin": ["code-stroll"]
}
- Install the slash command and review agent:
npx code-stroll init
This copies the command and agent files into your project's .opencode/ directory. The plugin itself is installed automatically by opencode at startup.
Verify installation
After installing, check that the files are in place:
your-project/
opencode.json ← plugin registered here
.opencode/
commands/
code-stroll.md ← slash command entry point
agents/
review-agent.md ← conversational review agent
Usage
/code-stroll # review current branch vs main
/code-stroll --depth skim # flag concerns only
/code-stroll --focus auth,api # only review these directories
/code-stroll --base develop # diff against develop instead of main
/code-stroll --resume # continue previous session
Depth modes
- deep (default): Explains architectural rationale, notes patterns and alternatives.
- skim: Flags high-severity concerns only (security issues, missing error handling). Keeps explanations under 3 sentences.
Session controls
During a review session, use these signals to advance:
next,continue,move on— advance to next chunkskip— skip current chunkdone— end session early
Ask questions at any point — the review agent will answer before moving on.
Resume
Sessions are persisted to .opencode/review-session.json. Use --resume to pick up where you left off.
How it works
- Plugin creates an isolated git worktree for the branch under review
- Runs
git diffbetween the branch and base - LLM pre-analysis groups diff hunks semantically (falls back to file-based grouping on error)
- Groups are presented one at a time with concerns flagged
- Review agent opens Q&A for each group
- Session state is saved after each chunk advance
Design
See docs/plans/2026-03-01-code-stroll-design.md for full architecture.