Control your AI patterns. Get repeatable results.
This repository is a production-oriented OpenCode configuration that applies the OpenAgents Control workflow: context-aware planning, approval gates, modular delegation, and consistent implementation standards.
If you’ve ever had AI generate code that works but doesn’t match your architecture, naming, or quality bar, this config is built to solve exactly that.
Agents are designed to load project context before execution, so generated output follows your conventions instead of generic defaults.
Plans are proposed before execution. You stay in control of edits, commands, and implementation scope.
Minimal Viable Information (MVI) keeps context focused and efficient: load what is needed, avoid unnecessary prompt bloat.
The context and command system makes it easier for teams to produce consistent code and documentation across contributors.
External library lookups are supported via Context7 workflows, helping avoid outdated patterns.
- Core agents for general execution and coding workflows
- Specialized subagents for planning, implementation, testing, review, and documentation
- Command system for structured, repeatable workflows
- Context system for standards, workflows, and project intelligence
- Skill library across frontend, backend, infra, security, testing, and documentation
- Runtime config through
opencode.json - MCP servers for live docs (Context7) and GitHub integration
With a typical generic setup:
- AI generates code fast
- You spend time reshaping it to fit project standards
With this config:
- Agents discover relevant context first
- They propose an approach with explicit checkpoints
- They execute incrementally with validation and approval
Result: less rework, cleaner diffs, more predictable output.
Copy this repository into your global OpenCode config path (excluding git internals):
mkdir -p ~/.config/opencode
rsync -av --exclude '.git' ./ ~/.config/opencode/That’s it. OpenCode will load this config from ~/.config/opencode.
Copy .env.example to .env and fill in your API keys:
cp .env.example .env
# Edit .env with your keysAvailable variables:
CONTEXT7_API_KEY— for Context7 live docs (get from https://context7.com)- GitHub token — stored in
~/.config/opencode/.secrets/github-key
The .env file is gitignored. Never commit secrets.
- ✅ Tested on Linux
- ✅ Tested on Windows via WSL
⚠️ Other environments may work, but are not officially tested yet
OpenCode configuration is loaded by proximity:
- Project-local (
.opencode/) - Parent directories
- Global (
~/.config/opencode/)
Practical recommendation:
- Use project-local for shared team behavior
- Use global for your personal defaults
This config includes MCP (Model Context Protocol) connections for enhanced tooling and workflows.
Context7 provides live documentation lookups so agents can fetch up-to-date library docs without relying on training data.
- Used by the
Context7skill and@researcheragent - Enables real-time library docs, code examples, and API references
- Configured in
opencode.jsonunder thecontext7key - API key set via
CONTEXT7_API_KEYin.env
GitHub MCP enables AI agents to interact with GitHub directly—creating issues, PRs, managing repos, and more without leaving the workflow.
- Used for GitHub-aware workflows (issue creation, PR management, repo operations)
- Connects to GitHub Copilot MCP endpoint
- Requires a GitHub personal access token
- Store the GitHub token in
~/.config/opencode/.secrets/github-key - The
.secrets/directory is ignored by git - Do not commit credentials into the repository
- Token is referenced in
opencode.jsonvia{file:~/.config/opencode/.secrets/github-key}
- This setup uses a locally stored token for auth
- Upstream GitHub MCP also supports OAuth-based setups if you want to switch later
@implementer build this endpoint using our API conventions
@code-reviewer review this diff for security and maintainability risks
@researcher compare library options for this feature
@explainer summarize this module and generate docs
This config emphasizes a structured lifecycle:
- Discover context and constraints
- Propose a plan
- Approve before execution
- Implement incrementally
- Validate and hand off
This is intentionally optimized for reliability and maintainability over "fire-and-forget" automation.
agent/ # Core agents and specialized subagents
command/ # Slash commands and workflow entrypoints
config/ # Metadata and config support files
context/ # Standards, workflows, project intelligence
skills/ # Reusable capability modules
opencode.json # Runtime permissions/MCP configuration
README.md
You can safely adapt this config to your team:
- Update context files in
context/project-intelligence/ - Tune agent behavior in
agent/ - Add workflow commands under
command/ - Extend capabilities through
skills/
Tip: keep edits incremental and tested. If behavior changes significantly, document it in README or context notes.
If you copy these files into an existing config location, overlapping files will be replaced.
Use local for team/project consistency. Use global for personal defaults across repositories.
No. You can keep only the skills and commands your team actively uses.
Yes. This repo is compatible with OAC workflows and patterns and can be evolved alongside upstream guidance.
Powered by OpenAgents Control (OAC) by Darren Hinde.