diffprism 0.13.5 → 0.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,7 @@ DiffPrism gives you a visual review step for AI-written code — stage your chan
12
12
  - **Review briefing bar** — summary stats, complexity scoring, test coverage gaps, pattern flags, and dependency tracking
13
13
  - **Agent reasoning panel** — see why the AI made each change
14
14
  - **Dark/light mode** — toggle with theme persistence
15
- - **Keyboard shortcuts** — `j`/`k` navigate files, `Space`/`Enter` cycle file status
15
+ - **Keyboard shortcuts** — `j`/`k` navigate files, `s` cycles file status
16
16
  - **Three-way decisions** — approve, request changes, or approve with comments
17
17
  - **Branch display** — current git branch shown in the review header
18
18
 
@@ -27,9 +27,11 @@ npx diffprism setup
27
27
  ```
28
28
 
29
29
  This single command configures everything:
30
- - Creates `.mcp.json` with the DiffPrism MCP server
31
- - Creates `.claude/settings.json` with auto-approve permissions
32
- - Installs a `/review` skill so you can type `/review` in Claude Code at any time
30
+ - Adds `.diffprism` to `.gitignore`
31
+ - Creates `.mcp.json` with the DiffPrism MCP server config
32
+ - Creates `.claude/settings.json` with auto-approve permissions for all 3 MCP tools
33
+ - Installs a Stop hook for watch mode cleanup
34
+ - Installs the `/review` skill so you can type `/review` in Claude Code at any time
33
35
 
34
36
  After running, restart Claude Code. The first time you use `/review`, Claude will ask your preferences and save them to `diffprism.config.json`.
35
37
 
@@ -85,7 +87,7 @@ Stop the watcher with `Ctrl+C`.
85
87
 
86
88
  ## MCP Tool Reference
87
89
 
88
- The MCP server exposes two tools:
90
+ The MCP server exposes three tools:
89
91
 
90
92
  ### `open_review`
91
93
 
@@ -108,7 +110,13 @@ Pushes reasoning/context to a running `diffprism watch` session. Non-blocking
108
110
  | `title` | No | Updated title for the review |
109
111
  | `description` | No | Updated description of the changes |
110
112
 
111
- **Returns:** A `ReviewResult` JSON object:
113
+ ### `get_review_result`
114
+
115
+ Fetches the most recent review result from a `diffprism watch` session. Non-blocking — returns immediately. The result is marked as consumed after retrieval so it won't be returned again.
116
+
117
+ No parameters.
118
+
119
+ **Returns (all tools):** A `ReviewResult` JSON object:
112
120
 
113
121
  ```json
114
122
  {
package/dist/bin.js CHANGED
@@ -138,6 +138,17 @@ The tool blocks until the user submits their review in the browser. When it retu
138
138
  If the \`mcp__diffprism__open_review\` tool is not available:
139
139
  - Tell the user: "The DiffPrism MCP server isn't configured. Run \`npx diffprism setup\` to set it up, then restart Claude Code."
140
140
 
141
+ ## Watch Mode: Polling for Review Feedback
142
+
143
+ When \`diffprism watch\` is active (detected via \`.diffprism/watch.json\`), the developer can submit reviews at any time in the browser. Since there is no push notification, **you must poll for feedback** to close the loop.
144
+
145
+ **After pushing context to a watch session**, call \`mcp__diffprism__get_review_result\` to check for pending feedback:
146
+ - **Between tasks** \u2014 Before starting a new piece of work, check for feedback.
147
+ - **After making changes** \u2014 After addressing requested changes, push updated reasoning via \`update_review_context\`, then check again shortly after.
148
+ - **When the user mentions review feedback** \u2014 If the user says they submitted a review or left comments, check immediately.
149
+
150
+ Do not poll in a tight loop. Check at natural breakpoints in your workflow (e.g., after finishing a subtask, before committing, before moving to the next file).
151
+
141
152
  ## Behavior Rules
142
153
 
143
154
  - When invoked via \`/review\`, always open a review regardless of the \`reviewTrigger\` setting.
@@ -420,7 +431,7 @@ async function notifyStop() {
420
431
 
421
432
  // cli/src/index.ts
422
433
  var program = new Command();
423
- program.name("diffprism").description("Local-first code review tool for agent-generated changes").version(true ? "0.13.5" : "0.0.0-dev");
434
+ program.name("diffprism").description("Local-first code review tool for agent-generated changes").version(true ? "0.13.7" : "0.0.0-dev");
424
435
  program.command("review [ref]").description("Open a browser-based diff review").option("--staged", "Review staged changes").option("--unstaged", "Review unstaged changes").option("-t, --title <title>", "Review title").option("--dev", "Use Vite dev server with HMR instead of static files").action(review);
425
436
  program.command("watch [ref]").description("Start a persistent diff watcher with live-updating browser UI").option("--staged", "Watch staged changes").option("--unstaged", "Watch unstaged changes").option("-t, --title <title>", "Review title").option("--interval <ms>", "Poll interval in milliseconds (default: 1000)").option("--dev", "Use Vite dev server with HMR instead of static files").action(watch);
426
437
  program.command("notify-stop").description("Signal the watch server to refresh (used by Claude Code hooks)").action(notifyStop);
@@ -14,7 +14,7 @@ import { z } from "zod";
14
14
  async function startMcpServer() {
15
15
  const server = new McpServer({
16
16
  name: "diffprism",
17
- version: true ? "0.13.5" : "0.0.0-dev"
17
+ version: true ? "0.13.7" : "0.0.0-dev"
18
18
  });
19
19
  server.tool(
20
20
  "open_review",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diffprism",
3
- "version": "0.13.5",
3
+ "version": "0.13.7",
4
4
  "type": "module",
5
5
  "description": "Local-first code review tool for agent-generated code changes",
6
6
  "bin": {