From johnlindquist-claude
Synchronizes Mermaid diagrams in ai/diagrams/ with codebase. Updates specific diagram if name provided; otherwise audits, validates, and syncs all.
npx claudepluginhub joshuarweaver/cascade-ai-ml-engineering --plugin johnlindquist-claudediagram-name# Diagram Synchronization (DDD Workflow) You are operating under **Diagram Driven Development (DDD)** methodology. **Purpose:** Maintain the `ai/diagrams` directory as the single source of truth for system understanding. ## Diagram Management Conventions **Location:** `ai/diagrams/` **Organization:** - `ai/diagrams/features/` - Feature-specific diagrams - `ai/diagrams/architecture/` - System architecture diagrams - `ai/diagrams/journeys/` - User journey diagrams - `ai/diagrams/tests/` - Test coverage diagrams - `ai/diagrams/refactoring/` - Before/After improvement diagrams **Format:**...
You are operating under Diagram Driven Development (DDD) methodology.
Purpose: Maintain the ai/diagrams directory as the single source of truth for system understanding.
Location: ai/diagrams/
Organization:
ai/diagrams/features/ - Feature-specific diagramsai/diagrams/architecture/ - System architecture diagramsai/diagrams/journeys/ - User journey diagramsai/diagrams/tests/ - Test coverage diagramsai/diagrams/refactoring/ - Before/After improvement diagramsFormat: Markdown files (.md) containing Mermaid code blocks
Naming Convention:
sequence-, flow-, arch-, feature-feature-user-checkout-flow.mdsequence-authentication-journey.mdarch-system-overview.mdflow-payment-processing.mdStore or update the specific diagram named in $ARGUMENTS.
Perform a full sync operation:
Audit Current Diagrams
ai/diagrams/Validate Diagram Quality
Suggest Updates
Execute Sync
Each diagram file should follow this structure:
# [Diagram Title]
**Type:** [Feature Diagram | Sequence Diagram | Architecture Diagram | etc.]
**Last Updated:** [YYYY-MM-DD]
**Related Files:**
- `path/to/implementation.ts`
- `path/to/component.tsx`
## Purpose
[1-2 sentence description of what user value this diagram illustrates]
## Diagram
\`\`\`mermaid
[Mermaid diagram code following DDD principles]
\`\`\`
## Key Insights
- [User impact point 1]
- [User impact point 2]
- [Technical enabler point 1]
## Change History
- **YYYY-MM-DD:** [Description of change]
Before storing any diagram, verify:
#90EE90 for highlighting changes in Before/After)Maintain an index at ai/diagrams/README.md:
# Unified Impact Diagrams Index
This directory contains all diagrams for the project, following Diagram Driven Development (DDD) methodology.
## Architecture Overview
- [System Architecture](architecture/arch-system-overview.md) - High-level diagram showing all major systems
## User Journeys
- [User Authentication](journeys/sequence-authentication-journey.md) - Login/signup flow with security impact
- [Checkout Process](journeys/feature-user-checkout-flow.md) - Complete purchase flow with performance annotations
## Features
- [Real-time Notifications](features/feature-notification-system.md) - WebSocket implementation with UX impact
- [Search Functionality](features/feature-search-feature.md) - Search architecture with speed optimizations
## Test Coverage
- [Payment Tests](tests/feature-payment-test-coverage.md) - Test strategy connected to user security requirements
## Refactoring Plans
- [Caching Layer Addition](refactoring/feature-add-caching-layer.md) - Before/After with load time improvements
## Last Updated
[YYYY-MM-DD] - [Brief description of recent diagram changes]
This command is part of the DDD workflow:
/analyze-flows to understand current state/sync-diagrams to update diagramsStart by examining the ai/diagrams/ directory (create if it doesn't exist) and execute the appropriate sync operation based on whether $ARGUMENTS was provided.