Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>ScriptedReviewNew to Visual Studio Code? Get it now.
ScriptedReview

ScriptedReview

ThalesoMilas

| (0) | Free
Let your Copilot agent walk you through a pull request: guided diff tour, inline findings, static-analysis results on changed lines, one-key verdicts, live Q&A.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ScriptedReview

Let your Copilot agent walk you through a pull request.

ScriptedReview is a lightweight VS Code extension. An LLM (Copilot agent mode, with any model) reviews a pull request and then walks you through it in the editor: it opens the diff at the right spot, shows each finding inline on the exact lines, asks you what it cannot know, and adapts the rest of the tour to your verdicts. You never have to hunt for the code.

See it work

A local review in ScriptedReview: pick a branch, walk the findings on the diff, accept one, answer a question, finish, and start another review of the same branch

A local review from start to finish on a small sample repository, recorded in VS Code. The text of the walk is scripted for this recording. In normal use your Copilot agent writes it.

30-second pitch

  • Ordered walk, not a wall of text. The agent orders the review by data flow and concern, and opens each step centred on its anchor line.
  • Inline findings. Each finding is a native comment thread on the exact lines, with severity, confidence, category, the consequence (why), how to verify it, and an optional suggested replacement.
  • Buttons you can see. Accept, reject, modify or skip each finding with the links under it. Walk with Next and Previous in the status bar. Keyboard shortcuts also work.
  • Your own comments. Add a comment on any line, edit it, or delete it with Undo.
  • Scenario, not a list. The review opens with the domain, the existing design and the design change. Context steps explain the code on visible comments.
  • Saved in your repository. Each review is saved in a .pr folder. Reopen it later and continue where you stopped. ScriptedReview never commits it.
  • Copilot when you ask. Opening or resuming a review does not call Copilot. Copilot is contacted only when you click Ask Copilot, Answer or Check with Copilot.
  • Check and submit. Ask Copilot to check your verdicts. Submit the accepted and modified findings and your comments as one GitHub review, after a preview and a confirmation.
  • Review manager (v1.3). See the PRs waiting for your review, open any PR, and review it with or without a Copilot walk. Submit with Approve, Request changes or Comment, and answer GitHub replies in the editor.
  • Feedback loop. Your verdicts flow back to the agent, which drops the kinds of findings you keep rejecting and answers your questions in the thread.
  • Strict by design. The agent's tour must fit hard caps (for example, 10 issues and 100 words per body). Invalid tours are rejected with instructive errors, so noise stays out of your view.
  • Read-only. ScriptedReview never touches your working tree, index or current branch.

How it works

