How runningwa/thinking-claude works
Main Components
• Browser Extension: Represent this as the core interactive element that users install (with separate subcomponents for Chrome, Firefox, and even a legacy version for Chrome_v0).
– For the modern Chrome extension, include elements such as background scripts, content scripts, UI components (instruction-selector, various UI elements, etc.), hooks (e.g., use-content-sync, use-model-instructions), services (e.g., mutation observer), and utilities.
• Thinking Protocol (Model Instructions): Represent this as the data/instructions store (all the versioned markdown files under the model_instructions directory) that drives Claude's deep "thought process" instructions.
Break Down the Extension’s Internal Architecture
• Client-Side Components:
– Content Scripts: Include how these scripts are injected into pages—specifically into https://claude.ai—to capture and process content so that Claude’s thought process becomes organized.
– Background Scripts & Managers: Represent background scripts (such as the background/index.ts) and managers (extension-manager, feature-manager) that handle internal logic and interactions between the content scripts and the extension’s services.
• External Dependencies / Build / Configuration:
– Mention supporting configuration files (webpack config files for bundling, tailwind configuration, ESLint, Prettier, etc.) which are indirectly part of the architecture.
– Note GitHub workflows (.github) and Husky configuration to indicate continuous integration and code quality practices.
Relationships and Data Flow
• That UI components (built using React/TypeScript as seen by the .tsx files) interact with the background or content scripts.
Architectural Patterns & Design Principles
• Separation of concerns:
– User Interface components (for rendering and user interaction) are maintained separately from logic layers (like managers, hooks, or services).
– The browser extension follows a modular structure where background processing, content injection, and UI rendering are decoupled.
• That modern web development practices are used (as indicated by the use of TypeScript, React-like file naming conventions with .tsx, utility libraries, and module-based architecture).
• For extensibility, reference that different browser versions (Chrome, Firefox, and legacy Chrome_v0) are isolated into different folders, implying versioning and support for multiple platforms.
Final Assembly
Happy diagramming!