# Documentation Reorganization Plan

## Overview
This document outlines the comprehensive reorganization of all documentation in the ai-debug-local-mcp project to reflect the new modular architecture and improve clarity.

## Current State Issues
1. **Fragmentation**: Multiple overlapping setup/installation guides
2. **Outdated References**: Documentation still referencing monolithic architecture
3. **Missing Documentation**: No clear migration guide for the modular architecture
4. **Poor Organization**: Documentation scattered across root and various subdirectories

## New Documentation Structure

```
ai-debug-local-mcp/
├── README.md                      # Project overview with links to key docs
├── CHANGELOG.md                   # Updated with recent changes
├── CONTRIBUTING.md                # New: How to contribute
├── LICENSE                        # Existing license
│
├── docs/
│   ├── README.md                  # Documentation index
│   ├── getting-started/
│   │   ├── installation.md        # Consolidated installation guide
│   │   ├── quickstart.md          # Single quickstart guide
│   │   └── migration-guide.md     # New: Migrating from monolith
│   │
│   ├── architecture/
│   │   ├── overview.md           # High-level architecture
│   │   ├── modular-design.md     # New: Explains 3-package design
│   │   ├── mcp-server.md         # MCP server architecture
│   │   ├── test-engine.md        # Test engine architecture
│   │   └── platform.md           # Platform architecture
│   │
│   ├── api/
│   │   ├── mcp-tools.md          # New: MCP tool reference
│   │   ├── test-engine-api.md    # New: Test engine API
│   │   └── platform-api.md       # New: Platform REST/GraphQL API
│   │
│   ├── guides/
│   │   ├── debugging-guide.md    # How to use debugging tools
│   │   ├── test-generation.md    # AI test generation guide
│   │   ├── deployment.md         # New: Production deployment
│   │   └── troubleshooting.md    # Common issues and solutions
│   │
│   ├── development/
│   │   ├── dogfooding.md         # Internal testing guide
│   │   ├── tech-debt.md          # Technical debt tracking
│   │   └── roadmap.md            # Development roadmap
│   │
│   └── research/
│       ├── competitive-analysis.md
│       ├── meticulous-features.md
│       └── market-positioning.md
│
├── core/
│   ├── README.md                  # Phoenix app specific docs
│   └── packages/
│       ├── ai-debug-mcp-server/
│       │   └── README.md          # Package-specific docs
│       ├── ai-debug-test-engine/
│       │   └── README.md          # Package-specific docs
│       └── ai-debug-platform/
│           └── README.md          # Package-specific docs
│
└── examples/                      # New: Example implementations
    ├── basic-debugging/
    ├── test-generation/
    └── ci-integration/
```

## Implementation Steps

### Phase 1: Consolidation (Immediate)
1. ✅ Create this reorganization plan
2. Merge all installation guides into `docs/getting-started/installation.md`
3. Merge all quickstart guides into `docs/getting-started/quickstart.md`
4. Remove duplicate PROJECT-VISION.md from root
5. Update main README.md with new structure

### Phase 2: Updates (Today)
1. Create migration guide for modular architecture
2. Update all references to old monolithic structure
3. Complete package-specific READMEs
4. Create API documentation for MCP tools

### Phase 3: New Documentation (This Week)
1. Write comprehensive architecture documentation for each module
2. Create deployment guide
3. Add contributing guidelines
4. Create example implementations

### Phase 4: Cleanup (This Week)
1. Move specialized docs to appropriate folders
2. Archive truly outdated documentation
3. Update all cross-references between documents
4. Add navigation links to all documents

## Success Metrics
- No duplicate documentation
- Clear navigation from README to any topic
- All code examples work with new architecture
- New users can get started in < 5 minutes
- Developers understand the modular architecture immediately

## Documentation Standards
- All markdown files must have a clear title and purpose
- Include "Last Updated" dates
- Use consistent formatting and structure
- Include working code examples
- Cross-reference related documentation
- Keep individual documents focused and concise