# askme-shared CLAUDE.md
## Shared Types Overview
This library contains TypeScript interfaces used for MCP communication between the frontend and backend.
### Core Types
1. **HumanRequest**
- Represents a request from MCP client to human
- Contains: id, sessionId, question, optional context, timestamp
2. **HumanResponse**
- Simple response structure with requestId and response text
3. **MultipleChoiceResponse**
- Extends HumanResponse for multiple choice questions
- Contains array of questions with user selections, comments, and priority ratings
- **New Feature**: Optional `completionStatus` field ('done' | 'drill-deeper') for client guidance
4. **HypothesisChallengeResponse**
- Extends HumanResponse for hypothesis evaluations
- Contains challenge with agreement levels (-3 to +3) and comments
5. **ChooseNextResponse**
- Extends HumanResponse for workflow decision points
- Contains action type ('selected' | 'abort' | 'new-ideas') and selected option
- Used for decision-making in requirements, ideation, specification processes
6. **QueuedRequest**
- Extends HumanRequest with status field
- Status can be: 'pending' | 'active' | 'completed'
7. **SessionInfo**
- Session metadata including id, createdAt, requestCount, activeRequest
8. **ServerMessage**
- Generic wrapper for server-to-client messages via SSE
- Type field uses MessageType enum
- Data field contains the actual payload
9. **MessageType** enum
- NEW_REQUEST: New human request added to queue
- REQUEST_UPDATE: Status change for existing request
- SESSION_UPDATE: Session metadata changed
- ERROR: Error message from server
### Usage Pattern
- All types are exported from the library index
- Import as: `import { HumanRequest, HumanResponse } from '@ask-me-mcp/askme-shared'`
- Ensures type safety across client-server boundary
- No runtime code, only TypeScript interfaces