# Manage User Context Task

## Task Configuration
```yaml
task_type: "interactive-workflow"
complexity: "moderate"
estimated_time: "15-30 minutes"
elicit: true
prerequisites: ["user-interaction"]
outputs:
  - user-context-profile
  - updated-memory-system
  - personalized-recommendations
```

## Task Objective
Create, update, and manage persistent user context profiles that enable personalized AI interactions and eliminate repetitive information gathering across sessions.

## Process Workflow

### Phase 1: Context Assessment (5-10 minutes)

**Current Context Evaluation:**
1. **Check Existing Context**: Look for existing user context profile in artifacts
2. **Assess Completeness**: Evaluate what information is current and accurate
3. **Identify Gaps**: Determine what new information is needed
4. **Update Triggers**: Recognize when significant updates are warranted

**Context Status Determination:**
- **New User**: No existing context - full profile creation needed
- **Returning User**: Existing context - validation and updates needed
- **Context Refresh**: Existing context but outdated - selective updates
- **Context Enhancement**: Good context but new domain/goal - targeted expansion

### Phase 2: Information Gathering (10-20 minutes)

**Structured Elicitation Process:**

**For New Users - Complete Profile Creation:**
1. **Personal Profile Discovery**
   - Technical skills and preferred tools
   - Industry expertise and professional background
   - Personal interests and passion areas
   - Problem sensitivity and market awareness

2. **Business Preferences**
   - Revenue model preferences and reasoning
   - Target financial goals and timelines
   - Pricing comfort and customer type preferences

3. **Development Constraints**
   - Time availability and schedule preferences
   - Technical complexity tolerance
   - Resource constraints and budgets
   - Launch timeline expectations

4. **Market Experience**
   - Previous launch history and lessons learned
   - Validation and research experience
   - Community involvement and network strength

5. **Goals and Learning Patterns**
   - Primary objectives and success definitions
   - Risk tolerance and decision-making style
   - Learning preferences and feedback integration

**For Returning Users - Targeted Updates:**
1. **Goal Evolution**: "Have your objectives or priorities shifted since we last worked together?"
2. **Constraint Changes**: "Are your time, budget, or technical constraints different now?"
3. **New Experiences**: "What have you learned or accomplished since our last session?"
4. **Preference Refinement**: "Based on recent experience, would you change any preferences?"

**For Context Enhancement:**
1. **Domain-Specific Details**: Gather information relevant to current exploration area
2. **Goal-Specific Constraints**: Focus on limitations relevant to current objectives
3. **Context Integration**: How new information relates to existing profile

### Phase 3: Context Creation/Update (5-10 minutes)

**Profile Generation:**
1. **Template Population**: Use user-context-tmpl.yaml as structure
2. **Information Synthesis**: Combine new information with existing context
3. **Consistency Validation**: Ensure new information aligns with established patterns
4. **Completeness Check**: Verify all relevant sections are addressed

**Context Storage:**
1. **Artifact Creation**: Generate user context profile as persistent artifact
2. **Version Management**: Track updates and changes over time
3. **Reference Integration**: Ensure context is easily accessible for future sessions

### Phase 4: Context Application (Immediate)

**Personalization Implementation:**
1. **Session Customization**: Apply context to current exploration or task
2. **Recommendation Filtering**: Use preferences to guide suggestions
3. **Assumption Elimination**: Avoid re-asking answered questions
4. **Intelligent Defaults**: Use known preferences as starting points

## Integration Points

### Laboratory Agent Integration
- **Auto-Context Loading**: Laboratory automatically checks for existing user context
- **Smart Questioning**: Skip questions already answered in context
- **Personalized Exploration**: Tailor creative sessions to user interests and constraints
- **Memory Commands**: Provide commands to view, update, and manage context

### Cross-Session Continuity
- **Session Startup**: Begin with context summary and recent changes
- **Goal Tracking**: Monitor progress toward stated objectives
- **Preference Evolution**: Track how user preferences change over time
- **Learning Integration**: Apply lessons learned to improve future recommendations

## Success Criteria
- User context profile created or updated with current, accurate information
- Elimination of repetitive questioning in subsequent sessions
- Personalized recommendations based on established preferences
- Seamless integration with exploration and task execution workflows

## Memory Management Commands

### Context Viewing
- Display current user context profile
- Show recent updates and changes
- Highlight most relevant sections for current session

### Context Updating
- Add new information to existing profile
- Modify preferences or constraints
- Record new experiences or learnings
- Update goals and objectives

### Context Validation
- Verify current information accuracy
- Identify outdated or inconsistent information
- Prompt for updates when context seems stale
- Maintain context quality and relevance

## Template Usage
**Primary Template**: `user-context-tmpl.yaml`
**Storage Location**: Save completed profiles in `.vcsys/artifacts/user-contexts/`
**Naming Convention**: `user-context-[username]-[date].yaml`
**Update Strategy**: Incremental updates with change tracking