10 KiB
Project Thoth Application
ChatGPT Capture Connector MVP
Architecture and Sprint Plan
Version 0.1
Purpose
This document defines the architecture and implementation plan for the first Project Thoth Capture Connector MVP.
The MVP will create a browser extension that captures the currently open ChatGPT conversation and saves it as a Markdown file to the user's local Downloads folder.
This MVP validates the Capture Connector boundary before the Project Thoth application exists.
Product Boundary
Project Thoth has two systems.
System 1: Capture Connectors
System 2: Project Thoth Application
This sprint implements only the first MVP Capture Connector.
MVP Definition
The MVP browser extension must:
-
Present a browser toolbar button.
-
Assume the user is already logged into ChatGPT.
-
Assume a ChatGPT conversation is open in the current browser tab.
-
Capture the visible/current conversation content.
-
Preserve message order as well as practical.
-
Preserve user and assistant content as well as practical.
-
Export the captured conversation as Markdown.
-
Save the file to the local Downloads folder.
-
Avoid all AI processing.
-
Avoid all Project Thoth application dependencies.
Non-Goals
The MVP will not:
-
Generate Source Metadata.
-
Generate Conversation Manifests.
-
Generate Harvest artifacts.
-
Call a local LLM.
-
Call a frontier LLM.
-
Write directly to the vault.
-
Sync with Open WebUI.
-
Manage Knowledge Collections.
-
Support Gemini.
-
Support Copilot.
-
Support Outlook.
-
Support PDFs.
-
Provide a full desktop application.
Architectural Principle
Capture Connectors do not reason. They only capture and transmit source material.
For this MVP, "transmit" means saving a Markdown file to Downloads.
Technical Platform
The MVP should use a Manifest V3 browser extension.
Manifest V3 is the current Chrome extensions platform, and every extension requires a manifest.json file that defines extension metadata, permissions, and behavior.
The MVP should initially target:
Google Chrome / Microsoft Edge
because both use the Chromium extension model.
High-Level Architecture
User opens ChatGPT conversation
↓
User clicks Project Thoth browser button
↓
Extension receives active tab permission
↓
Content script extracts conversation content
↓
Extension normalizes content into Markdown
↓
Extension saves file to Downloads
Chrome's activeTab permission grants temporary access to the current tab when the user invokes the extension, which matches the intended "click to capture this page" UX.
Content scripts can run in the context of a web page and read page content through standard Web APIs, which is the mechanism the extension will use to inspect the ChatGPT page.
Component Architecture
1. Browser Action
Purpose:
-
Provide the toolbar button.
-
Trigger capture.
User-facing label:
Save to Project Thoth
Codex implementation required.
2. Manifest Configuration
Purpose:
-
Define extension metadata.
-
Request minimal permissions.
-
Register the service worker.
-
Configure content script execution or script injection.
Likely permissions:
"permissions": ["activeTab", "scripting", "downloads"]
Likely host permissions:
"host_permissions": ["https://chatgpt.com/*", "https://chat.openai.com/*"]
Chrome extensions must declare permissions in the manifest to use extension APIs.
Codex implementation required.
3. Service Worker
Purpose:
-
Listen for toolbar button clicks.
-
Inject or invoke the content script.
-
Receive extracted content.
-
Create Markdown file.
-
Save through browser download API.
Codex implementation required.
4. ChatGPT Content Extractor
Purpose:
-
Inspect the current ChatGPT conversation page.
-
Extract message blocks.
-
Preserve ordering.
-
Detect speaker role when possible.
-
Preserve Markdown-like formatting where possible.
Expected output:
{
"sourcePlatform": "ChatGPT",
"title": "Detected conversation title",
"url": "https://chatgpt.com/...",
"capturedAt": "2026-07-07T...",
"messages": [
{
"role": "user",
"content": "..."
},
{
"role": "assistant",
"content": "..."
}
]
}
Codex implementation required.
5. Markdown Normalizer
Purpose:
Convert extracted message data into canonical Markdown.
MVP output format:
# Conversation Title
Captured: 2026-07-07
Source Platform: ChatGPT
Source URL: https://chatgpt.com/...
---
## User
Message content
---
## Assistant
Message content
---
Codex implementation required.
6. Download Writer
Purpose:
-
Generate a safe filename.
-
Save Markdown file to Downloads.
-
Avoid overwriting when possible.
Example filename:
2026-07-07 - ChatGPT - Conversation Title.md
Codex implementation required.
MVP File Output
The MVP produces exactly one file:
conversation.md
Saved to:
Downloads/
Later versions may produce:
conversation.raw.json
conversation.manifest.md
conversation.harvest.md
but those are explicitly deferred.
Error Handling
The extension should show simple user-facing messages.
Success
Saved to Downloads.
No ChatGPT Conversation Detected
No ChatGPT conversation was detected on this page.
Capture Failed
Capture failed. Try scrolling through the conversation and capturing again.
Download Failed
The conversation was captured, but the file could not be saved.
Codex implementation required.
Key Technical Risk
The largest technical risk is ChatGPT DOM instability.
The ChatGPT page structure may change without notice.
Therefore, the extractor should be isolated in its own module:
chatgptExtractor.js
Do not mix ChatGPT-specific DOM logic with generic extension logic.
Proposed Project Structure
project-thoth-chatgpt-capture/
manifest.json
src/
background.js
chatgptExtractor.js
markdownNormalizer.js
filename.js
icons/
icon16.png
icon48.png
icon128.png
README.md
Codex implementation required.
Sprint Plan
Sprint Goal
Build and manually test a browser extension that captures the currently open ChatGPT conversation and saves it as Markdown to Downloads.
Task 1 — Create Extension Skeleton
Deliverables:
-
manifest.json -
background service worker
-
toolbar button
-
placeholder icon
-
local install instructions
Codex prompt needed:
Prompt Codex to create a minimal Manifest V3 browser extension skeleton for Chrome/Edge with a toolbar button and service worker.
Task 2 — Implement Active Tab Capture Flow
Deliverables:
-
Toolbar click handler
-
active tab lookup
-
script injection
-
message passing between service worker and content script
Codex prompt needed:
Prompt Codex to implement activeTab-based capture flow using Manifest V3 service worker, scripting API, and content script message passing.
Task 3 — Implement ChatGPT DOM Extractor
Deliverables:
-
Extract conversation title if available
-
Extract ordered message blocks
-
Detect user vs assistant messages when possible
-
Extract text content
-
Preserve basic formatting
Codex prompt needed:
Prompt Codex to write a ChatGPT-specific DOM extractor module that returns ordered conversation messages with role and content fields.
Task 4 — Implement Markdown Normalizer
Deliverables:
-
Convert extracted messages to canonical Markdown
-
Include capture metadata header
-
Preserve message order
-
Add
## Userand## Assistantboundaries
Codex prompt needed:
Prompt Codex to create a markdown normalization module that converts extracted ChatGPT messages into Project Thoth conversation.md format.
Task 5 — Implement Download Writer
Deliverables:
-
Generate filename
-
Save Markdown to Downloads
-
Sanitize invalid filename characters
-
Add timestamp if needed
Codex prompt needed:
Prompt Codex to implement Markdown download using the browser downloads API with safe filename generation.
Task 6 — Add User Feedback
Deliverables:
-
Success message
-
Error message when not on ChatGPT
-
Error message when no conversation is detected
-
Error message when download fails
Codex prompt needed:
Prompt Codex to add simple user feedback for successful capture and failure states.
Task 7 — Manual Test Pass
Test cases:
-
Short ChatGPT conversation.
-
Long ChatGPT conversation.
-
Conversation with code blocks.
-
Conversation with markdown lists.
-
Conversation with headings.
-
Conversation with uploaded file references.
-
Conversation where only part of the conversation has been scrolled into view.
-
Non-ChatGPT page.
Codex prompt may be needed after defects are found:
Prompt Codex to fix extraction or formatting defects discovered during manual testing.
Acceptance Criteria
The MVP is complete when:
-
Extension installs locally in Chrome or Edge.
-
Toolbar button appears.
-
User can open a ChatGPT conversation and click the button.
-
A Markdown file is downloaded.
-
The Markdown file contains the conversation content.
-
Message order is preserved.
-
Speaker boundaries are present when detectable.
-
The extension does not call any LLM.
-
The extension does not require Project Thoth application installation.
Deferred Architecture
The following belong to later sprints:
Project Thoth desktop application
Native messaging
Vault writing
Git integration
Source Metadata generation
Conversation Manifest generation
Open WebUI integration
Local LLM integration
Gemini connector
Copilot connector
Office connector
Adobe connector
General web clipper
Architectural Finding to Validate
This MVP should answer one question:
Can a browser extension reliably capture a complete ChatGPT conversation into a usable Project Thoth Primary Source?
If yes, the connector architecture is viable.
If no, Project Thoth must use a different acquisition path for ChatGPT conversations.