跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    bronteee

    Code Stroll

    v0.1.1其他
    code-stroll

    Interactive code review learning sessions for opencode

    GitHub 星标

    0

    月装机量

    13

    近 7 天 5

    综合评分SCORE

    19.6

    生态多维模型

    最近提交

    4 个月前

    2026-04-02

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["code-stroll@0.1.1"]
    }

    opencode 启动时会通过内嵌运行时自动加载 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

    1. Add the plugin to your project's opencode.json:
    {
      "plugin": ["code-stroll"]
    }
    
    1. 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 chunk
    • skip — skip current chunk
    • done — 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

    1. Plugin creates an isolated git worktree for the branch under review
    2. Runs git diff between the branch and base
    3. LLM pre-analysis groups diff hunks semantically (falls back to file-based grouping on error)
    4. Groups are presented one at a time with concerns flagged
    5. Review agent opens Q&A for each group
    6. Session state is saved after each chunk advance

    Design

    See docs/plans/2026-03-01-code-stroll-design.md for full architecture.