Add global configuration update documentation

- Document when and how to update global configuration
- Include specific scenarios for different types of changes
- Provide step-by-step update workflow
- Add verification and testing instructions
- Recommend best practices for development vs deployment
This commit is contained in:
ditus
2025-11-10 12:57:02 +01:00
parent 4e6b2d8a78
commit acaa7408a9

View File

@ -308,6 +308,91 @@ opencode # Will load global agents
└── security.txt # Security analysis
```
## Updating Global Configuration
After making changes to the nano project agents, you need to sync them with the global configuration:
### When to Update
- Edited agent prompts
- Added new agents
- Removed existing agents
- Modified agent configurations
- Changed opencode.json settings
### Update Steps
#### 1. Copy Changes to Global Location
```bash
# Navigate to nano project directory
cd /path/to/nano-opencode-agents
# Copy updated agent files
cp .opencode/agent/* ~/.config/opencode/agent/
cp prompts/* ~/.config/opencode/prompts/
# Update global config if needed
cp opencode.json ~/.config/opencode/config.json
```
#### 2. Verify the Update
```bash
# Check that files are current
ls -la ~/.config/opencode/agent/
ls -la ~/.config/opencode/prompts/
cat ~/.config/opencode/config.json
```
#### 3. Test Global Agents
```bash
# Test from any directory
cd /tmp
opencode # Should load updated agents
```
### Specific Update Scenarios
#### Prompt Edits
```bash
# Single prompt update
cp prompts/cleanup.txt ~/.config/opencode/prompts/
```
#### New Agent Added
```bash
# Copy new agent and update config
cp .opencode/agent/new-agent.md ~/.config/opencode/agent/
cp prompts/new-agent.txt ~/.config/opencode/prompts/
# Update ~/.config/opencode/config.json with new agent entry
```
#### Agent Removal
```bash
# Remove from global location
rm ~/.config/opencode/agent/removed-agent.md
rm ~/.config/opencode/prompts/removed-agent.txt
# Remove from ~/.config/opencode/config.json
```
#### Configuration Changes
```bash
# Update global config completely
cp opencode.json ~/.config/opencode/config.json
```
### Workflow Recommendation
1. **Make changes** in nano project (version controlled)
2. **Test locally** in nano project directory
3. **Commit changes** to git repository
4. **Sync to global** using the steps above
5. **Verify globally** by testing from another directory
This workflow ensures:
- Version control of all changes
- Clean separation between development and deployment
- Easy rollback if needed
- Shareable configuration for team members
### Method 3: Project-Specific Customization
#### Step 1: Initialize Project