docs(opencode): update integration docs for plural dirs and new frontmatter
Reflect the switch to agents/ (plural), hex color codes, mode: subagent, and @agent-name invocation in both the OpenCode integration README and the main README's OpenCode section.
This commit is contained in:
10
README.md
10
README.md
@@ -341,7 +341,7 @@ The Agency works natively with Claude Code, and ships conversion + install scrip
|
|||||||
- **[Claude Code](https://claude.ai/code)** — native `.md` agents, no conversion needed → `~/.claude/agents/`
|
- **[Claude Code](https://claude.ai/code)** — native `.md` agents, no conversion needed → `~/.claude/agents/`
|
||||||
- **[Antigravity](https://github.com/google-gemini/antigravity)** — `SKILL.md` per agent → `~/.gemini/antigravity/skills/`
|
- **[Antigravity](https://github.com/google-gemini/antigravity)** — `SKILL.md` per agent → `~/.gemini/antigravity/skills/`
|
||||||
- **[Gemini CLI](https://github.com/google-gemini/gemini-cli)** — extension + `SKILL.md` files → `~/.gemini/extensions/agency-agents/`
|
- **[Gemini CLI](https://github.com/google-gemini/gemini-cli)** — extension + `SKILL.md` files → `~/.gemini/extensions/agency-agents/`
|
||||||
- **[OpenCode](https://opencode.ai)** — `.md` agent files → `.opencode/agent/`
|
- **[OpenCode](https://opencode.ai)** — `.md` agent files → `.opencode/agents/`
|
||||||
- **[Cursor](https://cursor.sh)** — `.mdc` rule files → `.cursor/rules/`
|
- **[Cursor](https://cursor.sh)** — `.mdc` rule files → `.cursor/rules/`
|
||||||
- **[Aider](https://aider.chat)** — single `CONVENTIONS.md` → `./CONVENTIONS.md`
|
- **[Aider](https://aider.chat)** — single `CONVENTIONS.md` → `./CONVENTIONS.md`
|
||||||
- **[Windsurf](https://codeium.com/windsurf)** — single `.windsurfrules` → `./.windsurfrules`
|
- **[Windsurf](https://codeium.com/windsurf)** — single `.windsurfrules` → `./.windsurfrules`
|
||||||
@@ -446,7 +446,7 @@ See [integrations/gemini-cli/README.md](integrations/gemini-cli/README.md) for d
|
|||||||
<details>
|
<details>
|
||||||
<summary><strong>OpenCode</strong></summary>
|
<summary><strong>OpenCode</strong></summary>
|
||||||
|
|
||||||
Agents are placed in `.opencode/agent/` in your project root (project-scoped).
|
Agents are placed in `.opencode/agents/` in your project root (project-scoped).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /your/project
|
cd /your/project
|
||||||
@@ -455,13 +455,13 @@ cd /your/project
|
|||||||
|
|
||||||
Or install globally:
|
Or install globally:
|
||||||
```bash
|
```bash
|
||||||
mkdir -p ~/.config/opencode/agent
|
mkdir -p ~/.config/opencode/agents
|
||||||
cp integrations/opencode/agent/*.md ~/.config/opencode/agent/
|
cp integrations/opencode/agents/*.md ~/.config/opencode/agents/
|
||||||
```
|
```
|
||||||
|
|
||||||
Activate in OpenCode:
|
Activate in OpenCode:
|
||||||
```
|
```
|
||||||
Use the Backend Architect agent to design this API.
|
@backend-architect design this API.
|
||||||
```
|
```
|
||||||
|
|
||||||
See [integrations/opencode/README.md](integrations/opencode/README.md) for details.
|
See [integrations/opencode/README.md](integrations/opencode/README.md) for details.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# OpenCode Integration
|
# OpenCode Integration
|
||||||
|
|
||||||
OpenCode uses the same agent format as Claude Code — `.md` files with YAML
|
OpenCode agents are `.md` files with YAML frontmatter stored in
|
||||||
frontmatter stored in `.opencode/agent/`. No conversion is technically
|
`.opencode/agents/`. The converter maps named colors to hex codes and adds
|
||||||
needed, but this integration packages the agents into the correct directory
|
`mode: subagent` so agents are invoked on-demand via `@agent-name` rather
|
||||||
structure for drop-in use.
|
than cluttering the primary agent picker.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
@@ -13,42 +13,46 @@ cd /your/project
|
|||||||
/path/to/agency-agents/scripts/install.sh --tool opencode
|
/path/to/agency-agents/scripts/install.sh --tool opencode
|
||||||
```
|
```
|
||||||
|
|
||||||
This creates `.opencode/agent/<slug>.md` files in your project directory.
|
This creates `.opencode/agents/<slug>.md` files in your project directory.
|
||||||
|
|
||||||
## Activate an Agent
|
## Activate an Agent
|
||||||
|
|
||||||
In OpenCode, reference an agent by its name or description:
|
In OpenCode, invoke a subagent with the `@` prefix:
|
||||||
|
|
||||||
```
|
```
|
||||||
Use the Frontend Developer agent to help build this component.
|
@frontend-developer help build this component.
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
Activate the Reality Checker agent and review this PR.
|
@reality-checker review this PR.
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also select agents from the OpenCode UI's agent picker.
|
You can also select agents from the OpenCode UI's agent picker.
|
||||||
|
|
||||||
## Agent Format
|
## Agent Format
|
||||||
|
|
||||||
OpenCode agents use the same frontmatter as Claude Code:
|
Each generated agent file contains:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
name: Frontend Developer
|
name: Frontend Developer
|
||||||
description: Expert frontend developer specializing in modern web technologies...
|
description: Expert frontend developer specializing in modern web technologies...
|
||||||
color: cyan
|
mode: subagent
|
||||||
|
color: "#00FFFF"
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- **mode: subagent** — agent is available on-demand, not shown in the primary Tab-cycle list
|
||||||
|
- **color** — hex code (named colors from source files are converted automatically)
|
||||||
|
|
||||||
## Project vs Global
|
## Project vs Global
|
||||||
|
|
||||||
Agents in `.opencode/agent/` are **project-scoped**. To make them available
|
Agents in `.opencode/agents/` are **project-scoped**. To make them available
|
||||||
globally across all projects, copy them to your OpenCode config directory:
|
globally across all projects, copy them to your OpenCode config directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p ~/.config/opencode/agent
|
mkdir -p ~/.config/opencode/agents
|
||||||
cp integrations/opencode/agent/*.md ~/.config/opencode/agent/
|
cp integrations/opencode/agents/*.md ~/.config/opencode/agents/
|
||||||
```
|
```
|
||||||
|
|
||||||
## Regenerate
|
## Regenerate
|
||||||
|
|||||||
Reference in New Issue
Block a user