Skip to content

Conversation

@theflysurfer
Copy link

Summary

This PR adds 5 features that transform Plannotator into a comprehensive document review system for AI-assisted development workflows:

1. Review Tags

Methodology-based annotation tags for clear AI feedback:

  • Modification: @TODO, @FIX, @CLARIFY, @MISSING, @ADD-EXAMPLE
  • Verification: @VERIFY, @VERIFY-SOURCES, @CHECK-FORMULA, @CHECK-LINK
  • Validation: @OK, @APPROVED, @LOCKED

2. [MACRO] Flag

Toggle to mark annotations with cross-document impact. Signals to AI that related files should be checked.

3. Annotate Mode

Annotate any markdown file (not just plans):

plannotator annotate README.md
/plannotator-annotate CLAUDE.md

4. Persistent Validation Markers

Save @OK/@APPROVED/@LOCKED tags to source files as HTML comments:

<!-- @APPROVED by="alice" date="2026-01-30" -->
## Database Schema

5. Plan Evolution Tracking

Version comparison with git-diff style split view:

  • Auto-saves plan history on each review
  • LCS-based block diffing algorithm
  • Synchronized scroll between columns

Files Changed

Feature Key Files
Review Tags packages/core/types.ts, packages/ui/components/AnnotationToolbar.tsx
MACRO Flag packages/ui/components/AnnotationToolbar.tsx
Annotate Mode packages/server/annotate.ts, apps/hook/commands/plannotator-annotate.md
Markers packages/core/markers.ts
Evolution packages/core/planDiff.ts, packages/server/planHistory.ts, packages/ui/components/PlanEvolutionPanel.tsx

Test Plan

  • Review tags appear in toolbar dropdown
  • MACRO flag toggles and exports correctly
  • Annotate mode opens any markdown file
  • Markers save to source file as HTML comments
  • Evolution panel shows version comparison
  • Scroll sync works bidirectionally

Screenshots

See individual PR documentation in docs/ folder for detailed descriptions.


🤖 Generated with Claude Code

theflysurfer and others added 9 commits January 26, 2026 16:16
- Add ReviewTag enum with modification/verification/validation categories
- Add [MACRO] flag for cross-document impact annotations
- Add tag dropdown in AnnotationToolbar
- Add [MACRO] toggle button with warning styling
- Display tags and [MACRO] badges in AnnotationPanel
- Include tags and [MACRO] in exportDiff feedback
- Add Save Markers button (annotate mode) to persist validation markers
- Add /api/save-markers endpoint in annotate server
- Add extractValidationMarkers/injectValidationMarkers in markers.ts
- Add plannotator annotate <file> subcommand
- Add /plannotator-annotate slash command
- Add version tracking with planVersions Map

Co-Authored-By: Claude <noreply@anthropic.com>
Upstream changes (v0.6.5-v0.6.7):
- Add Comment mode and type-to-comment shortcut (backnotprop#93, backnotprop#97)
- Smart detection for agent switching in OpenCode (backnotprop#96)
- Use primary_tools config for sub-agent blocking (backnotprop#95)
- OpenCode plugin updates (CVE + sub-agent fix) (backnotprop#90)
- Increase hook timeout to 4 days (backnotprop#88)
- Preserve newlines in copy and add Cmd+C shortcut (backnotprop#87)

Custom features preserved:
- Review methodology tags (@todo, @fix, @verify, etc.)
- [MACRO] flag for cross-document impact annotations
- Annotate mode for arbitrary markdown files
- Persistent validation markers (Save Markers button)
- @plannotator/core package with shared types

Conflict resolution:
- packages/ui/types.ts: Keep re-export from @plannotator/core
- packages/core/types.ts: Add 'comment' to EditorMode
- bun.lock: Regenerated

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Remove build:opencode from package.json scripts
- Update CLAUDE.md to remove OpenCode documentation
- Simplify build command to just build:hook

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
In annotate mode, there's no plan to approve - only feedback to send.
The Approve button and its separator are now hidden when mode=annotate.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Use PLANNOTATOR_CWD env var to get original working directory
- Strip @ prefix from file paths (Claude Code reference syntax)
- Add debug logging (PLANNOTATOR_DEBUG=1)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Script is hard-linked to ~/.claude/scripts/ for Claude Code integration.
Handles Unix-to-Windows path conversion for cygpath/Git Bash environments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add planHistory.ts for versioned plan storage (auto-save on review)
- Add planDiff.ts with LCS algorithm for block-level comparison
- Add PlanEvolutionPanel.tsx split view component
- Add API endpoints: /api/plan/versions, /api/plan/diff, /api/plan/version
- Integrate "Evolution" button in editor header

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Combines:
- Our evolution panel feature (plan versioning, block-level diff)
- Upstream's mermaid diagram support and repo info display

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Implement bidirectional scroll sync between diff columns
- Add forwardRef to DiffColumn component for ref access
- Create PR documentation for all custom features:
  - Review tags (@todo, @fix, @verify, @ok...)
  - [MACRO] flag for cross-document impact
  - Annotate mode for any markdown file
  - Persistent validation markers
  - Plan evolution tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant