How petergyang/human-review works
Human Review is a local browser-based review tool for HTML, Markdown, and localhost pages. A user opens a target through the CLI; the local server presents it in a review interface where edits and comments are collected and sent as a batch for the AI agent to apply. The README documents a broad set of editing and commenting capabilities; sampled SDK and client code supports the editing, anchoring, undo, and handoff roles shown here. Unsampled routes and internal call details are omitted where wiring is uncertain.
Main entry points: server.js Review server · chrome-client.js Review interface · sdk.js Artifact SDK · cli.js CLI commands
Components 19
Entry and Handoff
- CLI commands
src/cli.js - Agent instructions
src/SKILL.md - Skill setup
src/setup.js
Review Session
- Review server
src/server.js - Review interface
src/chrome-client.js - Review shell
src/chrome.html - Session helpers
src/chrome-session.js
Artifact Editing
- Artifact SDK
src/sdk.js - Edit operations
src/editing.js - Comment anchoring
src/anchor-text.js - Document serialization
src/serialize.js - Frame security
src/frame-policy.js
Persistence and Rendering
- Review state
src/state.js - Target identity
src/paths.js - HTML bootstrap
src/html-transform.js - Markdown renderer
src/markdown.js
Other components
- Reviewer
- AI agent
- Localhost page
Connections 25
- Reviewer → CLI commands: opens target
- CLI commands → Review server: starts or requests
- CLI commands → AI agent: polls for batch
- AI agent → Skill setup: requests skill setup
- Skill setup → Agent instructions: installs instructions
- Agent instructions → AI agent: guides review
- CLI commands → Target identity: canonicalizes target
- Review server → Review state: reads and writes state
- Review server → Target identity: resolves target
- Review server → HTML bootstrap: injects or strips SDK
- Review server → Markdown renderer: renders Markdown
- Review server → Review shell: serves review shell
- Review server → Review interface: serves client
- Review server → Localhost page: loads localhost page
- Reviewer → Review interface: reviews and sends
- Review interface → Review server: requests pages and submits batch
- Review interface → Session helpers: uses page helpers
- Review interface → Frame security: sets iframe sandbox
- Review interface → Artifact SDK: exchanges messages
- Artifact SDK → Edit operations: applies edit decisions
- Artifact SDK → Comment anchoring: resolves comment quotes
- Artifact SDK → Document serialization: serializes document
- Artifact SDK → Review interface: reports edits and comments
- Review server → AI agent: delivers feedback batch
- Markdown renderer → AI agent: loads diagrams