- Add explicit task() invocation syntax to codebase-agent with examples
- Include when-to-use guidance for each subagent (4+ files, simple tasks, etc.)
- Add comprehensive OpenCode context reference cheatsheet covering:
- File references with @ symbol (immediate vs lazy loading)
- Agent invocation patterns (task tool vs @ syntax)
- Shell command execution with backtick syntax
- Best practices and anti-patterns
- Complete real-world examples and templates
This improves AI agent reliability in delegating to subagents by providing
clear, explicit invocation patterns following research-backed progressive
disclosure principles.
Add support for custom global installation paths with automatic context
reference transformation. This enables users to install to any location
while maintaining working context references.
Changes:
- Add universal path transformation for ANY global installation path
(not just ~/.config/opencode)
- Implement automatic cleanup trap for temp files on exit/crash/interrupt
- Add early validation for --install-dir argument with clear error messages
- Add developer documentation for context reference convention
Technical Details:
- Path transformation detects local vs global by checking if path ends
in .opencode (local) or not (global)
- Transformation applies to ALL file types during installation
- sed transforms both @ references and shell command paths
- Cleanup trap handles EXIT, INT, and TERM signals
Testing:
- 31 unit and integration tests (100% pass rate)
- All README installation scenarios verified
- Edge cases tested and handled
- Cross-platform compatible (macOS, Linux, Windows Git Bash)
Documentation:
- Added dev/docs/context-reference-convention.md explaining the required
@.opencode/context/ format and why it's necessary
- Includes examples, validation instructions, and test results
Breaking changes: None
New capabilities: Custom global path support
- Add research-backed-prompt-design.md with Stanford/Anthropic patterns
- Add openagent.md documentation with workflow and delegation details
- Add developer guides for slash commands and context system
- Document position sensitivity, nesting limits, and instruction ratios
- Include examples and best practices for prompt optimization