Persona Gateway
This is the unified command gateway for the AI Persona OS plugin. It routes user requests to the appropriate skill based on intent detection.
How It Works
- Read the intent mapping configuration
- Match user input against keyword patterns
- Route to the correct skill
- Handle fallback if no match found
Implementation
# Step 1: Load intent mapping
intent_config = READ ${CLAUDE_PLUGIN_ROOT}/commands/persona/intent-mapping.yaml
# Step 2: Parse user input
user_input = LOWERCASE(args)
matched_intent = NULL
# Step 3: Match keywords
FOR EACH intent IN intent_config.intents:
FOR EACH keyword IN intent.keywords:
IF keyword IN user_input:
matched_intent = intent
BREAK
# Step 4: Route to skill or show help
IF matched_intent IS NOT NULL:
TASK(
skill: matched_intent.skill,
args: args
)
ELSE:
# Show fallback help message
PRINT intent_config.fallback.message
Available Commands
- persona setup — First-run wizard to configure your AI assistant
- persona status — View system health dashboard
- persona help — List all available commands
- persona checkpoint — Save current context immediately
- persona heartbeat — Run ambient health check
- persona learn — Capture a learning or error for review
Examples
/persona setup
/persona status
/persona help
/persona checkpoint
/persona learn "remember to check permissions before file operations"
