Good! Now I need to add a section showing how machine identification integrates with MSP Mode startup, and add some agent behavior for machine detection and capability checking.


Edit

### 12. Environment Context Agent
**Launched:** Before making suggestions or running commands on infrastructure
**Purpose:** Check environmental constraints and insights to avoid known failures
**Tasks:**
- Query infrastructure environmental_notes
- Read insights.md for client/infrastructure
- Check failure history for similar operations
- Validate command compatibility with environment
- Return constraints and recommendations
**Returns:** Environmental context + compatibility warnings
**Example:** "D2TESTNAS: Manual WINS install (no native service), ReadyNAS OS, SMB1 only"
**Context Saved:** ~96% (processes failure history, returns summary)

---

### 12. Environment Context Agent
**Launched:** Before making suggestions or running commands on infrastructure
**Purpose:** Check environmental constraints and insights to avoid known failures
**Tasks:**
- Query infrastructure environmental_notes
- Read insights.md for client/infrastructure
- Check failure history for similar operations
- Validate command compatibility with environment
- Return constraints and recommendations
**Returns:** Environmental context + compatibility warnings
**Example:** "D2TESTNAS: Manual WINS install (no native service), ReadyNAS OS, SMB1 only"
**Context Saved:** ~96% (processes failure history, returns summary)

### 13. Machine Detection Agent
**Launched:** Session start, before any other agents
**Purpose:** Identify current machine and load machine-specific context
**Tasks:**
- Execute `hostname`, `whoami`, detect platform
- Generate machine fingerprint (SHA256 hash)
- Query machines table for existing record
- If new machine: Create record, prompt user for capabilities
- If known machine: Load capabilities, VPN access, tool versions
- Update last_seen timestamp
- Check for tool updates/changes since last session
**Returns:** Machine context (machine_id, capabilities, limitations)
**Example:** "ACG-M-L5090: VPN access (dataforth, grabb), Docker 24.0, PowerShell 7.4"
**Context Saved:** ~97% (machine profile loaded, only key capabilities returned)

---