Guardian Core Customization
This skill helps users add capabilities or modify behavior. Use AskUserQuestion to understand what they want before making changes.
Workflow
- •Understand the request - Ask clarifying questions
- •Plan the changes - Identify files to modify
- •Implement - Make changes directly to the code
- •Test guidance - Tell user how to verify
Key Files
| File | Purpose |
|---|---|
platform/lib/guardian/kernel/config.ex | Kernel paths and config |
platform/lib/guardian/kernel/whatsapp/message_router.ex | Message routing |
platform/lib/guardian/kernel/container_runner.ex | Agent container spawning |
platform/lib/guardian/kernel/task_scheduler.ex | Scheduled tasks |
data/registered_groups.json | Registered groups and triggers |
groups/CLAUDE.md | Global memory/persona |
Common Customization Patterns
Adding a New Input Channel (e.g., Telegram, Slack, Email)
Questions to ask:
- •Which channel? (Telegram, Slack, Discord, email, SMS, etc.)
- •Same trigger word or different?
- •Same memory hierarchy or separate?
- •Should messages from this channel go to existing groups or new ones?
Implementation pattern:
- •Find/add MCP server for the channel
- •Add connection and message handling in the kernel
- •Store messages in the database (update Ecto schemas if needed)
- •Ensure responses route back to correct channel
Adding a New MCP Integration
Questions to ask:
- •What service? (Calendar, Notion, database, etc.)
- •What operations needed? (read, write, both)
- •Which groups should have access?
Implementation:
- •Add MCP server config to the container runner
- •Add tools to
allowedToolsin the agent runner - •Document in
groups/CLAUDE.md
Changing Assistant Behavior
Questions to ask:
- •What aspect? (name, trigger, persona, response style)
- •Apply to all groups or specific ones?
Simple changes → edit kernel config or data/registered_groups.json
Persona changes → edit groups/CLAUDE.md
Per-group behavior → edit specific group's CLAUDE.md
Adding New Commands
Questions to ask:
- •What should the command do?
- •Available in all groups or main only?
- •Does it need new MCP tools?
Implementation:
- •Add command handling in the message router
- •Check for the command before the trigger pattern check
Changing Deployment
Questions to ask:
- •Target platform? (Linux server, Docker)
- •Service manager? (systemd, Docker)
Implementation:
- •Create appropriate service files
- •Update paths in config
- •Provide setup instructions
After Changes
Always tell the user:
bash
# Rebuild and restart cd platform && mix compile systemctl --user restart guardian-core
Example Interaction
User: "Add Telegram as an input channel"
- •Ask: "Should Telegram use the same @Andy trigger, or a different one?"
- •Ask: "Should Telegram messages create separate conversation contexts, or share with WhatsApp groups?"
- •Find Telegram MCP or library
- •Add connection handling in the kernel
- •Update message storage in Ecto schemas
- •Tell user how to authenticate and test