reviw 0.13.0 → 0.13.2

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.
Files changed (3) hide show
  1. package/README.ja.md +399 -0
  2. package/README.md +241 -14
  3. package/package.json +1 -1
package/README.ja.md ADDED
@@ -0,0 +1,399 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/kazuph/reviw/main/assets/logo.svg" alt="reviw - Human-in-the-loop Review" width="600">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>AIコーディングワークフローのためのHuman-in-the-loopレビューインターフェース</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/reviw"><img src="https://img.shields.io/npm/v/reviw.svg" alt="npm version"></a>
11
+ <a href="https://github.com/kazuph/reviw/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/reviw.svg" alt="license"></a>
12
+ <a href="./README.md">English</a>
13
+ </p>
14
+
15
+ ---
16
+
17
+ > [!WARNING]
18
+ > **アルファ版ソフトウェア**: このプロジェクトは現在開発中です。破壊的変更、APIの不安定性、機能の不完全さが予想されます。本番環境での使用はご自身の責任でお願いします。
19
+
20
+ ---
21
+
22
+ # reviw
23
+
24
+ 表形式データ、テキスト、Markdown、diffファイルをレビュー・注釈するための軽量ブラウザベースツール。CSV、TSV、プレーンテキスト、Markdown、unified diff形式をサポート。コメントはYAML形式で標準出力に出力されます。
25
+
26
+ ## 機能
27
+
28
+ ### ファイル形式サポート
29
+ - **CSV/TSV**: スティッキーヘッダー、カラム固定、フィルタリング、カラムリサイズ付きで表形式データを表示
30
+ - **Markdown**: 同期スクロール付きサイドバイサイドプレビュー、プレビューからクリックでコメント
31
+ - **Diff/Patch**: シンタックスハイライト付きGitHubスタイルdiffビュー、500行以上の大きなファイルは折りたたみ可能、バイナリファイルは末尾にソート
32
+ - **テキスト**: プレーンテキストファイルの行ごとコメント
33
+
34
+ ### Mermaid.jsダイアグラム
35
+ - MarkdownファイルのMermaidダイアグラムを自動検出・レンダリング
36
+ - ダイアグラムをクリックでフルスクリーンビューアを開く
37
+ - マウスホイールでズーム(カーソル位置を中心に、最大10倍)
38
+ - マウスドラッグでパン
39
+ - 構文エラーはトースト通知で表示
40
+
41
+ ### メディアフルスクリーン
42
+ - Markdownプレビューの画像をクリックでフルスクリーンビューアを開く
43
+ - 動画をクリックでネイティブコントロール付きフルスクリーン再生
44
+ - 画像/動画自体を含む任意の場所をクリックでフルスクリーンオーバーレイを閉じる
45
+ - メディアをクリックするとMarkdownパネルの対応するソース行が自動ハイライト
46
+
47
+ ### UI機能
48
+ - **テーマ切り替え**: ライト/ダークモードの切り替え
49
+ - **複数ファイルサポート**: 複数ファイルを別々のポートで同時に開く
50
+ - **ドラッグ選択**: 矩形領域または複数行を選択してバッチコメント
51
+ - **リアルタイム更新**: SSE経由でファイル変更時にホットリロード
52
+ - **コメント永続化**: localStorageにコメントを自動保存、リカバリーモーダル付き
53
+ - **キーボードショートカット**: Cmd/Ctrl+Enterで送信モーダルを開く
54
+
55
+ ### 出力
56
+ - file、mode、row、col、value、コメントテキストを含むYAML形式
57
+ - レビューノート用のサマリーフィールド
58
+
59
+ ## インストール
60
+
61
+ ```bash
62
+ npm install -g reviw
63
+ ```
64
+
65
+ またはnpxで直接実行:
66
+
67
+ ```bash
68
+ npx reviw <file>
69
+ ```
70
+
71
+ ## 使い方
72
+
73
+ ```bash
74
+ # 単一ファイル
75
+ reviw <file> [--port 4989] [--encoding utf8|shift_jis|...]
76
+
77
+ # 複数ファイル(各ファイルは連続するポートで開く)
78
+ reviw file1.csv file2.md file3.tsv --port 4989
79
+
80
+ # 標準入力からのdiff
81
+ git diff HEAD | reviw
82
+
83
+ # diffファイル
84
+ reviw changes.diff
85
+ ```
86
+
87
+ ### オプション
88
+ - `--port <number>`: 開始ポートを指定(デフォルト: 4989)
89
+ - `--encoding <encoding>`: エンコーディングを強制指定(デフォルトは自動検出)
90
+ - `--no-open`: ブラウザの自動起動を無効化
91
+ - `--help, -h`: ヘルプメッセージを表示
92
+ - `--version, -v`: バージョン番号を表示
93
+
94
+ ### ワークフロー
95
+ 1. ブラウザが自動的に開く(macOS: `open` / Linux: `xdg-open` / Windows: `start`)
96
+ 2. セル/行をクリックしてコメント追加、またはドラッグで複数選択
97
+ 3. Cmd/Ctrl+Enterまたは「Submit & Exit」クリックでコメントを出力
98
+ 4. コメントはYAML形式で標準出力に出力
99
+
100
+ ## スクリーンショット
101
+
102
+ ### CSVビュー
103
+ ![CSV View](https://raw.githubusercontent.com/kazuph/reviw/main/assets/screenshot-csv.png)
104
+
105
+ ### Markdownビュー
106
+ ![Markdown View](https://raw.githubusercontent.com/kazuph/reviw/main/assets/screenshot-md.png)
107
+
108
+ ### Diffビュー
109
+ ![Diff View](https://raw.githubusercontent.com/kazuph/reviw/main/assets/screenshot-diff.png)
110
+
111
+ ### Mermaidフルスクリーン
112
+ ![Mermaid Fullscreen](https://raw.githubusercontent.com/kazuph/reviw/main/assets/screenshot-mermaid.png)
113
+
114
+ ### 送信レビューダイアログ
115
+ ![Submit Review Dialog](https://raw.githubusercontent.com/kazuph/reviw/main/assets/screenshot-submit-dialog.png)
116
+
117
+ ## 出力例
118
+
119
+ ```yaml
120
+ file: data.csv
121
+ mode: csv
122
+ reason: button
123
+ at: '2025-11-26T12:00:00.000Z'
124
+ comments:
125
+ - row: 2
126
+ col: 3
127
+ text: This value needs review
128
+ value: '150'
129
+ summary: Overall the data looks good, minor issues noted above.
130
+ ```
131
+
132
+ ## Claude Codeプラグイン
133
+
134
+ このリポジトリはClaude Codeプラグインマーケットプレイスとしても機能します。プラグインはタスク管理とレビュー自動化でreviwをClaude Codeワークフローに統合します。
135
+
136
+ ### インストール
137
+
138
+ ```bash
139
+ # Claude Codeで
140
+ /plugin marketplace add kazuph/reviw
141
+ /plugin install reviw-plugin@reviw-marketplace
142
+ ```
143
+
144
+ ### プラグインディレクトリ構成
145
+
146
+ ```
147
+ plugin/
148
+ ├── .claude-plugin/
149
+ │ └── plugin.json # プラグインメタデータ(名前、バージョン、説明)
150
+ ├── commands/
151
+ │ ├── do.md # /reviw:doコマンド定義
152
+ │ └── done.md # /reviw:doneコマンド定義
153
+ ├── agents/
154
+ │ └── report-builder.md # レポート生成エージェント
155
+ ├── skills/
156
+ │ ├── artifact-proof/
157
+ │ │ └── SKILL.md # エビデンス収集スキル
158
+ │ └── webapp-testing/
159
+ │ ├── SKILL.md # Webテストスキル
160
+ │ ├── scripts/ # ヘルパースクリプト
161
+ │ └── examples/ # 使用例
162
+ ├── hooks/
163
+ │ └── hooks.json # フック定義
164
+ ├── hooks-handlers/
165
+ │ └── completion-checklist.sh # UserPromptSubmitハンドラ
166
+ └── README.md
167
+ ```
168
+
169
+ ### コンポーネント概要
170
+
171
+ | 種類 | 名前 | 説明 |
172
+ |------|------|------|
173
+ | **コマンド** | `/reviw:do` | タスク開始 - worktree作成、計画、todo登録 |
174
+ | **コマンド** | `/reviw:done` | 完了チェックリスト - エビデンス収集、レビュー開始 |
175
+ | **エージェント** | `report-builder` | ユーザーレビュー用レポート準備 |
176
+ | **スキル** | `artifact-proof` | エビデンス収集(スクリーンショット、動画、ログ) |
177
+ | **スキル** | `webapp-testing` | Playwrightによるブラウザ自動化と検証 |
178
+ | **フック** | PreToolUse | git commit/push前にレビューを促すリマインダー |
179
+ | **フック** | UserPromptSubmit | AI コンテキストに完了チェックリストを注入 |
180
+
181
+ ---
182
+
183
+ ### コマンド
184
+
185
+ #### `/reviw:do <タスク説明>`
186
+
187
+ 適切な環境セットアップで新しいタスクを開始します。
188
+
189
+ **処理内容:**
190
+ 1. 分離開発用のgit worktreeを作成(`feature/<name>`、`fix/<name>`など)
191
+ 2. エビデンス用の`.artifacts/<feature>/`ディレクトリをセットアップ
192
+ 3. 計画とTODOチェックリスト付きの`REPORT.md`を作成
193
+ 4. 進捗追跡用にTodoWriteにtodoを登録
194
+
195
+ **作成されるディレクトリ構成:**
196
+ ```
197
+ .worktree/<feature>/
198
+ └── .artifacts/
199
+ └── <feature>/
200
+ ├── REPORT.md # 計画、進捗、エビデンスリンク
201
+ ├── images/ # スクリーンショット
202
+ └── videos/ # 動画録画
203
+ ```
204
+
205
+ **タスク再開:** セッション開始時またはコンテキスト圧縮後、コマンドは既存のworktreeをチェックし、`REPORT.md`から再開します。
206
+
207
+ #### `/reviw:done`
208
+
209
+ タスク完了を許可する前に完了基準を検証します。
210
+
211
+ **適用されるチェックリスト:**
212
+ - [ ] ビルド成功(型/lintエラーなし)
213
+ - [ ] 開発サーバー起動・動作
214
+ - [ ] `webapp-testing`スキルで検証
215
+ - [ ] `.artifacts/<feature>/`にエビデンス収集
216
+ - [ ] `artifact-proof`スキルでレポート作成
217
+ - [ ] reviwでレビュー(フォアグラウンドモード)
218
+ - [ ] ユーザー承認取得
219
+
220
+ **禁止事項:**
221
+ - 検証なしに「実装完了」と言う
222
+ - reviwレビュー前にコミット/プッシュ
223
+ - エビデンスなしのレポート
224
+
225
+ ---
226
+
227
+ ### エージェント
228
+
229
+ #### `report-builder`
230
+
231
+ レビュー資料準備専門エージェント。
232
+
233
+ **役割:**
234
+ - 実装を構造化レポートに整理
235
+ - エビデンス(スクリーンショット、動画)を収集・配置
236
+ - reviwレビュー用に`REPORT.md`を準備
237
+ - reviwフィードバックを解析してtodoに登録
238
+
239
+ **呼び出し:**
240
+ ```
241
+ Task tool with subagent_type: "report-builder"
242
+ ```
243
+
244
+ **自動読み込みスキル:** `artifact-proof`
245
+
246
+ ---
247
+
248
+ ### スキル
249
+
250
+ #### `artifact-proof`
251
+
252
+ ビジュアルリグレッションとPRドキュメント用のエビデンス収集を管理。
253
+
254
+ **機能:**
255
+ - `.artifacts/<feature>/`配下にスクリーンショットと動画
256
+ - 自動キャプチャ用Playwright統合
257
+ - 動画ファイル用Git LFSセットアップ
258
+ - コミットハッシュ付きPR画像URL(ブランチ削除後も永続)
259
+
260
+ **reviw統合:**
261
+ ```bash
262
+ # reviwでレポートを開く(フォアグラウンド必須)
263
+ npx reviw .artifacts/<feature>/REPORT.md
264
+
265
+ # 動画プレビュー付き
266
+ open .artifacts/<feature>/videos/demo.webm
267
+ npx reviw .artifacts/<feature>/REPORT.md
268
+ ```
269
+
270
+ #### `webapp-testing`
271
+
272
+ Playwrightを使用したブラウザ自動化ツールキット。
273
+
274
+ **機能:**
275
+ - PythonとNode.js Playwrightスクリプト
276
+ - サーバーライフサイクル管理(`scripts/with_server.py`)
277
+ - スクリーンショットと動画キャプチャ
278
+ - コンソールログとネットワークリクエスト監視
279
+ - 高度なデバッグ用CDP統合
280
+
281
+ **クイック検証:**
282
+ ```bash
283
+ node -e "const { chromium } = require('playwright');
284
+ (async () => {
285
+ const browser = await chromium.launch();
286
+ const page = await browser.newPage();
287
+ await page.goto('http://localhost:3000', { waitUntil: 'networkidle' });
288
+ await page.screenshot({ path: '/tmp/webapp.png', fullPage: true });
289
+ await browser.close();
290
+ })();"
291
+ ```
292
+
293
+ ---
294
+
295
+ ### フック
296
+
297
+ #### PreToolUse(Bashマッチャー)
298
+
299
+ `git commit`または`git push`検出時にトリガー。
300
+
301
+ **メッセージ:** コミット前に`/reviw:done`を実行してreviwでレビューするよう促す。
302
+
303
+ #### UserPromptSubmit
304
+
305
+ すべてのAI応答コンテキストに完了チェックリストを注入。
306
+
307
+ **目的:** 適切な検証なしの「実装完了」主張を防止。チェックリストは常にAIに見え、完了基準の一貫した適用を保証。
308
+
309
+ ---
310
+
311
+ ### ワークフロー
312
+
313
+ ```
314
+ /reviw:do <タスク説明>
315
+
316
+ Worktree作成 + 計画 + TodoWrite
317
+
318
+ 実装(サブエージェント経由)
319
+
320
+ ビルド & 検証(webapp-testing)
321
+
322
+ /reviw:done
323
+
324
+ エビデンス収集(artifact-proof)
325
+
326
+ npx reviwでレポートを開く(フォアグラウンド)
327
+
328
+ ユーザーコメント → Submit & Exit
329
+
330
+ フィードバックをTodoに登録
331
+
332
+ 修正 → 承認まで再レビュー
333
+
334
+ コミット & PR(承認後のみ)
335
+ ```
336
+
337
+ ### 完了基準
338
+
339
+ | ステージ | 内容 | ステータス |
340
+ |----------|------|----------|
341
+ | 1/3 | 実装完了 | まだ報告しない |
342
+ | 2/3 | ビルド、起動、検証完了 | まだ報告しない |
343
+ | 3/3 | reviwでレビュー → ユーザー承認 | 完了 |
344
+
345
+ ### 設計思想
346
+
347
+ プラグインは**Human-in-the-loop**開発を強制します:
348
+
349
+ 1. **ショートカットなし:** モック、バイパス、検証スキップは禁止
350
+ 2. **エビデンス必須:** すべての完了主張にはスクリーンショット/動画が必要
351
+ 3. **ユーザー承認:** ユーザーのみがタスクを完了としてマークできる
352
+ 4. **コンテキスト保持:** 重い操作はサブエージェントで実行してコンテキスト枯渇を防止
353
+
354
+ ### `.artifacts`ディレクトリポリシー
355
+
356
+ `.artifacts/`ディレクトリは開発中に生成されたスクリーンショット、動画、レポートを保存します。**デフォルトでは、このディレクトリは`.gitignore`に追加すべきです**。大きなメディアファイルによるリポジトリ肥大化を防ぎます。
357
+
358
+ ```bash
359
+ # .gitignoreに追加(推奨)
360
+ echo ".artifacts" >> .gitignore
361
+ ```
362
+
363
+ **デフォルトで除外する理由:**
364
+ - スクリーンショットと動画は大きくなる可能性がある(特に画面録画)
365
+ - エビデンスは主にレビュープロセス用で、永続的なドキュメントではない
366
+ - リポジトリサイズを管理可能に保つ
367
+
368
+ **特定のエビデンスをコミットしたい場合:**
369
+
370
+ `git add --force`で明示的にファイルを追加:
371
+
372
+ ```bash
373
+ # 特定のエビデンスファイルを強制追加
374
+ git add --force .artifacts/feature/images/final-screenshot.png
375
+ git add --force .artifacts/feature/REPORT.md
376
+
377
+ # または機能全体のエビデンスを強制追加
378
+ git add --force .artifacts/feature/
379
+ ```
380
+
381
+ **動画ファイル**の場合、リポジトリ肥大化を避けるためGit LFSを使用:
382
+
383
+ ```bash
384
+ git lfs track "*.mp4" "*.webm" "*.mov"
385
+ git add .gitattributes
386
+ git add --force .artifacts/feature/videos/demo.mp4
387
+ ```
388
+
389
+ このアプローチで完全なコントロールが可能: デフォルトで除外、必要なものだけをコミット。
390
+
391
+ ## 開発
392
+
393
+ - メインソース: `cli.cjs`
394
+ - テスト: `npm test`(vitest + playwright)
395
+ - プラグイン: `plugin/`ディレクトリ
396
+
397
+ ## ライセンス
398
+
399
+ MIT
package/README.md CHANGED
@@ -1,3 +1,24 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/kazuph/reviw/main/assets/logo.svg" alt="reviw - Human-in-the-loop Review" width="600">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>Human-in-the-loop review interface for AI coding workflows</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/reviw"><img src="https://img.shields.io/npm/v/reviw.svg" alt="npm version"></a>
11
+ <a href="https://github.com/kazuph/reviw/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/reviw.svg" alt="license"></a>
12
+ <a href="./README.ja.md">日本語</a>
13
+ </p>
14
+
15
+ ---
16
+
17
+ > [!WARNING]
18
+ > **Alpha Software**: This project is in active development. Expect breaking changes, API instability, and incomplete features. Use at your own risk in production environments.
19
+
20
+ ---
21
+
1
22
  # reviw
2
23
 
3
24
  A lightweight browser-based tool for reviewing and annotating tabular data, text, Markdown, and diff files. Supports CSV, TSV, plain text, Markdown, and unified diff formats. Comments are output as YAML to stdout.
@@ -120,29 +141,187 @@ This repository also serves as a Claude Code plugin marketplace. The plugin inte
120
141
  /plugin install reviw-plugin@reviw-marketplace
121
142
  ```
122
143
 
123
- ### Plugin Features
144
+ ### Plugin Directory Structure
145
+
146
+ ```
147
+ plugin/
148
+ ├── .claude-plugin/
149
+ │ └── plugin.json # Plugin metadata (name, version, description)
150
+ ├── commands/
151
+ │ ├── do.md # /reviw:do command definition
152
+ │ └── done.md # /reviw:done command definition
153
+ ├── agents/
154
+ │ └── report-builder.md # Report generation agent
155
+ ├── skills/
156
+ │ ├── artifact-proof/
157
+ │ │ └── SKILL.md # Evidence collection skill
158
+ │ └── webapp-testing/
159
+ │ ├── SKILL.md # Web testing skill
160
+ │ ├── scripts/ # Helper scripts
161
+ │ └── examples/ # Usage examples
162
+ ├── hooks/
163
+ │ └── hooks.json # Hook definitions
164
+ ├── hooks-handlers/
165
+ │ └── completion-checklist.sh # UserPromptSubmit handler
166
+ └── README.md
167
+ ```
168
+
169
+ ### Components Overview
124
170
 
125
- | Component | Name | Description |
126
- |-----------|------|-------------|
171
+ | Type | Name | Description |
172
+ |------|------|-------------|
127
173
  | **Command** | `/reviw:do` | Start a task - create worktree, plan, register todos |
128
- | **Command** | `/reviw:done` | Complete checklist - collect evidence, start review with reviw |
174
+ | **Command** | `/reviw:done` | Complete checklist - collect evidence, start review |
129
175
  | **Agent** | `report-builder` | Prepare reports and evidence for user review |
130
- | **Skill** | `artifact-proof` | Collect evidence (screenshots, videos, logs) + reviw review workflow |
176
+ | **Skill** | `artifact-proof` | Collect evidence (screenshots, videos, logs) |
177
+ | **Skill** | `webapp-testing` | Browser automation and verification with Playwright |
131
178
  | **Hook** | PreToolUse | Remind to review before git commit/push |
132
- | **Hook** | Stop | Warn if task is still in progress |
179
+ | **Hook** | UserPromptSubmit | Inject completion checklist into AI context |
180
+
181
+ ---
182
+
183
+ ### Commands
184
+
185
+ #### `/reviw:do <task description>`
186
+
187
+ Starts a new task with proper environment setup.
188
+
189
+ **What it does:**
190
+ 1. Creates a git worktree for isolated development (`feature/<name>`, `fix/<name>`, etc.)
191
+ 2. Sets up `.artifacts/<feature>/` directory for evidence
192
+ 3. Creates `REPORT.md` with plan and TODO checklist
193
+ 4. Registers todos in TodoWrite for progress tracking
194
+
195
+ **Directory structure created:**
196
+ ```
197
+ .worktree/<feature>/
198
+ └── .artifacts/
199
+ └── <feature>/
200
+ ├── REPORT.md # Plan, progress, evidence links
201
+ ├── images/ # Screenshots
202
+ └── videos/ # Video recordings
203
+ ```
204
+
205
+ **Task resumption:** When a session starts or after context compaction, the command checks for existing worktrees and resumes from `REPORT.md`.
206
+
207
+ #### `/reviw:done`
208
+
209
+ Validates completion criteria before allowing task completion.
210
+
211
+ **Checklist enforced:**
212
+ - [ ] Build succeeded (no type/lint errors)
213
+ - [ ] Development server started and working
214
+ - [ ] Verified with `webapp-testing` skill
215
+ - [ ] Evidence collected in `.artifacts/<feature>/`
216
+ - [ ] Report created with `artifact-proof` skill
217
+ - [ ] Reviewed with reviw (foreground mode)
218
+ - [ ] User approval received
219
+
220
+ **Prohibited:**
221
+ - Saying "implementation complete" without verification
222
+ - Committing/pushing before reviw review
223
+ - Reports without evidence
224
+
225
+ ---
226
+
227
+ ### Agent
228
+
229
+ #### `report-builder`
230
+
231
+ Specialized agent for preparing review materials.
232
+
233
+ **Role:**
234
+ - Organize implementation into a structured report
235
+ - Collect and arrange evidence (screenshots, videos)
236
+ - Prepare `REPORT.md` for reviw review
237
+ - Parse reviw feedback and register as todos
238
+
239
+ **Invocation:**
240
+ ```
241
+ Task tool with subagent_type: "report-builder"
242
+ ```
243
+
244
+ **Skills auto-loaded:** `artifact-proof`
245
+
246
+ ---
247
+
248
+ ### Skills
249
+
250
+ #### `artifact-proof`
251
+
252
+ Manages evidence collection for visual regression and PR documentation.
253
+
254
+ **Features:**
255
+ - Screenshots and videos under `.artifacts/<feature>/`
256
+ - Playwright integration for automated capture
257
+ - Git LFS setup for video files
258
+ - PR image URLs with commit hashes (persist after branch deletion)
259
+
260
+ **reviw integration:**
261
+ ```bash
262
+ # Open report in reviw (foreground required)
263
+ npx reviw .artifacts/<feature>/REPORT.md
264
+
265
+ # With video preview
266
+ open .artifacts/<feature>/videos/demo.webm
267
+ npx reviw .artifacts/<feature>/REPORT.md
268
+ ```
269
+
270
+ #### `webapp-testing`
271
+
272
+ Browser automation toolkit using Playwright.
273
+
274
+ **Features:**
275
+ - Python and Node.js Playwright scripts
276
+ - Server lifecycle management (`scripts/with_server.py`)
277
+ - Screenshot and video capture
278
+ - Console log and network request monitoring
279
+ - CDP integration for advanced debugging
280
+
281
+ **Quick verification:**
282
+ ```bash
283
+ node -e "const { chromium } = require('playwright');
284
+ (async () => {
285
+ const browser = await chromium.launch();
286
+ const page = await browser.newPage();
287
+ await page.goto('http://localhost:3000', { waitUntil: 'networkidle' });
288
+ await page.screenshot({ path: '/tmp/webapp.png', fullPage: true });
289
+ await browser.close();
290
+ })();"
291
+ ```
292
+
293
+ ---
294
+
295
+ ### Hooks
296
+
297
+ #### PreToolUse (Bash matcher)
298
+
299
+ Triggers when `git commit` or `git push` is detected.
300
+
301
+ **Message:** Reminds to run `/reviw:done` and review with reviw before committing.
302
+
303
+ #### UserPromptSubmit
304
+
305
+ Injects completion checklist into every AI response context.
306
+
307
+ **Purpose:** Prevents "implementation complete" claims without proper verification. The checklist is always visible to the AI, ensuring consistent enforcement of completion criteria.
308
+
309
+ ---
133
310
 
134
311
  ### Workflow
135
312
 
136
313
  ```
137
314
  /reviw:do <task description>
138
315
 
139
- Create worktree + Plan
316
+ Create worktree + Plan + TodoWrite
317
+
318
+ Implementation (via subagents)
140
319
 
141
- Implementation
320
+ Build & Verify (webapp-testing)
142
321
 
143
322
  /reviw:done
144
323
 
145
- Collect evidence + Create report
324
+ Collect evidence (artifact-proof)
146
325
 
147
326
  npx reviw opens report (foreground)
148
327
 
@@ -151,15 +330,63 @@ User comments → Submit & Exit
151
330
  Register feedback to Todo
152
331
 
153
332
  Fix → Re-review until approved
333
+
334
+ Commit & PR (only after approval)
154
335
  ```
155
336
 
156
337
  ### Completion Criteria
157
338
 
158
- | Stage | Content |
159
- |-------|---------|
160
- | 1/3 | Implementation complete |
161
- | 2/3 | Build, start, verification complete |
162
- | 3/3 | Review with reviw → User approval |
339
+ | Stage | Content | Status |
340
+ |-------|---------|--------|
341
+ | 1/3 | Implementation complete | Do not report yet |
342
+ | 2/3 | Build, start, verification complete | Do not report yet |
343
+ | 3/3 | Review with reviw → User approval | Now complete |
344
+
345
+ ### Design Philosophy
346
+
347
+ The plugin enforces **human-in-the-loop** development:
348
+
349
+ 1. **No shortcuts:** Mocks, bypasses, and skipped verifications are prohibited
350
+ 2. **Evidence required:** Every completion claim must have screenshots/videos
351
+ 3. **User approval:** Only the user can mark a task as complete
352
+ 4. **Context preservation:** Heavy operations run in subagents to prevent context exhaustion
353
+
354
+ ### `.artifacts` Directory Policy
355
+
356
+ The `.artifacts/` directory stores screenshots, videos, and reports generated during development. **By default, this directory should be added to `.gitignore`** to prevent repository bloat from large media files.
357
+
358
+ ```bash
359
+ # Add to .gitignore (recommended)
360
+ echo ".artifacts" >> .gitignore
361
+ ```
362
+
363
+ **Why ignore by default:**
364
+ - Screenshots and videos can be large (especially screen recordings)
365
+ - Evidence is primarily for the review process, not permanent documentation
366
+ - Keeps repository size manageable
367
+
368
+ **If you need to commit specific evidence:**
369
+
370
+ Use `git add --force` to explicitly add files you want to preserve:
371
+
372
+ ```bash
373
+ # Force add specific evidence files
374
+ git add --force .artifacts/feature/images/final-screenshot.png
375
+ git add --force .artifacts/feature/REPORT.md
376
+
377
+ # Or force add an entire feature's evidence
378
+ git add --force .artifacts/feature/
379
+ ```
380
+
381
+ **For video files**, use Git LFS to avoid bloating the repository:
382
+
383
+ ```bash
384
+ git lfs track "*.mp4" "*.webm" "*.mov"
385
+ git add .gitattributes
386
+ git add --force .artifacts/feature/videos/demo.mp4
387
+ ```
388
+
389
+ This approach gives you full control: ignore by default, commit only what matters.
163
390
 
164
391
  ## Development
165
392
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reviw",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "description": "Lightweight file reviewer with in-browser comments for CSV, TSV, Markdown, and Git diffs.",
5
5
  "type": "module",
6
6
  "bin": {