Skip to content

feat(extensions): Word comment-driven agent MCP server (Tanay Jha) - #123

Open
geektan123 wants to merge 1 commit into
superdocsapp:mainfrom
geektan123:feat/word-comment-agent
Open

feat(extensions): Word comment-driven agent MCP server (Tanay Jha)#123
geektan123 wants to merge 1 commit into
superdocsapp:mainfrom
geektan123:feat/word-comment-agent

Conversation

@geektan123

Copy link
Copy Markdown

Author

Tanay Jha (@geektan123)

Overview

Word Comment-Driven Agent that reads every unresolved Word comment, maps each comment to its exact anchored text range in OpenXML, sends scoped edit instructions to the SuperDocs REST API, presents proposed revisions for Human-in-the-Loop review, and surgically writes approved edits back into the original .docx file while resolving comment threads.

Features & Architecture

  • Option B Architectural Ownership: SuperDocs AI provides intelligence; local docx_writer.py performs in-place OpenXML range mutations on the source .docx, guaranteeing 100% byte-for-byte fidelity for un-commented text.
  • FastMCP Server: Exposes 4 domain-specific tools (inspect_word_comments, propose_comment_edits, review_comment_changes, export_word_document).
  • Human-in-the-Loop Gate: Rejections leave text and comments untouched; supports human override_text in review decisions.
  • Automated 'No Change Needed' Detection: Automatically detects and skips comments indicating no edit required.
  • SuperDocs API Hardening: Progressive polling backoff, cold-session warm-up retry, session isolation per comment (session_{review_id}_{comment_id}), and double JSON parsing.
  • Verification Oracle: Post-export verification oracle re-parses output .docx XML to verify character-for-character range accuracy.
  • 100% Passing Test Suite: Pytest suite runs completely offline without live API keys.

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