update_session_context
Update session context: register a skill invocation, record a recommendation, set focus area, switch lens, or store custom state for cross-skill coordination.
Context & Sessionnon-atomic. Session mutates in-memory immediately; lens
persistence flushes the .upg file as a separate side-effect that may
succeed or fail independently of the session update.
Arguments
skill_invokedstringoptionalRegister that this skill was just invoked (e.g. "upg-status")
recommendationstringoptionalRecord a recommendation given to the user (e.g. "Run /upg-strategy to fill strategy gap")
focus_areastringoptionalSet the current focus area (e.g. "strategy", "validation", "user_research")
lensstringoptionalSwitch the active lens. Changes what context, skills, and gaps are surfaced first.
productengineeringdesigngrowth
persist_lensbooleanoptionalIf true, also save the lens to the .upg file so it persists across sessions
customobjectoptionalArbitrary key-value pairs for cross-skill state
Returns
Shape
{ updated: true, session: SessionContext }reflecting the new state.
Examples
Live call against the Notion example graph.
Output
{
"updated": true,
"session": {
"lens": "product",
"skills_invoked": [],
"recommendations_given": [],
"focus_area": null,
"custom": {}
}
}