This section translates the Hermeneutic Spiral pattern into concrete implementation
steps. The pattern works for any conversational system with persistent user context—
chatbots, intake forms, onboarding flows, or customer service tools.
Step-by-Step Process
Step 1: Identify Stable vs. Variable Fields (Human)
Categorize user information by persistence:
- Stable: Identity, brand, organization, preferences (persist forever)
- Semi-stable: Contact info, team members, budget range (confirm if stale)
- Variable: Current need, timeline, specific requirements (ask each time)
Step 2: Implement Context Schema (Agent)
Create a schema that captures:
- User identity (phone, email, or auth token)
- Stable fields (name, brand, industry, style preferences)
- Session history (past requests, timestamps, outcomes)
- Interaction metadata (first_seen, total_sessions, last_seen)
Store in KV, database, or session storage based on scale.
Step 3: Build Delta Detection Logic (Agent)
Write a function that determines what to ask:
- Skip questions for fields we already know
- Confirm semi-stable fields if stale (>90 days)
- Offer previous values as defaults when applicable
- Always ask for variable fields (current need, budget)
Step 4: Design Conversational Flow (Human)
Create two conversation paths:
- First-time: Full intake (name, brand, preferences, need)
- Returning: Context-aware ("Welcome back, [name]! Still with [brand]?")
Ensure returning flow feels natural, not robotic.
Step 5: Add Graceful Degradation (Agent)
Handle partial context gracefully:
- If name exists but brand missing: "Hi [name]! What are you working on?"
- If context is stale: "Still with [brand]? Anything changed?"
- If fields conflict: Ask for confirmation rather than assuming
Step 6: Test Context Persistence (Human)
Validate that context survives:
- Session boundaries (page refresh, browser close)
- Component remounting (React/Svelte/Vue lifecycle)
- Authentication flows (login/logout)
- Multi-device access (phone → desktop) Real-World Example: Customer Support Chatbot
Let's say you're building a support chatbot for a SaaS product:
interface UserContext {
// Stable (persist forever)
user_id: string;
name: string;
company: string;
plan: 'starter' | 'pro' | 'enterprise';
industry?: string;
// Semi-stable (confirm if >90 days)
contact_email?: string;
contact_phone?: string;
preferred_language?: string;
// Session history (accumulates)
past_tickets: Array<{
issue_type: string;
resolved: boolean;
created_at: string;
}>;
// Metadata
first_interaction: string;
total_sessions: number;
last_seen: string;
}
function buildConversation(context: UserContext): Message[] {
const messages: Message[] = [];
// First-time flow
if (!context.name) {
messages.push({ text: "Hi! I'm here to help. What's your name?" });
return messages;
}
// Returning flow
const greeting = `Welcome back, ${context.name}!`;
// Check for repeated issues
const recentTickets = context.past_tickets.filter(
t => Date.now() - new Date(t.created_at).getTime() < 7 * 24 * 60 * 60 * 1000
);
if (recentTickets.some(t => !t.resolved)) {
messages.push({
text: `${greeting} I see you have an open issue. Want to follow up on that?`
});
} else {
messages.push({
text: `${greeting} How can I help you today?`
});
}
return messages;
} First interaction:
Bot: Hi! I'm here to help. What's your name?
User: Sarah
Bot: Nice to meet you, Sarah! What company are you with?
User: Acme Corp
Bot: Got it. What issue can I help you with?
User: Users can't log in
Bot: Let me create a ticket for login issues...
Return interaction (1 week later):
Bot: Welcome back, Sarah! I see you have an open issue about login problems.
Want to follow up on that?
User: Yes, is it fixed?
Bot: Let me check the ticket status...
[Checks ticket #1234]
Yes! Our team resolved it yesterday. Login should work now.
Are you still experiencing issues?
User: No, it's working. Thanks!
Bot: Great! Anything else I can help with? Notice: The bot remembered Sarah's name, company, and open ticket. The conversation
feels continuous, not like starting over.
When to Use the Hermeneutic Spiral
Use this pattern when:
- Multi-session interactions: Users return multiple times over weeks/months
- Identity is consistent: Phone number, email, or auth token persists
- Context accumulates value: Past interactions inform future ones
- Reduced friction matters: Saving 30 seconds per session adds up
- Relationship-driven: You're building a service, not a one-off transaction
Don't use for:
- One-time interactions (contact forms, surveys)
- Anonymous users where identity can't persist
- High-security contexts where caching user data is risky
- Exploratory conversations where context doesn't help
Privacy and Data Handling
Context persistence raises privacy considerations. Implement safeguards:
The Hermeneutic Spiral respects user time while respecting user privacy. Persistent
context should feel helpful, not invasive. Test with real users to calibrate.