Skip to content

Ragulsundaram/Prompt-Trail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Prompt Version Tracking Browser Extension

A browser extension that tracks prompt iterations and AI responses across multiple LLM platforms, enabling users to version, branch, and manage their prompt evolution.

🎯 Project Overview

This extension helps users:

  • Track prompt versions across ChatGPT, Gemini, and Claude
  • Create branches from successful prompt versions
  • Auto-save prompt iterations with manual checkpoint functionality
  • Export/import prompt history for backup and sharing
  • Navigate through prompt evolution with a clean sidebar interface

πŸš€ Development Phases

Phase 1: Foundation & Core Architecture

Goal: Establish basic extension structure and core functionality

Deliverables:

  • Project setup with manifest.json (Manifest V3)
  • Basic extension architecture with content scripts
  • Local storage system for prompt versions
  • Core data models (Prompt, Version, Branch, Response)
  • Basic UI framework setup

Technical Focus:

  • Browser extension fundamentals
  • Storage API implementation
  • Event system architecture
  • Security and permissions setup

Phase 2: ChatGPT Integration (MVP)

Goal: Full prompt tracking functionality for ChatGPT

Deliverables:

  • ChatGPT DOM detection and manipulation
  • Automatic prompt change detection
  • Manual checkpoint creation
  • Response capture and association
  • Basic sidebar UI for version history
  • Prompt replacement functionality

Technical Focus:

  • Content script injection for chat.openai.com
  • Text change detection algorithms
  • DOM mutation observers
  • Initial UI components

Key Features:

  • Auto-versioning: Track every prompt submission
  • Manual Checkpoints: User-defined important versions
  • Response Tracking: Capture AI responses with prompts
  • Version Navigation: Click to restore previous prompts
  • Branch Creation: Start new iteration from any version

Phase 3: Multi-Platform Support

Goal: Extend functionality to Gemini and Claude

Deliverables:

  • Gemini (bard.google.com) integration
  • Claude (claude.ai) integration
  • Platform-agnostic architecture
  • Unified UI across platforms
  • Cross-platform prompt format standardization

Technical Focus:

  • Platform detection system
  • Adapter pattern for different DOM structures
  • Consistent API across platforms
  • Shared component library

Phase 4: Advanced Version Management

Goal: Sophisticated branching and organization features

Deliverables:

  • Advanced branching system
  • Version tagging and naming
  • Search functionality within prompt history
  • Diff visualization between versions
  • Merge functionality for branches

Technical Focus:

  • Tree-based version structure
  • Search and indexing algorithms
  • Visual diff algorithms
  • Complex state management

Key Features:

  • Smart Branching: Create branches from any point in history
  • Version Comparison: Side-by-side diff view
  • Tagging System: Organize versions with custom tags
  • Search & Filter: Find specific prompts quickly
  • Merge Capabilities: Combine successful elements from different branches

Phase 5: Enhanced UI/UX

Goal: Polished user interface and experience

Deliverables:

  • Advanced sidebar with collapsible sections
  • Visual prompt timeline
  • Drag-and-drop organization
  • Keyboard shortcuts
  • Dark/light theme support
  • Accessibility improvements

Technical Focus:

  • Advanced CSS and animations
  • Keyboard navigation
  • ARIA accessibility standards
  • Performance optimization

Phase 6: Data Management & Export

Goal: Comprehensive data handling and portability

Deliverables:

  • Export functionality (JSON, CSV formats)
  • Import functionality with validation
  • Bulk operations (delete, tag, move)
  • Storage optimization and cleanup
  • Data migration tools

Technical Focus:

  • File handling APIs
  • Data validation and sanitization
  • Storage optimization algorithms
  • Backward compatibility

Phase 7: Advanced Features

Goal: Power user features and integrations

Deliverables:

  • Template system for common prompts
  • Analytics dashboard (usage patterns)
  • Collaboration features (share prompt chains)
  • Integration with external tools
  • Custom prompt evaluation metrics

Technical Focus:

  • Advanced data analytics
  • Sharing and collaboration APIs
  • External API integrations
  • Performance metrics

πŸ›  Technical Architecture

Core Components

1. Content Scripts

  • Platform Adapters: Separate adapters for ChatGPT, Gemini, Claude
  • DOM Managers: Handle platform-specific DOM manipulation
  • Event Listeners: Detect prompt changes and submissions

2. Background Script

  • Storage Manager: Handle all data persistence
  • Event Coordinator: Manage communication between components
  • Export/Import Handler: Data portability features

3. Popup/Sidebar UI

  • Version Tree Component: Visual representation of prompt history
  • Search Interface: Find and filter prompts
  • Settings Panel: Extension configuration

4. Storage Schema

{
  sessions: {
    [sessionId]: {
      platform: 'chatgpt|gemini|claude',
      created: timestamp,
      versions: [versionId],
      branches: [branchId]
    }
  },
  versions: {
    [versionId]: {
      prompt: string,
      response: string,
      timestamp: number,
      parentVersion: versionId,
      isCheckpoint: boolean,
      tags: [string]
    }
  }
}

πŸ”§ Development Setup

Prerequisites

  • Node.js 16+
  • Chrome/Firefox browser for testing
  • Code editor with JavaScript/TypeScript support

Initial Setup

npm install
npm run build
npm run dev  # Development mode with hot reload

Testing

npm run test          # Unit tests
npm run test:e2e      # End-to-end tests
npm run lint          # Code linting

πŸ“‹ Current Implementation Status

βœ… Completed

  • Project structure and documentation
  • Development roadmap planning

🚧 In Progress

  • Basic extension manifest and architecture

πŸ“… Next Steps

  1. Implement basic extension structure (Phase 1)
  2. Create ChatGPT content script (Phase 2)
  3. Build storage system for prompt versions
  4. Develop sidebar UI components

🀝 Contributing

Code Standards

  • Use TypeScript for type safety
  • Follow established naming conventions
  • Write comprehensive tests for new features
  • Document complex algorithms and data flows

Git Workflow

  • Feature branches for new functionality
  • Descriptive commit messages
  • Pull request reviews required

πŸ“„ License

MIT License - see LICENSE file for details


🎯 Success Metrics

Phase 1-2 Success Criteria:

  • Successfully track prompts on ChatGPT
  • Users can navigate version history
  • Data persists across browser sessions

Phase 3-4 Success Criteria:

  • Works consistently across all three platforms
  • Advanced branching system operational
  • Search functionality performs well

Phase 5-7 Success Criteria:

  • Professional UI/UX experience
  • Robust export/import functionality
  • Power user features fully implemented

Last Updated: August 27, 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors