Skip to content

docs: add AI Work Panel feasibility study and architectural roadmap (#274) - #280

Merged
petertzy merged 3 commits into
petertzy:mainfrom
GhananilShirpurkar:docs/ai-work-panel-feasibility-study
Sep 29, 2026
Merged

petertzy merged 3 commits into
petertzy:mainfrom
GhananilShirpurkar:docs/ai-work-panel-feasibility-study

Conversation

@GhananilShirpurkar

Copy link
Copy Markdown
Contributor

Summary

Addresses #274

Adds an architectural feasibility study and technical roadmap document (docs/AIWorkPanelFeasibilityStudy.md) detailing the system design, user interaction flow, and backend protocol for introducing an AI Work Panel capable of direct document modification.

Key Sections Covered

  1. Core Distinction: Analyzes differences between the existing conversational AI Chat Assistant and the proposed task-oriented Work Panel.
  2. Phase 1 Architecture:
    • Single-document context extraction and token budget handling.
    • Safe modification via monaco.executeEdits to preserve the complete undo/redo stack (Ctrl+Z).
    • Clean markdown output enforcement on LLM prompts.
  3. Phase 2 Expansion: Project-wide automated batch workflows (unattended translation, book compilation).
  4. Documentation Integration: Added to mkdocs.yml navigation for project documentation.

Copilot AI lite review requested due to automatic review settings September 27, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The document contains an incorrect Monaco API recommendation and an unresolved stale-document safety gap.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
What changed in this PR

Adds a feasibility study and architectural roadmap for a future AI Work Panel.

Changes:

  • Documents single-document editing, undo handling, and backend integration.
  • Describes future project-wide AI workflows.
  • Adds the study to MkDocs navigation.
File Summary
mkdocs.yml Registers the feasibility study in documentation navigation.
docs/​AIWorkPanelFeasibilityStudy.md Documents the proposed Work Panel architecture, UX, editing workflow, and roadmap.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/AIWorkPanelFeasibilityStudy.md Outdated
Comment on lines +71 to +73
3. **Diff & Review Experience:**
- Provide an optional side-by-side or inline diff preview before applying destructive changes.
- Users can choose between **"Apply Directly"** (with instant undo) and **"Review Diff"**.
Comment thread docs/AIWorkPanelFeasibilityStudy.md Outdated

1. **Preserving Monaco Undo/Redo History:**
- Replacing the entire document via `editor.setValue()` destroys Monaco's undo stack, causing frustration if the user wants to revert.
- **Recommended Approach:** Use `monaco.executeEdits("ai-work", [{ range: fullRange, text: newContent }])` and push an undo stop via `model.pushStackElement()`. This ensures that pressing `Ctrl+Z` / `Cmd+Z` restores the exact pre-AI state.
Comment thread docs/AIWorkPanelFeasibilityStudy.md Outdated
@@ -0,0 +1,96 @@
# Feasibility Study: AI Work Panel and Future Project Direction

> **Issue Reference:** Closes [#274](https://github.com/petertzy/markdown-reader/issues/274)
Comment thread docs/AIWorkPanelFeasibilityStudy.md Outdated
Comment on lines +22 to +25
| **Output Type** | Conversational prose and markdown snippets | Direct document edits / diffs |
| **Context Scope** | Prompt + selected snippet | Full active document + selection + metadata |
| **User Interaction** | Read and manually copy/paste snippets | Review changes and accept/revert with one click |
| **Editor Integration** | Passive | Active (`executeEdits` with undo-stack preservation) |
GhananilShirpurkar and others added 2 commits September 27, 2026 22:39
- update Monaco API reference to editor.executeEdits on mounted instance
- add stale-document concurrency guard protocol using baseDocHash
- remove misleading Closes directive from issue reference metadata
- accurately distinguish existing AI Chat proposal flow from Work Panel
@petertzy

Copy link
Copy Markdown
Owner

This PR updates the feasibility study to accurately describe the existing AI Chat proposal flow, clarify Monaco undo behavior as an implementation detail requiring validation, and require stale document checks both when results return and immediately before applying them. It also replaces overly definitive safety and feasibility claims with a recommendation to validate them in a Phase 1 prototype.

Frontend tests pass (8/8), and git diff --check passes. The documentation changes fit the scope of issue #274. Recommended: approve and merge.

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.

3 participants