Skip to content

[Feature Request] plannotator annotate <file.md> - Annotate any markdown file #109

@theflysurfer

Description

@theflysurfer

Problem

Currently, Plannotator only works with plans from the ExitPlanMode hook. However, the annotation system (DELETION, INSERTION, REPLACEMENT, COMMENT) is powerful and could be useful for any markdown file in a repository.

Use Case

When working with Claude Code, I often want to:

  1. Open a documentation file (README, CONTRIBUTING, etc.)
  2. Visually annotate specific sections that need changes
  3. Send structured feedback to Claude to apply corrections

This workflow is currently not possible without the ExitPlanMode hook trigger.

Proposed Solution

Add a new subcommand plannotator annotate <file.md> that:

  1. Reads any markdown file from disk
  2. Opens the existing plan UI for annotation
  3. Outputs structured feedback to stdout (like the review command)

CLI usage:

plannotator annotate README.md

Slash command:

/plannotator-annotate docs/GUIDE.md

Implementation

I have a working implementation ready:

  • New packages/server/annotate.ts (~100 lines, simplified version of plan server)
  • CLI subcommand in apps/hook/server/index.ts (~40 lines)
  • Slash command apps/hook/commands/plannotator-annotate.md

The implementation reuses the existing UI and exportDiff() function - minimal changes to core packages.

Branch with implementation: https://github.com/theflysurfer/plannotator/tree/feature/annotate-any-md

Would this be welcome?

I'd be happy to submit a PR if this aligns with the project's direction. Let me know if you'd like any changes to the approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions