How backnotprop/plannotator works
Plannotator is a local browser-based review surface for AI coding agents. Users submit a plan, document, agent message, HTML artifact, or code change; an agent integration or CLI opens the relevant review surface, users annotate or review it, and feedback can be returned to the agent. Code review, AI-assisted review, guide sharing, and saved plan history are significant additional capabilities. The README documents the workflows; sampled excerpts are partial, so internal wiring beyond those documented flows is shown conservatively.
Main entry points: editor/App.tsx Document Editor · review-editor/App.tsx Code Review UI · index.ts Review Server · review.ts Review API
Components 21
Agent Integrations
- Agent Hooks
apps/hook/server/index.ts - OpenCode Plugin
apps/opencode-plugin/index.ts - Pi Extension
apps/pi-extension/index.ts - Droid Commands
apps/droid-plugin/commands/plannotator-annotate.js - CLI Entry
bin/plannotator.js
Review Surfaces
- Document Editor
packages/editor/App.tsx - Code Review UI
packages/review-editor/App.tsx - Guide Viewer
packages/guide-viewer/GuideViewer.tsx
Local Runtime
- Review Server
packages/server/index.ts - Review API
packages/server/review.ts - Review State
packages/server/storage.ts
Review Logic
- Annotation Logic
packages/core/annotation-threads.ts - Diff Processing
packages/shared/semantic-diff.ts - AI Sessions
packages/ai/session-manager.ts - Plan History
packages/shared/storage.ts
Sharing Services
- Guide Sharing
packages/server/guide/guide-share.ts - Encrypted Paste
apps/paste-service/core/handler.ts
Other components
- Developer
- Coding Agent
- Git / PR Providers
- AI Providers
Connections 31
- Coding Agent → Agent Hooks: submits plan
- Coding Agent → OpenCode Plugin: invokes plugin
- Coding Agent → Pi Extension: invokes extension
- Coding Agent → Droid Commands: invokes command
- Developer → CLI Entry: runs command
- Agent Hooks → Document Editor: opens review
- OpenCode Plugin → Document Editor: opens review
- Pi Extension → Document Editor: opens review
- Droid Commands → Document Editor: opens review
- CLI Entry → Review Server: starts session
- Review Server → Document Editor: serves editor
- Review Server → Code Review UI: serves review
- Developer → Document Editor: annotates document
- Developer → Code Review UI: reviews changes
- Document Editor → Annotation Logic: records annotations
- Document Editor → Plan History: saves decisions
- Document Editor → Guide Sharing: shares guide
- Guide Sharing → Encrypted Paste: stores ciphertext
- Developer → Review Server: starts code review
- Review Server → Review API: handles requests
- Review API → Git / PR Providers: loads PR data
- Review API → Diff Processing: processes changes
- Review API → Review State: persists state
- Code Review UI → Review API: requests review data
- Code Review UI → AI Sessions: requests AI review
- Document Editor → AI Sessions: asks questions
- AI Sessions → AI Providers: sends context
- Code Review UI → Annotation Logic: creates review comments
- Code Review UI → Coding Agent: returns feedback
- Document Editor → Coding Agent: returns feedback
- Developer → Guide Viewer: views shared guide