feat(annotate): add external agent instructions - #1138
Open
leoreisdias wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Plannotator already exposes
/api/external-annotationsin Annotate sessions, but the UI hid the Options → Agent Instructions action there. External agents could technically post feedback, yet users had no built-in way to hand an agent the exact session URL and the annotate-specific request shape.This PR makes that existing capability discoverable in Annotate without adding another optional skill or changing the server API.
Motivation
The workflow that motivated this is a conversational review with GPT Live: open a document in Plannotator, talk through it with GPT Live, and let the agent add external annotations to the live session as findings come up. Those comments then remain visible in Plannotator for the user to inspect, edit, or remove before sending feedback.
A session-specific copy action fits that workflow better than an extra skill because the receiving agent may not have Plannotator skills installed. The copied payload is portable and carries the exact localhost origin, expected mode, annotation schema, and safety boundaries the external agent needs.
What changed
annotate-last, including mode verification, document reading, inline comments, global comments, batching, and source-scoped cleanupNo new endpoint or external-annotation storage behavior is introduced.
Review focus
The important behavior is the mode split in the copied contract:
COMMENT/GLOBAL_COMMENTAPI/api/planbefore postingTest plan
5 pass)bun run build:reviewbun run build:hook./bin/plannotator.js annotate README.md: confirmed Options → Agent Instructions appears and the copied payload works with the live session