Development Mode
Enable advanced features for development and experimentation.
Overview
Development mode (moxxy dev) enables features that are disabled in normal operation for security reasons.
Enabled Features
| Feature | Normal Mode | Dev Mode |
|---|---|---|
evolve_core skill | ❌ | ✅ |
| Debug logging | Info | Debug |
| Self-modification | ❌ | ✅ |
| Elevated permissions | ❌ | ✅ |
Starting Dev Mode
moxxy devThis starts the gateway with development features enabled.
The evolve_core Skill
What It Does
The evolve_core skill allows agents to modify the Moxxy framework code:
<invoke name="evolve_core">["Add a new logging function to the brain module"]</invoke>Use Cases
- Rapid prototyping - Test changes without rebuilding
- Self-improvement - Let agents optimize their own code
- Research - Experiment with AI self-modification
How It Works
- Agent generates code modification
- Code is written to source files
- Changes are logged and versioned
- Gateway may need restart to apply
Example
User: Add a function to format timestamps in the brain module
Agent: I'll add a timestamp formatting function.
<invoke name="evolve_core">["Add a function format_timestamp() to src/core/brain.rs that converts Unix timestamps to ISO 8601 format"]</invoke>
System: Code modification applied to src/core/brain.rs
Agent: I've added the format_timestamp function. You'll need to restart the gateway to use it.Safety Guidelines
DANGER
Dev mode allows agents to modify system code. Use with extreme caution.
Recommendations
- Use a VM - Run dev mode in an isolated environment
- Version control - Commit changes before enabling dev mode
- Monitor changes - Watch for unexpected modifications
- Disable in production - Never use dev mode in production
- Backup regularly - Keep copies of your codebase
Audit Trail
All evolve_core invocations are logged:
moxxy logs | grep evolve_core2024-01-15 10:30:00 WARN [evolve_core] Modification requested: "Add function to brain.rs"
2024-01-15 10:30:01 INFO [evolve_core] Applied change to src/core/brain.rs
2024-01-15 10:30:01 INFO [evolve_core] Change ID: evo_20240115_103001Debug Logging
Dev mode enables verbose debug logging:
moxxy logs2024-01-15 10:30:00 DEBUG [brain] Building context with 5 memories
2024-01-15 10:30:00 DEBUG [brain] Skill catalog: 12 skills available
2024-01-15 10:30:00 DEBUG [llm] Request to OpenAI: gpt-4o (temperature=0.7)
2024-01-15 10:30:01 DEBUG [skill] host_shell executing: ls -la
2024-01-15 10:30:01 DEBUG [skill] Completed in 0.023sLog Levels
| Level | Normal | Dev |
|---|---|---|
| ERROR | ✅ | ✅ |
| WARN | ✅ | ✅ |
| INFO | ✅ | ✅ |
| DEBUG | ❌ | ✅ |
| TRACE | ❌ | ❌ |
Development Workflow
Typical Dev Session
Start dev mode:
bashmoxxy devMake changes through agent:
Add a new skill that does XReview changes:
bashgit diff moxxy logs | grep evolve_coreTest:
bashmoxxy run --agent default --prompt "Test the new skill"Commit or revert:
bashgit add -A && git commit -m "Add new skill" # or git checkout .
Pairing with IDE
For best results, use an IDE alongside dev mode:
- Keep source code open in editor
- Watch for agent modifications
- Review and refine changes manually
- Run tests before committing
Environment Variables
Dev mode respects these environment variables:
| Variable | Description |
|---|---|
MOXXY_DEV_MODE | Force dev mode (true/false) |
MOXXY_SOURCE_DIR | Source directory for modifications |
RUST_LOG | Log level override |
Reverting Changes
Using Git
# View changes
git status
git diff
# Revert specific file
git checkout src/core/brain.rs
# Revert all
git checkout .Using Backups
Dev mode creates backups before modifications:
ls ~/.moxxy/backups/
# evolve_20240115_103001_brain.rs.bakConfiguration
Enable/Disable evolve_core
Even in dev mode, you can control evolve_core:
# Disable evolve_core even in dev mode
moxxy run --agent default --prompt "Store 'false' in vault as evolve_core_enabled"Restrict Modifications
Limit which files can be modified:
moxxy run --agent default --prompt "Store 'src/skills/,src/utils/' in vault as evolve_core_allowed_paths"Best Practices
For Development
- Use dev mode on a branch
- Review all agent changes
- Run tests after modifications
- Document significant changes
- Don't commit blindly
For Research
- Use isolated environment
- Set clear boundaries
- Monitor resource usage
- Take snapshots regularly
- Document experiments
Troubleshooting
"evolve_core is disabled"
Even in dev mode, if you see this:
- Check vault setting:bash
moxxy run --agent default --prompt "Is evolve_core_enabled true?" - Verify you're in dev mode:bash
moxxy gateway status
Changes Not Applied
Some changes require gateway restart:
moxxy gateway restartCorrupted Source
If source becomes corrupted:
- Revert with git:bash
git checkout . - Or restore from backup:bash
cp ~/.moxxy/backups/evolve_*_brain.rs.bak src/core/brain.rs