Prerequisites: Load core-concepts/registry.md first
Purpose: How to update the component registry
# Auto-detect and add new components
./scripts/registry/auto-detect-components.sh --auto-add
# Validate registry
./scripts/registry/validate-registry.sh
# Dry run (see what would change)
./scripts/registry/auto-detect-components.sh --dry-run
Update the registry when you:
# See what would be added/updated
./scripts/registry/auto-detect-components.sh --dry-run
Output:
Scanning .opencode/ for components...
Would add:
- agent: development/api-specialist
- context: development/api-patterns.md
Would update:
- agent: core/openagent (description changed)
# Actually update registry
./scripts/registry/auto-detect-components.sh --auto-add
# Validate registry
./scripts/registry/validate-registry.sh
Only edit registry.json manually if auto-detect doesn't work.
{
"id": "agent-name",
"name": "Agent Name",
"type": "agent",
"path": ".opencode/agent/category/agent-name.md",
"description": "Brief description",
"category": "category",
"tags": ["tag1", "tag2"],
"dependencies": [],
"version": "0.5.0"
}
./scripts/registry/validate-registry.sh
✅ Schema - Correct JSON structure
✅ Paths - All paths exist
✅ IDs - Unique IDs
✅ Categories - Valid categories
✅ Dependencies - Dependencies exist
# Example errors
ERROR: Path does not exist: .opencode/agent/core/missing.md
ERROR: Duplicate ID: frontend-specialist
ERROR: Invalid category: invalid-category
ERROR: Missing dependency: subagent:nonexistent
# Test with local registry
REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --list
# Try installing a component
REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --component agent:your-agent
# List all agents
cat registry.json | jq '.components.agents[].id'
# Check specific component
cat registry.json | jq '.components.agents[] | select(.id == "your-agent")'
# 1. Create agent file with frontmatter
# 2. Run auto-detect
./scripts/registry/auto-detect-components.sh --auto-add
# 3. Validate
./scripts/registry/validate-registry.sh
# 1. Update frontmatter in component file
# 2. Run auto-detect with force
./scripts/registry/auto-detect-components.sh --auto-add --force
# 3. Validate
./scripts/registry/validate-registry.sh
# 1. Delete component file
# 2. Run auto-detect (will remove from registry)
./scripts/registry/auto-detect-components.sh --auto-add
# 3. Validate
./scripts/registry/validate-registry.sh
Registry is validated on:
.github/workflows/validate-registry.yml)Registry can be auto-updated after merge:
# .github/workflows/update-registry.yml
- name: Update Registry
run: ./scripts/registry/auto-detect-components.sh --auto-add
✅ Use auto-detect - Don't manually edit registry
✅ Validate often - Catch issues early
✅ Test locally - Use local registry for testing
✅ Dry run first - See changes before applying
✅ Version consistency - Keep versions in sync
core-concepts/registry.mdguides/adding-agent.mdguides/debugging.mdLast Updated: 2025-12-10
Version: 0.5.0