You:    "ScriptedReview: Review a PR…"  →  [#42](https://github.com/thalesomilas/ScriptedReview/issues/42) (or two refs), quick or full
Agent:  scriptedreview_loadPR       fetch refs/pull/42/head (or the refs you gave), pin SHAs, list files
Agent:  scriptedreview_getDiff      read the diff of the files it needs (base/head line numbers)
Agent:  scriptedreview_startTour    author a validated tour; errors come back and nothing renders
You:    walk the tour: overview → sections → steps, judge each finding with its buttons
Agent:  scriptedreview_awaitHuman   receives questions, section completions and verdict deltas
Agent:  scriptedreview_editTour     withdraws findings you rejected, adds or updates steps
Agent:  scriptedreview_reply        answers your question in the step's thread
You:    "Check with Copilot" → Copilot reviews your accepts, rejects and modifications in each thread
You:    "Finish Review" → the review is saved as completed and its report is written; "Close Review" keeps it in progress
You:    "Submit Review…" → preview, confirm → one GitHub review on the PR (GitHub only)

Tour content is git content pinned to commit SHAs (scriptedreview-git: URIs), so line numbers stay stable for the whole review. The diff base is merge-base(base, head).

Walking the review

Every step has visible controls. You do not need a shortcut.

  • Next and Previous are in the status bar at the bottom (← Previous, the position such as 3/6 · 4 open, and Next →). They are also in the title bar of the diff and in the links under each comment. The count includes open walk steps, pending analyzer findings, new GitHub replies and Copilot drafts, and Next goes through them in that order, with or without a walk.
  • Judge a finding with the links under its first comment: Accept, Reject, Modify or Skip for a finding; Answer for a question. Reject asks for a reason, such as false positive, nit or out of scope. Modify changes the text of the finding in place, with Save or Cancel.
  • Ask Copilot under any step asks the agent about that step. Add my comment adds your own comment on the step's lines.
  • The overview explains the walk in a short "How to walk" section.

The first time a review opens, ScriptedReview asks once whether to show the side bar's view buttons all the time. If you answer Show Always, ScriptedReview sets workbench.view.alwaysShowHeaderActions to true in your user settings. If you answer Not Now, it does not ask again and the setting is not changed.

How commented lines are marked

  • The line of the current step has a thick left border in the colour of its kind (orange for an issue, blue for context, purple for a question), a light tint, and a label after the first line, for example ◀ 2/6 · Context. For an issue the label shows the severity.
  • Lines of other steps in the open file have a thin left border in their kind's colour and a short label such as ● 4/6.
  • Lines with your own comment have a thin left border in the note colour (yellow).
  • The colours are theme colours. You can change them with scriptedreview.issueAccent, scriptedreview.contextAccent, scriptedreview.questionAccent and scriptedreview.noteAccent.
  • Files that Copilot did not read during a walk are marked ○ under Files and listed in the walk overview under Not in this walk.

Your own comments

  • Add a comment: click Add Comment in the title bar of the diff, use Add my comment under a step, choose Add Comment in the editor's context menu, or click the gutter + next to a line. A draft opens. Type your text and click Save Comment, or click Cancel to drop the draft.
  • Edit: click the Edit button on your comment, change the text, and click Save or Cancel.
  • Delete: click the Delete button on your comment. It is removed at once, and VS Code shows a message with Undo.
  • Copilot is told about your comments and answers them in the same thread. An edited comment is sent again. A deleted comment that Copilot has not received yet is never sent.

Reviews

Each review is saved while you work. You can stop at any time and come back later.

Where reviews are saved

Each review is saved in a folder in your repository:

<repo>/.pr/<key>/review.json    the review (verdicts, comments, position)
<repo>/.pr/<key>/review.md      the report, for reading or sharing

The key names the PR or branch and the head commit, for example pr-42@1a2b3c4 for a GitHub PR, mr-42@1a2b3c4 for a GitLab MR, or feature-improvements@280dd01 for a branch range. A second review of the same PR and commit gets a suffix, such as -2.

  • The folder name is set by scriptedreview.reviewFolder (default .pr).
  • Both files are rewritten as you work.
  • The files hold no absolute paths. They can be opened on another machine.
  • Do not hand-edit review.json while that review is open. ScriptedReview rewrites it on the next save, so your edit is lost. Close the review first, then edit the file.
  • ScriptedReview never commits, pushes or edits .gitignore. To keep reviews out of git, add .pr/ to your .gitignore. To share them, commit the folder.

The Reviews view

Every review is in one of three states:

  • Open in the walkthrough: the review is loaded in the Tour view, with its comments, marks and status bar. At most one review is open at a time.
  • In progress: saved and closed. You can continue it at any time.
  • Completed: saved and closed, after you finished it.

The Reviews view in the ScriptedReview side bar lists the saved reviews in two groups, In progress and Completed, newest first. The open review is marked "● open".

  • Review a Branch or PR… (the first row of the view) starts a review of a local branch, a range such as origin/main..main, or a PR, with or without a GitHub connection. If you already finished a review of the same commit, you choose between opening it and starting a new one.
  • Open (click a review, or use the context menu): the review opens at the step where you stopped, with the same verdicts, comments and answers. No chat is opened and Copilot is not called. Copilot joins when you click Ask Copilot, Answer or Check with Copilot. Opening another review closes the current one first, and it is saved.
  • Replay from Start: opens the same review at the overview step. No copy is made. Changes you make are saved into the same review.
  • Open Report: opens review.md.
  • Search Reviews… (title bar of the Reviews view): finds a review by its title, PR or branch, commit, status or step titles. Picking one opens it. The view also filters as you type.
  • Reveal in File Explorer shows the folder.
  • Delete Review: select one or more reviews and remove their folders after one confirmation that lists them. If a selected review is open, it is closed first.

Reviews made with v1.1 are listed as older storage. Opening one moves it into .pr.

Finishing and closing

  • Close Review closes the walkthrough without a dialog. The review stays in progress. The Tour view returns to its welcome.
  • Finish Review ends the review. If you judged every finding, it closes without a dialog. The review is saved as completed, and a message shows where the report is, with Open Report.
  • When the last finding is judged, ScriptedReview tells you the review is complete, with Open Report, Submit Review… (GitHub only) and Finish Review.
  • If findings are still open, ScriptedReview shows a dialog that says how many are open. Click Finish Anyway to complete the review; the open findings are listed in the report. Click Close for Now to keep it in progress. Click Show Open Finding to go to the first one.
  • Leaving the walkthrough, by any of these ways, always saves the review and clears the Tour view. Nothing is left half-ended.

Review manager (v1.3)

ScriptedReview can now manage your review work on GitHub, not only one review. It stays small: general PR work (checkout, merge, CI, labels) is left to the GitHub Pull Requests extension.

The two views

The ScriptedReview side bar has two views. The Review view shows the open PR (it appears only while a PR is open). The Reviews view is the inbox, and it is always shown:

SCRIPTEDREVIEW
▾ REVIEW   [#42](https://github.com/thalesomilas/ScriptedReview/issues/42) · Fix token refresh                 [Finish] [Close] [...]
    ▾ Walk                        3/6 judged · 1 open
    ▾ Conversation (5)            2 new
▾ REVIEWS                         @login           [Find...] [Refresh]
  ▾ Needs my review (2)
      [#57](https://github.com/thalesomilas/ScriptedReview/issues/57) Add retry to sync                 carol · 3h
  ▾ My reviews (3)
      [#42](https://github.com/thalesomilas/ScriptedReview/issues/42) Fix token refresh   ②      changes requested · 2 new commits
  ▸ Archive (7)                                              [Clean Archive...]
  • Needs my review: PRs where a review is requested from you (or one of your teams).
  • My reviews: open PRs you reviewed, with your state and any new commits since your review.
  • Archive: merged or closed PRs that you reviewed. It is hidden while empty. Clean Archive… deletes those reviews after one confirmation. Reviews you changed in the last 24 hours are kept.
  • Find… takes a PR number, a URL or text. It finds PRs of the repositories open in the workspace, including PRs not assigned to you. Saved reviews are found there too.
  • Without GitHub: Find… lists your local branches (newest first, the current one on top) as Review branch … rows, each against the default base (the remote HEAD, else main or master). You can also type base..head. A branch review needs only git: you can walk it with Copilot, comment on it, and save it. Connect to GitHub only to see review requests and to submit.
  • The badge ② on a PR is the number of its threads with a new reply (9+ above nine). The activity bar badge counts the review requests and the PRs with new replies. Nothing pops up.

Open a PR by clicking it. In the Review view, Submit to GitHub… posts your review. Its Conversation group lists the GitHub threads of the PR. Unresolved threads come first, and new replies are marked.

Connect to GitHub

Run ScriptedReview: Connect to GitHub…, or click Connect to GitHub… in the Needs my review group of the Reviews view. Choose one:

  • Sign in with VS Code (recommended). ScriptedReview uses your GitHub account in VS Code, with the repo scope. You can revoke the account from VS Code's Accounts menu. ScriptedReview stores no token for it.
  • Use a personal access token. Paste a token. A classic token needs the repo scope. A fine-grained token needs Pull requests (read and write) and Metadata (read). ScriptedReview checks the token with GitHub before it saves it to VS Code's SecretStorage.
  • Disconnect removes the saved token and stops using the account in ScriptedReview. Connect again to sign in.

For GitHub Enterprise Server, set scriptedreview.github.server to your server's address, such as https://ghe.example.com. For the VS Code account, also set github-enterprise.uri to the same address. Connect says which setting is missing. Without a connection, the Reviews view shows your local reviews and the Connect link.

Submitting and replies

  • Submit to GitHub… asks for the outcome: Approve, Request changes or Comment. The suggested outcome is listed first: Request changes when an accepted blocker or major finding is posted, Approve when nothing is posted and no finding is open, and Comment otherwise. "Reject" is Request changes, because GitHub has no reject review. A Comment review posts standalone comments.
  • After a submission, each comment is shown once: as its GitHub thread. A comment that ScriptedReview cannot match keeps its local thread, labelled "Posted".
  • In a GitHub thread, Reply on GitHub… (with Post Reply), Resolve and Unresolve work on the diff. To accept or close a reply, resolve the thread. To reject it, write why and post the reply.
  • Draft reply with Copilot asks Copilot for a reply to the thread. The draft is labelled "Draft by Copilot — not posted", and you post it, edit it or discard it. Copilot never posts.
  • Changes since your review appears when the PR has new commits since your newest review. It reviews only the new commits. After a force push it shows the full PR and says so.

What is sent to GitHub, and when

  • Inbox: one request per refresh. A refresh happens on activation, when the Reviews view is shown, every scriptedreview.github.refreshMinutes (5 by default) while VS Code has focus, when VS Code regains focus after that interval, and two seconds after one of your GitHub actions.
  • An open PR: one request for its conversation, and one for each action you take (Post Reply, Resolve, Submit).
  • When GitHub's rate limit is nearly used up (under 10% left), automatic refresh pauses until the limit resets, and the view says until when. Refresh still works.
  • Nothing else. Links in PR descriptions and comments are shown, never opened. Avatars are not loaded.
  • Tokens are kept in VS Code's SecretStorage or in your VS Code account. They are not written to settings, reviews or reports.
  • Seen state (the time you last saw each thread, for the new-reply flag) is kept on this machine only, in VS Code's global state. It is not written to .pr, so teammates' reviews are not changed.

New settings

Setting Default Meaning
scriptedreview.github.server https://github.com The GitHub server. Set your GitHub Enterprise Server address for a company server.
scriptedreview.github.refreshMinutes 5 How often the inbox refreshes while VS Code has focus (minimum 1). 0 turns the timer off. Refresh and the other triggers still work.
scriptedreview.github.notifyBadge true Show the attention count on the ScriptedReview activity bar icon. false hides it.

Static analysis (v1.4)

Run Static Analysis… runs the linters and analyzers you already have on the changed lines of the open PR. Their findings appear next to Copilot's, as separate comments. You accept, reject, modify or skip each one like a Copilot finding. Accepted ones are posted with the review, and a one-line fix becomes a GitHub suggestion.

  • Nothing is bundled. ScriptedReview runs the tools on your PATH, in your workspace (node_modules, .venv) or at the paths you set. A tool that is not installed is shown as "not found", not as an error.
  • Only the PR's code. Findings are kept for changed lines by default (scriptedreview.analysis.filter). A file that differs from the PR head is not analyzed in a working tree; the run says which branch to check out.
  • CI results. On a connected GitHub PR, the run also reads the check-run annotations of the head commit and the open code-scanning alerts. A source that is not available is shown as such.
  • Import SARIF… adds findings from any SARIF 2.1.0 file, for example a CI artifact. A file for another commit is skipped.
  • Findings do not block Finish. They are not part of the walk. Copilot sees them in the PR summary and in the diff, and is told not to repeat them as issues.

Presets

Tool Languages Mode Needs
ruff Python stdin (the PR content, no checkout) ruff on PATH or in .venv
eslint JavaScript, TypeScript stdin eslint in node_modules or on PATH; eslint.config.* or .eslintrc*
biome JavaScript, TypeScript, JSON, CSS files biome.json
tsc TypeScript project tsconfig.json
clang-tidy C, C++ files .clang-tidy or compile_commands.json
cppcheck C, C++ files cppcheck on PATH
clippy Rust project Cargo.toml
pmd Java files scriptedreview.analysis.paths.pmd on Windows
checkstyle Java files checkstyle.xml and scriptedreview.analysis.paths.checkstyle (a jar)
dart Dart project pubspec.yaml
semgrep any files .semgrep.yml or .semgrep/

"Project" tools run on the whole project, so they need the PR to be checked out. "Files" tools run on the changed files. Your own analyzers go in scriptedreview.analysis.custom.

Settings

Setting Default Meaning
scriptedreview.analysis.tools all presets Presets to use. Remove a name to turn it off.
scriptedreview.analysis.filter added added: changed lines. diffContext: changed hunks. file: anywhere in a changed file.
scriptedreview.analysis.minLevel warning Lowest level shown.
scriptedreview.analysis.maxFindings 50 Most findings kept per run. Errors first.
scriptedreview.analysis.maxPerRule 5 Most findings kept per tool and rule.
scriptedreview.analysis.timeoutSeconds 120 Time limit per tool.
scriptedreview.analysis.github true Read CI annotations and code-scanning alerts for a GitHub PR.
scriptedreview.analysis.pmdRuleset rulesets/java/quickstart.xml Ruleset for PMD.
scriptedreview.analysis.paths {} Where a tool is installed, by name. Machine scope: set it in User settings.
scriptedreview.analysis.custom [] Your own analyzers. Machine scope.

Other commands: Import SARIF…, Clear Static Analysis, Reset Analyzer Consent.

Safety

  • Only you start a run. Nothing runs when a PR opens or on a timer. No Copilot tool can run an analyzer or choose a command.
  • Consent. The first run in a workspace names the tools that run code from the repository (ESLint loads its config, clippy runs the build). Run Without Them skips them. Reset Analyzer Consent asks again.
  • No shell. Tools start with an argument list. .cmd, .bat and .ps1 launchers are refused. A file name from the PR is passed only as ./<path>, as a file list, or as the stdin name.
  • User settings only for tool paths and custom analyzers. A repository's .vscode/settings.json cannot choose what ScriptedReview runs.
  • Tool output is text. Messages are shown as plain text. Help links are kept only when they are http or https.

Custom analyzer

Add an entry to scriptedreview.analysis.custom in your User settings:

"scriptedreview.analysis.custom": [
  {
    "name": "mylint",
    "command": ["mylint", "--format", "gcc"],
    "mode": "workspace",
    "scope": "files",
    "format": "gcc",
    "extensions": [".ext"],
    "marker": "mylint.toml"
  }
]

command is the program and its arguments. {files} expands to one ./<path> per changed file, and {file} to one file in stdin mode. format is one of sarif, gcc, eslint-json, cargo-json, dart-json or tsc. The tool runs without a shell, and marker (optional) is a file that must exist in the repository.

Tools (for the agent)

Tool Purpose
scriptedreview_loadPR Load a PR/MR (#42, !42, a GitHub or GitLab URL) or two refs (head, base). Returns refs, title, commits and a compact file list. No hunks.
scriptedreview_getDiff Unified diff of one file, annotated BASE\|HEAD\|op text. Paged with a cursor.
scriptedreview_startTour Start a scenario: title, setting (domain, existing design, design change), mode (quick or full), sections and steps. Validated first.
scriptedreview_editTour Add, update or withdraw steps of the running tour. Withdrawn steps stay visible with their reason.
scriptedreview_reply Append an agent reply to a step's comment thread.
scriptedreview_awaitHuman Long-poll for the next human event (question, answer, section done, tour done) or timeout. waitSeconds: 0 returns the current state.

Keys

Keyboard shortcuts are optional. Each one has a visible button, and the shortcut appears in the button's tooltip. They are active while a review is open (scriptedreview.active).

Key Command
Alt+] Next step
Alt+[ Previous step
Alt+A Accept
Alt+R Reject (optional reason: false positive, already handled, out of scope, nit, disagree)
Alt+M Modify (edit the finding in place, Save or Cancel)
Alt+S Skip (not decided now)
Alt+Q Ask Copilot
Alt+N Add a comment on the current line or selection

Other commands: Review a PR…, Open Step, Answer Question…, Check with Copilot, Open Report, Finish Review, Close Review, Search Reviews…, Submit Review… (GitHub), Set GitLab Token….

Views: Review (the walk, the changed files under Files with reviewed files marked, static analysis and the GitHub conversation) and Reviews (saved reviews). Changed lines are green on the head side and red on the base side.

Settings

Setting Default Meaning
scriptedreview.host auto auto, github, gitlab or git. How PR numbers are interpreted.
scriptedreview.defaultRemote origin Remote used to fetch PRs/MRs when not given.
scriptedreview.fetchMetadata true Fetch the PR/MR title and description from the host API (optional).
scriptedreview.gitlabApiUrl "" GitLab API base URL. Empty: derived from the remote.
scriptedreview.awaitTimeoutSeconds 300 Default wait of scriptedreview_awaitHuman (10 to 1800).
scriptedreview.maxIdleMinutes 15 After this long without any ScriptedReview action, Copilot is told to stop waiting. Copilot waits again when you click Ask Copilot. 0 = wait forever.
scriptedreview.reviewFolder .pr Folder in the repository where reviews are saved.
scriptedreview.submitEvent removed in v1.3 The outcome (Approve, Request changes or Comment) is chosen when you submit.
scriptedreview.diffContextLines 3 Context lines around changes in getDiff (0 to 20).
scriptedreview.limits.maxSteps 20 Maximum steps in a tour.
scriptedreview.limits.maxIssues 10 Maximum issue steps.
scriptedreview.limits.maxQuestions 3 Maximum question steps.
scriptedreview.limits.maxBodyWords 100 Maximum words in a step body.
scriptedreview.limits.maxContextWords 60 Maximum words in a context step body.
scriptedreview.github.server https://github.com GitHub server for the review manager (v1.3). Set it for GitHub Enterprise Server.
scriptedreview.github.refreshMinutes 5 Inbox refresh interval while focused (v1.3). 0 turns the timer off.
scriptedreview.github.notifyBadge true Attention count on the activity bar icon (v1.3).

Setup (development)

Requirements: git on the PATH (or git.path), and a VS Code 1.100 or newer build for running the extension. The dev toolchain uses a portable Node 24 in .tools/, so no global Node is needed.

# Git Bash on Windows: put the portable node/npm on PATH
source scripts/env.sh

npm run build            # bundle to dist/extension.js (fails if over 256 KB)
npm run typecheck        # tsc --noEmit, strict
npm test                 # vitest unit tests for src/core
npm run test:integration # bundles the smoke test and runs it in VS Code with a fixture repo
npm run check            # typecheck + build + unit tests
npm run package          # .vsix via vsce

The integration test uses the cached VS Code in .vscode-test/, or the executable in VSCODE_EXECUTABLE_PATH. Its fixture repository is recreated in .vscode-test/fixture-repo on each run.

npm install is already done in this workspace. Do not run it again unless you need to change dependencies.

Privacy and safety

  • No telemetry. The extension makes no network calls of its own, except git fetch, the optional PR/MR metadata request to GitHub or GitLab, and the GitHub requests listed under "What is sent to GitHub, and when".
  • Copilot only on request. ScriptedReview sends nothing to Copilot until you ask for it with a button.
  • Read-only. Fetched refs live under refs/scriptedreview/*. The working tree, index and current branch are never changed. Content is read with git show at pinned SHAs.
  • Reviews stay local. Reviews are written to .pr in your repository. They hold no absolute paths. ScriptedReview does not commit them.
  • No shell. Git runs through execFile with argument arrays. LLM-supplied refs and paths are validated (no leading -, no .., no absolute paths, no shell metacharacters), and -- is used before paths.
  • Tokens (GitHub and GitLab) are stored in VS Code SecretStorage, or in your VS Code account. They are never written to settings, reviews or reports.
  • Markdown in comments is trusted only for the ScriptedReview commands that its buttons use.
  • Workspace trust. ScriptedReview runs git in the workspace, so it is not supported in untrusted workspaces.

Status

v1.4.0. See CHANGELOG.md. Out of scope for v1: an MCP server, applying suggestions, and learning across PRs. The requirements, design and architecture documents are docs/requirements.md, docs/dd.md and docs/arch42.md. Traceability is in docs/traceability.md. A checklist for trying it with a real Copilot model is in docs/manual-test.md.

Troubleshooting (Windows)

  • vitest reports "Cannot read properties of undefined (reading 'config')" and 0 tests: vitest was started from a lowercase drive letter (d:\…) and loaded itself twice. npm test goes through scripts/vitest.mjs, which normalizes the drive letter, so use npm test (or node scripts/vitest.mjs run <file>) instead of npx vitest.
  • Integration tests fail with "Cannot find module …fixture-repo": ELECTRON_RUN_AS_NODE=1 is inherited from a VS Code terminal. scripts/run-integration.mjs clears it, so run tests through that script (npm run test:integration).
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft