Now let me add a section showing how machine detection integrates with MSP Mode session start workflow.


Edit

#### When `/msp` is Called (Session Start)

1. **Client/Project Detection:**
   - Auto-detect from context if possible (mentions of client names, domains, IPs)
   - If ambiguous, present quick-select list of recent clients
   - Prompt: "Working on: [Client] - [Project]? (or select different)"

2. **Session Initialization:**
   - Start timer automatically
   - Create session record with:
     - session_date (today)
     - start_time (now)
     - client_id, project_id (detected or selected)
     - status = 'in_progress'

3. **Context Display:**
   - Show brief summary: "MSP Mode: [Client] - [Project] | Started: [time]"
   - Load relevant context: recent sessions, open tasks, credentials for this client

#### When `/msp` is Called (Session Start)

**Phase 0: Machine Detection (FIRST - before everything)**

Main Claude launches **Machine Detection Agent:**

Agent performs:
- Execute: `hostname` → "ACG-M-L5090"
- Execute: `whoami` → "MikeSwanson"
- Detect: platform → "win32"
- Detect: home_dir → "C:\Users\MikeSwanson"
- Generate fingerprint: SHA256(hostname|username|platform|home_dir)

Agent queries database:
```sql
SELECT * FROM machines WHERE machine_fingerprint = 'abc123...'
```

**If machine NOT found (first time on this machine):**
- Create machine record with auto-detected info
- Prompt user: "New machine detected: ACG-M-L5090. Please configure:"
  - Friendly name? (e.g., "Main Laptop")
  - Machine type? (laptop/desktop)
  - Has VPN access? Which profiles?
  - Docker installed? PowerShell version?
- Store capabilities in machines table

**If machine found:**
- Update last_seen timestamp
- Load machine capabilities
- Check for tool version changes (optional)

Agent returns to Main Claude:
```
Machine Context:
- machine_id: uuid-123
- friendly_name: "Main Laptop"
- capabilities: VPN (dataforth, grabb), Docker 24.0, PS 7.4
- limitations: None
```

Main Claude stores machine_id for session tracking.

**Phase 1: Client/Project Detection**

1. **Auto-detect from context:**
   - Mentions of client names, domains, IPs
   - If ambiguous, present quick-select list of recent clients
   - Prompt: "Working on: [Client] - [Project]? (or select different)"

2. **Check VPN requirements:**
   - If client requires VPN (e.g., Dataforth): Check if current machine has VPN capability
   - If no VPN on this machine: Warn user "Dataforth requires VPN - ACG-M-L5090 has VPN access ✓"
   - If VPN not available: "Travel-Laptop doesn't have VPN access - some operations may be limited"

**Phase 2: Session Initialization**

1. **Start timer automatically**

2. **Create session record with:**
   - session_date (today)
   - start_time (now)
   - client_id, project_id (detected or selected)
   - **machine_id** (from Machine Detection Agent)
   - status = 'in_progress'

3. **Context Display:**
   - Show brief summary: "MSP Mode: [Client] - [Project] | Machine: Main Laptop | Started: [time]"
   - Machine capabilities displayed if relevant
   - Load relevant context: recent sessions, open tasks, credentials for this client