Overview
Build a runtime context discovery mechanism and skill permission validation system to improve security, clarity, and developer experience when working with context files and agent skills.
Goals
- Build runtime context file discovery mechanism
- Add automatic context loading based on task type
- Implement skill permission validation system
- Create context lifecycle management (discovery → loading → injection)
- Add CLI commands for permission validation
- Document context system architecture
- Build debugging tools for context issues
Key Features
Runtime Discovery
- Automatic context file detection in
.opencode/context/
- Task-type based context loading
- Priority-based context selection
- Context dependency resolution
Permission System
- Skill permission validation in agent frontmatter
opencode.json permission configuration
- Tool access restrictions per skill
- Permission inheritance and overrides
Context Lifecycle
- Discovery - Find relevant context files
- Loading - Read and parse context
- Validation - Check permissions and dependencies
- Injection - Add to agent prompt
- Cleanup - Remove when no longer needed
CLI Commands
/validate-permissions - Check agent permissions
/discover-context - Show available context files
/context-status - View loaded context
/reload-context - Refresh context files
Debugging Tools
- Context loading trace logs
- Permission violation warnings
- Missing context detection
- Circular dependency detection
Related Issues
Success Criteria
Overview
Build a runtime context discovery mechanism and skill permission validation system to improve security, clarity, and developer experience when working with context files and agent skills.
Goals
Key Features
Runtime Discovery
.opencode/context/Permission System
opencode.jsonpermission configurationContext Lifecycle
CLI Commands
/validate-permissions- Check agent permissions/discover-context- Show available context files/context-status- View loaded context/reload-context- Refresh context filesDebugging Tools
Related Issues
Success Criteria