# Developer Onboarding MCP - Quick Reference Guide

## 🚀 Quick Start

### Installation
```bash
npm install -g developer-onboarding-mcp
```

### Configuration
Add to `~/.cursor/mcp.json`:
```json
{
  "servers": {
    "developer-onboarding": {
      "command": "node",
      "args": ["path/to/developer-onboarding-mcp/dist/index.js"]
    }
  }
}
```

---

## 📋 Tool Quick Reference

### 1. identify-user-role
**Purpose**: Role selection and profile setup

**Actions**:
- `present_roles` - Show available roles
- `select_role` - Select a role and create profile
- `update_profile` - Update user profile

**Features**:
- ✅ Automatically creates user-specific onboarding folder
- ✅ Adds folder to `.gitignore` automatically
- ✅ Returns folder information in response

**Example**:
```
"Help me identify my role"
→ Shows: Frontend, Backend, Testing, DevOps, Fullstack

"I'm a frontend developer named Sarah"
→ Creates profile with role: frontend
→ Creates folder: ./sarah/ (or ./onboarding/ if no name)
→ Adds folder to .gitignore
```

---

### 2. analyze-project
**Purpose**: Analyze project structure and tech stack

**Parameters**:
- `projectPath` (required) - Path to project
- `depth` (optional) - Directory depth (default: 5)
- `includeFileContent` (optional) - Include file contents

**Example**:
```
"Analyze this project"
→ Returns: Tech stack, structure, complexity, recommendations
```

---

### 3. track-progress
**Purpose**: Track onboarding progress and milestones

**Actions**:
- `start_session` - Start new onboarding session
- `get_progress` - Get current progress
- `update_milestone` - Update milestone status
- `complete_milestone` - Mark milestone complete
- `get_milestones` - List all milestones
- `get_recommendations` - Get personalized recommendations

**Example**:
```
"Start my onboarding session"
→ Creates session, generates milestones

"Show my progress"
→ Returns: Completion %, current milestone, next steps
```

---

### 4. learning-modules
**Purpose**: Interactive learning with quizzes and validation

**Actions**:
- `generate_plan` - Generate learning plan
- `get_step` - Get current learning step
- `submit_answer` - Submit quiz answer
- `advance` - Move to next step
- `hint` - Get hint for current step
- `explain` - Get explanation
- `summarize` - Get summary of progress

**Example**:
```
"Generate my learning plan"
→ Creates: Step-by-step learning modules

"Show me the current step"
→ Returns: Content, quiz, instructions

"I completed the quiz"
→ Validates answers, unlocks next step
```

---

### 5. generate-documentation
**Purpose**: Generate role-specific documentation

**Parameters**:
- `projectPath` (required)
- `role` (required) - frontend, backend, testing, devops, fullstack
- `documentType` (required) - overview, setup_guide, learning_path, reference
- `experienceLevel` (optional) - beginner, intermediate, advanced
- `userName` (optional) - User name for folder-specific storage
- `userId` (optional) - User ID (will lookup user name from database)
- `saveToFile` (optional) - Whether to save to file (default: true)

**Features**:
- ✅ Automatically saves files to user-specific folder (or default `onboarding/` folder)
- ✅ Automatically adds folder to `.gitignore`
- ✅ Returns file path and folder information

**Example**:
```
"Generate frontend documentation"
→ Creates: Role-specific guide with setup instructions
→ Saves to: ./onboarding/frontend-overview.md (or ./user-name/frontend-overview.md)
→ Adds folder to .gitignore automatically
```

---

### 6. manage-user
**Purpose**: Manage user profiles and sessions

**Actions**:
- `get_profile` - Get user profile
- `update_profile` - Update profile
- `get_sessions` - List user sessions
- `get_progress_summary` - Get progress summary
- `get_activity_history` - Get activity history

**Example**:
```
"Show my profile"
→ Returns: Name, role, experience level, preferences

"Update my learning style"
→ Updates: learningStyle preference
```

---

### 7. analyze-code
**Purpose**: Analyze code patterns and best practices

**Parameters**:
- `projectPath` (required)
- `role` (required)
- `analysisType` (optional) - patterns, best_practices, complexity, dependencies
- `filePath` (optional) - Specific file to analyze

**Example**:
```
"Analyze code patterns for frontend"
→ Returns: Component patterns, best practices, examples
```

---

### 8. setup-environment
**Purpose**: Validate and guide environment setup

**Parameters**:
- `projectPath` (required)
- `role` (required)
- `action` (required) - check, guide, validate
- `platform` (optional) - windows, macos, linux

