diff --git a/.opencode/context/openagents-repo/guides/updating-registry.md b/.opencode/context/openagents-repo/guides/updating-registry.md index 407236f..9864eca 100644 --- a/.opencode/context/openagents-repo/guides/updating-registry.md +++ b/.opencode/context/openagents-repo/guides/updating-registry.md @@ -431,6 +431,50 @@ jq '.components.subagents[] | select(.id == "coder-agent")' registry.json # If missing, add the dependency component first ``` +### Context Not Found (Aliases) + +**Problem**: Error `Could not find path for context:old-name` even though file exists. + +**Cause**: The context file might have been renamed or the ID in registry doesn't match the requested name. + +**Solution**: Add an alias to the component in `registry.json`. + +1. Find the component in `registry.json` +2. Add `"aliases": ["old-name", "alternative-name"]` +3. Validate registry + +--- + +## Managing Aliases + +Aliases allow components to be referenced by multiple names. This is useful for: +- Backward compatibility (renamed files) +- Shorthand references +- Alternative naming conventions + +### Adding Aliases + +Currently, aliases must be added **manually** to `registry.json` (auto-detect does not yet support them). + +```json +{ + "id": "session-management", + "name": "Session Management", + "type": "context", + "path": ".opencode/context/core/workflows/session-management.md", + "aliases": [ + "workflows-sessions", + "sessions" + ], + ... +} +``` + +**Note**: Always validate the registry after manual edits: +```bash +./scripts/registry/validate-registry.sh +``` + --- **Last Updated**: 2025-01-06 diff --git a/registry.json b/registry.json index 827ec48..c75d40d 100644 --- a/registry.json +++ b/registry.json @@ -1045,6 +1045,16 @@ "dependencies": [], "category": "standard" }, + { + "id": "adding-skill", + "name": "Adding Skill", + "type": "context", + "path": ".opencode/context/openagents-repo/guides/adding-skill.md", + "description": "Guide: Adding a new skill", + "tags": [], + "dependencies": [], + "category": "standard" + }, { "id": "creating-release", "name": "Creating Release", @@ -1629,6 +1639,9 @@ "name": "Feature Breakdown", "type": "context", "path": ".opencode/context/core/workflows/feature-breakdown.md", + "aliases": [ + "workflows-task-breakdown" + ], "description": "Task Breakdown Guidelines", "tags": [], "dependencies": [], @@ -1639,6 +1652,9 @@ "name": "Session Management", "type": "context", "path": ".opencode/context/core/workflows/session-management.md", + "aliases": [ + "workflows-sessions" + ], "description": "Session Management", "tags": [], "dependencies": [], @@ -2331,7 +2347,6 @@ "context:workflows-review", "context:system-context-guide", "context:adding-skill", - "context:adding-skill", "config:env-example" ] },