**Example**:
```
"Check my environment setup"
→ Validates: Node.js, dependencies, tools
→ Returns: Status, missing items, setup guide
```

---

## 🔗 Resource Quick Reference

### Project Resources
- `project://{id}/overview` - Project overview and analysis
- `project://{id}/structure` - Directory structure
- `project://{id}/techstack` - Tech stack details

### Onboarding Resources
- `onboarding://overview` - All sessions overview
- `onboarding://{sessionId}/progress` - Session progress
- `onboarding://{sessionId}/milestones` - Session milestones

### User Resources
- `user://{userId}/profile` - User profile
- `user://{userId}/dashboard` - User dashboard

### Knowledge Base
- `knowledge://guides/getting-started` - Getting started guide
- `knowledge://guides/frontend` - Frontend guide
- `knowledge://guides/backend` - Backend guide
- `knowledge://guides/testing` - Testing guide
- `knowledge://guides/devops` - DevOps guide
- `knowledge://best-practices/general` - Best practices
- `knowledge://troubleshooting/common-issues` - Troubleshooting

---

## 📊 Typical Onboarding Flow

```
1. identify-user-role (select_role)
   ↓
2. analyze-project
   ↓
3. track-progress (start_session)
   ↓
4. learning-modules (generate_plan)
   ↓
5. learning-modules (get_step) → submit_answer → advance
   ↓
6. track-progress (get_progress)
   ↓
7. generate-documentation
   ↓
8. Complete onboarding!
```

---

## 📁 Onboarding Folder Management

### Automatic Folder Creation
- **With User Name**: Creates folder named after user (e.g., `john-doe/`)
- **Without User Name**: Uses default `onboarding/` folder
- **Auto .gitignore**: Folders automatically added to `.gitignore`

### When Folders Are Created
1. When user selects role (`identify-user-role` with `select_role`)
2. When documentation is generated (`generate-documentation`)

### Folder Structure
```
project-root/
├── .gitignore          (includes /onboarding/ and user folders)
└── onboarding/         (default) OR
    └── user-name/      (user-specific)
        ├── frontend-overview.md
        ├── backend-setup-guide.md
        └── ...
```

**See**: `docs/ONBOARDING_FOLDER_FEATURE.md` for detailed documentation

---

## 💡 Common Use Cases

### Use Case 1: New Developer Onboarding
```
1. "I'm new here, help me get started"
2. Select role: "Frontend developer"
3. "Analyze the project"
4. "Start my onboarding"
5. "Show me my learning plan"
6. Complete steps with quizzes
7. "Show my progress"
```

### Use Case 2: Understanding Codebase
```
1. "I'm a backend developer"
2. "Analyze this project"
3. "Show me backend-specific code patterns"
4. "Generate backend documentation"
5. "Explain the API architecture"
```

### Use Case 3: Environment Setup
```
1. "I'm a frontend developer"
2. "Check my environment setup"
3. "Guide me through setup"
4. "Validate my installation"
```

### Use Case 4: Progress Check
```
1. "Show my progress"
2. "What should I do next?"
3. "Show my completed milestones"
4. "Get recommendations"
```

---

## 🎯 Role-Specific Quick Starts

### Frontend Developer
```
1. identify-user-role → role: frontend
2. analyze-project
3. learning-modules → focus: components, state, styling
4. generate-documentation → documentType: overview
5. analyze-code → analysisType: patterns
```

### Backend Developer
```
1. identify-user-role → role: backend
2. analyze-project
3. learning-modules → focus: APIs, database, architecture
4. generate-documentation → documentType: setup_guide
5. analyze-code → analysisType: best_practices
```

### Testing Engineer
```
1. identify-user-role → role: testing
2. analyze-project
3. learning-modules → focus: test strategy, automation
4. generate-documentation → documentType: learning_path
5. setup-environment → action: validate
```

### DevOps Engineer
```
1. identify-user-role → role: devops
2. analyze-project
3. learning-modules → focus: infrastructure, CI/CD
4. generate-documentation → documentType: reference
5. setup-environment → action: guide
```

---

## 🔍 Troubleshooting

### Issue: Tool not found
**Solution**: Check MCP configuration in `~/.cursor/mcp.json`

### Issue: Project not analyzed
**Solution**: Run `analyze-project` with correct `projectPath`

### Issue: Can't advance in learning
**Solution**: Complete quiz or confirm understanding for current step

### Issue: Progress not saving
**Solution**: Ensure session is started with `track-progress (start_session)`

---

## 📞 Support

- **Documentation**: See `docs/` folder
- **Issues**: GitHub Issues
- **Questions**: Check `README.md` or `PRESENTATION.md`

---

*Last Updated: Version 1.0.3*

